kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0002-gpu-kms-Reset-CRTC-mode-and-output-list-if-no-resour.patch

99364f
From a192b9abd77aa14ae794850e41d210472f86b9b0 Mon Sep 17 00:00:00 2001
99364f
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
99364f
Date: Thu, 25 Jun 2020 10:09:48 +0200
99364f
Subject: [PATCH 2/2] gpu-kms: Reset CRTC, mode and output list if no resources
99364f
99364f
On device removal, the next resource retrieval will fail; handle this by
99364f
just clearing the CRTC, mode and outputs.
99364f
---
99364f
 src/backends/native/meta-gpu-kms.c | 3 +++
99364f
 1 file changed, 3 insertions(+)
99364f
99364f
diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c
99364f
index 93e509def5..dc93abb7b1 100644
99364f
--- a/src/backends/native/meta-gpu-kms.c
99364f
+++ b/src/backends/native/meta-gpu-kms.c
99364f
@@ -871,6 +871,9 @@ meta_gpu_kms_read_current (MetaGpu  *gpu,
99364f
                      local_error->message);
99364f
           gpu_kms->resources_init_failed_before = TRUE;
99364f
         }
99364f
+      meta_gpu_take_outputs (gpu, NULL);
99364f
+      meta_gpu_take_modes (gpu, NULL);
99364f
+      meta_gpu_take_crtcs (gpu, NULL);
99364f
       return TRUE;
99364f
     }
99364f
 
99364f
-- 
99364f
2.26.2
99364f