Commit cdb7476d authored by Jack Xiao's avatar Jack Xiao Committed by Alex Deucher

drm/amdgpu/mes: add ring/ib test for mes self test

Run the ring test and ib test for mes self test.
Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f1d93c9c
......@@ -958,3 +958,35 @@ static int amdgpu_mes_test_create_gang_and_queues(struct amdgpu_device *adev,
return 0;
}
static int amdgpu_mes_test_queues(struct amdgpu_ring **added_rings)
{
struct amdgpu_ring *ring;
int i, r;
for (i = 0; i < AMDGPU_MES_CTX_MAX_RINGS; i++) {
ring = added_rings[i];
if (!ring)
continue;
r = amdgpu_ring_test_ring(ring);
if (r) {
DRM_DEV_ERROR(ring->adev->dev,
"ring %s test failed (%d)\n",
ring->name, r);
return r;
} else
DRM_INFO("ring %s test pass\n", ring->name);
r = amdgpu_ring_test_ib(ring, 1000 * 10);
if (r) {
DRM_DEV_ERROR(ring->adev->dev,
"ring %s ib test failed (%d)\n",
ring->name, r);
return r;
} else
DRM_INFO("ring %s ib test pass\n", ring->name);
}
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment