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