All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu/sdma4: use paging queue for buffer funcs
@ 2018-11-07 17:29 Alex Deucher
       [not found] ` <20181107172949.27158-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Deucher @ 2018-11-07 17:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Use the paging queue for buffer functions to avoid contention
with the other queues.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index e39a09eb0fa1..4b5b47dd2f4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -662,6 +662,10 @@ static void sdma_v4_0_page_stop(struct amdgpu_device *adev)
 	u32 rb_cntl, ib_cntl;
 	int i;
 
+	if ((adev->mman.buffer_funcs_ring == sdma0) ||
+	    (adev->mman.buffer_funcs_ring == sdma1))
+		amdgpu_ttm_set_buffer_funcs_status(adev, false);
+
 	for (i = 0; i < adev->sdma.num_instances; i++) {
 		rb_cntl = RREG32_SDMA(i, mmSDMA0_PAGE_RB_CNTL);
 		rb_cntl = REG_SET_FIELD(rb_cntl, SDMA0_PAGE_RB_CNTL,
@@ -1152,6 +1156,9 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
 			r = amdgpu_ring_test_helper(page);
 			if (r)
 				return r;
+
+			if (adev->mman.buffer_funcs_ring == page)
+				amdgpu_ttm_set_buffer_funcs_status(adev, true);
 		}
 
 		if (adev->mman.buffer_funcs_ring == ring)
@@ -2054,7 +2061,10 @@ static const struct amdgpu_buffer_funcs sdma_v4_0_buffer_funcs = {
 static void sdma_v4_0_set_buffer_funcs(struct amdgpu_device *adev)
 {
 	adev->mman.buffer_funcs = &sdma_v4_0_buffer_funcs;
-	adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring;
+	if (adev->sdma.has_page_queue)
+		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].page;
+	else
+		adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring;
 }
 
 static const struct amdgpu_vm_pte_funcs sdma_v4_0_vm_pte_funcs = {
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-11-08  8:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 17:29 [PATCH 1/2] drm/amdgpu/sdma4: use paging queue for buffer funcs Alex Deucher
     [not found] ` <20181107172949.27158-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-11-07 17:29   ` [PATCH 2/2] drm/amdgpu/sdma4: use page queue 1 " Alex Deucher
     [not found]     ` <20181107172949.27158-2-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-11-08  2:11       ` Zhang, Jerry(Junwei)
     [not found]         ` <9da6b213-e2d2-c0eb-6f6d-8ce39bcc2152-5C7GfCeVMHo@public.gmane.org>
2018-11-08  2:58           ` Alex Deucher
2018-11-08  8:00       ` Christian König
2018-11-08  2:05   ` [PATCH 1/2] drm/amdgpu/sdma4: use paging queue " Zhang, Jerry(Junwei)
     [not found]     ` <19502b5a-8508-3b59-b50e-44de4ade535b-5C7GfCeVMHo@public.gmane.org>
2018-11-08  2:59       ` Alex Deucher
2018-11-08  7:44         ` Zhang, Jerry(Junwei)
     [not found]           ` <d7df731c-ce0f-1cad-0cf9-15b06fc738db-5C7GfCeVMHo@public.gmane.org>
2018-11-08  8:14             ` Gong, Curry
     [not found]               ` <BN6PR12MB1586D7AC56967190DFD835B59DC50-/b2+HYfkarTyoQOqIZFxpgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-11-08  8:15                 ` Gong, Curry
2018-11-08  8:01   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.