On Wed, 9 Apr 2025 at 16:16, Javier Martinez Canillas <javi...@redhat.com> wrote: > Marcus Folkesson <marcus.folkes...@gmail.com> writes: > > 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...
To see the nice monochrome penguin logo, fb-helper needs to gain support for R1 first... > 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. In theory, it could use Floyd–Steinberg dithering, like I did for modetest. However, given the display receives partial updates from damage clips, it will look ugly, and may flicker. > 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. [1] needs an update, and still more rework to make them acceptable. > > Please compare > > https://www.marcusfolkesson.se/xrgb8888.png > > and > > https://www.marcusfolkesson.se/c1.png Yep, the latter is using the correct logo. [1] "[PATCH v2 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1" https://lore.kernel.org/all/cover.1692888745.git.ge...@linux-m68k.org/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org 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