summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fops.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-08 14:19:00 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-10 16:57:54 +0200
commit3b24f7d6758165919ba7b83b3c8365c38ffacc0b (patch)
tree004c7580981a828075ff01e3fa764675febab6cc /drivers/gpu/drm/drm_fops.c
parentdrm/sun4i: Implement some semblance of vblank event handling (diff)
downloadlinux-3b24f7d6758165919ba7b83b3c8365c38ffacc0b.tar.xz
linux-3b24f7d6758165919ba7b83b3c8365c38ffacc0b.zip
drm/atomic: Add struct drm_crtc_commit to track async updates
Split out from my big nonblocking atomic commit helper code as prep work. While add it, also add some neat asciiart to document how it's supposed to be used. v2: Resurrect misplaced hunk in the kerneldoc. v3: Wording improvements from Liviu. Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tomeu Vizoso <tomeu.vizoso@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Tested-by: Liviu Dudau <Liviu.Dudau@arm.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-8-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r--drivers/gpu/drm/drm_fops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 64121f567234..a27bc7cda975 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -797,6 +797,12 @@ void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e)
{
assert_spin_locked(&dev->event_lock);
+ if (e->completion) {
+ /* ->completion might disappear as soon as it signalled. */
+ complete_all(e->completion);
+ e->completion = NULL;
+ }
+
if (e->fence) {
fence_signal(e->fence);
fence_put(e->fence);