From: Huang Rui Date: Thu, 18 Oct 2018 10:11:45 +0000 (+0800) Subject: drm/amdgpu: add ring test for page queue X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d7f625e91b326c39413fa68ec4b8b2f280fd87b3;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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); }