Re: [PATCH 4/8] media: iris: stop encoding PIPE value into fw_caps

From: Konrad Dybcio
Date: Wed Oct 08 2025 - 04:04:05 EST


On 10/8/25 6:33 AM, Dmitry Baryshkov wrote:
> The value of the PIPE property depends on the number of pipes available
> on the platform and is frequently the only difference between several
> fw_caps. In order to reduce duplciation, use num_vpp_pipe from the
> iris_platform_data rather than hardcoding the value into the fw_cap.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_ctrls.c | 6 +++++-
> drivers/media/platform/qcom/iris/iris_platform_gen2.c | 4 ++--
> drivers/media/platform/qcom/iris/iris_platform_qcs8300.h | 4 ++--
> drivers/media/platform/qcom/iris/iris_platform_sm8250.c | 4 ++--
> 4 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c
> index 0e9adb3982a49cfd7cbe5110cfd5f573f0f7bb38..8db3fa222bdb92a7ffff3dfe62d33f16c0550757 100644
> --- a/drivers/media/platform/qcom/iris/iris_ctrls.c
> +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c
> @@ -318,7 +318,11 @@ void iris_session_init_caps(struct iris_core *core)
> continue;
>
> core->inst_fw_caps_dec[cap_id].idx = i;
> - core->inst_fw_caps_dec[cap_id].value = caps[i].value;
> + if (cap_id == PIPE)
> + core->inst_fw_caps_dec[cap_id].value =
> + core->iris_platform_data->num_vpp_pipe;
> + else
> + core->inst_fw_caps_dec[cap_id].value = caps[i].value;

I really hope this if-else won't grow in the future

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad