Commit 1f411537 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Linus Torvalds

s3c2410fb: add margin fields to s3c2410fb_display

This patch adds margins fields to the s3c2410fb_display
structure. It also sets display type and horizontal
margins in all platform files that use the s3c2410fb
driver.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 09fe75f6
...@@ -172,12 +172,13 @@ static struct s3c2410fb_display __initdata amlm5900_lcd_info = { ...@@ -172,12 +172,13 @@ static struct s3c2410fb_display __initdata amlm5900_lcd_info = {
.width = 160, .width = 160,
.height = 160, .height = 160,
/* commented out until stn patch is submitted .type = S3C2410_LCDCON1_STN4,
* .type = S3C2410_LCDCON1_STN4,
*/
.xres = 160, .xres = 160,
.yres = 160, .yres = 160,
.bpp = 4, .bpp = 4,
.left_margin = 1 << (4 + 3),
.right_margin = 8 << 3,
.regs = { .regs = {
.lcdcon1 = 0x00008225, .lcdcon1 = 0x00008225,
......
...@@ -469,10 +469,13 @@ static struct platform_device bast_device_axpp = { ...@@ -469,10 +469,13 @@ static struct platform_device bast_device_axpp = {
static struct s3c2410fb_display __initdata bast_lcd_info[] = { static struct s3c2410fb_display __initdata bast_lcd_info[] = {
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 320, .xres = 320,
.yres = 240, .yres = 240,
.left_margin = 40,
.right_margin = 20,
.bpp = 4, .bpp = 4,
...@@ -485,12 +488,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -485,12 +488,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 640, .xres = 640,
.yres = 480, .yres = 480,
.bpp = 4, .bpp = 4,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -501,12 +507,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -501,12 +507,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 800, .xres = 800,
.yres = 600, .yres = 600,
.bpp = 4, .bpp = 4,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -517,12 +526,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -517,12 +526,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 320, .xres = 320,
.yres = 240, .yres = 240,
.bpp = 8, .bpp = 8,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -533,12 +545,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -533,12 +545,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 640, .xres = 640,
.yres = 480, .yres = 480,
.bpp = 8, .bpp = 8,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -549,12 +564,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -549,12 +564,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 800, .xres = 800,
.yres = 600, .yres = 600,
.bpp = 8, .bpp = 8,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -565,12 +583,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -565,12 +583,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 320, .xres = 320,
.yres = 240, .yres = 240,
.bpp = 16, .bpp = 16,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -581,12 +602,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -581,12 +602,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 640, .xres = 640,
.yres = 480, .yres = 480,
.bpp = 16, .bpp = 16,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
...@@ -597,12 +621,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = { ...@@ -597,12 +621,15 @@ static struct s3c2410fb_display __initdata bast_lcd_info[] = {
} }
}, },
{ {
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 800, .xres = 800,
.yres = 600, .yres = 600,
.bpp = 16, .bpp = 16,
.left_margin = 40,
.right_margin = 20,
.regs = { .regs = {
.lcdcon1 = 0x00000176, .lcdcon1 = 0x00000176,
......
...@@ -156,11 +156,14 @@ static struct s3c2410fb_display h1940_lcd __initdata = { ...@@ -156,11 +156,14 @@ static struct s3c2410fb_display h1940_lcd __initdata = {
S3C2410_LCDCON5_HWSWP, S3C2410_LCDCON5_HWSWP,
}, },
.type = S3C2410_LCDCON1_TFT,
.width = 240, .width = 240,
.height = 320, .height = 320,
.xres = 240, .xres = 240,
.yres = 320, .yres = 320,
.bpp = 16, .bpp = 16,
.left_margin = 20,
.right_margin = 8,
}; };
static struct s3c2410fb_mach_info h1940_fb_info __initdata = { static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
......
...@@ -123,12 +123,15 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = { ...@@ -123,12 +123,15 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
S3C2410_LCDCON5_HWSWP, S3C2410_LCDCON5_HWSWP,
}, },
.type = S3C2410_LCDCON1_TFT,
.width = 640, .width = 640,
.height = 480, .height = 480,
.xres = 640, .xres = 640,
.yres = 480, .yres = 480,
.bpp = 16, .bpp = 16,
.left_margin = 44,
.right_margin = 116,
}, },
{ {
/* Configuration for 480x640 toppoly TD028TTEC1 */ /* Configuration for 480x640 toppoly TD028TTEC1 */
...@@ -157,11 +160,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = { ...@@ -157,11 +160,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
S3C2410_LCDCON5_HWSWP, S3C2410_LCDCON5_HWSWP,
}, },
.type = S3C2410_LCDCON1_TFT,
.width = 480, .width = 480,
.height = 640, .height = 640,
.xres = 480, .xres = 480,
.yres = 640, .yres = 640,
.bpp = 16, .bpp = 16,
.left_margin = 8,
.right_margin = 24,
}, },
{ {
/* Config for 240x320 LCD */ /* Config for 240x320 LCD */
...@@ -190,11 +196,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = { ...@@ -190,11 +196,14 @@ static struct s3c2410fb_display qt2410_lcd_cfg[] __initdata = {
S3C2410_LCDCON5_HWSWP, S3C2410_LCDCON5_HWSWP,
}, },
.type = S3C2410_LCDCON1_TFT,
.width = 240, .width = 240,
.height = 320, .height = 320,
.xres = 240, .xres = 240,
.yres = 320, .yres = 320,
.bpp = 16, .bpp = 16,
.left_margin = 13,
.right_margin = 8,
}, },
}; };
......
...@@ -133,12 +133,15 @@ static struct s3c2410fb_display rx3715_lcdcfg __initdata = { ...@@ -133,12 +133,15 @@ static struct s3c2410fb_display rx3715_lcdcfg __initdata = {
S3C2410_LCDCON5_HWSWP, S3C2410_LCDCON5_HWSWP,
}, },
.width = 240, .type = S3C2410_LCDCON1_TFT,
.height = 320, .width = 240,
.height = 320,
.xres = 240,
.yres = 320, .xres = 240,
.bpp = 16, .yres = 320,
.bpp = 16,
.left_margin = 36,
.right_margin = 36,
}; };
static struct s3c2410fb_mach_info rx3715_fb_info __initdata = { static struct s3c2410fb_mach_info rx3715_fb_info __initdata = {
......
...@@ -137,6 +137,8 @@ static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = { ...@@ -137,6 +137,8 @@ static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
.xres = 240, .xres = 240,
.yres = 320, .yres = 320,
.bpp = 16, .bpp = 16,
.left_margin = 20,
.right_margin = 8,
}; };
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = { static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
......
...@@ -36,6 +36,13 @@ struct s3c2410fb_display { ...@@ -36,6 +36,13 @@ struct s3c2410fb_display {
unsigned short yres; unsigned short yres;
unsigned short bpp; unsigned short bpp;
unsigned short left_margin; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short hsync_len; /* value in pixels (TFT) or HCLKs (STN) */
unsigned short upper_margin; /* value in lines (TFT) or 0 (STN) */
unsigned short lower_margin; /* value in lines (TFT) or 0 (STN) */
unsigned short vsync_len; /* value in lines (TFT) or 0 (STN) */
/* lcd configuration registers */ /* lcd configuration registers */
struct s3c2410fb_hw regs; struct s3c2410fb_hw regs;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment