public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	javierm@redhat.com, deller@gmx.de,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 2/4] drm/client: log: Look up glyph shape with font helper
Date: Mon, 1 Jun 2026 13:19:13 +0200	[thread overview]
Message-ID: <864d92ed-3f54-45c4-8000-167ccc343f11@redhat.com> (raw)
In-Reply-To: <20260529140759.529929-3-tzimmermann@suse.de>

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 <jfalempe@redhat.com>
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>   drivers/gpu/drm/clients/drm_log.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
> index 8d21b785bead..e3e02c84a4cf 100644
> --- a/drivers/gpu/drm/clients/drm_log.c
> +++ b/drivers/gpu/drm/clients/drm_log.c
> @@ -122,10 +122,12 @@ static void drm_log_draw_line(struct drm_log_scanout *scanout, const char *s,
>   	iosys_map_incr(&map, r.y1 * fb->pitches[0]);
>   	for (i = 0; i < len && i < scanout->columns; i++) {
>   		u32 color = (i < prefix_len) ? scanout->prefix_color : scanout->front_color;
> -		src = drm_draw_get_char_bitmap(font, s[i], font_pitch);
> -		drm_log_blit(&map, fb->pitches[0], src, font_pitch,
> -			     scanout->scaled_font_h, scanout->scaled_font_w,
> -			     px_width, color);
> +		src = font_data_glyph_buf(font->data, font->width, font->height,
> +					  (unsigned char)s[i]);
> +		if (src)
> +			drm_log_blit(&map, fb->pitches[0], src, font_pitch,
> +				     scanout->scaled_font_h, scanout->scaled_font_w,
> +				     px_width, color);
>   		iosys_map_incr(&map, scanout->scaled_font_w * px_width);
>   	}
>   


  reply	other threads:[~2026-06-01 11:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 14:01 [PATCH 0/4] drm: Safe font-data access in log/panic drawing Thomas Zimmermann
2026-05-29 14:01 ` [PATCH 1/4] lib/fonts: Look up glyph data with font_data_glyph_buf() Thomas Zimmermann
2026-06-01 11:18   ` Jocelyn Falempe
2026-06-02  8:08     ` Thomas Zimmermann
2026-06-04  6:27   ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 2/4] drm/client: log: Look up glyph shape with font helper Thomas Zimmermann
2026-06-01 11:19   ` Jocelyn Falempe [this message]
2026-06-04  6:27   ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 3/4] drm/panic: " Thomas Zimmermann
2026-06-01 11:19   ` Jocelyn Falempe
2026-06-04  6:27   ` Claude review: " Claude Code Review Bot
2026-05-29 14:01 ` [PATCH 4/4] drm/draw: Remove unused helper drm_draw_get_char_bitmap() Thomas Zimmermann
2026-06-01 11:19   ` Jocelyn Falempe
2026-06-04  6:27   ` Claude review: " Claude Code Review Bot
2026-06-04  6:27 ` Claude review: drm: Safe font-data access in log/panic drawing Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864d92ed-3f54-45c4-8000-167ccc343f11@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=airlied@gmail.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox