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 <kettenis@openbsd.org>
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
main
Mark Kettenis 2013-06-05 13:04:30 +10:00 committed by Michel Dänzer
parent 1669a67d06
commit a0178c00c7
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ static int bo_wait(struct radeon_bo_int *boi)
memset(&args, 0, sizeof(args)); memset(&args, 0, sizeof(args));
args.handle = boi->handle; args.handle = boi->handle;
do { do {
ret = drmCommandWriteRead(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE, ret = drmCommandWrite(boi->bom->fd, DRM_RADEON_GEM_WAIT_IDLE,
&args, sizeof(args)); &args, sizeof(args));
} while (ret == -EBUSY); } while (ret == -EBUSY);
return ret; return ret;