diff options
author | Jakob Bornecrantz <[email protected]> | 2010-01-19 17:14:19 +0000 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-01-19 17:12:12 +0100 |
commit | 65354a7e3d8fd094837b7a999e8975dcfbd9d9c9 (patch) | |
tree | 16e3340bfe8f53cbce88826fae5589ba3049bf4b /src/gallium | |
parent | a5fb5d6a54195d19942482873d0738eaade9e986 (diff) |
st/xorg: Pass kernel driver name to drmOpen
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_driver.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index b02fe68f313..ed185d314f7 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -206,10 +206,19 @@ drv_init_drm(ScrnInfoPtr pScrn) ms->PciInfo->dev, ms->PciInfo->func ); - ms->fd = drmOpen(NULL, BusID); - if (ms->fd < 0) - return FALSE; + ms->api = drm_api_create(); + ms->fd = drmOpen(ms->api ? ms->api->driver_name : NULL, BusID); + + if (ms->fd >= 0) + return TRUE; + + if (ms->api->destroy) + ms->api->destroy(ms->api); + + ms->api = NULL; + + return FALSE; } return TRUE; @@ -229,7 +238,6 @@ drv_init_resource_management(ScrnInfoPtr pScrn) if (ms->screen || ms->kms) return TRUE; - ms->api = drm_api_create(); if (ms->api) { ms->screen = ms->api->create_screen(ms->api, ms->fd, NULL); |