aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVitaly Prosyak <vitaly.prosyak@amd.com>2018-02-28 11:44:54 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-03-14 16:08:48 -0400
commit9eee21376b62bba656533438d2a9f0d966d4e487 (patch)
tree9bdd612cfbc02d5296c1d01378dab89216241fd0 /drivers/gpu
parent3f7194bce26ed39055439ebcf608fab43e846f2e (diff)
drm/amd/display: Fix handling of linear transfer function
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/modules/color/color_gamma.c6
1 files changed, 4 insertions, 2 deletions
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 57d5c2575de1..e7e374f56864 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,
1267 bool ret = false; 1267 bool ret = false;
1268 struct pwl_float_data_ex *rgb_regamma = NULL; 1268 struct pwl_float_data_ex *rgb_regamma = NULL;
1269 1269
1270 if (trans == TRANSFER_FUNCTION_UNITY) { 1270 if (trans == TRANSFER_FUNCTION_UNITY ||
1271 trans == TRANSFER_FUNCTION_LINEAR) {
1271 points->end_exponent = 0; 1272 points->end_exponent = 0;
1272 points->x_point_at_y1_red = 1; 1273 points->x_point_at_y1_red = 1;
1273 points->x_point_at_y1_green = 1; 1274 points->x_point_at_y1_green = 1;
@@ -1337,7 +1338,8 @@ bool mod_color_calculate_degamma_curve(enum dc_transfer_func_predefined trans,
1337 bool ret = false; 1338 bool ret = false;
1338 struct pwl_float_data_ex *rgb_degamma = NULL; 1339 struct pwl_float_data_ex *rgb_degamma = NULL;
1339 1340
1340 if (trans == TRANSFER_FUNCTION_UNITY) { 1341 if (trans == TRANSFER_FUNCTION_UNITY ||
1342 trans == TRANSFER_FUNCTION_LINEAR) {
1341 1343
1342 for (i = 0; i <= MAX_HW_POINTS ; i++) { 1344 for (i = 0; i <= MAX_HW_POINTS ; i++) {
1343 points->red[i] = coordinates_x[i].x; 1345 points->red[i] = coordinates_x[i].x;