mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
drm/panic: Fix off-by-one logo size checks
Logos that are either just as wide or just as high as the display work
fine.
Fixes: bf9fb17c66
("drm/panic: Add a drm panic handler")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1c9d02463cef3eac22cfac3ac6d1adad369f367b.1718305355.git.geert+renesas@glider.be
This commit is contained in:
parent
a63ee07883
commit
94ff11d3bd
@ -472,7 +472,7 @@ static void draw_panic_static_user(struct drm_scanout_buffer *sb)
|
||||
drm_panic_fill(sb, &r_screen, bg_color);
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user