[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57c9b7e8-bb0e-4d31-adeb-19a83137c082@linaro.org>
Date: Sat, 18 Nov 2023 11:35:30 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Konrad Dybcio <konrad.dybcio@...aro.org>, hverkuil-cisco@...all.nl,
laurent.pinchart@...asonboard.com, Robert Foss <rfoss@...nel.org>,
Todor Tomov <todor.too@...il.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
matti.lehtimaki@...il.com, quic_grosikop@...cinc.com
Cc: linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/7] media: qcom: camss: Move VFE power-domain
specifics into vfe.c
On 18/11/2023 00:32, Konrad Dybcio wrote:
>> + /* count the # of VFEs which have flagged power-domain */
> [...]
>
> Personal peeve, but this comment seems a bit excessive
Well, to me this code "does stuff" that isn't terribly obvious. It took
a while to understand the Gordian knot so its worthwhile documenting it
inline until we can use named pds to make it all go away forever.
>
>> + for (vfepd_num = i = 0; i < camss->vfe_total_num; i++) {
>> + if (res->vfe_res[i].has_pd)
>> + vfepd_num++;
>> + }
>>
>> - camss->genpd_link = devm_kmalloc_array(dev, camss->genpd_num,
>> - sizeof(*camss->genpd_link),
>> - GFP_KERNEL);
>> - if (!camss->genpd_link)
>> - return -ENOMEM;
>> + /*
>> + * If the number of power-domains is greater than the number of VFEs
>> + * then the additional power-domain is for the entire CAMSS block the
>> + * 'top' power-domain.
> the last 3 words seem out of place
>
>> + */
>> + if (camss->genpd_num <= vfepd_num)
>> + return 0;
> if (!(camss->genpd_num > vfepd_num))
>
> would probably be easier to follow given your comment above
Sure, if its easier to read/understand for you, then it is probably so
for others.
I will V5 this.
---
bod
Powered by blists - more mailing lists