kms/impl-device: Inhibit deadline timer on vc4 (Raspberry Pi)

vc4's implementation of `drmModeAtomicCommit` seems to require a few
milliseconds advanced notice or else it will miss the frame deadline.
That's too high for our deadline evasion threshold which is measured
in microseconds. Let's stop trying to use deadline timers on vc4 to
avoid this conflict without having to disable atomic KMS.

Suggested-by: Jonas Ådahl <jadahl@gmail.com>
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2953
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3279>
This commit is contained in:
Daniel van Vugt 2023-09-14 17:37:47 +08:00
parent eab5e94862
commit 48c9b638f3

View File

@ -1882,6 +1882,26 @@ get_driver_info (int fd,
return TRUE;
}
static void
maybe_inhibit_deadline_timer (MetaKmsImplDevice *impl_device)
{
MetaKmsImplDevicePrivate *priv =
meta_kms_impl_device_get_instance_private (impl_device);
static const char *deadline_timer_deny_list[] = {
"vc4",
};
int i;
for (i = 0; i < G_N_ELEMENTS (deadline_timer_deny_list); i++)
{
if (g_strcmp0 (deadline_timer_deny_list[i], priv->driver_name) == 0)
{
priv->deadline_timer_inhibited = TRUE;
break;
}
}
}
static gboolean
meta_kms_impl_device_initable_init (GInitable *initable,
GCancellable *cancellable,
@ -1907,6 +1927,8 @@ meta_kms_impl_device_initable_init (GInitable *initable,
priv->driver_description = g_strdup ("Unknown");
}
maybe_inhibit_deadline_timer (impl_device);
priv->crtc_frames =
g_hash_table_new_full (NULL, NULL,
NULL, (GDestroyNotify) crtc_frame_free);