summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-01-12 12:28:11 -0500
committerNicolai Hähnle <[email protected]>2016-01-14 09:33:58 -0500
commitcbcdef7b40f0fbac8d8a73c537808742f44a4389 (patch)
tree37b681f24f943c02c4465c2bc3080840577c249d /src/gallium/winsys/radeon/drm
parent06b526de0565d5485a2111e3901bd5824ead4314 (diff)
winsys/radeon: fix warnings about incompatible pointer types
Some confusion between pb_buffer and radeon_bo as well as between radeon_drm_winsys and radeon_winsys. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index ee61e54803f..e35d2804390 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -582,7 +582,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws,
pipe_mutex_unlock(rws->bo_handles_mutex);
pb_reference(&b, &old_bo->base);
- return b;
+ return radeon_bo(b);
}
util_hash_table_set(rws->bo_vas, (void*)(uintptr_t)bo->va, bo);
@@ -594,7 +594,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws,
else if (initial_domains & RADEON_DOMAIN_GTT)
rws->allocated_gtt += align(size, rws->size_align);
- return &bo->base;
+ return bo;
}
bool radeon_bo_can_reclaim(struct pb_buffer *_buf)
@@ -768,9 +768,9 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
usage |= 1 << (flags + 3);
if (use_reusable_pool) {
- bo = pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage);
+ bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage));
if (bo)
- return bo;
+ return &bo->base;
}
bo = radeon_create_bo(ws, size, alignment, usage, domain, flags);
@@ -837,7 +837,7 @@ static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws,
if (ws->info.r600_virtual_address) {
struct drm_radeon_gem_va va;
- bo->va = radeon_bomgr_find_va(rws, bo->base.size, 1 << 20);
+ bo->va = radeon_bomgr_find_va(ws, bo->base.size, 1 << 20);
va.handle = bo->handle;
va.operation = RADEON_VA_MAP;
@@ -969,7 +969,7 @@ done:
if (ws->info.r600_virtual_address && !bo->va) {
struct drm_radeon_gem_va va;
- bo->va = radeon_bomgr_find_va(rws, bo->base.size, 1 << 20);
+ bo->va = radeon_bomgr_find_va(ws, bo->base.size, 1 << 20);
va.handle = bo->handle;
va.operation = RADEON_VA_MAP;