From patchwork Mon Oct 8 19:50:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 1566841 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 55D2DDFFF1 for ; Mon, 8 Oct 2012 19:54:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 48622A0889 for ; Mon, 8 Oct 2012 12:54:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 2402BA02FE for ; Mon, 8 Oct 2012 12:51:19 -0700 (PDT) Received: by mail-oa0-f49.google.com with SMTP id l10so544651oag.36 for ; Mon, 08 Oct 2012 12:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=TbMntboC9B4ujk/I1NnHUh05ZKcbh8g0m+hE48kYa20=; b=HLlq7wJbYCwH2hlCfLh9rUDC6oZJMVZLjgWGm+an2oRzNQQ/+e6scOHQ2l70o+Pr5M ixLcaHToIVlh6/VvH3ug1UbzTNkKmY8joQkLcH9mJnBawupEgtNMpPEMUO0IFJZ23l/6 KNRzOWiNRXxT1mFrWUV8LWdNsL6LcqGK4zRRprBomkRvF68C2Y+YiS0VCro15StCSYp0 WiJvh+Yx8b2fi1AwSbsWTn1OzG7Kke/v8bDjdQH7tquSaZ7yn3CZrrXNBbEmIzgSpcPQ bl5yNCgeoY+9Q9IlM/hetLl6UUe6+sM5R2rnT4e6BQlgsecHl0kUik16hkFuBQ/+AYtc jBbA== Received: by 10.182.10.71 with SMTP id g7mr1008993obb.84.1349725878937; Mon, 08 Oct 2012 12:51:18 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id k7sm14933802oek.6.2012.10.08.12.51.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:17 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/11] drm/nouveau: use drm_send_vblank_event() helper Date: Mon, 8 Oct 2012 14:50:41 -0500 Message-Id: <1349725849-22433-4-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349725849-22433-1-git-send-email-rob.clark@linaro.org> References: <1349725849-22433-1-git-send-email-rob.clark@linaro.org> Cc: patches@linaro.org, daniel.vetter@ffwll.ch, laurent.pinchart@ideasonboard.com, gregkh@linuxfoundation.org, Rob Clark , bskeggs@redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/nouveau/nouveau_display.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 7e16dc5..b1a32b9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -566,17 +566,8 @@ nouveau_finish_page_flip(struct nouveau_channel *chan, } s = list_first_entry(&swch->flip, struct nouveau_page_flip_state, head); - if (s->event) { - struct drm_pending_vblank_event *e = s->event; - struct timeval now; - - do_gettimeofday(&now); - e->event.sequence = 0; - e->event.tv_sec = now.tv_sec; - e->event.tv_usec = now.tv_usec; - list_add_tail(&e->base.link, &e->base.file_priv->event_list); - wake_up_interruptible(&e->base.file_priv->event_wait); - } + if (s->event) + drm_send_vblank_event(dev, -1, s->event); list_del(&s->head); if (ps)