wayland/drm-lease: Hold device fd when listing leases
In multi-GPU setups, when one of the GPUs is used to render the desktop and the other one has all of their devices available for lease, meta_kms_impl_device_list_lessees() can be called after the device fd has been unhold. Make sure to hold and unhold it in this function. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4030>
This commit is contained in:
parent
c2273784ce
commit
45bf41bf94
@ -440,7 +440,12 @@ meta_kms_impl_device_list_lessees (MetaKmsImplDevice *impl_device,
|
|||||||
|
|
||||||
meta_assert_in_kms_impl (meta_kms_impl_get_kms (priv->impl));
|
meta_assert_in_kms_impl (meta_kms_impl_get_kms (priv->impl));
|
||||||
|
|
||||||
|
if (!ensure_device_file (impl_device, error))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
meta_kms_impl_device_hold_fd (impl_device);
|
||||||
list = drmModeListLessees (meta_kms_impl_device_get_fd (impl_device));
|
list = drmModeListLessees (meta_kms_impl_device_get_fd (impl_device));
|
||||||
|
meta_kms_impl_device_unhold_fd (impl_device);
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user