linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: spock@gentoo.org
Cc: krzysztof.h1@poczta.fm, linux-fbdev-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] fbdev: fix fillrect for 24bpp modes
Date: Mon, 20 Apr 2009 16:07:33 -0700	[thread overview]
Message-ID: <20090420160733.07e27238.akpm@linux-foundation.org> (raw)
In-Reply-To: <20090418185234.GA17853@tria>

On Sat, 18 Apr 2009 20:52:34 +0200
Michal Januszewski <spock@gentoo.org> wrote:

>  		while (height--) {
> -			dst += dst_idx >> (ffs(bits) - 1);
> +			dst += dst_idx / bits;
>  			dst_idx &= (bits - 1);
> -			fill_op(p, dst, dst_idx, pat, left, right,
> +			r = dst_idx % bpp;
> +			/* rotate pattern to the correct start position */
> +#ifdef __LITTLE_ENDIAN
> +			pat2 = pat << r | pat >> (bpp-r);
> +#else
> +			pat2 = pat << (bpp-r) | pat >> r;
> +#endif
> +			fill_op(p, dst, dst_idx, pat2, left, right,
>  				width*bpp, bits);
> -			r = (p->fix.line_length*8) % bpp;
> -			pat = pat << (bpp-r) | pat >> r;
>  			dst_idx += p->fix.line_length*8;

hm, that's fairly eye-popping.

Could we do something like

	pat2 = le32_to_cpu(rol32(cpu_to_le32(pat), r));

(might be wrong, but you see what I mean...)

  reply	other threads:[~2009-04-20 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-13 17:09 [PATCH] fbdev: fix fillrect for 24bpp modes Michal Januszewski
2009-04-17 16:36 ` Krzysztof Helt
2009-04-17 18:50   ` [Linux-fbdev-devel] " Andrew Morton
2009-04-18 18:52     ` [PATCH v2] " Michal Januszewski
2009-04-20 23:07       ` Andrew Morton [this message]
2009-05-01 21:47         ` [PATCH v3] " Michal Januszewski
2009-04-21  5:10       ` [PATCH v2] " Krzysztof Helt

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=20090420160733.07e27238.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=krzysztof.h1@poczta.fm \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spock@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).