lvgl / lv_drivers

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

Add compatibility with lvgl9 #313

Open etag4048 opened 1 month ago

etag4048 commented 1 month ago

This PR adds compatibility with LVGL9.x

etag4048 commented 1 month ago

@kisvegabor We've added compatibility with lvgl9, currently finding a solution to handle color depths 8 and 1, because not all compositors support 8bit and 1bit colors format natively.. So conversion might be necessary.

etag4048 commented 1 month ago

Tried to add support for 8bit and 1bit color formats, lv_drivers used to support RGB332 when using a color depth of 8bits up to version release/v8.4. Since version 9.0 however, LV_COLOR_FORMAT_NATIVE is set to L8 when the color depth is set to 8 bits.

However, Wayland compositors/DRMs on the desktop don't support index based color formats, If I am not mistaken RGB565A8 and L8 are for destined for embedded targets, converting from an index-based color format to ARGB8888 is not the job of the wayland driver.

So this last commit aligns the Wayland driver to feature the same behavior as the Windows and SDL drivers. The next task would be to use RENDERING_MODE_DIRECT and flip the buffers as @WallaceIT suggested in issue #287

kisvegabor commented 1 month ago

Hi Erik,

Thank you! I know for sure that this update was waited by many people!

Especially at the first pass it's ok support only the common color formats. Namely

We won't update this repo to v9. Could you add this driver to the lvgl repo targeting this folder?

nicusorcitu commented 1 month ago

@anagrad

sukesh-ak commented 1 month ago

@kisvegabor

We won't update this repo to v9. Could you add this driver to the lvgl repo targeting this folder?

Can you suggest how to get lvgl 9.x working? I am working on nVidia Jetson Orin NX 16GB which uses Ubuntu 22 so wanted to get lvgl 9.x running on it.

kisvegabor commented 1 month ago

@sukesh-ak You can use e.g. this repo. It uses the builtin SDL driver of LVGL.

vvn-git commented 2 weeks ago

@etag4048 please format the code style to LVGL alike style, like "if(0) {", instead of "if(0) \n {"... I have some changes/fixes waiting to be committed to it . thanks.

etag4048 commented 2 weeks ago

@vvn-git Will do during the weekend or at the beginning of next week, the documentation needs to be converted to RST, and it needs to be properly integrated with the existing build system.

OhtokaniPinzon commented 1 day ago

Hi @etag4048 I was working some weeks ago on lv_drivers repo to run with lvgl9. Here are my changes so far https://github.com/OhtokaniPinzon/lv_drivers/tree/lvgl9-porting-master, this fix still has some visual artiffacts when testing some demos from lvgl repo, but besides that it seems to work. Maybe both works can be combined, or maybe you can find the bugs on my fix.

etag4048 commented 21 hours ago

@OhtokaniPinzon Thank you, I will check it out soon, the day job is quite demanding lately :)