summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-01-11 05:19:36 +0000
committerEmil Velikov <[email protected]>2014-01-18 18:52:07 +0000
commit26458420d8802a765cf71c75ef9f3b6da6bdfd8d (patch)
treee22f08f0753f0740592849a8b15ee3da80f5446d /src/gallium/auxiliary/pipe-loader
parent3d3ae75c86f9ed47d86e471e4043827bb7731e92 (diff)
pipe-loader: add support for non-pci (platform) devices
Culled out of the "loader: refactor duplicated code into loader util lib" patch by Rob Clark. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/pipe-loader')
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.h1
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
index 34e257e3441..e0525dfbe02 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h
@@ -44,6 +44,7 @@ struct pipe_screen;
enum pipe_loader_device_type {
PIPE_LOADER_DEVICE_SOFTWARE,
PIPE_LOADER_DEVICE_PCI,
+ PIPE_LOADER_DEVICE_PLATFORM,
NUM_PIPE_LOADER_DEVICE_TYPES
};
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
index 2a50236e27c..d70a428b910 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
@@ -121,6 +121,8 @@ pipe_loader_drm_probe_fd(struct pipe_loader_device **dev, int fd)
ddev->base.type = PIPE_LOADER_DEVICE_PCI;
ddev->base.u.pci.vendor_id = vendor_id;
ddev->base.u.pci.chip_id = chip_id;
+ } else {
+ ddev->base.type = PIPE_LOADER_DEVICE_PLATFORM;
}
ddev->base.ops = &pipe_loader_drm_ops;
ddev->fd = fd;