[PATCH 13/15] drm/i915: Do not use i915_vma active for waiting.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Jul 27 10:07:07 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.c | 6 +-----
drivers/gpu/drm/i915/i915_vma.h | 9 +++++++--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 907de1bc2294..c2a3b8252b45 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -1528,11 +1528,7 @@ static int __i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *
GEM_BUG_ON(!i915_vma_is_pinned(vma));
/* Wait for the vma to be bound before we start! */
- err = __i915_request_await_bind(rq, vma);
- if (err)
- return err;
-
- return i915_active_add_request(&vma->active, rq);
+ return __i915_request_await_bind(rq, vma);
}
int i915_vma_move_to_active(struct i915_vma *vma,
diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h
index 04590fef89cf..871271bca868 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 */
@@ -417,8 +417,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);
}
I915_SELFTEST_DECLARE(int i915_vma_get_pages(struct i915_vma *vma));
--
2.31.0
More information about the Intel-gfx-trybot
mailing list