lvgl / lv_drivers

TFT and touch pad drivers for LVGL embedded GUI library
https://docs.lvgl.io/master/porting/index.html
MIT License
291 stars 310 forks source link

Wrong DRM_FOURCC for 32 bit? #235

Open johado opened 1 year ago

johado commented 1 year ago

I'm trying to get an lvgl application running on an embedded linux device that uses the DRM framework and and a MIPI DSI panel using the panel-simple driver. The current code fails select a plane that is compatible since the closest supported format is XR24 and not AR24, unless i do the following change in drm.c

if LV_COLOR_DEPTH == 32

-#define DRM_FOURCC DRM_FORMAT_ARGB8888 +#define DRM_FOURCC DRM_FORMAT_XRGB8888

elif LV_COLOR_DEPTH == 16

Is that the right thing to do or should the 32 bit format be configurable? (On another device the same application would run when configured to use FBDEV or SDL)

kisvegabor commented 1 year ago

Is that the right thing to do or should the 32 bit format be configurable?

I'd make DRM_FORMAT_XRGB8888 the default and add config to use the ARGB version.

An other option would be to try DRM_FORMAT_XRGB8888 and if it's not good use DRM_FORMAT_XRGB8888 as a fallback.

superna9999 commented 1 year ago

@kisvegabor yes argb should be a fallback of xrgb

stale[bot] commented 1 year ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.