kms: Allow setting the "VRR_ENABLED" property on a CRTC
Add functions to update and monitor the value of the "VRR_ENABLED" KMS property. This requires the addition of functions to process CRTC property updates in both the atomic and the simple KMS backends. The implementation is similar to the implemention of processing connector updates. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1154>
This commit is contained in:
@ -362,6 +362,31 @@ add_crtc_property (MetaKmsImplDevice *impl_device,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_crtc_update (MetaKmsImplDevice *impl_device,
|
||||
MetaKmsUpdate *update,
|
||||
drmModeAtomicReq *req,
|
||||
GArray *blob_ids,
|
||||
gpointer update_entry,
|
||||
gpointer user_data,
|
||||
GError **error)
|
||||
{
|
||||
MetaKmsCrtcUpdate *crtc_update = update_entry;
|
||||
MetaKmsCrtc *crtc = crtc_update->crtc;
|
||||
|
||||
if (crtc_update->vrr.has_update)
|
||||
{
|
||||
if (!add_crtc_property (impl_device,
|
||||
crtc, req,
|
||||
META_KMS_CRTC_PROP_VRR_ENABLED,
|
||||
!!crtc_update->vrr.is_enabled,
|
||||
error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_mode_set (MetaKmsImplDevice *impl_device,
|
||||
MetaKmsUpdate *update,
|
||||
@ -1086,6 +1111,16 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
|
||||
&error))
|
||||
goto err;
|
||||
|
||||
if (!process_entries (impl_device,
|
||||
update,
|
||||
req,
|
||||
blob_ids,
|
||||
meta_kms_update_get_crtc_updates (update),
|
||||
NULL,
|
||||
process_crtc_update,
|
||||
&error))
|
||||
goto err;
|
||||
|
||||
if (!process_entries (impl_device,
|
||||
update,
|
||||
req,
|
||||
|
Reference in New Issue
Block a user