native: Implement DRM-based crtc rotation

Desktop / GNOME / Mutter - Carlos Garnacho [gnome.org] - 7 January 2016 10:03 UTC

We can know the rotation modes supported by the driver, so export these as our supported modes, and ensure these modes are honored on the CRTC primary plane upon apply_configuration().

It is worth noting however that not all hardware will be capable of supporting all rotation modes (in fact, most of them won't). A driver independent solution should be in place to back up the rotation modes unsupported by the drivers, so this is still a partial solution.

The cursor renderer has also been changed to default to software-based rendering anytime the cursor enters a rotated CRTC. Another solution would be actually rotating the DRM cursor planes, but then it requires applying rotation on these per-CRTC, and actually transforming the pointer position by the output matrix. This brings marginal gains, so we use the "sw" rendered cursor, which will be transformed together with the primary plane.

https://bugzilla.gnome.org/show_bug.cgi?id=745079

efef0c9 native: Implement DRM-based crtc rotation
src/backends/native/meta-cursor-renderer-native.c | 29 +++++
src/backends/native/meta-monitor-manager-kms.c | 145 +++++++++++++++++++++
2 files changed, 174 insertions(+)

Upstream: git.gnome.org


  • Share