drm/amd/display: Check for flip pending before locking pipes.
authorTaimur Hassan <syed.hassan@amd.com>
Thu, 10 Sep 2020 14:13:42 +0000 (10:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 16:28:56 +0000 (12:28 -0400)
commit99d1437aa0ac1f598e9aabca8bf0e8a40c38f8a1
treeefdd809c796cd7c0c2cbda913f3c71ebd3a055fa
parenta9edc81564c92b4d86670b722bbe8906e0dfd934
drm/amd/display: Check for flip pending before locking pipes.

[Why]
When running a game/benchmark with v-sync disabled, disabling a plane
(which is v-sync) can cause an underflow. This is due to flips that are
pending before pipe locking being applied after locks are released and
pipes have been re-arranged or disconnected. This can potentially apply
a flip on the incorrect pipe.

[How]
Check that any pending flips are cleared before locking any pipes to
ensure flips are applied on the correct pipes.

Signed-off-by: Taimur Hassan <syed.hassan@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>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h