All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Viktor Novotný" <noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] nv04/exa: Reset destination surface offset in the same call of NV04EXACopy
Date: Thu, 7 Jun 2012 14:51:00 +0200	[thread overview]
Message-ID: <20120607123627.GA3114@joi.lan> (raw)
In-Reply-To: <1338063320-9274-1-git-send-email-noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>

On Sat, May 26, 2012 at 10:15:20PM +0200, Viktor Novotný wrote:
> Fixes FDO bug #48954.
> 
> Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
> ---

Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>

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
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2012-06-07 12:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20  9:25 [Bug 48954] New: nv25 PGRAPH error and X freeze bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-48954-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2012-05-26 20:15   ` [PATCH] nv04/exa: Reset destination surface offset in the same call of NV04EXACopy Viktor Novotný
     [not found]     ` <1338063320-9274-1-git-send-email-noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org>
2012-06-07 12:51       ` Marcin Slusarz [this message]
     [not found]         ` <20120607123627.GA3114-OI9uyE9O0yo@public.gmane.org>
2012-06-08  7:32           ` Ben Skeggs
2012-06-08  7:26   ` [Bug 48954] nv25 PGRAPH error and X freeze bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120607123627.GA3114@joi.lan \
    --to=marcin.slusarz-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=noviktor-9Vj9tDbzfuSlVyrhU4qvOw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.