Skip to content

Commit 2dbb916

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: [email protected] Signed-off-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 967a522 commit 2dbb916

File tree

1 file changed

+6
-6
lines changed
  • drivers/media/platform/qcom/camss

1 file changed

+6
-6
lines changed

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

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

1630+
ret = camss_configure_pd(camss);
1631+
if (ret < 0) {
1632+
dev_err(dev, "Failed to configure power domains: %d\n", ret);
1633+
goto err_cleanup;
1634+
}
1635+
16301636
ret = camss_init_subdevices(camss);
16311637
if (ret < 0)
16321638
goto err_cleanup;
@@ -1679,12 +1685,6 @@ static int camss_probe(struct platform_device *pdev)
16791685
}
16801686
}
16811687

1682-
ret = camss_configure_pd(camss);
1683-
if (ret < 0) {
1684-
dev_err(dev, "Failed to configure power domains: %d\n", ret);
1685-
return ret;
1686-
}
1687-
16881688
pm_runtime_enable(dev);
16891689

16901690
return 0;

0 commit comments

Comments
 (0)