[U-Boot] [PATCH 7/9 v3] LCD: support 8bpp BMPs on 16bpp displays

Guennadi Liakhovetski lg at denx.de
Fri Feb 6 17:23:53 CET 2009


On Fri, 6 Feb 2009, Anatolij Gustschin wrote:

> Guennadi Liakhovetski wrote:
> > This patch also simplifies some ifdefs in lcd.c, introduces a generic
> > vidinfo_t, which new drivers are encouraged to use and old drivers to switch
> > over to.
> > 
> > Signed-off-by: Guennadi Liakhovetski <lg at denx.de>
> > ---
> > 
> > Changes since v1: no changes.
> > 
> >  common/lcd.c  |   56 ++++++++++++++++++++++++++++++++------------------------
> >  include/lcd.h |   21 +++++++++++++--------
> >  2 files changed, 45 insertions(+), 32 deletions(-)
> 
> Applied to u-boot-video/master.
> 
> Also fixed some style issues by additionally applying a trivial
> patch below.
> 
> Note that I consider this horrible ifdef mess in common/lcd.c
> as a bug (not your bug!) that should be fixed before 2009.03-rc1
> or even earlier. pxa, mpc823 and atmel LCD drivers provide
> lcd_setcolreg() for color map setting and it could be used in
> lcd_display_bitmap() instead of duplicating the color map
> setting code for platforms in question. Other LCD drivers
> should provide own/controller-specific lcd_setcolreg().

That's why I introduced a generic vidinfo_t with only members in it, used 
by the generic code (lcd.c,...), a pointer to a colour map and a "void 
*priv" pointer for driver-specific data. It shouldn't be too difficult to 
migrate all in-tree users to this or a similar scheme. This alone would 
eliminate a few ifdefs, but maybe you have a better idea how to do this.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list