From 9d7be405027eeeaf1d41b46cf65f85903dfa6106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 14 Jul 2020 17:03:34 +0200 Subject: [PATCH] monitor-manager-kms: Set gamma on MetaKmsUpdate directly The meta_kms_crtc_* helper didn't do anything more than call another function with the exact same arguments. Part-of: --- src/backends/native/meta-kms-crtc.c | 11 ----------- src/backends/native/meta-kms-crtc.h | 7 ------- src/backends/native/meta-kms-update-private.h | 7 ------- src/backends/native/meta-kms-update.h | 7 +++++++ src/backends/native/meta-monitor-manager-kms.c | 3 +-- 5 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/backends/native/meta-kms-crtc.c b/src/backends/native/meta-kms-crtc.c index c4b71c50e..7de317378 100644 --- a/src/backends/native/meta-kms-crtc.c +++ b/src/backends/native/meta-kms-crtc.c @@ -48,17 +48,6 @@ struct _MetaKmsCrtc G_DEFINE_TYPE (MetaKmsCrtc, meta_kms_crtc, G_TYPE_OBJECT) -void -meta_kms_crtc_set_gamma (MetaKmsCrtc *crtc, - MetaKmsUpdate *update, - int size, - const uint16_t *red, - const uint16_t *green, - const uint16_t *blue) -{ - meta_kms_update_set_crtc_gamma (update, crtc, size, red, green, blue); -} - MetaKmsDevice * meta_kms_crtc_get_device (MetaKmsCrtc *crtc) { diff --git a/src/backends/native/meta-kms-crtc.h b/src/backends/native/meta-kms-crtc.h index fa9938199..824b5eec4 100644 --- a/src/backends/native/meta-kms-crtc.h +++ b/src/backends/native/meta-kms-crtc.h @@ -47,13 +47,6 @@ G_DECLARE_FINAL_TYPE (MetaKmsCrtc, meta_kms_crtc, META, KMS_CRTC, GObject) -void meta_kms_crtc_set_gamma (MetaKmsCrtc *crtc, - MetaKmsUpdate *update, - int size, - const uint16_t *red, - const uint16_t *green, - const uint16_t *blue); - MetaKmsDevice * meta_kms_crtc_get_device (MetaKmsCrtc *crtc); const MetaKmsCrtcState * meta_kms_crtc_get_current_state (MetaKmsCrtc *crtc); diff --git a/src/backends/native/meta-kms-update-private.h b/src/backends/native/meta-kms-update-private.h index c5931003f..8d67b3110 100644 --- a/src/backends/native/meta-kms-update-private.h +++ b/src/backends/native/meta-kms-update-private.h @@ -111,13 +111,6 @@ void meta_kms_update_seal (MetaKmsUpdate *update); gboolean meta_kms_update_is_sealed (MetaKmsUpdate *update); -void meta_kms_update_set_crtc_gamma (MetaKmsUpdate *update, - MetaKmsCrtc *crtc, - int size, - const uint16_t *red, - const uint16_t *green, - const uint16_t *blue); - void meta_kms_plane_assignment_set_rotation (MetaKmsPlaneAssignment *plane_assignment, uint64_t rotation); diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h index fba90a7f7..71fc01271 100644 --- a/src/backends/native/meta-kms-update.h +++ b/src/backends/native/meta-kms-update.h @@ -102,6 +102,13 @@ void meta_kms_update_mode_set (MetaKmsUpdate *update, GList *connectors, MetaKmsMode *mode); +void meta_kms_update_set_crtc_gamma (MetaKmsUpdate *update, + MetaKmsCrtc *crtc, + int size, + const uint16_t *red, + const uint16_t *green, + const uint16_t *blue); + MetaKmsPlaneAssignment * meta_kms_update_assign_plane (MetaKmsUpdate *update, MetaKmsCrtc *crtc, MetaKmsPlane *plane, diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c index 5f953f1cc..aa3c927cb 100644 --- a/src/backends/native/meta-monitor-manager-kms.c +++ b/src/backends/native/meta-monitor-manager-kms.c @@ -429,8 +429,7 @@ meta_monitor_manager_kms_set_crtc_gamma (MetaMonitorManager *manager, kms_update = meta_kms_ensure_pending_update (kms); kms_crtc = meta_crtc_kms_get_kms_crtc (META_CRTC_KMS (crtc)); - meta_kms_crtc_set_gamma (kms_crtc, kms_update, - size, red, green, blue); + meta_kms_update_set_crtc_gamma (kms_update, kms_crtc, size, red, green, blue); kms_feedback = meta_kms_post_pending_update_sync (kms); if (meta_kms_feedback_get_result (kms_feedback) != META_KMS_FEEDBACK_PASSED)