Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a921645 authored by Jesse Barnes's avatar Jesse Barnes Committed by Dave Airlie
Browse files

drm: when queuing an event with NEXTONMISS, return queued sequence to userspace



If we queue a vblank event but miss it, we should return the actual
sequence number we queued to userspace, so its event handling function
will know which event to look for.

Acked-by: default avatarKristian Høgsberg <krh@bitplanet.net>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent c9a9c5e0
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -585,6 +585,7 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe,
	if ((vblwait->request.type & _DRM_VBLANK_NEXTONMISS) &&
	if ((vblwait->request.type & _DRM_VBLANK_NEXTONMISS) &&
	    (seq - vblwait->request.sequence) <= (1 << 23)) {
	    (seq - vblwait->request.sequence) <= (1 << 23)) {
		vblwait->request.sequence = seq + 1;
		vblwait->request.sequence = seq + 1;
		vblwait->reply.sequence = vblwait->request.sequence;
	}
	}


	DRM_DEBUG("event on vblank count %d, current %d, crtc %d\n",
	DRM_DEBUG("event on vblank count %d, current %d, crtc %d\n",