mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com,
	Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	matti.lehtimaki@gmail.com, quic_grosikop@quicinc.com
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/7] media: qcom: camss: Move VFE power-domain specifics into vfe.c
Date: Sat, 18 Nov 2023 11:35:30 +0000	[thread overview]
Message-ID: <57c9b7e8-bb0e-4d31-adeb-19a83137c082@linaro.org> (raw)
In-Reply-To: <0fbef967-62db-4c5f-8108-2c545c53a39e@linaro.org>

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

  reply	other threads:[~2023-11-18 11:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 12:28 [PATCH v4 0/7] media: qcom: camss: Introduce support for named power-domains Bryan O'Donoghue
2023-11-03 12:28 ` [PATCH v4 1/7] media: qcom: camss: Flag which VFEs require a power-domain Bryan O'Donoghue
2023-11-03 12:28 ` [PATCH v4 2/7] media: qcom: camss: Convert to per-VFE pointer for power-domain linkages Bryan O'Donoghue
2023-11-03 12:29 ` [PATCH v4 3/7] media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable Bryan O'Donoghue
2023-11-03 12:29 ` [PATCH v4 4/7] media: qcom: camss: Move VFE power-domain specifics into vfe.c Bryan O'Donoghue
2023-11-18  0:32   ` Konrad Dybcio
2023-11-18 11:35     ` Bryan O'Donoghue [this message]
2023-11-03 12:29 ` [PATCH v4 5/7] media: qcom: camss: Add support for named power-domains Bryan O'Donoghue
2023-11-18  0:38   ` Konrad Dybcio
2023-11-18  1:56     ` Bryan O'Donoghue
2023-11-03 12:29 ` [PATCH v4 6/7] media: qcom: camss: Flag VFE-lites to support more VFEs Bryan O'Donoghue
2023-11-18  0:41   ` Konrad Dybcio
2023-11-03 12:29 ` [PATCH v4 7/7] media: qcom: camss: Flag CSID-lites to support more CSIDs Bryan O'Donoghue
2023-11-18  0:44   ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57c9b7e8-bb0e-4d31-adeb-19a83137c082@linaro.org \
    --to=bryan.odonoghue@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=konrad.dybcio@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=matti.lehtimaki@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=quic_grosikop@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=todor.too@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®