diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-08 14:52:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-08 14:53:26 +0100 |
commit | fcac4f7f2b8d06cf2451609739ea342e5e3bfd5a (patch) | |
tree | 5f70e658d543961210096f76a36ca099a89f5978 /src/sna | |
parent | c6add09791a44d9b3af79d50f52e6913c46341a8 (diff) |
sna: Only use the experimental create2 if we support DISPLAY cacheing as well
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/kgem.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |