[Mesa-dev] [PATCH] renderonly: use drmIoctl

Stéphane Marchesin marcheu at chromium.org
Tue May 2 19:49:34 UTC 2017


On Fri, Apr 28, 2017 at 6:06 AM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:

> On 28 April 2017 at 13:55, Eric Engestrom <eric.engestrom at imgtec.com>
> wrote:
> > On Friday, 2017-04-28 13:14:20 +0200, Philipp Zabel wrote:
> >> To restart interrupted system calls, use drmIoctl.
> >>
> >> Suggested-by: Emil Velikov <emil.l.velikov at gmail.com>
> >> Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
> >
> > Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> >
> > A quick grep shows 8 other `ioctl()`; do we want to fix them as well?
> >
> > src/gallium/auxiliary/hud/hud_nic.c:128:   if (ioctl(sockfd,
> SIOCGIWRATE, &req) == -1) {
> > src/gallium/auxiliary/hud/hud_nic.c:163:   if (ioctl(sockfd,
> SIOCGIWSTATS, &req) == -1) {
> Not DRM specific, so no.
>
> > src/gallium/winsys/i915/drm/i915_drm_winsys.c:27:   ret = ioctl(fd,
> DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp));
> > src/gallium/winsys/radeon/drm/radeon_drm_bo.c:1305:            if
> (ioctl(ws->fd, DRM_IOCTL_GEM_FLINK, &flink)) {
>
>
> > src/intel/vulkan/anv_gem.c:207:      ret = ioctl(device->fd,
> DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
> > src/intel/vulkan/anv_gem.c:257:      ret = ioctl(fd,
> DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
> > src/intel/vulkan/anv_gem.c:39:      ret = ioctl(fd, request, arg);
> > src/mesa/drivers/dri/i965/brw_bufmgr.c:994:      ret =
> ioctl(bufmgr->fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling);
> >
> These four are fine as-is. No idea about the i915g/radeon winsys ones.
>

The one in i915/winsys (it's a getparam) should probably be fixed, but it's
unlikely that you would get interrupted while getting a chip id. I can do
that separately. Thanks for the heads up!

Stéphane


> -Emil
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170502/9649fe66/attachment-0001.html>


More information about the mesa-dev mailing list