* This function is platform-specific.
*
* \sa pipe_loader_probe
+ *
+ * \param auth_x If true, the pipe-loader will attempt to
+ * authenticate with the X server.
*/
boolean
-pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd);
+pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd,
+ boolean auth_x);
#endif
}
boolean
-pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd)
+pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd,
+ boolean auth_x)
{
struct pipe_loader_drm_device *ddev = CALLOC_STRUCT(pipe_loader_drm_device);
int vendor_id, chip_id;
ddev->base.ops = &pipe_loader_drm_ops;
ddev->fd = fd;
- pipe_loader_drm_x_auth(fd);
+ if (auth_x)
+ pipe_loader_drm_x_auth(fd);
ddev->base.driver_name = loader_get_driver_for_fd(fd, _LOADER_GALLIUM);
if (!ddev->base.driver_name)
if (fd < 0)
continue;
- if (j >= ndev || !pipe_loader_drm_probe_fd(&devs[j], fd))
+ if (j >= ndev || !pipe_loader_drm_probe_fd(&devs[j], fd, true))
close(fd);
j++;
#ifdef HAVE_PIPE_LOADER_DRM
int ret;
- ret = pipe_loader_drm_probe_fd(&dev, gdrm->base.base.fd);
+ ret = pipe_loader_drm_probe_fd(&dev, gdrm->base.base.fd, true);
if (!ret)
return -1;
#endif /* HAVE_PIPE_LOADER_DRM */