xf86-video-intel: configure.ac src/intel_module.c src/uxa/intel_glamor.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jan 28 14:23:14 PST 2014
configure.ac | 19 ++++++++++++++++---
src/intel_module.c | 8 +++++---
src/uxa/intel_glamor.c | 3 ++-
3 files changed, 23 insertions(+), 7 deletions(-)
New commits:
commit 9f3fc9ec49f0caf53344577896ef9b6468cd3d4f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jan 28 21:56:23 2014 +0000
Allow selection of glamor as the default acceleration method
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74162
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/configure.ac b/configure.ac
index 9ceb37d..ce4822f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,11 +535,24 @@ if test "x$accel" = "xuxa"; then
AC_MSG_ERROR([UXA requested as default, but is not enabled])
fi
fi
-AC_MSG_RESULT($accel)
-if test "x$accel" = "xnone" -a "x$KMS" = "xyes"; then
- AC_MSG_ERROR([No default acceleration option])
+
+if test "x$accel" = "xglamor"; then
+ if test "x$GLAMOR" != "xno"; then
+ AC_DEFINE(DEFAULT_ACCEL_METHOD, GLAMOR, [Default acceleration method])
+ have_accel="yes"
+ else
+ AC_MSG_ERROR([glamor acceleration requested as default, but is not enabled])
+ fi
fi
+if test "x$have_accel" = "xnone"; then
+ if test "x$KMS" = "xyes"; then
+ AC_MSG_ERROR([Invalid default acceleration option])
+ fi
+ accel="none"
+fi
+AC_MSG_RESULT($accel)
+
xp_msg=""
AC_ARG_ENABLE(rendernode,
diff --git a/src/intel_module.c b/src/intel_module.c
index fb8734a..51de62a 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -441,7 +441,7 @@ _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
return NULL;
}
-static enum accel_method { UXA, SNA } get_accel_method(void)
+static enum accel_method { SNA, UXA, GLAMOR } get_accel_method(void)
{
enum accel_method accel_method = DEFAULT_ACCEL_METHOD;
XF86ConfDevicePtr dev;
@@ -460,7 +460,7 @@ static enum accel_method { UXA, SNA } get_accel_method(void)
else if (strcasecmp(s, "uxa") == 0)
accel_method = UXA;
else if (strcasecmp(s, "glamor") == 0)
- accel_method = UXA;
+ accel_method = GLAMOR;
}
}
@@ -517,7 +517,9 @@ intel_scrn_create(DriverPtr driver,
case SNA: return sna_init_scrn(scrn, entity_num);
#endif
#if USE_UXA
- case UXA: return intel_init_scrn(scrn);
+ case GLAMOR:
+ case UXA:
+ return intel_init_scrn(scrn);
#endif
default: break;
diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c
index 7f59e29..4d1c767 100644
--- a/src/uxa/intel_glamor.c
+++ b/src/uxa/intel_glamor.c
@@ -76,11 +76,12 @@ intel_glamor_create_screen_resources(ScreenPtr screen)
static Bool
intel_glamor_enabled(intel_screen_private *intel)
{
+ enum { SNA, UXA, GLAMOR } default_accel_method = DEFAULT_ACCEL_METHOD;
const char *s;
s = xf86GetOptValString(intel->Options, OPTION_ACCEL_METHOD);
if (s == NULL)
- return FALSE;
+ return default_accel_method == GLAMOR;
return strcasecmp(s, "glamor") == 0;
}
More information about the xorg-commit
mailing list