drm/amdgpu: refine the security check for RAS functions
authorDennis Li <Dennis.Li@amd.com>
Thu, 16 Jan 2020 03:07:55 +0000 (11:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Jan 2020 21:36:04 +0000 (16:36 -0500)
commit5e66403e4d709decacf2b53e55deb55d8f6e6982
treed1c182271e9f1b062461af7c80277a965d0e2851
parent39aa0ef1638ad7722e8182331c61deae8da97105
drm/amdgpu: refine the security check for RAS functions

To avoid calling RAS related functions when RAS feature isn't
supported in hardware. Change to check supported features, instead
of checking asic type.

v2: reuse amdgpu_ras_is_supported function, instead of introducing
a new flag for hardware ras feature.

Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c