Patch "drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time" has been added to the 6.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/mediatek: Call drm_atomic_helper_shutdown() at shutdown time

to the 6.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-mediatek-call-drm_atomic_helper_shutdown-at-shut.patch
and it can be found in the queue-6.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 1666ba655854c02f5510a9e0325651c51ddcf89d
Author: Douglas Anderson <dianders@xxxxxxxxxxxx>
Date:   Tue Jun 11 10:27:44 2024 -0700

    drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time
    
    [ Upstream commit c38896ca6318c2df20bbe6c8e3f633e071fda910 ]
    
    Based on grepping through the source code this driver appears to be
    missing a call to drm_atomic_helper_shutdown() at system shutdown
    time. Among other things, this means that if a panel is in use that it
    won't be cleanly powered off at system shutdown time.
    
    The fact that we should call drm_atomic_helper_shutdown() in the case
    of OS shutdown/restart comes straight out of the kernel doc "driver
    instance overview" in drm_drv.c.
    
    This driver users the component model and shutdown happens in the base
    driver. The "drvdata" for this driver will always be valid if
    shutdown() is called and as of commit 2a073968289d
    ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a
    noop") we don't need to confirm that "drm" is non-NULL.
    
    Suggested-by: Maxime Ripard <mripard@xxxxxxxxxx>
    Reviewed-by: Maxime Ripard <mripard@xxxxxxxxxx>
    Reviewed-by: Fei Shao <fshao@xxxxxxxxxxxx>
    Tested-by: Fei Shao <fshao@xxxxxxxxxxxx>
    Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
    Signed-off-by: Maxime Ripard <mripard@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240611102744.v2.1.I2b014f90afc4729b6ecc7b5ddd1f6dedcea4625b@changeid
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 74832c2130921..0b570e194079a 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -950,6 +950,13 @@ static void mtk_drm_remove(struct platform_device *pdev)
 		of_node_put(private->comp_node[i]);
 }
 
+static void mtk_drm_shutdown(struct platform_device *pdev)
+{
+	struct mtk_drm_private *private = platform_get_drvdata(pdev);
+
+	drm_atomic_helper_shutdown(private->drm);
+}
+
 static int mtk_drm_sys_prepare(struct device *dev)
 {
 	struct mtk_drm_private *private = dev_get_drvdata(dev);
@@ -981,6 +988,7 @@ static const struct dev_pm_ops mtk_drm_pm_ops = {
 static struct platform_driver mtk_drm_platform_driver = {
 	.probe	= mtk_drm_probe,
 	.remove_new = mtk_drm_remove,
+	.shutdown = mtk_drm_shutdown,
 	.driver	= {
 		.name	= "mediatek-drm",
 		.pm     = &mtk_drm_pm_ops,




[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