| From: |
| Bryan O'Donoghue <bryan.odonoghue-AT-linaro.org> |
| To: |
| hverkuil-cisco-AT-xs4all.nl, laurent.pinchart-AT-ideasonboard.com, rfoss-AT-kernel.org, todor.too-AT-gmail.com, agross-AT-kernel.org, andersson-AT-kernel.org, konrad.dybcio-AT-linaro.org, mchehab-AT-kernel.org |
| Subject: |
| [PATCH 0/4] media: qcom: camss: Introduce support for named power-domains |
| Date: |
| Tue, 24 Oct 2023 23:42:51 +0100 |
| Message-ID: |
| <20231024224255.754779-1-bryan.odonoghue@linaro.org> |
| Cc: |
| linux-media-AT-vger.kernel.org, linux-arm-msm-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Bryan O'Donoghue <bryan.odonoghue-AT-linaro.org> |
| Archive-link: |
| Article |
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/...
Bryan O'Donoghue (4):
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 | 79 +++++++++++++++++++
drivers/media/platform/qcom/camss/camss-vfe.h | 16 ++++
drivers/media/platform/qcom/camss/camss.c | 79 +++++++++++--------
drivers/media/platform/qcom/camss/camss.h | 6 +-
9 files changed, 149 insertions(+), 178 deletions(-)
--
2.42.0