Skip to content

Commit 0320ca1

Browse files
diandersmripard
authored andcommitted
drm: renesas: shmobile: Call drm_atomic_helper_shutdown() at shutdown time
Based on grepping through the source code, this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time. This is important because drm_atomic_helper_shutdown() will cause panels to get disabled cleanly which may be important for their power sequencing. Future changes will remove any custom powering off in individual panel drivers so the DRM drivers need to start getting this right. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown comes straight out of the kernel doc "driver instance overview" in drm_drv.c. [geert: shmob_drm_remove() already calls drm_atomic_helper_shutdown] Suggested-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20230901164111.RFT.15.Iaf638a1d4c8b3c307a6192efabb4cbb06b195f15@changeid [geert: s/drm_helper_force_disable_all/drm_atomic_helper_shutdown/] Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Signed-off-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/17c6a5a668e5975f871b77fb1fca6711a0799d9e.1718176895.git.geert+renesas@glider.be
1 parent 017ed5e commit 0320ca1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,13 @@ static void shmob_drm_remove(struct platform_device *pdev)
171171
drm_kms_helper_poll_fini(ddev);
172172
}
173173

174+
static void shmob_drm_shutdown(struct platform_device *pdev)
175+
{
176+
struct shmob_drm_device *sdev = platform_get_drvdata(pdev);
177+
178+
drm_atomic_helper_shutdown(&sdev->ddev);
179+
}
180+
174181
static int shmob_drm_probe(struct platform_device *pdev)
175182
{
176183
struct shmob_drm_platform_data *pdata = pdev->dev.platform_data;
@@ -273,6 +280,7 @@ static const struct of_device_id shmob_drm_of_table[] __maybe_unused = {
273280
static struct platform_driver shmob_drm_platform_driver = {
274281
.probe = shmob_drm_probe,
275282
.remove_new = shmob_drm_remove,
283+
.shutdown = shmob_drm_shutdown,
276284
.driver = {
277285
.name = "shmob-drm",
278286
.of_match_table = of_match_ptr(shmob_drm_of_table),

0 commit comments

Comments
 (0)