]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix RAS function interface
authorLuben Tuikov <luben.tuikov@amd.com>
Wed, 19 May 2021 01:07:17 +0000 (21:07 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 May 2021 16:22:54 +0000 (12:22 -0400)
commitf009bc6dc63e91177f9676b6b8a475d682a9f9ee
treeb652fc0e941f3e517dc5a24eb0666575cd741679
parentc3fc3d238791419400e3e00afbba6e5831e66102
drm/amdgpu: Fix RAS function interface

The correctable and uncorrectable errors
are calculated at each invocation of this
function. Therefore, it is highly inefficient to
return just one of them based on a Boolean
input. If the caller wants both, twice the work
would be done. (And this work is O(n^3) on
Vega20.)

Fix this "interface" to simply return what it had
calculated--both values. Let the caller choose
what it wants to record, inspect, use.

Cc: Alexander Deucher <Alexander.Deucher@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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h