summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_gtt_view_types.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gtt_view_types.h b/drivers/gpu/drm/i915/i915_gtt_view_types.h
index c084f67bc880..9c4f38db32ff 100644
--- a/drivers/gpu/drm/i915/i915_gtt_view_types.h
+++ b/drivers/gpu/drm/i915/i915_gtt_view_types.h
@@ -56,4 +56,19 @@ struct i915_gtt_view {
};
};
+static inline bool i915_gtt_view_is_normal(const struct i915_gtt_view *view)
+{
+ return view->type == I915_GTT_VIEW_NORMAL;
+}
+
+static inline bool i915_gtt_view_is_remapped(const struct i915_gtt_view *view)
+{
+ return view->type == I915_GTT_VIEW_REMAPPED;
+}
+
+static inline bool i915_gtt_view_is_rotated(const struct i915_gtt_view *view)
+{
+ return view->type == I915_GTT_VIEW_ROTATED;
+}
+
#endif /* __I915_GTT_VIEW_TYPES_H__ */