On Sun, May 12, 2013 at 02:22:56PM +1000, Daniel Tang wrote: > diff --git a/arch/arm/mach-nspire/clcd.c b/arch/arm/mach-nspire/clcd.c > new file mode 100644 > index 0000000..a4b9f06 > --- /dev/null > +++ b/arch/arm/mach-nspire/clcd.c > @@ -0,0 +1,117 @@ > +/* > + * linux/arch/arm/mach-nspire/clcd.c > + * > + * Copyright (C) 2013 Daniel Tang <tan...@tangrs.id.au> > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2, as > + * published by the Free Software Foundation. > + * > + */ > + > +#include <linux/init.h> > +#include <linux/of.h> > +#include <linux/amba/bus.h> > +#include <linux/amba/clcd.h> > +#include <linux/dma-mapping.h> > + > +static struct clcd_panel nspire_cx_lcd_panel = { > + .mode = { > + .name = "Color LCD", > + .refresh = 60, > + .xres = 320, > + .yres = 240, > + .sync = 0, > + .vmode = FB_VMODE_NONINTERLACED, > + .pixclock = 1, > + .hsync_len = 6, > + .vsync_len = 1, > + .right_margin = 50, > + .left_margin = 38, > + .lower_margin = 3, > + .upper_margin = 17, > + }, > + .width = 65, /* ~6.50 cm */ > + .height = 49, /* ~4.87 cm */ > + .tim2 = TIM2_IPC, > + .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), > + .bpp = 16, > +}; > + > +static struct clcd_panel nspire_classic_lcd_panel = { > + .mode = { > + .name = "Grayscale LCD", > + .refresh = 60, > + .xres = 320, > + .yres = 240, > + .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, > + .vmode = FB_VMODE_NONINTERLACED, > + .pixclock = 1, > + .hsync_len = 6, > + .vsync_len = 1, > + .right_margin = 6, > + .left_margin = 6, > + }, > + .width = 71, /* 7.11cm */ > + .height = 53, /* 5.33cm */ > + .tim2 = 0x80007d0, > + .cntl = CNTL_LCDMONO8, > + .bpp = 8, > + .grayscale = 1 > +};
Still no capabilities in the above - how does the CLCD controller know which of BGR or RGB output and which format these panels support? Each entry needs a .caps = CLCD_CAP_xxx | CLCD_CAP_xxx listing the formats supported there. Unless panels and the board have a .caps entry, the caps system won't be used. > +static struct clcd_board nspire_clcd_data = { > + .name = "LCD", > + .caps = CLCD_CAP_ALL, Your board has logic to support the RGB444/BGR444 mode? If not, setting CLCD_CAP_ALL is incorrect. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/