diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2012-04-11 14:18:20 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-12 15:14:13 -0400 |
commit | e3a5a2250aa9e67d169f33e6c91dc7604cab513b (patch) | |
tree | 36840e9d848133d78485cc149d323ec26bb36f81 /drivers/gpu/drm | |
parent | 5816d648d5f0d496d7bf11ab9174a365c791ccc6 (diff) |
drm/i915: fix for when semaphore updates fail
This fixes a long standing issue where emitting the semaphore updates
may have failed, but we've already updated our internal data structure.
Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9fcdc9a917eb..0115b12df573 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2001,10 +2001,12 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj, | |||
2001 | seqno = request->seqno; | 2001 | seqno = request->seqno; |
2002 | } | 2002 | } |
2003 | 2003 | ||
2004 | from->sync_seqno[idx] = seqno; | ||
2005 | 2004 | ||
2006 | return to->sync_to(to, from, seqno - 1); | 2005 | ret = to->sync_to(to, from, seqno - 1); |
2006 | if (!ret) | ||
2007 | from->sync_seqno[idx] = seqno; | ||
2007 | 2008 | ||
2009 | return ret; | ||
2008 | } | 2010 | } |
2009 | 2011 | ||
2010 | static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj) | 2012 | static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj) |