Drawing buffer TWO BUFFs configuration


my first thoughts about the two buffers secinario.

  1. the LVGL processes the First buffer then calls disp_flush.
  2. the disp_flush sends the buffer to the free DMA then return and acknowledges using lv_disp_flush_ready.
  3. the DMA is now sending the data to the LCD in the background.
  4. the LVGL processes the Second buffer then calls disp_flush.
  5. the DMA is now busy sending the data in First buffer, the disp_flush would lock till the DMA is free.
    then sends the second buffer to DMA and then acknowledges using lv_disp_flush_ready.
  6. the LVGL again processes the First buffer and repeats.

If this is right, then what is the use of the acknowledgment using lv_disp_flush_ready?
it always sits at the end of the disp_flush function.
the flush function wouldn’t return if the DMA isn’t free at the moment. then the LVGL will not proceed also.


another approach is to call the lv_disp_flush_ready after the DMA finishes, using interrupts.
and not at the end of the disp_flush function.