diff options
author | Aric Cyr <aric.cyr@amd.com> | 2020-09-18 11:45:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-10-05 15:16:11 -0400 |
commit | f7fb81a18f026b70e42ccc95c7d4485b0cdbfbbf (patch) | |
tree | 05232c30817f2ee9f02095aaa30b09febb28ba0d /drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | |
parent | drm/amd/display: Don't allow pstate if no support in blank (diff) | |
download | wireguard-linux-f7fb81a18f026b70e42ccc95c7d4485b0cdbfbbf.tar.xz wireguard-linux-f7fb81a18f026b70e42ccc95c7d4485b0cdbfbbf.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h index 64c1be818b0e..f48ee24d42f9 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h @@ -67,7 +67,7 @@ struct hw_sequencer_funcs { int num_planes, struct dc_state *context); void (*program_front_end_for_ctx)(struct dc *dc, struct dc_state *context); - bool (*disconnect_pipes)(struct dc *dc, + void (*disconnect_pipes)(struct dc *dc, struct dc_state *context); void (*wait_for_pending_cleared)(struct dc *dc, struct dc_state *context); |