diff options
author | Chia-I Wu <[email protected]> | 2011-08-26 11:30:47 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-08-27 17:28:31 +0800 |
commit | 822fad64f8131bacc4ea0b79583d49094543bddc (patch) | |
tree | 63ce6eaad380e2558c26011008a9f4814e40be19 /src | |
parent | d074acb4fa34712c49dd5b122bb074108cf5926b (diff) |
targets/egl-static: fix nouveau and vmwgfx for Android
drmVersion and driver specific ioctls are used to get the PCI ID from a
DRM fd. Eexpand the mechanism to nouveau and vmwgfx, except that for
nouveau, only the vendor ID is needed, and for vmwgfx, always assume
SVGA II.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/targets/egl-static/egl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/egl.c b/src/gallium/targets/egl-static/egl.c index a7aee27238b..5a66e3c34c3 100644 --- a/src/gallium/targets/egl-static/egl.c +++ b/src/gallium/targets/egl-static/egl.c @@ -167,6 +167,16 @@ drm_fd_get_pci_id(int fd, int *vendor_id, int *chip_id) *chip_id = -1; } } + else if (util_strcmp(version->name, "nouveau") == 0) { + *vendor_id = 0x10de; + /* not used */ + *chip_id = 0; + } + else if (util_strcmp(version->name, "vmwgfx") == 0) { + *vendor_id = 0x15ad; + /* assume SVGA II */ + *chip_id = 0x0405; + } drmFreeVersion(version); |