diff options
author | Lucas Stach <dev@lynxeye.de> | 2012-12-19 16:54:19 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-09 16:37:10 +0100 |
commit | 0d578f742bedceec715297d38538a8d32a55543a (patch) | |
tree | 8e992ebabe54a429508d2f66fecb92991670cdec | |
parent | c62b0c23456ea41607c805f7a9152da420880862 (diff) |
make TegraPlatformProbe actually work
This is mostly the same thing as omapdrm does. Makes tegra work on
xservers with "Revert "xf86: Fix non-PCI configuration-less setups""
applied.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
-rw-r--r-- | src/driver.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/driver.c b/src/driver.c index 91049a0..4504349 100644 --- a/src/driver.c +++ b/src/driver.c @@ -771,15 +771,13 @@ static Bool TegraPlatformProbe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *dev, intptr_t match_data) { - char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH); + char *busid = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_BUSID); ScrnInfoPtr scrn = NULL; - int scr_flags = 0; - - if (flags & PLATFORM_PROBE_GPU_SCREEN) - scr_flags = XF86_ALLOCATE_GPU_SCREEN; + int fd; - if (TegraProbeHardware(path)) { - scrn = xf86AllocateScreen(driver, scr_flags); + fd = drmOpen(NULL, busid); + if (fd != -1) { + scrn = xf86AllocateScreen(driver, 0); xf86AddEntityToScreen(scrn, entity_num); @@ -795,7 +793,9 @@ TegraPlatformProbe(DriverPtr driver, int entity_num, int flags, scrn->ValidMode = TegraValidMode; xf86DrvMsg(scrn->scrnIndex, X_INFO, "using %s\n", - path ? path : "default device"); + busid ? busid : "default device"); + + drmClose(fd); } return scrn != NULL; |