drm/amd/display: Add double buffering to dcn20 OCSC
authorNoah Abradjian <noah.abradjian@amd.com>
Wed, 11 Dec 2019 18:34:04 +0000 (13:34 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 18:51:31 +0000 (13:51 -0500)
commite8027e08843f8934f9701cbeea43268c65ade55b
treedbe7caac64c0d69f15551eae492b1377d4301bd1
parent1295524e6fee9a978ea2d97a0efc269252b07487
drm/amd/display: Add double buffering to dcn20 OCSC

[Why]
When rapidly adjusting colour properties (e.g. brightness), screen tearing was observed.
This was due to overwritten values in OCSC registers. In dcn10, this issue had been fixed by
implementing double buffering by alternating OCSC modes.

[How]
Alternate which OCSC registers are used by switching modes each time.
This double buffers the CSC writes.

Signed-off-by: Noah Abradjian <noah.abradjian@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.h
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c