Re: [PATCH 2/2] drm/amdgpu/gmc10: print client id string for gfxhub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]


I'm working on the mmhub clients list.  Will send out patches for them soon.

Alex


From: Christian König <ckoenig.leichtzumerken@xxxxxxxxx>
Sent: Wednesday, September 2, 2020 3:17 AM
To: Kuehling, Felix <Felix.Kuehling@xxxxxxx>; Alex Deucher <alexdeucher@xxxxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: Re: [PATCH 2/2] drm/amdgpu/gmc10: print client id string for gfxhub
 
Am 02.09.20 um 04:32 schrieb Felix Kuehling:
> Should there a corresponding change in mmhub_v2_0.c?

It would be at least nice to have.

Maybe we should put a pointer to the array and its size into the hub
structure instead?

Anyway Reviewed-by: Christian König <christian.koenig@xxxxxxx> for now.

Christian.

>
> Other than that, the series is
>
> Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
>
> On 2020-09-01 5:51 p.m., Alex Deucher wrote:
>> Print the name of the client rather than the number.  This
>> makes it easier to debug what block is causing the fault.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 30 +++++++++++++++++++++---
>>   drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 30 +++++++++++++++++++++---
>>   2 files changed, 54 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
>> index 76acd7f7723e..b882ac59879a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c
>> @@ -31,6 +31,27 @@
>>     #include "soc15_common.h"
>>   +static const char *gfxhub_client_ids[] = {
>> +    "CB/DB",
>> +    "Reserved",
>> +    "GE1",
>> +    "GE2",
>> +    "CPF",
>> +    "CPC",
>> +    "CPG",
>> +    "RLC",
>> +    "TCP",
>> +    "SQC (inst)",
>> +    "SQC (data)",
>> +    "SQG",
>> +    "Reserved",
>> +    "SDMA0",
>> +    "SDMA1",
>> +    "GCR",
>> +    "SDMA2",
>> +    "SDMA3",
>> +};
>> +
>>   static uint32_t gfxhub_v2_0_get_invalidate_req(unsigned int vmid,
>>                              uint32_t flush_type)
>>   {
>> @@ -55,12 +76,15 @@ static void
>>   gfxhub_v2_0_print_l2_protection_fault_status(struct amdgpu_device
>> *adev,
>>                            uint32_t status)
>>   {
>> +    u32 cid = REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, CID);
>> +
>>       dev_err(adev->dev,
>>           "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>           status);
>> -    dev_err(adev->dev, "\t Faulty UTCL2 client ID: 0x%lx\n",
>> -        REG_GET_FIELD(status,
>> -        GCVM_L2_PROTECTION_FAULT_STATUS, CID));
>> +    dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n",
>> +        cid >= ARRAY_SIZE(gfxhub_client_ids) ? "unknown" :
>> gfxhub_client_ids[cid],
>> +        cid);
>>       dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",
>>           REG_GET_FIELD(status,
>>           GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
>> b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
>> index 80c906a0383f..237a9ff5afa0 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c
>> @@ -31,6 +31,27 @@
>>     #include "soc15_common.h"
>>   +static const char *gfxhub_client_ids[] = {
>> +    "CB/DB",
>> +    "Reserved",
>> +    "GE1",
>> +    "GE2",
>> +    "CPF",
>> +    "CPC",
>> +    "CPG",
>> +    "RLC",
>> +    "TCP",
>> +    "SQC (inst)",
>> +    "SQC (data)",
>> +    "SQG",
>> +    "Reserved",
>> +    "SDMA0",
>> +    "SDMA1",
>> +    "GCR",
>> +    "SDMA2",
>> +    "SDMA3",
>> +};
>> +
>>   static uint32_t gfxhub_v2_1_get_invalidate_req(unsigned int vmid,
>>                              uint32_t flush_type)
>>   {
>> @@ -55,12 +76,15 @@ static void
>>   gfxhub_v2_1_print_l2_protection_fault_status(struct amdgpu_device
>> *adev,
>>                            uint32_t status)
>>   {
>> +    u32 cid = REG_GET_FIELD(status,
>> +                GCVM_L2_PROTECTION_FAULT_STATUS, CID);
>> +
>>       dev_err(adev->dev,
>>           "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>           status);
>> -    dev_err(adev->dev, "\t Faulty UTCL2 client ID: 0x%lx\n",
>> -        REG_GET_FIELD(status,
>> -        GCVM_L2_PROTECTION_FAULT_STATUS, CID));
>> +    dev_err(adev->dev, "\t Faulty UTCL2 client ID: %s (0x%x)\n",
>> +        cid >= ARRAY_SIZE(gfxhub_client_ids) ? "unknown" :
>> gfxhub_client_ids[cid],
>> +        cid);
>>       dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n",
>>           REG_GET_FIELD(status,
>>           GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS));
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://nam11.safelinks.protection.outlook.com/?url="">

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux