]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: read sdma edc counter to clear the counters
authorHawking Zhang <Hawking.Zhang@amd.com>
Wed, 8 Jan 2020 15:28:05 +0000 (23:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jan 2020 15:18:08 +0000 (10:18 -0500)
commit03e4d67165998973a13b2936a2f602540466b469
tree009fc4488581d46065bec241dec967689d3a03e4
parent828cdb3d7427a5e99a4e8f9655d4ba0edd6800d0
drm/amdgpu: read sdma edc counter to clear the counters

SDMA edc counter registers were added in gfx edc counters
array. When querying gfx error counter in that array, there
is no way to differentiate sdma instance number for different
asic and then results to NULL pointer access when trying to
read sdma register base address for instances greater
than 2 on Vega20.
In addition, this also results to wrong gfx error counters
since it actually added sdma edc counters.
Therefore, sdma edc counter registers should be separated
from gfx edc counter regsiter array and only get initialized
when driver tries to enable sdma ras.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c