* [PATCH 0/3] media: iris: Fix issues exposed during decoder seek
@ 2026-10-30 20:19 Vishnu Reddy
2026-10-30 20:19 ` [PATCH 1/3] media: iris: Skip redundant decoder input config params Vishnu Reddy
` (2 more replies)
0 siblings, 3 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
Several issues were identified while investigating decoder seek
failures.
A seek could trigger redundant port settings change events, incorrect
buffer requirements for VP9 streams, and codec configuration being
overwritten. Together these issues resulted in spurious resolution
change notifications, firmware buffer count errors, and seek failures.
This series fixes the issues observed during decoder seek operations.
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
---
Vishnu Reddy (3):
media: iris: Skip redundant decoder input config params
media: iris: Skip redundant HFI_PROP_TIER updates
media: iris: Use firmware reported count for output buffers
drivers/media/platform/qcom/iris/iris_hfi_gen2.c | 2 --
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 5 +++++
drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 10 ++--------
3 files changed, 7 insertions(+), 10 deletions(-)
---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
change-id: 20261031-fix_dec_seek-2fa92563b495
Best regards,
--
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [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
end of thread, other threads:[~2026-10-30 20:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/3] media: iris: Use firmware reported count for output buffers Vishnu Reddy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®