[Mesa-dev] [PATCH 49/53] i965/drm: Rename drm_bacon_reg_read() to brw_reg_read().

Kenneth Graunke kenneth at whitecape.org
Wed Apr 5 00:10:39 UTC 2017


Less bacon.
---
 src/mesa/drivers/dri/i965/brw_bufmgr.h       | 4 +---
 src/mesa/drivers/dri/i965/brw_queryobj.c     | 6 +++---
 src/mesa/drivers/dri/i965/intel_bufmgr_gem.c | 4 +---
 src/mesa/drivers/dri/i965/intel_screen.c     | 6 +++---
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index 5205302c001..7609425a35d 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -309,9 +309,7 @@ int drm_bacon_bo_gem_export_to_prime(drm_bacon_bo *bo, int *prime_fd);
 drm_bacon_bo *drm_bacon_bo_gem_create_from_prime(struct brw_bufmgr *bufmgr,
 						int prime_fd, int size);
 
-int drm_bacon_reg_read(struct brw_bufmgr *bufmgr,
-		       uint32_t offset,
-		       uint64_t *result);
+int brw_reg_read(struct brw_bufmgr *bufmgr, uint32_t offset, uint64_t *result);
 
 /** @{ */
 
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 8e742af67df..ff6c0c87c9d 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -539,14 +539,14 @@ brw_get_timestamp(struct gl_context *ctx)
 
    switch (brw->screen->hw_has_timestamp) {
    case 3: /* New kernel, always full 36bit accuracy */
-      drm_bacon_reg_read(brw->bufmgr, TIMESTAMP | 1, &result);
+      brw_reg_read(brw->bufmgr, TIMESTAMP | 1, &result);
       break;
    case 2: /* 64bit kernel, result is left-shifted by 32bits, losing 4bits */
-      drm_bacon_reg_read(brw->bufmgr, TIMESTAMP, &result);
+      brw_reg_read(brw->bufmgr, TIMESTAMP, &result);
       result = result >> 32;
       break;
    case 1: /* 32bit kernel, result is 36bit wide but may be inaccurate! */
-      drm_bacon_reg_read(brw->bufmgr, TIMESTAMP, &result);
+      brw_reg_read(brw->bufmgr, TIMESTAMP, &result);
       break;
    }
 
diff --git a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
index dfce89ba1b4..490898f9d28 100644
--- a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
+++ b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c
@@ -1444,9 +1444,7 @@ brw_destroy_hw_context(struct brw_bufmgr *bufmgr, uint32_t ctx_id)
 }
 
 int
-drm_bacon_reg_read(struct brw_bufmgr *bufmgr,
-		   uint32_t offset,
-		   uint64_t *result)
+brw_reg_read(struct brw_bufmgr *bufmgr, uint32_t offset, uint64_t *result)
 {
 	struct drm_i915_reg_read reg_read;
 	int ret;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 40860d14346..fc465c3beda 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1323,13 +1323,13 @@ intel_detect_timestamp(struct intel_screen *screen)
     * More recent kernels offer an interface to read the full 36bits
     * everywhere.
     */
-   if (drm_bacon_reg_read(screen->bufmgr, TIMESTAMP | 1, &dummy) == 0)
+   if (brw_reg_read(screen->bufmgr, TIMESTAMP | 1, &dummy) == 0)
       return 3;
 
    /* Determine if we have a 32bit or 64bit kernel by inspecting the
     * upper 32bits for a rapidly changing timestamp.
     */
-   if (drm_bacon_reg_read(screen->bufmgr, TIMESTAMP, &last))
+   if (brw_reg_read(screen->bufmgr, TIMESTAMP, &last))
       return 0;
 
    upper = lower = 0;
@@ -1337,7 +1337,7 @@ intel_detect_timestamp(struct intel_screen *screen)
       /* The TIMESTAMP should change every 80ns, so several round trips
        * through the kernel should be enough to advance it.
        */
-      if (drm_bacon_reg_read(screen->bufmgr, TIMESTAMP, &dummy))
+      if (brw_reg_read(screen->bufmgr, TIMESTAMP, &dummy))
          return 0;
 
       upper += (dummy >> 32) != (last >> 32);
-- 
2.12.1



More information about the mesa-dev mailing list