Blame SOURCES/0001-native-gpu-Handle-drmModeSetCrtc-failing-gracefully.patch

776610
From 44682a2cc5550ae2d51f606f800405a05b72a240 Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Tue, 24 Apr 2018 09:26:33 +0000
776610
Subject: [PATCH] native/gpu: Handle drmModeSetCrtc() failing gracefully
776610
776610
If drmModeSetCrtc() is called with no fb, mode or connectors for some
776610
CRTC it may still fail, and we should handle that gracefully instead of
776610
assuming it failed to set a non-disabled state.
776610
776610
Closes https://gitlab.gnome.org/GNOME/mutter/issues/70
776610
776610
776610
(cherry picked from commit 6e953e2725d5d5b10d14c7bd479bd99f6853addc)
776610
---
776610
 src/backends/native/meta-gpu-kms.c | 5 ++++-
776610
 1 file changed, 4 insertions(+), 1 deletion(-)
776610
776610
diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c
776610
index 259cd7122..1d1c28809 100644
776610
--- a/src/backends/native/meta-gpu-kms.c
776610
+++ b/src/backends/native/meta-gpu-kms.c
776610
@@ -143,7 +143,10 @@ meta_gpu_kms_apply_crtc_mode (MetaGpuKms *gpu_kms,
776610
                       connectors, n_connectors,
776610
                       mode) != 0)
776610
     {
776610
-      g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
776610
+      if (mode)
776610
+        g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
776610
+      else
776610
+        g_warning ("Failed to disable CRTC");
776610
       g_free (connectors);
776610
       return FALSE;
776610
     }
776610
-- 
776610
2.19.0
776610