From: Dileep Sankhla <dileepsankhla.ds@gmail.com>
To: Jocelyn Falempe <jfalempe@redhat.com>,
Javier Martinez Canillas <javierm@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Dileep Sankhla <dileepsankhla.ds@gmail.com>
Subject: [PATCH] drm/panic: Fix panic logo alignment
Date: Sun, 29 Mar 2026 15:54:54 +0530 [thread overview]
Message-ID: <20260329102454.11357-1-dileepsankhla.ds@gmail.com> (raw)
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
next reply other threads:[~2026-03-29 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-29 10:24 Dileep Sankhla [this message]
2026-03-31 7:43 ` Claude review: drm/panic: Fix panic logo alignment Claude Code Review Bot
2026-03-31 7:43 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260329102454.11357-1-dileepsankhla.ds@gmail.com \
--to=dileepsankhla.ds@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox