Skip to contentSkip to conversation

drm/amdgpu: add ring test for page queue

PATCH In review Huang Rui 2 participants 2 messages Oct 18, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: add ring test for page queue

We add page queue for sdma to update page table. So here it also needs ring test to verify it workable during the initialization.

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +9 -0
index 6ad4fda..ede149a 100644
@@ -1150,6 +1150,15 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
 			return r;
 		}
 
+		if (adev->sdma.has_page_queue) {
+			ring = &adev->sdma.instance[i].page;
+			r = amdgpu_ring_test_ring(ring);
+			if (r) {
+				ring->ready = false;
+				return r;
+			}
+		}
+
 		if (adev->mman.buffer_funcs_ring == ring)
 			amdgpu_ttm_set_buffer_funcs_status(adev, true);
 	}
Signature · 6 lines
2.7.4

_______________________________________________
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): 1539857694-5045-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 18.10.18 um 12:14 schrieb Huang Rui:

Quoted 4 lines

We add page queue for sdma to update page table. So here it also needs ring test to verify it workable during the initialization.

Quoted 14 lines
---
  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 +++++++++
  1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -0
index 6ad4fda..ede149a 100644
@@ -1150,6 +1150,15 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
  			return r;
  		}
 
+		if (adev->sdma.has_page_queue) {
+			ring = &adev->sdma.instance[i].page;

drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c static int sdma_v4_0_start(struct amdgpu_device *adev) · line 1164

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +7 -0
+			r = amdgpu_ring_test_ring(ring);
+			if (r) {
+				ring->ready = false;
+				return r;
+			}
+		}
+
  		if (adev->mman.buffer_funcs_ring == ring)
  			amdgpu_ttm_set_buffer_funcs_status(adev, true);
  	}

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