On Thu, Jun 07, 2012 at 02:51:00PM +0200, Marcin Slusarz wrote:
> On Sat, May 26, 2012 at 10:15:20PM +0200, Viktor Novotný wrote:
> > Fixes FDO bug #48954.
> > 
> > Signed-off-by: Viktor Novotný <[email protected]>
> > ---
> 
> Reviewed-by: Marcin Slusarz <[email protected]>
Thanks a lot, nice catch.  I've pushed the fix to nouveau git.

> 
> It seems this code was buggy since it was introduced in "nv04-nv40/exa: Make
> the copy hook blit downwards for non-overlapping regions." (OFFSET_DESTIN was
> not zeroed for the second part), only "WIP: port to new libdrm" made it more
> apparent.
> 
> >  src/nv04_exa.c |   15 ++++++++-------
> >  1 files changed, 8 insertions(+), 7 deletions(-)
> > 
> > diff --git a/src/nv04_exa.c b/src/nv04_exa.c
> > index 7ede9d9..ca92868 100644
> > --- a/src/nv04_exa.c
> > +++ b/src/nv04_exa.c
> > @@ -220,7 +220,7 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int 
> > dstX, int dstY,
> >     int split_dstY = NOUVEAU_ALIGN(dstY + 1, 64);
> >     int split_height = split_dstY - dstY;
> >  
> > -   if (nouveau_pushbuf_space(push, 16, 1, 0))
> > +   if (nouveau_pushbuf_space(push, 16, 2, 0))
> >             return;
> >  
> >     if ((width * height) >= 200000 && pNv->pspix != pNv->pdpix &&
> > @@ -249,7 +249,13 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int 
> > dstX, int dstY,
> >             height -= split_height;
> >             dstY = 0;
> >             pNv->pmpix = pdpix;
> > -   } else
> > +   }
> > +
> > +   BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
> > +   PUSH_DATA (push, (srcY << 16) | srcX);
> > +   PUSH_DATA (push, (dstY << 16) | dstX);
> > +   PUSH_DATA (push, (height  << 16) | width);
> > +
> >     if (pNv->pmpix) {
> >             struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix);
> >  
> > @@ -258,11 +264,6 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int 
> > dstX, int dstY,
> >             pNv->pmpix = NULL;
> >     }
> >  
> > -   BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
> > -   PUSH_DATA (push, (srcY << 16) | srcX);
> > -   PUSH_DATA (push, (dstY << 16) | dstX);
> > -   PUSH_DATA (push, (height  << 16) | width);
> > -
> >     if ((width * height) >= 512)
> >             PUSH_KICK(push);
> >  }
> > -- 
> _______________________________________________
> Nouveau mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to