From patchwork Mon Oct 8 19:50:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 1566861 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id B270A40135 for ; Mon, 8 Oct 2012 19:55:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FFBCA08A4 for ; Mon, 8 Oct 2012 12:55:44 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by gabe.freedesktop.org (Postfix) with ESMTP id AF0ECA087F for ; Mon, 8 Oct 2012 12:51:23 -0700 (PDT) Received: by mail-ob0-f177.google.com with SMTP id wd20so4102825obb.36 for ; Mon, 08 Oct 2012 12:51:23 -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=KQMTKLzRIGiX2v9nQ9pvAgaTWFr51GWL/1RFkPmJknY=; b=YRMG1hoQfrNHErZn62DLGREASjEWMSHRKNCmh6dd82klyLPXT5LfpH8L1MnWNYKUcA sv8CpKfuM5LMZm6wmZTGsyS3GzgFykkO5YOerAl+exiTfo2BFj6Xowm/7d/k+gFqNHog zVTiiry2S9oiasEa4DIJoVF5/PSKXDhEt1u4T0uzKdV+gk0b0QhaTpq3wqaLG68UXT/6 2pK2mpmMqhliYdeK3/0KQ/UmDydufghqoRAlDnp64QZze5kfVyBt2cxKbUUbLmbb/+qT PIqNrKXsCkII4agfD1ppaSEcAEr3mZW7h+BeL0dBUE66zt+0/mFRjvQuHrGoxNq7K9/Z z18g== Received: by 10.60.3.6 with SMTP id 6mr14395774oey.117.1349725883060; Mon, 08 Oct 2012 12:51:23 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id k8sm14930046oeh.9.2012.10.08.12.51.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:22 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 05/11] drm/exynos: use drm_send_vblank_event() helper Date: Mon, 8 Oct 2012 14:50:43 -0500 Message-Id: <1349725849-22433-6-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/exynos/exynos_drm_fimd.c | 10 ++-------- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 10 ++-------- drivers/gpu/drm/exynos/exynos_mixer.c | 9 ++------- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index b19cd93..fe8fb78 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -587,7 +587,6 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc) { struct exynos_drm_private *dev_priv = drm_dev->dev_private; struct drm_pending_vblank_event *e, *t; - struct timeval now; unsigned long flags; bool is_checked = false; @@ -601,13 +600,8 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc) is_checked = true; - do_gettimeofday(&now); - e->event.sequence = 0; - e->event.tv_sec = now.tv_sec; - e->event.tv_usec = now.tv_usec; - - list_move_tail(&e->base.link, &e->base.file_priv->event_list); - wake_up_interruptible(&e->base.file_priv->event_wait); + list_del(&e->base.link); + drm_send_vblank_event(drm_dev, -1, e); } if (is_checked) { diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index e364165..4549efb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c @@ -370,7 +370,6 @@ static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc) { struct exynos_drm_private *dev_priv = drm_dev->dev_private; struct drm_pending_vblank_event *e, *t; - struct timeval now; unsigned long flags; bool is_checked = false; @@ -384,13 +383,8 @@ static void vidi_finish_pageflip(struct drm_device *drm_dev, int crtc) is_checked = true; - do_gettimeofday(&now); - e->event.sequence = 0; - e->event.tv_sec = now.tv_sec; - e->event.tv_usec = now.tv_usec; - - list_move_tail(&e->base.link, &e->base.file_priv->event_list); - wake_up_interruptible(&e->base.file_priv->event_wait); + list_del(&e->base.link); + drm_send_vblank_event(drm_dev, -1, e); } if (is_checked) { diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 25b97d5..325aefd 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -828,7 +828,6 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) { struct exynos_drm_private *dev_priv = drm_dev->dev_private; struct drm_pending_vblank_event *e, *t; - struct timeval now; unsigned long flags; bool is_checked = false; @@ -841,13 +840,9 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) continue; is_checked = true; - do_gettimeofday(&now); - e->event.sequence = 0; - e->event.tv_sec = now.tv_sec; - e->event.tv_usec = now.tv_usec; - list_move_tail(&e->base.link, &e->base.file_priv->event_list); - wake_up_interruptible(&e->base.file_priv->event_wait); + list_del(&e->base.link); + drm_send_vblank_event(drm_dev, -1, e); } if (is_checked)