[PATCH] drm/log: Fix damaged rectangle height in drm_log_draw_line()
From: yaolu
Date: Wed Aug 19 2026 - 22:14:05 EST
From: Lu Yao <yaolu@xxxxxxxxxx>
DRM_RECT_INIT() expects x, y, width and height, should use
'scanout->scaled_font_h' here. rather than
'(scanout->line + 1) * scanout->scaled_font_h'.
Fixes: f7b42442c4ac ("drm/log: Introduce a new boot logger to draw the kmsg on the screen")
Signed-off-by: Lu Yao <yaolu@xxxxxxxxxx>
---
drivers/gpu/drm/clients/drm_log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
index 467cdce57dd3..da413ec1c7e1 100644
--- a/drivers/gpu/drm/clients/drm_log.c
+++ b/drivers/gpu/drm/clients/drm_log.c
@@ -113,7 +113,7 @@ static void drm_log_draw_line(struct drm_log_scanout *scanout, const char *s,
const u8 *src;
u32 px_width = fb->format->cpp[0];
struct drm_rect r = DRM_RECT_INIT(0, scanout->line * scanout->scaled_font_h,
- fb->width, (scanout->line + 1) * scanout->scaled_font_h);
+ fb->width, scanout->scaled_font_h);
u32 i;
if (drm_client_buffer_vmap_local(scanout->buffer, &map))
--
2.25.1