drm/amd/display: Use the right surface for flip and FreeSync
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 10 Jan 2019 14:51:54 +0000 (09:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Feb 2019 02:16:22 +0000 (21:16 -0500)
commitc7af5f77aecdfe95633327cffc7f0c9dd1b64ab1
treec0e6cf11cfd08c90a51d7e730fec80d709d24b34
parentf3e3698d05454f2aeb9ef9969fc58a68090441ad
drm/amd/display: Use the right surface for flip and FreeSync

[Why]
We were always passing the first surface on the stream status for
flip updates when we should be using the surface associated with
the plane.

[How]
Use the dc_plane_state from the plane that's being updated.

FreeSync should also only keep track of updates from the primary
plane, so the check needed to be updated.

The acrtc->stream state doesn't need to be checked for NULL before
updating FreeSync either since there needs to be a stream to be
inside this function as a prerequisite.

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