Patch "drm/msm/adreno: Defer enabling runpm until hw_init()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/msm/adreno: Defer enabling runpm until hw_init()

to the 5.10-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:
     drm-msm-adreno-defer-enabling-runpm-until-hw_init.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f724e604956e4f899605a5341a957eadbfe2e56e
Author: Rob Clark <robdclark@xxxxxxxxxxxx>
Date:   Mon Jun 13 11:20:30 2022 -0700

    drm/msm/adreno: Defer enabling runpm until hw_init()
    
    [ Upstream commit 4b18299b33655fa9672b774b6df774dc03d6aee8 ]
    
    To avoid preventing the display from coming up before the rootfs is
    mounted, without resorting to packing fw in the initrd, the GPU has
    this limbo state where the device is probed, but we aren't ready to
    start sending commands to it.  This is particularly problematic for
    a6xx, since the GMU (which requires fw to be loaded) is the one that
    is controlling the power/clk/icc votes.
    
    So defer enabling runpm until we are ready to call gpu->hw_init(),
    as that is a point where we know we have all the needed fw and are
    ready to start sending commands to the coproc's.
    
    Signed-off-by: Rob Clark <robdclark@xxxxxxxxxxxx>
    Patchwork: https://patchwork.freedesktop.org/patch/489337/
    Link: https://lore.kernel.org/r/20220613182036.2567963-1-robdclark@xxxxxxxxx
    Stable-dep-of: db7662d076c9 ("drm/msm/adreno: drop bogus pm_runtime_set_active()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 58e03b20e1c7a..c06202b9243c4 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -301,6 +301,12 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
 	if (ret)
 		return NULL;
 
+	/*
+	 * Now that we have firmware loaded, and are ready to begin
+	 * booting the gpu, go ahead and enable runpm:
+	 */
+	pm_runtime_enable(&pdev->dev);
+
 	/* Make sure pm runtime is active and reset any previous errors */
 	pm_runtime_set_active(&pdev->dev);
 
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 78181e2d78a97..11a6a41b4910f 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -916,7 +916,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
 	pm_runtime_set_autosuspend_delay(dev,
 		adreno_gpu->info->inactive_period);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_enable(dev);
 
 	ret = msm_gpu_init(drm, pdev, &adreno_gpu->base, &funcs->base,
 			adreno_gpu->info->name, &adreno_gpu_config);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux