[Intel-gfx] [PATCH 1/2] drm/i915: Rotated view does not need a fence

Tvrtko Ursulin tursulin at ursulin.net
Tue Oct 25 14:00:23 UTC 2016


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

We do not need to set up a fence for the rotated view.

Display does not need it and no one can access it.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index c241d8143255..c79d7ab75003 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -251,7 +251,8 @@ static inline bool i915_vma_is_ggtt(const struct i915_vma *vma)
 
 static inline bool i915_vma_is_map_and_fenceable(const struct i915_vma *vma)
 {
-	return vma->flags & I915_VMA_CAN_FENCE;
+	return vma->flags & I915_VMA_CAN_FENCE &&
+	       vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED;
 }
 
 static inline bool i915_vma_is_closed(const struct i915_vma *vma)
-- 
2.7.4



More information about the Intel-gfx mailing list