diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-28 11:54:08 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-01 05:15:00 -0400 |
commit | daa13e1ca587bc773c1aae415ed1af6554117bd4 (patch) | |
tree | f49a5d05ebfc99b4930b9b35af69d34cd4727bb3 /drivers/gpu/drm/i915/i915_gem.c | |
parent | 63000ef656190b65a8ae4d00acd7f22b6d92415d (diff) |
drm/i915: Only clear write-domains after a successful wait-seqno
In the introduction of the non-blocking wait, I cut'n'pasted the wait
completion code from normal locked path. Unfortunately, this neglected
that the normal path returned early if the wait returned early. The
result is that read-only waits may return whilst the GPU is still
writing to the bo.
Fixes regression from
commit 3236f57a0162391f84b93f39fc1882c49a8998c7 [v3.7]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Aug 24 09:35:09 2012 +0100
drm/i915: Use a non-blocking wait for set-to-domain ioctl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66163
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fa074cec8587..18025fd45d40 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1160,7 +1160,8 @@ i915_gem_object_wait_rendering__nonblocking(struct drm_i915_gem_object *obj, | |||
1160 | /* Manually manage the write flush as we may have not yet | 1160 | /* Manually manage the write flush as we may have not yet |
1161 | * retired the buffer. | 1161 | * retired the buffer. |
1162 | */ | 1162 | */ |
1163 | if (obj->last_write_seqno && | 1163 | if (ret == 0 && |
1164 | obj->last_write_seqno && | ||
1164 | i915_seqno_passed(seqno, obj->last_write_seqno)) { | 1165 | i915_seqno_passed(seqno, obj->last_write_seqno)) { |
1165 | obj->last_write_seqno = 0; | 1166 | obj->last_write_seqno = 0; |
1166 | obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; | 1167 | obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; |