From patchwork Wed Aug 3 21:17:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 9262211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1CBF26048F for ; Wed, 3 Aug 2016 21:17:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B9F525D9E for ; Wed, 3 Aug 2016 21:17:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 008CD27FB7; Wed, 3 Aug 2016 21:17:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B808425D9E for ; Wed, 3 Aug 2016 21:17:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 71AD86E8E2; Wed, 3 Aug 2016 21:17:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 88B436E8DE; Wed, 3 Aug 2016 21:17:43 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 03 Aug 2016 14:17:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,467,1464678000"; d="scan'208";a="859256370" Received: from rdvivi-hillsboro.jf.intel.com ([10.7.196.156]) by orsmga003.jf.intel.com with ESMTP; 03 Aug 2016 14:17:42 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Subject: [PATCH 2/2] drm: Remove legacy drm_wait_one_vblank(dev, pipe). Date: Wed, 3 Aug 2016 14:17:34 -0700 Message-Id: <1470259054-23444-2-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1470259054-23444-1-git-send-email-rodrigo.vivi@intel.com> References: <1470259054-23444-1-git-send-email-rodrigo.vivi@intel.com> Cc: dri-devel@lists.freedesktop.org, Rodrigo Vivi X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Now that this is not used anywhere else anymore we can go ahead and remove the legacy version. Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/drm_irq.c | 35 +++++++++++------------------------ include/drm/drm_irq.h | 1 - 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 523419a..6250518 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -1194,16 +1194,17 @@ void drm_crtc_vblank_put(struct drm_crtc *crtc) EXPORT_SYMBOL(drm_crtc_vblank_put); /** - * drm_wait_one_vblank - wait for one vblank - * @dev: DRM device - * @pipe: CRTC index + * drm_crtc_wait_one_vblank - wait for one vblank + * @crtc: DRM crtc * - * This waits for one vblank to pass on @pipe, using the irq driver interfaces. - * It is a failure to call this when the vblank irq for @pipe is disabled, e.g. + * This waits for one vblank to pass on @crtc, using the irq driver interfaces. + * It is a failure to call this when the vblank irq for @crtc is disabled, e.g. * due to lack of driver support or because the crtc is off. */ -void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe) +void drm_crtc_wait_one_vblank(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; + unsigned int pipe = drm_crtc_index(crtc); struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; int ret; u32 last; @@ -1211,33 +1212,19 @@ void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe) if (WARN_ON(pipe >= dev->num_crtcs)) return; - ret = drm_vblank_get(dev, pipe); + ret = drm_crtc_vblank_get(crtc); if (WARN(ret, "vblank not available on crtc %i, ret=%i\n", pipe, ret)) return; - last = drm_vblank_count(dev, pipe); + last = drm_crtc_vblank_count(crtc); ret = wait_event_timeout(vblank->queue, - last != drm_vblank_count(dev, pipe), + last != drm_crtc_vblank_count(crtc), msecs_to_jiffies(100)); WARN(ret == 0, "vblank wait timed out on crtc %i\n", pipe); - drm_vblank_put(dev, pipe); -} -EXPORT_SYMBOL(drm_wait_one_vblank); - -/** - * drm_crtc_wait_one_vblank - wait for one vblank - * @crtc: DRM crtc - * - * This waits for one vblank to pass on @crtc, using the irq driver interfaces. - * It is a failure to call this when the vblank irq for @crtc is disabled, e.g. - * due to lack of driver support or because the crtc is off. - */ -void drm_crtc_wait_one_vblank(struct drm_crtc *crtc) -{ - drm_wait_one_vblank(crtc->dev, drm_crtc_index(crtc)); + drm_crtc_vblank_put(crtc); } EXPORT_SYMBOL(drm_crtc_wait_one_vblank); diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h index 406f954..b90d5ee 100644 --- a/include/drm/drm_irq.h +++ b/include/drm/drm_irq.h @@ -148,7 +148,6 @@ extern bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe); extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc); extern int drm_crtc_vblank_get(struct drm_crtc *crtc); extern void drm_crtc_vblank_put(struct drm_crtc *crtc); -extern void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe); extern void drm_crtc_wait_one_vblank(struct drm_crtc *crtc); extern void drm_crtc_vblank_off(struct drm_crtc *crtc); extern void drm_crtc_vblank_reset(struct drm_crtc *crtc);