diff options
| author | Dennis Li <[email protected]> | 2020-08-19 09:23:03 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-08-24 16:22:56 +0000 |
| commit | 53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f (patch) | |
| tree | 865f5a2a0f2d69a04dbceb1853672ceef77dcb53 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
| parent | drm/amd/display: Reject overlay plane configurations in multi-display scenarios (diff) | |
| download | kernel-53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f.tar.gz kernel-53b3f8f40e6cff36ae12b11e6d6b308af3c7e53f.zip | |
drm/amdgpu: refine codes to avoid reentering GPU recovery
if other threads have holden the reset lock, recovery will
fail to try_lock. Therefore we introduce atomic hive->in_reset
and adev->in_gpu_reset, to avoid reentering GPU recovery.
v2:
drop "? true : false" in the definition of amdgpu_in_reset
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Dennis Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 3d2712a4cf4d..97449ab24c20 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -2098,7 +2098,7 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable) uint64_t size; int r; - if (!adev->mman.initialized || adev->in_gpu_reset || + if (!adev->mman.initialized || amdgpu_in_reset(adev) || adev->mman.buffer_funcs_enabled == enable) return; |
