Re: Console rotation problems
From: Antonino A. Daplas
Date: Thu Nov 24 2005 - 01:29:46 EST
Benjamin Herrenschmidt wrote:
> Remove bogus usage of test/set_bit() from fbcon rotation code and just
> manipulate the bits directly. This fixes an oops on powerpc among others
> and should be faster. Seems to work fine on the G5 here.
Thanks, I reached a point when my head became muddled with bit
manipulations, so I used arch-specific bitops but complete forgot
that they were atomic :-)
>
> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Acked-by: Antonino Daplas <adaplas@xxxxxxx>
> ---
>
> And here is the fix. Tony, did I miss something ?
Works in little-endian too, so thank you very much. cfbimageblit may
also suffer from this same mistake (mine). So can you test with
12x22 fonts at rotate 1 or 3 with acceleration off?
This particular line in cfbimgblit.c:slow_imageblit() is definitely
questionable.
- color = (*s & 1 << (BIT_NR(l))) ? fgcolor : bgcolor;
+ color = (*s & (1 << l)) ? fgcolor : bgcolor;
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/