pipe_loader: Try to connect with the X server before probing pciids v2
authorTom Stellard <thomas.stellard@amd.com>
Tue, 17 Jul 2012 18:36:06 +0000 (18:36 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 23 Jul 2012 13:25:36 +0000 (13:25 +0000)
commit044de40cb0c6af54d99252f55145972780362afa
tree438ff6b872cdc0c8316ebc9c60efe59c4dca3742
parent17f6c9195f76566aa84152b05891b4cfef3fc7a8
pipe_loader: Try to connect with the X server before probing pciids v2

When X is running it is neccesary for pipe_loader to authenticate with
DRM, in order to be able to use the device.

This makes it possible to run OpenCL programs while X is running.

v2:
  - Fix C++ style comments
  - Drop Xlib-xcb dependency
  - Close the X connection when done
  - Split auth code into separate function

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
configure.ac
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c