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