drm/amd/display: Call into DC once per multiplane flip
authorDavid Francis <David.Francis@amd.com>
Tue, 11 Dec 2018 20:17:15 +0000 (15:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Jan 2019 21:15:36 +0000 (16:15 -0500)
commit8a48b44cd00f10e83f573b9028d11bd90a36de26
tree8c46b4f37a07d38a2a0be064a4cda8709f59a578
parent02d6a6fcdf68c4de1f28e64b012c54c855294b2a
drm/amd/display: Call into DC once per multiplane flip

[Why]
amdgpu_dm_commit_planes was performing multi-plane
flips incorrectly:

It waited for vblank once per flipped plane

It prepared flip ISR and acquired the corresponding vblank ref
once per plane, although it closed ISR and put the ref once
per crtc

It called into dc once per flipped plane, duplicating some work

[How]
Wait for vblank, get vblank ref, prepare flip ISR, and call into
DC only once, and only if there is a pageflip

Make freesync continue to update planes even if vrr information
has already been changed

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c