[Mesa-dev] [PATCH 45/70] i965: Make intel_mipmap_tree_map_raw() static

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 7 13:13:49 PDT 2015


No external users, so no need to export the symbol outside of our
compilation unit.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Martin Peres <martin.peres at linux.intel.com>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 56 +++++++++++++--------------
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h |  6 ---
 2 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index fce6e37..6f3bcaa 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -1344,6 +1344,34 @@ intel_miptree_copy_teximage(struct brw_context *brw,
    intel_obj->needs_validate = true;
 }
 
+static void *
+intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
+{
+   /* CPU accesses to color buffers don't understand fast color clears, so
+    * resolve any pending fast color clears before we map.
+    */
+   intel_miptree_resolve_color(brw, mt);
+
+   brw_bo *bo = mt->bo;
+
+   if (drm_intel_bo_references(brw->batch.bo, bo))
+      brw_batch_flush(&brw->batch, PERF_DEBUG(brw, "miptree"));
+
+   if (mt->tiling != I915_TILING_NONE)
+      brw_bo_map_gtt(brw, bo, "miptree");
+   else
+      brw_bo_map(brw, bo, true, "miptree");
+
+   return bo->virtual;
+}
+
+static void
+intel_miptree_unmap_raw(struct brw_context *brw,
+                        struct intel_mipmap_tree *mt)
+{
+   drm_intel_bo_unmap(mt->bo);
+}
+
 static bool
 intel_miptree_alloc_mcs(struct brw_context *brw,
                         struct intel_mipmap_tree *mt,
@@ -2056,34 +2084,6 @@ intel_miptree_updownsample(struct brw_context *brw,
    }
 }
 
-void *
-intel_miptree_map_raw(struct brw_context *brw, struct intel_mipmap_tree *mt)
-{
-   /* CPU accesses to color buffers don't understand fast color clears, so
-    * resolve any pending fast color clears before we map.
-    */
-   intel_miptree_resolve_color(brw, mt);
-
-   brw_bo *bo = mt->bo;
-
-   if (drm_intel_bo_references(brw->batch.bo, bo))
-      brw_batch_flush(&brw->batch, PERF_DEBUG(brw, "miptree"));
-
-   if (mt->tiling != I915_TILING_NONE)
-      brw_bo_map_gtt(brw, bo, "miptree");
-   else
-      brw_bo_map(brw, bo, true, "miptree");
-
-   return bo->virtual;
-}
-
-void
-intel_miptree_unmap_raw(struct brw_context *brw,
-                        struct intel_mipmap_tree *mt)
-{
-   drm_intel_bo_unmap(mt->bo);
-}
-
 static void
 intel_miptree_map_gtt(struct brw_context *brw,
 		      struct intel_mipmap_tree *mt,
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 641ccbb..1b7cf64 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -773,12 +773,6 @@ brw_miptree_layout(struct brw_context *brw,
                    struct intel_mipmap_tree *mt,
                    uint32_t layout_flags);
 
-void *intel_miptree_map_raw(struct brw_context *brw,
-                            struct intel_mipmap_tree *mt);
-
-void intel_miptree_unmap_raw(struct brw_context *brw,
-                             struct intel_mipmap_tree *mt);
-
 void
 intel_miptree_map(struct brw_context *brw,
 		  struct intel_mipmap_tree *mt,
-- 
2.5.0



More information about the mesa-dev mailing list