drm/nouveau: Never evict VRAM buffers to system.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 1, 2010 - 10:59 am

Gitweb:     http://git.kernel.org/linus/965cf68e8797932e9cd49238a6dd39423ac9b256
Commit:     965cf68e8797932e9cd49238a6dd39423ac9b256
Parent:     d544d623c5ef3ca14407e8bc042fdf938a966b04
Author:     Francisco Jerez <currojerez@riseup.net>
AuthorDate: Sat Mar 6 13:42:45 2010 +0100
Committer:  Ben Skeggs <bskeggs@redhat.com>
CommitDate: Mon Mar 15 09:46:52 2010 +1000

    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>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c |    3 +--
 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 028719f..0266124 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)
 
 	switch (bo->mem.mem_type) {
 	case TTM_PL_VRAM:
-		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT |
-					 TTM_PL_FLAG_SYSTEM);
+		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT);
 		break;
 	default:
 		nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_SYSTEM);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
drm/nouveau: Never evict VRAM buffers to system., Linux Kernel Mailing ..., (Thu Apr 1, 10:59 am)