xf86-video-intel: src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Fri Jul 20 07:57:28 PDT 2012
src/sna/kgem.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit f92a64dd9162731210b14368b6ee408356d7fefc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Jul 20 15:54:35 2012 +0100
sna: Only set the vmap flag after we make the bo snoopable
Otherwise if we fail then we incorrectly add the handle to the vmap
cache.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 95d634a..66a23bf 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3242,10 +3242,15 @@ struct kgem_bo *kgem_create_cpu_2d(struct kgem *kgem,
assert(bo->tiling == I915_TILING_NONE);
+ if (!gem_set_cacheing(kgem->fd, bo->handle, SNOOPED)) {
+ kgem_bo_destroy(kgem, bo);
+ return NULL;
+ }
+
bo->reusable = false;
bo->vmap = true;
- if (!gem_set_cacheing(kgem->fd, bo->handle, SNOOPED) ||
- kgem_bo_map__cpu(kgem, bo) == NULL) {
+
+ if (kgem_bo_map__cpu(kgem, bo) == NULL) {
kgem_bo_destroy(kgem, bo);
return NULL;
}
More information about the xorg-commit
mailing list