summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_vma.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-08-28 16:37:23 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-08-28 18:49:33 +0300
commited11e4158451bf69e1e34b44797d6989d84db60f (patch)
tree4b68167570b62f5e481d090e2919bb7f840310b0 /drivers/gpu/drm/i915/i915_vma.h
parent1895759ee932e47f48b5e87baadc449ffd0853f1 (diff)
downloadlinux-ed11e4158451bf69e1e34b44797d6989d84db60f.tar.xz
drm/i915: Fix gtt_view asserts
gcc is too smart for us and doesn't evaluate BUILD_BUG_ON()s in unused static inlines. Collect them up in one static inline and actually call it to make sure gcc sees it. Cc: Chris Wilson <chris@chris-wilson.co.uk> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180828133723.18505-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vma.h')
-rw-r--r--drivers/gpu/drm/i915/i915_vma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index f1ba40bbe6f9..4f7c1c7599f4 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -251,6 +251,8 @@ i915_vma_compare(struct i915_vma *vma,
if (cmp)
return cmp;
+ assert_i915_gem_gtt_types();
+
/* ggtt_view.type also encodes its size so that we both distinguish
* different views using it as a "type" and also use a compact (no
* accessing of uninitialised padding bytes) memcmp without storing