kms/impl-device: Only update crtc/connector whose ID has changed

On hotplug events we may get informations about what CRTC or connector
changed a property (and the property itself), so in such case let's just
ignore the changes to the non-affected CRTCs/connectors, and let's read
only the affected one

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1964>
This commit is contained in:
Marco Trevisan (Treviño)
2020-08-04 19:28:04 +02:00
committed by Marge Bot
parent 91ed95ab6f
commit dd0ad3bfb1
5 changed files with 36 additions and 9 deletions

View File

@ -231,7 +231,9 @@ meta_kms_device_get_fallback_modes (MetaKmsDevice *device)
}
MetaKmsUpdateChanges
meta_kms_device_update_states_in_impl (MetaKmsDevice *device)
meta_kms_device_update_states_in_impl (MetaKmsDevice *device,
uint32_t crtc_id,
uint32_t connector_id)
{
MetaKmsImplDevice *impl_device = meta_kms_device_get_impl_device (device);
MetaKmsUpdateChanges changes;
@ -239,7 +241,8 @@ meta_kms_device_update_states_in_impl (MetaKmsDevice *device)
meta_assert_in_kms_impl (device->kms);
meta_assert_is_waiting_for_kms_impl_task (device->kms);
changes = meta_kms_impl_device_update_states (impl_device);
changes = meta_kms_impl_device_update_states (impl_device, crtc_id,
connector_id);
if (changes == META_KMS_UPDATE_CHANGE_NONE)
return changes;