* [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
@ 2017-03-27 22:25 Felix Kuehling
[not found] ` <1490653526-30073-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Felix Kuehling @ 2017-03-27 22:25 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Felix Kuehling
Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
up the VM fault message format and use rate-limiting similar to
other ASICs.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 232c208..9831025 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
}
- DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
- "at page 0x%016llx from %d\n"
- "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
- entry->vm_id_src ? "mmhub" : "gfxhub",
- entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
- addr, entry->client_id, status);
+ if (printk_ratelimit()) {
+ dev_err(adev->dev,
+ "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u)\n",
+ entry->vm_id_src ? "mmhub" : "gfxhub",
+ entry->src_id, entry->ring_id, entry->vm_id,
+ entry->pas_id);
+ dev_err(adev->dev, " at page 0x%016llx from %d\n",
+ addr, entry->client_id);
+ dev_err(adev->dev, "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
+ status);
+ }
return 0;
}
@@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
/* This interrupt is VMC page fault.*/
r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
&adev->mc.vm_fault);
+ r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
+ &adev->mc.vm_fault);
if (r)
return r;
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <1490653526-30073-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-28 1:23 ` Zhang, Jerry (Junwei)
[not found] ` <58D9BB23.4070009-5C7GfCeVMHo@public.gmane.org>
2017-03-28 13:27 ` Deucher, Alexander
1 sibling, 1 reply; 9+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-03-28 1:23 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 03/28/2017 06:25 AM, Felix Kuehling wrote:
> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
> up the VM fault message format and use rate-limiting similar to
> other ASICs.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
May be better to split it into 2 patches
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 232c208..9831025 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
> }
>
> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
> - "at page 0x%016llx from %d\n"
> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> - entry->vm_id_src ? "mmhub" : "gfxhub",
> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
> - addr, entry->client_id, status);
> + if (printk_ratelimit()) {
> + dev_err(adev->dev,
> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u)\n",
> + entry->vm_id_src ? "mmhub" : "gfxhub",
> + entry->src_id, entry->ring_id, entry->vm_id,
> + entry->pas_id);
> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
> + addr, entry->client_id);
> + dev_err(adev->dev, "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> + status);
> + }
>
> return 0;
> }
> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
> /* This interrupt is VMC page fault.*/
> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
> &adev->mc.vm_fault);
> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
> + &adev->mc.vm_fault);
>
> if (r)
> return r;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <58D9BB23.4070009-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-28 7:40 ` Christian König
2017-03-28 18:10 ` Felix Kuehling
1 sibling, 0 replies; 9+ messages in thread
From: Christian König @ 2017-03-28 7:40 UTC (permalink / raw)
To: Zhang, Jerry (Junwei), Felix Kuehling,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 28.03.2017 um 03:23 schrieb Zhang, Jerry (Junwei):
>
>
> On 03/28/2017 06:25 AM, Felix Kuehling wrote:
>> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
>> up the VM fault message format and use rate-limiting similar to
>> other ASICs.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
> May be better to split it into 2 patches
Yeah, would be nice to have. But should work this way as well and the
hardware isn't even public.
> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
>> 1 file changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 232c208..9831025 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
>> amdgpu_device *adev,
>> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>> }
>>
>> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
>> pas_id:%u) "
>> - "at page 0x%016llx from %d\n"
>> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> - entry->vm_id_src ? "mmhub" : "gfxhub",
>> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
>> - addr, entry->client_id, status);
>> + if (printk_ratelimit()) {
>> + dev_err(adev->dev,
>> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
>> pas_id:%u)\n",
>> + entry->vm_id_src ? "mmhub" : "gfxhub",
>> + entry->src_id, entry->ring_id, entry->vm_id,
>> + entry->pas_id);
>> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
>> + addr, entry->client_id);
>> + dev_err(adev->dev, "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> + status);
>> + }
>>
>> return 0;
>> }
>> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
>> /* This interrupt is VMC page fault.*/
>> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
>> &adev->mc.vm_fault);
>> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
>> + &adev->mc.vm_fault);
>>
>> if (r)
>> return r;
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <1490653526-30073-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-03-28 1:23 ` Zhang, Jerry (Junwei)
@ 2017-03-28 13:27 ` Deucher, Alexander
1 sibling, 0 replies; 9+ messages in thread
From: Deucher, Alexander @ 2017-03-28 13:27 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Kuehling, Felix
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Felix Kuehling
> Sent: Monday, March 27, 2017 6:25 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Kuehling, Felix
> Subject: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
>
> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
> up the VM fault message format and use rate-limiting similar to
> other ASICs.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
> 1 file changed, 13 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 232c208..9831025 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
> amdgpu_device *adev,
> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
> }
>
> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
> pas_id:%u) "
> - "at page 0x%016llx from %d\n"
> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> - entry->vm_id_src ? "mmhub" : "gfxhub",
> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
> - addr, entry->client_id, status);
> + if (printk_ratelimit()) {
> + dev_err(adev->dev,
> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
> pas_id:%u)\n",
> + entry->vm_id_src ? "mmhub" : "gfxhub",
> + entry->src_id, entry->ring_id, entry->vm_id,
> + entry->pas_id);
> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
> + addr, entry->client_id);
> + dev_err(adev->dev,
> "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> + status);
> + }
>
> return 0;
> }
> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
> /* This interrupt is VMC page fault.*/
> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
> &adev->mc.vm_fault);
> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
> + &adev->mc.vm_fault);
>
> if (r)
> return r;
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <58D9BB23.4070009-5C7GfCeVMHo@public.gmane.org>
2017-03-28 7:40 ` Christian König
@ 2017-03-28 18:10 ` Felix Kuehling
[not found] ` <e518dba8-03c1-5b8f-99a1-e0f7f5254c2f-5C7GfCeVMHo@public.gmane.org>
1 sibling, 1 reply; 9+ messages in thread
From: Felix Kuehling @ 2017-03-28 18:10 UTC (permalink / raw)
To: Zhang, Jerry (Junwei), amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1: Type: text/plain, Size: 2445 bytes --]
On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote:
>
>
> On 03/28/2017 06:25 AM, Felix Kuehling wrote:
>> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
>> up the VM fault message format and use rate-limiting similar to
>> other ASICs.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
>
> May be better to split it into 2 patches
> Reviewed-by: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
I had to rebase my patch and had to resolve a conflict with an SRIOV
change that just landed. So I split it into two commits while I was at
it. Please review the attached patches.
Thanks,
Felix
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
>> 1 file changed, 13 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 232c208..9831025 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
>> amdgpu_device *adev,
>> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>> }
>>
>> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
>> pas_id:%u) "
>> - "at page 0x%016llx from %d\n"
>> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> - entry->vm_id_src ? "mmhub" : "gfxhub",
>> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
>> - addr, entry->client_id, status);
>> + if (printk_ratelimit()) {
>> + dev_err(adev->dev,
>> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
>> pas_id:%u)\n",
>> + entry->vm_id_src ? "mmhub" : "gfxhub",
>> + entry->src_id, entry->ring_id, entry->vm_id,
>> + entry->pas_id);
>> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
>> + addr, entry->client_id);
>> + dev_err(adev->dev, "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> + status);
>> + }
>>
>> return 0;
>> }
>> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
>> /* This interrupt is VMC page fault.*/
>> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
>> &adev->mc.vm_fault);
>> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
>> + &adev->mc.vm_fault);
>>
>> if (r)
>> return r;
>>
[-- Attachment #2: 0001-drm-amdgpu-Register-UTCL2-as-a-source-of-VM-faults.patch --]
[-- Type: text/x-patch, Size: 926 bytes --]
>From 9690de839e9ee7f6fc31cd777ffde8770858edb0 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
Date: Tue, 28 Mar 2017 13:41:11 -0400
Subject: [PATCH 1/2] drm/amdgpu: Register UTCL2 as a source of VM faults
Signed-off-by: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 87bea71..981d3d9 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -556,6 +556,8 @@ static int gmc_v9_0_sw_init(void *handle)
/* This interrupt is VMC page fault.*/
r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
&adev->mc.vm_fault);
+ r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
+ &adev->mc.vm_fault);
if (r)
return r;
--
1.9.1
[-- Attachment #3: 0002-drm-amdgpu-Clean-up-GFX-9-VM-fault-messages.patch --]
[-- Type: text/x-patch, Size: 2270 bytes --]
>From 9d47433ae1e799cacab2b002c75fcda41543beed Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
Date: Tue, 28 Mar 2017 13:42:31 -0400
Subject: [PATCH 2/2] drm/amdgpu: Clean up GFX 9 VM fault messages
Clean up the VM fault message format and use rate-limiting similar
to other ASICs.
Signed-off-by: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 981d3d9..1e4734d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -131,7 +131,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
{
struct amdgpu_vmhub *gfxhub = &adev->vmhub[AMDGPU_GFXHUB];
struct amdgpu_vmhub *mmhub = &adev->vmhub[AMDGPU_MMHUB];
- uint32_t status;
+ uint32_t status = 0;
u64 addr;
addr = (u64)entry->src_data[0] << 12;
@@ -145,19 +145,20 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
status = RREG32(gfxhub->vm_l2_pro_fault_status);
WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
}
+ }
- DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
- "at page 0x%016llx from %d\n"
- "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
- entry->vm_id_src ? "mmhub" : "gfxhub",
- entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
- addr, entry->client_id, status);
- } else {
- DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
- "at page 0x%016llx from %d\n",
- entry->vm_id_src ? "mmhub" : "gfxhub",
- entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
- addr, entry->client_id);
+ if (printk_ratelimit()) {
+ dev_err(adev->dev,
+ "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u)\n",
+ entry->vm_id_src ? "mmhub" : "gfxhub",
+ entry->src_id, entry->ring_id, entry->vm_id,
+ entry->pas_id);
+ dev_err(adev->dev, " at page 0x%016llx from %d\n",
+ addr, entry->client_id);
+ if (!amdgpu_sriov_vf(adev))
+ dev_err(adev->dev,
+ "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
+ status);
}
return 0;
--
1.9.1
[-- Attachment #4: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <e518dba8-03c1-5b8f-99a1-e0f7f5254c2f-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-28 18:37 ` Deucher, Alexander
[not found] ` <BN6PR12MB1652CBB8976C3AE74495C534F7320-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Deucher, Alexander @ 2017-03-28 18:37 UTC (permalink / raw)
To: Kuehling, Felix, Zhang, Jerry,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Felix Kuehling
> Sent: Tuesday, March 28, 2017 2:10 PM
> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
>
>
> On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote:
> >
> >
> > On 03/28/2017 06:25 AM, Felix Kuehling wrote:
> >> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
> >> up the VM fault message format and use rate-limiting similar to
> >> other ASICs.
> >>
> >> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> >
> > May be better to split it into 2 patches
> > Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> I had to rebase my patch and had to resolve a conflict with an SRIOV
> change that just landed. So I split it into two commits while I was at
> it. Please review the attached patches.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
> Thanks,
> Felix
>
>
> >
> >> ---
> >> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
> >> 1 file changed, 13 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> >> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> >> index 232c208..9831025 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> >> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
> >> amdgpu_device *adev,
> >> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
> >> }
> >>
> >> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
> >> pas_id:%u) "
> >> - "at page 0x%016llx from %d\n"
> >> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> >> - entry->vm_id_src ? "mmhub" : "gfxhub",
> >> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
> >> - addr, entry->client_id, status);
> >> + if (printk_ratelimit()) {
> >> + dev_err(adev->dev,
> >> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
> >> pas_id:%u)\n",
> >> + entry->vm_id_src ? "mmhub" : "gfxhub",
> >> + entry->src_id, entry->ring_id, entry->vm_id,
> >> + entry->pas_id);
> >> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
> >> + addr, entry->client_id);
> >> + dev_err(adev->dev,
> "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
> >> + status);
> >> + }
> >>
> >> return 0;
> >> }
> >> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
> >> /* This interrupt is VMC page fault.*/
> >> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
> >> &adev->mc.vm_fault);
> >> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
> >> + &adev->mc.vm_fault);
> >>
> >> if (r)
> >> return r;
> >>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <BN6PR12MB1652CBB8976C3AE74495C534F7320-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-03-29 1:28 ` Zhang, Jerry (Junwei)
[not found] ` <58DB0DD4.3040504-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-03-29 1:28 UTC (permalink / raw)
To: Deucher, Alexander, Kuehling, Felix,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On 03/29/2017 02:37 AM, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>> Of Felix Kuehling
>> Sent: Tuesday, March 28, 2017 2:10 PM
>> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
>>
>>
>> On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote:
>> >
>> >
>> > On 03/28/2017 06:25 AM, Felix Kuehling wrote:
>> >> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
>> >> up the VM fault message format and use rate-limiting similar to
>> >> other ASICs.
>> >>
>> >> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>> >
>> > May be better to split it into 2 patches
>> > Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>
>> I had to rebase my patch and had to resolve a conflict with an SRIOV
>> change that just landed. So I split it into two commits while I was at
>> it. Please review the attached patches.
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Thanks.
Jerry
>
>>
>> Thanks,
>> Felix
>>
>>
>> >
>> >> ---
>> >> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
>> >> 1 file changed, 13 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> >> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> >> index 232c208..9831025 100644
>> >> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> >> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> >> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
>> >> amdgpu_device *adev,
>> >> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>> >> }
>> >>
>> >> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
>> >> pas_id:%u) "
>> >> - "at page 0x%016llx from %d\n"
>> >> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> >> - entry->vm_id_src ? "mmhub" : "gfxhub",
>> >> - entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
>> >> - addr, entry->client_id, status);
>> >> + if (printk_ratelimit()) {
>> >> + dev_err(adev->dev,
>> >> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
>> >> pas_id:%u)\n",
>> >> + entry->vm_id_src ? "mmhub" : "gfxhub",
>> >> + entry->src_id, entry->ring_id, entry->vm_id,
>> >> + entry->pas_id);
>> >> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
>> >> + addr, entry->client_id);
>> >> + dev_err(adev->dev,
>> "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>> >> + status);
>> >> + }
>> >>
>> >> return 0;
>> >> }
>> >> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
>> >> /* This interrupt is VMC page fault.*/
>> >> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
>> >> &adev->mc.vm_fault);
>> >> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
>> >> + &adev->mc.vm_fault);
>> >>
>> >> if (r)
>> >> return r;
>> >>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <58DB0DD4.3040504-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-29 1:37 ` Felix Kuehling
[not found] ` <7c852e67-d508-03d0-c148-b3dc6b28634c-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 9+ messages in thread
From: Felix Kuehling @ 2017-03-29 1:37 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Sorry, I pushed it already, just with Alex's R-B.
Thanks,
Felix
On 17-03-28 09:28 PM, Zhang, Jerry (Junwei) wrote:
> On 03/29/2017 02:37 AM, Deucher, Alexander wrote:
>>> -----Original Message-----
>>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>>> Of Felix Kuehling
>>> Sent: Tuesday, March 28, 2017 2:10 PM
>>> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
>>> Subject: Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
>>>
>>>
>>> On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote:
>>> >
>>> >
>>> > On 03/28/2017 06:25 AM, Felix Kuehling wrote:
>>> >> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
>>> >> up the VM fault message format and use rate-limiting similar to
>>> >> other ASICs.
>>> >>
>>> >> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>> >
>>> > May be better to split it into 2 patches
>>> > Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>>
>>> I had to rebase my patch and had to resolve a conflict with an SRIOV
>>> change that just landed. So I split it into two commits while I was at
>>> it. Please review the attached patches.
>>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> Thanks.
>
> Jerry
>>
>>>
>>> Thanks,
>>> Felix
>>>
>>>
>>> >
>>> >> ---
>>> >> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
>>> >> 1 file changed, 13 insertions(+), 6 deletions(-)
>>> >>
>>> >> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> >> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> >> index 232c208..9831025 100644
>>> >> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> >> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>> >> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
>>> >> amdgpu_device *adev,
>>> >> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>>> >> }
>>> >>
>>> >> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
>>> >> pas_id:%u) "
>>> >> - "at page 0x%016llx from %d\n"
>>> >> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>> >> - entry->vm_id_src ? "mmhub" : "gfxhub",
>>> >> - entry->src_id, entry->ring_id, entry->vm_id,
>>> entry->pas_id,
>>> >> - addr, entry->client_id, status);
>>> >> + if (printk_ratelimit()) {
>>> >> + dev_err(adev->dev,
>>> >> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
>>> >> pas_id:%u)\n",
>>> >> + entry->vm_id_src ? "mmhub" : "gfxhub",
>>> >> + entry->src_id, entry->ring_id, entry->vm_id,
>>> >> + entry->pas_id);
>>> >> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
>>> >> + addr, entry->client_id);
>>> >> + dev_err(adev->dev,
>>> "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>> >> + status);
>>> >> + }
>>> >>
>>> >> return 0;
>>> >> }
>>> >> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
>>> >> /* This interrupt is VMC page fault.*/
>>> >> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
>>> >> &adev->mc.vm_fault);
>>> >> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
>>> >> + &adev->mc.vm_fault);
>>> >>
>>> >> if (r)
>>> >> return r;
>>> >>
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
[not found] ` <7c852e67-d508-03d0-c148-b3dc6b28634c-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-29 1:40 ` Zhang, Jerry (Junwei)
0 siblings, 0 replies; 9+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-03-29 1:40 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 03/29/2017 09:37 AM, Felix Kuehling wrote:
> Sorry, I pushed it already, just with Alex's R-B.
That's fine.
Take it easy :)
Jerry
>
> Thanks,
> Felix
>
>
> On 17-03-28 09:28 PM, Zhang, Jerry (Junwei) wrote:
>> On 03/29/2017 02:37 AM, Deucher, Alexander wrote:
>>>> -----Original Message-----
>>>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>>>> Of Felix Kuehling
>>>> Sent: Tuesday, March 28, 2017 2:10 PM
>>>> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
>>>> Subject: Re: [PATCH] drm/amdgpu: Improve Vega10 VM fault handling
>>>>
>>>>
>>>> On 17-03-27 09:23 PM, Zhang, Jerry (Junwei) wrote:
>>>>>
>>>>>
>>>>> On 03/28/2017 06:25 AM, Felix Kuehling wrote:
>>>>>> Register AMDGPU_IH_CLIENTID_UTCL2 as a source of VM faults. Clean
>>>>>> up the VM fault message format and use rate-limiting similar to
>>>>>> other ASICs.
>>>>>>
>>>>>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>>>>
>>>>> May be better to split it into 2 patches
>>>>> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>>>
>>>> I had to rebase my patch and had to resolve a conflict with an SRIOV
>>>> change that just landed. So I split it into two commits while I was at
>>>> it. Please review the attached patches.
>>>
>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>
>> Thanks.
>>
>> Jerry
>>>
>>>>
>>>> Thanks,
>>>> Felix
>>>>
>>>>
>>>>>
>>>>>> ---
>>>>>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 19 +++++++++++++------
>>>>>> 1 file changed, 13 insertions(+), 6 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>>>>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>>>>> index 232c208..9831025 100644
>>>>>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>>>>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>>>>>> @@ -145,12 +145,17 @@ static int gmc_v9_0_process_interrupt(struct
>>>>>> amdgpu_device *adev,
>>>>>> WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
>>>>>> }
>>>>>>
>>>>>> - DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u
>>>>>> pas_id:%u) "
>>>>>> - "at page 0x%016llx from %d\n"
>>>>>> - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>>>>> - entry->vm_id_src ? "mmhub" : "gfxhub",
>>>>>> - entry->src_id, entry->ring_id, entry->vm_id,
>>>> entry->pas_id,
>>>>>> - addr, entry->client_id, status);
>>>>>> + if (printk_ratelimit()) {
>>>>>> + dev_err(adev->dev,
>>>>>> + "[%s] VMC page fault (src_id:%u ring:%u vm_id:%u
>>>>>> pas_id:%u)\n",
>>>>>> + entry->vm_id_src ? "mmhub" : "gfxhub",
>>>>>> + entry->src_id, entry->ring_id, entry->vm_id,
>>>>>> + entry->pas_id);
>>>>>> + dev_err(adev->dev, " at page 0x%016llx from %d\n",
>>>>>> + addr, entry->client_id);
>>>>>> + dev_err(adev->dev,
>>>> "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n",
>>>>>> + status);
>>>>>> + }
>>>>>>
>>>>>> return 0;
>>>>>> }
>>>>>> @@ -539,6 +544,8 @@ static int gmc_v9_0_sw_init(void *handle)
>>>>>> /* This interrupt is VMC page fault.*/
>>>>>> r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_VMC, 0,
>>>>>> &adev->mc.vm_fault);
>>>>>> + r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_UTCL2, 0,
>>>>>> + &adev->mc.vm_fault);
>>>>>>
>>>>>> if (r)
>>>>>> return r;
>>>>>>
>>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-03-29 1:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27 22:25 [PATCH] drm/amdgpu: Improve Vega10 VM fault handling Felix Kuehling
[not found] ` <1490653526-30073-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-03-28 1:23 ` Zhang, Jerry (Junwei)
[not found] ` <58D9BB23.4070009-5C7GfCeVMHo@public.gmane.org>
2017-03-28 7:40 ` Christian König
2017-03-28 18:10 ` Felix Kuehling
[not found] ` <e518dba8-03c1-5b8f-99a1-e0f7f5254c2f-5C7GfCeVMHo@public.gmane.org>
2017-03-28 18:37 ` Deucher, Alexander
[not found] ` <BN6PR12MB1652CBB8976C3AE74495C534F7320-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-29 1:28 ` Zhang, Jerry (Junwei)
[not found] ` <58DB0DD4.3040504-5C7GfCeVMHo@public.gmane.org>
2017-03-29 1:37 ` Felix Kuehling
[not found] ` <7c852e67-d508-03d0-c148-b3dc6b28634c-5C7GfCeVMHo@public.gmane.org>
2017-03-29 1:40 ` Zhang, Jerry (Junwei)
2017-03-28 13:27 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.