Skip to contentSkip to conversation

drm/amdgpu/sdma5: do not execute 0-sized IBs (v2)

PATCH In review Pelloux-prayer, Pierre-eric 3 participants 4 messages Oct 22, 2019 – Oct 23, 2019 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/sdma5: do not execute 0-sized IBs (v2)

This seems to help with https://bugs.freedesktop.org/show_bug.cgi?id=111481.

v2: insert a NOP instead of skipping all 0-sized IBs to avoid breaking older hw

---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -0
index fb48622c2abd..6e1b25bd1fe7 100644
@@ -309,6 +309,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
 
 	job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo);
 	job->vm_needs_flush = true;
+	job->ibs->ptr[job->ibs->length_dw++] = ring->funcs->nop;
 	amdgpu_ring_pad_ib(ring, &job->ibs[0]);
 	r = amdgpu_job_submit(job, &adev->mman.entity,
 			      AMDGPU_FENCE_OWNER_UNDEFINED, &fence);
Signature · 6 lines
2.23.0.rc1

_______________________________________________
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): 20191022172136.15391-1-pierre-eric.pelloux-prayer-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 22.10.19 um 19:22 schrieb Pelloux-prayer, Pierre-eric:

Quoted 5 lines

This seems to help with https://bugs.freedesktop.org/show_bug.cgi?id=111481.

v2: insert a NOP instead of skipping all 0-sized IBs to avoid breaking older hw

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +0 -0
index fb48622c2abd..6e1b25bd1fe7 100644

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · line 315

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -0
@@ -309,6 +309,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
 
  	job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo);
  	job->vm_needs_flush = true;
+	job->ibs->ptr[job->ibs->length_dw++] = ring->funcs->nop;
  	amdgpu_ring_pad_ib(ring, &job->ibs[0]);
  	r = amdgpu_job_submit(job, &adev->mman.entity,
  			      AMDGPU_FENCE_OWNER_UNDEFINED, &fence);

_______________________________________________
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): b3ddc981-c465-b008-705a-d01e44b783e3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 12 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Wednesday, October 23, 2019 3:33 AM
To: Pelloux-prayer, Pierre-eric <[email protected]>; amd- [email protected]
Subject: Re: [PATCH] drm/amdgpu/sdma5: do not execute 0-sized IBs (v2)

Am 22.10.19 um 19:22 schrieb Pelloux-prayer, Pierre-eric:

Quoted 1 line

This seems to help with

https://bugs.freedesktop.org/show_bug.cgi?id=111481.

Quoted 1 line
Quoted 7 lines
Quoted 1 line

v2: insert a NOP instead of skipping all 0-sized IBs to avoid breaking older

hw

Quoted 2 lines
Signed-off-by Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-

[email protected]>

Do nop packets have any alignment requirements on SDMA? Some of the other packets do.

Alex

Quoted 13 lines

Review

Quoted 6 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 +
  1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c static void gmc_v10_0_flush_gpu_tlb(struct

Quoted 4 lines

index fb48622c2abd..6e1b25bd1fe7 100644

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +0 -0
@@ -309,6 +309,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct

amdgpu_device *adev, uint32_t vmid,

Quoted 1 line
Quoted 11 lines

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · line 315

Quoted 6 lines
  	job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo);
  	job->vm_needs_flush = true;
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -0
+	job->ibs->ptr[job->ibs->length_dw++] = ring->funcs->nop;
  	amdgpu_ring_pad_ib(ring, &job->ibs[0]);
  	r = amdgpu_job_submit(job, &adev->mman.entity,
  			      AMDGPU_FENCE_OWNER_UNDEFINED, &fence);

_______________________________________________
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): BN6PR12MB1809E6469D44AE818542299DF76B0-/b2+HYfkarSEx6ez0IUAagdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#6 lore raw

Hi Alex,

Quoted 13 lines · Alexander
Quoted 13 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian König
Sent: Wednesday, October 23, 2019 3:33 AM
To: Pelloux-prayer, Pierre-eric <[email protected]>; amd- [email protected]
Subject: Re: [PATCH] drm/amdgpu/sdma5: do not execute 0-sized IBs (v2)

Am 22.10.19 um 19:22 schrieb Pelloux-prayer, Pierre-eric:

Quoted 1 line

This seems to help with

https://bugs.freedesktop.org/show_bug.cgi?id=111481.

Quoted 2 lines

v2: insert a NOP instead of skipping all 0-sized IBs to avoid breaking older

Quoted 8 lines
Quoted 6 lines

hw

Quoted 2 lines
Signed-off-by Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-

[email protected]>

Do nop packets have any alignment requirements on SDMA? Some of the other packets do.

There's no alignment requirements for nop packets.

Pierre-Eric

Quoted 27 lines

Alex

Quoted 24 lines

Review

Quoted 6 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 +
  1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c static void gmc_v10_0_flush_gpu_tlb(struct

Quoted 4 lines

index fb48622c2abd..6e1b25bd1fe7 100644

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +0 -0
@@ -309,6 +309,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct

amdgpu_device *adev, uint32_t vmid,

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid, · line 315

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -0
  	job->vm_pd_addr = amdgpu_gmc_pd_addr(adev->gart.bo);
  	job->vm_needs_flush = true;
+	job->ibs->ptr[job->ibs->length_dw++] = ring->funcs->nop;
  	amdgpu_ring_pad_ib(ring, &job->ibs[0]);
  	r = amdgpu_job_submit(job, &adev->mman.entity,
  			      AMDGPU_FENCE_OWNER_UNDEFINED, &fence);

_______________________________________________
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