drm/i915: Semaphore MBOX update generalization
authorBen Widawsky <ben@bwidawsk.net>
Wed, 29 May 2013 02:22:18 +0000 (19:22 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 31 May 2013 18:54:08 +0000 (20:54 +0200)
commitad776f8b09d66e0145479fdbde2a710e5892441f
tree8fe32b87b70bc02bdad3f33efc4d1f50a86fe774
parent5586181fce2b2e89a0e281d78ffbdfa103bb0dde
drm/i915: Semaphore MBOX update generalization

This replaces the existing MBOX update code with a more generalized
calculation for emitting mbox updates. We also create a sentinel for
doing the updates so we can more abstractly deal with the rings.

When doing MBOX updates the code must be aware of the /other/ rings.
Until now the platforms which supported semaphores had a fixed number of
rings and so it made sense for the code to be very specialized
(hardcoded).

The patch does contain a functional change, but should have no
behavioral changes.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h