From mboxrd@z Thu Jan 1 00:00:00 1970 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 48720C27C6E for ; Fri, 14 Jun 2024 21:47:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69F7410E2AC; Fri, 14 Jun 2024 21:47:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BPhH8zig"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8FC910E2B3 for ; Fri, 14 Jun 2024 21:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718401651; x=1749937651; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=5CkwzO55EzMAuk+e+WdVq9SUlqfUv+gGSF7eSYeYvvQ=; b=BPhH8zigKm09z6dCDL3T50CsQolr40Vrf7tV61fmLP9p2lDownLYUj10 NzysUY32ZeFHN1ZtWulnKPsml+koQuB46aXnPSAEDlFsgvbXvW+uWH+bC jt0BJsqiUjJEc8HnwUcqlT5CGIME/6a1VcjzTFpyEVIOSnMycFzqp8akE N14m+h0Jnx83PHzpmUK8Ohh5uIVIsbc6598JRGrILxzTK4wF0CcS/IAru EBpOIYG/uE1TuD0uUbat+6933P2ZXHii9B7TIyDJqpEMWWEg7p0MlB0VD qDH203A/Dsq+e9XFmId8MkCnuUT391bl+svvNo7QY04u0ejwFz2+uDh0B Q==; X-CSE-ConnectionGUID: 4VUB7nppSoWMjCfokElxNw== X-CSE-MsgGUID: HCqWjJwPS+Sxaw3wq6t5Vw== X-IronPort-AV: E=McAfee;i="6700,10204,11103"; a="25886562" X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="25886562" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2024 14:47:27 -0700 X-CSE-ConnectionGUID: oV52vSgfStewwXPgeIxuNw== X-CSE-MsgGUID: wmX48BZmRKm12gApvMu0jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,238,1712646000"; d="scan'208";a="45572400" Received: from szeng-desk.jf.intel.com ([10.165.21.149]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2024 14:47:27 -0700 From: Oak Zeng To: intel-xe@lists.freedesktop.org Subject: [CI 08/44] drm: Move GPUVA_START/LAST to drm_gpuvm.h Date: Fri, 14 Jun 2024 17:57:41 -0400 Message-Id: <20240614215817.1097633-8-oak.zeng@intel.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20240614215817.1097633-1-oak.zeng@intel.com> References: <20240614215817.1097633-1-oak.zeng@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Move them to .h file so they can be used outside of drm_gpuvm.c. Also add a GPUVA_END micro. Cc: Matthew Brost Cc: Thomas Hellström Cc: Brian Welty Cc: Himal Prasad Ghimiray Signed-off-by: Oak Zeng --- drivers/gpu/drm/drm_gpuvm.c | 3 --- include/drm/drm_gpuvm.h | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index f9eb56f24bef..7402ed6f1d33 100644 --- a/drivers/gpu/drm/drm_gpuvm.c +++ b/drivers/gpu/drm/drm_gpuvm.c @@ -867,9 +867,6 @@ __drm_gpuvm_bo_list_del(struct drm_gpuvm *gpuvm, spinlock_t *lock, #define to_drm_gpuva(__node) container_of((__node), struct drm_gpuva, rb.node) -#define GPUVA_START(node) ((node)->va.addr) -#define GPUVA_LAST(node) ((node)->va.addr + (node)->va.range - 1) - /* We do not actually use drm_gpuva_it_next(), tell the compiler to not complain * about this. */ diff --git a/include/drm/drm_gpuvm.h b/include/drm/drm_gpuvm.h index 00d4e43b76b6..429dc0d82eba 100644 --- a/include/drm/drm_gpuvm.h +++ b/include/drm/drm_gpuvm.h @@ -38,6 +38,10 @@ struct drm_gpuvm; struct drm_gpuvm_bo; struct drm_gpuvm_ops; +#define GPUVA_START(node) ((node)->va.addr) +#define GPUVA_LAST(node) ((node)->va.addr + (node)->va.range - 1) +#define GPUVA_END(node) ((node)->va.addr + (node)->va.range) + /** * enum drm_gpuva_flags - flags for struct drm_gpuva */ -- 2.26.3