summaryrefslogtreecommitdiff
path: root/radeon/radeon_bo_gem.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-12-07 18:30:52 +0100
committerJerome Glisse <jglisse@redhat.com>2009-12-07 18:30:52 +0100
commitb84314a86ea4ad30e0f57a71b4ef0fa138fb24c6 (patch)
treef39249cc5fff937edcacbc680b4c419e1bd315b5 /radeon/radeon_bo_gem.c
parent9707733a130098a7d9959e72ebd782d8119a23d3 (diff)
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 <jglisse@redhat.com>
Diffstat (limited to 'radeon/radeon_bo_gem.c')
-rw-r--r--radeon/radeon_bo_gem.c7
1 files 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 <stdlib.h>
#include <string.h>
#include <sys/mman.h>
-#include <sys/ioctl.h>
#include <errno.h>
#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;
}