From: Aitor Garcia <carrierphasejitter@yahoo.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: enquiry about 4 bpp frame buffer with nibbles swapped
Date: Tue, 20 Feb 2007 04:11:56 -0800 (PST) [thread overview]
Message-ID: <20070220121156.41538.qmail@web51601.mail.yahoo.com> (raw)
Hi all,
I am trying to design a 4 bpp FB driver for iMX1 using
imxfb.c code as
an starting point.
The problem that I have found is that MX1 video memory
is organised as
follows:
b7 b6 b5 b4 --> pixel 0.
b3 b2 b1 b0 --> pixel 1.
The software that I'm using to display things (Qtopia
Core) assumes a
different scheme of memory to pixel mapping:
b7 b6 b5 b4 ---> pixel 1.
b3 b2 b1 b0 ---> pixel 0.
The solution to overcome this problem is apparently
easy:
#define SWAP_NIBBLES(in,out) (out=((in&0xf)<<4) |
((in&0xf0)>>4) |\
((in&0xf00)<<4) |
((in&0xf000)>>4) |\
((in&0xf0000)<<4) |
((in&0xf00000)>>4) |\
((in&0xf000000)<<4) |
((in&0xf0000000)>>4))
But I do not know where to do it.
Frame Buffer has 3 functions cfb_fillrect,
cfb_copyarea and cfb_imageblit which I thought were
the key to solve my problems but Qtopia Core does not
make use
of them.
imxfb_map_video_memory function or fb_mmap, seem to be
good candidates but I do not know how to progress
further.
I would be very grateful if I could receive some kind
of help.
Best wishes,
Aitor
____________________________________________________________________________________
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/
-------------------------------------------------------------------------
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
next reply other threads:[~2007-02-20 12:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 12:11 Aitor Garcia [this message]
2007-02-21 7:34 ` enquiry about 4 bpp frame buffer with nibbles swapped Geert Uytterhoeven
2007-02-21 21:50 ` James Simmons
2007-02-22 8:08 ` Geert Uytterhoeven
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=20070220121156.41538.qmail@web51601.mail.yahoo.com \
--to=carrierphasejitter@yahoo.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;
as well as URLs for NNTP newsgroup(s).