|
|
835957 |
From cd8b90a7a7185c3f177469d1a37654a9e8539cd1 Mon Sep 17 00:00:00 2001
|
|
|
835957 |
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
|
835957 |
Date: Thu, 29 Sep 2022 14:23:55 +0200
|
|
|
835957 |
Subject: [PATCH 2/2] output/kms: Don't attemp to add common modes on
|
|
|
835957 |
connectors without modes
|
|
|
835957 |
|
|
|
835957 |
We have no way to sanely add safe modes if there are no modes we can
|
|
|
835957 |
compare with, thus don't try.
|
|
|
835957 |
|
|
|
835957 |
Fixes the following crash:
|
|
|
835957 |
|
|
|
835957 |
#0 are_all_modes_equally_sized at ../src/backends/native/meta-output-kms.c:284
|
|
|
835957 |
#1 maybe_add_fallback_modes at ../src/backends/native/meta-output-kms.c:310
|
|
|
835957 |
#2 init_output_modes at ../src/backends/native/meta-output-kms.c:347
|
|
|
835957 |
#3 meta_output_kms_new at ../src/backends/native/meta-output-kms.c:414
|
|
|
835957 |
#4 init_outputs at ../src/backends/native/meta-gpu-kms.c:332
|
|
|
835957 |
#5 meta_gpu_kms_read_current at ../src/backends/native/meta-gpu-kms.c:368
|
|
|
835957 |
#6 meta_gpu_kms_new at ../src/backends/native/meta-gpu-kms.c:403
|
|
|
835957 |
#7 create_gpu_from_udev_device at ../src/backends/native/meta-backend-native.c:461
|
|
|
835957 |
#8 init_gpus at ../src/backends/native/meta-backend-native.c:551
|
|
|
835957 |
#9 meta_backend_native_initable_init at ../src/backends/native/meta-backend-native.c:632
|
|
|
835957 |
|
|
|
835957 |
Fixes: 877cc3eb7d44e2886395151f763ec09bea350444
|
|
|
835957 |
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2127801
|
|
|
835957 |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2646>
|
|
|
835957 |
(cherry picked from commit 2c8adb19660cb2cd53381372833e088962437d3b)
|
|
|
835957 |
---
|
|
|
835957 |
src/backends/native/meta-output-kms.c | 3 +++
|
|
|
835957 |
1 file changed, 3 insertions(+)
|
|
|
835957 |
|
|
|
835957 |
diff --git a/src/backends/native/meta-output-kms.c b/src/backends/native/meta-output-kms.c
|
|
|
835957 |
index 9adc20bfd9..058ab7c053 100644
|
|
|
835957 |
--- a/src/backends/native/meta-output-kms.c
|
|
|
835957 |
+++ b/src/backends/native/meta-output-kms.c
|
|
|
835957 |
@@ -250,6 +250,9 @@ maybe_add_fallback_modes (const MetaKmsConnectorState *connector_state,
|
|
|
835957 |
MetaGpuKms *gpu_kms,
|
|
|
835957 |
MetaKmsConnector *kms_connector)
|
|
|
835957 |
{
|
|
|
835957 |
+ if (!connector_state->modes)
|
|
|
835957 |
+ return;
|
|
|
835957 |
+
|
|
|
835957 |
if (!connector_state->has_scaling)
|
|
|
835957 |
return;
|
|
|
835957 |
|
|
|
835957 |
--
|
|
|
835957 |
2.37.1
|
|
|
835957 |
|