We use NXP IMX 8MM EVK with Yocto Linux 4.14.98_2.0.0 and custom MIPI DSI display (DRM driver made on top of Raydeon 67191 driver). Our display has a 720x1280 resolution and it is vertical.
Now I have to rotate display 270 degrees.
I've enabled CONFIG_FRAMEBUFFER_CONSOLE_ROTATION option in kernel config in order to rotate framebuffer console output and I am able to rotate console output with following commands:
root@imx8mmevk:~# cd /sys/class/graphics/fbcon
root@imx8mmevk:/sys/class/graphics/fbcon# echo 3 | sudo tee rotate_all
Next I have to rotate framebuffer for the gst-player video playback, QML viewer, IP camera input. So I want portrait display to act as a landscape one.
I was trying to write 3 to /sys/class/graphics/fb0/rotate, but with no effect.
Is there any support for framebuffer rotation?
Finally I got it working by rotating Weston interface. Transform option didn't work for me previously.
The problem was in wrong KMS connector name in the weston.ini.
Connector name is listed under /sys/class/drm:
root@imx8mmevk:~# ls /sys/class/drm/
card0 card0-DSI-1 version
I was trying to use card0 and card0-DSI-1 as a KMS connector name in the weston.ini. Then I took a look at /var/log/weston.log and found that proper name is DSI-1.
[05:55:41.223] DRM: head 'DSI-1' found, connector 33 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[05:55:41.223] Registered plugin API 'weston_drm_output_api_v1' of size 24
[05:55:41.224] Chosen EGL config details:
RGBA bits: 8 8 8 0
swap interval range: 1 - 60
[05:55:41.224] No backlight control for output 'DSI-1'
[05:55:41.224] Output DSI-1 (crtc 31) video modes:
firstname.lastname@example.org, preferred, current, 67.3 MHz
[05:55:41.224] associating input device event0 with output DSI-1 (none by udev)
[05:55:41.224] associating input device event1 with output DSI-1 (none by udev)
[05:55:41.224] associating input device event2 with output DSI-1 (none by udev)
[05:55:41.224] Output 'DSI-1' enabled with head(s) DSI-1
So 'card0' part of name should be omitted.
Rotation works properly for me with following weston.ini:
root@imx8mmevk:~# cat /etc/xdg/weston/weston.ini
# i.MX: Disable idle timeout
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize