Description
What MCU/Processor/Board and compiler are you using?
Linux with DRM backend.
What LVGL version are you using?
v9.1
What do you want to achieve?
Rotate the whole screen.
What have you tried so far?
lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270)
has been called after lv_linux_drm_set_file()
, but not working!
Code to reproduce
lv_display_t* disp = lv_linux_drm_create();
lv_linux_drm_set_file(disp, '/dev/dri/card0', -1);
lv_display_set_rotation(disp, LV_DISPLAY_ROTATION_270);
1 Like
Did you ever get a resolution to this problem?
Hi,
I too see a problem using the DRM driver and have a need to rotate my native portrait mode display → landscape.
Building with Yocto (Scarthgap) and using the latest (as of today) master GitHub - lvgl/lv_port_linux: LVGL configured to work with a standard Linux framebuffer
Native rotated 0
Native rotated 90 [Also the pointer gets all messed up]
I will try study up on /dev/dri/card1 driver and investigate.
/Robert
This is very similar to what I see. There doesn’t really seem to be support for rotation in the lvgl 9+ DRM stack. It’s not even clear to me why the screen gets altered at all when you apply the rotation.
Hej,
I spent a or two to investigate how to rotate stuff using the DRM interface.
Depending on HW and/or implementation it can be done. If the DRM plane (that you are using) has a “rotation” property, it is possible to rotate/reflect the screen.
This link describes the “rotation” property and as an added bonus also lists DRM drivers that supports it.
I’m using an imx8mp SoC [driver: imx-drm] and can therefore not rotate the screen using the DRM interface. I will either have to go for the SDL2 (full Linux stack/wayland/weston) interface or rotate everything in SW.
One more option I will check out is using GLE, but not sure if it is a viable option or not.
/Robert