drm/fb-helper: Set skip_panic if the drm driver supports drm panic

fb_info->skip_panic flag prevents fbcon from writing to the
framebuffer during a kernel panic. So set it when the drm driver
implements drm panic, to avoid overwriting the panic screen.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240717090102.968152-3-jfalempe@redhat.com
This commit is contained in:
Jocelyn Falempe 2024-07-18 11:21:27 +02:00
parent d20a9f568f
commit c2c2a91f38

View File

@ -44,6 +44,7 @@
#include <drm/drm_vblank.h>
#include "drm_internal.h"
#include "drm_crtc_internal.h"
static bool drm_fbdev_emulation = true;
module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600);
@ -524,6 +525,7 @@ struct fb_info *drm_fb_helper_alloc_info(struct drm_fb_helper *fb_helper)
fb_helper->info = info;
info->skip_vt_switch = true;
info->skip_panic = drm_panic_is_enabled(fb_helper->dev);
return info;
err_release: