diff options
| author | Luben Tuikov <[email protected]> | 2021-05-21 15:53:09 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-05-27 16:23:06 +0000 |
| commit | 05adfd80cc52e0b4581e65bb5418de5dfd24d105 (patch) | |
| tree | d6634299bb56f99f115e49d8a8059bbe56875894 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | |
| parent | drm/amdgpu: Fix RAS function interface (diff) | |
| download | kernel-05adfd80cc52e0b4581e65bb5418de5dfd24d105.tar.gz kernel-05adfd80cc52e0b4581e65bb5418de5dfd24d105.zip | |
drm/amdgpu: Use delayed work to collect RAS error counters
On Context Query2 IOCTL return the correctable and
uncorrectable errors in O(1) fashion, from cached
values, and schedule a delayed work function to
calculate and cache them for the next such IOCTL.
v2: Cancel pending delayed work at ras_fini().
v3: Remove conditionals when dealing with delayed
work manipulation as they're inherently racy.
Cc: Alexander Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: John Clements <[email protected]>
Cc: Hawking Zhang <[email protected]>
Signed-off-by: Luben Tuikov <[email protected]>
Reviewed-by: Alexander Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h index 10fca0393106..256cea5d34f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h @@ -340,6 +340,11 @@ struct amdgpu_ras { /* disable ras error count harvest in recovery */ bool disable_ras_err_cnt_harvest; + + /* RAS count errors delayed work */ + struct delayed_work ras_counte_delay_work; + atomic_t ras_ue_count; + atomic_t ras_ce_count; }; struct ras_fs_data { |
