]> git.baikalelectronics.ru Git - kernel.git/commit
drm/fence: allow fence waiting to be interrupted by userspace
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 12 Sep 2016 19:08:11 +0000 (16:08 -0300)
committerSean Paul <seanpaul@chromium.org>
Mon, 12 Sep 2016 20:59:15 +0000 (16:59 -0400)
commit8978a0fa63eb09c7f3a340ffc5873f58849ef9fa
tree22f63f7c4569b421ccb5cef731170c38ca1a13f2
parent595144c394972ccb2c4fa2a8bd30389680356944
drm/fence: allow fence waiting to be interrupted by userspace

If userspace is running an synchronously atomic commit and interrupts the
atomic operation during fence_wait() it will hang until the timer expires,
so here we change the wait to be interruptible so it stop immediately when
userspace wants to quit.

Also adds the necessary error checking for fence_wait().

v2: Comment by Daniel Vetter
- Add error checking for fence_wait()

v3: Rebase on top of new atomic noblocking support

v4: Comment by Maarten Lankhorst
- remove 'swapped' bitfield as it was duplicating information

v5: Comments by Maarten Lankhorst
- assign plane->state to plane_state if !intr
- squash previous patch into this one

v6: Comment by Sean Paul
- rename intr to pre_swap

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[seanpaul fixed a couple checkpatch warnings and moved the preswap comment]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473707291-14781-1-git-send-email-gustavo@padovan.org
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/msm/msm_atomic.c
include/drm/drm_atomic_helper.h