Merge tag 'amd-drm-next-5.14-2021-05-21' of https://gitlab.freedesktop.org/agd5f...
[platform/kernel/linux-starfive.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vram_mgr.c
index f78d219..0f897a3 100644 (file)
 #include "amdgpu_atomfirmware.h"
 #include "atom.h"
 
+struct amdgpu_vram_reservation {
+       struct list_head node;
+       struct drm_mm_node mm_node;
+};
+
 static inline struct amdgpu_vram_mgr *
 to_vram_mgr(struct ttm_resource_manager *man)
 {
@@ -446,10 +451,11 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
        }
        spin_unlock(&mgr->lock);
 
-       atomic64_add(vis_usage, &mgr->vis_usage);
+       if (i == 1)
+               mem->placement |= TTM_PL_FLAG_CONTIGUOUS;
 
+       atomic64_add(vis_usage, &mgr->vis_usage);
        mem->mm_node = nodes;
-
        return 0;
 
 error: