[patch] exa: fix pitch handling in ModifyPixmapHeader
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Apr 17 20:00:15 PDT 2008
On 2008.04.17 18:36:19 +0200, Michel Dänzer wrote:
> > > ---
> > > diff --git a/exa/exa.c b/exa/exa.c
> > > index 81dc3e2..3369c3a 100644
> > > --- a/exa/exa.c
> > > +++ b/exa/exa.c
> > > @@ -386,6 +386,9 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
> > > if (pExaPixmap) {
> > > pExaPixmap->sys_ptr = pPixData;
> > >
> > > + if (pExaPixmap->fb_pitch == 0)
> > > + pExaPixmap->fb_pitch = devKind;
> > > +
> > > exaSetAccelBlock(pExaScr, pExaPixmap,
> > > width, height, bitsPerPixel);
> > > }
> >
> > Shouldn't we set fb_pitch even if the current value isn't zero?
So if driver provides CreatePixmap, we might override fb_pitch with
paddedWidth, but it should be ok.
> > Shouldn't we also set sys_pitch = devKind?
>
> I think so, too, and pExaScr->info->pixmapPitchAlign should probably
> also be enforced for fb_pitch.
yeah, ok for me. But even if I test with those setup, driver only sets
maxPitch (2.3-branch), I still got gnome crashed chip. Large virtual size
then large front buffer pitch caught this when rendering onto root window
pixmap. We still missed somewhere?
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the xorg
mailing list