linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [V3] venus: helper: do not set constrained parameters for UBWC
@ 2021-07-02  5:16 Mansur Alisha Shaik
  2021-07-04 14:00 ` Bryan O'Donoghue
  0 siblings, 1 reply; 3+ messages in thread
From: Mansur Alisha Shaik @ 2021-07-02  5:16 UTC (permalink / raw)
  To: bryan.odonoghue, linux-media, stanimir.varbanov
  Cc: linux-kernel, linux-arm-msm, vgarodia, dikshita, Mansur Alisha Shaik

plane constraints firmware interface is to override the default
alignment for a given color format. By default venus hardware has
alignments as 128x32, but NV12 was defined differently to meet
various usecases. Compressed NV12 has always been aligned as 128x32,
hence not needed to override the default alignment.

Fixes: bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actual plane constraints to FW")
Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>

Changes in V3:
- Elaborated commit message as per comments by Bryan
- As per Bryan comment alligned fixes in single line.
---
 drivers/media/platform/qcom/venus/helpers.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index 1fe6d46..601ee3e 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -1137,8 +1137,12 @@ int venus_helper_set_format_constraints(struct venus_inst *inst)
 	if (!IS_V6(inst->core))
 		return 0;
 
+	if (inst->opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC)
+		return 0;
+
 	pconstraint.buffer_type = HFI_BUFFER_OUTPUT2;
 	pconstraint.num_planes = 2;
+
 	pconstraint.plane_format[0].stride_multiples = 128;
 	pconstraint.plane_format[0].max_stride = 8192;
 	pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [V3] venus: helper: do not set constrained parameters for UBWC
  2021-07-02  5:16 [V3] venus: helper: do not set constrained parameters for UBWC Mansur Alisha Shaik
@ 2021-07-04 14:00 ` Bryan O'Donoghue
  2021-07-04 14:00   ` Bryan O'Donoghue
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan O'Donoghue @ 2021-07-04 14:00 UTC (permalink / raw)
  To: Mansur Alisha Shaik, bryan.odonoghue, linux-media, stanimir.varbanov
  Cc: linux-kernel, linux-arm-msm, vgarodia, dikshita

On 02/07/2021 06:16, Mansur Alisha Shaik wrote:
> plane constraints firmware interface is to override the default

nitpick this should be "Plane constraints"

> alignment for a given color format. By default venus hardware has
> alignments as 128x32, but NV12 was defined differently to meet
> various usecases. Compressed NV12 has always been aligned as 128x32,
> hence not needed to override the default alignment.
> 
> Fixes: bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actual plane constraints to FW")
> Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
> 
> Changes in V3:
> - Elaborated commit message as per comments by Bryan
> - As per Bryan comment alligned fixes in single line.
> ---
>   drivers/media/platform/qcom/venus/helpers.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
> index 1fe6d46..601ee3e 100644
> --- a/drivers/media/platform/qcom/venus/helpers.c
> +++ b/drivers/media/platform/qcom/venus/helpers.c
> @@ -1137,8 +1137,12 @@ int venus_helper_set_format_constraints(struct venus_inst *inst)
>   	if (!IS_V6(inst->core))
>   		return 0;
>   
> +	if (inst->opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC)
> +		return 0;
> +
>   	pconstraint.buffer_type = HFI_BUFFER_OUTPUT2;
>   	pconstraint.num_planes = 2;
> +

zap this newline, its not adding anything to your patch

>   	pconstraint.plane_format[0].stride_multiples = 128;
>   	pconstraint.plane_format[0].max_stride = 8192;
>   	pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
> 

then please add my

"Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>"

---
bod

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [V3] venus: helper: do not set constrained parameters for UBWC
  2021-07-04 14:00 ` Bryan O'Donoghue
@ 2021-07-04 14:00   ` Bryan O'Donoghue
  0 siblings, 0 replies; 3+ messages in thread
From: Bryan O'Donoghue @ 2021-07-04 14:00 UTC (permalink / raw)
  To: Bryan O'Donoghue, Mansur Alisha Shaik, linux-media,
	stanimir.varbanov
  Cc: linux-kernel, linux-arm-msm, vgarodia, dikshita

On 04/07/2021 15:00, Bryan O'Donoghue wrote:
> On 02/07/2021 06:16, Mansur Alisha Shaik wrote:
>> plane constraints firmware interface is to override the default
> 
> nitpick this should be "Plane constraints"
> 
>> alignment for a given color format. By default venus hardware has
>> alignments as 128x32, but NV12 was defined differently to meet
>> various usecases. Compressed NV12 has always been aligned as 128x32,
>> hence not needed to override the default alignment.
>>
>> Fixes: bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actual 
>> plane constraints to FW")
>> Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
>>
>> Changes in V3:
>> - Elaborated commit message as per comments by Bryan
>> - As per Bryan comment alligned fixes in single line.
>> ---
>>   drivers/media/platform/qcom/venus/helpers.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/venus/helpers.c 
>> b/drivers/media/platform/qcom/venus/helpers.c
>> index 1fe6d46..601ee3e 100644
>> --- a/drivers/media/platform/qcom/venus/helpers.c
>> +++ b/drivers/media/platform/qcom/venus/helpers.c
>> @@ -1137,8 +1137,12 @@ int venus_helper_set_format_constraints(struct 
>> venus_inst *inst)
>>       if (!IS_V6(inst->core))
>>           return 0;
>> +    if (inst->opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC)
>> +        return 0;
>> +
>>       pconstraint.buffer_type = HFI_BUFFER_OUTPUT2;
>>       pconstraint.num_planes = 2;
>> +
> 
> zap this newline, its not adding anything to your patch
> 
>>       pconstraint.plane_format[0].stride_multiples = 128;
>>       pconstraint.plane_format[0].max_stride = 8192;
>>       pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
>>
> 
> then please add my
> 
> "Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>"
> 
> ---
> bod

Sorry sent from wrong email address

"Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-04 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  5:16 [V3] venus: helper: do not set constrained parameters for UBWC Mansur Alisha Shaik
2021-07-04 14:00 ` Bryan O'Donoghue
2021-07-04 14:00   ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).