Skip to contentSkip to conversation

drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ

PATCH Applied John B. Moore 3 participants 3 messages Apr 29

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

PATCH v3 1/1 drm/amdgpu/gfx9: drop unnecessary 64-bit fence flag check in KIQ

Remove the BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT) assertion from gfx_v9_0_ring_emit_fence_kiq(). The KIQ hardware supports 64-bit fence writes; the 32-bit writeback address constraint is an upper-layer convention, not a hardware limitation. The check serves no purpose and should not be present.

Found by code inspection while investigating related BUG_ON assertions in the GFX and compute ring emission paths.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -3
index 47e81c33d..fb2a0f1af 100644
@@ -5679,9 +5679,6 @@ static void gfx_v9_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
 	struct amdgpu_device *adev = ring->adev;
 
-	/* we only allocate 32bit for each seq wb address */
-	BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
-
 	/* write fence seq to the "addr" */
 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
 	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
Signature · 1 line
2.43.0
maintainer Reviewed-by on v3 1/1
#1 lore raw
Quoted 10 lines · John B. Moore

Remove the BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT) assertion from gfx_v9_0_ring_emit_fence_kiq(). The KIQ hardware supports 64-bit fence writes; the 32-bit writeback address constraint is an upper-layer convention, not a hardware limitation. The check serves no purpose and should not be present.

Found by code inspection while investigating related BUG_ON assertions in the GFX and compute ring emission paths.

Quoted 17 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -3
index 47e81c33d..fb2a0f1af 100644
@@ -5679,9 +5679,6 @@ static void gfx_v9_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
 	struct amdgpu_device *adev = ring->adev;
 
-	/* we only allocate 32bit for each seq wb address */
-	BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
-
 	/* write fence seq to the "addr" */
 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
 	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
Applied
#2 lore raw

Applied. Please double check your mail client. It seems to have mangled the patch, so I had to manually fix it up.

Thanks!

Alex

Quoted 33 lines · Christian König
Quoted 10 lines · John B. Moore

Remove the BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT) assertion from gfx_v9_0_ring_emit_fence_kiq(). The KIQ hardware supports 64-bit fence writes; the 32-bit writeback address constraint is an upper-layer convention, not a hardware limitation. The check serves no purpose and should not be present.

Found by code inspection while investigating related BUG_ON assertions in the GFX and compute ring emission paths.

Quoted 17 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -3
index 47e81c33d..fb2a0f1af 100644
@@ -5679,9 +5679,6 @@ static void gfx_v9_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
      struct amdgpu_device *adev = ring->adev;
 
-     /* we only allocate 32bit for each seq wb address */
-     BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
-
      /* write fence seq to the "addr" */
      amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
      amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |