How to specify panel bit order in driver?

John Watts contact at jookia.org
Fri Jun 28 16:39:16 UTC 2024


Hi Jani,

On Fri, Jun 28, 2024 at 10:45:48AM +0300, Jani Nikula wrote:
> Might be helpful to actually point at the source code or commits or
> something.

The source code is here: drivers/gpu/drm/panel/panel-newvision-nv3052c.c
It's just a standard MIPI DBI panel. It reports using an RGB888 bus format.

> Maybe look at include/uapi/drm/drm_fourcc.h, and how the DRM_FORMAT_*
> macros are used.
> 
> Can't help you with device tree, but maybe this gives you pointers to
> other places for examples.

Currently it works like this:

- DRM uses 24-bit depth
- CRTC puts out a 24-bit signal
- This gets output over LCD pins
- The PCB drops 2 bits per channel by wiring 6 pins to GND
- The panel is told to only use 18 bits

Getting DRM to use MEDIA_BUS_FMT_RGB666_1X18 would be nice and allow the panel
to auto-detect which bits to use. But the bus format is set in the panel :(

Where is the bus format usually set for cases where a board only supports a
physical format?

> HTH,
> Jani.
> 
> 
> -- 
> Jani Nikula, Intel

John.


More information about the dri-devel mailing list