[Mesa-dev] [PATCH 4/4] winsys/radeon: remove some unused code
Marek Olšák
maraeo at gmail.com
Wed Apr 16 06:30:53 PDT 2014
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 36 ++++++---------------------
1 file 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 380316e..0ebe196 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)
--
1.8.3.2
More information about the mesa-dev
mailing list