drm/amdgpu: Move up ras_hw_supported
authorLuben Tuikov <luben.tuikov@amd.com>
Tue, 4 May 2021 00:43:00 +0000 (20:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 May 2021 22:08:06 +0000 (18:08 -0400)
commite509965e58ab2c96418e1a5e756e25d9a54e0765
tree433c6ef4da9d8635d316c10b4ca22ec3d956cd97
parentacdae2169bae6993c61ded36ae0b2301c07c0a9e
drm/amdgpu: Move up ras_hw_supported

Move ras_hw_supported into struct amdgpu_dev.
The dependency is:
struct amdgpu_ras <== struct amdgpu_dev <== ASIC,
read as "struct amdgpu_ras depends on struct
amdgpu_dev, which depends on the hardware."

This can be loosely understood as, "if RAS is
supported, which is property of the ASIC (struct
amdgpu_dev), then we can access struct
amdgpu_ras."

v2: Fix a typo: must binary AND in ternary cond
    in amdgpu_ras.c

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>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: John Clements <John.Clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h