OSDN Git Service

drm/amd/display: Defer cursor update around VUPDATE for all ASIC
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 22 Apr 2020 22:07:56 +0000 (18:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2020 20:18:23 +0000 (16:18 -0400)
commit1ab864a006690d7a387498589464f9ec8509ff9e
treedcc429ae6ea2d46121f9584a974a8091afda3a29
parent3a4837fb3c96aa6a0f017781a062687be4d6250b
drm/amd/display: Defer cursor update around VUPDATE for all ASIC

[Why]
Fixes the following scenario:

- Flip has been prepared sometime during the frame, update pending
- Cursor update happens right when VUPDATE would happen
- OPTC lock acquired, VUPDATE is blocked until next frame
- Flip is delayed potentially infinitely

With the igt@kms_cursor_legacy cursor-vs-flip-legacy test we can
observe nearly *13* frames of delay for some flips on Navi.

[How]
Apply the Raven workaround generically. When close enough to VUPDATE
block cursor updates from occurring from the dc_stream_set_cursor_*
helpers.

This could perhaps be a little smarter by checking if there were
pending updates or flips earlier in the frame on the HUBP side before
applying the delay, but this should be fine for now.

This fixes the kms_cursor_legacy test.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c