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

From: Javier Martinez Canillas
Date: Mon Jul 17 2023 - 06:12:30 EST


Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:

> 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...
>

Interesting. I'll take a look to that if I have time! But as mentioned,
all that is something to improve in your fbtest suite and the ssd130x
changes in the driver do look good to me and are working as expected.

> Gr{oetje,eeting}s,
>

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat