Only Enable Logarithmic Gamma if client caps for advance gamma mode is enabled. Fallback to 10bit gamma in case its not supported. Signed-off-by: Uma Shankar <uma.shankar@xxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_color.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c index cae96fbec1a7..18b51b9cc2aa 100644 --- a/drivers/gpu/drm/i915/display/intel_color.c +++ b/drivers/gpu/drm/i915/display/intel_color.c @@ -1606,13 +1606,17 @@ static u32 icl_gamma_mode(const struct intel_crtc_state *crtc_state) gamma_mode |= POST_CSC_GAMMA_ENABLE; if (!crtc_state->hw.gamma_lut || - crtc_state_is_legacy_gamma(crtc_state)) + crtc_state_is_legacy_gamma(crtc_state)) { gamma_mode |= GAMMA_MODE_MODE_8BIT; - else if (crtc_state->uapi.gamma_mode_type == - GAMMA_MODE_LOGARITHMIC_12BIT) - gamma_mode |= GAMMA_MODE_MODE_12BIT_LOGARITHMIC; - else + } else if (crtc_state->uapi.gamma_mode_type == + GAMMA_MODE_LOGARITHMIC_12BIT) { + if (crtc_state->uapi.advance_gamma_mode_active) + gamma_mode |= GAMMA_MODE_MODE_12BIT_LOGARITHMIC; + else + gamma_mode |= GAMMA_MODE_MODE_10BIT; + } else { gamma_mode |= GAMMA_MODE_MODE_12BIT_MULTI_SEGMENTED; + } return gamma_mode; } -- 2.26.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx