From patchwork Mon Jun 6 14:41:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9158437 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 B688760759 for ; Mon, 6 Jun 2016 14:43:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7E972015F for ; Mon, 6 Jun 2016 14:43:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C9C526E5D; Mon, 6 Jun 2016 14:43:02 +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=ham 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 280142015F for ; Mon, 6 Jun 2016 14:43:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF4526E58F; Mon, 6 Jun 2016 14:43:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f193.google.com (mail-yw0-f193.google.com [209.85.161.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 76E3A6E593; Mon, 6 Jun 2016 14:42:30 +0000 (UTC) Received: by mail-yw0-f193.google.com with SMTP id l126so19299734ywe.3; Mon, 06 Jun 2016 07:42:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CJIHhyRrG6MWQAxSXYWiKm2W5fJWU3gAkRyxf5ZyKps=; b=ennp9DgjXS0g1yC/uB0ihiTQRvbBlxWHBs1CbFa9mJqb82Jhom4W6txS0xw/PDYtbz KsaI2Ubc2CtYAUKZSPkNiAWs6QSzs8/CZ+i4If9g47L9fxXKd/LEWFCuC0XjJu68ueRV JKtzu/qaTk9YQcNVaSUOOh7DULr75BwaiHz8A95KZThsFfKQ7eVslL3xJPJGNnKDXlVG Ep1CZ0T2bRXn2mXPP9Nfzfi7jsHxRmzYgR//ze8IlPzTCHza9+SUwa+sQRJ/oRw1rvMN QBzEvQd++aRN1E5FqtoPcVdOcYjMZpYWNjfFqA7TiXdQSKeKkFPPXhnks0ZFQ+0PtfY2 LuuA== X-Gm-Message-State: ALyK8tIZAPVf8fO+cUG9qZVaLyKdu4gpshWhzUSOzlN2oIphxPP018AfFP0ydidYsvF7rQ== X-Received: by 10.13.233.199 with SMTP id s190mr10255799ywe.99.1465224148946; Mon, 06 Jun 2016 07:42:28 -0700 (PDT) Received: from jade.localdomain ([201.82.24.203]) by smtp.gmail.com with ESMTPSA id f124sm11736407ywb.13.2016.06.06.07.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jun 2016 07:42:28 -0700 (PDT) From: Gustavo Padovan To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/14] drm/nouveau: use drm_crtc_vblank_{get,put}() Date: Mon, 6 Jun 2016 11:41:42 -0300 Message-Id: <1465224105-21485-11-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465224105-21485-1-git-send-email-gustavo@padovan.org> References: <1465224105-21485-1-git-send-email-gustavo@padovan.org> Cc: "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Gustavo Padovan , Ben Skeggs , open list 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 From: Gustavo Padovan Replace the legacy drm_vblank_{get,put}() with the new helper functions. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 9d72467..7898459f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -764,7 +764,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, new_bo->bo.offset }; /* Keep vblanks on during flip, for the target crtc of this flip */ - drm_vblank_get(dev, nouveau_crtc(crtc)->index); + drm_crtc_vblank_get(crtc); /* Emit a page flip */ if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { @@ -809,7 +809,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, return 0; fail_unreserve: - drm_vblank_put(dev, nouveau_crtc(crtc)->index); + drm_crtc_vblank_put(crtc); ttm_bo_unreserve(&old_bo->bo); fail_unpin: mutex_unlock(&cli->mutex); @@ -847,12 +847,12 @@ nouveau_finish_page_flip(struct nouveau_channel *chan, drm_crtc_send_vblank_event(s->crtc, s->event); /* Give up ownership of vblank for page-flipped crtc */ - drm_vblank_put(dev, drm_crtc_index(s->crtc)); + drm_crtc_vblank_put(s->crtc); } } else { /* Give up ownership of vblank for page-flipped crtc */ - drm_vblank_put(dev, drm_crtc_index(state->crtc)); + drm_crtc_vblank_put(state->crtc); } list_del(&s->head);