aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2018-10-18 18:11:45 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-11-05 14:20:59 -0500
commitd7f625e91b326c39413fa68ec4b8b2f280fd87b3 (patch)
tree86e08e8832e4311fd4dc23250765cb2adeae96db /drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
parentdrm/amdgpu: disable SDMA page queue on Vega20 (diff)
downloadlinux-dev-d7f625e91b326c39413fa68ec4b8b2f280fd87b3.tar.xz
linux-dev-d7f625e91b326c39413fa68ec4b8b2f280fd87b3.zip
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. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 6367a8133168..dc0e8053a477 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -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);
}