[PATCH 1/3] drm/panic: Fix off-by-one logo size checks
Geert Uytterhoeven
geert+renesas at glider.be
Wed Jun 12 13:54:08 UTC 2024
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 at glider.be>
---
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 7ece67086cecb79f..52d8a96b7dedff2c 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -444,7 +444,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, bg_color);
}
draw_txt_rectangle(sb, font, panic_msg, msg_lines, true, &r_msg, fg_color, bg_color);
--
2.34.1
More information about the dri-devel
mailing list