Blame SOURCES/0001-gpu-kms-Report-that-we-can-have-outputs-if-we-have-c.patch

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