venus: helper: do not set constrained format for UBWC
Subsystems (4)
PATCH 1/1 venus: helper: do not set constrained format for UBWC
Do not set constrained format explicitly for UBWC
--- drivers/media/platform/qcom/venus/helpers.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/media/platform/qcom/venus/helpers.c +4 -0
@@ -1138,8 +1138,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 ;
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Quoted 3 lines · Mansur Alisha Shaik
Do not set constrained format explicitly for UBWC
Signed-off-by Mansur Alisha Shaik <[email protected]>
Could you give a little bit more detail on why, what the side effects are ?
Should this be a Fixes: ?
Quoted 9 lines
--- drivers/media/platform/qcom/venus/helpers.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/media/platform/qcom/venus/helpers.c +0
-0
drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct venus_inst *inst) · line 1146
Quoted 9 lines
drivers/media/platform/qcom/venus/helpers.c +4
-0@@ -1138,8 +1138,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 ; +
Additional newline should be removed.
drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct venus_inst *inst) · line 1149
Quoted 4 lines
drivers/media/platform/qcom/venus/helpers.c +0
-0pconstraint.plane_format[0 ].stride_multiples =128 ; pconstraint.plane_format[0 ].max_stride =8192 ; pconstraint.plane_format[0 ].min_plane_buffer_height_multiple =32 ;
---
bod
Mansur, could you answer to Bryan's comments?
Quoted 38 lines · Bryan O'Donoghue
Quoted 3 lines · Mansur Alisha Shaik
Do not set constrained format explicitly for UBWC
Signed-off-by Mansur Alisha Shaik <[email protected]>Could you give a little bit more detail on why, what the side effects are ?
Should this be a Fixes: ?
Quoted 10 lines
---
drivers/media/platform/qcom/venus/helpers.c| 4 ++++1 file changed, 4 insertions(+)drivers/media/platform/qcom/venus/helpers.c +0
-0drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct · line 1146
Quoted 9 lines
drivers/media/platform/qcom/venus/helpers.c +3
-0@@ -1138,8 +1138,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; +Additional newline should be removed.
Quoted 4 lines
drivers/media/platform/qcom/venus/helpers.c +0
-0pconstraint.plane_format[0].stride_multiples = 128; pconstraint.plane_format[0].max_stride = 8192;pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
---
bod
Signature · 2 lines
regards, Stan
Quoted 10 lines · Stanimir Varbanov
Mansur, could you answer to Bryan's comments?
Quoted 8 lines · Bryan O'Donoghue
Quoted 7 lines · Mansur Alisha Shaik
Quoted 3 lines
Do not set constrained format explicitly for UBWC
Signed-off-by Mansur Alisha Shaik <[email protected]>Could you give a little bit more detail on why, what the side effects are ?
Sorry for late response, by default for NV12_UBWC is 128x32
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Should this be a Fixes: ?
without this fix on V6, firmware throws below SFR
qcom-venus aa00000.video-codec: SFR message from FW:
QC_IMAGE_VERSION_STRING=video-firmware.1.0-df9cb37cf8e507a4468265658702247652351a49
Err_Fatal -
/local/mnt/workspace/pkg/builds/dynamic_timely/tree2/vendor/qcom/proprietary/video-firmware-noship/venus_proc/venus/decoders/common/src/video_decoder.c:6644:2fef3
which result in playback happens through Software codec.
Quoted 30 lines
Quoted 30 lines
Quoted 30 lines
Quoted 12 lines
---
drivers/media/platform/qcom/venus/helpers.c| 4 ++++1 file changed, 4 insertions(+)drivers/media/platform/qcom/venus/helpers.c +0
-0@@ -1138,8 +1138,12 @@ intvenus_helper_set_format_constraints(struct
venus_inst*inst)Quoted 8 lines
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;
+Additional newline should be removed.
Quoted 4 lines
pconstraint.plane_format[0].stride_multiples = 128; pconstraint.plane_format[0].max_stride = 8192; pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
---
bod
Quoted 4 lines · On 14/06/2021 07:25, [email protected] wrote:
Quoted 3 lines · Stanimir Varbanov
Mansur, could you answer to Bryan's comments?
Quoted 1 line · Bryan O'Donoghue
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Mansur Alisha Shaik
Quoted 3 lines
Do not set constrained format explicitly for UBWC
Signed-off-by Mansur Alisha Shaik <[email protected]>Could you give a little bit more detail on why, what the side effects are ?
Sorry for late response, by default for
NV12_UBWCis 128x32
Right so we have
pconstraint.plane_format[0].stride_multiples = 128; pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
and
pconstraint.plane_format[1].stride_multiples = 128; pconstraint.plane_format[1].min_plane_buffer_height_multiple = 16;
and your patch says if opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC then the we shouldn't do hfi_session_set_property()
I'm sure that's a fix that works but, I wonder would it be possible to fix this routine to continue to do hfi_session_set_property() with updated parameters for opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC ?
Could you drill down into the detail in the commit log a little bit maybe giving a description of why returning for opb_fmt == HFI_COLOR_FORMAT_NV12_UBWC is the right thing to-do instead of adding a new case to the routine for HFI_COLOR_FORMAT_NV12_UBWC and calling hfi_session_set_property() ?
Its more for my own education on this topic :) but, also helps somebody else reading the log to understand what the fix is, why it is done this way.
Quoted 10 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Should this be a Fixes: ?
without this fix on V6, firmware throws below SFR
qcom-venus aa00000.video-codec: SFR message from FW:
QC_IMAGE_VERSION_STRING=video-firmware.1.0-df9cb37cf8e507a4468265658702247652351a49Err_Fatal -
/local/mnt/workspace/pkg/builds/dynamic_timely/tree2/vendor/qcom/proprietary/video-firmware-noship/venus_proc/venus/decoders/common/src/video_decoder.c:6644:2fef3which result in playback happens through Software codec.
OK, I think I can answer my own question here.
Technically no since 6XX isn't in the long-term-support kernel but, I'd suggest adding a "Fixes" anyway, so that other users know to apply this patch to their trees.
---
bod
Hi Bryan,
Quoted 25 lines · Bryan O'Donoghue
Quoted 4 lines · On 14/06/2021 07:25, [email protected] wrote:
Quoted 3 lines · Stanimir Varbanov
Mansur, could you answer to Bryan's comments?
Quoted 1 line · Bryan O'Donoghue
Quoted 9 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Mansur Alisha Shaik
Quoted 3 lines
Do not set constrained format explicitly for UBWC
Signed-off-by Mansur Alisha Shaik <[email protected]>Could you give a little bit more detail on why, what the side effects are ?
Sorry for late response, by default for
NV12_UBWCis 128x32Right so we have
pconstraint.plane_format[0].stride_multiples = 128; pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
and
pconstraint.plane_format[1].stride_multiples = 128; pconstraint.plane_format[1].min_plane_buffer_height_multiple = 16;
Quoted 6 lines
and your patch says if
opb_fmt==HFI_COLOR_FORMAT_NV12_UBWCthen the we shouldn't dohfi_session_set_property()I'm sure that's a fix that works but, I wonder would it be possible to fix this routine to continue to do
hfi_session_set_property()with updated parameters foropb_fmt==HFI_COLOR_FORMAT_NV12_UBWC?
Venus hardware would always go with alignments as 128x32 for WxH irrespective of color formats. It happened so (historically) that for NV12 (linear) format, usecase started demanding for alignments as 256(interlace) and 512(HEIF), and hence NV12 was defaulted to align as 512x512 in firmware. This was done to avoid carrying multiple alignments for different usecases, since aligning with 512x512 would also align it with 128x32 and 256x256 as well.
For UBWC, there is no need to override the default alignment of 128x32, hence the api was added to override default alignments for applicable formats, in this case NV12(Linear).
Quoted 5 lines
Could you drill down into the detail in the commit log a little bit maybe giving a description of why returning for
opb_fmt==HFI_COLOR_FORMAT_NV12_UBWCis the right thing to-do instead of adding a new case to the routine forHFI_COLOR_FORMAT_NV12_UBWCand callinghfi_session_set_property()?
Above details should provide info on the need to set this only for NV12 (linear) and skip for NV12 (UBWC).
Quoted 12 lines
Its more for my own education on this topic :) but, also helps somebody else reading the log to understand what the fix is, why it is done this way.
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Should this be a Fixes: ?
without this fix on V6, firmware throws below SFR
qcom-venus aa00000.video-codec: SFR message from FW:
QC_IMAGE_VERSION_STRING=video-firmware.1.0-df9cb37cf8e507a4468265658702247652351a49
Err_Fatal -
/local/mnt/workspace/pkg/builds/dynamic_timely/tree2/vendor/qcom/proprietary/video-firmware-noship/venus_proc/venus/decoders/common/src/video_decoder.c:6644:2fef3
which result in playback happens through Software codec.
Quoted 8 lines
OK, I think I can answer my own question here.
Technically no since 6XX isn't in the long-term-support kernel but, I'd suggest adding a "Fixes" anyway, so that other users know to apply this patch to their trees.
Fixes bc28936bbba9 ("media: venus: helpers, hfi, vdec: Set actualplane constraints to FW")
Yes, it should go as "Fixes" tag to above patch which we made for 6xx recently.
Thanks,
Vikash