]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Use delayed work to collect RAS error counters
authorLuben Tuikov <luben.tuikov@amd.com>
Fri, 21 May 2021 15:53:09 +0000 (11:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 May 2021 16:23:06 +0000 (12:23 -0400)
commit8ec02a08cc148fef834b7b610cdcd982fcefa9d5
treed6634299bb56f99f115e49d8a8059bbe56875894
parentf009bc6dc63e91177f9676b6b8a475d682a9f9ee
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 <Alexander.Deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alexander Deucher <Alexander.Deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h