[PATCH 15/16] drm/i915: Do not use i915_vma active for waiting.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Wed Jul 28 13:18:02 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 | 8 +-------
drivers/gpu/drm/i915/i915_vma.h | 9 +++++++--
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 48b94d467127..e735c205354f 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -1546,16 +1546,10 @@ __i915_request_await_bind(struct i915_request *rq, struct i915_vma *vma)
static int __i915_vma_move_to_active(struct i915_vma *vma, struct i915_request *rq)
{
- int err;
-
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 f8c4650219f8..823562a6ccf8 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);
}
I915_SELFTEST_DECLARE(int i915_vma_get_pages(struct i915_vma *vma));
--
2.31.0
More information about the Intel-gfx-trybot
mailing list