summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_fence.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-08-04 09:52:30 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2016-08-04 10:09:21 +0300
commit27c01aaef041f1fa3908c0330ff86d345523c3dc (patch)
treee2edfa0c6451a79c6213f02b78163fe78aba96ce /drivers/gpu/drm/i915/i915_gem_fence.c
parent381f371b25946518f4882fa2060326fa92a33bfc (diff)
downloadlinux-27c01aaef041f1fa3908c0330ff86d345523c3dc.tar.xz
drm/i915: Prepare i915_gem_active for annotations
In the future, we will want to add annotations to the i915_gem_active struct. The API is thus expanded to hide direct access to the contents of i915_gem_active and mediated instead through a number of helpers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1470293567-10811-11-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_fence.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_fence.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_fence.c b/drivers/gpu/drm/i915/i915_gem_fence.c
index d16b385e79e9..9fdbd66128a6 100644
--- a/drivers/gpu/drm/i915/i915_gem_fence.c
+++ b/drivers/gpu/drm/i915/i915_gem_fence.c
@@ -261,14 +261,13 @@ static inline void i915_gem_object_fence_lost(struct drm_i915_gem_object *obj)
static int
i915_gem_object_wait_fence(struct drm_i915_gem_object *obj)
{
- if (obj->last_fence.request) {
- int ret = i915_wait_request(obj->last_fence.request);
- if (ret)
- return ret;
+ int ret;
- i915_gem_active_set(&obj->last_fence, NULL);
- }
+ ret = i915_gem_active_wait(&obj->last_fence);
+ if (ret)
+ return ret;
+ i915_gem_active_set(&obj->last_fence, NULL);
return 0;
}