All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 1/2] drm/i915: Rotated view does not need a fence
Date: Tue, 25 Oct 2016 17:40:35 +0100	[thread overview]
Message-ID: <1477413635-3876-1-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20161025140750.GC21423@nuc-i3427.alporthouse.com>

From: Tvrtko Ursulin <tvrtko.ursulin@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.

v2: Move code to __i915_vma_set_map_and_fenceable. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 05a20d098db1 ("drm/i915: Move map-and-fenceable tracking to the VMA")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9361c7b54a7f..eb524bdf0c35 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3790,7 +3790,12 @@ void __i915_vma_set_map_and_fenceable(struct i915_vma *vma)
 	mappable = (vma->node.start + fence_size <=
 		    dev_priv->ggtt.mappable_end);
 
-	if (mappable && fenceable)
+	/*
+	 * Explicitly disable for rotated VMA since the display does not
+	 * need the fence and the VMA is not accessible to other users.
+	 */
+	if (mappable && fenceable &&
+	    vma->ggtt_view.type != I915_GGTT_VIEW_ROTATED)
 		vma->flags |= I915_VMA_CAN_FENCE;
 	else
 		vma->flags &= ~I915_VMA_CAN_FENCE;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-10-25 16:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 14:00 [PATCH 1/2] drm/i915: Rotated view does not need a fence Tvrtko Ursulin
2016-10-25 14:00 ` [PATCH 2/2] drm/i915: Remove two invalid warns Tvrtko Ursulin
2016-10-25 14:09   ` Chris Wilson
2016-10-25 14:12     ` Tvrtko Ursulin
2016-10-25 14:16       ` Tvrtko Ursulin
2016-10-25 14:26       ` Chris Wilson
2016-10-25 16:41         ` [PATCH v2 " Tvrtko Ursulin
2016-10-25 14:07 ` [PATCH 1/2] drm/i915: Rotated view does not need a fence Chris Wilson
2016-10-25 16:40   ` Tvrtko Ursulin [this message]
2016-10-25 19:55     ` [PATCH v2 " Chris Wilson
2016-10-25 14:12 ` [PATCH " Ville Syrjälä
2016-10-25 14:17   ` Chris Wilson
2016-10-25 14:23     ` Ville Syrjälä
2016-10-25 14:17   ` Tvrtko Ursulin
2016-10-25 15:16 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
2016-10-25 17:54 ` ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Rotated view does not need a fence (rev3) Patchwork
2016-10-26  7:46 ` ✓ Fi.CI.BAT: success " Patchwork
2016-10-26  8:10   ` Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477413635-3876-1-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.