On 25/02/2021 08:00, Stanimir Varbanov wrote:
On 2/22/21 6:02 PM, Bryan O'Donoghue wrote:
From: Dikshita Agarwal <dikshita@xxxxxxxxxxxxxx>
Set actual plane alignments to FW with
HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO to calculate
correct buffer size.
bod: Fixed fall-through error in pkt_session_set_property_6xx() switch
Signed-off-by: Dikshita Agarwal <dikshita@xxxxxxxxxxxxxx>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
---
drivers/media/platform/qcom/venus/helpers.c | 21 ++++++++++++++++++++
drivers/media/platform/qcom/venus/helpers.h | 1 +
drivers/media/platform/qcom/venus/hfi_cmds.c | 13 ++++++++++++
drivers/media/platform/qcom/venus/vdec.c | 4 ++++
4 files changed, 39 insertions(+)
diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c
index f0413236a56f..49c52ef1084a 100644
--- a/drivers/media/platform/qcom/venus/helpers.c
+++ b/drivers/media/platform/qcom/venus/helpers.c
@@ -1113,6 +1113,27 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode)
}
EXPORT_SYMBOL_GPL(venus_helper_set_work_mode);
+int venus_helper_set_format_constraints(struct venus_inst *inst)
+{
+ const u32 ptype = HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO;
+ struct hfi_uncompressed_plane_actual_constraints_info pconstraint;
+
+ 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;
+ pconstraint.plane_format[0].buffer_alignment = 256;
+
+ pconstraint.plane_format[1].stride_multiples = 128;
+ pconstraint.plane_format[1].max_stride = 8192;
+ pconstraint.plane_format[1].min_plane_buffer_height_multiple = 16;
+ pconstraint.plane_format[1].buffer_alignment = 256;
+
+ return hfi_session_set_property(inst, ptype, &pconstraint);
I wonder shouldn't we set this property for v6 only? Or mark this
property as not supported for v1 up to v4. Otherwise, I would expect
regressions on the older v1 - v4.
BTW you're right, this breaks 1xx.