--- radeon_driver.c.orig 2009-06-05 18:44:20.000000000 -0400 +++ radeon_driver.c 2009-06-05 18:54:22.000000000 -0400 @@ -2011,6 +2011,7 @@ #if defined(USE_EXA) && defined(USE_XAA) char *optstr; #endif + int maxy = info->FbMapSize / (pScrn->displayWidth * info->CurrentLayout.pixel_bytes); if (!(info->accel_state = xcalloc(1, sizeof(struct radeon_accel_state)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to allocate accel_state rec!\n"); @@ -2031,7 +2032,16 @@ info->accel_state->has_tcl = TRUE; } +#ifdef XF86DRI + if ((!info->directRenderingEnabled) || + (maxy <= pScrn->virtualY * 3) || + (pScrn->videoRam <= 32768)) + info->useEXA = FALSE; + else + info->useEXA = TRUE; +#else info->useEXA = FALSE; +#endif if (info->ChipFamily >= CHIP_FAMILY_R600) { xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, @@ -2045,16 +2055,15 @@ from = X_DEFAULT; #if defined(USE_EXA) #if defined(USE_XAA) - /* If Acceleration is enabled, default to EXA rather than XAA */ - info->useEXA = TRUE; - optstr = (char *)xf86GetOptValString(info->Options, OPTION_ACCELMETHOD); if (optstr != NULL) { if (xf86NameCmp(optstr, "EXA") == 0) { from = X_CONFIG; + info->useEXA = TRUE; } else if (xf86NameCmp(optstr, "XAA") == 0) { from = X_CONFIG; - info->useEXA = FALSE; + if (info->ChipFamily < CHIP_FAMILY_R600) + info->useEXA = FALSE; } } #else /* USE_XAA */ @@ -2100,6 +2109,9 @@ } } #endif /* USE_XAA */ + } else { + /* NoAccel */ + info->useEXA = FALSE; } return TRUE;