nuttx-apps icon indicating copy to clipboard operation
nuttx-apps copied to clipboard

LVGL V9 and framebuffer - image is tearing but didn't with LVGL V8

Open TimJTi opened this issue 1 year ago • 1 comments

With LVGL V8, before the NuttX upgrade to V9, I was able to use /dev/fb0 successfully and the LVGL demos ran nicely. I could run my own graphic apps too and they behaved. Note - this is with the framebuffer drivers, so LV_USE_NUTTX_LCD is NOT set, and LVGL defaults to opening /dev/fb0.

Since the update to V9 - and with no other changes I can find - even simple graphics, such as a black background with just a spinner, show breakup/tearing with the rendered image.

The example framebuffer app runs seems to just fine (I modified it to draw continuously and tried different delays between drawing the rectangles), so I am fairly sure this is down to the way LVGL now interacts with NuttX (using the master branch).

I initially thought it was lack of double buffers, but comparing lvgl8 and lvgl9 framebuffer code I now not sure there are any difference as I don't think double buffering will be used in either lvgl version: the (SAMA5D2) LCD setup does not specify any virtual x or y values which is what triggers the setting up of a second framebuffer as best as I can tell.

I am happy to investigate further and try things, but I have run out of ideas as to where to look. I posted a similar report to this on the LVGL forum but no one has answered there in 3 days.

For now, I will have to go back to LVGL V8 which is a shame, especially if V9 can be made to work given the amount of rewrite of app code that's needed between the two lvgl versions (annoying!!).

Can anyone help?

TimJTi avatar Jun 17 '24 14:06 TimJTi

Have now created this as an issue on the LVGL repo (rather than just asking advice on the forum). I took two videos to show the problem in V9 and lack of problem in V8.

https://github.com/apache/nuttx-apps/assets/56726697/5cdef90d-03d6-45b3-8e9b-01b5d1f145d9

https://github.com/apache/nuttx-apps/assets/56726697/49edba2f-324c-462b-b393-3aee95858f5e

TimJTi avatar Jun 18 '24 14:06 TimJTi

Not much recent help from LVGL - issue raised is here

TimJTi avatar Jul 06 '24 09:07 TimJTi

See NuttX PR here

TimJTi avatar Jul 18 '24 15:07 TimJTi