aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-27 04:03:07 +0200
committerMarek Olšák <[email protected]>2011-09-29 01:10:18 +0200
commita3cd2c6c9b3724dbc3aa565dab98968c46bde963 (patch)
tree4edeebe5ffdbddc811fc3064334e031e1360c613 /src/gallium/winsys/radeon/drm/radeon_drm_bo.c
parent798ebc91ebe383a702faf597ffbf2033dc467f50 (diff)
winsys/radeon: remove redundant member radeon_bo::size
It's part of pb_buffer already.
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_drm_bo.c')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index a3cf319a90d..6a8dabf1c24 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -160,7 +160,7 @@ static void radeon_bo_destroy(struct pb_buffer *_buf)
}
if (bo->ptr)
- os_munmap(bo->ptr, bo->size);
+ os_munmap(bo->ptr, bo->base.size);
/* Close object. */
args.handle = bo->handle;
@@ -267,7 +267,7 @@ static void *radeon_bo_map_internal(struct pb_buffer *_buf,
}
args.handle = bo->handle;
args.offset = 0;
- args.size = (uint64_t)bo->size;
+ args.size = (uint64_t)bo->base.size;
if (drmCommandWriteRead(bo->rws->fd,
DRM_RADEON_GEM_MMAP,
&args,
@@ -361,7 +361,6 @@ static struct pb_buffer *radeon_bomgr_create_bo(struct pb_manager *_mgr,
bo->mgr = mgr;
bo->rws = mgr->rws;
bo->handle = args.handle;
- bo->size = size;
pipe_mutex_init(bo->map_mutex);
return &bo->base;
@@ -573,14 +572,13 @@ static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws,
goto fail;
}
bo->handle = open_arg.handle;
- bo->size = open_arg.size;
bo->name = whandle->handle;
/* Initialize it. */
pipe_reference_init(&bo->base.reference, 1);
bo->base.alignment = 0;
bo->base.usage = PB_USAGE_GPU_WRITE | PB_USAGE_GPU_READ;
- bo->base.size = bo->size;
+ bo->base.size = open_arg.size;
bo->base.vtbl = &radeon_bo_vtbl;
bo->mgr = mgr;
bo->rws = mgr->rws;