[PATCH 2/3] exa/mixed: be more thorough about setting fb_pitch when needed
Michel Dänzer
michel at daenzer.net
Thu Nov 12 13:45:50 PST 2009
Actually looking at this again, I do have some doubts.
On Thu, 2009-11-12 at 20:11 +0100, Maarten Maathuis wrote:
> 2009/11/12 Michel Dänzer <michel at daenzer.net>:
> > On Sat, 2009-11-07 at 13:32 +0100, Maarten Maathuis wrote:
> >> Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
> >> ---
> >> exa/exa_migration_mixed.c | 6 +++++-
> >> 1 files changed, 5 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
> >> index 7458e3c..4ea9823 100644
> >> --- a/exa/exa_migration_mixed.c
> >> +++ b/exa/exa_migration_mixed.c
> >> @@ -98,10 +98,11 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
> >> if (!pExaPixmap->driverPriv)
> >> exaCreateDriverPixmap_mixed(pPixmap);
> >>
> >> + pPixmap->devKind = pExaPixmap->fb_pitch;
> >> +
> >> if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
> >> ExaScreenPriv(pPixmap->drawable.pScreen);
> >>
> >> - pPixmap->devKind = pExaPixmap->fb_pitch;
> >> exaCopyDirtyToFb(pixmaps + i);
> >>
> >> if (pExaScr->deferred_mixed_pixmap == pPixmap)
Doesn't this need to be guarded at least by if
(exaPixmapIsOffscreen(pPixmap))? Is pExaPixmap->fb_pitch valid at all
otherwise?
> >> @@ -197,6 +198,9 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
> >> pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
> >> pPixmap->devKind = pExaPixmap->sys_pitch;
> >> pExaPixmap->offscreen = FALSE;
> >> + } else {
> >> + ExaPixmapPriv(pPixmap);
> >> + pPixmap->devKind = pExaPixmap->fb_pitch;
> >> }
> >> }
Would be cleaner to move the ExaPixmapPriv(pPixmap) to the beginning of
the function.
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
More information about the xorg-devel
mailing list