From 3988f5a47fdff05aa71d92a1741ab3cad725b375 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 15 Mar 2023 13:28:52 +0100 Subject: [PATCH] backends: Fall back to the default and not the unknown color space The unknown color space's only purpose is to signal that the current KMS state has a unknown color space set. It is not one of the color spaces that can be set. We already only try to set a color space if the default color space is supported so we should use the default color space as a fallback instead of the unknown color space. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2693 Part-of: --- src/backends/meta-monitor-manager.c | 4 ++-- src/backends/meta-output.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c index 28cc457e7..bd02c55bb 100644 --- a/src/backends/meta-monitor-manager.c +++ b/src/backends/meta-monitor-manager.c @@ -520,7 +520,7 @@ ensure_hdr_settings (MetaMonitorManager *manager) meta_monitor_get_display_name (monitor), error->message); meta_monitor_set_color_space (monitor, - META_OUTPUT_COLORSPACE_UNKNOWN, + META_OUTPUT_COLORSPACE_DEFAULT, NULL); continue; @@ -535,7 +535,7 @@ ensure_hdr_settings (MetaMonitorManager *manager) meta_monitor_get_display_name (monitor), error->message); meta_monitor_set_color_space (monitor, - META_OUTPUT_COLORSPACE_UNKNOWN, + META_OUTPUT_COLORSPACE_DEFAULT, NULL); meta_monitor_set_hdr_metadata (monitor, &(MetaOutputHdrMetadata) { .active = FALSE, diff --git a/src/backends/meta-output.c b/src/backends/meta-output.c index b81608a0f..efa279aa3 100644 --- a/src/backends/meta-output.c +++ b/src/backends/meta-output.c @@ -626,7 +626,7 @@ meta_output_init (MetaOutput *output) MetaOutputPrivate *priv = meta_output_get_instance_private (output); priv->backlight = -1; - priv->color_space = META_OUTPUT_COLORSPACE_UNKNOWN; + priv->color_space = META_OUTPUT_COLORSPACE_DEFAULT; priv->hdr_metadata.active = FALSE; }