summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-02-04 18:19:03 -0800
committerEric Anholt <eric@anholt.net>2008-02-04 18:24:16 -0800
commitfd776e10b327b6a49b76c5082e4cc48059c6ad2e (patch)
tree1ded8dccb5bfdad1b40b616ba69f8babcf2ea0ba
parent745df749cc082de9491b91bfcb8705d8d26cbe02 (diff)
Replace usage of DRM_BO_FLAG_MEM_TT in intel_regions.c with local/cached.
In addition to potentially binding when it was about to be mapped anyway, failure to use CACHED_MAPPED means eating a full wbinvd on validate. Thanks to airlied for catching this.
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index fdd99edda7..ffd9366522 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -90,7 +90,10 @@ intel_region_alloc(struct intel_context *intel,
region->refcount = 1;
region->buffer = dri_bo_alloc(intel->bufmgr, "region",
- pitch * cpp * height, 64, DRM_BO_FLAG_MEM_TT);
+ pitch * cpp * height, 64,
+ DRM_BO_FLAG_MEM_LOCAL |
+ DRM_BO_FLAG_CACHED |
+ DRM_BO_FLAG_CACHED_MAPPED);
return region;
}
@@ -322,7 +325,10 @@ intel_region_release_pbo(struct intel_context *intel,
region->buffer = dri_bo_alloc(intel->bufmgr, "region",
region->pitch * region->cpp * region->height,
- 64, DRM_BO_FLAG_MEM_TT);
+ 64,
+ DRM_BO_FLAG_MEM_LOCAL |
+ DRM_BO_FLAG_CACHED |
+ DRM_BO_FLAG_CACHED_MAPPED);
}
/* Break the COW tie to the pbo. Both the pbo and the region end up