summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-01-27 10:34:16 -0500
committerTom Stellard <thomas.stellard@amd.com>2014-02-13 19:53:15 -0500
commit8481d208cee0e10250d5f34487defec414470bb5 (patch)
treeb737362d4e1b320f387102d18b6b2b8759653cc9 /src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
parent0320ba9988f370957bb029e846f51d485dd606f4 (diff)
downloadexternal_mesa3d-8481d208cee0e10250d5f34487defec414470bb5.zip
external_mesa3d-8481d208cee0e10250d5f34487defec414470bb5.tar.gz
external_mesa3d-8481d208cee0e10250d5f34487defec414470bb5.tar.bz2
pipe-loader: Add auth_x parameter to pipe_loader_drm_probe_fd()
The caller can use this boolean parameter to tell the pipe-loader to authenticate with the X server when probing a file descriptor.
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 597a9b5..7abdec3 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -112,7 +112,8 @@ disconnect:
}
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;
@@ -127,7 +128,8 @@ pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd)
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)
@@ -159,7 +161,7 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
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++;