From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Bryan O'Donoghue <bryan.odonoghue@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 01:32:31 +0100 [thread overview]
Message-ID: <0fbef967-62db-4c5f-8108-2c545c53a39e@linaro.org> (raw)
In-Reply-To: <20231103-b4-camss-named-power-domains-v4-4-33a905359dbc@linaro.org>
On 3.11.2023 13:29, Bryan O'Donoghue wrote:
> Moving the location of the hooks to VFE power domains has several
> advantages.
>
> 1. Separation of concerns and functional decomposition.
> vfe.c should be responsible for and know best how manage
> power-domains for a VFE, excising from camss.c follows this
> principle.
>
> 2. Embedding a pointer to genpd in struct camss_vfe{} meas that we can
> dispense with a bunch of kmalloc array inside of camss.c.
>
> 3. Splitting up titan top gdsc from vfe/ife gdsc provides a base for
> breaking up magic indexes in dtsi.
>
> Suggested-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Tested-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
[...]
> +/*
> + * msm_vfe_genpd_cleanup - Cleanup VFE genpd linkages
> + * @vfe: VFE device
You can even give this an upgrade to kerneldoc! :)
[...]
> + /* count the # of VFEs which have flagged power-domain */
[...]
Personal peeve, but this comment seems a bit excessive
> + 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
Konrad
next prev parent reply other threads:[~2023-11-18 0:32 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 [this message]
2023-11-18 11:35 ` Bryan O'Donoghue
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=0fbef967-62db-4c5f-8108-2c545c53a39e@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=hverkuil-cisco@xs4all.nl \
--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®