Skip to contentSkip to conversation

drm/amdgpu: increase the MAX ring number

PATCH In review Evan Quan 2 participants 6 messages Dec 12, 2018 – Dec 13, 2018 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/4 drm/amdgpu: increase the MAX ring number

As two more SDMA page queue rings are added on Vega20.

Change-Id I8a3d8fbc924f7c24aaebf17b3f329a4a38fe5a56
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -1
index 4b31c96a2a2c..fe657788024f 100644
@@ -31,7 +31,7 @@
 #endif
 
 /* max number of rings */
-#define AMDGPU_MAX_RINGS		21
+#define AMDGPU_MAX_RINGS		23
 #define AMDGPU_MAX_GFX_RINGS		1
 #define AMDGPU_MAX_COMPUTE_RINGS	8
 #define AMDGPU_MAX_VCE_RINGS		3
Signature · 6 lines
2.19.2

_______________________________________________
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): [email protected]

author
#2 lore raw

PATCH 2/4 drm/amdgpu: use the idle engine 0/1 for page ring 0/1

We need new invalidation engine layout due to new SDMA page queues added.

Change-Id I2f3861689bffb9828c9eae744a7a0de4963ac2b6
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -1
index 6b1ac02a7aac..5f45894c2b81 100644
@@ -679,7 +679,12 @@ static int gmc_v9_0_late_init(void *handle)
 		struct amdgpu_ring *ring = adev->rings[i];
 		unsigned vmhub = ring->funcs->vmhub;
 
-		ring->vm_inv_eng = vm_inv_eng[vmhub]++;
+		if (ring == &adev->sdma.instance[0].page)
+			ring->vm_inv_eng = 0;
+		else if (ring == &adev->sdma.instance[1].page)
+			ring->vm_inv_eng = 1;
+		else
+			ring->vm_inv_eng = vm_inv_eng[vmhub]++;
 		dev_info(adev->dev, "ring %s uses VM inv eng %u on hub %u\n",
 			 ring->name, ring->vm_inv_eng, ring->funcs->vmhub);
 	}
Signature · 6 lines
2.19.2

_______________________________________________
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): [email protected]

#4 lore raw

Re: [PATCH 2/4] drm/amdgpu: use the idle engine 0/1 for page ring 0/1

Am 12.12.18 um 07:54 schrieb Evan Quan:

Quoted 14 lines

We need new invalidation engine layout due to new SDMA page queues added.

Change-Id I2f3861689bffb9828c9eae744a7a0de4963ac2b6
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 6b1ac02a7aac..5f45894c2b81 100644

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_late_init(void *handle) · line 687

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -1
@@ -679,7 +679,12 @@ static int gmc_v9_0_late_init(void *handle)
  		struct amdgpu_ring *ring = adev->rings[i];
  		unsigned vmhub = ring->funcs->vmhub;
 
-		ring->vm_inv_eng = vm_inv_eng[vmhub]++;
+		if (ring == &adev->sdma.instance[0].page)
+			ring->vm_inv_eng = 0;
+		else if (ring == &adev->sdma.instance[1].page)
+			ring->vm_inv_eng = 1;
+		else
+			ring->vm_inv_eng = vm_inv_eng[vmhub]++;

I would rather initialize vm_inv_eng to 0 and make sure that we skip 2-4.

This way we don't depend on the SDMA layout here,
Christian.

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_late_init(void *handle) · line 690

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
  		dev_info(adev->dev, "ring %s uses VM inv eng %u on hub %u\n",
  			 ring->name, ring->vm_inv_eng, ring->funcs->vmhub);
  	}

_______________________________________________
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): b8b97458-77c7-4c78-bc2e-b5a6ad099a99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#6 lore raw

RE: [PATCH 2/4] drm/amdgpu: use the idle engine 0/1 for page ring 0/1

Fixed in the new patch which was just sent out.

Regards,
Evan

Quoted 36 lines

-----Original Message-----
From: Christian König <[email protected]>
Sent: 2018年12月12日 16:26
To: Quan, Evan <[email protected]>; [email protected]
Subject: Re: [PATCH 2/4] drm/amdgpu: use the idle engine 0/1 for page ring 0/1

Am 12.12.18 um 07:54 schrieb Evan Quan:

Quoted 15 lines

We need new invalidation engine layout due to new SDMA page queues added.

Change-Id I2f3861689bffb9828c9eae744a7a0de4963ac2b6
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 6b1ac02a7aac..5f45894c2b81 100644

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_late_init(void *handle) · line 687

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +6 -1
@@ -679,7 +679,12 @@ static int gmc_v9_0_late_init(void *handle)
  		struct amdgpu_ring *ring = adev->rings[i];
  		unsigned vmhub = ring->funcs->vmhub;
 
-		ring->vm_inv_eng = vm_inv_eng[vmhub]++;
+		if (ring == &adev->sdma.instance[0].page)
+			ring->vm_inv_eng = 0;
+		else if (ring == &adev->sdma.instance[1].page)
+			ring->vm_inv_eng = 1;
+		else
+			ring->vm_inv_eng = vm_inv_eng[vmhub]++;

I would rather initialize vm_inv_eng to 0 and make sure that we skip 2-4.

Quoted 7 lines

This way we don't depend on the SDMA layout here, Christian.

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_late_init(void *handle) · line 688

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
  		dev_info(adev->dev, "ring %s uses VM inv eng %u on

hub %u\n",

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
  			 ring->name, ring->vm_inv_eng, ring->funcs-
 vmhub);
  	}

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#7 lore raw

PATCH 3/4 drm/amdgpu: use different irq ring ID for Vega20 page queues

In reply to a message not in the archive

Vega20 uses ring id 1 for page queues EOP irq while previous ASICs take ring id 3.

Change-Id Id837fa934ab4a60f0360a33216413a8fc9987c56
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +4 -2
index 4b6d3e5c821f..d59addb47025 100644
@@ -1706,13 +1706,15 @@ static int sdma_v4_0_process_trap_irq(struct amdgpu_device *adev,
 		amdgpu_fence_process(&adev->sdma.instance[instance].ring);
 		break;
 	case 1:
-		/* XXX compute */
+		if (adev->asic_type == CHIP_VEGA20)
+			amdgpu_fence_process(&adev->sdma.instance[instance].page);
 		break;
 	case 2:
 		/* XXX compute */
 		break;
 	case 3:
-		amdgpu_fence_process(&adev->sdma.instance[instance].page);
+		if (adev->asic_type != CHIP_VEGA20)
+			amdgpu_fence_process(&adev->sdma.instance[instance].page);
 		break;
 	}
 	return 0;
Signature · 6 lines
2.19.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#8 lore raw

PATCH 4/4 drm/amdgpu: enable Vega20 page queue support

In reply to a message not in the archive

Page queue is supported on Vega20 with SDMA firmware 122 onwards.

Change-Id I78d2c4a7ad9d200d89177fae2ad6073955e6bd8b
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -2
index d59addb47025..56c583e8a4c2 100644
@@ -1458,8 +1458,7 @@ static bool sdma_v4_0_fw_support_paging_queue(struct amdgpu_device *adev)
 		/*return fw_version >= 31;*/
 		return false;
 	case CHIP_VEGA20:
-		/*return fw_version >= 115;*/
-		return false;
+		return fw_version >= 122;
 	default:
 		return false;
 	}
Signature · 6 lines
2.19.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx