diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-24 18:22:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-05-24 19:01:22 +0100 |
commit | e45629135065d0cc73c285f8df35ab4e1d07c6dc (patch) | |
tree | 7677db32ced6e3114ca4cf7822dabd6871d1a177 /src/sna/sna_driver.c | |
parent | df6ab02c3690eea8393ecc8c113e2f2891856cc6 (diff) |
Allow runtime switching of AccelMethod between uxa/sna and even glamor
Section "Device"
Option "AccelMethod" "uxa/glamor/sna"
EndSection
The appropriate backend must also be enabled at compile time for the
runtime option to be available (i.e. --enable-uxa (default) --enable-sna
--enable-glamor)
Demanded-by: Adam Jackson <ajax@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50290
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r-- | src/sna/sna_driver.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 5d42e69c..fb54a24c 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -1047,7 +1047,7 @@ static Bool sna_pm_event(int scrnIndex, pmEvent event, Bool undo) return TRUE; } -void sna_init_scrn(ScrnInfoPtr scrn, int entity_num) +Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num) { EntityInfoPtr entity; @@ -1081,8 +1081,13 @@ void sna_init_scrn(ScrnInfoPtr scrn, int entity_num) xf86SetEntitySharable(scrn->entityList[0]); entity = xf86GetEntityInfo(entity_num); + if (!entity) + return FALSE; + xf86SetEntityInstanceForScreen(scrn, entity->index, xf86GetNumEntityInstances(entity->index)-1); free(entity); + + return TRUE; } |