Also remove some unused fence-related leftovers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
{
struct r600_bo *bo = calloc(1, sizeof(struct r600_bo));
struct radeon_bo *rbo;
- unsigned tiling_flags;
rbo = bo->bo = radeon_bo(radeon, whandle->handle, 0, 0, 0, 0);
if (rbo == NULL) {
if (stride)
*stride = whandle->stride;
- radeon_bo_get_tiling_flags(radeon, rbo, &tiling_flags);
if (array_mode) {
- if (tiling_flags) {
- if (tiling_flags & RADEON_TILING_MACRO)
- *array_mode = V_0280A0_ARRAY_2D_TILED_THIN1;
- else if (tiling_flags & RADEON_TILING_MICRO)
- *array_mode = V_0280A0_ARRAY_1D_TILED_THIN1;
- } else {
+ enum radeon_bo_layout micro, macro;
+
+ radeon->ws->buffer_get_tiling(rbo->buf, µ, ¯o);
+
+ if (macro == RADEON_LAYOUT_TILED)
+ *array_mode = V_0280A0_ARRAY_2D_TILED_THIN1;
+ else if (micro == RADEON_LAYOUT_TILED)
+ *array_mode = V_0280A0_ARRAY_1D_TILED_THIN1;
+ else
*array_mode = 0;
- }
}
return bo;
}
struct radeon_bo *src);
int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo);
int radeon_bo_busy(struct radeon *radeon, struct radeon_bo *bo, uint32_t *domain);
-int radeon_bo_fencelist(struct radeon *radeon, struct radeon_bo **bolist, uint32_t num_bo);
-int radeon_bo_get_tiling_flags(struct radeon *radeon,
- struct radeon_bo *bo,
- uint32_t *tiling_flags);
int radeon_bo_fixed_map(struct radeon *radeon, struct radeon_bo *bo);
/*
* r600_hw_context.c
*/
-int r600_context_init_fence(struct r600_context *ctx);
void r600_context_bo_flush(struct r600_context *ctx, unsigned flush_flags,
unsigned flush_mask, struct r600_bo *rbo);
struct r600_bo *r600_context_reg_bo(struct r600_context *ctx, unsigned offset);
assert(bo->map_count >= 0);
}
-/*
- * fence
- */
-static inline boolean fence_is_after(unsigned fence, unsigned ofence)
-{
- /* handle wrap around */
- if (fence < 0x80000000 && ofence > 0x80000000)
- return TRUE;
- if (fence > ofence)
- return TRUE;
- return FALSE;
-}
-
#endif
*domain = args.domain;
return ret;
}
-
-int radeon_bo_get_tiling_flags(struct radeon *radeon,
- struct radeon_bo *bo,
- uint32_t *tiling_flags)
-{
- struct drm_radeon_gem_get_tiling args = {};
- int ret;
-
- args.handle = bo->handle;
- ret = drmCommandWriteRead(radeon->info.fd, DRM_RADEON_GEM_GET_TILING,
- &args, sizeof(args));
- if (ret)
- return ret;
-
- *tiling_flags = args.tiling_flags;
- return ret;
-}