diff options
| author | Eric Huang <[email protected]> | 2024-06-03 15:56:03 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-06-05 15:25:13 +0000 |
| commit | 2656e1ce783a90fa1aa0e11f2915d7c0442bf06f (patch) | |
| tree | ebf462a089e9fde96400113c548b1b4f5f7435fc /drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | |
| parent | drm/amd/display: Add UCLK p-state support message to dcn401 (diff) | |
| download | kernel-2656e1ce783a90fa1aa0e11f2915d7c0442bf06f.tar.gz kernel-2656e1ce783a90fa1aa0e11f2915d7c0442bf06f.zip | |
drm/amdgpu: add reset sources in gpu reset context
reset source or reset cause is very useful info
for reset context, it will be used by events API.
Suggested-by: Lijo Lazar <[email protected]>
Signed-off-by: Eric Huang <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h index 5a9cc043b858..4ae581f3fcb5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h @@ -36,6 +36,15 @@ enum AMDGPU_RESET_FLAGS { AMDGPU_HOST_FLR = 3, }; +enum AMDGPU_RESET_SRCS { + AMDGPU_RESET_SRC_UNKNOWN, + AMDGPU_RESET_SRC_JOB, + AMDGPU_RESET_SRC_RAS, + AMDGPU_RESET_SRC_MES, + AMDGPU_RESET_SRC_HWS, + AMDGPU_RESET_SRC_USER, +}; + struct amdgpu_reset_context { enum amd_reset_method method; struct amdgpu_device *reset_req_dev; @@ -43,6 +52,7 @@ struct amdgpu_reset_context { struct amdgpu_hive_info *hive; struct list_head *reset_device_list; unsigned long flags; + enum AMDGPU_RESET_SRCS src; }; struct amdgpu_reset_handler { @@ -130,6 +140,9 @@ void amdgpu_device_lock_reset_domain(struct amdgpu_reset_domain *reset_domain); void amdgpu_device_unlock_reset_domain(struct amdgpu_reset_domain *reset_domain); +void amdgpu_reset_get_desc(struct amdgpu_reset_context *rst_ctxt, char *buf, + size_t len); + #define for_each_handler(i, handler, reset_ctl) \ for (i = 0; (i < AMDGPU_RESET_MAX_HANDLERS) && \ (handler = (*reset_ctl->reset_handlers)[i]); \ |
