drm/nouveau: Fix up buffer eviction, and evict them to GART, if possible.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Dec 2009 17:40:17 +0000 (18:40 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 16 Dec 2009 07:05:26 +0000 (17:05 +1000)
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c

index aa2dfbc3e35188f612ee6fc086e628312a852b34..e9f01906c52e5702e8da31e10c76bd0f5c6cec50 100644 (file)
@@ -400,10 +400,16 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl)
        struct nouveau_bo *nvbo = nouveau_bo(bo);
 
        switch (bo->mem.mem_type) {
+       case TTM_PL_VRAM:
+               nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT |
+                                        TTM_PL_FLAG_SYSTEM);
+               break;
        default:
                nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM);
                break;
        }
+
+       *pl = nvbo->placement;
 }