EXA: Disable problematic optimization of dest pixmap migration by default.
Also add some code comments about these optimizations.
This commit is contained in:
parent
e717409bae
commit
9bee1c6912
|
@ -153,6 +153,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
|
||||||
REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
|
REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst);
|
||||||
|
|
||||||
if (migrate->as_dst) {
|
if (migrate->as_dst) {
|
||||||
|
ExaScreenPriv (pPixmap->drawable.pScreen);
|
||||||
|
|
||||||
|
/* XXX: The pending damage region will be marked as damaged after the
|
||||||
|
* operation, so it should serve as an upper bound for the region that
|
||||||
|
* needs to be synchronized for the operation. Unfortunately, this
|
||||||
|
* causes corruption in some cases, e.g. when starting compiz. See
|
||||||
|
* https://bugs.freedesktop.org/show_bug.cgi?id=12916 .
|
||||||
|
*/
|
||||||
|
if (pExaScr->optimize_migration) {
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
|
||||||
if (REGION_NIL(pending_damage)) {
|
if (REGION_NIL(pending_damage)) {
|
||||||
|
@ -165,10 +174,18 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
|
||||||
}
|
}
|
||||||
|
|
||||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The caller may provide a region to be subtracted from the calculated
|
||||||
|
* dirty region. This is to avoid migration of bits that don't
|
||||||
|
* contribute to the result of the operation.
|
||||||
|
*/
|
||||||
if (migrate->pReg)
|
if (migrate->pReg)
|
||||||
REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||||
} else {
|
} else {
|
||||||
|
/* The caller may restrict the region to be migrated for source pixmaps
|
||||||
|
* to what's relevant for the operation.
|
||||||
|
*/
|
||||||
if (migrate->pReg)
|
if (migrate->pReg)
|
||||||
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,7 @@ typedef struct {
|
||||||
enum ExaMigrationHeuristic migration;
|
enum ExaMigrationHeuristic migration;
|
||||||
Bool checkDirtyCorrectness;
|
Bool checkDirtyCorrectness;
|
||||||
unsigned disableFbCount;
|
unsigned disableFbCount;
|
||||||
|
Bool optimize_migration;
|
||||||
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
} ExaScreenPrivRec, *ExaScreenPrivPtr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -31,6 +31,12 @@ Disables acceleration of downloading of pixmap data from the framebuffer.
|
||||||
Not usable with drivers which rely on DownloadFromScreen succeeding.
|
Not usable with drivers which rely on DownloadFromScreen succeeding.
|
||||||
Default: No.
|
Default: No.
|
||||||
.TP
|
.TP
|
||||||
|
.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q
|
||||||
|
Enables an additional optimization for migration of destination pixmaps. This
|
||||||
|
may improve performance in some cases (e.g. when switching virtual desktops with
|
||||||
|
no compositing manager) but causes corruption in others (e.g. when starting
|
||||||
|
compiz). Default: No.
|
||||||
|
.TP
|
||||||
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
|
.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q
|
||||||
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
|
Chooses an alternate pixmap migration heuristic, for debugging purposes. The
|
||||||
default is intended to be the best performing one for general use, though others
|
default is intended to be the best performing one for general use, though others
|
||||||
|
|
|
@ -50,6 +50,7 @@ typedef enum {
|
||||||
EXAOPT_NO_COMPOSITE,
|
EXAOPT_NO_COMPOSITE,
|
||||||
EXAOPT_NO_UTS,
|
EXAOPT_NO_UTS,
|
||||||
EXAOPT_NO_DFS,
|
EXAOPT_NO_DFS,
|
||||||
|
EXAOPT_OPTIMIZE_MIGRATION
|
||||||
} EXAOpts;
|
} EXAOpts;
|
||||||
|
|
||||||
static const OptionInfoRec EXAOptions[] = {
|
static const OptionInfoRec EXAOptions[] = {
|
||||||
|
@ -61,6 +62,8 @@ static const OptionInfoRec EXAOptions[] = {
|
||||||
OPTV_BOOLEAN, {0}, FALSE },
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
|
{ EXAOPT_NO_DFS, "EXANoDownloadFromScreen",
|
||||||
OPTV_BOOLEAN, {0}, FALSE },
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
|
{ EXAOPT_OPTIMIZE_MIGRATION, "EXAOptimizeMigration",
|
||||||
|
OPTV_BOOLEAN, {0}, FALSE },
|
||||||
{ -1, NULL,
|
{ -1, NULL,
|
||||||
OPTV_NONE, {0}, FALSE }
|
OPTV_NONE, {0}, FALSE }
|
||||||
};
|
};
|
||||||
|
@ -144,6 +147,11 @@ exaDDXDriverInit(ScreenPtr pScreen)
|
||||||
heuristicName);
|
heuristicName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pExaScr->optimize_migration =
|
||||||
|
xf86ReturnOptValBool(pScreenPriv->options,
|
||||||
|
EXAOPT_OPTIMIZE_MIGRATION,
|
||||||
|
FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) {
|
||||||
|
|
Loading…
Reference in New Issue