kms/update: Stop tracking update sequence numbers

They were only used for logging, and complicates things when updates can
be merged. Since they aren't really useful, just remove it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854>
This commit is contained in:
Jonas Ådahl 2021-06-17 21:11:44 +02:00 committed by Marge Bot
parent 8c4ebdc446
commit 3e3611d171
4 changed files with 3 additions and 19 deletions

View File

@ -947,9 +947,7 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
blob_ids = g_array_new (FALSE, TRUE, sizeof (uint32_t)); blob_ids = g_array_new (FALSE, TRUE, sizeof (uint32_t));
meta_topic (META_DEBUG_KMS, meta_topic (META_DEBUG_KMS, "[atomic] Processing update");
"[atomic] Processing update %" G_GUINT64_FORMAT,
meta_kms_update_get_sequence_number (update));
req = drmModeAtomicAlloc (); req = drmModeAtomicAlloc ();
if (!req) if (!req)
@ -1018,8 +1016,7 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
commit_flags |= DRM_MODE_ATOMIC_TEST_ONLY; commit_flags |= DRM_MODE_ATOMIC_TEST_ONLY;
meta_topic (META_DEBUG_KMS, meta_topic (META_DEBUG_KMS,
"[atomic] Committing update %" G_GUINT64_FORMAT ", flags: %s", "[atomic] Committing update flags: %s",
meta_kms_update_get_sequence_number (update),
commit_flags_string (commit_flags)); commit_flags_string (commit_flags));
fd = meta_kms_impl_device_get_fd (impl_device); fd = meta_kms_impl_device_get_fd (impl_device);

View File

@ -1504,9 +1504,7 @@ meta_kms_impl_device_simple_process_update (MetaKmsImplDevice *impl_device,
GError *error = NULL; GError *error = NULL;
GList *failed_planes = NULL; GList *failed_planes = NULL;
meta_topic (META_DEBUG_KMS, meta_topic (META_DEBUG_KMS, "[simple] Processing update");
"[simple] Processing update %" G_GUINT64_FORMAT,
meta_kms_update_get_sequence_number (update));
if (flags & META_KMS_UPDATE_FLAG_TEST_ONLY) if (flags & META_KMS_UPDATE_FLAG_TEST_ONLY)
return perform_update_test (impl_device, update); return perform_update_test (impl_device, update);

View File

@ -143,8 +143,6 @@ void meta_kms_update_unlock (MetaKmsUpdate *update);
META_EXPORT_TEST META_EXPORT_TEST
gboolean meta_kms_update_is_locked (MetaKmsUpdate *update); gboolean meta_kms_update_is_locked (MetaKmsUpdate *update);
uint64_t meta_kms_update_get_sequence_number (MetaKmsUpdate *update);
META_EXPORT_TEST META_EXPORT_TEST
MetaKmsDevice * meta_kms_update_get_device (MetaKmsUpdate *update); MetaKmsDevice * meta_kms_update_get_device (MetaKmsUpdate *update);

View File

@ -33,7 +33,6 @@ struct _MetaKmsUpdate
MetaKmsDevice *device; MetaKmsDevice *device;
gboolean is_locked; gboolean is_locked;
uint64_t sequence_number;
GList *mode_sets; GList *mode_sets;
GList *plane_assignments; GList *plane_assignments;
@ -672,21 +671,13 @@ meta_kms_custom_page_flip_free (MetaKmsCustomPageFlip *custom_page_flip)
g_free (custom_page_flip); g_free (custom_page_flip);
} }
uint64_t
meta_kms_update_get_sequence_number (MetaKmsUpdate *update)
{
return update->sequence_number;
}
MetaKmsUpdate * MetaKmsUpdate *
meta_kms_update_new (MetaKmsDevice *device) meta_kms_update_new (MetaKmsDevice *device)
{ {
MetaKmsUpdate *update; MetaKmsUpdate *update;
static uint64_t sequence_number = 0;
update = g_new0 (MetaKmsUpdate, 1); update = g_new0 (MetaKmsUpdate, 1);
update->device = device; update->device = device;
update->sequence_number = sequence_number++;
return update; return update;
} }