All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Mandracci <francesco.mandracci@primaelectronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] wrong lcd splashscreen colors (pxa)
Date: Fri, 16 Sep 2005 12:41:19 +0200	[thread overview]
Message-ID: <432AA14F.8070801@primaelectronics.com> (raw)
In-Reply-To: <20050915175243.6B3EA3529BB@atlas.denx.de>

Wolfgang Denk wrote:
> It's working fine on all the PowerPC systems where I am able to test.
you forgot to quote this:
  The error is not evident until you use full colors (i.e. if color RGB
  components/bytes are either 0x00 of 0xff).

In other (maybe clearer) words: "all bitmaps with palette colors whose
RGB components don't differ in the 5 high bits in the blue byte and in
the 6 high bits in the green byte" will display correctly.

That may seem not so important, but if you are testing the lcd wirings
of the brand new hardware then you really want each color to be ok down
to the last bit!
[http://www.dreamvideo.it/video/immagini/monoscopio.jpg]

>>I'm working on a PXA270 but this seems general (as far as I understand).
> Probably not general, but maybe byte-order dependent ?
No, it's not endianness dependent:
1) "bmp_color_table_entry_t" is byte order independent (4 packed __u8
fields)
2) "ushort colreg" is used coherently in each operation

The C code fills a 16bit palette entry with 3 RGB bytes in the form

  RRRR RGGG GGGB BBBB
 [....|....|....|....]  masks: (R,G,B) (0xf800, 0x07e0, 0x001f)
  fedc ba98 7654 3210

The used bits are the highest 5 bits for the red and blue bytes and the
 6 high bits for the green byte. This did not change neither in PowerPC
nor in PXA in all cvs.sf.net revisions I've found.

The computation may be either:
colreg = ((red   & 0xf8) << 8)  /* [RRRR|Rrrr|....|....]     */
       | ((green & 0xfc) << 3)  /* [....|.GGG|GGGg|g...]     */
       | ((blue  & 0xf8) >> 3); /* [....|....|...B|BBBB]bbb. */
or:
colreg = ((red   << 8) & 0xf800)
       | ((green << 3) & 0x07e0)   /* versus " << 4" */
       | ((blue  >> 3) & 0x001f);  /* versus " >> 0" */
I choose the latter form because it's the way you adopted.

> Please see section "Submitting Patches" in the README. In  this  form
> this  is  not  acceptable.
Yes Sir! :) :) :)
Actually, please forgive me if I didn't follow all your recommendations.
As an excuse: I understand your heavy efforts (not only in this mailing
list), but it was only a two-lines very-punctual not-show-stopper patch. :)

Anyway, if we'll going to use Das U-Boot in the company product then
I'll ask for MACH_TYPE_ stuff and propose some bigger patches regarding
CONFIGS_PXA27x. But today there is still nothing stable enough on my
side... with the exception of this little splashscreen issue.

Ciao
    Francesco Mandracci

  reply	other threads:[~2005-09-16 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-15 16:18 [U-Boot-Users] [PATCH] wrong lcd splashscreen colors (pxa) Francesco Mandracci
2005-09-15 17:52 ` Wolfgang Denk
2005-09-16 10:41   ` Francesco Mandracci [this message]
2005-09-16 10:57     ` Wolfgang Denk

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=432AA14F.8070801@primaelectronics.com \
    --to=francesco.mandracci@primaelectronics.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.