summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/modules
diff options
context:
space:
mode:
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>2018-10-02 08:44:04 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 14:20:51 -0500
commitd76e393f4cef8151c0a2178b6abeacecb9da4875 (patch)
tree97cc0de197d3c056e4bcf2e56847771f442b08af /drivers/gpu/drm/amd/display/modules
parentfa44604cca2a653ca66f344062db729c8167434b (diff)
downloadlinux-d76e393f4cef8151c0a2178b6abeacecb9da4875.tar.gz
linux-d76e393f4cef8151c0a2178b6abeacecb9da4875.tar.bz2
linux-d76e393f4cef8151c0a2178b6abeacecb9da4875.zip
drm/amd/display: Fix incorrect end slope of EETF
Force the E2 to dc_fixpt_one when E1 exceeds that value. This is the correct thing to do to avoid corruption. Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com> Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules')
-rw-r--r--drivers/gpu/drm/amd/display/modules/color/color_gamma.c3
1 files changed, 2 insertions, 1 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 2e215c9e5445..bba518684243 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -789,7 +789,8 @@ static void hermite_spline_eetf(struct fixed31_32 input_x,
// (t^3 - 2t^2 + t) * (1-ks)
E2 = dc_fixpt_add(E2, dc_fixpt_mul(temp2,
dc_fixpt_add(t, dc_fixpt_sub(t3, temp1))));
- }
+ } else
+ E2 = dc_fixpt_one;
temp1 = dc_fixpt_sub(dc_fixpt_one, E2);
temp2 = dc_fixpt_mul(temp1, temp1);