Rotation in direct mode

What do you want to achieve?

I want to rotate my display in direct mode. I used partial mode in previous LVGL versions but on the FSP port, it seems that only direct mode is supported.

The LVGL documentation mentions that:

Note that in [LV_DISPLAY_RENDER_MODE_DIRECT] the small changed areas are rendered directly in the frame buffer so they cannot be rotated later. Therefore in direct mode only the whole frame buffer can be rotated.

Can you advise on how to rotate the whole buffer in direct mode ?

Environment

  • EK-RA8D1:
  • LVGL version: v9.5

Hi @AZ_Renesas,

In LV_DISPLAY_RENDER_MODE_DIRECT , rotation must be applied to the entire frame buffer at once (not per-area). The Renesas GLCDC driver (lv_renesas_glcdc.c`) only supports software rotation in partial mode , not direct mode.

“Software based screen rotation is supported in partial mode”

If you need rotation on the EK-RA8D1, the recommended approach is to switch to LV_DISPLAY_RENDER_MODE_PARTIAL and use lv_display_set_rotation()

Thanks for your response. Ok, so the first step is to switch to partial mode.

RM_LVGL_PORT_Open which is the Renesas/FSP function that initializes the LVGL port driver is by default configuring the direct mode. I have tried to change LV_DISPLAY_RENDER_MODE_DIRECT to LV_DISPLAY_RENDER_MODE_PARTIAL to configure partial mode.

Then I call lv_display_set_render_mode after lv_init to change the render mode.

But after these changes (or only the first one) my screen totally flickers.

I have tried to increase LV_MEM_SIZE but the same happens.

Please let me know if you have any idea.

Intressing, I will check this with LVGL Open Team.

cc: @kisvegabor @AndreCostaaa

Hi @AZ_Renesas,

If you need a 200x100 image at the end, but the display is 100x200, this is what you should do:

  1. Configure LVGL with a 200x100 display with 1 frame buffer, so it renders the intended image
  2. In the flush callback use SW rotation or Dave2D to rotate the 200x100 image to a 100x200 buffer
  3. Make GLDC show the rotated 100x200 image.

You can also also triple buffering by having

  • 200x100 buffer into which LVGL renders
  • 2 pcs of 100x200 buffers that you swap for GLDC

Let me know how it works.