From patchwork Wed Jul 11 07:36:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10518989 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 423DA6054E for ; Wed, 11 Jul 2018 07:36:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33B1928DFB for ; Wed, 11 Jul 2018 07:36:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2888A28E9D; Wed, 11 Jul 2018 07:36:34 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A6BE28E9B for ; Wed, 11 Jul 2018 07:36:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D78B06EBE5; Wed, 11 Jul 2018 07:36:28 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 003786EBCD for ; Wed, 11 Jul 2018 07:36:24 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 12315954-1500050 for multiple; Wed, 11 Jul 2018 08:36:04 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 11 Jul 2018 08:36:05 +0100 Message-Id: <20180711073608.20286-5-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180711073608.20286-1-chris@chris-wilson.co.uk> References: <20180711073608.20286-1-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 4/7] drm/i915: Move fence-reg interface to i915_gem_fence_reg.h X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Since we have a header file for i915_gem_fence_reg, let's use it for the interface prototypes currently hidden away in the huge i915_drv.h Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/i915_drv.h | 15 --------------- drivers/gpu/drm/i915/i915_gem_fence_reg.h | 16 ++++++++++++++++ drivers/gpu/drm/i915/i915_vma.h | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a7f2d747e221..43f545add21c 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -70,7 +70,6 @@ #include "i915_gem.h" #include "i915_gem_context.h" -#include "i915_gem_fence_reg.h" #include "i915_gem_object.h" #include "i915_gem_gtt.h" #include "i915_gpu_error.h" @@ -3193,20 +3192,6 @@ i915_vm_to_ppgtt(struct i915_address_space *vm) return container_of(vm, struct i915_hw_ppgtt, vm); } -/* i915_gem_fence_reg.c */ -struct drm_i915_fence_reg * -i915_reserve_fence(struct drm_i915_private *dev_priv); -void i915_unreserve_fence(struct drm_i915_fence_reg *fence); - -void i915_gem_revoke_fences(struct drm_i915_private *dev_priv); -void i915_gem_restore_fences(struct drm_i915_private *dev_priv); - -void i915_gem_detect_bit_6_swizzle(struct drm_i915_private *dev_priv); -void i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj, - struct sg_table *pages); -void i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj, - struct sg_table *pages); - static inline struct i915_gem_context * __i915_gem_context_lookup_rcu(struct drm_i915_file_private *file_priv, u32 id) { diff --git a/drivers/gpu/drm/i915/i915_gem_fence_reg.h b/drivers/gpu/drm/i915/i915_gem_fence_reg.h index c8f1d0cdfa90..c510f8efc1bb 100644 --- a/drivers/gpu/drm/i915/i915_gem_fence_reg.h +++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.h @@ -27,7 +27,10 @@ #include +struct sg_table; + struct drm_i915_private; +struct drm_i915_gem_object; struct i915_ggtt; struct i915_vma; @@ -55,4 +58,17 @@ struct drm_i915_fence_reg { void i915_ggtt_init_fences(struct i915_ggtt *ggtt); +struct drm_i915_fence_reg * +i915_reserve_fence(struct drm_i915_private *i915); +void i915_unreserve_fence(struct drm_i915_fence_reg *fence); + +void i915_gem_revoke_fences(struct drm_i915_private *i915); +void i915_gem_restore_fences(struct drm_i915_private *i915); + +void i915_gem_detect_bit_6_swizzle(struct drm_i915_private *i915); +void i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj, + struct sg_table *pages); +void i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj, + struct sg_table *pages); + #endif diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h index 422d90c686b5..925af79cc6d6 100644 --- a/drivers/gpu/drm/i915/i915_vma.h +++ b/drivers/gpu/drm/i915/i915_vma.h @@ -31,12 +31,12 @@ #include #include "i915_gem_gtt.h" -#include "i915_gem_fence_reg.h" #include "i915_gem_object.h" #include "i915_request.h" enum i915_cache_level; +struct drm_i915_fence_reg; /** * A VMA represents a GEM BO that is bound into an address space. Therefore, a