drm/i915: Dumb down the semaphore logic
authorBen Widawsky <ben@bwidawsk.net>
Thu, 15 Sep 2011 03:32:47 +0000 (20:32 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 21 Sep 2011 21:52:41 +0000 (14:52 -0700)
commitc8c99b0f0dea1ced5d0e10cdb9143356cc16b484
treec7a124662da83f054bc9fb6a60735f528d8d6d30
parente0dac65ed45e72fe34cc7ccc76de0ba220bd38bb
drm/i915: Dumb down the semaphore logic

While I think the previous code is correct, it was hard to follow and
hard to debug. Since we already have a ring abstraction, might as well
use it to handle the semaphore updates and compares.

I don't expect this code to make semaphores better or worse, but you
never know...

v2:
Remove magic per Keith's suggestions.
Ran Daniel's gem_ring_sync_loop test on this.

v3:
Ignored one of Keith's suggestions.

v4:
Removed some bloat per Daniel's recommendation.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h