aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-03-14 15:48:17 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-03-14 16:08:24 -0400
commiteab3de23a1639ec9419c1f9239ce651d3c82e7d6 (patch)
tree6d0ef8e3e8b892b47a2330d5803b4d35f4319c1d /drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
parente3364dfc6a76e8d3432f3efd130f3dda6ddd698c (diff)
drm/amdgpu: explicit give BO type to amdgpu_bo_create
Drop the "kernel" and sg parameter and give the BO type to create explicit to amdgpu_bo_create instead of figuring it out from the parameters. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Roger He <Hongbo.He@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_test.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
index f3d81b6fb499..2dbe87591f81 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
@@ -59,9 +59,8 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
59 goto out_cleanup; 59 goto out_cleanup;
60 } 60 }
61 61
62 r = amdgpu_bo_create(adev, size, PAGE_SIZE, true, 62 r = amdgpu_bo_create(adev, size, PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM, 0,
63 AMDGPU_GEM_DOMAIN_VRAM, 0, 63 ttm_bo_type_kernel, NULL, &vram_obj);
64 NULL, NULL, &vram_obj);
65 if (r) { 64 if (r) {
66 DRM_ERROR("Failed to create VRAM object\n"); 65 DRM_ERROR("Failed to create VRAM object\n");
67 goto out_cleanup; 66 goto out_cleanup;
@@ -80,9 +79,9 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
80 void **vram_start, **vram_end; 79 void **vram_start, **vram_end;
81 struct dma_fence *fence = NULL; 80 struct dma_fence *fence = NULL;
82 81
83 r = amdgpu_bo_create(adev, size, PAGE_SIZE, true, 82 r = amdgpu_bo_create(adev, size, PAGE_SIZE,
84 AMDGPU_GEM_DOMAIN_GTT, 0, NULL, 83 AMDGPU_GEM_DOMAIN_GTT, 0,
85 NULL, gtt_obj + i); 84 ttm_bo_type_kernel, NULL, gtt_obj + i);
86 if (r) { 85 if (r) {
87 DRM_ERROR("Failed to create GTT object %d\n", i); 86 DRM_ERROR("Failed to create GTT object %d\n", i);
88 goto out_lclean; 87 goto out_lclean;