From: Jocelyn Falempe <jfalempe@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
javierm@redhat.com, airlied@gmail.com, simona@ffwll.ch,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
geert@linux-m68k.org, rdunlap@infradead.org
Cc: dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org,
amd-gfx@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org,
virtualization@lists.linux.dev, sashiko-reviews@lists.linux.dev
Subject: Re: [PATCH v3 07/14] drm/panic: Return from screen_user if display is too small
Date: Mon, 7 Sep 2026 23:09:39 +0200 [thread overview]
Message-ID: <fea78e29-a3a8-48d2-9353-48a94d3a1649@redhat.com> (raw)
In-Reply-To: <20260902121930.597222-8-tzimmermann@suse.de>
On 9/2/26 14:13, Thomas Zimmermann wrote:
> Return an error if the display is too small to display at least a
> single character. If the panic handler cannot display any message
> it does at least not destroy the current output, which might help
> with identifying the problem.
>
> This change duplicates the logic from screen_kmsg output.
Thanks, it looks good to me.
maybe add a check also for font->height > sb->height
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_panic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
> index f597ef04c5bc..c317afc76669 100644
> --- a/drivers/gpu/drm/drm_panic.c
> +++ b/drivers/gpu/drm/drm_panic.c
> @@ -486,7 +486,7 @@ static int draw_panic_screen_user(struct drm_scanout_buffer *sb, u32 fg_color, u
> struct drm_rect r_screen, r_logo, r_msg;
> unsigned int msg_width, msg_height;
>
> - if (!font)
> + if (!font || font->width > sb->width)
> return -EINVAL;
>
> fg_color = drm_draw_color_from_xrgb8888(fg_color, sb->format->format);
next prev parent reply other threads:[~2026-09-07 21:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 12:13 [PATCH v3 00/14] drm/panic: Split into core and helpers Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 01/14] drm/panic: Do not use un-escaped URL as format string Thomas Zimmermann
2026-09-07 21:00 ` Jocelyn Falempe
2026-09-02 12:13 ` [PATCH v3 02/14] drm/panic: Test address from kmap op for NULL Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 03/14] drm/panic: Return -EINVAL if font is not available Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 04/14] drm/panic: Return errno codes if panic output fails Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 05/14] drm/panic: Pass colors to draw_panic_dispatch() Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 06/14] drm/panic: Pass global module parameters to drm_panic_dispatch() Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 07/14] drm/panic: Return from screen_user if display is too small Thomas Zimmermann
2026-09-07 21:09 ` Jocelyn Falempe [this message]
2026-09-02 12:13 ` [PATCH v3 08/14] drm/panic: Retry in dispatch function if panic output fails Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 09/14] drm/panic: Split draw_panic_plane() Thomas Zimmermann
2026-09-07 21:11 ` Jocelyn Falempe
2026-09-02 12:13 ` [PATCH v3 10/14] drm/panic: Restrict to primary planes Thomas Zimmermann
2026-09-02 12:13 ` [PATCH v3 11/14] drm/panic: Display panic screen via per-plane callback Thomas Zimmermann
2026-09-07 21:24 ` Jocelyn Falempe
2026-09-02 12:13 ` [PATCH v3 12/14] drm/panic: Internalize panic locking in DRM core and helpers Thomas Zimmermann
2026-09-07 21:27 ` Jocelyn Falempe
2026-09-02 12:13 ` [PATCH v3 13/14] drm/panic: Move panic display code into helper library Thomas Zimmermann
2026-09-07 21:29 ` Jocelyn Falempe
2026-09-02 12:13 ` [PATCH v3 14/14] drm/panic: Compile KUnit tests as module Thomas Zimmermann
2026-09-07 21:35 ` Jocelyn Falempe
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=fea78e29-a3a8-48d2-9353-48a94d3a1649@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert@linux-m68k.org \
--cc=imx@lists.linux.dev \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rdunlap@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
/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