lkml.org 
[lkml]   [2013]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCHv3 1/6] arm: Initial TI-Nspire support
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 <tangrs@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.


\
 
 \ /
  Last update: 2013-05-12 12:01    [W:0.238 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site