GUI_DrawBitmap() is much slower when using a cache for the framebuffer

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GUI_DrawBitmap() is much slower when using a cache for the framebuffer

      Hello to all,

      I have the task to play videos on a STM32F7xx cpu and a SSD1963 display controller, attached with 16bit.

      In order to optimize all components in charge, we implemented the hardware jpeg codec of cpu.
      It does a good job, decoding of a 320*240 jpeg takes 7ms including software converter MCU to RGB565.

      When it comes to drawing the bitmap, we use GUI_DrawBitmap() and prepare the GUI_Bitmap structure first with the raw RGB data.
      We use this driver setting:
      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C1B16);

      It takes 15ms to write 0x70800 * 16Bit words. (Probably the whole screen of 800*480 / RGB65, because the process is done
      shortly after GUI_Init(), so the whole screen is written once, even though only a pic with 320*240 is displayed)

      But then, just as a try, we disabled the cache of the framebuffer:
      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C0B16);

      And then, you wouldn´t believe it, the same writing (0x70800 * 16bit) takes only 2ms!!

      A cache should make things faster, as no read back from the SSD1963 is necessary...

      Also by drawing the original jpeg with no hardware decoding the same result:
      with cache: 240ms
      without cache: 218ms

      What is the reason for this behaviour?

      As the cache has other advantages to us (getting screenshots with correct colors), we would like to disable the cache just for displaying videos.
      Is it possible to do it on runtime?

      Many thanks for your help
      Andreas