[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090420160733.07e27238.akpm@linux-foundation.org>
Date: Mon, 20 Apr 2009 16:07:33 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: spock@...too.org
Cc: krzysztof.h1@...zta.fm, linux-fbdev-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] fbdev: fix fillrect for 24bpp modes
On Sat, 18 Apr 2009 20:52:34 +0200
Michal Januszewski <spock@...too.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...)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists