Less bacon.
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
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);
/** @{ */
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;
}
}
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;
* 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;
/* 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);