]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
Merge tag 'for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.c
index e62153a86001d9b3bd517792b1d04d9aa29de1a7..6a9e46ae7f0a460cc47ebf443f6098c7362965d8 100644 (file)
@@ -419,6 +419,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
 
        bo->tbo.bdev = &adev->mman.bdev;
        amdgpu_ttm_placement_from_domain(bo, bp->domain);
+       if (bp->type == ttm_bo_type_kernel)
+               bo->tbo.priority = 1;
 
        r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type,
                                 &bo->placement, page_align, &ctx, acc_size,
@@ -434,9 +436,6 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
        else
                amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0);
 
-       if (bp->type == ttm_bo_type_kernel)
-               bo->tbo.priority = 1;
-
        if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED &&
            bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) {
                struct dma_fence *fence;
This page took 0.035146 seconds and 4 git commands to generate.