From a0178c00c70f4b47e09ed7564fc2ccde611231a0 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 5 Jun 2013 13:04:30 +1000 Subject: [PATCH] radeon: correct RADEON_GEM_WAIT_IDLE use RADEON_GEM_WAIT_IDLE is declared DRM_IOW but libdrm uses it with drmCommandWriteRead instead of drmCommandWrite which leads to the ioctl being unmatched and returning an error on at least OpenBSD. Signed-off-by: Mark Kettenis Signed-off-by: Jonathan Gray --- radeon/radeon_bo_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c index fca0aaf0..4ea405ff 100644 --- a/radeon/radeon_bo_gem.c +++ b/radeon/radeon_bo_gem.c @@ -211,8 +211,8 @@ static int bo_wait(struct radeon_bo_int *boi) memset(&args, 0, sizeof(args)); args.handle = boi->handle; do { - ret = drmCommandWriteRead(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, - &args, sizeof(args)); + ret = drmCommandWrite(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, + &args, sizeof(args)); } while (ret == -EBUSY); return ret; }