• Luben Tuikov's avatar
    drm/amdgpu: Fix RAS function interface · a46751fb
    Luben Tuikov authored
    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: default avatarLuben Tuikov <luben.tuikov@amd.com>
    Reviewed-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    a46751fb
amdgpu_ras.h 18.9 KB