From: Rajashekhara, S. <sud...@ti...> - 2009-07-06 07:16:59
|
On Fri, Jul 03, 2009 at 01:14:21, Krzysztof Helt wrote: > On Tue, 30 Jun 2009 01:50:13 -0400 > "Rajashekhara, Sudhakar" <sud...@ti...> wrote: > > > Adds LCD controller (LCDC) driver for TI's DA8xx/OMAP-L1xx architecture. > > LCDC specifications can be found at http://www.ti.com/litv/pdf/sprufm0a. > > > > LCDC on DA8xx consists of two independent controllers, the Raster Controller > > and the LCD Interface Display Driver (LIDD) controller. LIDD further supports > > character and graphic displays. > > > > This patch adds support for the graphic display (Sharp LQ035Q3DG01) found on > > the DA830 based EVM. The EVM details can be found at: > > http://support.spectrumdigital.com/boards/dskda830/revc/. > > > > Signed-off-by: Sudhakar Rajashekhara <sud...@ti...> > > Signed-off-by: Pavel Kiryukhin <pki...@ru...> > > Signed-off-by: Steve Chen <sc...@mv...> > > --- > > Since the previous version, fb_setcolreg function has been modified for > > 8 and 16 bit modes. > > > > drivers/video/Kconfig | 11 + > > drivers/video/Makefile | 1 + > > drivers/video/da8xx-fb.c | 897 ++++++++++++++++++++++++++++++++++++++++++++++ > > include/video/da8xx-fb.h | 106 ++++++ > > 4 files changed, 1015 insertions(+), 0 deletions(-) > > create mode 100644 drivers/video/da8xx-fb.c > > create mode 100644 include/video/da8xx-fb.h > > > > > diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c > > new file mode 100644 > > index 0000000..3135234 > > --- /dev/null > > +++ b/drivers/video/da8xx-fb.c > > @@ -0,0 +1,897 @@ > > (...) > > > + > > +static int fb_setcolreg(unsigned regno, unsigned red, unsigned green, > > + unsigned blue, unsigned transp, > > + struct fb_info *info) > > +{ > > + struct da8xx_fb_par *par = info->par; > > + unsigned short *palette = (unsigned short *)par->v_palette_base; > > + u_short pal; > > + > > + if (regno > 255) > > + return 1; > > + > > + if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) > > + return 1; > > + > > + if (info->var.bits_per_pixel == 8) { > > + red >>= 4; > > + green >>= 4; > > + blue >>= 4; > > + > > + pal = (red & 0x0f00); > > + pal |= (green & 0x00f0); > > + pal |= (blue & 0x000f); > > + > > + palette[regno] = pal; > > + > > I am losing my patience. The shift value for the red component is right (probably as I do > not know the format of this palette registers). It is however almost surely wrong for other > componets. Just put this simple example value to get almost white color: > red = 0xf000; > green = 0xf000; > blue = 0xf000; > > The resulting palette value would be 0xf00. Is it close to white on your controller? > > Another example: blue > red = 0; > green = 0; > blue = 0xff00; > > The result : 0x0. It does not differ from the value for black colour (rgb = 0/0/0). > I have corrected this mistake in the v5 version of the patch which I have submitted. Thanks, Sudhakar |