Skip to content

Commit

Permalink
drm/fb-helper: Set skip_panic if the drm driver supports drm panic
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jocelyn Falempe committed Jul 19, 2024
1 parent d20a9f5 commit c2c2a91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c2c2a91

Please sign in to comment.