* [PATCH] drm/panic: Fix panic logo alignment
@ 2026-03-29 10:24 Dileep Sankhla
2026-03-31 12:31 ` Jocelyn Falempe
0 siblings, 1 reply; 2+ messages in thread
From: Dileep Sankhla @ 2026-03-29 10:24 UTC (permalink / raw)
To: Jocelyn Falempe, Javier Martinez Canillas, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Dileep Sankhla
Display the panic logo at the top center of the screen when
drm_panic_type is set to DRM_PANIC_TYPE_USER to keep the layout
properly aligned.
Signed-off-by: Dileep Sankhla <dileepsankhla.ds@gmail.com>
---
drivers/gpu/drm/drm_panic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
index d6d3b8d85dea..c7fecc5e857a 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -491,6 +491,8 @@ static void draw_panic_screen_user(struct drm_scanout_buffer *sb)
r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
drm_panic_logo_rect(&r_logo, font);
+ /* Center the panic logo */
+ drm_rect_translate(&r_logo, (sb->width - r_logo.x2) / 2, 0);
msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width);
msg_height = min(panic_msg_lines * font->height, sb->height);
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/panic: Fix panic logo alignment
2026-03-29 10:24 [PATCH] drm/panic: Fix panic logo alignment Dileep Sankhla
@ 2026-03-31 12:31 ` Jocelyn Falempe
0 siblings, 0 replies; 2+ messages in thread
From: Jocelyn Falempe @ 2026-03-31 12:31 UTC (permalink / raw)
To: Dileep Sankhla, Javier Martinez Canillas, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel
On 29/03/2026 12:24, Dileep Sankhla wrote:
> Display the panic logo at the top center of the screen when
> drm_panic_type is set to DRM_PANIC_TYPE_USER to keep the layout
> properly aligned.
Hi,
I think this is more a preference, than a fix.
At boot the logo is at the top left corner, and I choose to let it at
the same place.
Additionally, on low resolution (like 800x600) the logo has less chance
to overlap the text, so the user is more likely to see it.
Best regards,
--
Jocelyn
>
> Signed-off-by: Dileep Sankhla <dileepsankhla.ds@gmail.com>
> ---
> drivers/gpu/drm/drm_panic.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
> index d6d3b8d85dea..c7fecc5e857a 100644
> --- a/drivers/gpu/drm/drm_panic.c
> +++ b/drivers/gpu/drm/drm_panic.c
> @@ -491,6 +491,8 @@ static void draw_panic_screen_user(struct drm_scanout_buffer *sb)
>
> r_screen = DRM_RECT_INIT(0, 0, sb->width, sb->height);
> drm_panic_logo_rect(&r_logo, font);
> + /* Center the panic logo */
> + drm_rect_translate(&r_logo, (sb->width - r_logo.x2) / 2, 0);
>
> msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width);
> msg_height = min(panic_msg_lines * font->height, sb->height);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-31 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-29 10:24 [PATCH] drm/panic: Fix panic logo alignment Dileep Sankhla
2026-03-31 12:31 ` Jocelyn Falempe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome