From cbcdef7b40f0fbac8d8a73c537808742f44a4389 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 12 Jan 2016 12:28:11 -0500 Subject: [PATCH] winsys/radeon: fix warnings about incompatible pointer types MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some confusion between pb_buffer and radeon_bo as well as between radeon_drm_winsys and radeon_winsys. Reviewed-by: Marek Olšák --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 12 ++++++------ 1 file 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; -- 2.30.2