From: Alessandro Rubini <rubini@unipv.it>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 6/9] lcd: make 16bpp work
Date: Sat, 5 Dec 2009 21:01:04 +0100 [thread overview]
Message-ID: <20091205200104.GA32562@morgana.gnudd.com> (raw)
In-Reply-To: <3f8ddc66075cce35fbee4e16125c9a9e76b41e14.1260016056.git.rubini@unipv.it>
Sorry for this late though about lcd issues.
> - lcd_color_fg : lcd_color_bg;
> + *d++ = (bits & 0x80) ? 0xffff : 0;
Here my patch uses hardwired 0 and ~0 for 16-bit pixels. Anatolij
suggested to use lcd_color_fg and lcd_color_bg as in the original
code, but unfortunately it doesn't work.
lcd_color_fg is set by common/lcd.c itself, using this function:
static void lcd_setfgcolor (int color)
{
#ifdef CONFIG_ATMEL_LCD
lcd_color_fg = color;
#else
lcd_color_fg = color & 0x0F;
#endif
}
So, however white I declare my color, it turns out blue. While I'd
understand a difference based on LCD_COLOR8 and LCD_COLOR16 (but even
in that case I'd request the caller to do the right thing avoiding
this late "fix"), I really can't tell why the atmel display is
different from other ones.
It's true that I can force lcd_color_fg to whatever I want, but only
after lcd_clear() is called. Moreover, if there's centralized I
wouldn't cowardly change it behind it's back.
This is one of the reasons why my original post was an RFC.
common/lcd.c is quite a mess and touching it is difficult.
At this point I still think forcing 0xffff and 0, ignoring
lcd_color_fg, is the right thing to do at least until atmel specifics
are removed from common/lcd.c.
BTW: I have a 9263ek an a 9261ek, so I might be able to try to propose
an atmel-related cleanup in the future, but not on short term,
unfortunately.
/alessandro
next prev parent reply other threads:[~2009-12-05 20:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 12:39 [U-Boot] [PATCH V3 0/9] display and keypad support for nhk8815 Alessandro Rubini
2009-12-05 12:39 ` [U-Boot] [PATCH V3 1/9] nhk8815: change the order of initialization Alessandro Rubini
2009-12-05 12:39 ` [U-Boot] [PATCH V3 2/9] video: add amba-clcd prime-cell Alessandro Rubini
2009-12-12 20:13 ` Anatolij Gustschin
2009-12-05 12:39 ` [U-Boot] [PATCH V3 3/9] include/nomadik.h: add physical address for cldc Alessandro Rubini
2009-12-12 20:14 ` Anatolij Gustschin
2009-12-05 12:39 ` [U-Boot] [PATCH V3 4/9] drivers/misc: add stmpe2401 port extender and keypad controller Alessandro Rubini
2009-12-05 12:40 ` [U-Boot] [PATCH V3 5/9] nhk8815.h: define we need stmpe Alessandro Rubini
2009-12-05 12:40 ` [U-Boot] [PATCH V3 6/9] lcd: make 16bpp work Alessandro Rubini
2009-12-05 20:01 ` Alessandro Rubini [this message]
2009-12-12 20:52 ` [U-Boot] [PATCH] lcd: remove CONFIG_ATMEL_LCD ifdefs from lcd_setfgcolor Anatolij Gustschin
2010-01-27 20:53 ` Anatolij Gustschin
2010-01-27 21:20 ` Alessandro Rubini
2010-03-13 16:44 ` [U-Boot] [PATCH] lcd: make 16bpp work Anatolij Gustschin
2010-03-14 12:08 ` Alessandro Rubini
2010-03-24 10:33 ` Anatolij Gustschin
2009-12-05 12:40 ` [U-Boot] [PATCH V3 7/9] nhk8815: added keypad Alessandro Rubini
2009-12-05 12:40 ` [U-Boot] [PATCH V3 8/9] nhk8815: start lower in RAM, so the 800x480 frame buffer fits Alessandro Rubini
2009-12-05 12:40 ` [U-Boot] [PATCH V3 9/9] nhk8815: added lcd support Alessandro Rubini
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=20091205200104.GA32562@morgana.gnudd.com \
--to=rubini@unipv.it \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox