Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Make default ras error type to none

Unless IP has implemented its own ras, use ERROR_NONE as the default
type.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

xinhui pan and committed by
Alex Deucher
191051a1 0e4f087b

+15 -9
+15 -9
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
··· 558 558 struct amdgpu_ras *con = amdgpu_ras_get_context(adev); 559 559 int ras_block_count = AMDGPU_RAS_BLOCK_COUNT; 560 560 int i; 561 + const enum amdgpu_ras_error_type default_ras_type = 562 + AMDGPU_RAS_ERROR__NONE; 561 563 562 564 for (i = 0; i < ras_block_count; i++) { 563 565 struct ras_common_if head = { 564 566 .block = i, 565 - .type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE, 567 + .type = default_ras_type, 566 568 .sub_block_index = 0, 567 569 }; 568 570 strcpy(head.name, ras_block_str(i)); ··· 1370 1368 1371 1369 amdgpu_ras_mask &= AMDGPU_RAS_BLOCK_MASK; 1372 1370 1373 - if (con->flags & AMDGPU_RAS_FLAG_INIT_BY_VBIOS) 1374 - amdgpu_ras_enable_all_features(adev, 1); 1375 - 1376 1371 if (amdgpu_ras_fs_init(adev)) 1377 1372 goto fs_out; 1378 1373 ··· 1397 1398 if (!con) 1398 1399 return; 1399 1400 1400 - /* We enable ras on all hw_supported block, but as boot parameter might 1401 - * disable some of them and one or more IP has not implemented yet. 1402 - * So we disable them on behalf. 1403 - */ 1404 1401 if (con->flags & AMDGPU_RAS_FLAG_INIT_BY_VBIOS) { 1402 + /* Set up all other IPs which are not implemented. There is a 1403 + * tricky thing that IP's actual ras error type should be 1404 + * MULTI_UNCORRECTABLE, but as driver does not handle it, so 1405 + * ERROR_NONE make sense anyway. 1406 + */ 1407 + amdgpu_ras_enable_all_features(adev, 1); 1408 + 1409 + /* We enable ras on all hw_supported block, but as boot 1410 + * parameter might disable some of them and one or more IP has 1411 + * not implemented yet. So we disable them on behalf. 1412 + */ 1405 1413 list_for_each_entry_safe(obj, tmp, &con->head, node) { 1406 1414 if (!amdgpu_ras_is_supported(adev, obj->head.block)) { 1407 1415 amdgpu_ras_feature_enable(adev, &obj->head, 0); 1408 1416 /* there should be no any reference. */ 1409 1417 WARN_ON(alive_obj(obj)); 1410 1418 } 1411 - }; 1419 + } 1412 1420 } 1413 1421 } 1414 1422