Module: Mesa Branch: master Commit: b539335e50b355854202c4b1b42aa4ddbe9289fa URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b539335e50b355854202c4b1b42aa4ddbe9289fa
Author: Philipp Zabel <[email protected]> Date: Fri Apr 28 13:14:20 2017 +0200 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]> --- src/gallium/auxiliary/renderonly/renderonly.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c index f377c368e5..2fe1009016 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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
