drm/amd/display: Block immediate flips for non-fast updates
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 2 Aug 2019 14:45:11 +0000 (10:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Aug 2019 18:52:24 +0000 (13:52 -0500)
commitcaff0e6654377b623e37922d084b1a33aa9d44d7
tree03f96b8bfd23258b520a1b2f5e7eabbf040215fe
parent2cc450ceaae4febc1539975247d235eb06c11979
drm/amd/display: Block immediate flips for non-fast updates

[Why]
Underflow can occur in the case where we change buffer pitch, DCC state,
rotation or mirroring for a plane while also performing an immediate
flip. It can also generate a p-state warning stack trace on DCN1 which
is typically observed during the cursor handler pipe locking because of
how frequent cursor updates can occur.

[How]
Store the update type on each CRTC - every plane will have access to
the CRTC state if it's flipping. If the update type is not
UPDATE_TYPE_FAST then the immediate flip should be disallowed.

No changes to the target vblank sequencing need to be done, we just
need to ensure that the surface registers do a double buffered update.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: David Francis <david.francis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h