diff options
| author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2023-08-30 16:16:06 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-28 16:56:35 +0000 |
| commit | 841fc648fbb5590315f9279ec1caddaae73a68b7 (patch) | |
| tree | 304fa86955bb9ed704a207c0f8142c4efcbb0864 | |
| parent | 4c9c43f79a12d8c4c99ca4ec31311c180cf9b94f (diff) | |
| download | linux-841fc648fbb5590315f9279ec1caddaae73a68b7.tar.gz linux-841fc648fbb5590315f9279ec1caddaae73a68b7.tar.bz2 linux-841fc648fbb5590315f9279ec1caddaae73a68b7.zip | |
media: qcom: camss: Fix pm_domain_on sequence in probe
commit 7405116519ad70b8c7340359bfac8db8279e7ce4 upstream.
We need to make sure camss_configure_pd() happens before
camss_register_entities() as the vfe_get() path relies on the pointer
provided by camss_configure_pd().
Fix the ordering sequence in probe to ensure the pointers vfe_get() demands
are present by the time camss_register_entities() runs.
In order to facilitate backporting to stable kernels I've moved the
configure_pd() call pretty early on the probe() function so that
irrespective of the existence of the old error handling jump labels this
patch should still apply to -next circa Aug 2023 to v5.13 inclusive.
Fixes: 2f6f8af67203 ("media: camss: Refactor VFE power domain toggling")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/media/platform/qcom/camss/camss.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index ef100d5f7763..e53f575b32f5 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -1369,6 +1369,12 @@ static int camss_probe(struct platform_device *pdev) goto err_cleanup; } + ret = camss_configure_pd(camss); + if (ret < 0) { + dev_err(dev, "Failed to configure power domains: %d\n", ret); + goto err_cleanup; + } + ret = camss_init_subdevices(camss); if (ret < 0) goto err_cleanup; @@ -1421,12 +1427,6 @@ static int camss_probe(struct platform_device *pdev) } } - ret = camss_configure_pd(camss); - if (ret < 0) { - dev_err(dev, "Failed to configure power domains: %d\n", ret); - return ret; - } - pm_runtime_enable(dev); return 0; |
