diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h index 479c5f8352f9..821d4f260764 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h @@ -453,7 +453,11 @@ struct dc_gamma { /* private to DC core */ struct dc_context *ctx; + /* is_identity is used for RGB256 gamma identity which can also be programmed in INPUT_LUT. + * is_logical_identity indicates the given gamma ramp regardless of type is identity. + */ bool is_identity; + bool is_logical_identity; }; /* Used by both ipp amd opp functions*/ diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c index 8601d371776e..3f413fb9f2ce 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1569,7 +1569,8 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf, output_tf->tf == TRANSFER_FUNCTION_SRGB) { if (ramp == NULL) return true; - if (ramp->is_identity || (!mapUserRamp && ramp->type == GAMMA_RGB_256)) + if ((ramp->is_logical_identity) || + (!mapUserRamp && ramp->type == GAMMA_RGB_256)) return true; }