Blame SOURCES/0001-kms-crtc-Add-function-meta_kms_crtc_has_gamma.patch

1e895f
From de3188fcc6863b8a6e3d2443a00cf3b00f6f26ff Mon Sep 17 00:00:00 2001
1e895f
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
1e895f
Date: Tue, 12 Apr 2022 18:34:58 +0800
1e895f
Subject: [PATCH 1/2] kms/crtc: Add function meta_kms_crtc_has_gamma
1e895f
1e895f
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2360>
1e895f
---
1e895f
 src/backends/native/meta-kms-crtc.c | 7 +++++++
1e895f
 src/backends/native/meta-kms-crtc.h | 3 +++
1e895f
 2 files changed, 10 insertions(+)
1e895f
1e895f
diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c
1e895f
index 51d040b44..24f5a2d74 100644
1e895f
--- a/src/backends/native/meta-kms-crtc.c
1e895f
+++ b/src/backends/native/meta-kms-crtc.c
1e895f
@@ -92,6 +92,13 @@ meta_kms_crtc_is_active (MetaKmsCrtc *crtc)
1e895f
   return crtc->current_state.is_active;
1e895f
 }
1e895f
 
1e895f
+
1e895f
+gboolean
1e895f
+meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc)
1e895f
+{
1e895f
+  return !!meta_kms_crtc_get_prop_id (crtc, META_KMS_CRTC_PROP_GAMMA_LUT);
1e895f
+}
1e895f
+
1e895f
 static void
1e895f
 read_gamma_state (MetaKmsCrtc       *crtc,
1e895f
                   MetaKmsImplDevice *impl_device,
1e895f
diff --git a/src/backends/native/meta-kms-crtc.h b/src/backends/native/meta-kms-crtc.h
1e895f
index 406ca3ac1..cbaeaa280 100644
1e895f
--- a/src/backends/native/meta-kms-crtc.h
1e895f
+++ b/src/backends/native/meta-kms-crtc.h
1e895f
@@ -66,6 +66,9 @@ uint32_t meta_kms_crtc_get_id (MetaKmsCrtc *crtc);
1e895f
 
1e895f
 int meta_kms_crtc_get_idx (MetaKmsCrtc *crtc);
1e895f
 
1e895f
+
1e895f
+gboolean meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc);
1e895f
+
1e895f
 gboolean meta_kms_crtc_is_active (MetaKmsCrtc *crtc);
1e895f
 
1e895f
 void meta_kms_crtc_gamma_free (MetaKmsCrtcGamma *gamma);
1e895f
-- 
1e895f
2.35.1
1e895f