This is a note to let you know that I've just added the patch titled media: qcom: camss: Fix pm_domain_on sequence in probe to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: media-qcom-camss-fix-pm_domain_on-sequence-in-probe.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7405116519ad70b8c7340359bfac8db8279e7ce4 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> Date: Wed, 30 Aug 2023 16:16:06 +0100 Subject: media: qcom: camss: Fix pm_domain_on sequence in probe From: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx> Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/media/platform/qcom/camss/camss.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -1624,6 +1624,12 @@ static int camss_probe(struct platform_d if (ret < 0) 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; @@ -1676,12 +1682,6 @@ static int camss_probe(struct platform_d } } - 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; Patches currently in stable-queue which might be from bryan.odonoghue@xxxxxxxxxx are queue-6.1/media-qcom-camss-fix-vfe-480-vfe_disable_output.patch queue-6.1/media-qcom-camss-fix-missing-vfe_lite-clocks-check.patch queue-6.1/media-qcom-camss-fix-vfe-17x-vfe_disable_output.patch queue-6.1/media-qcom-camss-fix-set-csi2_rx_cfg1_vc_mode-when-vc-is-greater-than-3.patch queue-6.1/media-qcom-camss-fix-vfe_get-error-jump.patch queue-6.1/media-qcom-camss-fix-csid-gen2-for-test-pattern-generator.patch queue-6.1/media-qcom-camss-fix-pm_domain_on-sequence-in-probe.patch queue-6.1/media-qcom-camss-fix-invalid-clock-enable-bit-disjunction.patch