kms/impl-device/atomic: Set hotspot cap before initing mode setting

We need to set the drm CAP before we read the KMS resources to make sure
we actually get all resoures the CAP makes visible.

Fixes: 27f798b6d ("kms/impl-device/atomic: Implement mouse cursor hotspots")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3341
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3654>
This commit is contained in:
Sebastian Wick 2024-03-08 17:17:11 +01:00 committed by Marge Bot
parent f21762ea6e
commit 5626004aed

View File

@ -1410,9 +1410,6 @@ meta_kms_impl_device_atomic_initable_init (GInitable *initable,
return FALSE;
}
if (!meta_kms_impl_device_init_mode_setting (impl_device, error))
return FALSE;
if (requires_hotspots (meta_kms_impl_device_get_driver_name (impl_device)))
{
if (drmSetClientCap (meta_kms_impl_device_get_fd (impl_device),
@ -1423,6 +1420,13 @@ meta_kms_impl_device_atomic_initable_init (GInitable *initable,
meta_kms_impl_device_get_driver_name (impl_device));
return FALSE;
}
}
if (!meta_kms_impl_device_init_mode_setting (impl_device, error))
return FALSE;
if (requires_hotspots (meta_kms_impl_device_get_driver_name (impl_device)))
{
if (!has_cursor_hotspot_properties (impl_device))
{
g_set_error (error, META_KMS_ERROR, META_KMS_ERROR_NOT_SUPPORTED,