From b84314a86ea4ad30e0f57a71b4ef0fa138fb24c6 Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Mon, 7 Dec 2009 18:30:52 +0100 Subject: radeon: Use drmIoctl so we restart ioctl on EINTR or EAGAIN This is needed as change in kernel will lead to ioctl returning EINTR if they are interrupted. Signed-off-by: Jerome Glisse --- radeon/radeon_bo_gem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c index d34f24cd..6ededcd4 100644 --- a/radeon/radeon_bo_gem.c +++ b/radeon/radeon_bo_gem.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "xf86drm.h" #include "drm.h" @@ -86,7 +85,7 @@ static struct radeon_bo *bo_open(struct radeon_bo_manager *bom, memset(&open_arg, 0, sizeof(open_arg)); open_arg.name = handle; - r = ioctl(bom->fd, DRM_IOCTL_GEM_OPEN, &open_arg); + r = drmIoctl(bom->fd, DRM_IOCTL_GEM_OPEN, &open_arg); if (r != 0) { free(bo); return NULL; @@ -142,7 +141,7 @@ static struct radeon_bo *bo_unref(struct radeon_bo *bo) /* close object */ args.handle = bo->handle; - ioctl(bo->bom->fd, DRM_IOCTL_GEM_CLOSE, &args); + drmIoctl(bo->bom->fd, DRM_IOCTL_GEM_CLOSE, &args); memset(bo_gem, 0, sizeof(struct radeon_bo_gem)); free(bo_gem); return NULL; @@ -318,7 +317,7 @@ int radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) int r; flink.handle = bo->handle; - r = ioctl(bo->bom->fd, DRM_IOCTL_GEM_FLINK, &flink); + r = drmIoctl(bo->bom->fd, DRM_IOCTL_GEM_FLINK, &flink); if (r) { return r; } -- cgit v1.2.3