Skip to content

Commit 3166c3a

Browse files
0xB0Dgregkh
authored andcommitted
media: qcom: camss: Fix pm_domain_on sequence in probe
commit 7405116 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: 2f6f8af ("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>
1 parent 6dcb260 commit 3166c3a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • drivers/media/platform/qcom/camss

drivers/media/platform/qcom/camss/camss.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,12 @@ static int camss_probe(struct platform_device *pdev)
16241624
if (ret < 0)
16251625
goto err_cleanup;
16261626

1627+
ret = camss_configure_pd(camss);
1628+
if (ret < 0) {
1629+
dev_err(dev, "Failed to configure power domains: %d\n", ret);
1630+
goto err_cleanup;
1631+
}
1632+
16271633
ret = camss_init_subdevices(camss);
16281634
if (ret < 0)
16291635
goto err_cleanup;
@@ -1676,12 +1682,6 @@ static int camss_probe(struct platform_device *pdev)
16761682
}
16771683
}
16781684

1679-
ret = camss_configure_pd(camss);
1680-
if (ret < 0) {
1681-
dev_err(dev, "Failed to configure power domains: %d\n", ret);
1682-
return ret;
1683-
}
1684-
16851685
pm_runtime_enable(dev);
16861686

16871687
return 0;

0 commit comments

Comments
 (0)