[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p2kbhv5ybdqethvwspupezeivrdpqzk5cdwmw3cwurga4mo6wa@34yu2us322ux>
Date: Wed, 8 Oct 2025 22:10:53 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Cc: Vikash Garodia <vikash.garodia@....qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@....qualcomm.com>,
Abhinav Kumar <abhinav.kumar@...ux.dev>,
Bryan O'Donoghue <bod@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] media: iris: stop encoding PIPE value into fw_caps
On Wed, Oct 08, 2025 at 10:03:49AM +0200, Konrad Dybcio wrote:
> 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@....qualcomm.com>
> > ---
> > 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
It really means that PIPE and several other caps should be converted to
explicit code sequences. I think, only V4L2 controls should be a part of
the caps array. Everything else should eventually migrate out. But it's
not a subject of this patch.
> Reviewed-by: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
>
> Konrad
--
With best wishes
Dmitry
Powered by blists - more mailing lists