summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-06-29 12:44:44 +0100
committerEmil Velikov <[email protected]>2015-07-13 19:56:54 +0100
commit0959d7312d37dd9841cbf7a53cb40b3cfa6e5fc9 (patch)
tree3b45fcf68f4b8fdd8231a6754d4dcc2ad8d878f3 /src/gallium/auxiliary/pipe-loader
parenta27ec5dc460b91dc44675f48cddbbb2631ee824f (diff)
pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argument
No longer used by anyone, as of last commit. Cc: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.h6
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c83
2 files changed, 3 insertions, 86 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index 9f43f17a6e2..95cbc262e57 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -195,13 +195,9 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev);
* 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.
*/
bool
-pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd,
- boolean auth_x);
+pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd);
#endif
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 1ff5f3e8df8..05f7c57c904 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -35,12 +35,6 @@
#include <xf86drm.h>
#include <unistd.h>
-#ifdef HAVE_PIPE_LOADER_XCB
-
-#include <xcb/dri2.h>
-
-#endif
-
#include "loader.h"
#include "state_tracker/drm_driver.h"
#include "pipe_loader_priv.h"
@@ -64,78 +58,8 @@ struct pipe_loader_drm_device {
static struct pipe_loader_ops pipe_loader_drm_ops;
-#ifdef HAVE_PIPE_LOADER_XCB
-
-static xcb_screen_t *
-get_xcb_screen(xcb_screen_iterator_t iter, int screen)
-{
- for (; iter.rem; --screen, xcb_screen_next(&iter))
- if (screen == 0)
- return iter.data;
-
- return NULL;
-}
-
-#endif
-
-static void
-pipe_loader_drm_x_auth(int fd)
-{
-#ifdef HAVE_PIPE_LOADER_XCB
- /* Try authenticate with the X server to give us access to devices that X
- * is running on. */
- xcb_connection_t *xcb_conn;
- const xcb_setup_t *xcb_setup;
- xcb_screen_iterator_t s;
- xcb_dri2_connect_cookie_t connect_cookie;
- xcb_dri2_connect_reply_t *connect;
- drm_magic_t magic;
- xcb_dri2_authenticate_cookie_t authenticate_cookie;
- xcb_dri2_authenticate_reply_t *authenticate;
- int screen;
-
- xcb_conn = xcb_connect(NULL, &screen);
-
- if(!xcb_conn)
- return;
-
- xcb_setup = xcb_get_setup(xcb_conn);
-
- if (!xcb_setup)
- goto disconnect;
-
- s = xcb_setup_roots_iterator(xcb_setup);
- connect_cookie = xcb_dri2_connect_unchecked(xcb_conn,
- get_xcb_screen(s, screen)->root,
- XCB_DRI2_DRIVER_TYPE_DRI);
- connect = xcb_dri2_connect_reply(xcb_conn, connect_cookie, NULL);
-
- if (!connect || connect->driver_name_length
- + connect->device_name_length == 0) {
-
- goto disconnect;
- }
-
- if (drmGetMagic(fd, &magic))
- goto disconnect;
-
- authenticate_cookie = xcb_dri2_authenticate_unchecked(xcb_conn,
- s.data->root,
- magic);
- authenticate = xcb_dri2_authenticate_reply(xcb_conn,
- authenticate_cookie,
- NULL);
- FREE(authenticate);
-
-disconnect:
- xcb_disconnect(xcb_conn);
-
-#endif
-}
-
bool
-pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd,
- boolean auth_x)
+pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd)
{
struct pipe_loader_drm_device *ddev = CALLOC_STRUCT(pipe_loader_drm_device);
int vendor_id, chip_id;
@@ -153,9 +77,6 @@ pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd,
ddev->base.ops = &pipe_loader_drm_ops;
ddev->fd = 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)
goto fail;
@@ -190,7 +111,7 @@ pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev)
if (fd < 0)
continue;
- if (!pipe_loader_drm_probe_fd(&dev, fd, false)) {
+ if (!pipe_loader_drm_probe_fd(&dev, fd)) {
close(fd);
continue;
}