[PATCH v6 2/3] drm/st7571-i2c: add support for Sitronix ST7571 LCD controller
Marcus Folkesson
marcus.folkesson at gmail.com
Mon Apr 28 07:11:53 UTC 2025
Hi Geert,
On Thu, Apr 24, 2025 at 10:38:33AM +0200, Geert Uytterhoeven wrote:
> Hi Marcus,
>
[...]
> > + /*
> > + * As the display supports grayscale, all pixels must be written as two bits
> > + * even if the format is monochrome.
> > + *
> > + * The bit values maps to the following grayscale:
> > + * 0 0 = White
> > + * 0 1 = Light gray
> > + * 1 0 = Dark gray
> > + * 1 1 = Black
>
> That is not R2, but D2?
> include/uapi/drm/drm_fourcc.h:
>
> /* 2 bpp Red (direct relationship between channel value and brightness) */
> #define DRM_FORMAT_R2 fourcc_code('R', '2', ' ', ' ')
> /* [7:0] R0:R1:R2:R3 2:2:2:2 four pixels/byte */
>
> /* 2 bpp Darkness (inverse relationship between channel value and
> brightness) */
> #define DRM_FORMAT_D2 fourcc_code('D', '2', ' ', ' ')
> /* [7:0] D0:D1:D2:D3 2:2:2:2 four pixels/byte */
>
> So the driver actually supports D1 and D2, and XRGB8888 should be
> inverted while converting to monochrome (and grayscale, which is not
> yet implemented).
Hrm, that seems right.
I'm up to some rework of the driver, so I will put it into my pipeline.
Thank you for noticing this!
Best regards,
Marcus Folkesson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250428/64251063/attachment-0001.sig>
More information about the dri-devel
mailing list