drm/amdgpu: only check for ECC on Vega10

RV doesn't support it.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
This commit is contained in:
Alex Deucher 2018-01-17 09:07:29 -05:00
parent adab595d16
commit 5ba4fa35d3

View File

@ -634,14 +634,16 @@ static int gmc_v9_0_late_init(void *handle)
for(i = 0; i < AMDGPU_MAX_VMHUBS; ++i) for(i = 0; i < AMDGPU_MAX_VMHUBS; ++i)
BUG_ON(vm_inv_eng[i] > 16); BUG_ON(vm_inv_eng[i] > 16);
r = gmc_v9_0_ecc_available(adev); if (adev->asic_type == CHIP_VEGA10) {
if (r == 1) { r = gmc_v9_0_ecc_available(adev);
DRM_INFO("ECC is active.\n"); if (r == 1) {
} else if (r == 0) { DRM_INFO("ECC is active.\n");
DRM_INFO("ECC is not present.\n"); } else if (r == 0) {
} else { DRM_INFO("ECC is not present.\n");
DRM_ERROR("gmc_v9_0_ecc_available() failed. r: %d\n", r); } else {
return r; DRM_ERROR("gmc_v9_0_ecc_available() failed. r: %d\n", r);
return r;
}
} }
return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0); return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0);