Skip to content

Dynamic output orientation

Marius Vlad requested to merge mvlad/weston:dyn-rotation-iiodevice into main

This is a follow-up work done by @linkmauve started quite a while back at [1].

The protocol has a few changes most noticeable being that it allows users to use the cmdline to change the output besides using an IIO device. The design mostly follows that of [1], the implementation being a weston plug-in, as the IIO API doesn't have any poll reading mechanism, such that the compositor will spawn the client to handle reading out data.

The IIO device reading sampling rate and channel names are there as well. Some further filtering might be necessary to smooth out rapid changes of the sensors/device and causes spurious orientation changes. Added now an additional 'cumulative_reads' reads which is used to control how many reads should be taken. From there, it allows to retrieve the highest occurrance of the transform value, and passed on as the 'proposed'/new transform value. Useful when the sampling rate is quite high.

I've tested it using an lsm6dsox IMU which contains multiple IIO devices, among the accelerometer required here.

Supports desktop-shell and kiosk-shell. kiosk-shell patch shows that bits/pieces be needed to add rotator support in other shells.

/cc @afrantzis there's a small patch wrt configured fullscreen state which you've introduced a while back /cc @linkmauve

[1] https://lists.freedesktop.org/archives/wayland-devel/2016-August/030396.html

Edited by Marius Vlad

Merge request reports

Loading