From patchwork Mon Oct 8 19:50:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 12050 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7C87B23FB3 for ; Mon, 8 Oct 2012 19:51:29 +0000 (UTC) Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by fiordland.canonical.com (Postfix) with ESMTP id 152DAA18B70 for ; Mon, 8 Oct 2012 19:51:28 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id rr13so4871142pbb.11 for ; Mon, 08 Oct 2012 12:51:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=ty9RBv7Zn3bOfBxNd29m/8Hp1sljq7D0iZhSRHzFvKM=; b=QBxet3dDZAZHa+dBovDMnjC+9+b7NmkqLIBu+2r+PrsWQochmf4/WENiDW0RgTXTI8 C17xYxZpNlhWUyOMqfFP71f5uN3wMi8ruf4uikOtHdyyvcwUZGy+a+8RLmKnkCn9txsg 8xMLkhFEsb0t2CmRIzMupn/nKzvLudkdpyldUQwzDDrLhBGBfAE6wAUmVxZ3/oVtEPrL u08BsNf43HWZDEPdYP7D/QQOtuV7MQ6gyJHD9w+x4dPPrrd9iRM+WmWiiVYlC/NdgUPe WWohggEkZjcRgH+b3Jw5kFYbQJc3/4fbwhAYfqFf+Tq4MeptAx2tuk79oYLDrCi/cOGJ fBuw== Received: by 10.68.83.68 with SMTP id o4mr56836278pby.25.1349725887577; Mon, 08 Oct 2012 12:51:27 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.68.34.137 with SMTP id z9csp314525pbi; Mon, 8 Oct 2012 12:51:27 -0700 (PDT) Received: by 10.182.152.36 with SMTP id uv4mr1003976obb.81.1349725886910; Mon, 08 Oct 2012 12:51:26 -0700 (PDT) Received: from mail-oa0-f50.google.com (mail-oa0-f50.google.com [209.85.219.50]) by mx.google.com with ESMTPS id ym2si20201401obb.141.2012.10.08.12.51.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:26 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.219.50 as permitted sender) client-ip=209.85.219.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.219.50 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-oa0-f50.google.com with SMTP id n16so611275oag.37 for ; Mon, 08 Oct 2012 12:51:26 -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=ty9RBv7Zn3bOfBxNd29m/8Hp1sljq7D0iZhSRHzFvKM=; b=U726c9feY5J/ctM4coShSBUuy2RTUxNkXJQQUaZNrIFKRbJB/KSSSvwRv/tzAyJQHj PuCQW9/AAtMqRigGxHkOXvdF40qSok40ktLot9qymJAXwPt99InMQpRiOvjgZzEgn17J 6Y73aNUPVA/oZ37EpJBaCg1akt5DC5NLM3BiJXV2qwzJrNAVY05OUlg9jbc9amSi/Io0 AAFpOFAhTx4dKeuG/5qNom1IzUZAr1N7ayCFKNCQsJvjfZsx6pEgGnFLzyZ8UFi61nNc 5EYx5QYQHAeM4qTOtWoRy964qSIE9sCPCkJhr5AhXiFnoBPqInlqgGoO2OT6xL69P/nu 8SZg== Received: by 10.182.147.8 with SMTP id tg8mr1037810obb.21.1349725886648; Mon, 08 Oct 2012 12:51:26 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id ea6sm18002405obc.9.2012.10.08.12.51.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:26 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, airlied@linux.ie, daniel.vetter@ffwll.ch, bskeggs@redhat.com, inki.dae@samsung.com, laurent.pinchart@ideasonboard.com, s.hauer@pengutronix.de, gregkh@linuxfoundation.org, Rob Clark Subject: [PATCH 07/11] drm/shmob: use drm_send_vblank_event() helper Date: Mon, 8 Oct 2012 14:50:45 -0500 Message-Id: <1349725849-22433-8-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> X-Gm-Message-State: ALoCoQm9N4twrzg4riL1I6jy1jRWOzrGX2KS/0f7x1VkSgrmxTSRWqMORP/SgY723I/yYlq3mm7l From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 0e7a930..3ecb702 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c @@ -451,27 +451,16 @@ void shmob_drm_crtc_finish_page_flip(struct shmob_drm_crtc *scrtc) { struct drm_pending_vblank_event *event; struct drm_device *dev = scrtc->crtc.dev; - struct timeval vblanktime; unsigned long flags; spin_lock_irqsave(&dev->event_lock, flags); event = scrtc->event; scrtc->event = NULL; + if (event) { + drm_send_vblank_event(dev, 0, event); + drm_vblank_put(dev, 0); + } spin_unlock_irqrestore(&dev->event_lock, flags); - - if (event == NULL) - return; - - event->event.sequence = drm_vblank_count_and_time(dev, 0, &vblanktime); - event->event.tv_sec = vblanktime.tv_sec; - event->event.tv_usec = vblanktime.tv_usec; - - spin_lock_irqsave(&dev->event_lock, flags); - list_add_tail(&event->base.link, &event->base.file_priv->event_list); - wake_up_interruptible(&event->base.file_priv->event_wait); - spin_unlock_irqrestore(&dev->event_lock, flags); - - drm_vblank_put(dev, 0); } static int shmob_drm_crtc_page_flip(struct drm_crtc *crtc,