exa/mixed: setting devKind before exaCopyDirty* is not needed
Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
8ea415d417
commit
0f4ef7123d
|
@ -101,6 +101,14 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
||||||
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
|
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
|
||||||
ExaScreenPriv(pPixmap->drawable.pScreen);
|
ExaScreenPriv(pPixmap->drawable.pScreen);
|
||||||
|
|
||||||
|
/* This pitch is needed for proper acceleration. For some reason
|
||||||
|
* there are pixmaps without pDamage and a bad fb_pitch value.
|
||||||
|
* So setting devKind when only exaPixmapHasGpuCopy() is true
|
||||||
|
* causes corruption. Pixmaps without pDamage are not migrated
|
||||||
|
* and should have a valid devKind at all times, so that's why this
|
||||||
|
* isn't causing problems. Pixmaps have their gpu pitch set the
|
||||||
|
* first time in the MPH call from exaCreateDriverPixmap_mixed().
|
||||||
|
*/
|
||||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
pPixmap->devKind = pExaPixmap->fb_pitch;
|
||||||
exaCopyDirtyToFb(pixmaps + i);
|
exaCopyDirtyToFb(pixmaps + i);
|
||||||
|
|
||||||
|
@ -183,17 +191,14 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
|
||||||
pixmaps[0].as_src = TRUE;
|
pixmaps[0].as_src = TRUE;
|
||||||
pixmaps[0].pReg = NULL;
|
pixmaps[0].pReg = NULL;
|
||||||
}
|
}
|
||||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
|
||||||
exaCopyDirtyToSys(pixmaps);
|
exaCopyDirtyToSys(pixmaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (as_dst)
|
if (as_dst)
|
||||||
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
|
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
|
||||||
pPixmap->drawable.height);
|
pPixmap->drawable.height);
|
||||||
} else if (has_gpu_copy) {
|
} else if (has_gpu_copy)
|
||||||
pPixmap->devKind = pExaPixmap->fb_pitch;
|
|
||||||
exaCopyDirtyToSys(pixmaps);
|
exaCopyDirtyToSys(pixmaps);
|
||||||
}
|
|
||||||
|
|
||||||
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
|
||||||
pPixmap->devKind = pExaPixmap->sys_pitch;
|
pPixmap->devKind = pExaPixmap->sys_pitch;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user