drm/i915: Refactor the wait_rendering completion into a common routine
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 29 Jun 2013 21:05:26 +0000 (22:05 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 1 Jul 2013 09:15:01 +0000 (11:15 +0200)
commitd26e3af842023603747f1566caff5f471508bbd4
treed8f8c73b503557952f2e423545c08abc0ee011fd
parentdaa13e1ca587bc773c1aae415ed1af6554117bd4
drm/i915: Refactor the wait_rendering completion into a common routine

Harmonise the completion logic between the non-blocking and normal
wait_rendering paths, and move that logic into a common function.

In the process, we note that the last_write_seqno is by definition the
earlier of the two read/write seqnos and so all successful waits will
have passed the last_write_seqno. Therefore we can unconditionally clear
the write seqno and its domains in the completion logic.

v2: Add the missing ring parameter, because sometimes it is good to have
things compile.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c