]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commita25ac7e35d23a7871b4c7c1c4ba81e6229a84645
tree73788d2100e6eaa8d67740307d8dfe161ef4b5de
parenta5d2012c3c4068c4bc945813e479c047d04839a4
drm: Wake up next in drm_read() chain if we are forced to putback the event

BugLink: https://bugs.launchpad.net/bugs/1838700
[ Upstream commit 60b801999c48b6c1dd04e653a38e2e613664264e ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/drm_file.c