[mutter] kms-update: Add function meta_kms_update_set_max_bpc
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms-update: Add function meta_kms_update_set_max_bpc
- Date: Fri, 19 Aug 2022 19:31:11 +0000 (UTC)
commit 2b561a369ca57e68625973ac83bb56460b35665d
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Fri May 13 16:26:10 2022 +0800
kms-update: Add function meta_kms_update_set_max_bpc
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2412>
src/backends/native/meta-kms-update-private.h | 5 +++++
src/backends/native/meta-kms-update.c | 14 ++++++++++++++
src/backends/native/meta-kms-update.h | 4 ++++
3 files changed, 23 insertions(+)
---
diff --git a/src/backends/native/meta-kms-update-private.h b/src/backends/native/meta-kms-update-private.h
index 9dab7c133c..3a648ba0da 100644
--- a/src/backends/native/meta-kms-update-private.h
+++ b/src/backends/native/meta-kms-update-private.h
@@ -82,6 +82,11 @@ typedef struct _MetaKmsConnectorUpdate
gboolean has_update;
gboolean is_enabled;
} privacy_screen;
+
+ struct {
+ gboolean has_update;
+ uint64_t value;
+ } max_bpc;
} MetaKmsConnectorUpdate;
typedef struct _MetaKmsPageFlipListener
diff --git a/src/backends/native/meta-kms-update.c b/src/backends/native/meta-kms-update.c
index 042714d0aa..4c34000ef5 100644
--- a/src/backends/native/meta-kms-update.c
+++ b/src/backends/native/meta-kms-update.c
@@ -356,6 +356,20 @@ meta_kms_update_set_privacy_screen (MetaKmsUpdate *update,
connector_update->privacy_screen.is_enabled = enabled;
}
+void
+meta_kms_update_set_max_bpc (MetaKmsUpdate *update,
+ MetaKmsConnector *connector,
+ uint64_t max_bpc)
+{
+ MetaKmsConnectorUpdate *connector_update;
+
+ g_assert (meta_kms_connector_get_device (connector) == update->device);
+
+ connector_update = ensure_connector_update (update, connector);
+ connector_update->max_bpc.value = max_bpc;
+ connector_update->max_bpc.has_update = TRUE;
+}
+
void
meta_kms_crtc_gamma_free (MetaKmsCrtcGamma *gamma)
{
diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h
index f31e36aad3..d5557d7ced 100644
--- a/src/backends/native/meta-kms-update.h
+++ b/src/backends/native/meta-kms-update.h
@@ -107,6 +107,10 @@ void meta_kms_update_set_privacy_screen (MetaKmsUpdate *update,
MetaKmsConnector *connector,
gboolean enabled);
+void meta_kms_update_set_max_bpc (MetaKmsUpdate *update,
+ MetaKmsConnector *connector,
+ uint64_t max_bpc);
+
META_EXPORT_TEST
void meta_kms_update_set_power_save (MetaKmsUpdate *update);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]