From fb7b9b0955fff03080672bd3c901ca8314e9ea47 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 23 Jan 2024 21:47:30 +0100 Subject: [PATCH] onscreen/native: Disable the CRTC LUT when we have no LUT to set The KmsImplDevice supports bypassing the hardware LUT when we pass in NULL or an empty LUT. Part-of: --- src/backends/native/meta-onscreen-native.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index b8d8d2808..bc3a41c02 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -1694,18 +1694,13 @@ meta_onscreen_native_prepare_frame (CoglOnscreen *onscreen, if (onscreen_native->is_gamma_lut_invalid) { const MetaGammaLut *gamma; + MetaKmsUpdate *kms_update; + + kms_update = meta_frame_native_ensure_kms_update (frame_native, + kms_device); gamma = meta_crtc_kms_peek_gamma_lut (crtc_kms); - if (gamma) - { - MetaKmsUpdate *kms_update; - - kms_update = meta_frame_native_ensure_kms_update (frame_native, - kms_device); - meta_kms_update_set_crtc_gamma (kms_update, - kms_crtc, - gamma); - } + meta_kms_update_set_crtc_gamma (kms_update, kms_crtc, gamma); } if (onscreen_native->is_privacy_screen_invalid)