backends/native: Add support to disable VRR using udev
This can be used to disable VRR in specific drivers and hardware combinations where it is found to be problematic. No default rules are added for now to encourage testing. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154>
This commit is contained in:
parent
e72baac97d
commit
b2ceb055d6
@ -537,6 +537,9 @@ add_drm_device (MetaBackendNative *backend_native,
|
||||
if (meta_is_udev_device_disable_modifiers (device))
|
||||
flags |= META_KMS_DEVICE_FLAG_DISABLE_MODIFIERS;
|
||||
|
||||
if (meta_is_udev_device_disable_vrr (device))
|
||||
flags |= META_KMS_DEVICE_FLAG_DISABLE_VRR;
|
||||
|
||||
if (meta_is_udev_device_preferred_primary (device))
|
||||
flags |= META_KMS_DEVICE_FLAG_PREFERRED_PRIMARY;
|
||||
|
||||
|
@ -63,6 +63,7 @@ typedef enum _MetaKmsDeviceFlag
|
||||
META_KMS_DEVICE_FLAG_HAS_ADDFB2 = 1 << 5,
|
||||
META_KMS_DEVICE_FLAG_FORCE_LEGACY = 1 << 6,
|
||||
META_KMS_DEVICE_FLAG_DISABLE_CLIENT_MODIFIERS = 1 << 7,
|
||||
META_KMS_DEVICE_FLAG_DISABLE_VRR = 1 << 8,
|
||||
} MetaKmsDeviceFlag;
|
||||
|
||||
typedef enum _MetaKmsResourceChanges
|
||||
|
@ -100,6 +100,13 @@ meta_is_udev_device_disable_modifiers (GUdevDevice *device)
|
||||
"mutter-device-disable-kms-modifiers");
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_is_udev_device_disable_vrr (GUdevDevice *device)
|
||||
{
|
||||
return meta_has_udev_device_tag (device,
|
||||
"mutter-device-disable-vrr");
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_is_udev_device_ignore (GUdevDevice *device)
|
||||
{
|
||||
|
@ -32,6 +32,8 @@ gboolean meta_is_udev_device_boot_vga (GUdevDevice *device);
|
||||
|
||||
gboolean meta_is_udev_device_disable_modifiers (GUdevDevice *device);
|
||||
|
||||
gboolean meta_is_udev_device_disable_vrr (GUdevDevice *device);
|
||||
|
||||
gboolean meta_is_udev_device_ignore (GUdevDevice *device);
|
||||
|
||||
gboolean meta_is_udev_test_device (GUdevDevice *device);
|
||||
|
Loading…
Reference in New Issue
Block a user