drm/amd/display: ensure async flips are only accepted for fast updates
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Fri, 4 Aug 2023 15:13:04 +0000 (11:13 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Aug 2023 21:14:07 +0000 (17:14 -0400)
commita7c0cad0dc060bb77e9c9d235d68441b0fc69507
tree08b728780a5e7b82feba9af040b6b18d69b0976a
parent2105a15a20463cb6cee3061f309aeaabd2996d94
drm/amd/display: ensure async flips are only accepted for fast updates

We should be checking to see if async flips are supported in
amdgpu_dm_atomic_check() (i.e. not dm_crtc_helper_atomic_check()). Also,
async flipping isn't supported if a plane's framebuffer changes memory
domains during an atomic commit. So, move the check from
dm_crtc_helper_atomic_check() to amdgpu_dm_atomic_check() and check if
the memory domain has changed in amdgpu_dm_atomic_check().

Cc: stable@vger.kernel.org
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2733
Fixes: c1e18c44dc7f ("drm/amd/display: only accept async flips for fast updates")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c