diff options
author | Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> | 2024-02-26 14:29:05 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-03-22 15:49:29 -0400 |
commit | 93ddf00f874c26e078ba01010bc126f521d49e7f (patch) | |
tree | 128c8121052936638f71621b1371476157fe02c4 /drivers/gpu/drm/amd/pm/amdgpu_pm.c | |
parent | 398a16e1f03b6b583b94c7ab080aa38432fb0502 (diff) |
drm/amd/display: Detect and disallow idle reallow during reentrancy
[Why]
Cursor updates can be preempted by queued flips in some DMs.
The synchronization model causes this to occur within the same thread
at an intermediate level when we insert logs into the OS queue.
Since this occurs on the same thread and we're still holding the lock
(recursively) the cache is coherent.
The exit sequence will run twice since we technically haven't finished
the exit the first time, so we need a way to detect and avoid the
reallow in the middle of this call to prevent the hang on the cursor
update that was preempted.
[How]
Keep a counter that tracks the depth of the exit calls. Do not reallow
until the counter is zero.
Reviewed-by: Duncan Ma <duncan.ma@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions