drm/amd/display: Use surface directly when checking update type
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 10 Jan 2019 14:32:31 +0000 (09:32 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Apr 2019 05:21:36 +0000 (00:21 -0500)
commitf843b308adb2c412da611351acbe29292190cae8
tree5843465a1d1677335388d4f4a3a3c0090f3431b8
parent6491f0c05abd009631e0d0a33d671bb5a685847a
drm/amd/display: Use surface directly when checking update type

[Why]
DC expects the surface memory address to identify the surface.

This doesn't work with what we're doing with the temporary surfaces,
it will always assume this is a full update because the surface
isn't in the current context.

[How]
Use the surface directly. This doesn't give us much improvement yet,
since we always create a new dc_plane_state when state->allow_modeset
is true.

The call into dc_check_update_surfaces_for_stream also needs to be
locked, for two reasons:

1. It checks the current DC state
2. It modifies the surface update flags

Both of which could be currently in the middle of commit work from
commit tail.

A TODO here is to pass the context explicitly into this function and
find a way to get the surface update flags out of it without modifying
the surface in place.

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