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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3552>
This commit is contained in:
Sebastian Wick 2024-01-23 21:47:30 +01:00 committed by Marge Bot
parent eb8a12c24b
commit fb7b9b0955

View File

@ -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)