mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matti Lehtimäki" <matti.lehtimaki@gmail.com>
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>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/5] media: qcom: camss: Introduce support for named power-domains
Date: Wed, 1 Nov 2023 15:48:25 +0200	[thread overview]
Message-ID: <e88ce2bc-71eb-490c-8640-80c24a9ae18a@gmail.com> (raw)
In-Reply-To: <20231101-b4-camss-named-power-domains-v3-0-bbdf5f22462a@linaro.org>

On 1.11.2023 12.54, Bryan O'Donoghue wrote:
> V3:
> - Includes bugfix reported on IRC
>   genpd_link and genpd should be checked for NULL on the cleanup path.
>   Matti Lehtimäki 
> - Retains NULL check before dev_pm_domain_attach_by_name()
>   I experimented with the suggested drop but of_property_match_string()
>   chokes
>   Link: https://lore.kernel.org/lkml/883ce8a7-80e1-4065-a957-424d0b4a6535@linaro.org/T/#m10e5a43d0245f13eca177ef2f65b24259c641030
>   Konrad
> - Fixes spelling caught by codespell - Konrad
> 
> Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/b4/b4-camss-named-power-domains-v3
> sm8250-testable: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/b4/b4-camss-named-power-domains-v3+sm8250
> 
> V2:
> - Incorporates Konrad's suggestion re: removing 'id'
> - Adds RB - Konrad
> - Adds in a flag to indicate if a VFE has a power domain.
>   As I rebased this series I realised we had some magic indexing for VFE v
>   VFE Lite, which isn't the root cause of my bug bear in this series but is
>   the same sin - inferring functionality from indexing.
>   Once we transition fully to named pds we won't need a 'has_pd' to flag
>   which VFEs need power-domain attachment and which don't.
>   That transition will require populating all upstream dtsi with pd-names
>   and then deprecating the old way.
>   has_pd is a far better choice than inferring from indexes so, I've added.
> 
> Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/commits/aa45a2b58aa1e187a2698a65164d694251f08fa1
> 
> V1:
> At the moment the Qcom CAMSS driver relies on the declaration order of
> power-domains within the dtsi to determine which power-domain relates to a
> VFE and which power-domain relates to the top-level (top) CAMSS
> power-domain.
> 
> VFE power-domains must be declared prior to the top power-domain. The top
> power-domain must be declared last. Early SoCs have just one top
> power-domain with later SoCs introducing VFE specific power-domains.
> 
> Differentiating between the number of power-domains results in lots of code
> which is brittle and which we can mostly get rid of with named
> power-domains.
> 
> The reliance on declaration ordering is in-effect magic number indexing.
> 
> This series introduces named power-domains for CAMSS and refactors some of
> the code in CAMSS to support the new named power-domains. We continue to
> support the legacy indexing model with an intention to remove after a
> reasonable transition period.
> 
> New SoC additions should use named power-domains from now on.
> 
> Tested on x13s, rb5, db410c
> 
> Link: https://git.codelinaro.org/bryan.odonoghue/kernel/-/tree/linux-next-23-10-23-camss-named-power-domains
> 
> Bryan O'Donoghue (5):
>   media: qcom: camss: Flag which VFEs require a power-domain
>   media: qcom: camss: Convert to per-VFE pointer for power-domain
>     linkages
>   media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where
>     applicable
>   media: qcom: camss: Move VFE power-domain specifics into vfe.c
>   media: qcom: camss: Add support for named power-domains
> 
>  .../media/platform/qcom/camss/camss-vfe-170.c | 36 --------
>  .../media/platform/qcom/camss/camss-vfe-4-1.c |  8 +-
>  .../media/platform/qcom/camss/camss-vfe-4-7.c | 36 --------
>  .../media/platform/qcom/camss/camss-vfe-4-8.c | 31 -------
>  .../media/platform/qcom/camss/camss-vfe-480.c | 36 --------
>  drivers/media/platform/qcom/camss/camss-vfe.c | 77 ++++++++++++++++
>  drivers/media/platform/qcom/camss/camss-vfe.h | 16 ++++
>  drivers/media/platform/qcom/camss/camss.c     | 87 ++++++++++++-------
>  drivers/media/platform/qcom/camss/camss.h     |  7 +-
>  9 files changed, 156 insertions(+), 178 deletions(-)
> 
> --
> 2.42.0
> 
> ---
> Bryan O'Donoghue (5):
>       media: qcom: camss: Flag which VFEs require a power-domain
>       media: qcom: camss: Convert to per-VFE pointer for power-domain linkages
>       media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable
>       media: qcom: camss: Move VFE power-domain specifics into vfe.c
>       media: qcom: camss: Add support for named power-domains
> 
>  drivers/media/platform/qcom/camss/camss-vfe-170.c | 36 ----------
>  drivers/media/platform/qcom/camss/camss-vfe-4-1.c |  8 +--
>  drivers/media/platform/qcom/camss/camss-vfe-4-7.c | 36 ----------
>  drivers/media/platform/qcom/camss/camss-vfe-4-8.c | 31 --------
>  drivers/media/platform/qcom/camss/camss-vfe-480.c | 36 ----------
>  drivers/media/platform/qcom/camss/camss-vfe.c     | 79 ++++++++++++++++++++
>  drivers/media/platform/qcom/camss/camss-vfe.h     | 16 +++++
>  drivers/media/platform/qcom/camss/camss.c         | 87 ++++++++++++++---------
>  drivers/media/platform/qcom/camss/camss.h         |  7 +-
>  9 files changed, 158 insertions(+), 178 deletions(-)
> ---
> base-commit: 48016737a9af47328dd321df4dd3479ed5e2041d
> change-id: 20231031-b4-camss-named-power-domains-cc2ac2722543
> 
> Best regards,

Tested the series using work in progress SC7280 CAMSS.
Power domain handling works correctly.

For the series:

Tested-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>


      parent reply	other threads:[~2023-11-01 13:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 10:54 Bryan O'Donoghue
2023-11-01 10:54 ` [PATCH v3 1/5] media: qcom: camss: Flag which VFEs require a power-domain Bryan O'Donoghue
2023-11-01 10:54 ` [PATCH v3 2/5] media: qcom: camss: Convert to per-VFE pointer for power-domain linkages Bryan O'Donoghue
2023-11-01 10:54 ` [PATCH v3 3/5] media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable Bryan O'Donoghue
2023-11-01 10:54 ` [PATCH v3 4/5] media: qcom: camss: Move VFE power-domain specifics into vfe.c Bryan O'Donoghue
2023-11-02 15:10   ` Bryan O'Donoghue
2023-11-01 10:54 ` [PATCH v3 5/5] media: qcom: camss: Add support for named power-domains Bryan O'Donoghue
2023-11-01 13:48 ` Matti Lehtimäki [this message]

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=e88ce2bc-71eb-490c-8640-80c24a9ae18a@gmail.com \
    --to=matti.lehtimaki@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.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=mchehab@kernel.org \
    --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®