From: Martin Peres <martin.peres-GANU6spQydw@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 2/2] nv04-nv40: don't attempt to do 32-bit shifts
Date: Tue, 19 May 2015 23:35:15 +0300 [thread overview]
Message-ID: <555B9E83.8000509@free.fr> (raw)
In-Reply-To: <1432067309-14175-2-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
On 19/05/15 23:28, Ilia Mirkin wrote:
> A 32-bit shift is a no-op, which will also make the new planemask get
> or'd with ~0, thus negating the usefulness of the subsequent
> planemask != ~0 check. Only do this if it's a less-than-32-bit per pixel
> format, in which case it will have the desired effect of setting the
> high bits.
>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> ---
> src/nv04_exa.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/nv04_exa.c b/src/nv04_exa.c
> index 7a58dd7..d5dec68 100644
> --- a/src/nv04_exa.c
> +++ b/src/nv04_exa.c
> @@ -49,7 +49,8 @@ NV04EXASetROP(PixmapPtr ppix, int subc, int mthd, int alu, Pixel planemask)
> NVPtr pNv = NVPTR(pScrn);
> struct nouveau_pushbuf *push = pNv->pushbuf;
>
> - planemask |= ~0 << ppix->drawable.bitsPerPixel;
> + if (ppix->drawable.bitsPerPixel < 32)
> + planemask |= ~0 << ppix->drawable.bitsPerPixel;
> if (planemask != ~0 || alu != GXcopy) {
> if (ppix->drawable.bitsPerPixel == 32)
> return FALSE;
Both patches look good to me. Thanks for tracking those bugs down :)
Reviewed-by: Martin Peres <martin.peres@free.fr>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-05-19 20:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 20:28 [PATCH 1/2] Check before trying a solid fill Ilia Mirkin
[not found] ` <1432067309-14175-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-05-19 20:28 ` [PATCH 2/2] nv04-nv40: don't attempt to do 32-bit shifts Ilia Mirkin
[not found] ` <1432067309-14175-2-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-05-19 20:35 ` Martin Peres [this message]
[not found] ` <555B9E83.8000509-GANU6spQydw@public.gmane.org>
2015-05-19 20:42 ` Ilia Mirkin
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=555B9E83.8000509@free.fr \
--to=martin.peres-ganu6spqydw@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.