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@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-01-28 21:56:23 +00:00
parent 2425f03432
commit 9f3fc9ec49
3 changed files with 23 additions and 7 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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;
}