]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Only update the current userptr worker
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 1 Oct 2015 11:34:45 +0000 (12:34 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 6 Oct 2015 12:15:29 +0000 (14:15 +0200)
commitdc188cab858ad35f1a0f8605449f033f03f923b2
treec53a80755328b103bdf4c79c60d4f5a7e037f318
parentc1ac2124ec27301bd617770c7d3cc43408aa11ca
drm/i915: Only update the current userptr worker

The userptr worker allows for a slight race condition where upon there
may two or more threads calling get_user_pages for the same object. When
we have the array of pages, then we serialise the update of the object.
However, the worker should only overwrite the obj->userptr.work pointer
if and only if it is the active one. Currently we clear it for a
secondary worker with the effect that we may rarely force a second
lookup.

v2: Rebase and rename a variable to avoid 80cols
v3: Mention v2

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_userptr.c