intel: Use NOACCEL to avoid a symbol clash on old Xorg

Old Xorg xf86str.h defines NONE preventing us from using it within an
enum. Use NOACCEL instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-08-05 16:38:42 +01:00
parent c5e654cf2a
commit f36b7a4aac
5 changed files with 8 additions and 8 deletions

View File

@ -699,7 +699,7 @@ fi
if test "x$have_accel" = "xnone"; then
if test "x$KMS" = "xyes"; then
if test "x$SNA" != "xno" -o "x$UXA" != "xno"; then
AC_DEFINE(DEFAULT_ACCEL_METHOD, NONE, [Default acceleration method])
AC_DEFINE(DEFAULT_ACCEL_METHOD, NOACCEL, [Default acceleration method])
else
AC_MSG_ERROR([Invalid default acceleration option])
fi

View File

@ -136,7 +136,7 @@ int intel_put_master(ScrnInfoPtr scrn);
void intel_put_device(ScrnInfoPtr scrn);
#define IS_DEFAULT_ACCEL_METHOD(x) ({ \
enum { SNA, UXA, GLAMOR, NONE } default_accel_method__ = DEFAULT_ACCEL_METHOD; \
enum { NOACCEL, SNA, UXA, GLAMOR } default_accel_method__ = DEFAULT_ACCEL_METHOD; \
default_accel_method__ == x; \
})

View File

@ -489,7 +489,7 @@ _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
return NULL;
}
static enum accel_method { NONE, SNA, UXA, GLAMOR } get_accel_method(void)
static enum accel_method { NOACCEL, SNA, UXA, GLAMOR } get_accel_method(void)
{
enum accel_method accel_method = DEFAULT_ACCEL_METHOD;
XF86ConfDevicePtr dev;
@ -504,7 +504,7 @@ static enum accel_method { NONE, SNA, UXA, GLAMOR } get_accel_method(void)
s = xf86FindOptionValue(dev->dev_option_lst, "AccelMethod");
if (s ) {
if (strcasecmp(s, "none") == 0)
accel_method = NONE;
accel_method = NOACCEL;
else if (strcasecmp(s, "sna") == 0)
accel_method = SNA;
else if (strcasecmp(s, "uxa") == 0)
@ -564,13 +564,13 @@ intel_scrn_create(DriverPtr driver,
#if KMS
switch (get_accel_method()) {
#if USE_SNA
case NONE:
case NOACCEL:
case SNA:
return sna_init_scrn(scrn, entity_num);
#endif
#if USE_UXA
#if !USE_SNA
case NONE:
case NOACCEL:
#endif
case GLAMOR:
case UXA:

View File

@ -17625,7 +17625,7 @@ static bool sna_option_accel_none(struct sna *sna)
s = xf86GetOptValString(sna->Options, OPTION_ACCEL_METHOD);
if (s == NULL)
return IS_DEFAULT_ACCEL_METHOD(NONE);
return IS_DEFAULT_ACCEL_METHOD(NOACCEL);
return strcasecmp(s, "none") == 0;
}

View File

@ -1427,7 +1427,7 @@ static Bool intel_option_accel_none(intel_screen_private *intel)
s = xf86GetOptValString(intel->Options, OPTION_ACCEL_METHOD);
if (s == NULL)
return IS_DEFAULT_ACCEL_METHOD(NONE);
return IS_DEFAULT_ACCEL_METHOD(NOACCEL);
return strcasecmp(s, "none") == 0;
}