From: Vitaly Prosyak Date: Wed, 28 Feb 2018 16:44:54 +0000 (-0600) Subject: drm/amd/display: Fix handling of linear transfer function X-Git-Tag: v4.19~1144^2~21^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eee21376b62bba656533438d2a9f0d966d4e487;p=platform%2Fkernel%2Flinux-rpi3.git drm/amd/display: Fix handling of linear transfer function Signed-off-by: Vitaly Prosyak Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- 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 57d5c25..e7e374f 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1267,7 +1267,8 @@ bool mod_color_calculate_curve(enum dc_transfer_func_predefined trans, bool ret = false; struct pwl_float_data_ex *rgb_regamma = NULL; - if (trans == TRANSFER_FUNCTION_UNITY) { + if (trans == TRANSFER_FUNCTION_UNITY || + trans == TRANSFER_FUNCTION_LINEAR) { points->end_exponent = 0; points->x_point_at_y1_red = 1; points->x_point_at_y1_green = 1; @@ -1337,7 +1338,8 @@ bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans, bool ret = false; struct pwl_float_data_ex *rgb_degamma = NULL; - if (trans == TRANSFER_FUNCTION_UNITY) { + if (trans == TRANSFER_FUNCTION_UNITY || + trans == TRANSFER_FUNCTION_LINEAR) { for (i = 0; i <= MAX_HW_POINTS ; i++) { points->red[i] = coordinates_x[i].x;