Skip to contentSkip to conversation

radeon: correct RADEON_GEM_WAIT_IDLE use

PATCH New Jonathan Gray 1 participant 1 message Jun 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Problem noticed by and patch from Mark Kettenis.

---
 radeon/radeon_bo_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
radeon_bo_gem.c +2 -2
index fca0aaf..4ea405f 100644
@@ -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;
 }
Signature · 1 line
1.8.2.3