mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
gpu/kms: Allow checking if VRR should be disabled
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154>
This commit is contained in:
parent
b2ceb055d6
commit
9fcc938075
@ -132,6 +132,23 @@ meta_gpu_kms_is_platform_device (MetaGpuKms *gpu_kms)
|
||||
return !!(flags & META_KMS_DEVICE_FLAG_PLATFORM_DEVICE);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_gpu_kms_disable_vrr (MetaGpuKms *gpu_kms)
|
||||
{
|
||||
MetaGpu *gpu = META_GPU (gpu_kms);
|
||||
MetaBackend *backend = meta_gpu_get_backend (gpu);
|
||||
MetaSettings *settings = meta_backend_get_settings (backend);
|
||||
MetaKmsDeviceFlag flags;
|
||||
|
||||
if (!meta_settings_is_experimental_feature_enabled (
|
||||
settings,
|
||||
META_EXPERIMENTAL_FEATURE_VARIABLE_REFRESH_RATE))
|
||||
return TRUE;
|
||||
|
||||
flags = meta_kms_device_get_flags (gpu_kms->kms_device);
|
||||
return !!(flags & META_KMS_DEVICE_FLAG_DISABLE_VRR);
|
||||
}
|
||||
|
||||
static int
|
||||
compare_outputs (gconstpointer one,
|
||||
gconstpointer two)
|
||||
|
@ -44,6 +44,7 @@ gboolean meta_gpu_kms_is_crtc_active (MetaGpuKms *gpu_kms,
|
||||
|
||||
gboolean meta_gpu_kms_is_boot_vga (MetaGpuKms *gpu_kms);
|
||||
gboolean meta_gpu_kms_is_platform_device (MetaGpuKms *gpu_kms);
|
||||
gboolean meta_gpu_kms_disable_vrr (MetaGpuKms *gpu_kms);
|
||||
|
||||
MetaKmsDevice * meta_gpu_kms_get_kms_device (MetaGpuKms *gpu_kms);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user