[Mesa-dev] [PATCH 2/3] i965: Use drmIoctl for DRM_I915_GETPARAM

Chad Versace chad.versace at intel.com
Tue Jun 28 17:07:10 UTC 2016


Stop using drmCommandWriteRead for such a simple ioctl.
---
 src/mesa/drivers/dri/i965/intel_screen.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index b693c45..f7f806e 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -979,8 +979,7 @@ intel_get_param(struct intel_screen *screen, int param, int *value)
    gp.param = param;
    gp.value = value;
 
-   ret = drmCommandWriteRead(screen->driScrnPriv->fd,
-                             DRM_I915_GETPARAM, &gp, sizeof(gp));
+   ret = drmIoctl(screen->driScrnPriv->fd, DRM_IOCTL_I915_GETPARAM, &gp);
    if (ret < 0 && ret != -EINVAL)
 	 _mesa_warning(NULL, "drm_i915_getparam: %d", ret);
 
-- 
2.9.0.rc2



More information about the mesa-dev mailing list