]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Serialise multiple event readers
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Nov 2015 14:39:03 +0000 (14:39 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Nov 2015 14:21:27 +0000 (15:21 +0100)
commit70d6c7389093383d9973ebe7d7909308adf0ff02
tree9d5e5e095ceb0b817f7666412a9772caacb46d57
parentb0fc41dcbc9f4612f8eae05fc621202fa56c2602
drm: Serialise multiple event readers

The previous patch reintroduced a race condition whereby a failure in
one reader may allow a second reader to see out-of-order events.
Introduce a mutex to serialise readers so that an event is completed in
its entirety before another reader may process an event. The two readers
may race against each other, but the events each retrieves are in the
correct order.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1448462343-2072-2-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_fops.c
include/drm/drmP.h