From 9abce2fca7d7105d50b9471e1b179c6610c6a9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 1 Feb 2023 10:07:53 +0100 Subject: gpu/kms: Report that we can have outputs if we have connectors As part of https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/525 (introduction of transactional KMS API), the logic determining whether a GPU can have outputs was changed from whether any connectors existed to whether any connected connectors existed. That effectively meant that we wouldn't attempt to start at all if there were no monitors connected while starting up. This was unintentional, so lets revert back the expected behavior. Part-of: --- src/backends/native/meta-gpu-kms.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c index 84ea6baa2..7d46955a3 100644 --- a/src/backends/native/meta-gpu-kms.c +++ b/src/backends/native/meta-gpu-kms.c @@ -364,18 +364,7 @@ meta_gpu_kms_read_current (MetaGpu *gpu, gboolean meta_gpu_kms_can_have_outputs (MetaGpuKms *gpu_kms) { - GList *l; - int n_connected_connectors = 0; - - for (l = meta_kms_device_get_connectors (gpu_kms->kms_device); l; l = l->next) - { - MetaKmsConnector *kms_connector = l->data; - - if (meta_kms_connector_get_current_state (kms_connector)) - n_connected_connectors++; - } - - return n_connected_connectors > 0; + return !!meta_kms_device_get_connectors (gpu_kms->kms_device); } MetaGpuKms * -- cgit v1.2.1