From b9323aa2cb4563fba1b328dbc802d673449056ac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 May 2007 16:55:06 -0700 Subject: Replace the flags/hint arguments to bo_alloc{,_static} with a location mask. Now, allocations only take locations, rather than a variety of unused flags. The only interesting flag before was the no_move/no_evict pair for scanout and similar buffers, which the DRI drivers don't use. That will be readded when we get to using this code for display buffer allocation, by adding a pin/unpin call (dynamic pinning/unpinning may be useful for VT switching and root window resizing). This commit changes one instance of DRM_BO_FLAG_MEM_LOCAL with DRM_BO_FLAG_MEM_TT, which appeared to have been unintentional. --- src/mesa/drivers/dri/i915tex/intel_regions.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/mesa/drivers/dri/i915tex/intel_regions.c') diff --git a/src/mesa/drivers/dri/i915tex/intel_regions.c b/src/mesa/drivers/dri/i915tex/intel_regions.c index 9c005c0e5d..e0574ac57b 100644 --- a/src/mesa/drivers/dri/i915tex/intel_regions.c +++ b/src/mesa/drivers/dri/i915tex/intel_regions.c @@ -106,7 +106,7 @@ intel_region_alloc(intelScreenPrivate *intelScreen, region->refcount = 1; region->buffer = dri_bo_alloc(intelScreen->bufmgr, "region", - pitch * cpp * height, 64, 0, 0); + pitch * cpp * height, 64, DRM_BO_FLAG_MEM_TT); return region; } @@ -162,10 +162,7 @@ intel_region_create_static(intelScreenPrivate *intelScreen, /* XXX: questionable flags */ region->buffer = dri_bo_alloc_static(intelScreen->bufmgr, "static region", offset, pitch * cpp * height, virtual, - DRM_BO_FLAG_MEM_TT | - DRM_BO_FLAG_NO_MOVE | - DRM_BO_FLAG_READ | - DRM_BO_FLAG_WRITE, 0); + DRM_BO_FLAG_MEM_TT); return region; } @@ -195,10 +192,7 @@ intel_region_update_static(intelScreenPrivate *intelScreen, /* XXX: questionable flags */ region->buffer = dri_bo_alloc_static(intelScreen->bufmgr, "static region", offset, pitch * cpp * height, virtual, - DRM_BO_FLAG_MEM_TT | - DRM_BO_FLAG_NO_MOVE | - DRM_BO_FLAG_READ | - DRM_BO_FLAG_WRITE, 0); + DRM_BO_FLAG_MEM_TT); } @@ -399,7 +393,7 @@ intel_region_release_pbo(intelScreenPrivate *intelScreen, region->buffer = dri_bo_alloc(intelScreen->bufmgr, "region", region->pitch * region->cpp * region->height, - 64, 0, 0); + 64, DRM_BO_FLAG_MEM_TT); } /* Break the COW tie to the pbo. Both the pbo and the region end up -- cgit v1.2.3