]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Always mark the writer as also a read for busy ioctl
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 9 Aug 2016 17:08:25 +0000 (18:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Aug 2016 09:37:21 +0000 (10:37 +0100)
commit84036e40615fce9ef5c1a1ece54207013205358f
tree3057a2634c302974a2246789f4d155915222ceb8
parent6ee34ffa58c95ba75e071b93eb0cc6c19948582f
drm/i915: Always mark the writer as also a read for busy ioctl

One of the few guarantees we want the busy ioctl to provide is that the
reported busy writer is included in the set of busy read engines. This
should be provided by the ordering of setting and retiring the active
trackers, but we can do better by explicitly setting the busy read
engine flag for the last writer.

v2: More comments inside __busy_write_id() to explain why both fields
are set.

Fixes: b1ce6d17f853 ("drm/i915: Remove (struct_mutex) locking for busy-ioctl")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470762505-12799-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c