intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert vma->flags are updated correctly during binding
@ 2017-11-05 11:18 Chris Wilson
  2017-11-05 11:46 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Chris Wilson @ 2017-11-05 11:18 UTC (permalink / raw)
  To: intel-gfx

As we bind, and unbind on error, we want to be sure that the vma->flags
are updated to reflect the binding state so that on the next invocation
all is well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
---
 drivers/gpu/drm/i915/i915_vma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index fc77e8191eb5..6755ad8c7d4c 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -633,6 +633,7 @@ int __i915_vma_do_pin(struct i915_vma *vma,
 		if (ret)
 			goto err_unpin;
 	}
+	GEM_BUG_ON((vma->flags & I915_VMA_BIND_MASK) == 0);
 
 	ret = i915_vma_bind(vma, vma->obj->cache_level, flags);
 	if (ret)
@@ -649,6 +650,7 @@ int __i915_vma_do_pin(struct i915_vma *vma,
 	if ((bound & I915_VMA_BIND_MASK) == 0) {
 		i915_vma_remove(vma);
 		GEM_BUG_ON(vma->pages);
+		GEM_BUG_ON(vma->flags & I915_VMA_BIND_MASK);
 	}
 err_unpin:
 	__i915_vma_unpin(vma);
-- 
2.15.0

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-05 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-05 11:18 [PATCH] drm/i915: Assert vma->flags are updated correctly during binding Chris Wilson
2017-11-05 11:46 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-11-05 12:06 ` [PATCH v2] " Chris Wilson
2017-11-05 12:37 ` ✗ Fi.CI.BAT: failure for drm/i915: Assert vma->flags are updated correctly during binding (rev2) Patchwork
2017-11-05 12:45 ` [PATCH v3] drm/i915: Assert vma->flags are updated correctly during binding Chris Wilson
2017-11-05 13:06   ` Matthew Auld
2017-11-05 13:17 ` ✗ Fi.CI.BAT: failure for drm/i915: Assert vma->flags are updated correctly during binding (rev3) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).