Add options to disable EXA acceleration for Composite/UTS/DFS, and always print

out how much memory EXA is managing for offscreen pixmaps.
This commit is contained in:
Eric Anholt 2006-06-18 19:12:15 -07:00
commit 6aaf0e5b58
3 changed files with 53 additions and 7 deletions

View file

@ -47,11 +47,22 @@ static int exaXorgScreenPrivateIndex;
typedef enum {
EXAOPT_MIGRATION_HEURISTIC,
EXAOPT_NO_COMPOSITE,
EXAOPT_NO_UTS,
EXAOPT_NO_DFS,
} EXAOpts;
static const OptionInfoRec EXAOptions[] = {
{ EXAOPT_MIGRATION_HEURISTIC, "MigrationHeuristic", OPTV_ANYSTR, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
{ EXAOPT_MIGRATION_HEURISTIC, "MigrationHeuristic",
OPTV_ANYSTR, {0}, FALSE },
{ EXAOPT_NO_COMPOSITE, "EXANoComposite",
OPTV_BOOLEAN, {0}, FALSE },
{ EXAOPT_NO_UTS, "EXANoUploadToScreen",
OPTV_BOOLEAN, {0}, FALSE },
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL,
OPTV_NONE, {0}, FALSE }
};
static Bool
@ -135,6 +146,26 @@ exaDDXDriverInit(ScreenPtr pScreen)
}
}
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
xf86DrvMsg(pScreen->myNum, X_INFO,
"EXA: Disabling Composite operation "
"(RENDER acceleration)\n");
pExaScr->info->CheckComposite = NULL;
pExaScr->info->PrepareComposite = NULL;
}
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_UTS)) {
xf86DrvMsg(pScreen->myNum, X_INFO,
"EXA: Disabling UploadToScreen\n");
pExaScr->info->UploadToScreen = NULL;
}
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_DFS)) {
xf86DrvMsg(pScreen->myNum, X_INFO,
"EXA: Disabling DownloadFromScreen\n");
pExaScr->info->DownloadFromScreen = NULL;
}
pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv;
pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess;