[mutter] kms/crtc: Add function meta_kms_crtc_has_gamma
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms/crtc: Add function meta_kms_crtc_has_gamma
- Date: Tue, 19 Apr 2022 08:28:59 +0000 (UTC)
commit 364572b95c8354ac66674064a8058aa98bc0bbef
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Tue Apr 12 18:34:58 2022 +0800
kms/crtc: Add function meta_kms_crtc_has_gamma
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2360>
src/backends/native/meta-kms-crtc.c | 7 +++++++
src/backends/native/meta-kms-crtc.h | 2 ++
2 files changed, 9 insertions(+)
---
diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c
index 1ae3d8417d..8c2f8d7839 100644
--- a/src/backends/native/meta-kms-crtc.c
+++ b/src/backends/native/meta-kms-crtc.c
@@ -92,6 +92,13 @@ meta_kms_crtc_is_active (MetaKmsCrtc *crtc)
return crtc->current_state.is_active;
}
+
+gboolean
+meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc)
+{
+ return !!meta_kms_crtc_get_prop_id (crtc, META_KMS_CRTC_PROP_GAMMA_LUT);
+}
+
static void
read_gamma_state (MetaKmsCrtc *crtc,
MetaKmsCrtcState *crtc_state,
diff --git a/src/backends/native/meta-kms-crtc.h b/src/backends/native/meta-kms-crtc.h
index 218bec9a15..54801dd96a 100644
--- a/src/backends/native/meta-kms-crtc.h
+++ b/src/backends/native/meta-kms-crtc.h
@@ -71,6 +71,8 @@ uint32_t meta_kms_crtc_get_id (MetaKmsCrtc *crtc);
int meta_kms_crtc_get_idx (MetaKmsCrtc *crtc);
+gboolean meta_kms_crtc_has_gamma (MetaKmsCrtc *crtc);
+
META_EXPORT_TEST
gboolean meta_kms_crtc_is_active (MetaKmsCrtc *crtc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]