[PATCH 25/26] drm/i915: Do not use i915_vma active for waiting.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Nov 23 12:45:44 UTC 2021


We're going to remove it, so just remove the waiting first.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_vma.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index da69ecb1b860..e11e9cd262e6 100644
--- a/drivers/gpu/drm/i915/i915_vma.h
+++ b/drivers/gpu/drm/i915/i915_vma.h
@@ -49,7 +49,7 @@ void i915_vma_unpin_and_release(struct i915_vma **p_vma, unsigned int flags);
 
 static inline bool i915_vma_is_active(const struct i915_vma *vma)
 {
-	return !i915_active_is_idle(&vma->active);
+	return dma_resv_test_signaled(vma->obj->base.resv, true);
 }
 
 /* do not reserve memory to prevent deadlocks */
@@ -425,8 +425,13 @@ int i915_vma_wait_for_bind(struct i915_vma *vma);
 
 static inline int i915_vma_sync(struct i915_vma *vma)
 {
+	int ret;
 	/* Wait for the asynchronous bindings and pending GPU reads */
-	return i915_active_wait(&vma->active);
+	ret = i915_vma_wait_for_bind(vma);
+	if (ret)
+		return ret;
+
+	return i915_gem_object_wait(vma->obj, I915_WAIT_INTERRUPTIBLE | I915_WAIT_ALL, MAX_SCHEDULE_TIMEOUT);
 }
 
 void i915_vma_module_exit(void);
-- 
2.34.0



More information about the Intel-gfx-trybot mailing list