DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT needs to be set before calling init_planes(...)
Affected version
- Fedora Rawhide with kernel 6.8
- Mutter 46
- Wayland
Bug summary
At meta-kms-impl-device-atomic.c:1418
drmSetClientCap(..., DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1)
is called after meta_kms_impl_device_init_mode_setting(...)
which in turn calls init_planes(...)
which reads the plane properties and caches them. Because DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT
is not set when init_planes(...)
is called the cursor hotspot properties are hidden by the kernel. Later when support for cursor hotspot is checked the cached plane properties do not have hotspots as expected causing atomic KMS to not be used.
Solution: move drmSetClientCap (..., DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT, 1)
into meta_kms_impl_device_atomic_open_device_file(...)
Steps to reproduce
Force atomic KMS on a virtualized driver.
What happened
Atomic KMS is not used.
What did you expect to happen
Atomic KMS to be used.
Relevant logs, screenshots, screencasts etc.
Mar 07 11:54:55 fedora gnome-shell[1358]: Failed to open gpu '/dev/dri/card0': Plane cursor with hotspot properties is missing on vmwgfx