]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_object.c
index 887a4da5eefc6175ef72059ce729478871374f2d..ac043baac05d6d234ee726794176cf624ccccb5e 100644 (file)
@@ -136,8 +136,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
 
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |
-                       TTM_PL_FLAG_VRAM;
+               places[c].mem_type = TTM_PL_VRAM;
+               places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED;
 
                if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)
                        places[c].lpfn = visible_pfn;
@@ -152,7 +152,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
        if (domain & AMDGPU_GEM_DOMAIN_GTT) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_TT;
+               places[c].mem_type = TTM_PL_TT;
+               places[c].flags = 0;
                if (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
                        places[c].flags |= TTM_PL_FLAG_WC |
                                TTM_PL_FLAG_UNCACHED;
@@ -164,7 +165,8 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
        if (domain & AMDGPU_GEM_DOMAIN_CPU) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_SYSTEM;
+               places[c].mem_type = TTM_PL_SYSTEM;
+               places[c].flags = 0;
                if (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
                        places[c].flags |= TTM_PL_FLAG_WC |
                                TTM_PL_FLAG_UNCACHED;
@@ -176,28 +178,32 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
        if (domain & AMDGPU_GEM_DOMAIN_GDS) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_UNCACHED | AMDGPU_PL_FLAG_GDS;
+               places[c].mem_type = AMDGPU_PL_GDS;
+               places[c].flags = TTM_PL_FLAG_UNCACHED;
                c++;
        }
 
        if (domain & AMDGPU_GEM_DOMAIN_GWS) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_UNCACHED | AMDGPU_PL_FLAG_GWS;
+               places[c].mem_type = AMDGPU_PL_GWS;
+               places[c].flags = TTM_PL_FLAG_UNCACHED;
                c++;
        }
 
        if (domain & AMDGPU_GEM_DOMAIN_OA) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_FLAG_UNCACHED | AMDGPU_PL_FLAG_OA;
+               places[c].mem_type = AMDGPU_PL_OA;
+               places[c].flags = TTM_PL_FLAG_UNCACHED;
                c++;
        }
 
        if (!c) {
                places[c].fpfn = 0;
                places[c].lpfn = 0;
-               places[c].flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM;
+               places[c].mem_type = TTM_PL_SYSTEM;
+               places[c].flags = TTM_PL_MASK_CACHING;
                c++;
        }
 
@@ -594,7 +600,7 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
                amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0);
 
        if (bp->flags & AMDGPU_GEM_CREATE_VRAM_CLEARED &&
-           bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) {
+           bo->tbo.mem.mem_type == TTM_PL_VRAM) {
                struct dma_fence *fence;
 
                r = amdgpu_fill_buffer(bo, 0, bo->tbo.base.resv, &fence);
This page took 0.034581 seconds and 4 git commands to generate.