diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2024-06-04 15:20:31 +0200 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2024-06-07 16:09:05 +0200 |
commit | 4aebb79021f3e6c2b6fbb92a7d9c5d1e6ad0324a (patch) | |
tree | d2b0fa455b8cfc4148b6d5b6cf4de4a300d1c740 /drivers/i3c | |
parent | df3fb27a74a4eeb1436129024a7e957c2e83a95e (diff) |
drm/mipi-dbi: Add support for DRM_FORMAT_RGB888
DRM_FORMAT_RGB888 is 24 bits per pixel and it would be natural to send it
on the SPI bus using a 24 bits per word transfer. The problem with this
is that not all SPI controllers support 24 bpw.
Since DRM_FORMAT_RGB888 is stored in memory as little endian and the SPI
bus is big endian we use 8 bpw to always get the same pixel format on the
bus: b8g8r8.
The MIPI DCS specification lists the standard commands that can be sent
over the MIPI DBI interface. The set_address_mode (36h) command has one
bit in the parameter that controls RGB/BGR order. This means that the
controller can be configured to receive the pixel as BGR.
RGB888 is rarely supported on these controllers but RGB666 is very common.
All datasheets I have seen do at least support the pixel format option
where each color is sent as one byte and the 6 MSB's are used.
All this put together means that we can send each pixel as b8g8r8 and an
RGB666 capable controller sees this as b6x2g6x2r6x2.
v4:
- s/emulation_format/pixel_format/ (Dmitry)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604-panel-mipi-dbi-rgb666-v4-4-d7c2bcb9b78d@tronnes.org
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Diffstat (limited to 'drivers/i3c')
0 files changed, 0 insertions, 0 deletions