All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/4] drm/i915: Simplify i915_gem_obj_ggtt_bound_view
Date: Thu, 21 Apr 2016 13:04:46 +0100	[thread overview]
Message-ID: <1461240286-25968-4-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1461240286-25968-1-git-send-email-tvrtko.ursulin@linux.intel.com>

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

Can use the new vma->is_gtt to simplify the check and
get rid of the local variables.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 135e1e9c40c2..c5ca53d2e35d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5275,12 +5275,10 @@ bool i915_gem_obj_bound(struct drm_i915_gem_object *o,
 bool i915_gem_obj_ggtt_bound_view(struct drm_i915_gem_object *o,
 				  const struct i915_ggtt_view *view)
 {
-	struct drm_i915_private *dev_priv = to_i915(o->base.dev);
-	struct i915_ggtt *ggtt = &dev_priv->ggtt;
 	struct i915_vma *vma;
 
 	list_for_each_entry(vma, &o->vma_list, obj_link)
-		if (vma->vm == &ggtt->base &&
+		if (vma->is_ggtt &&
 		    i915_ggtt_view_equal(&vma->ggtt_view, view) &&
 		    drm_mm_node_allocated(&vma->node))
 			return true;
-- 
1.9.1

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

  parent reply	other threads:[~2016-04-21 12:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 12:04 [PATCH 1/4] drm/i915: Remove i915_gem_obj_size Tvrtko Ursulin
2016-04-21 12:04 ` [PATCH 2/4] drm/i915: Simplify i915_gem_obj_to_ggtt_view Tvrtko Ursulin
2016-04-21 12:04 ` [PATCH 3/4] drm/i915: Simplify i915_gem_obj_ggtt_offset_view Tvrtko Ursulin
2016-04-21 12:04 ` Tvrtko Ursulin [this message]
2016-04-22 10:54   ` [PATCH 4/4] drm/i915: Simplify i915_gem_obj_ggtt_bound_view Dave Gordon
2016-04-21 12:19 ` [PATCH 1/4] drm/i915: Remove i915_gem_obj_size Chris Wilson
2016-04-21 12:46   ` Tvrtko Ursulin
2016-04-23 15:58 ` ✗ Fi.CI.BAT: warning for series starting with [1/4] " Patchwork
2016-04-25  8:29   ` Dave Gordon
2016-04-25 11:37     ` 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=1461240286-25968-4-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --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.