diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-22 11:40:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-22 12:12:12 +0000 |
commit | e59dc1721180b9499ce409945667763628c678c8 (patch) | |
tree | 18ee02116165f706ee2a7f6a170a4fc67c6296f1 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 208b84a3757e15a1c002820aefa941a3293b9efa (diff) | |
download | lwn-e59dc1721180b9499ce409945667763628c678c8.tar.gz lwn-e59dc1721180b9499ce409945667763628c678c8.zip |
drm/i915: Move cpu_cache_is_coherent() to header
For use in the next patch, take the current is-coherent helper and add
it to i915_gem_object.h
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 1fe4010d4f2b..590c524a1531 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -4097,4 +4097,10 @@ int remap_io_mapping(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn, unsigned long size, struct io_mapping *iomap); +static inline bool i915_gem_object_is_coherent(struct drm_i915_gem_object *obj) +{ + return (obj->cache_level != I915_CACHE_NONE || + HAS_LLC(to_i915(obj->base.dev))); +} + #endif |