[PATCH v2 09/13] drm/panic: Restrict to primary planes; unconditionally unregister
Thomas Zimmermann
tzimmermann at suse.de
Mon Aug 24 05:43:40 PDT 2026
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 <tzimmermann at suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe at redhat.com>
---
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
More information about the linux-arm-kernel
mailing list