Skip to content

Commit 5555a30

Browse files
author
Jocelyn Falempe
committed
drm/panic: Rename draw_panic_static_* to draw_panic_screen_*
I called them "static" because the panic screen is drawn only once, but this can be confused with the static meaning in C. Also remove some unnecessary braces in draw_panic_dispatch(). No functionnal change. Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patch.msgid.link/20251216082524.115980-2-jfalempe@redhat.com Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
1 parent a7c2f14 commit 5555a30

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/gpu/drm/drm_panic.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static void drm_panic_logo_draw(struct drm_scanout_buffer *sb, struct drm_rect *
476476
fg_color);
477477
}
478478

479-
static void draw_panic_static_user(struct drm_scanout_buffer *sb)
479+
static void draw_panic_screen_user(struct drm_scanout_buffer *sb)
480480
{
481481
u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
482482
sb->format->format);
@@ -545,7 +545,7 @@ static int draw_line_with_wrap(struct drm_scanout_buffer *sb, const struct font_
545545
* Draw the kmsg buffer to the screen, starting from the youngest message at the bottom,
546546
* and going up until reaching the top of the screen.
547547
*/
548-
static void draw_panic_static_kmsg(struct drm_scanout_buffer *sb)
548+
static void draw_panic_screen_kmsg(struct drm_scanout_buffer *sb)
549549
{
550550
u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
551551
sb->format->format);
@@ -733,7 +733,7 @@ static int drm_panic_get_qr_code(u8 **qr_image)
733733
/*
734734
* Draw the panic message at the center of the screen, with a QR Code
735735
*/
736-
static int _draw_panic_static_qr_code(struct drm_scanout_buffer *sb)
736+
static int _draw_panic_screen_qr_code(struct drm_scanout_buffer *sb)
737737
{
738738
u32 fg_color = drm_draw_color_from_xrgb8888(CONFIG_DRM_PANIC_FOREGROUND_COLOR,
739739
sb->format->format);
@@ -801,10 +801,10 @@ static int _draw_panic_static_qr_code(struct drm_scanout_buffer *sb)
801801
return 0;
802802
}
803803

804-
static void draw_panic_static_qr_code(struct drm_scanout_buffer *sb)
804+
static void draw_panic_screen_qr_code(struct drm_scanout_buffer *sb)
805805
{
806-
if (_draw_panic_static_qr_code(sb))
807-
draw_panic_static_user(sb);
806+
if (_draw_panic_screen_qr_code(sb))
807+
draw_panic_screen_user(sb);
808808
}
809809
#else
810810
static void drm_panic_qr_init(void) {};
@@ -879,18 +879,18 @@ static void draw_panic_dispatch(struct drm_scanout_buffer *sb)
879879
{
880880
switch (drm_panic_type) {
881881
case DRM_PANIC_TYPE_KMSG:
882-
draw_panic_static_kmsg(sb);
882+
draw_panic_screen_kmsg(sb);
883883
break;
884884

885885
#if IS_ENABLED(CONFIG_DRM_PANIC_SCREEN_QR_CODE)
886886
case DRM_PANIC_TYPE_QR:
887-
draw_panic_static_qr_code(sb);
887+
draw_panic_screen_qr_code(sb);
888888
break;
889889
#endif
890890

891891
case DRM_PANIC_TYPE_USER:
892892
default:
893-
draw_panic_static_user(sb);
893+
draw_panic_screen_user(sb);
894894
}
895895
}
896896

0 commit comments

Comments
 (0)