diff options
author | Marek Olšák <[email protected]> | 2014-04-16 14:02:26 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-17 13:54:19 +0200 |
commit | 9f9ab8ec0dd9739e90de5aa5b8434d105d351f31 (patch) | |
tree | 1d3084bc3d532293aae1151a32d2a82191bc9525 /src/gallium/winsys/radeon/drm | |
parent | 8b966bcaf23b3f6267b4e7ff4f47e7638dff32a9 (diff) |
winsys/radeon: remove some unused code
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 380316ebd69..0ebe196d142 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -105,50 +105,30 @@ static struct radeon_bo *get_radeon_bo(struct pb_buffer *_buf) static void radeon_bo_wait(struct pb_buffer *_buf, enum radeon_bo_usage usage) { struct radeon_bo *bo = get_radeon_bo(_buf); + struct drm_radeon_gem_wait_idle args = {0}; while (p_atomic_read(&bo->num_active_ioctls)) { sched_yield(); } - /* XXX use this when it's ready */ - /*if (bo->rws->info.drm_minor >= 12) { - struct drm_radeon_gem_wait args = {}; - args.handle = bo->handle; - args.flags = usage; - while (drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_WAIT, - &args, sizeof(args)) == -EBUSY); - } else*/ { - struct drm_radeon_gem_wait_idle args; - memset(&args, 0, sizeof(args)); - args.handle = bo->handle; - while (drmCommandWrite(bo->rws->fd, DRM_RADEON_GEM_WAIT_IDLE, - &args, sizeof(args)) == -EBUSY); - } + args.handle = bo->handle; + while (drmCommandWrite(bo->rws->fd, DRM_RADEON_GEM_WAIT_IDLE, + &args, sizeof(args)) == -EBUSY); } static boolean radeon_bo_is_busy(struct pb_buffer *_buf, enum radeon_bo_usage usage) { struct radeon_bo *bo = get_radeon_bo(_buf); + struct drm_radeon_gem_busy args = {0}; if (p_atomic_read(&bo->num_active_ioctls)) { return TRUE; } - /* XXX use this when it's ready */ - /*if (bo->rws->info.drm_minor >= 12) { - struct drm_radeon_gem_wait args = {}; - args.handle = bo->handle; - args.flags = usage | RADEON_GEM_NO_WAIT; - return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_WAIT, - &args, sizeof(args)) != 0; - } else*/ { - struct drm_radeon_gem_busy args; - memset(&args, 0, sizeof(args)); - args.handle = bo->handle; - return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY, - &args, sizeof(args)) != 0; - } + args.handle = bo->handle; + return drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_BUSY, + &args, sizeof(args)) != 0; } static enum radeon_bo_domain get_valid_domain(enum radeon_bo_domain domain) |