]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
drm/amdgpu/pm: document pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie (v2)
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_test.c
index 2dbe87591f813a8fc9ae8573d345f47741227836..d167e8ab76d305e0878d2b6ac31357d4ba18520c 100644 (file)
@@ -33,6 +33,7 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
        struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
        struct amdgpu_bo *vram_obj = NULL;
        struct amdgpu_bo **gtt_obj = NULL;
+       struct amdgpu_bo_param bp;
        uint64_t gart_addr, vram_addr;
        unsigned n, size;
        int i, r;
@@ -58,9 +59,15 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
                r = 1;
                goto out_cleanup;
        }
-
-       r = amdgpu_bo_create(adev, size, PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM, 0,
-                            ttm_bo_type_kernel, NULL, &vram_obj);
+       memset(&bp, 0, sizeof(bp));
+       bp.size = size;
+       bp.byte_align = PAGE_SIZE;
+       bp.domain = AMDGPU_GEM_DOMAIN_VRAM;
+       bp.flags = 0;
+       bp.type = ttm_bo_type_kernel;
+       bp.resv = NULL;
+
+       r = amdgpu_bo_create(adev, &bp, &vram_obj);
        if (r) {
                DRM_ERROR("Failed to create VRAM object\n");
                goto out_cleanup;
@@ -79,9 +86,8 @@ static void amdgpu_do_test_moves(struct amdgpu_device *adev)
                void **vram_start, **vram_end;
                struct dma_fence *fence = NULL;
 
-               r = amdgpu_bo_create(adev, size, PAGE_SIZE,
-                                    AMDGPU_GEM_DOMAIN_GTT, 0,
-                                    ttm_bo_type_kernel, NULL, gtt_obj + i);
+               bp.domain = AMDGPU_GEM_DOMAIN_GTT;
+               r = amdgpu_bo_create(adev, &bp, gtt_obj + i);
                if (r) {
                        DRM_ERROR("Failed to create GTT object %d\n", i);
                        goto out_lclean;
This page took 0.036398 seconds and 4 git commands to generate.