According this I added following code before SDRAM init (in tft.c) and now it works. BUT: Since my buffer was not 1/10 of the horizontal resolution, I hoped that the lv_task_handler would do the job much faster now with full buffer and external SDRAM… but unfortunately it seems not the case …
Putting the draw buffer in SDRAM is too slow because of the big latencies. I had the same experience on the stm32_F469i. I would suggest to reduce your buffers so they fit in internal ram (which has almost no latency). Making it smaller will not effect performance that much.
Though with the F7 you might be able to use some caching functionality on the external RAM.
I think you need to read the display configuration documentation of lvgl to get a better understanding.
LVGL has 2 kinds of buffers in use.
The actual framebuffer that contains the whole screen and is transferred 30-60 times per second to the display. static __IO uintpixel_t * my_fb = (__IO uintpixel_t*) (0x60000000);
The LTDC hardware copies that memory buffer to the display. This is put in ext. RAM because the whole frame does not fit in the internal ram. Here the latencies are not an issue because it is copied in large blocks directly without CPU intervention.
Next to the framebuffer you also have one or two lvgl draw buffers. These are used by lvgl to do the actual graphic drawing calculations. These calculations are done on blocks the size of your draw buffers.
On this part a lot of write/read operations take place by the CPU to do the drawings. This is the reason why the RAM latency has a huge effect on the performance. So these you place in internal RAM.
When the calculations are done for the buffer it gets transfered to the framebuffer. This is done in the the flush callback function. You can use DMA2D to offload the CPU and do the actual copying for you. This allows you to continue calculations on the next drawing block.
So just change the draw buffer sizes so they fit your memory and check if the implementation uses DMA2D for transfering the buffers.
PS. DMA2D can use rectangular buffer sizes. Regular DMA needs a consecutive memory block. This allows you to use draw buffers smaller then a full line width.
Looking at the lv_port code it uses the regular DMA. Not DMA2D (DMA2 is not the same).
So in this case you need to keep full line widths. Otherwise you will need to change the code to use the DMA2D block.
Which would be a good learning exersice