]> 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)
commit72a851841ed9c7d314f727e6cd57e5feec210bd9
tree3057a2634c302974a2246789f4d155915222ceb8
parent923e8130c08b375123207eacae8de5279e4f4ef4
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: 2e565d6ce67d ("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