]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix bug of accessing invalid memory
authorSu Sung Chung <Su.Chung@amd.com>
Thu, 20 Sep 2018 19:03:27 +0000 (15:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Oct 2018 21:17:17 +0000 (16:17 -0500)
commitfddc0ff6922fc1de1ad7724c7604811a6ab2b605
tree380d4e5b00054a3e553336dd4e0080718a894c10
parent4d89b67f905c4f1e65278ee3d33191cf980b8d9d
drm/amd/display: fix bug of accessing invalid memory

[Why]
A loop inside of build_evenly_distributed_points function that traverse through
the array of points become an infinite loop when m_GammaUpdates does not
get assigned to any value.

[How]
In DMColor, clear m_gammaIsValid bit just before writting all Zeromem for
m_GammaUpdates, to prevent calling build_evenly_distributed_points
before m_GammaUpdates gets assigned to some value.

Signed-off-by: Su Sung Chung <Su.Chung@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c