Mesa (master): i965: Make brw_bo_unmap a static inline.

Kenneth Graunke kwg at kemper.freedesktop.org
Fri Jun 30 22:55:23 UTC 2017


Module: Mesa
Branch: master
Commit: bca92849b92db3623cde91392be4efafeaa8d914
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bca92849b92db3623cde91392be4efafeaa8d914

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Jun 30 14:05:21 2017 -0700

i965: Make brw_bo_unmap a static inline.

With the broken debugging code gone, it doesn't do anything anymore.
We could technically eliminate it, but I'd like to keep it around in
case we want to add something there again someday.  Otherwise we'd
have to go all over the codebase adding unmap calls back again.

Based on a patch by Chris Wilson.

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_bufmgr.c | 6 ------
 src/mesa/drivers/dri/i965/brw_bufmgr.h | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 9e67efa4d3..7f3aa420ed 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -763,12 +763,6 @@ brw_bo_map(struct brw_context *brw, struct brw_bo *bo, unsigned flags)
 }
 
 int
-brw_bo_unmap(struct brw_bo *bo)
-{
-   return 0;
-}
-
-int
 brw_bo_subdata(struct brw_bo *bo, uint64_t offset,
                uint64_t size, const void *data)
 {
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index 6482abd09a..a817958d7b 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -212,7 +212,7 @@ MUST_CHECK void *brw_bo_map(struct brw_context *brw, struct brw_bo *bo, unsigned
  * Reduces the refcount on the userspace mapping of the buffer
  * object.
  */
-int brw_bo_unmap(struct brw_bo *bo);
+static int brw_bo_unmap(struct brw_bo *bo) { return 0; }
 
 /** Write data into an object. */
 int brw_bo_subdata(struct brw_bo *bo, uint64_t offset,




More information about the mesa-commit mailing list