diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-08 08:55:25 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-08 08:58:22 +0000 |
commit | b7d2fcf47a9569d0944097a8be60ca3be72b42f6 (patch) | |
tree | d715cc91c30254410e7741e4eae4df96a5de0b7e /src/sna/sna_driver.c | |
parent | cefce9c81585b73db7620e08fcf60c89a8204873 (diff) |
Remove reliance on hard-coded DRI name
This provides for using the existing DDX with future DRI drivers which
may break from the traditional names - but only with the help of the
user/packager. This scheme needs to be replaced with a robust mechanism
for driver loading if AIGLX and co are to be kept.
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 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 055c71c2..f214b90f 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -363,6 +363,12 @@ static void sna_setup_capabilities(ScrnInfoPtr scrn, int fd) #endif } +static Bool sna_option_cast_to_bool(struct sna *sna, int id, Bool val) +{ + xf86getBoolValue(&val, xf86GetOptValString(sna->Options, id)); + return val; +} + /** * This is called before ScreenInit to do any require probing of screen * configuration. @@ -543,7 +549,7 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags) xf86SetDpi(scrn, 0, 0); sna->dri_available = false; - if (xf86ReturnOptValBool(sna->Options, OPTION_DRI, TRUE)) + if (sna_option_cast_to_bool(sna, OPTION_DRI, TRUE)) sna->dri_available = !!xf86LoadSubModule(scrn, "dri2"); return TRUE; |