[PATCH v2 09/13] drm/panic: Restrict to primary planes; unconditionally unregister
Thomas Zimmermann <[email protected]>
| Newsgroups | org.freedesktop.lists.nouveau,dev.linux.lists.imx,dev.linux.lists.sashiko-reviews,dev.linux.lists.virtualization,org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-doc,org.kernel.vger.linux-hyperv,org.kernel.vger.linux-renesas-soc,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
Restrict panic handling to primary displays. Overlays and cursors should not display panic output. If there are exceptions, they can be registered by the driver itself. For cleanup, unregister each plane unconditionally. The kmsg dumper already keeps track of the registration status so DRM doesn't have to. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Jocelyn Falempe <[email protected]> --- drivers/gpu/drm/drm_panic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 2048a3bf736f..7dbbcc1c219f 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -1079,6 +1079,8 @@ void drm_panic_register(struct drm_device *dev) return; drm_for_each_plane(plane, dev) { + if (plane->type != DRM_PLANE_TYPE_PRIMARY) + continue; if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) continue; plane->kmsg_panic.dump = drm_panic; @@ -1105,11 +1107,8 @@ void drm_panic_unregister(struct drm_device *dev) if (!dev->mode_config.num_total_plane) return; - drm_for_each_plane(plane, dev) { - if (!plane->helper_private || !plane->helper_private->get_scanout_buffer) - continue; + drm_for_each_plane(plane, dev) kmsg_dump_unregister(&plane->kmsg_panic); - } } /** -- 2.55.0