* [PATCH v3 1/3] media: iris: Skip redundant decoder input config params
2026-11-25 5:40 [PATCH v3 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
@ 2026-11-25 5:40 ` Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 2/3] media: iris: Skip redundant HFI_PROP_TIER updates Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 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-11-25 5:40 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
When a decoder session starts, the driver sends the input configuration
to the firmware on streamon of the output plane. This includes the
aligned frame size and the default property settings. The firmware
parses the frames and raises an input port settings change (IPSC) event
if the stream properties differ from the programmed values. The capture
port is not started at this stage. The driver forwards the event to the
client as V4L2_EVENT_SOURCE_CHANGE. When the client then streams on the
capture port, the driver resumes the input port, starts the capture port
and decoding begins.
On a seek, the client stops and restarts the output plane. The driver
sends the same aligned input configuration and the other input
properties again on the same session, and the firmware raises another
IPSC event. No PSC last flag is sent after this, as the stream
properties are the same as the ones already running. The client keeps
waiting for the last flag and hangs.
As per the firmware, the input configuration parameters must be set only
once per session, and not on every stop and start of the input port. Skip
sending the decoder input configuration once the input port properties
have been programmed, reusing the existing ipsc_properties_set state.
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 v3 2/3] media: iris: Skip redundant HFI_PROP_TIER updates
2026-11-25 5:40 [PATCH v3 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 1/3] media: iris: Skip redundant decoder input config params Vishnu Reddy
@ 2026-11-25 5:40 ` Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 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-11-25 5:40 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 applicable only to HEVC decoding. For HEVC, the driver
programs it more than once while setting up the session, and the value
that ends up in the firmware is wrong.
First, iris_hfi_gen2_set_tier(), called from session_set_config_params(),
sends the tier selected through V4L2_CID_MPEG_VIDEO_HEVC_TIER on
HFI_PORT_BITSTREAM. After that, iris_set_properties() walks fw_caps[] in
cap id order. TIER_AV1 comes before TIER there, and both caps map to
HFI_PROP_TIER and define a .set callback. TIER_AV1.set sends its default
value of 0 on HFI_PORT_BITSTREAM and overwrites the tier sent earlier.
TIER.set then sends the tier on HFI_PORT_RAW, which does not restore the
value on HFI_PORT_BITSTREAM. The firmware is left with tier 0 on the
bitstream port instead of the selected tier.
AV1 does not use the tier property. Drop the TIER_AV1 cap and its enum,
and make iris_hfi_gen2_set_tier() read the value from the TIER cap. Also
drop HFI_PROP_TIER from the AV1 input config params.
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 | 11 -----------
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c | 3 +--
drivers/media/platform/qcom/iris/iris_platform_common.h | 1 -
3 files changed, 1 insertion(+), 14 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..3990e6562617 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2.c
@@ -999,16 +999,6 @@ static const struct platform_inst_fw_cap inst_fw_cap_sm8550_dec[] = {
.flags = CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU,
.set = iris_set_u32_enum,
},
- {
- .cap_id = TIER_AV1,
- .min = 0,
- .max = 1,
- .step_or_mask = 1,
- .value = 0,
- .hfi_id = HFI_PROP_TIER,
- .flags = CAP_FLAG_INPUT_PORT,
- .set = iris_set_u32,
- },
{
.cap_id = DRAP,
.min = 0,
@@ -1856,7 +1846,6 @@ static const u32 sm8550_vdec_input_config_param_av1[] = {
HFI_PROP_BUFFER_FW_MIN_OUTPUT_COUNT,
HFI_PROP_PROFILE,
HFI_PROP_LEVEL,
- HFI_PROP_TIER,
HFI_PROP_AV1_FILM_GRAIN_PRESENT,
HFI_PROP_AV1_SUPER_BLOCK_ENABLED,
HFI_PROP_SIGNAL_COLOR_INFO,
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 fac61ece177e..9464543836c0 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
@@ -603,8 +603,7 @@ static int iris_hfi_gen2_set_tier(struct iris_inst *inst, u32 plane)
{
u32 port = iris_hfi_gen2_get_port(inst, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE);
struct iris_inst_hfi_gen2 *inst_hfi_gen2 = to_iris_inst_hfi_gen2(inst);
- u32 tier_cap = (inst->codec == V4L2_PIX_FMT_AV1) ? TIER_AV1 : TIER;
- u32 tier = inst->fw_caps[tier_cap].value;
+ u32 tier = inst->fw_caps[TIER].value;
inst_hfi_gen2->src_subcr_params.tier = tier;
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index cddab9a9c375..973a6f91a49b 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -135,7 +135,6 @@ enum platform_inst_fw_cap_type {
LEVEL_VP9,
PROFILE_AV1,
LEVEL_AV1,
- TIER_AV1,
DRAP,
FILM_GRAIN,
SUPER_BLOCK,
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v3 3/3] media: iris: Use firmware reported count for output buffers
2026-11-25 5:40 [PATCH v3 0/3] media: iris: Fix issues exposed during decoder seek Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 1/3] media: iris: Skip redundant decoder input config params Vishnu Reddy
2026-11-25 5:40 ` [PATCH v3 2/3] media: iris: Skip redundant HFI_PROP_TIER updates Vishnu Reddy
@ 2026-11-25 5:40 ` Vishnu Reddy
2 siblings, 0 replies; 4+ messages in thread
From: Vishnu Reddy @ 2026-11-25 5:40 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. 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
without capping it.
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