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

Evan Quan evan.quan at amd.com
Wed Dec 12 06:54:00 UTC 2018


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

Change-Id: I2f3861689bffb9828c9eae744a7a0de4963ac2b6
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 6b1ac02a7aac..5f45894c2b81 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -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);
 	}
-- 
2.19.2



More information about the amd-gfx mailing list