1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/omapdrm
Douglas Anderson ce3d99c834 drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers
Based on grepping through the source code these drivers appear 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.

All of the drivers in this patch were fairly straightforward to fix
since they already had a call to drm_atomic_helper_shutdown() at
remove/unbind time but were just lacking one at system shutdown. The
only hitch is that some of these drivers use the component model to
register/unregister their DRM devices. The shutdown callback is part
of the original device. The typical solution here, based on how other
DRM drivers do this, is to keep track of whether the device is bound
based on drvdata. In most cases the drvdata is the drm_device, so we
can just make sure it is NULL when the device is not bound. In some
drivers, this required minor code changes. To make things simpler,
drm_atomic_helper_shutdown() has been modified to consider a NULL
drm_device as a noop in the patch ("drm/atomic-helper:
drm_atomic_helper_shutdown(NULL) should be a noop").

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Tested-by: Sui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901163944.RFT.2.I9115e5d094a43e687978b0699cc1fe9f2a3452ea@changeid
2023-09-21 10:41:04 -07:00
..
dss drm/omap: Convert to platform remove callback returning void 2023-06-08 10:35:17 -07:00
Kconfig fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
Makefile drm/omap: introduce omap_hw_overlay 2021-12-08 10:04:40 +02:00
omap_crtc.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
omap_crtc.h drm/omap: remove dss_mgr_ops 2020-12-15 16:17:30 +02:00
omap_debugfs.c drm/omapdrm: Remove fbdev from struct omap_drm_private 2023-04-06 15:50:05 +03:00
omap_dmm_priv.h drm/omapdrm: Convert to SPDX identifier 2021-11-10 13:51:25 +02:00
omap_dmm_tiler.c drm/omap: Convert to platform remove callback returning void 2023-06-08 10:35:17 -07:00
omap_dmm_tiler.h drm/omapdrm: Convert to SPDX identifier 2021-11-10 13:51:25 +02:00
omap_drv.c drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
omap_drv.h drm/omapdrm: Remove fbdev from struct omap_drm_private 2023-04-06 15:50:05 +03:00
omap_encoder.c drm/omap: drop unused DSS next pointer 2020-12-15 16:08:26 +02:00
omap_encoder.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
omap_fb.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
omap_fb.h drm/omap: Add a 'right overlay' to plane state 2021-12-08 10:04:54 +02:00
omap_fbdev.c fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
omap_fbdev.h drm/omapdrm: Implement fbdev emulation as in-kernel client 2023-04-06 15:50:10 +03:00
omap_gem.c drm/omapdrm: Set VM flags in GEM-object mmap function 2023-07-24 20:14:43 +02:00
omap_gem.h drm/omapdrm: Set VM flags in GEM-object mmap function 2023-07-24 20:14:43 +02:00
omap_gem_dmabuf.c drm/omapdrm: Set VM flags in GEM-object mmap function 2023-07-24 20:14:43 +02:00
omap_irq.c drm/omap: Fix kernel docs 2023-01-17 17:57:33 +02:00
omap_irq.h drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
omap_overlay.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
omap_overlay.h drm/omap: Add a 'right overlay' to plane state 2021-12-08 10:04:54 +02:00
omap_plane.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
omap_plane.h drm/omap: Add a 'right overlay' to plane state 2021-12-08 10:04:54 +02:00
tcm-sita.c drm/omapdrm: Convert to SPDX identifier 2021-11-10 13:51:25 +02:00
tcm.h drm: omapdrm: Use kernel integer types 2018-03-01 09:09:10 +02:00
TODO