diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-05 17:17:58 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-05 17:17:58 +0100 |
commit | 1f5d5a37e57e63fa6e5b336a4847ce4422b89044 (patch) | |
tree | 2aa2e8b1261028ff00c08f4946c6b2e9a1efd29b /src/intel_module.c | |
parent | ddde40afc081f47a3b6b694aeb21682c240c9562 (diff) |
Add PlatformProbe to handle sharing of device entities
Reported-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54561
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_module.c')
-rw-r--r-- | src/intel_module.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/intel_module.c b/src/intel_module.c index d764dbbe..a5d071b1 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -546,6 +546,14 @@ intel_platform_probe(DriverPtr driver, return FALSE; scrn = xf86AllocateScreen(driver, 0); + if (scrn == NULL) + return FALSE; + + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "using device path '%s'\n", path ? path : "Default device"); + + if (xf86IsEntitySharable(entity_num)) + xf86SetEntityShared(entity_num); xf86AddEntityToScreen(scrn, entity_num); scrn->driverVersion = INTEL_VERSION; @@ -553,20 +561,16 @@ intel_platform_probe(DriverPtr driver, scrn->name = INTEL_NAME; scrn->driverPrivate = (void *)(match_data | 1); scrn->Probe = NULL; + switch (get_accel_method()) { #if USE_SNA - case SNA: sna_init_scrn(scrn, entity_num); break; + case SNA: return sna_init_scrn(scrn, entity_num); #endif - #if USE_UXA - case UXA: intel_init_scrn(scrn); break; + case UXA: return intel_init_scrn(scrn); #endif default: return FALSE; } - - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "using drv %s\n", path ? path : "Default device"); - return scrn != NULL; } #endif |