From patchwork Wed Aug 3 21:17:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 9262203 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 D34376048F for ; Wed, 3 Aug 2016 21:17:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1BA325D9E for ; Wed, 3 Aug 2016 21:17:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B66B727FB7; Wed, 3 Aug 2016 21:17:33 +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 4F69425D9E for ; Wed, 3 Aug 2016 21:17:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8A8E6E8DB; Wed, 3 Aug 2016 21:17:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id E138E6E8DC for ; Wed, 3 Aug 2016 21:17:24 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 03 Aug 2016 14:17:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,467,1464678000"; d="scan'208"; a="1029266473" Received: from rdvivi-hillsboro.jf.intel.com ([10.7.196.156]) by orsmga002.jf.intel.com with ESMTP; 03 Aug 2016 14:17:24 -0700 From: Rodrigo Vivi To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/nouveau: Use drm_crtc_vblank_{on, off} instead of old legacy ones. Date: Wed, 3 Aug 2016 14:17:13 -0700 Message-Id: <1470259034-23153-1-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 2.5.5 Cc: 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 No functional change. Justs finish the migration from drm_vblank_*(dev, pipe) to drm_crtc_vblank_*(crtc) Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/nouveau/nouveau_display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index afbf557..148bd40 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -390,11 +390,11 @@ nouveau_display_fini(struct drm_device *dev) struct nouveau_display *disp = nouveau_display(dev); struct nouveau_drm *drm = nouveau_drm(dev); struct drm_connector *connector; - int head; + struct drm_crtc *crtc; /* Make sure that drm and hw vblank irqs get properly disabled. */ - for (head = 0; head < dev->mode_config.num_crtc; head++) - drm_vblank_off(dev, head); + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) + drm_crtc_vblank_off(crtc); /* disable flip completion events */ nvif_notify_put(&drm->flip); @@ -647,13 +647,18 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) drm_helper_resume_force_mode(dev); - /* Make sure that drm and hw vblank irqs get resumed if needed. */ + for (head = 0; head < dev->mode_config.num_crtc; head++) - drm_vblank_on(dev, head); + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); + /* Make sure that drm and hw vblank + * irqs get resumed if needed. + */ + drm_crtc_vblank_on(crtc); + if (!nv_crtc->cursor.nvbo) continue;