diff options
| author | Dennis Li <[email protected]> | 2021-03-10 17:20:45 +0800 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-04-09 16:34:53 -0400 |
| commit | 56b53c0b5aa5de49747351b2ad323fd36089eb52 (patch) | |
| tree | 142d0d64ff22005bc80e515fc57a9e2371bb92f5 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
| parent | c103b850721e4a79ff9578f131888129c37a4679 (diff) | |
drm/amdgpu: add codes to capture invalid hardware access when recovery
When recovery thread has begun GPU reset, there should be not other
threads to access hardware, otherwise system randomly hang.
v2 (chk): rewritten from scratch, use trylock and lockdep instead of
hand wiring the logic.
v3: add in_irq check
v4: change to check in_task
Signed-off-by: Dennis Li <[email protected]>
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index a037c223c251..4c2fabe93d59 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1390,6 +1390,8 @@ void amdgpu_pci_resume(struct pci_dev *pdev); bool amdgpu_device_cache_pci_state(struct pci_dev *pdev); bool amdgpu_device_load_pci_state(struct pci_dev *pdev); +bool amdgpu_device_skip_hw_access(struct amdgpu_device *adev); + #include "amdgpu_object.h" static inline bool amdgpu_is_tmz(struct amdgpu_device *adev) |