Skip to contentSkip to conversation

venus: helper: do not set constrained parameters for UBWC

PATCH Superseded Mansur Alisha Shaik 3 participants 3 messages Jul 2, 2021 – Jul 4, 2021

Subsystems (4)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 venus: helper: do not set constrained parameters for UBWC

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")

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(+)
drivers/media/platform/qcom/venus/helpers.c +4 -0
index 1fe6d46..601ee3e 100644
@@ -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;
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw
Quoted 1 line · Mansur Alisha Shaik

plane constraints firmware interface is to override the default

nitpick this should be "Plane constraints"

Quoted 20 lines

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")

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(+)
drivers/media/platform/qcom/venus/helpers.c +0 -0
index 1fe6d46..601ee3e 100644

drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct venus_inst *inst) · line 1145

Quoted 9 lines
drivers/media/platform/qcom/venus/helpers.c +4 -0
@@ -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

drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct venus_inst *inst) · line 1148

Quoted 4 lines
drivers/media/platform/qcom/venus/helpers.c +0 -0
  	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 <[email protected]>"

---
bod

#2 lore raw
Quoted 42 lines · Bryan O'Donoghue
Quoted 1 line · Mansur Alisha Shaik

plane constraints firmware interface is to override the default

nitpick this should be "Plane constraints"

Quoted 20 lines

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")

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(+)
drivers/media/platform/qcom/venus/helpers.c +0 -0
index 1fe6d46..601ee3e 100644

drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct · line 1145

Quoted 9 lines
drivers/media/platform/qcom/venus/helpers.c +4 -0
@@ -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

drivers/media/platform/qcom/venus/helpers.c int venus_helper_set_format_constraints(struct venus_inst *inst) · line 1148

Quoted 4 lines
drivers/media/platform/qcom/venus/helpers.c +0 -0
       pconstraint.plane_format[0].stride_multiples = 128;
       pconstraint.plane_format[0].max_stride = 8192;
       pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32;
Quoted 6 lines

then please add my

"Reviewed-by: Bryan O'Donoghue <[email protected]>"

---
bod

Sorry sent from wrong email address

"Reviewed-by: Bryan O'Donoghue <[email protected]>"