From: Alexandr Andreev <andreev@niisi.msk.ru>
To: linux-mips@linux-mips.org
Subject: Endianity problems in XFree86-4.2 XAA on MIPSEB
Date: Fri, 07 Feb 2003 17:28:38 +0000 [thread overview]
Message-ID: <3E43ECC6.8090109@niisi.msk.ru> (raw)
We have a MipsEB machine and a video card which has a 2D BitBLT engine.
It looks like we found a problem in XAA when we tried to use our hardware
8x8 Mono Pattern Fills. The problem appears when an application uses
pixmaps.
Stipple and tile with the same pixmap are drawing in the different ways
(bytes in video memory are swapped). We looked through the XAA source tree
and found a dubious code in xaaPCache.c.
In two words... XAA tries to check that a pixmap (stipple/tile) can be
reduced
to a 8x8 mono pattern, and if so, puts this stipple/tile to two dwords and
passes it to hw driver. And it looks like the stipple code works fine,
but there
is an endianity problem in the "tile" case:
Bool
XAACheckStippleReducibility(PixmapPtr pPixmap)
{
...
pPriv->pattern0 = bits[0] | SHIFT_L(bits[1],8) | SHIFT_L(bits[2],16) |
SHIFT_L(bits[3],24);
pPriv->pattern1 = bits[4] | SHIFT_L(bits[5],8) | SHIFT_L(bits[6],16) |
SHIFT_L(bits[7],24);
...
}
where SHIFT_L(value, shift) is defined as ((value) >> (shift)) for Big
Endian.
Bool
XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono)
{
...
pPriv->pattern0 = bits[0] | (bits[1]<<8) | (bits[2]<<16) | (bits[3]<<24);
pPriv->pattern1 = bits[4] | (bits[5]<<8) | (bits[6]<<16) | (bits[7]<<24);
...
}
In both cases the unsigned int bits[] array contains bytes! with the
bitmask to be
passed to a driver via pPriv->pattern0, pPriv->pattern1.
When we tried to use the fbdev driver which is not using XAA, the problem
is gone.
Did anybody see something similar on Mips EB with XFree + XAA?
next reply other threads:[~2003-02-07 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 17:28 Alexandr Andreev [this message]
2003-02-07 14:59 ` Endianity problems in XFree86-4.2 XAA on MIPSEB Geert Uytterhoeven
2003-02-07 15:45 ` Guido Guenther
2003-02-07 19:27 ` Alexandr Andreev
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=3E43ECC6.8090109@niisi.msk.ru \
--to=andreev@niisi.msk.ru \
--cc=linux-mips@linux-mips.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