diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2013-06-09 13:57:20 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2013-06-09 13:57:20 +0000 |
commit | 4718d0fc5b82219d601ea3d9d6a9090df87ca5eb (patch) | |
tree | daf279052fe7f8da8625415d5e186834d4a8191c | |
parent | bc87a6e021940c1af0b0806966e0161f1f9ec8ef (diff) |
correct RADEON_GEM_WAIT_IDLE use.
RADEON_GEM_WAIT_IDLE is declared DRM_IOW but mesa
uses it with drmCommandWriteRead instead of drmCommandWrite
which leads to the ioctl being unmatched and returning an
error on at least OpenBSD.
Problem originally found and fixed in libdrm by kettenis@
Dave Airlie pointed out that mesa has the same issue.
This change has already been merged in upstream mesa.
ok matthieu@ kettenis@
-rw-r--r-- | dist/Mesa/src/gallium/winsys/r600/drm/radeon_bo.c | 2 | ||||
-rw-r--r-- | dist/Mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dist/Mesa/src/gallium/winsys/r600/drm/radeon_bo.c b/dist/Mesa/src/gallium/winsys/r600/drm/radeon_bo.c index 45cf6f096..b63ab5286 100644 --- a/dist/Mesa/src/gallium/winsys/r600/drm/radeon_bo.c +++ b/dist/Mesa/src/gallium/winsys/r600/drm/radeon_bo.c @@ -188,7 +188,7 @@ int radeon_bo_wait(struct radeon *radeon, struct radeon_bo *bo) memset(&args, 0, sizeof(args)); args.handle = bo->handle; do { - ret = drmCommandWriteRead(radeon->fd, DRM_RADEON_GEM_WAIT_IDLE, + ret = drmCommandWrite(radeon->fd, DRM_RADEON_GEM_WAIT_IDLE, &args, sizeof(args)); } while (ret == -EBUSY); return ret; diff --git a/dist/Mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/dist/Mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index b6f12727e..7ccef0e14 100644 --- a/dist/Mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/dist/Mesa/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -97,7 +97,7 @@ static void radeon_bo_wait(struct pb_buffer *_buf) } args.handle = bo->handle; - while (drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_WAIT_IDLE, + while (drmCommandWrite(bo->rws->fd, DRM_RADEON_GEM_WAIT_IDLE, &args, sizeof(args)) == -EBUSY); bo->busy_for_write = FALSE; |