]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use a non-blocking wait for set-to-domain ioctl
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Aug 2012 08:35:09 +0000 (09:35 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Aug 2012 09:12:56 +0000 (11:12 +0200)
commitfb3e04fce4f929592422b7db11f1538c12b1f231
treeb613d2876cf39aba6094b68d09cf0502f0bded7a
parent9d5b278cc6dc64e55e6fb6e75971e9aee7fd5c9a
drm/i915: Use a non-blocking wait for set-to-domain ioctl

The principal use for set-to-domain is for userspace to serialise
operations with a particular buffer, for example to maintain coherency
with a CPU map or to ratelimit its rendering by waiting on all previous
operations before continuing. As such we tend to hold the struct_mutex
for long periods during the synchronisation and so cause contention
issues with other users of the graphics device, even for independent
operations as memory management. An example is the contention between
compiz and X which causes jitter in the display and a drop in peak
throughput.

The ultimate solution would be a set of fine grained locks and lockless
operations, but an intermediate step is to first attempt the
synchronisation for set-to-domain without holding the mutex. This
introduces a number of race conditions, so we limit it use to the ioctl
periphery where we have no dependent state and can safely complete with
a locked synchronisation afterwards.

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