OSDN Git Service

drm/amd/display: Check for flip pending before locking pipes
authorAric Cyr <aric.cyr@amd.com>
Fri, 18 Sep 2020 15:45:04 +0000 (11:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Oct 2020 19:16:11 +0000 (15:16 -0400)
commitf7fb81a18f026b70e42ccc95c7d4485b0cdbfbbf
tree05232c30817f2ee9f02095aaa30b09febb28ba0d
parent6fbd1e171075955852e5ddc3fadf8ac45f7ca464
drm/amd/display: Check for flip pending before locking pipes

[Why]
When running games or benchmarking with v-sync disabled, disabling
a plane (which is v-sync) can cause underflow. This is caused by
flips pending before pipe locking being applied after locks are
released and pipes could have been re-arranged or disconnected. This
could potentially apply a flip on incorrect pipe. Also, previous logic
of always locking pipes was unnecessary.

[How]
Only lock the pipes when there is a pipe being disabled to increase
efficiency. Before the pipes are locked, check that any pending flips
are cleared to ensure the flips are applied to the correct pipe.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Eryk Brol <eryk.brol@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