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

drm/amdgpu: Print the IH client ID name when vm fault happens

This gives more information and improves productivity.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yong Zhao and committed by
Alex Deucher
be14729a 0ef6845c

+46 -6
+34
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
··· 65 65 66 66 #define AMDGPU_WAIT_IDLE_TIMEOUT 200 67 67 68 + const char *soc15_ih_clientid_name[] = { 69 + "IH", 70 + "SDMA2 or ACP", 71 + "ATHUB", 72 + "BIF", 73 + "SDMA3 or DCE", 74 + "SDMA4 or ISP", 75 + "VMC1 or PCIE0", 76 + "RLC", 77 + "SDMA0", 78 + "SDMA1", 79 + "SE0SH", 80 + "SE1SH", 81 + "SE2SH", 82 + "SE3SH", 83 + "VCN1 or UVD1", 84 + "THM", 85 + "VCN or UVD", 86 + "SDMA5 or VCE0", 87 + "VMC", 88 + "SDMA6 or XDMA", 89 + "GRBM_CP", 90 + "ATS", 91 + "ROM_SMUIO", 92 + "DF", 93 + "SDMA7 or VCE1", 94 + "PWR", 95 + "UTCL2", 96 + "EA", 97 + "UTCL2LOG", 98 + "MP0", 99 + "MP1" 100 + }; 101 + 68 102 /** 69 103 * amdgpu_hotplug_work_func - work handler for display hotplug event 70 104 *
+3 -2
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
··· 152 152 entry->src_id, entry->ring_id, entry->vmid, 153 153 entry->pasid, task_info.process_name, task_info.tgid, 154 154 task_info.task_name, task_info.pid); 155 - dev_err(adev->dev, " in page starting at address 0x%012llx from client %d\n", 156 - addr, entry->client_id); 155 + dev_err(adev->dev, " in page starting at address 0x%016llx from client 0x%x (%s)\n", 156 + addr, entry->client_id, 157 + soc15_ih_clientid_name[entry->client_id]); 157 158 158 159 if (!amdgpu_sriov_vf(adev)) 159 160 hub->vmhub_funcs->print_l2_protection_fault_status(adev,
+3 -2
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
··· 521 521 entry->src_id, entry->ring_id, entry->vmid, 522 522 entry->pasid, task_info.process_name, task_info.tgid, 523 523 task_info.task_name, task_info.pid); 524 - dev_err(adev->dev, " in page starting at address 0x%012llx from client %d\n", 525 - addr, entry->client_id); 524 + dev_err(adev->dev, " in page starting at address 0x%016llx from IH client 0x%x (%s)\n", 525 + addr, entry->client_id, 526 + soc15_ih_clientid_name[entry->client_id]); 526 527 527 528 if (amdgpu_sriov_vf(adev)) 528 529 return 0;
+6 -2
drivers/gpu/drm/amd/include/soc15_ih_clientid.h
··· 24 24 #ifndef __SOC15_IH_CLIENTID_H__ 25 25 #define __SOC15_IH_CLIENTID_H__ 26 26 27 - /* 28 - * vega10+ IH clients 27 + /* 28 + * Vega10+ IH clients 29 + * Whenever this structure is updated, which should not happen, make sure 30 + * soc15_ih_clientid_name in the below is also updated accordingly. 29 31 */ 30 32 enum soc15_ih_clientid { 31 33 SOC15_IH_CLIENTID_IH = 0x00, ··· 75 73 SOC15_IH_CLIENTID_SDMA7 = SOC15_IH_CLIENTID_VCE1, 76 74 SOC15_IH_CLIENTID_VMC1 = SOC15_IH_CLIENTID_PCIE0, 77 75 }; 76 + 77 + extern const char *soc15_ih_clientid_name[]; 78 78 79 79 #endif 80 80