aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_vma.h
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2019-09-09 13:40:50 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-09-09 21:00:04 +0100
commit1e0a96e508827ad88229bff32ea2641c83fc52a8 (patch)
treed36759a4b360c9f9b7b5f7b31dad375a7bde542e /drivers/gpu/drm/i915/i915_vma.h
parentdrm/i915/execlists: Remove incorrect BUG_ON for schedule-out (diff)
downloadlinux-dev-1e0a96e508827ad88229bff32ea2641c83fc52a8.tar.xz
linux-dev-1e0a96e508827ad88229bff32ea2641c83fc52a8.zip
drm/i915: export color_differs
Export color_differs so that we can use it elsewhere. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190909124052.22900-1-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.h')
-rw-r--r--drivers/gpu/drm/i915/i915_vma.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index 889fc7cb910a..5b1e0cf7669d 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -373,6 +373,12 @@ static inline bool i915_vma_is_bound(const struct i915_vma *vma,
return vma->flags & where;
}
+static inline bool i915_node_color_differs(const struct drm_mm_node *node,
+ unsigned long color)
+{
+ return node->allocated && node->color != color;
+}
+
/**
* i915_vma_pin_iomap - calls ioremap_wc to map the GGTT VMA via the aperture
* @vma: VMA to iomap