aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-03-06 07:42:45 -0500
committerBen Skeggs <bskeggs@redhat.com>2010-03-14 19:46:52 -0400
commit965cf68e8797932e9cd49238a6dd39423ac9b256 (patch)
tree14dc7963f2b51843458374148ebdb1af672ea9b9 /drivers/gpu/drm
parentd544d623c5ef3ca14407e8bc042fdf938a966b04 (diff)
drm/nouveau: Never evict VRAM buffers to system.
VRAM->system is a synchronous operation: it involves scheduling a VRAM->TT DMA transfer and stalling the CPU until it's finished so that we can unbind the new memory from the translation tables. VRAM->TT can always be performed asynchronously, even if TT is already full and we have to move something out of it. Additionally, allowing VRAM->system behaves badly under heavy memory pressure because once we run out of TT, stuff starts to be moved back and forth between VRAM and system, and the TT contents are hardly renewed. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 028719fddf76..026612471c92 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -439,8 +439,7 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *pl)
439 439
440 switch (bo->mem.mem_type) { 440 switch (bo->mem.mem_type) {
441 case TTM_PL_VRAM: 441 case TTM_PL_VRAM:
442 nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT | 442 nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT);
443 TTM_PL_FLAG_SYSTEM);
444 break; 443 break;
445 default: 444 default:
446 nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM); 445 nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM);