drm/amd/display: Fix update type mismatches in atomic check
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 22 Jan 2019 19:09:34 +0000 (14:09 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Feb 2019 20:58:26 +0000 (15:58 -0500)
commit6836d23916ada07389c78d88e701f0752317f1d0
tree36a0ef28912f382c852a054d4c55a01159b88028
parent3e4ba0cdbb244a670779793117d6042bd6c0ce64
drm/amd/display: Fix update type mismatches in atomic check

[Why]
Whenever a stream or plane is added or removed from the context the
pointer will change from old to new. We set lock and validation
needed in these cases. But not all of these cases match update_type
from dm_determine_update_type_for_commit - an example being overlay
plane updates.

There are warnings for a few of these cases that should be fixed.

[How]
We can closer align to DC (and lock_and_validation_needed) by
comparing stream and plane pointers.

Since the old stream/old plane state is never freed until sometime
after the commit tail work finishes we are guaranteed to never get
back the same block of memory when we remove and create a stream or
plane state in the same commit.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-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