]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Wait for pending flips on the GPU
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Oct 2010 16:28:15 +0000 (17:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Oct 2010 18:10:09 +0000 (19:10 +0100)
commitbbae34cea74d70a9bee552a5e814316cbf127d74
treea0534aea9beab6f65489d171e6dff2b3c992c13d
parentb58a6a4e0433177b782bec8aac2a57dbd8882b08
drm/i915: Wait for pending flips on the GPU

Currently, if a batch buffer refers to an object with a pending flip,
then we sleep until that pending flip is completed (unpinned and
signalled). This is so that a flip can be queued and the user can
continue rendering to the backbuffer oblivious to whether the buffer is
still pinned as the scan out. (The kernel arbitrating at the last moment
to stall the batch and wait until the buffer is unpinned and replaced as
the front buffer.)

As we only have a queue depth of 1, we can simply wait for the current
pending flip to complete and continue rendering. We can achieve this
with a single WAIT_FOR_EVENT command inserted into the ring buffer prior
to executing the batch, *without* stalling the client.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_display.c