]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Wake up next in drm_read() chain if we are forced to putback the event
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 4 Aug 2017 08:23:28 +0000 (09:23 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 27 Feb 2019 22:04:54 +0000 (22:04 +0000)
commit84e04c56c6969f6028ff9a1b03aa0fb1c3b55a07
treee74b6a00562e44d833d450bc9c1c8ab94cc06d48
parent66bfe32b3bd17e0aaa76c3aa93d329d410987c83
drm: Wake up next in drm_read() chain if we are forced to putback the event

After an event is sent, we try to copy it into the user buffer of the
first waiter in drm_read() and if the user buffer doesn't have enough
room we put it back onto the list. However, we didn't wake up any
subsequent waiter, so that event may sit on the list until either a new
vblank event is sent or a new waiter appears. Rare, but in the worst
case may lead to a stuck process.

Testcase: igt/drm_read/short-buffer-wakeup
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170804082328.17173-1-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_file.c