Re: [PATCH 1/5] media: iris: support decode-order output on HFI gen2
From: Xilin Wu
Date: Fri Nov 27 2026 - 03:42:57 EST
On 11/27/2026 2:24 PM, Vishnu Reddy wrote:
On 10/29/2026 9:28 AM, Xilin Wu wrote:
Synchronous per-picture clients such as VA-API can stall when firmware
holds decoded pictures for display reordering while the client waits for
the current picture before submitting more input.
Expose the decoder display-delay controls on HFI gen2, with a zero delay
selecting decode-order output. Keep display-order output as the default.
Signed-off-by: Xilin Wu <sophon@xxxxxxxxx>
---
drivers/media/platform/qcom/iris/iris_ctrls.c | 8 ++++++++
drivers/media/platform/qcom/iris/iris_hfi_gen2.c | 20 ++++++++++++++++++++
.../media/platform/qcom/iris/iris_hfi_gen2_command.c | 18 ++++++++++++++++++
.../media/platform/qcom/iris/iris_hfi_gen2_defines.h | 1 +
.../media/platform/qcom/iris/iris_platform_common.h | 2 ++
5 files changed, 49 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
index 4f2633bbb49f..1dbea37c93c3 100644
--- a/drivers/media/platform/qcom/iris/iris_ctrls.c
+++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
@@ -155,6 +155,10 @@ static enum platform_inst_fw_cap_type iris_get_cap_id(u32 id)
return LAYER4_BITRATE_HEVC;
case V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR:
return LAYER5_BITRATE_HEVC;
+ case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE:
+ return DISPLAY_DELAY_ENABLE;
+ case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY:
+ return DISPLAY_DELAY;
case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:
return REQUEST_SYNC_FRAME;
case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE:
@@ -306,6 +310,10 @@ static u32 iris_get_v4l2_id(enum platform_inst_fw_cap_type cap_id)
return V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR;
case LAYER5_BITRATE_HEVC:
return V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR;
+ case DISPLAY_DELAY_ENABLE:
+ return V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE;
+ case DISPLAY_DELAY:
+ return V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY;
case REQUEST_SYNC_FRAME:
return V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME;
case SLICE_MODE:
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
index 79bbd06ef8d2..65af61b63a29 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
@@ -842,6 +842,22 @@ static const struct platform_inst_fw_cap inst_fw_cap_milos_enc[] = {
};
static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
+ {
+ .cap_id = DISPLAY_DELAY_ENABLE,
+ .min = 0,
+ .max = 1,
+ .step_or_mask = 1,
+ .value = 0,
+ .hfi_id = HFI_PROP_DECODE_ORDER_OUTPUT,
+ .flags = CAP_FLAG_INPUT_PORT,
+ },
+ {
+ .cap_id = DISPLAY_DELAY,
+ .min = 0,
+ .max = 0,
+ .step_or_mask = 1,
+ .value = 0,
+ },
Nit: Since DISPLAY_DELAY_ENABLE and DISPLAY_DELAY were added at the end of
enum platform_inst_fw_cap_type, it may be cleaner to place this capability
entries at the end of this table as well for consistency. Same consistency
comment applies to the iris_get_cap_id() and iris_get_v4l2_id() additions
above as well.
Sure, I'll move the new entries to the end of the table and of both switch statements in v2.
--
Best regards,
Xilin Wu <sophon@xxxxxxxxx>