[PATCH 31/32] drm/i915: Do not use i915_vma active for waiting.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Wed Oct 13 16:36:17 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 74357ea71a9f..8332741d0116 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 i915_gem_object_wait(vma->obj, I915_WAIT_ALL, 0);
}
/* do not reserve memory to prevent deadlocks */
@@ -418,8 +418,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.33.0
More information about the Intel-gfx-trybot
mailing list