Skip to content

Commit

Permalink
drm/i915: fix for when semaphore updates fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Widawsky authored and Daniel Vetter committed Apr 12, 2012
1 parent 5816d64 commit e3a5a22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,10 +2001,12 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
seqno = request->seqno;
}

from->sync_seqno[idx] = seqno;

return to->sync_to(to, from, seqno - 1);
ret = to->sync_to(to, from, seqno - 1);
if (!ret)
from->sync_seqno[idx] = seqno;

return ret;
}

static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj)
Expand Down

0 comments on commit e3a5a22

Please sign in to comment.