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: 12048 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 6F03C23FB3 for ; Mon, 8 Oct 2012 19:51:25 +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 C64B2A18BDA for ; Mon, 8 Oct 2012 19:51:24 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id rr13so4871250pbb.11 for ; Mon, 08 Oct 2012 12:51:24 -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=KQMTKLzRIGiX2v9nQ9pvAgaTWFr51GWL/1RFkPmJknY=; b=Yc7FWpgyz/0zNtFAmH15UTccbZLo3fJ3lhygzR1rHt60F3DCwI/vNtu3VTyynsSVeW ntiXtf+xikSJvLWftaSGfzjmZDmwRjXjXtb7SBtPLGBzqmtfB38dqCGAohKgFmJv4uij ME2sbJVjiWvfOXLE2ka1gFo+RTPMewFU1KjKCQQFvvGuA2doxo5KUnVku5O96VM7CBS/ Ya3mJqZ2xzbZiaGv87a0Z4ijFvHQEZ2ln8h0e/XGhRzkZhivvyio2xffoVWVINcfFXQw L2UhKqufrrVLREPcNAWPEUIxgsg6i1099yj4t/UfTAtY3rVlUvaX35x6JeaoYcp+snEc PNVQ== Received: by 10.68.197.200 with SMTP id iw8mr55982180pbc.145.1349725884003; Mon, 08 Oct 2012 12:51:24 -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 z9csp314508pbi; Mon, 8 Oct 2012 12:51:23 -0700 (PDT) Received: by 10.182.150.37 with SMTP id uf5mr1020216obb.10.1349725883360; Mon, 08 Oct 2012 12:51:23 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id b5si4948733obl.208.2012.10.08.12.51.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:23 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-ob0-f178.google.com with SMTP id tb18so4877681obb.37 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) 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 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> X-Gm-Message-State: ALoCoQmzUMDIc6gMRxrlgZFiJncje+Ocsrn7fnNatTXBm35eky/zGK1fnbjA9oIXo6I4LOcf+5Jd 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)