Patch "drm/panfrost: Fix module unload" has been added to the 5.9-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/panfrost: Fix module unload

to the 5.9-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-panfrost-fix-module-unload.patch
and it can be found in the queue-5.9 subdirectory.

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



commit 04412c80432c7d657050cc38e488089690229778
Author: Steven Price <steven.price@xxxxxxx>
Date:   Fri Oct 30 14:58:33 2020 +0000

    drm/panfrost: Fix module unload
    
    [ Upstream commit 876b15d2c88d8c005f1aebeaa23f1e448d834757 ]
    
    When unloading the call to pm_runtime_put_sync_suspend() will attempt to
    turn the GPU cores off, however panfrost_device_fini() will have turned
    the clocks off. This leads to the hardware locking up.
    
    Instead don't call pm_runtime_put_sync_suspend() and instead simply mark
    the device as suspended using pm_runtime_set_suspended(). And also
    include this on the error path in panfrost_probe().
    
    Fixes: aebe8c22a912 ("drm/panfrost: Fix possible suspend in panfrost_remove")
    Signed-off-by: Steven Price <steven.price@xxxxxxx>
    Reviewed-by: Tomeu Vizoso <tomeu.vizoso@xxxxxxxxxxxxx>
    Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20201030145833.29006-1-steven.price@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index f2dd259f28995..5d95917f923a1 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -626,6 +626,7 @@ static int panfrost_probe(struct platform_device *pdev)
 err_out1:
 	pm_runtime_disable(pfdev->dev);
 	panfrost_device_fini(pfdev);
+	pm_runtime_set_suspended(pfdev->dev);
 err_out0:
 	drm_dev_put(ddev);
 	return err;
@@ -640,9 +641,9 @@ static int panfrost_remove(struct platform_device *pdev)
 	panfrost_gem_shrinker_cleanup(ddev);
 
 	pm_runtime_get_sync(pfdev->dev);
-	panfrost_device_fini(pfdev);
-	pm_runtime_put_sync_suspend(pfdev->dev);
 	pm_runtime_disable(pfdev->dev);
+	panfrost_device_fini(pfdev);
+	pm_runtime_set_suspended(pfdev->dev);
 
 	drm_dev_put(ddev);
 	return 0;



[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