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

drm/amdgpu: Fix the issue of missing ras message on sriov host

This code only applies to amdgpu processing
poison consumption after uniras is enabled,
but not to sriov.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

YiPeng Chai and committed by
Alex Deucher
6a375399 2b198d45

+10 -15
-15
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
··· 36 36 #include "amdgpu_ras.h" 37 37 #include "amdgpu_umc.h" 38 38 #include "amdgpu_reset.h" 39 - #include "amdgpu_ras_mgr.h" 40 39 41 40 /* Total memory size in system memory and all GPU VRAM. Used to 42 41 * estimate worst case amount of memory to reserve for page tables ··· 746 747 enum amdgpu_ras_block block, uint16_t pasid, 747 748 pasid_notify pasid_fn, void *data, uint32_t reset) 748 749 { 749 - 750 - if (amdgpu_uniras_enabled(adev)) { 751 - struct ras_ih_info ih_info; 752 - 753 - memset(&ih_info, 0, sizeof(ih_info)); 754 - ih_info.block = block; 755 - ih_info.pasid = pasid; 756 - ih_info.reset = reset; 757 - ih_info.pasid_fn = pasid_fn; 758 - ih_info.data = data; 759 - amdgpu_ras_mgr_handle_consumer_interrupt(adev, &ih_info); 760 - return; 761 - } 762 - 763 750 amdgpu_umc_pasid_poison_handler(adev, block, pasid, pasid_fn, data, reset); 764 751 } 765 752
+10
drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c
··· 24 24 #include <linux/sort.h> 25 25 #include "amdgpu.h" 26 26 #include "umc_v6_7.h" 27 + #include "amdgpu_ras_mgr.h" 27 28 #define MAX_UMC_POISON_POLLING_TIME_SYNC 20 //ms 28 29 29 30 #define MAX_UMC_HASH_STRING_SIZE 256 ··· 274 273 } 275 274 276 275 amdgpu_ras_error_data_fini(&err_data); 276 + } else if (amdgpu_uniras_enabled(adev)) { 277 + struct ras_ih_info ih_info = {0}; 278 + 279 + ih_info.block = block; 280 + ih_info.pasid = pasid; 281 + ih_info.reset = reset; 282 + ih_info.pasid_fn = pasid_fn; 283 + ih_info.data = data; 284 + amdgpu_ras_mgr_handle_consumer_interrupt(adev, &ih_info); 277 285 } else { 278 286 struct amdgpu_ras *con = amdgpu_ras_get_context(adev); 279 287 int ret;