From patchwork Mon Oct 8 19:50:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 12047 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 50E3E23FB3 for ; Mon, 8 Oct 2012 19:51:22 +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 CD6C2A18BDC for ; Mon, 8 Oct 2012 19:51:21 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id rr13so4871142pbb.11 for ; Mon, 08 Oct 2012 12:51:21 -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=amtdnlVb7vxyEdXU1pBWrclE0rztt+CQkuro5ZCXHfs=; b=SfxCPcENM4vhfYH3xqFya9sJ9Ga3Tlccj7Jif84eWUjmBro6bfoL7x5iQktqC+yqsX 82LApwUlobHE6JB0y0bTnFF8iAWvssGIAlw4TsbE8PtH0eLG9QC32dPO+x0NT225h724 yArp86dGCI2FCrTzHR4zaQfS+ST9QDbcE8U486wlmeu7BPhlLeQBPKrKtiu5yyfijN6k J5spYuZ65LyF02781+TKDj4BwZP+roWAwbaoBBwSlMki06SCSgUkNYPSnefnVju7syKU LFct/EBtpCKBYkVwFn+1eobulQUh85CyUS0lxJ9vCO1bMg3AJbqE4Pwj/EmXZuWAkboP KJwA== Received: by 10.66.88.4 with SMTP id bc4mr45423416pab.42.1349725881515; Mon, 08 Oct 2012 12:51:21 -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 z9csp314491pbi; Mon, 8 Oct 2012 12:51:21 -0700 (PDT) Received: by 10.60.26.230 with SMTP id o6mr13831276oeg.109.1349725880791; Mon, 08 Oct 2012 12:51:20 -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.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:20 -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:20 -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=amtdnlVb7vxyEdXU1pBWrclE0rztt+CQkuro5ZCXHfs=; b=CtjrT/oM0dAPyWsDrJg9DguI8PYXsT5/J1b4SCMna/t2JJ2fRmNj4E0qntV1l98r8E /gz4dwvRpPaob5X0LXVpuezuvVhkr6VFdf+hFcpV8qb0eBMrQDrTNQu9shBgwYklhF6E ZAt2losnLQeey70itfYII4nSJFdHMqzraojOj56pvLy5N2BZW7S6ea+w9ctEp5AvlFzX iuXUUEO8NCX3iomT2Im3U5trOPcBYuM+ymXbERToafEiHvptzLwFcSdaOMeY3sZf6NFR ohG3BUsC9lt1ZEQKYjS9182LYbPaDke2FqcXa7iiEDB/J1JqQeMlvrii1MMmy7JBtud+ Fr/Q== Received: by 10.60.171.199 with SMTP id aw7mr3746445oec.54.1349725880536; Mon, 08 Oct 2012 12:51:20 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id b5sm17992428obd.18.2012.10.08.12.51.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Oct 2012 12:51:20 -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 04/11] drm/radeon: use drm_send_vblank_event() helper Date: Mon, 8 Oct 2012 14:50:42 -0500 Message-Id: <1349725849-22433-5-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: ALoCoQmMN9Umq3sNLPXPVd4lYn/0ZVirvW0HhBoMnu6mbnhRLTct3/1irUQ626VdMcSAr6xvaoXo From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/radeon/radeon_display.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c index 7ddef8f..8dad9c2 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -271,8 +271,6 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) { struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id]; struct radeon_unpin_work *work; - struct drm_pending_vblank_event *e; - struct timeval now; unsigned long flags; u32 update_pending; int vpos, hpos; @@ -328,14 +326,9 @@ void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id) radeon_crtc->unpin_work = NULL; /* wakeup userspace */ - if (work->event) { - e = work->event; - e->event.sequence = drm_vblank_count_and_time(rdev->ddev, crtc_id, &now); - 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 (work->event) + drm_send_vblank_event(rdev->ddev, crtc_id, work->event); + spin_unlock_irqrestore(&rdev->ddev->event_lock, flags); drm_vblank_put(rdev->ddev, radeon_crtc->crtc_id);