Re: [PATCH v3 2/3] drm/st7571-i2c: add support for Sitronix ST7571 LCD controller

From: Javier Martinez Canillas
Date: Wed Apr 09 2025 - 10:17:18 EST


Marcus Folkesson <marcus.folkesson@xxxxxxxxx> writes:

> Hello Javier,
>
> On Wed, Apr 09, 2025 at 11:43:54AM +0200, Javier Martinez Canillas wrote:

[...]

>>
>> Likely you will need to define more stuff to be specific for each entry, maybe
>> you will need different primary plane update handlers too. Similar to how I had
>> to do it the ssd130x driver to support all the Solomon OLED controller families:
>>
>> https://elixir.bootlin.com/linux/v6.11/source/drivers/gpu/drm/solomon/ssd130x.c#L1439
>
> Thanks, that sounds like a good idea.
>
> I've now experimenting with XRGB8888, and, well, it works. I guess.
> The thresholds levels in the all conversion steps for XRGB8888 -> 8 bit grayscale -> monochrome
> makes my penguin look a bit boring.
>
> But I guess that is expected.
>

Yeah, the XRGB8888 version is a boring indeed comparing with the C1 one...

The drm_fb_xrgb8888_to_mono() helper is very naive and just uses a very
naive midpoint thresholding to choose if the pixel should be 1 or 0. So
there is a lot of information lost there unfortunately.

But that's what I did for ssd130x, to at least have a working driver. Then
support for R1 (for ssd130x family) and R4 (for the ssd132x family) could
be added as follow-ups. I never did it but Geert has some patches for this.

> Please compare
> https://www.marcusfolkesson.se/xrgb8888.png
> and
> https://www.marcusfolkesson.se/c1.png
>

Nice pictures!

>> --
>> Best regards,
>>
>> Javier Martinez Canillas
>> Core Platforms
>> Red Hat
>>
>
> Best regards,
> Marcus Folkesson

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat