drm/amdgpu: re-enable retry faults
Subsystems (2)
PATCH 1/3 drm/amdgpu: re-enable retry faults
Now that we have re-reoute faults to the other IH
ring we can enable retries again.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +1 -1
@@ -236,7 +236,7 @@ static void gfxhub_v1_0_setup_vmid_config(struct amdgpu_device *adev) block_size);/* Send no-retry XNACK on fault to suppress VM fault storm. */ tmp =REG_SET_FIELD (tmp,VM_CONTEXT1_CNTL , -RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,0 ); +RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,1 );WREG32_SOC15_OFFSET (GC ,0 , mmVM_CONTEXT1_CNTL, i, tmp);WREG32_SOC15_OFFSET (GC ,0 , mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32, i*2 ,0 );WREG32_SOC15_OFFSET (GC ,0 , mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32, i*2 ,0 );
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +1 -1
@@ -255,7 +255,7 @@ static void mmhub_v1_0_setup_vmid_config(struct amdgpu_device *adev) block_size);/* Send no-retry XNACK on fault to suppress VM fault storm. */ tmp =REG_SET_FIELD (tmp,VM_CONTEXT1_CNTL , -RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,0 ); +RETRY_PERMISSION_OR_INVALID_PAGE_FAULT ,1 );WREG32_SOC15_OFFSET (MMHUB ,0 , mmVM_CONTEXT1_CNTL, i, tmp);WREG32_SOC15_OFFSET (MMHUB ,0 , mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32, i*2 ,0 );WREG32_SOC15_OFFSET (MMHUB ,0 , mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32, i*2 ,0 );
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190312123749.6249-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
PATCH 2/3 drm/amdgpu: free up the first paging queue
We need the first paging queue to handle page faults.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +12 -8
@@ -2266,7 +2266,7 @@ static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) { adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;if (adev->sdma.has_page_queue) - adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].page; + adev->mman.buffer_funcs_ring = &adev->sdma.instance[1 ].page;else adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].ring; }
@@ -2285,15 +2285,19 @@ static void sdma_v4_0_set_vm_pte_funcs(struct amdgpu_device *adev)unsigned i; adev->vm_manager.vm_pte_funcs = &sdma_v4_0_vm_pte_funcs; -for (i =0 ; i < adev->sdma.num_instances; i++) { -if (adev->sdma.has_page_queue) - sched = &adev->sdma.instance[i].page.sched; -else - sched = &adev->sdma.instance[i].ring.sched; - adev->vm_manager.vm_pte_rqs[i] = +if (adev->sdma.has_page_queue) { + sched = &adev->sdma.instance[1 ].page.sched; + adev->vm_manager.vm_pte_rqs[0 ] = &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL ]; + adev->vm_manager.vm_pte_num_rqs =1 ; + }else { +for (i =0 ; i < adev->sdma.num_instances; i++) { + sched = &adev->sdma.instance[i].ring.sched; + adev->vm_manager.vm_pte_rqs[i] = + &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL ]; + } + adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; } - adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; }const struct amdgpu_ip_block_version sdma_v4_0_ip_block = {
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190312123749.6249-2-christian.koenig-5C7GfCeVMHo@public.gmane.org
RE: [PATCH 2/3] drm/amdgpu: free up the first paging queue
I think this would break Raven, which only has one SDMA engine.
Regards,
Felix
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Tuesday, March 12, 2019 8:38 AM
To: [email protected]
Subject: [PATCH 2/3] drm/amdgpu: free up the first paging queue
We need the first paging queue to handle page faults.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -2266,7 +2266,7 @@ static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) { adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;if (adev->sdma.has_page_queue) - adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].page; + adev->mman.buffer_funcs_ring = &adev->sdma.instance[1 ].page;else adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; } @@ -2285,15 +2285,19 @@ static void sdma_v4_0_set_vm_pte_funcs(struct amdgpu_device *adev) unsigned i;
adev->vm_manager.vm_pte_funcs = &sdma_v4_0_vm_pte_funcs;
- for (i = 0; i < adev->sdma.num_instances; i++) {
- if (adev->sdma.has_page_queue)
- sched = &adev->sdma.instance[i].page.sched;
- else
- sched = &adev->sdma.instance[i].ring.sched;
- adev->vm_manager.vm_pte_rqs[i] =
+ if (adev->sdma.has_page_queue) {
+ sched = &adev->sdma.instance[1].page.sched;
+ adev->vm_manager.vm_pte_rqs[0] =
&sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+ adev->vm_manager.vm_pte_num_rqs = 1;
+ } else {
+ for (i = 0; i < adev->sdma.num_instances; i++) {
+ sched = &adev->sdma.instance[i].ring.sched;
+ adev->vm_manager.vm_pte_rqs[i] =
+ &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+ }
+ adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances;
}
- adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances;
}
const struct amdgpu_ip_block_version sdma_v4_0_ip_block = {
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BYAPR12MB317644D82ADEF3CA55530A2B92490-ZGDeBxoHBPks/z/[email protected]
Re: [PATCH 2/3] drm/amdgpu: free up the first paging queue
I don't think Raven has a paging queue in the first place.
Alex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Kuehling, Felix <[email protected]>
Sent: Tuesday, March 12, 2019 11:29 AM
To: Christian König; [email protected]
Subject: RE: [PATCH 2/3] drm/amdgpu: free up the first paging queue
I think this would break Raven, which only has one SDMA engine.
Regards,
Felix
-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Christian König
Sent: Tuesday, March 12, 2019 8:38 AM
To: [email protected]
Subject: [PATCH 2/3] drm/amdgpu: free up the first paging queue
We need the first paging queue to handle page faults.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
@@ -2266,7 +2266,7 @@ static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) { adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;if (adev->sdma.has_page_queue) - adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].page; + adev->mman.buffer_funcs_ring = &adev->sdma.instance[1 ].page;else adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; } @@ -2285,15 +2285,19 @@ static void sdma_v4_0_set_vm_pte_funcs(struct amdgpu_device *adev) unsigned i;
adev->vm_manager.vm_pte_funcs = &sdma_v4_0_vm_pte_funcs;
- for (i = 0; i < adev->sdma.num_instances; i++) {
- if (adev->sdma.has_page_queue)
- sched = &adev->sdma.instance[i].page.sched;
- else
- sched = &adev->sdma.instance[i].ring.sched;
- adev->vm_manager.vm_pte_rqs[i] =
+ if (adev->sdma.has_page_queue) {
+ sched = &adev->sdma.instance[1].page.sched;
+ adev->vm_manager.vm_pte_rqs[0] =
&sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+ adev->vm_manager.vm_pte_num_rqs = 1;
+ } else {
+ for (i = 0; i < adev->sdma.num_instances; i++) {
+ sched = &adev->sdma.instance[i].ring.sched;
+ adev->vm_manager.vm_pte_rqs[i] =
+ &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+ }
+ adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances;
}- adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances;
}
const struct amdgpu_ip_block_version sdma_v4_0_ip_block = {
--
2.17.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB18095A3704551015894223D1F7490-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Re: [PATCH 2/3] drm/amdgpu: free up the first paging queue
To be on the safe side I've adjusted the code to work with any number of SDMA instances.
Christian.
Am 12.03.19 um 16:33 schrieb Deucher, Alexander:
Quoted 70 lines
I don't think Raven has a paging queue in the first place.
Alex
------------------------------------------------------------------------
*From:* amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Kuehling, Felix <[email protected]> *Sent:* Tuesday, March 12, 2019 11:29 AM
*To:* Christian König; [email protected]
*Subject:* RE: [PATCH 2/3] drm/amdgpu: free up the first paging queue
I think this would break Raven, which only has one SDMA engine.Regards,
Felix-----Original Message-----
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> On Behalf Of Christian König
Sent: Tuesday, March 12, 2019 8:38 AM
To: [email protected]
Subject: [PATCH 2/3] drm/amdgpu: free up the first paging queueWe need the first paging queue to handle page faults.
Signed-off-by Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++--------1 file changed, 12 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-1@@ -2266,7 +2266,7 @@ static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) { adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs; if (adev->sdma.has_page_queue) - adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].page; + adev->mman.buffer_funcs_ring = &adev->sdma.instance[1 ].page;else
adev->mman.buffer_funcs_ring= &adev->sdma.instance[0].ring; } @@ -2285,15 +2285,19 @@ static voidsdma_v4_0_set_vm_pte_funcs(struct amdgpu_device *adev)unsigned i;
adev->vm_manager.vm_pte_funcs=&sdma_v4_0_vm_pte_funcs; - for (i = 0; i <adev->sdma.num_instances; i++) { - if (adev->sdma.has_page_queue)
- sched = &adev->sdma.instance[i].page.sched; - else
- sched = &adev->sdma.instance[i].ring.sched; - adev->vm_manager.vm_pte_rqs[i] =
+ if (adev->sdma.has_page_queue) {
+ sched = &adev->sdma.instance[1].page.sched; + adev->vm_manager.vm_pte_rqs[0] = &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+adev->vm_manager.vm_pte_num_rqs= 1;
+ } else {
+ for (i = 0; i <adev->sdma.num_instances; i++) { + sched = &adev->sdma.instance[i].ring.sched; + adev->vm_manager.vm_pte_rqs[i] =
+ &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL];
+ }
+adev->vm_manager.vm_pte_num_rqs=adev->sdma.num_instances;
}
-adev->vm_manager.vm_pte_num_rqs=adev->sdma.num_instances; }const struct
amdgpu_ip_block_versionsdma_v4_0_ip_block= { --
2.17.1
Quoted 8 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 2/3] drm/amdgpu: free up the first paging queue
In reply to a message not in the archiveQuoted 13 lines · Christian König
We need the first paging queue to handle page faults.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) · line 2269
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1
-1@@ -2266,7 +2266,7 @@ static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev) { adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;if (adev->sdma.has_page_queue) - adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].page; + adev->mman.buffer_funcs_ring = &adev->sdma.instance[1 ].page;
Maybe add something like:
if (adev->sdma.num_instances > 1)
adev->mman.buffer_funcs_ring = &adev->sdma.instance[1].page;
else
adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;Quoted 33 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +11
-8else adev->mman.buffer_funcs_ring = &adev->sdma.instance[0 ].ring; }@@ -2285,15 +2285,19 @@ static void sdma_v4_0_set_vm_pte_funcs(struct amdgpu_device *adev)unsigned i; adev->vm_manager.vm_pte_funcs = &sdma_v4_0_vm_pte_funcs; -for (i =0 ; i < adev->sdma.num_instances; i++) { -if (adev->sdma.has_page_queue) - sched = &adev->sdma.instance[i].page.sched; -else - sched = &adev->sdma.instance[i].ring.sched; - adev->vm_manager.vm_pte_rqs[i] = +if (adev->sdma.has_page_queue) { + sched = &adev->sdma.instance[1 ].page.sched; + adev->vm_manager.vm_pte_rqs[0 ] = &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL ]; + adev->vm_manager.vm_pte_num_rqs =1 ; + }else { +for (i =0 ; i < adev->sdma.num_instances; i++) { + sched = &adev->sdma.instance[i].ring.sched; + adev->vm_manager.vm_pte_rqs[i] = + &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL ]; + } + adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; } - adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; }const struct amdgpu_ip_block_version sdma_v4_0_ip_block = { --2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 drm/amdgpu: use more entries for the first paging queue
In reply to a message not in the archiveTo aid recoverable page faults.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +2 -0
@@ -248,6 +248,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,*/ if (ring->funcs->type ==AMDGPU_RING_TYPE_KIQ ) sched_hw_submission =max (sched_hw_submission,256 ); +else if (ring == &adev->sdma.instance[0 ].page) + sched_hw_submission =256 ;if (ring->adev ==NULL ) {if (adev->num_rings >=AMDGPU_MAX_RINGS )
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx