drm/amd/display: change global buffer to local buffer
authorLewis Huang <Lewis.Huang@amd.com>
Wed, 20 May 2020 10:03:05 +0000 (18:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:23 +0000 (11:29 +0200)
commitad18857f595804bca35e49bd763daecda0604274
tree3936fda17258424511b5747aba24190221b95ff4
parenta539e86e839617a3d06cf428339468776d355ed1
drm/amd/display: change global buffer to local buffer

[ Upstream commit 8ae5b155928c9183c2f37b5c4eec21037d958699 ]

[Why]
Multi-adapter calculate regamma table at the same time.
Two thread used the same global variable cause race
condition.

[How]
Change global buffer to local buffer

Signed-off-by: Lewis Huang <Lewis.Huang@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
drivers/gpu/drm/amd/display/modules/color/Makefile
drivers/gpu/drm/amd/display/modules/color/color_gamma.c
drivers/gpu/drm/amd/display/modules/color/color_gamma.h
drivers/gpu/drm/amd/display/modules/color/color_table.c [new file with mode: 0644]
drivers/gpu/drm/amd/display/modules/color/color_table.h [new file with mode: 0644]