diff options
| author | Alex Deucher <[email protected]> | 2020-10-06 14:54:38 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-10-04 22:36:57 +0000 |
| commit | 2e8ef6a56129526a67b1058124be0839ab8f976a (patch) | |
| tree | 7876f7a2137fd223b5f353ff2de5e175a810b33a /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |
| parent | drm/amd/display: Refactor dm_get_plane_scale helper (diff) | |
| download | kernel-2e8ef6a56129526a67b1058124be0839ab8f976a.tar.gz kernel-2e8ef6a56129526a67b1058124be0839ab8f976a.zip | |
drm/amdgpu: add cached GPU fault structure to vm struct
When we get a GPU page fault, cache the fault for later
analysis.
Cc: [email protected]
Reviewed-by: Christian König <[email protected]>
Acked-by: Guchun Chen <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index 204ab13184ed..2bf328d9e04b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h @@ -252,6 +252,15 @@ struct amdgpu_vm_update_funcs { struct dma_fence **fence); }; +struct amdgpu_vm_fault_info { + /* fault address */ + uint64_t addr; + /* fault status register */ + uint32_t status; + /* which vmhub? gfxhub, mmhub, etc. */ + unsigned int vmhub; +}; + struct amdgpu_vm { /* tree of virtual addresses mapped */ struct rb_root_cached va; @@ -343,6 +352,9 @@ struct amdgpu_vm { /* Memory partition number, -1 means any partition */ int8_t mem_id; + + /* cached fault info */ + struct amdgpu_vm_fault_info fault_info; }; struct amdgpu_vm_manager { @@ -554,4 +566,10 @@ static inline void amdgpu_vm_eviction_unlock(struct amdgpu_vm *vm) mutex_unlock(&vm->eviction_lock); } +void amdgpu_vm_update_fault_cache(struct amdgpu_device *adev, + unsigned int pasid, + uint64_t addr, + uint32_t status, + unsigned int vmhub); + #endif |
