Re: [PATCH 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1

From: Geert Uytterhoeven
Date: Mon Jul 17 2023 - 06:04:35 EST


Hi Javier,

On Mon, Jul 17, 2023 at 11:33 AM Javier Martinez Canillas
<javierm@xxxxxxxxxx> wrote:
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:
> >> >> penguin in test004 is not displayed correctly. I was expecting that to be
> >> >> working correctly since you mentioned to be using the Linux logo on boot.
> >> >
> >> > Linux has logos for displays using 2, 16, and 256 colors. Note that the
> >> > default logos are 80x80, which is larger than your display, so no logo
> >> > is drawn.
> >> > Fbtest has only the full color logo, so it will look bad on a monochrome
> >> > display.
> >>
> >> I see. Should the test check for minimum num_colors and skip that test then?
> >
> > The test still works (you did see an ugly black-and-white penguin), doesn't it?
>
> Fair enough. But when it defaulted to XRGB8888, it looked better. So I
> thought that it was a regression. No strong opinion though if the test
> should be skipped or not.

IC, fbtest's mono_match_color() just finds the closest color (black or
white), while drm_fb_xrgb8888_to_gray8_line() uses a weighted average
of the RGB components. That might make a small but visible difference.

We could make it look even better using Floyd-Steinberg dithering... ;-)
Fbtest does have an unused match_color_error() helper, so I must have
had that in mind, initially...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds