]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd/display: Do not elevate mem_type change to full update
authorLeo Li <sunpeng.li@amd.com>
Wed, 11 Dec 2024 17:06:24 +0000 (12:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 10 Jan 2025 18:40:47 +0000 (13:40 -0500)
commit35ca53b7b0f0ffd16c6675fd76abac9409cf83e0
treea4372457cbe0d0c751a407e648e8461ec6f3337c
parentff2e4d874726c549130308b6b46aa0f8a34e04cb
drm/amd/display: Do not elevate mem_type change to full update

[Why]

There should not be any need to revalidate bandwidth on memory placement
change, since the fb is expected to be pinned to DCN-accessable memory
before scanout. For APU it's DRAM, and DGPU, it's VRAM. However, async
flips + memory type change needs to be rejected.

[How]

Do not set lock_and_validation_needed on mem_type change. Instead,
reject an async_flip request if the crtc's buffer(s) changed mem_type.

This may fix stuttering/corruption experienced with PSR SU and PSR1
panels, if the compositor allocates fbs in both VRAM carveout and GTT
and flips between them.

Fixes: a7c0cad0dc06 ("drm/amd/display: ensure async flips are only accepted for fast updates")
Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 4caacd1671b7a013ad04cd8b6398f002540bdd4d)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c