kms/impl-device: Use priv->path in _open_non_privileged_fd
This can work even if priv->device_file == NULL, e.g. with a secondary GPU with no displays connected. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3833>
This commit is contained in:
parent
4eacf97678
commit
eb8c2f600a
@ -1211,10 +1211,7 @@ meta_kms_impl_device_open_non_privileged_fd (MetaKmsImplDevice *impl_device)
|
|||||||
MetaKmsImplDevicePrivate *priv =
|
MetaKmsImplDevicePrivate *priv =
|
||||||
meta_kms_impl_device_get_instance_private (impl_device);
|
meta_kms_impl_device_get_instance_private (impl_device);
|
||||||
|
|
||||||
if (!priv->device_file)
|
path = priv->path;
|
||||||
return -1;
|
|
||||||
|
|
||||||
path = meta_device_file_get_path (priv->device_file);
|
|
||||||
|
|
||||||
fd = open (path, O_RDWR | O_CLOEXEC);
|
fd = open (path, O_RDWR | O_CLOEXEC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user