From patchwork Fri Dec 10 15:00:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Kleiner X-Patchwork-Id: 398672 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBAFAMI8010097 for ; Fri, 10 Dec 2010 15:10:43 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E07719E83E for ; Fri, 10 Dec 2010 07:10:20 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Dec 2010 15:10:43 +0000 (UTC) X-Greylist: delayed 592 seconds by postgrey-1.31 at gabe; Fri, 10 Dec 2010 07:10:12 PST Received: from mx3.gwdg.de (mx3.gwdg.de [134.76.10.16]) by gabe.freedesktop.org (Postfix) with ESMTP id 103BC9E76B for ; Fri, 10 Dec 2010 07:10:11 -0800 (PST) X-IronPort-Reputation-Score: None X-IronPort-AV: E=McAfee;i="5400,1158,6192"; a="19571017" X-IronPort-AV: E=Sophos;i="4.59,324,1288566000"; d="scan'208";a="19571017" Received: from smtp-out.tuebingen.mpg.de (HELO tuebingen.mpg.de) ([192.124.26.249]) by mailer1.mpg.de with ESMTP; 10 Dec 2010 16:00:19 +0100 Received: from [10.38.127.194] (account mario.kleiner@tuebingen.mpg.de [10.38.127.194] verified) by tuebingen.mpg.de (CommuniGate Pro SMTP 5.3.10) with ESMTPSA id 13687298 for dri-devel@lists.freedesktop.org; Fri, 10 Dec 2010 16:00:19 +0100 Message-ID: <4D024083.8080205@tuebingen.mpg.de> Date: Fri, 10 Dec 2010 16:00:19 +0100 From: Mario Kleiner Organization: Max Planck Institute for Biological Cybernetics User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm-vblank: Always return true vblank count of scheduled vblank event. X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 4e82d0d..55160d7 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1086,15 +1086,18 @@ static int drm_queue_vblank_event(struct drm_device *dev, int pipe, e->event.sequence = vblwait->request.sequence; if ((seq - vblwait->request.sequence) <= (1 << 23)) { + e->event.sequence = seq; e->event.tv_sec = now.tv_sec; e->event.tv_usec = now.tv_usec; drm_vblank_put(dev, e->pipe); list_add_tail(&e->base.link, &e->base.file_priv->event_list); wake_up_interruptible(&e->base.file_priv->event_wait); + vblwait->reply.sequence = seq; trace_drm_vblank_event_delivered(current->pid, pipe, vblwait->request.sequence); } else { list_add_tail(&e->base.link, &dev->vblank_event_list); + vblwait->reply.sequence = vblwait->request.sequence; }