kms: Don't use kernel thread when headless
We're not doing anything significant in the KMS thread anyway, so don't make it a kernel thread, and don't ask to be real time scheduled (which we wouldn't be anyway, but for clarity). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3805>
This commit is contained in:
parent
6bd2fd6a74
commit
5bca761148
@ -370,6 +370,7 @@ meta_kms_new (MetaBackend *backend,
|
|||||||
MetaKms *kms;
|
MetaKms *kms;
|
||||||
const char *thread_type_string;
|
const char *thread_type_string;
|
||||||
MetaThreadType thread_type = META_THREAD_TYPE_KERNEL;
|
MetaThreadType thread_type = META_THREAD_TYPE_KERNEL;
|
||||||
|
gboolean wants_realtime_scheduling;
|
||||||
|
|
||||||
thread_type_string = g_getenv ("MUTTER_DEBUG_KMS_THREAD_TYPE");
|
thread_type_string = g_getenv ("MUTTER_DEBUG_KMS_THREAD_TYPE");
|
||||||
if (thread_type_string)
|
if (thread_type_string)
|
||||||
@ -382,12 +383,16 @@ meta_kms_new (MetaBackend *backend,
|
|||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wants_realtime_scheduling = !(flags & META_KMS_FLAG_NO_MODE_SETTING);
|
||||||
|
if (flags & META_KMS_FLAG_NO_MODE_SETTING)
|
||||||
|
thread_type = META_THREAD_TYPE_USER;
|
||||||
|
|
||||||
kms = g_initable_new (META_TYPE_KMS,
|
kms = g_initable_new (META_TYPE_KMS,
|
||||||
NULL, error,
|
NULL, error,
|
||||||
"backend", backend,
|
"backend", backend,
|
||||||
"name", "KMS thread",
|
"name", "KMS thread",
|
||||||
"thread-type", thread_type,
|
"thread-type", thread_type,
|
||||||
"wants-realtime", TRUE,
|
"wants-realtime", wants_realtime_scheduling,
|
||||||
NULL);
|
NULL);
|
||||||
kms->flags = flags;
|
kms->flags = flags;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user