From: "Laurent Lagrange" <lagrange@fr.oleane.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Endian issue
Date: Mon, 27 Nov 2006 15:59:00 +0100 [thread overview]
Message-ID: <000001c71234$95079550$5201a8c0@GEG2400> (raw)
In-Reply-To:
Hi
I'm writing a framebuffer driver and I have some endian problems.
My board is big endian (powerpc inside) and I use a little endian
graphic card. I try to get a 16 bpp RGBA (5/5/5/1) true color mode
working. Nevertheless, I have troubles with the framebuffer layer.
For example, in the color_imageblit function of cfbimgblt.c, if I
want to draw two 16bpp rgba pixels P0 (0xFFFE) and P1 (0x0001),
they are packed together like this 0xFFFE_0001.
In memory, 0xFF is LSB, 0x01 is MSB (big endian). Then this 32bit
value is "__raw_writel" to the memory of the video card.
As my videocard works in little endian, I get 0x0100_FEFF. So the
pixels are at the correct place, but don't have the correct color.
It would be OK if it was 0x0001_FFFE.
My question is :
- is it possible to use generic drawing function (blit, fillrect...)
on a big endian board with a little endian graphics card ?
- if yes, how can I describe the colors bitfields, without
patching the kernel code, to get the correct color ?
Thanks
Laurent
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
reply other threads:[~2006-11-27 14:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='000001c71234$95079550$5201a8c0@GEG2400' \
--to=lagrange@fr.oleane.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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