From patchwork Mon Apr 8 19:06:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13621528 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 025B1CD1292 for ; Mon, 8 Apr 2024 19:06:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDADF112942; Mon, 8 Apr 2024 19:06:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="KEGRTZpD"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9AFD010F874; Mon, 8 Apr 2024 19:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712603186; x=1744139186; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=My5Ks8kFnEsyCNsr1i1Bkc0LNiYr8HU1BXwLK6q8ZdQ=; b=KEGRTZpDK70PSgqiECAfG7/UMIzAPbwVGET1zrHpSTVhXAaAQ5bvuf51 iG+/hVmDGREboks/5bakSwAFR/tkq6D+1W9P60r0dbVpIo9ah3bsa353A yCOInDJ7leicpQgQbgqYwoKKyY0vMHCYnNUJjhbRc3XPqtTtJ8AQgGcRJ kMbGI5qY9bHDMr/b+PqXW3kJzLcfZ5d25qB7+RKbWWvPjblk6+hN1M6kx aq9iojjEAb3gqsqY+bxYOldMzoMnjlgrao3DoERxiUHTfboMKzOCz819Q g8cxenBEn8ofefnTdW5s8yujFjeLOxqkA37u/feyuQ4pZJ/T1XGRzcHdV w==; X-CSE-ConnectionGUID: pWfMGgKTSJu/hXZwTTJA4Q== X-CSE-MsgGUID: LSUueU+YTaOmM+N9MdsL4Q== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="19278645" X-IronPort-AV: E=Sophos;i="6.07,187,1708416000"; d="scan'208";a="19278645" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 12:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="827792379" X-IronPort-AV: E=Sophos;i="6.07,187,1708416000"; d="scan'208";a="827792379" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by orsmga001.jf.intel.com with SMTP; 08 Apr 2024 12:06:22 -0700 Received: by stinkbox (sSMTP sendmail emulation); Mon, 08 Apr 2024 22:06:21 +0300 From: Ville Syrjala To: dri-devel@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Karol Herbst , Lyude Paul , Danilo Krummrich , nouveau@lists.freedesktop.org Subject: [PATCH 4/5] drm/nouveau: Use drm_crtc_vblank_crtc() Date: Mon, 8 Apr 2024 22:06:10 +0300 Message-ID: <20240408190611.24914-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240408190611.24914-1-ville.syrjala@linux.intel.com> References: <20240408190611.24914-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Replace the open coded drm_crtc_vblank_crtc() with the real thing. Cc: Karol Herbst Cc: Lyude Paul Cc: Danilo Krummrich Cc: nouveau@lists.freedesktop.org Signed-off-by: Ville Syrjälä Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index f28f9a857458..aed5d5b51b43 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -83,7 +83,7 @@ static bool nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, ktime_t *stime, ktime_t *etime) { - struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)]; + struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(crtc); struct nvif_head *head = &nouveau_crtc(crtc)->head; struct nvif_head_scanoutpos_v0 args; int retry = 20;