This is a note to let you know that I've just added the patch titled drm/panic: Fix off-by-one logo size checks to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-panic-fix-off-by-one-logo-size-checks.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit fc791007d46f01863795c6a08a3db0582c534ca5 Author: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Date: Thu Jun 13 21:18:00 2024 +0200 drm/panic: Fix off-by-one logo size checks [ Upstream commit 94ff11d3bd32506710ca43569d38420e7fc790c1 ] Logos that are either just as wide or just as high as the display work fine. Fixes: bf9fb17c6672868d ("drm/panic: Add a drm panic handler") Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Reviewed-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx> Signed-off-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/1c9d02463cef3eac22cfac3ac6d1adad369f367b.1718305355.git.geert+renesas@xxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 056494ae1edef..e1c4796685692 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -439,7 +439,7 @@ static void draw_panic_static(struct drm_scanout_buffer *sb) bg_color, sb->format->cpp[0]); if ((r_msg.x1 >= drm_rect_width(&r_logo) || r_msg.y1 >= drm_rect_height(&r_logo)) && - drm_rect_width(&r_logo) < sb->width && drm_rect_height(&r_logo) < sb->height) { + drm_rect_width(&r_logo) <= sb->width && drm_rect_height(&r_logo) <= sb->height) { draw_txt_rectangle(sb, font, logo, logo_lines, false, &r_logo, fg_color); } draw_txt_rectangle(sb, font, panic_msg, msg_lines, true, &r_msg, fg_color);