Skip to contentSkip to conversation

drm/log: Fix damaged rectangle height in drm_log_draw_line()

PATCH New [email protected] 1 participant 1 message Aug 20

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/log: Fix damaged rectangle height in drm_log_draw_line()

From: Lu Yao <[email protected]>

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")
---
 drivers/gpu/drm/clients/drm_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/clients/drm_log.c +1 -1
index 467cdce57dd3..da413ec1c7e1 100644
@@ -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))
Signature · 1 line
2.25.1