drm/amdkfd: fix set kfd node ras properties value
The ctx->features are new RAS implementation which is only available for Vega20 and onwards, it is not available for vega10, vega10 should follow legacy ECC implementation. Changed from V1: wrap function to initialize kfd node properties Changed from V2: remove wrap function and SDMA SRAM ECC check Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com> Reviewed-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

کامیت شده توسط
Alex Deucher

والد
1887544d4d
کامیت
5436ab94cd
@@ -1239,7 +1239,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
|
||||
void *crat_image = NULL;
|
||||
size_t image_size = 0;
|
||||
int proximity_domain;
|
||||
struct amdgpu_ras *ctx;
|
||||
struct amdgpu_device *adev;
|
||||
|
||||
INIT_LIST_HEAD(&temp_topology_device_list);
|
||||
|
||||
@@ -1404,19 +1404,17 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
|
||||
dev->node_props.max_waves_per_simd = 10;
|
||||
}
|
||||
|
||||
ctx = amdgpu_ras_get_context((struct amdgpu_device *)(dev->gpu->kgd));
|
||||
if (ctx) {
|
||||
/* kfd only concerns sram ecc on GFX/SDMA and HBM ecc on UMC */
|
||||
dev->node_props.capability |=
|
||||
(((ctx->features & BIT(AMDGPU_RAS_BLOCK__SDMA)) != 0) ||
|
||||
((ctx->features & BIT(AMDGPU_RAS_BLOCK__GFX)) != 0)) ?
|
||||
HSA_CAP_SRAM_EDCSUPPORTED : 0;
|
||||
dev->node_props.capability |= ((ctx->features & BIT(AMDGPU_RAS_BLOCK__UMC)) != 0) ?
|
||||
HSA_CAP_MEM_EDCSUPPORTED : 0;
|
||||
adev = (struct amdgpu_device *)(dev->gpu->kgd);
|
||||
/* kfd only concerns sram ecc on GFX and HBM ecc on UMC */
|
||||
dev->node_props.capability |=
|
||||
((adev->ras_features & BIT(AMDGPU_RAS_BLOCK__GFX)) != 0) ?
|
||||
HSA_CAP_SRAM_EDCSUPPORTED : 0;
|
||||
dev->node_props.capability |= ((adev->ras_features & BIT(AMDGPU_RAS_BLOCK__UMC)) != 0) ?
|
||||
HSA_CAP_MEM_EDCSUPPORTED : 0;
|
||||
|
||||
dev->node_props.capability |= (ctx->features != 0) ?
|
||||
if (adev->asic_type != CHIP_VEGA10)
|
||||
dev->node_props.capability |= (adev->ras_features != 0) ?
|
||||
HSA_CAP_RASEVENTNOTIFY : 0;
|
||||
}
|
||||
|
||||
kfd_debug_print_topology();
|
||||
|
||||
|
مرجع در شماره جدید
Block a user