How to specify panel bit order in driver?

Jani Nikula jani.nikula at linux.intel.com
Fri Jun 28 07:45:48 UTC 2024


On Fri, 28 Jun 2024, John Watts <contact at jookia.org> wrote:
> Hello there,
>
> A while ago I added support for the FS035VG158 panel to the kernel, with its
> use case being on a Allwinner T113 board.

Might be helpful to actually point at the source code or commits or
something.

> While troubleshooting some other issue (I will be posting about that this
> weekend) I found that I need to tell the panel controller to use a bit depth of
> 18-bit in order for the panel to work correctly.
>
> I plan to add another panel to the kernel that also requires setting the bit
> depth, but has more configurations than just 24, 18, 16, it also supports
> packing 18 of the bits together.
>
> How all of this is configured depends on how the board and panel are wired
> together, it can't be determined at runtime based on pixel formats or anything
> like that. It seems to me that this needs to be specified in the device tree.
>
> My question is: How would I represent this? A property like 'bit-depth'?
> 'color-mapping'? Or is there already some subsystem or convention designed for
> this?

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.


HTH,
Jani.


-- 
Jani Nikula, Intel


More information about the dri-devel mailing list