<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm working on the mmhub clients list. Will send out patches for them soon.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Wednesday, September 2, 2020 3:17 AM<br>
<b>To:</b> Kuehling, Felix <Felix.Kuehling@amd.com>; Alex Deucher <alexdeucher@gmail.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> Re: [PATCH 2/2] drm/amdgpu/gmc10: print client id string for gfxhub</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 02.09.20 um 04:32 schrieb Felix Kuehling:<br>
> Should there a corresponding change in mmhub_v2_0.c?<br>
<br>
It would be at least nice to have.<br>
<br>
Maybe we should put a pointer to the array and its size into the hub <br>
structure instead?<br>
<br>
Anyway Reviewed-by: Christian König <christian.koenig@amd.com> for now.<br>
<br>
Christian.<br>
<br>
><br>
> Other than that, the series is<br>
><br>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com><br>
><br>
> On 2020-09-01 5:51 p.m., Alex Deucher wrote:<br>
>> Print the name of the client rather than the number. This<br>
>> makes it easier to debug what block is causing the fault.<br>
>><br>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
>> ---<br>
>> drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 30 +++++++++++++++++++++---<br>
>> drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 30 +++++++++++++++++++++---<br>
>> 2 files changed, 54 insertions(+), 6 deletions(-)<br>
>><br>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
>> index 76acd7f7723e..b882ac59879a 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
>> @@ -31,6 +31,27 @@<br>
>> #include "soc15_common.h"<br>
>> +static const char *gfxhub_client_ids[] = {<br>
>> + "CB/DB",<br>
>> + "Reserved",<br>
>> + "GE1",<br>
>> + "GE2",<br>
>> + "CPF",<br>
>> + "CPC",<br>
>> + "CPG",<br>
>> + "RLC",<br>
>> + "TCP",<br>
>> + "SQC (inst)",<br>
>> + "SQC (data)",<br>
>> + "SQG",<br>
>> + "Reserved",<br>
>> + "SDMA0",<br>
>> + "SDMA1",<br>
>> + "GCR",<br>
>> + "SDMA2",<br>
>> + "SDMA3",<br>
>> +};<br>
>> +<br>
>> static uint32_t gfxhub_v2_0_get_invalidate_req(unsigned int vmid,<br>
>> uint32_t flush_type)<br>
>> {<br>
>> @@ -55,12 +76,15 @@ static void<br>
>> gfxhub_v2_0_print_l2_protection_fault_status(struct amdgpu_device <br>
>> *adev,<br>
>> uint32_t status)<br>
>> {<br>
>> + u32 cid = REG_GET_FIELD(status,<br>
>> + GCVM_L2_PROTECTION_FAULT_STATUS, CID);<br>
>> +<br>
>> dev_err(adev->dev,<br>
>> "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",<br>
>> status);<br>
>> - dev_err(adev->dev, "\t Faulty UTCL2 client ID: 0x%lx\n",<br>
>> - REG_GET_FIELD(status,<br>
>> - GCVM_L2_PROTECTION_FAULT_STATUS, CID));<br>
>> + dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n",<br>
>> + cid >= ARRAY_SIZE(gfxhub_client_ids) ? "unknown" : <br>
>> gfxhub_client_ids[cid],<br>
>> + cid);<br>
>> dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",<br>
>> REG_GET_FIELD(status,<br>
>> GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));<br>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
>> index 80c906a0383f..237a9ff5afa0 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
>> @@ -31,6 +31,27 @@<br>
>> #include "soc15_common.h"<br>
>> +static const char *gfxhub_client_ids[] = {<br>
>> + "CB/DB",<br>
>> + "Reserved",<br>
>> + "GE1",<br>
>> + "GE2",<br>
>> + "CPF",<br>
>> + "CPC",<br>
>> + "CPG",<br>
>> + "RLC",<br>
>> + "TCP",<br>
>> + "SQC (inst)",<br>
>> + "SQC (data)",<br>
>> + "SQG",<br>
>> + "Reserved",<br>
>> + "SDMA0",<br>
>> + "SDMA1",<br>
>> + "GCR",<br>
>> + "SDMA2",<br>
>> + "SDMA3",<br>
>> +};<br>
>> +<br>
>> static uint32_t gfxhub_v2_1_get_invalidate_req(unsigned int vmid,<br>
>> uint32_t flush_type)<br>
>> {<br>
>> @@ -55,12 +76,15 @@ static void<br>
>> gfxhub_v2_1_print_l2_protection_fault_status(struct amdgpu_device <br>
>> *adev,<br>
>> uint32_t status)<br>
>> {<br>
>> + u32 cid = REG_GET_FIELD(status,<br>
>> + GCVM_L2_PROTECTION_FAULT_STATUS, CID);<br>
>> +<br>
>> dev_err(adev->dev,<br>
>> "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",<br>
>> status);<br>
>> - dev_err(adev->dev, "\t Faulty UTCL2 client ID: 0x%lx\n",<br>
>> - REG_GET_FIELD(status,<br>
>> - GCVM_L2_PROTECTION_FAULT_STATUS, CID));<br>
>> + dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n",<br>
>> + cid >= ARRAY_SIZE(gfxhub_client_ids) ? "unknown" : <br>
>> gfxhub_client_ids[cid],<br>
>> + cid);<br>
>> dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",<br>
>> REG_GET_FIELD(status,<br>
>> GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));<br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> amd-gfx@lists.freedesktop.org<br>
> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C0d36fe896c0d4f7605d908d84f104fa2%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637346278764796534&sdata=gE2GPBkm3S4KDP9hg9itNXEs%2F4E1QnkPYmELRWsRdKE%3D&reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C0d36fe896c0d4f7605d908d84f104fa2%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637346278764796534&sdata=gE2GPBkm3S4KDP9hg9itNXEs%2F4E1QnkPYmELRWsRdKE%3D&reserved=0</a><br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>