On 29/05/2026 16:01, Thomas Zimmermann wrote:
Look up glyph shapes with font_data_glyph_buf(). Handle non-existing
glyphs gracefully. Enable extended ASCII by casting to unsigned char.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <[email protected]>



Signed-off-by: Thomas Zimmermann <[email protected]>
---
  drivers/gpu/drm/drm_panic.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
index d6d3b8d85dea..e576c4791861 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -443,9 +443,11 @@ static void draw_txt_rectangle(struct drm_scanout_buffer 
*sb,
                        rec.x1 += (drm_rect_width(clip) - (line_len * 
font->width)) / 2;
for (j = 0; j < line_len; j++) {
-                       src = drm_draw_get_char_bitmap(font, msg[i].txt[j], 
font_pitch);
+                       src = font_data_glyph_buf(font->data, font->width, 
font->height,
+                                                 (unsigned char)msg[i].txt[j]);
                        rec.x2 = rec.x1 + font->width;
-                       drm_panic_blit(sb, &rec, src, font_pitch, 1, color);
+                       if (src)
+                               drm_panic_blit(sb, &rec, src, font_pitch, 1, 
color);
                        rec.x1 += font->width;
                }
        }

Reply via email to