Skip to contentSkip to conversation

drm/amdgpu: Increase IH soft ring size for GFX v9.4.3

PATCH Superseded Philip Yang 3 participants 5 messages Sep 15, 2023 – Sep 20, 2023

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

PATCH 1/1 drm/amdgpu: Increase IH soft ring size for GFX v9.4.3

On GFX v9.4.3, application have random timeout failure when XNACK on, with dmesg log "amdgpu: IH soft ring buffer overflow 0x900, 0x900", means retry CAM has more than 256 entries. After increasing IH soft ring to 512 entries, the test passed repeatly, no IH soft ring overflow message.

---
 drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +1 -1
index ddfc6941f9d5..f9cde0d083fa 100644
@@ -566,7 +566,7 @@ static int vega20_ih_sw_init(void *handle)
 	/* initialize ih control registers offset */
 	vega20_ih_init_register_offset(adev);
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, use_bus_addr);
+	r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE * 2, use_bus_addr);
 	if (r)
 		return r;
 
Signature · 1 line
2.35.1
#1 lore raw

Am 15.09.23 um 21:34 schrieb Philip Yang:

Quoted 7 lines

On GFX v9.4.3, application have random timeout failure when XNACK on, with dmesg log "amdgpu: IH soft ring buffer overflow 0x900, 0x900", means retry CAM has more than 256 entries. After increasing IH soft ring to 512 entries, the test passed repeatly, no IH soft ring overflow message.

I suggest to have a new define for those cases or maybe even completely drop the define and fixed values and a comment.

Christian.

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vega20_ih.c +1 -1
index ddfc6941f9d5..f9cde0d083fa 100644
@@ -566,7 +566,7 @@ static int vega20_ih_sw_init(void *handle)
  	/* initialize ih control registers offset */
  	vega20_ih_init_register_offset(adev);
 
-	r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, use_bus_addr);
+	r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE * 2, use_bus_addr);
  	if (r)
  		return r;
 
#2 lore raw

PATCH v2 1/1 drm/amdgpu: Increase IH soft ring size for GFX v9.4.3 dGPU

In reply to Philip Yang

On GFX v9.4.3 dGPU, applications have random timeout failure when XNACK on, dmesg log has "amdgpu: IH soft ring buffer overflow 0x900, 0x900", because dGPU mode has 272 cam entries. After increasing IH soft ring to 512 entries, no more IH soft ring overflow message and application passed.

Fixes eb3220ab4793 ("drm/amdgpu: Increase soft IH ring size")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h +1 -1
index 6c6184f0dbc1..508f02eb0cf8 100644
@@ -28,7 +28,7 @@
 #define AMDGPU_IH_MAX_NUM_IVS	32
 
 #define IH_RING_SIZE	(256 * 1024)
-#define IH_SW_RING_SIZE	(8 * 1024)	/* enough for 256 CAM entries */
+#define IH_SW_RING_SIZE	(16 * 1024)	/* enough for 512 CAM entries */
 
 struct amdgpu_device;
 struct amdgpu_iv_entry;
Signature · 1 line
2.35.1
Reviewed-by on v2 1/1
#3 lore raw

Re: [PATCH v2] drm/amdgpu: Increase IH soft ring size for GFX v9.4.3 dGPU

Quoted 8 lines · Philip Yang

On GFX v9.4.3 dGPU, applications have random timeout failure when XNACK on, dmesg log has "amdgpu: IH soft ring buffer overflow 0x900, 0x900", because dGPU mode has 272 cam entries. After increasing IH soft ring to 512 entries, no more IH soft ring overflow message and application passed.

Fixes eb3220ab4793 ("drm/amdgpu: Increase soft IH ring size")
Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h +1 -1
index 6c6184f0dbc1..508f02eb0cf8 100644
@@ -28,7 +28,7 @@
  #define AMDGPU_IH_MAX_NUM_IVS	32
 
  #define IH_RING_SIZE	(256 * 1024)
-#define IH_SW_RING_SIZE	(8 * 1024)	/* enough for 256 CAM entries */
+#define IH_SW_RING_SIZE	(16 * 1024)	/* enough for 512 CAM entries */
 
  struct amdgpu_device;
  struct amdgpu_iv_entry;
Reviewed-by on v2 1/1
#4 lore raw

Re: [PATCH v2] drm/amdgpu: Increase IH soft ring size for GFX v9.4.3 dGPU

In reply to Philip Yang

Am 19.09.23 um 16:17 schrieb Philip Yang:

Quoted 8 lines

On GFX v9.4.3 dGPU, applications have random timeout failure when XNACK on, dmesg log has "amdgpu: IH soft ring buffer overflow 0x900, 0x900", because dGPU mode has 272 cam entries. After increasing IH soft ring to 512 entries, no more IH soft ring overflow message and application passed.

Fixes eb3220ab4793 ("drm/amdgpu: Increase soft IH ring size")
Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h +1 -1
index 6c6184f0dbc1..508f02eb0cf8 100644
@@ -28,7 +28,7 @@
  #define AMDGPU_IH_MAX_NUM_IVS	32
 
  #define IH_RING_SIZE	(256 * 1024)
-#define IH_SW_RING_SIZE	(8 * 1024)	/* enough for 256 CAM entries */
+#define IH_SW_RING_SIZE	(16 * 1024)	/* enough for 512 CAM entries */
 
  struct amdgpu_device;
  struct amdgpu_iv_entry;