lkml.org 
[lkml]   [2009]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Linux-fbdev-devel] [PATCH] fbdev: fix fillrect for 24bpp modes
On Fri, 17 Apr 2009 18:36:17 +0200
Krzysztof Helt <krzysztof.h1@poczta.fm> wrote:

> On Mon, 13 Apr 2009 19:09:54 +0200
> Michal Januszewski <spock@gentoo.org> wrote:
>
> ...
>
> The r is simply dst_idx / bits. Most compilers will optimize it away into
> a simple shift because the bits has only one bit set (it is number of bits in a long variable, ie. 32 or 64).
>
> > + pat = pat << ((left*r) % bpp) | pat >> ((right*r) % bpp);
> >
>
> If the r = (dst_idx / bits) it is number of long words. The shift by ((left*r) % bpp) does
> not make much sense (try left = 3 and r = 24 words - it is always zero but should be 3).
> It is even worse if a line is padded so line's length modulo bpp is not
> zero it does not work. A colorful pattern is produced after the "mtest" text.
>
> A dst_idx offset is not taken into account (it could be non-zero only for depths < 8 bits).
>

OK, thanks for checking.

Michael, I'll await a version 2 on this patch. It looks like something
we want in 2.6.30.



\
 
 \ /
  Last update: 2009-04-17 20:57    [W:0.596 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site