* [PATCH 1/3] media: iris: Skip redundant decoder input config params
2026-10-30 20:19 [PATCH 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
@ 2026-10-30 20:19 ` Vishnu Reddy
2026-10-30 20:19 ` [PATCH 2/3] media: iris: Skip redundant HFI_PROP_TIER updates Vishnu Reddy
2026-10-30 20:19 ` [PATCH 3/3] media: iris: Use firmware reported count for output buffers Vishnu Reddy
2 siblings, 0 replies; 4+ messages in thread
From: Vishnu Reddy @ 2026-10-30 20:19 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Vedang Nagar,
Hans Verkuil, Stefan Schmidt, Hans Verkuil,
Deepa Guthyappa Madivalara
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue,
Vishnu Reddy, stable
The decoder input configuration parameters are sent to the firmware every
time the output plane is streamed on. This includes streamon after a seek.
Resending these parameters generates a port settings change (PSC) event
even when the input configuration has not changed. The client then
receives a redundant resolution change notification on every seek. A seek
hang was observed when redundant PSC events were generated for the same
configuration.
Skip sending decoder input configuration parameters once the input port
properties have been programmed. Reuse the existing ipsc_properties_set
state which tracks whether the input port subscription and properties have
been configured. This prevents redundant PSC events during seek operations
and avoids unnecessary resolution change notifications to the client.
Fixes: 025398e9121c ("media: iris: subscribe parameters and properties to firmware for hfi_gen2")
Cc: stable@vger.kernel.org
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
index 388a36ff2b07b..fac61ece177e9 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
@@ -668,6 +668,7 @@ static int iris_hfi_gen2_set_super_block(struct iris_inst *inst, u32 plane)
static int iris_hfi_gen2_session_set_config_params(struct iris_inst *inst, u32 plane)
{
const struct iris_firmware_data *fdata = inst->core->iris_firmware_data;
+ struct iris_inst_hfi_gen2 *inst_hfi_gen2 = to_iris_inst_hfi_gen2(inst);
u32 config_params_size = 0, i, j;
const u32 *config_params = NULL;
int ret;
@@ -693,6 +694,10 @@ static int iris_hfi_gen2_session_set_config_params(struct iris_inst *inst, u32 p
{HFI_PROP_AV1_SUPER_BLOCK_ENABLED, iris_hfi_gen2_set_super_block },
};
+ if (inst->domain == DECODER && V4L2_TYPE_IS_OUTPUT(plane) &&
+ inst_hfi_gen2->ipsc_properties_set)
+ return 0;
+
if (inst->domain == DECODER) {
if (V4L2_TYPE_IS_OUTPUT(plane)) {
if (inst->codec == V4L2_PIX_FMT_H264) {
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] media: iris: Skip redundant HFI_PROP_TIER updates
2026-10-30 20:19 [PATCH 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
2026-10-30 20:19 ` [PATCH 1/3] media: iris: Skip redundant decoder input config params Vishnu Reddy
@ 2026-10-30 20:19 ` Vishnu Reddy
2026-10-30 20:19 ` [PATCH 3/3] media: iris: Use firmware reported count for output buffers Vishnu Reddy
2 siblings, 0 replies; 4+ messages in thread
From: Vishnu Reddy @ 2026-10-30 20:19 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Vedang Nagar,
Hans Verkuil, Stefan Schmidt, Hans Verkuil,
Deepa Guthyappa Madivalara
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue,
Vishnu Reddy, stable
HFI_PROP_TIER is already programmed by iris_hfi_gen2_set_tier(), which
selects TIER or TIER_AV1 based on the active codec. The TIER and TIER_AV1
caps also define a .set callback. As a result, iris_set_properties()
programs HFI_PROP_TIER again through the generic cap path.
The generic property loop sets TIER first and TIER_AV1 last. For non AV1
codecs, the TIER_AV1 property is programmed after the correct tier value
and overrides it. Remove the .set callbacks from both caps. This ensures
HFI_PROP_TIER is programmed only once with the value for the active codec.
Fixes: 2af481a459a4 ("media: iris: Define AV1-specific platform capabilities and properties")
Cc: stable@vger.kernel.org
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_hfi_gen2.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
index 79bbd06ef8d2..6888aecec902 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
@@ -997,7 +997,6 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
.value = V4L2_MPEG_VIDEO_HEVC_TIER_HIGH,
.hfi_id = HFI_PROP_TIER,
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
- .set = iris_set_u32_enum,
},
{
.cap_id = TIER_AV1,
@@ -1007,7 +1006,6 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
.value = 0,
.hfi_id = HFI_PROP_TIER,
.flags = CAP_FLAG_INPUT_PORT,
- .set = iris_set_u32,
},
{
.cap_id = DRAP,
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 3/3] media: iris: Use firmware reported count for output buffers
2026-10-30 20:19 [PATCH 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
2026-10-30 20:19 ` [PATCH 1/3] media: iris: Skip redundant decoder input config params Vishnu Reddy
2026-10-30 20:19 ` [PATCH 2/3] media: iris: Skip redundant HFI_PROP_TIER updates Vishnu Reddy
@ 2026-10-30 20:19 ` Vishnu Reddy
2 siblings, 0 replies; 4+ messages in thread
From: Vishnu Reddy @ 2026-10-30 20:19 UTC (permalink / raw)
To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
Bryan O'Donoghue, Mauro Carvalho Chehab, Vedang Nagar,
Hans Verkuil, Stefan Schmidt, Hans Verkuil,
Deepa Guthyappa Madivalara
Cc: linux-media, linux-arm-msm, linux-kernel, Bryan O'Donoghue,
Vishnu Reddy, stable
Once the firmware reports its minimum output buffer count, the driver
still caps it to 4 for VP9 and AV1 when split mode is enabled. After a
seek, the output buffer count can be lower than the minimum required by
the firmware for VP9 streams. This causes the firmware to report
insufficient output buffers and the seek operation can fail.
Use the firmware reported minimum count as is. The driver calculated
count is only used until the firmware reports its own requirement.
Fixes: e1f5d32608ec ("media: iris: Add internal buffer calculation for HEVC and VP9 decoders")
Cc: stable@vger.kernel.org
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
index a8170e5fa9e6..57467c952f42 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c
@@ -2375,14 +2375,8 @@ static int output_min_count(struct iris_inst *inst)
int output_min_count = 4;
/* fw_min_count > 0 indicates reconfig event has already arrived */
- if (inst->fw_min_count) {
- if (iris_split_mode_enabled(inst) &&
- (inst->codec == V4L2_PIX_FMT_VP9 ||
- inst->codec == V4L2_PIX_FMT_AV1))
- return min_t(u32, 4, inst->fw_min_count);
- else
- return inst->fw_min_count;
- }
+ if (inst->fw_min_count)
+ return inst->fw_min_count;
if (inst->codec == V4L2_PIX_FMT_VP9)
output_min_count = 9;
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread