From fcac4f7f2b8d06cf2451609739ea342e5e3bfd5a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 8 Aug 2013 14:52:26 +0100 Subject: sna: Only use the experimental create2 if we support DISPLAY cacheing as well Signed-off-by: Chris Wilson --- src/sna/kgem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sna') diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 3c324e56..498c2000 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -160,6 +160,7 @@ struct local_i915_gem_userptr { #define UNCACHED 0 #define SNOOPED 1 +#define DISPLAY 2 struct local_i915_gem_cacheing { uint32_t handle; @@ -984,6 +985,7 @@ static bool test_has_create2(struct kgem *kgem) memset(&args, 0, sizeof(args)); args.size = PAGE_SIZE; + args.caching = DISPLAY; if (drmIoctl(kgem->fd, LOCAL_IOCTL_I915_GEM_CREATE2, &args) == 0) gem_close(kgem->fd, args.handle); @@ -3817,7 +3819,7 @@ __kgem_bo_create_from_stolen(struct kgem *kgem, int size, int tiling, int pitch) memset(&args, 0, sizeof(args)); args.size = size * PAGE_SIZE; args.placement = LOCAL_I915_CREATE_PLACEMENT_STOLEN; - args.caching = UNCACHED; + args.caching = DISPLAY; args.tiling_mode = tiling; args.stride = pitch; -- cgit v1.2.3