diff options
author | Tao Zhou <tao.zhou1@amd.com> | 2019-07-22 15:27:25 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-07-31 22:50:23 +0300 |
commit | cf04dfd0e91f11ac83d369f809ada8147aeaf3fe (patch) | |
tree | 5571c317a14f29368f3c6d0ede45708449884e7a /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | |
parent | 8c94810357fad9d583e37785534a8caec558bb24 (diff) | |
download | linux-cf04dfd0e91f11ac83d369f809ada8147aeaf3fe.tar.xz |
drm/amdgpu: allow ras interrupt callback to return error data
add error data as parameter for ras interrupt cb and process it
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Dennis Li <dennis.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h index 0920db7aff34..2c86a5135ec9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h @@ -76,9 +76,6 @@ struct ras_common_if { char name[32]; }; -typedef int (*ras_ih_cb)(struct amdgpu_device *adev, - struct amdgpu_iv_entry *entry); - struct amdgpu_ras { /* ras infrastructure */ /* for ras itself. */ @@ -108,21 +105,6 @@ struct amdgpu_ras { uint32_t flags; }; -struct ras_ih_data { - /* interrupt bottom half */ - struct work_struct ih_work; - int inuse; - /* IP callback */ - ras_ih_cb cb; - /* full of entries */ - unsigned char *ring; - unsigned int ring_size; - unsigned int element_size; - unsigned int aligned_element_size; - unsigned int rptr; - unsigned int wptr; -}; - struct ras_fs_data { char sysfs_name[32]; char debugfs_name[32]; @@ -149,6 +131,25 @@ struct ras_err_handler_data { int last_reserved; }; +typedef int (*ras_ih_cb)(struct amdgpu_device *adev, + struct ras_err_data *err_data, + struct amdgpu_iv_entry *entry); + +struct ras_ih_data { + /* interrupt bottom half */ + struct work_struct ih_work; + int inuse; + /* IP callback */ + ras_ih_cb cb; + /* full of entries */ + unsigned char *ring; + unsigned int ring_size; + unsigned int element_size; + unsigned int aligned_element_size; + unsigned int rptr; + unsigned int wptr; +}; + struct ras_manager { struct ras_common_if head; /* reference count */ |