summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorAnthony Koo <Anthony.Koo@amd.com>2019-07-12 10:52:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-07 18:58:53 +0200
commit73de2baa5b3c54d6c457c78964615cac1408caf6 (patch)
tree8b795205f8b56531c1604993034cdae8119a7984 /drivers/gpu/drm
parent98ecf758e63fd47b5d0ca67af1d109c817ef64a3 (diff)
downloadlinux-stable-73de2baa5b3c54d6c457c78964615cac1408caf6.tar.gz
linux-stable-73de2baa5b3c54d6c457c78964615cac1408caf6.tar.bz2
linux-stable-73de2baa5b3c54d6c457c78964615cac1408caf6.zip
drm/amd/display: fix issue where 252-255 values are clipped
[ Upstream commit 1cbcfc975164f397b449efb17f59d81a703090db ] [Why] When endpoint is at the boundary of a region, such as at 2^0=1 we find that the last segment has a sharp slope and some points are clipped at the top. [How] If end point is 1, which is exactly at the 2^0 region boundary, we need to program an additional region beyond this point. Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c
index 7469333a2c8a..8166fdbacd73 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c
@@ -357,9 +357,10 @@ bool cm_helper_translate_curve_to_hw_format(
seg_distr[7] = 4;
seg_distr[8] = 4;
seg_distr[9] = 4;
+ seg_distr[10] = 1;
region_start = -10;
- region_end = 0;
+ region_end = 1;
}
for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++)