summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2018-04-24 09:26:33 +0000
committerRay Strode <rstrode@redhat.com>2019-01-14 10:06:45 -0500
commit910c4e9fe7e9822f0a4d2ac36044c16e490425a6 (patch)
treee0414490a04fd7cac8867d93273cfab29dd36a27
parent2fb5b65e94c2f8748267a0a50fd8ee667cb467e1 (diff)
downloadmutter-910c4e9fe7e9822f0a4d2ac36044c16e490425a6.tar.gz
native/gpu: Handle drmModeSetCrtc() failing gracefully
If drmModeSetCrtc() is called with no fb, mode or connectors for some CRTC it may still fail, and we should handle that gracefully instead of assuming it failed to set a non-disabled state. Closes https://gitlab.gnome.org/GNOME/mutter/issues/70 (cherry picked from commit 6e953e2725d5d5b10d14c7bd479bd99f6853addc)
-rw-r--r--src/backends/native/meta-gpu-kms.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c
index 613a60705..c4a6fb051 100644
--- a/src/backends/native/meta-gpu-kms.c
+++ b/src/backends/native/meta-gpu-kms.c
@@ -143,7 +143,10 @@ meta_gpu_kms_apply_crtc_mode (MetaGpuKms *gpu_kms,
connectors, n_connectors,
mode) != 0)
{
- g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
+ if (mode)
+ g_warning ("Failed to set CRTC mode %s: %m", crtc->current_mode->name);
+ else
+ g_warning ("Failed to disable CRTC");
g_free (connectors);
return FALSE;
}