diff options
author | Philipp Zabel <[email protected]> | 2017-04-28 13:14:20 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2017-05-02 22:22:53 +0200 |
commit | b539335e50b355854202c4b1b42aa4ddbe9289fa (patch) | |
tree | 1b13d7f3dbe37486e87c1eeab1fe52b57eb46d78 /src/gallium/auxiliary/renderonly | |
parent | cd8ee259c8e9b1c16b5c3214595b91eb31e7de19 (diff) |
renderonly: use drmIoctl
To restart interrupted system calls, use drmIoctl.
Fixes: 848b49b288f ("gallium: add renderonly library")
CC: <[email protected]>
Suggested-by: Emil Velikov <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/renderonly')
-rw-r--r-- | src/gallium/auxiliary/renderonly/renderonly.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c index f377c368e57..2fe10090163 100644 --- a/src/gallium/auxiliary/renderonly/renderonly.c +++ b/src/gallium/auxiliary/renderonly/renderonly.c @@ -29,7 +29,6 @@ #include <errno.h> #include <fcntl.h> #include <stdio.h> -#include <sys/ioctl.h> #include <xf86drm.h> #include "state_tracker/drm_driver.h" @@ -74,7 +73,7 @@ renderonly_scanout_destroy(struct renderonly_scanout *scanout, pipe_resource_reference(&scanout->prime, NULL); if (ro->kms_fd != -1) { destroy_dumb.handle = scanout->handle; - ioctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); + drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); } FREE(scanout); } @@ -99,7 +98,7 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc, return NULL; /* create dumb buffer at scanout GPU */ - err = ioctl(ro->kms_fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_dumb); + err = drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_dumb); if (err < 0) { fprintf(stderr, "DRM_IOCTL_MODE_CREATE_DUMB failed: %s\n", strerror(errno)); @@ -136,7 +135,7 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc, free_dumb: destroy_dumb.handle = scanout->handle; - ioctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); + drmIoctl(ro->kms_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_dumb); free_scanout: FREE(scanout); |