* [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
From: Thomas Abraham @ 2012-03-24 16:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1332606528-32338-1-git-send-email-thomas.abraham@linaro.org>
For all the Samsung SoC based boards which have the platform data for
s3c-fb driver, the 'default_win' element in the platform data is removed
and the lcd panel video timing values are moved out of individual window
configuration data.
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: JeongHyeon Kim <jhkim@insignal.co.kr>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/mach-exynos/mach-nuri.c | 26 ++++++++------
arch/arm/mach-exynos/mach-origen.c | 24 +++++++-----
arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++++++------
arch/arm/mach-exynos/mach-universal_c210.c | 26 ++++++++------
arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 ++++++++------
arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++++++------
arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++++++------
arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++++++-----
arch/arm/mach-s3c64xx/mach-mini6410.c | 54 ++++++++++++++++-----------
arch/arm/mach-s3c64xx/mach-real6410.c | 52 +++++++++++++++-----------
arch/arm/mach-s3c64xx/mach-smartq5.c | 26 ++++++++------
arch/arm/mach-s3c64xx/mach-smartq7.c | 26 ++++++++------
arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++++++------
arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++++++-----
arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++++++-----
arch/arm/mach-s5pc100/mach-smdkc100.c | 27 ++++++++------
arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++++++----------
arch/arm/mach-s5pv210/mach-goni.c | 26 ++++++++------
arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++++++-----
19 files changed, 311 insertions(+), 238 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 7ac81ce..a7e6731 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -212,25 +212,29 @@ static struct platform_device nuri_gpio_keys = {
/* Frame Buffer */
static struct s3c_fb_pd_win nuri_fb_win0 = {
- .win_mode = {
- .left_margin = 64,
- .right_margin = 16,
- .upper_margin = 64,
- .lower_margin = 1,
- .hsync_len = 48,
- .vsync_len = 3,
- .xres = 1024,
- .yres = 600,
- .refresh = 60,
- },
.max_bpp = 24,
.default_bpp = 16,
+ .xres = 1024,
+ .yres = 600,
.virtual_x = 1024,
.virtual_y = 2 * 600,
};
+static struct fb_videomode nuri_lcd_timing = {
+ .left_margin = 64,
+ .right_margin = 16,
+ .upper_margin = 64,
+ .lower_margin = 1,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .xres = 1024,
+ .yres = 600,
+ .refresh = 60,
+};
+
static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
.win[0] = &nuri_fb_win0,
+ .vtiming = &nuri_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 25c9b46..de71237 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -583,22 +583,26 @@ static struct platform_device origen_lcd_hv070wsa = {
};
static struct s3c_fb_pd_win origen_fb_win0 = {
- .win_mode = {
- .left_margin = 64,
- .right_margin = 16,
- .upper_margin = 64,
- .lower_margin = 16,
- .hsync_len = 48,
- .vsync_len = 3,
- .xres = 1024,
- .yres = 600,
- },
+ .xres = 1024,
+ .yres = 600,
.max_bpp = 32,
.default_bpp = 24,
};
+static struct fb_videomode origen_lcd_timing = {
+ .left_margin = 64,
+ .right_margin = 16,
+ .upper_margin = 64,
+ .lower_margin = 16,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .xres = 1024,
+ .yres = 600,
+};
+
static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
.win[0] = &origen_fb_win0,
+ .vtiming = &origen_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
VIDCON1_INV_VCLK,
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index f08529f..6c00fa6 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -157,22 +157,26 @@ static struct platform_device smdkv310_lcd_lte480wv = {
};
static struct s3c_fb_pd_win smdkv310_fb_win0 = {
- .win_mode = {
- .left_margin = 13,
- .right_margin = 8,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
- .max_bpp = 32,
- .default_bpp = 24,
+ .max_bpp = 32,
+ .default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkv310_lcd_timing = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
.win[0] = &smdkv310_fb_win0,
+ .vtiming = &smdkv310_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 57e4418..67a9547 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -813,25 +813,29 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win universal_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 2,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 1,
- .xres = 480,
- .yres = 800,
- .refresh = 55,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
.virtual_x = 480,
.virtual_y = 2 * 800,
};
+static struct fb_videomode universal_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 2,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 800,
+ .refresh = 55,
+};
+
static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
.win[0] = &universal_fb_win0,
+ .vtiming = &universal_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index 30a44f8..c3100a0 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -148,23 +148,25 @@ static struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
static struct s3c_fb_pd_win smdk2416_fb_win[] = {
[0] = {
- /* think this is the same as the smdk6410 */
- .win_mode = {
- .pixclock = 41094,
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.default_bpp = 16,
.max_bpp = 32,
+ .xres = 800,
+ .yres = 480,
},
};
+static struct fb_videomode smdk2416_lcd_timing = {
+ .pixclock = 41094,
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+};
+
static void s3c2416_fb_gpio_setup_24bpp(void)
{
unsigned int gpio;
@@ -187,6 +189,7 @@ static void s3c2416_fb_gpio_setup_24bpp(void)
static struct s3c_fb_platdata smdk2416_fb_platdata = {
.win[0] = &smdk2416_fb_win[0],
+ .vtiming = &smdk2416_lcd_timing,
.setup_gpio = s3c2416_fb_gpio_setup_24bpp,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index b86f277..58fd0e3 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -134,24 +134,27 @@ static struct platform_device anw6410_lcd_powerdev = {
};
static struct s3c_fb_pd_win anw6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode anw6410_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &anw6410_lcd_timing,
.win[0] = &anw6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index e20bf58..c1ef57e 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -151,26 +151,29 @@ static struct platform_device crag6410_lcd_powerdev = {
/* 640x480 URT */
static struct s3c_fb_pd_win crag6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 150,
- .right_margin = 80,
- .upper_margin = 40,
- .lower_margin = 5,
- .hsync_len = 40,
- .vsync_len = 5,
- .xres = 640,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 640,
+ .yres = 480,
.virtual_y = 480 * 2,
.virtual_x = 640,
};
+static struct fb_videomode crag6410_lcd_timing = {
+ .left_margin = 150,
+ .right_margin = 80,
+ .upper_margin = 40,
+ .lower_margin = 5,
+ .hsync_len = 40,
+ .vsync_len = 5,
+ .xres = 640,
+ .yres = 480,
+};
+
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &crag6410_lcd_timing,
.win[0] = &crag6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 521e07b..4e9b1ac 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -129,23 +129,27 @@ static struct platform_device hmt_backlight_device = {
};
static struct s3c_fb_pd_win hmt_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode hmt_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata hmt_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &hmt_lcd_timing,
.win[0] = &hmt_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 34f5195..2f425d5 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -152,43 +152,53 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
};
static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 272,
+};
+
+static struct fb_videomode mini6410_lcd_type0_timing = {
+ /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 272,
};
static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode mini6410_lcd_type1_timing = {
+ /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
{
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &mini6410_lcd_type0_timing,
.win[0] = &mini6410_lcd_type0_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
}, {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &mini6410_lcd_type1_timing,
.win[0] = &mini6410_lcd_type1_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
@@ -316,8 +326,8 @@ static void __init mini6410_machine_init(void)
mini6410_parse_features(&features, mini6410_features_str);
printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
- mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
- mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
+ mini6410_lcd_pdata[features.lcd_index].win[0]->xres,
+ mini6410_lcd_pdata[features.lcd_index].win[0]->yres);
s3c_nand_set_platdata(&mini6410_nand_info);
s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 21f91e5..0fbd32c 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -118,43 +118,51 @@ static struct platform_device real6410_device_eth = {
};
static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
- .win_mode = { /* 4.3" 480x272 */
- .left_margin = 3,
- .right_margin = 2,
- .upper_margin = 1,
- .lower_margin = 1,
- .hsync_len = 40,
- .vsync_len = 1,
- .xres = 480,
- .yres = 272,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 272,
+};
+
+static struct fb_videomode real6410_lcd_type0_timing = {
+ /* 4.3" 480x272 */
+ .left_margin = 3,
+ .right_margin = 2,
+ .upper_margin = 1,
+ .lower_margin = 1,
+ .hsync_len = 40,
+ .vsync_len = 1,
};
static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
- .win_mode = { /* 7.0" 800x480 */
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode real6410_lcd_type1_timing = {
+ /* 7.0" 800x480 */
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
{
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &real6410_lcd_type0_timing,
.win[0] = &real6410_lcd_type0_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
}, {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &real6410_lcd_type1_timing,
.win[0] = &real6410_lcd_type1_fb_win,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
@@ -297,8 +305,8 @@ static void __init real6410_machine_init(void)
real6410_parse_features(&features, real6410_features_str);
printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
- real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
- real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
+ real6410_lcd_pdata[features.lcd_index].win[0]->xres,
+ real6410_lcd_pdata[features.lcd_index].win[0]->yres);
s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
s3c_nand_set_platdata(&real6410_nand_info);
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 3f42431..03a2f88 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -108,23 +108,27 @@ static struct platform_device smartq5_buttons_device = {
};
static struct s3c_fb_pd_win smartq5_fb_win0 = {
- .win_mode = {
- .left_margin = 216,
- .right_margin = 40,
- .upper_margin = 35,
- .lower_margin = 10,
- .hsync_len = 1,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smartq5_lcd_timing = {
+ .left_margin = 216,
+ .right_margin = 40,
+ .upper_margin = 35,
+ .lower_margin = 10,
+ .hsync_len = 1,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smartq5_lcd_timing,
.win[0] = &smartq5_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index e5c09b6..4e3b038 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -124,23 +124,27 @@ static struct platform_device smartq7_buttons_device = {
};
static struct s3c_fb_pd_win smartq7_fb_win0 = {
- .win_mode = {
- .left_margin = 3,
- .right_margin = 5,
- .upper_margin = 1,
- .lower_margin = 20,
- .hsync_len = 10,
- .vsync_len = 3,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smartq7_lcd_timing = {
+ .left_margin = 3,
+ .right_margin = 5,
+ .upper_margin = 1,
+ .lower_margin = 20,
+ .hsync_len = 10,
+ .vsync_len = 3,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smartq7_lcd_timing,
.win[0] = &smartq7_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index d55bc96..3cfc90f 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -146,26 +146,29 @@ static struct platform_device smdk6410_lcd_powerdev = {
};
static struct s3c_fb_pd_win smdk6410_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
.virtual_y = 480 * 2,
.virtual_x = 800,
};
+static struct fb_videomode smdk6410_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+};
+
/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
.setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
+ .vtiming = &smdk6410_lcd_timing,
.win[0] = &smdk6410_fb_win0,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index a40e325..92fefad 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -103,22 +103,26 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdk6440_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdk6440_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
.win[0] = &smdk6440_fb_win0,
+ .vtiming = &smdk6440_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index efb69e2..e2335ec 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -121,22 +121,26 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdk6450_fb_win0 = {
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdk6450_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
.win[0] = &smdk6450_fb_win0,
+ .vtiming = &smdk6450_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 674d229..0c3ae38 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -136,24 +136,27 @@ static struct platform_device smdkc100_lcd_powerdev = {
/* Frame Buffer */
static struct s3c_fb_pd_win smdkc100_fb_win0 = {
- /* this is to ensure we use win0 */
- .win_mode = {
- .left_margin = 8,
- .right_margin = 13,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- .refresh = 80,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkc100_lcd_timing = {
+ .left_margin = 8,
+ .right_margin = 13,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
+ .refresh = 80,
};
static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
.win[0] = &smdkc100_fb_win0,
+ .vtiming = &smdkc100_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5pc100_fb_gpio_setup_24bpp,
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index a9ea64e..7b91bbf 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -96,38 +96,34 @@ static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win aquila_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 3,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 2,
- .xres = 480,
- .yres = 800,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
};
static struct s3c_fb_pd_win aquila_fb_win1 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 3,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 2,
- .xres = 480,
- .yres = 800,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
+};
+
+static struct fb_videomode aquila_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 3,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 2,
+ .xres = 480,
+ .yres = 800,
};
static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
.win[0] = &aquila_fb_win0,
.win[1] = &aquila_fb_win1,
+ .vtiming = &aquila_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 2cf5ed7..07a840d 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -105,25 +105,29 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
/* Frame Buffer */
static struct s3c_fb_pd_win goni_fb_win0 = {
- .win_mode = {
- .left_margin = 16,
- .right_margin = 16,
- .upper_margin = 2,
- .lower_margin = 28,
- .hsync_len = 2,
- .vsync_len = 1,
- .xres = 480,
- .yres = 800,
- .refresh = 55,
- },
.max_bpp = 32,
.default_bpp = 16,
+ .xres = 480,
+ .yres = 800,
.virtual_x = 480,
.virtual_y = 2 * 800,
};
+static struct fb_videomode goni_lcd_timing = {
+ .left_margin = 16,
+ .right_margin = 16,
+ .upper_margin = 2,
+ .lower_margin = 28,
+ .hsync_len = 2,
+ .vsync_len = 1,
+ .xres = 480,
+ .yres = 800,
+ .refresh = 55,
+};
+
static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.win[0] = &goni_fb_win0,
+ .vtiming = &goni_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
VIDCON0_CLKSEL_LCD,
.vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 91d4ad8..5e0c955 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -189,22 +189,26 @@ static struct platform_device smdkv210_lcd_lte480wv = {
};
static struct s3c_fb_pd_win smdkv210_fb_win0 = {
- .win_mode = {
- .left_margin = 13,
- .right_margin = 8,
- .upper_margin = 7,
- .lower_margin = 5,
- .hsync_len = 3,
- .vsync_len = 1,
- .xres = 800,
- .yres = 480,
- },
.max_bpp = 32,
.default_bpp = 24,
+ .xres = 800,
+ .yres = 480,
+};
+
+static struct fb_videomode smdkv210_lcd_timing = {
+ .left_margin = 13,
+ .right_margin = 8,
+ .upper_margin = 7,
+ .lower_margin = 5,
+ .hsync_len = 3,
+ .vsync_len = 1,
+ .xres = 800,
+ .yres = 480,
};
static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
.win[0] = &smdkv210_fb_win0,
+ .vtiming = &smdkv210_lcd_timing,
.vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
.vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
--
1.6.6.rc2
^ permalink raw reply related
* Re: [PATCH] x86: export 'pcibios_enabled'
From: Wang YanQing @ 2012-03-26 0:27 UTC (permalink / raw)
To: Alan Cox, Florian Tobias Schandinat, H. Peter Anvin, Randy Dunlap,
Stephen Rothwell, linux-next, LKML, Michal Januszewski,
linux-fbdev, x86, Andrew Morton
In-Reply-To: <20120322004135.GA4253@udknight>
On Thu, Mar 22, 2012 at 08:41:35AM +0800, Wang YanQing wrote:
> On Wed, Mar 14, 2012 at 11:21:37AM +0000, Alan Cox wrote:
> > You can use set_memory_x() to mark memory executable (and _nx to set it back).
> >
> NO I can't, if I set_memory_x and don't set pcibios_enabled = 1, then
> static_protections will still failed because pcibios_enabled = 0,
> and I don't want to use set_memory_x, because I don't want to give the user
> of uvesafb that feeling "I will lost BIOS NX protection if I choice uvesafb."
>
> > If you really need to know if NX is being used then the check
> >
> > if (__supported_pte_mask & PTE_NX)
> >
> > will do the trick and the variable is exported.
> I don't understand what do you mean, do you means CONFIG_X86_PAE for 32? Or CONFIG_X86_64?
> when NX is being used, the pci bios is NX or not also depend on
> ACPI.ACPI on or off all will influnce the code path in pci_arch_init,
> decide the set_bios_x have chance to execute or not.See
> https://lkml.org/lkml/2011/11/16/84
>
> By the way _PAGE_NX instead of PTE_NX, right?
>
> > I'd suggest however you wrap that in a cpu_has_nx() type macro somewhere
> > in the arch headers.
> >
> The same above.
>
> > If you go poking around pcibios values you are going to get burned if
> > someone is ever bored enough to make NX and PCIBIOS work together
> > differently.
> >
> Indeed according to 5bd5a452662bc37c54fb6828db1a3faf87e6511c, who bring me
> the trouble, check the pcibios_enabled is the only simple and good way to
> resolve the Oops I meet.
>
> If you really don't want it, and if I am not all wrong about your "helper method",
> you means you want export the below:
> int check_pcibios_enabled()?
> See https://lkml.org/lkml/2012/2/26/124
>
> Thanks.
>
Sorry for the delay reply and cross email threads, Alan Cox.
But I still can't find a better way then to check the pcibios_enabled variable,
any better suggestion?
^ permalink raw reply
* RE: usage of height and width in fb_var_screeninfo
From: Jingoo Han @ 2012-03-26 8:15 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <CAGA24ML642uOP1tEp+VOTe0OZQ9S3HnP8Zi+N1n8X-QsjP9P2w@mail.gmail.com>
On Thu, Mar 22, 2012 at 8:53, Jun Nie <niej0001@gmail.com> wrote:
> Does anyone happen to know the usage of below member in
> fb_var_screeninfo? I do not know whether mm stand for geometry size or
> memory, can not find its usage in any driver neither. We considering
> to use it as zoomed size.
>
> struct fb_var_screeninfo {
> __u32 height; /* height of picture in mm */
> __u32 width; /* width of picture in mm */
>
Yes, right. Both thins are geometry sizes of LCD panel in millimeters.
Some OS platform needs these parameters.
Good luck.
Best regards,
Jingoo Han
^ permalink raw reply
* [PATCH v3 0/2] Add lcd driver for panels with gpio controlled panel reset
From: Thomas Abraham @ 2012-03-26 8:58 UTC (permalink / raw)
To: linux-arm-kernel
Changes since v2:
- Reworked as per comments[1] from Mark Brown.
- removed the setting of regulator voltage.
[1] http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg08743.html
Changes since v1:
- Fixed gpio leak, added MODULE_DEVICE_TABLE and dev_pm_ops.
- Changed device tree bindings.
This patchset adds support for passive panels that use a nRESET line which is
controlled by a GPIO of the host system and which do not use a serial comamnd
interface (i2c or spi) or memory-mapped-io interface. Platforms that do not
require any additional control apart from the nRESET line can use this driver
for lcd power control.
The first patch adds driver for passive raster-type lcd's with gpio controlled
panel reset. It includes support for both dt and non-dt platforms. The second
patch adds support for using this driver on Origen board.
Thomas Abraham (2):
backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset
ARM: Exynos: Use lcd power control driver for lcd panel
.../devicetree/bindings/lcd/lcd-pwrctrl.txt | 36 +++
arch/arm/mach-exynos/mach-origen.c | 29 +--
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/lcd_pwrctrl.c | 226 ++++++++++++++++++++
include/video/lcd_pwrctrl.h | 24 ++
6 files changed, 300 insertions(+), 23 deletions(-)
create mode 100644 Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt
create mode 100644 drivers/video/backlight/lcd_pwrctrl.c
create mode 100644 include/video/lcd_pwrctrl.h
^ permalink raw reply
* [PATCH v3 1/2] backlight: lcd: add driver for raster-type lcd's with gpio controlled panel reset
From: Thomas Abraham @ 2012-03-26 8:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1332751600-11371-1-git-send-email-thomas.abraham@linaro.org>
Add a lcd panel driver for simple raster-type lcd's which uses a gpio
controlled panel reset. The driver controls the nRESET line of the panel
using a gpio connected from the host system. The Vcc supply to the panel
is (optionally) controlled using a voltage regulator. This driver excludes
support for lcd panels that use a serial command interface or direct
memory mapped IO interface.
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
.../devicetree/bindings/lcd/lcd-pwrctrl.txt | 36 +++
drivers/video/backlight/Kconfig | 7 +
drivers/video/backlight/Makefile | 1 +
drivers/video/backlight/lcd_pwrctrl.c | 226 ++++++++++++++++++++
include/video/lcd_pwrctrl.h | 24 ++
5 files changed, 294 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt
create mode 100644 drivers/video/backlight/lcd_pwrctrl.c
create mode 100644 include/video/lcd_pwrctrl.h
diff --git a/Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt b/Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt
new file mode 100644
index 0000000..22604a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/lcd/lcd-pwrctrl.txt
@@ -0,0 +1,36 @@
+* Power controller for simple lcd panels
+
+Some LCD panels provide a simple control interface for the host system. The
+control mechanism would include a nRESET line connected to a gpio of the host
+system and a Vcc supply line which the host can optionally be controlled using
+a voltage regulator. Such simple panels do not support serial command
+interface (such as i2c or spi) or memory-mapped-io interface.
+
+Required properties:
+- compatible: should be 'lcd-powercontrol'
+
+- lcd-reset-gpio: The GPIO number of the host system used to control the
+ nRESET line. The format of the gpio specifier depends on the gpio controller
+ of the host system.
+
+Optional properties:
+- lcd-reset-active-high: When the nRESET line is asserted low, the lcd panel
+ is reset and stays in reset mode as long as the nRESET line is asserted low.
+ This is the default behaviour of most lcd panels. If a lcd panel requires the
+ nRESET line to be asserted high for panel reset, then this property is used.
+ Note: Some platforms might allow inverting the polarity of the gpio output
+ in the 'lcd-reset-gpio' gpio specifier. On such platforms, if the polarity
+ is used to control the output of the gpio, then this property should not be
+ used.
+
+- vcc-lcd-supply: phandle of the regulator that controls the vcc supply to
+ the lcd panel.
+
+Example:
+
+ lcd_pwrctrl {
+ compatible = "lcd-powercontrol";
+ lcd-reset-gpio = <&gpe0 4 1 0 0>;
+ lcd-reset-active-high;
+ lcd-vcc-supply = <®ulator7>;
+ };
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 681b369..9b52ea8 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -86,6 +86,13 @@ config LCD_PLATFORM
This driver provides a platform-device registered LCD power
control interface.
+config LCD_PWRCTRL
+ tristate "LCD panel power control"
+ help
+ Say y here, if you have a lcd panel that allows reset and vcc to be
+ controlled by the host system, and which does not use a serial command
+ interface (such as i2c or spi) or memory-mapped-io interface.
+
config LCD_TOSA
tristate "Sharp SL-6000 LCD Driver"
depends on SPI && MACH_TOSA
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index af5cf65..d85c8d2 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_LCD_LMS283GF05) += lms283gf05.o
obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o
obj-$(CONFIG_LCD_ILI9320) += ili9320.o
obj-$(CONFIG_LCD_PLATFORM) += platform_lcd.o
+obj-$(CONFIG_LCD_PWRCTRL) += lcd_pwrctrl.o
obj-$(CONFIG_LCD_VGG2432A4) += vgg2432a4.o
obj-$(CONFIG_LCD_TDO24M) += tdo24m.o
obj-$(CONFIG_LCD_TOSA) += tosa_lcd.o
diff --git a/drivers/video/backlight/lcd_pwrctrl.c b/drivers/video/backlight/lcd_pwrctrl.c
new file mode 100644
index 0000000..917d842
--- /dev/null
+++ b/drivers/video/backlight/lcd_pwrctrl.c
@@ -0,0 +1,226 @@
+/*
+ * Simple lcd panel power control driver.
+ *
+ * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011-2012 Linaro Ltd.
+ *
+ * This driver is for controlling power for raster type lcd panels that requires
+ * its nRESET interface line to be connected and controlled by a GPIO of the
+ * host system and the Vcc line controlled by a voltage regulator. This
+ * excludes support for lcd panels that use a serial command interface or direct
+ * memory mapped IO interface.
+ *
+ * The nRESET interface line of the panel should be connected to a gpio of the
+ * host system. The Vcc pin is controlled using a external volatage regulator.
+ * Panel backlight is not controlled by this driver.
+ *
+ * This driver is derived from platform-lcd.c which was written by
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * 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/module.h>
+#include <linux/platform_device.h>
+#include <linux/fb.h>
+#include <linux/lcd.h>
+#include <linux/gpio.h>
+#include <linux/of.h>
+#include <linux/of_gpio.h>
+#include <linux/regulator/consumer.h>
+#include <video/lcd_pwrctrl.h>
+
+struct lcd_pwrctrl {
+ struct device *dev;
+ struct lcd_device *lcd;
+ struct lcd_pwrctrl_data *pdata;
+ struct regulator *regulator;
+ unsigned int power;
+ bool suspended;
+ bool pwr_en;
+};
+
+static int lcd_pwrctrl_get_power(struct lcd_device *lcd)
+{
+ struct lcd_pwrctrl *lp = lcd_get_data(lcd);
+ return lp->power;
+}
+
+static int lcd_pwrctrl_set_power(struct lcd_device *lcd, int power)
+{
+ struct lcd_pwrctrl *lp = lcd_get_data(lcd);
+ struct lcd_pwrctrl_data *pd = lp->pdata;
+ bool lcd_enable;
+ int lcd_reset, ret = 0;
+
+ lcd_enable = (power = FB_BLANK_POWERDOWN || lp->suspended) ? 0 : 1;
+ lcd_reset = (pd->invert) ? !lcd_enable : lcd_enable;
+
+ if (lp->pwr_en = lcd_enable)
+ return 0;
+
+ if (!IS_ERR_OR_NULL(lp->regulator)) {
+ if (lcd_enable) {
+ if (regulator_enable(lp->regulator)) {
+ dev_info(lp->dev, "regulator enable failed\n");
+ ret = -EPERM;
+ }
+ } else {
+ if (regulator_disable(lp->regulator)) {
+ dev_info(lp->dev, "regulator disable failed\n");
+ ret = -EPERM;
+ }
+ }
+ }
+
+ gpio_direction_output(lp->pdata->gpio, lcd_reset);
+ lp->power = power;
+ lp->pwr_en = lcd_enable;
+ return ret;
+}
+
+static int lcd_pwrctrl_check_fb(struct lcd_device *lcd, struct fb_info *info)
+{
+ struct lcd_pwrctrl *lp = lcd_get_data(lcd);
+ return lp->dev->parent = info->device;
+}
+
+static struct lcd_ops lcd_pwrctrl_ops = {
+ .get_power = lcd_pwrctrl_get_power,
+ .set_power = lcd_pwrctrl_set_power,
+ .check_fb = lcd_pwrctrl_check_fb,
+};
+
+#ifdef CONFIG_OF
+static void __devinit lcd_pwrctrl_parse_dt(struct device *dev,
+ struct lcd_pwrctrl_data *pdata)
+{
+ struct device_node *np = dev->of_node;
+
+ pdata->gpio = of_get_named_gpio(np, "lcd-reset-gpio", 0);
+ if (of_get_property(np, "lcd-reset-active-high", NULL))
+ pdata->invert = true;
+}
+#endif
+
+static int __devinit lcd_pwrctrl_probe(struct platform_device *pdev)
+{
+ struct lcd_pwrctrl *lp;
+ struct lcd_pwrctrl_data *pdata = pdev->dev.platform_data;
+ struct device *dev = &pdev->dev;
+ int err;
+
+#ifdef CONFIG_OF
+ if (dev->of_node) {
+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
+ if (!pdata) {
+ dev_err(dev, "memory allocation for pdata failed\n");
+ return -ENOMEM;
+ }
+ lcd_pwrctrl_parse_dt(dev, pdata);
+ }
+#endif
+
+ if (!pdata) {
+ dev_err(dev, "platform data not available\n");
+ return -EINVAL;
+ }
+
+ lp = devm_kzalloc(dev, sizeof(struct lcd_pwrctrl), GFP_KERNEL);
+ if (!lp) {
+ dev_err(dev, "memory allocation failed for private data\n");
+ return -ENOMEM;
+ }
+
+ err = gpio_request(pdata->gpio, "LCD-nRESET");
+ if (err) {
+ dev_err(dev, "gpio [%d] request failed\n", pdata->gpio);
+ return err;
+ }
+
+ /*
+ * If power to lcd and/or lcd interface is controlled using a regulator,
+ * get the handle to the regulator for later use during power switching.
+ */
+ lp->regulator = devm_regulator_get(dev, "vcc-lcd");
+ if (IS_ERR(lp->regulator))
+ dev_info(dev, "could not find regulator\n");
+
+ lp->dev = dev;
+ lp->pdata = pdata;
+ lp->lcd = lcd_device_register(dev_name(dev), dev, lp, &lcd_pwrctrl_ops);
+ if (IS_ERR(lp->lcd)) {
+ dev_err(dev, "cannot register lcd device\n");
+ gpio_free(pdata->gpio);
+ return PTR_ERR(lp->lcd);
+ }
+
+ platform_set_drvdata(pdev, lp);
+ lcd_pwrctrl_set_power(lp->lcd, FB_BLANK_NORMAL);
+ return 0;
+}
+
+static int __devexit lcd_pwrctrl_remove(struct platform_device *pdev)
+{
+ struct lcd_pwrctrl *lp = platform_get_drvdata(pdev);
+ lcd_device_unregister(lp->lcd);
+ gpio_free(lp->pdata->gpio);
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int lcd_pwrctrl_suspend(struct device *dev)
+{
+ struct lcd_pwrctrl *lp = dev_get_drvdata(dev);
+
+ lp->suspended = true;
+ lcd_pwrctrl_set_power(lp->lcd, FB_BLANK_POWERDOWN);
+ return 0;
+}
+
+static int lcd_pwrctrl_resume(struct device *dev)
+{
+ struct lcd_pwrctrl *lp = dev_get_drvdata(dev);
+
+ lp->suspended = false;
+ lcd_pwrctrl_set_power(lp->lcd, FB_BLANK_UNBLANK);
+ return 0;
+}
+
+static const struct dev_pm_ops lcd_pwrctrl_dev_pm_ops = {
+ .suspend = lcd_pwrctrl_suspend,
+ .resume = lcd_pwrctrl_resume,
+};
+
+#define LCD_PWRCTRL_DEV_PM_OPS (&lcd_pwrctrl_dev_pm_ops)
+#else
+#define LCD_PWRCTRL_DEV_PM_OPS NULL
+#endif /* CONFIG_PM */
+
+#ifdef CONFIG_OF
+static const struct of_device_id lcd_pwrctrl_match[] = {
+ { .compatible = "lcd-powercontrol", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, lcd_pwrctrl_match);
+#endif
+
+static struct platform_driver lcd_pwrctrl_driver = {
+ .driver = {
+ .name = "lcd-pwrctrl",
+ .owner = THIS_MODULE,
+ .pm = LCD_PWRCTRL_DEV_PM_OPS,
+ .of_match_table = of_match_ptr(lcd_pwrctrl_match),
+ },
+ .probe = lcd_pwrctrl_probe,
+ .remove = lcd_pwrctrl_remove,
+};
+
+module_platform_driver(lcd_pwrctrl_driver);
+
+MODULE_AUTHOR("Thomas Abraham <thomas.ab@samsung.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:lcd-pwrctrl");
diff --git a/include/video/lcd_pwrctrl.h b/include/video/lcd_pwrctrl.h
new file mode 100644
index 0000000..924bfd2
--- /dev/null
+++ b/include/video/lcd_pwrctrl.h
@@ -0,0 +1,24 @@
+/*
+ * Simple lcd panel power control driver.
+ *
+ * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011-2012 Linaro Ltd.
+ *
+ * This driver is derived from platform-lcd.h which was written by
+ * Ben Dooks <ben@simtec.co.uk>
+ *
+ * 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.
+ *
+*/
+
+/**
+ * struct lcd_pwrctrl_data - platform data for lcd_pwrctrl driver.
+ * @gpio: GPIO number of the host system that connects to nRESET line.
+ * @invert: True, if output of gpio connected to nRESET should be inverted.
+ */
+struct lcd_pwrctrl_data {
+ int gpio;
+ bool invert;
+};
--
1.6.6.rc2
^ permalink raw reply related
* [PATCH v3 2/2] ARM: Exynos: Use lcd power control driver for lcd panel
From: Thomas Abraham @ 2012-03-26 8:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1332751600-11371-1-git-send-email-thomas.abraham@linaro.org>
The Hydis hv070wsa lcd panel used with the Origen board uses a gpio
for reset and the Vcc supply to the panel can be controlled using
a voltage regulator. Switch to using the lcd power control driver
for controlling the power to the lcd panel.
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
arch/arm/mach-exynos/mach-origen.c | 29 ++++++-----------------------
1 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index d3b2e9d..6c4997c 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -26,7 +26,7 @@
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
-#include <video/platform_lcd.h>
+#include <video/lcd_pwrctrl.h>
#include <plat/regs-serial.h>
#include <plat/regs-fb-v4.h>
@@ -129,7 +129,7 @@ static struct regulator_consumer_supply __initdata buck3_consumer[] = {
REGULATOR_SUPPLY("vdd_g3d", "mali_drm"), /* G3D */
};
static struct regulator_consumer_supply __initdata buck7_consumer[] = {
- REGULATOR_SUPPLY("vcc", "platform-lcd"), /* LCD */
+ REGULATOR_SUPPLY("vcc-lcd", "lcd-pwrctrl.0"), /* LCD */
};
static struct regulator_init_data __initdata max8997_ldo1_data = {
@@ -384,7 +384,7 @@ static struct regulator_init_data __initdata max8997_buck7_data = {
.name = "VDD_LCD_3.3V",
.min_uV = 3300000,
.max_uV = 3300000,
- .boot_on = 1,
+ .boot_on = 0,
.apply_uV = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
@@ -553,29 +553,12 @@ static struct platform_device origen_device_gpiokeys = {
},
};
-static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power)
-{
- int ret;
-
- if (power)
- ret = gpio_request_one(EXYNOS4_GPE3(4),
- GPIOF_OUT_INIT_HIGH, "GPE3_4");
- else
- ret = gpio_request_one(EXYNOS4_GPE3(4),
- GPIOF_OUT_INIT_LOW, "GPE3_4");
-
- gpio_free(EXYNOS4_GPE3(4));
-
- if (ret)
- pr_err("failed to request gpio for LCD power: %d\n", ret);
-}
-
-static struct plat_lcd_data origen_lcd_hv070wsa_data = {
- .set_power = lcd_hv070wsa_set_power,
+static struct lcd_pwrctrl_data origen_lcd_hv070wsa_data = {
+ .gpio = EXYNOS4_GPE3(4),
};
static struct platform_device origen_lcd_hv070wsa = {
- .name = "platform-lcd",
+ .name = "lcd-pwrctrl",
.dev.parent = &s5p_device_fimd0.dev,
.dev.platform_data = &origen_lcd_hv070wsa_data,
};
--
1.6.6.rc2
^ permalink raw reply related
* [PATCH] video/console: Clip the right margin clear to the visible region
From: Chris Wilson @ 2012-03-26 20:17 UTC (permalink / raw)
To: linux-fbdev; +Cc: linux-kernel, Chris Wilson, Florian Tobias Schandinat
For some unknown reason, yres_virtual was 2x larger the the size specified
by i915 and so when blit_clear_margins() tried to clear the full virtual
right-hand margin it tried to write far beyond the end of the buffer.
This limits the clear to only the visible portion of the right-hand
margin, similar to how the bottom margin is treated.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id8138
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/video/console/bitblit.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index 28b1a83..9f89e5a 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -219,9 +219,9 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
if (rw && !bottom_only) {
region.dx = info->var.xoffset + rs;
- region.dy = 0;
+ region.dy = info->var.yoffset;
region.width = rw;
- region.height = info->var.yres_virtual;
+ region.height = info->var.yres;
info->fbops->fb_fillrect(info, ®ion);
}
--
1.7.9.1
^ permalink raw reply related
* [PATCH] video: pxa3xx-gcu: Simplify the logic to exit while loop in pxa3xx_gcu_wait_idle
From: Axel Lin @ 2012-03-27 3:15 UTC (permalink / raw)
To: linux-kernel
Cc: Daniel Mack, Sven Neumann, Janine Kropp, Denis Oliver Kropp,
Florian Tobias Schandinat, linux-fbdev
If wait_event_interruptible_timeout returns a positive value, it means
the condition evaluated is true. Which means priv->shared->hw_running is false.
And then we will exit the loop.
This patch simplifies the logic to exit the while loop.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/video/pxa3xx-gcu.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c
index 1d71c08..0b4ae0c 100644
--- a/drivers/video/pxa3xx-gcu.c
+++ b/drivers/video/pxa3xx-gcu.c
@@ -316,12 +316,9 @@ pxa3xx_gcu_wait_idle(struct pxa3xx_gcu_priv *priv)
ret = wait_event_interruptible_timeout(priv->wait_idle,
!priv->shared->hw_running, HZ*4);
- if (ret < 0)
+ if (ret != 0)
break;
- if (ret > 0)
- continue;
-
if (gc_readl(priv, REG_GCRBEXHR) = rbexhr &&
priv->shared->num_interrupts = num) {
QERROR("TIMEOUT");
--
1.7.5.4
^ permalink raw reply related
* [PATCH] video:uvesafb: Fix oops that uvesafb try to execute NX-protected page
From: Wang YanQing @ 2012-03-27 10:01 UTC (permalink / raw)
To: FlorianSchandinat; +Cc: linux-fbdev, linux-kernel, spock
In-Reply-To: <20120302004850.GA4139@udknight>
Ok! I try to check pcibios_enabled first, but get some opposition by Alan Cox,
but I want to make thing work and fix the oops, so I choice the simple way to
check the (__supported_pte_mask & _PAGE_NX) instead of to check this variable plus
pci kernel boot parameter, pci mmconfig works or not, and more, and more. It is not
the best method, but it works and maybe all will feel happy.
Signed-off-by: Wang YanQing <udknight@gmail.com>
---
drivers/video/uvesafb.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 260cca7..26e83d7 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -815,8 +815,15 @@ static int __devinit uvesafb_vbe_init(struct fb_info *info)
par->pmi_setpal = pmi_setpal;
par->ypan = ypan;
- if (par->pmi_setpal || par->ypan)
- uvesafb_vbe_getpmi(task, par);
+ if (par->pmi_setpal || par->ypan) {
+ if (__supported_pte_mask & _PAGE_NX) {
+ par->pmi_setpal = par->ypan = 0;
+ printk(KERN_WARNING "uvesafb: NX protection is actively."
+ "We have better not to use the PMI.\n");
+ } else {
+ uvesafb_vbe_getpmi(task, par);
+ }
+ }
#else
/* The protected mode interface is not available on non-x86. */
par->pmi_setpal = par->ypan = 0;
--
1.7.9.2.315.g25a78
^ permalink raw reply related
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Tomi Valkeinen @ 2012-03-27 10:43 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332323516-9050-1-git-send-email-cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 9900 bytes --]
Hi,
On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
> and timing related limitations leading to SYNCLOST errors. Whenever the image
> window is moved towards the right of the screen SYNCLOST errors become
> frequent. Checks have been implemented to see that DISPC driver rejects
> configuration exceeding above limitations.
>
> This code was successfully tested on OMAP3. This code is written based on code
> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
> timing and DISPC horizontal blanking length limitations.
>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
> 1 files changed, 72 insertions(+), 25 deletions(-)
The patch seems to be using dos line endings... Where did they come
from? The two others are fine. I think git am removed the dos line
endings, so it's fine.
Tomi
ERROR: DOS line endings
#72: FILE: drivers/video/omap2/dss/dispc.c:1625:
+static int check_horiz_timing(enum omap_channel channel, u16 pos_x,^M$
ERROR: DOS line endings
#73: FILE: drivers/video/omap2/dss/dispc.c:1626:
+^I^Iu16 width, u16 height, u16 out_width, u16 out_height)^M$
ERROR: DOS line endings
#74: FILE: drivers/video/omap2/dss/dispc.c:1627:
+{^M$
ERROR: DOS line endings
#75: FILE: drivers/video/omap2/dss/dispc.c:1628:
+^Iint DS = DIV_ROUND_UP(height, out_height);^M$
ERROR: DOS line endings
#76: FILE: drivers/video/omap2/dss/dispc.c:1629:
+^Istruct omap_dss_device *dssdev = dispc_mgr_get_device(channel);^M$
ERROR: DOS line endings
#77: FILE: drivers/video/omap2/dss/dispc.c:1630:
+^Istruct omap_video_timings t = dssdev->panel.timings;^M$
ERROR: DOS line endings
#78: FILE: drivers/video/omap2/dss/dispc.c:1631:
+^Iunsigned long nonactive, lclk, pclk;^M$
ERROR: DOS line endings
#79: FILE: drivers/video/omap2/dss/dispc.c:1632:
+^Istatic const u8 limits[3] = { 8, 10, 20 };^M$
ERROR: DOS line endings
#80: FILE: drivers/video/omap2/dss/dispc.c:1633:
+^Iu64 val, blank;^M$
ERROR: DOS line endings
#81: FILE: drivers/video/omap2/dss/dispc.c:1634:
+^Iint i;^M$
ERROR: DOS line endings
#82: FILE: drivers/video/omap2/dss/dispc.c:1635:
+^M$
ERROR: DOS line endings
#83: FILE: drivers/video/omap2/dss/dispc.c:1636:
+^Inonactive = t.x_res + t.hfp + t.hsw + t.hbp - out_width;^M$
ERROR: DOS line endings
#84: FILE: drivers/video/omap2/dss/dispc.c:1637:
+^Ipclk = dispc_mgr_pclk_rate(channel);^M$
ERROR: DOS line endings
#85: FILE: drivers/video/omap2/dss/dispc.c:1638:
+^Ilclk = dispc_mgr_lclk_rate(channel);^M$
ERROR: DOS line endings
#86: FILE: drivers/video/omap2/dss/dispc.c:1639:
+^M$
ERROR: DOS line endings
#87: FILE: drivers/video/omap2/dss/dispc.c:1640:
+^Ii = 0;^M$
ERROR: DOS line endings
#88: FILE: drivers/video/omap2/dss/dispc.c:1641:
+^Iif (out_height < height)^M$
ERROR: DOS line endings
#89: FILE: drivers/video/omap2/dss/dispc.c:1642:
+^I^Ii++;^M$
ERROR: DOS line endings
#90: FILE: drivers/video/omap2/dss/dispc.c:1643:
+^Iif (out_width < width)^M$
ERROR: DOS line endings
#91: FILE: drivers/video/omap2/dss/dispc.c:1644:
+^I^Ii++;^M$
ERROR: DOS line endings
#92: FILE: drivers/video/omap2/dss/dispc.c:1645:
+^Iblank = div_u64((u64)(t.hbp + t.hsw + t.hfp) * lclk, pclk);^M$
ERROR: DOS line endings
#93: FILE: drivers/video/omap2/dss/dispc.c:1646:
+^IDSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank,
limits[i]);^M$
WARNING: line over 80 characters
#93: FILE: drivers/video/omap2/dss/dispc.c:1646:
+ DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank,
limits[i]);
ERROR: DOS line endings
#94: FILE: drivers/video/omap2/dss/dispc.c:1647:
+^Iif (blank <= limits[i])^M$
ERROR: DOS line endings
#95: FILE: drivers/video/omap2/dss/dispc.c:1648:
+^I^Ireturn -EINVAL;^M$
ERROR: DOS line endings
#96: FILE: drivers/video/omap2/dss/dispc.c:1649:
+^M$
ERROR: trailing whitespace
#97: FILE: drivers/video/omap2/dss/dispc.c:1650:
+^I/*^M$
ERROR: trailing whitespace
#98: FILE: drivers/video/omap2/dss/dispc.c:1651:
+^I * Pixel data should be prepared before visible display point
starts.^M$
ERROR: trailing whitespace
#99: FILE: drivers/video/omap2/dss/dispc.c:1652:
+^I * So, atleast DS-2 lines must have already been fetched by DISPC^M$
ERROR: trailing whitespace
#100: FILE: drivers/video/omap2/dss/dispc.c:1653:
+^I * during nonactive - pos_x period.^M$
ERROR: DOS line endings
#101: FILE: drivers/video/omap2/dss/dispc.c:1654:
+^I */^M$
ERROR: DOS line endings
#102: FILE: drivers/video/omap2/dss/dispc.c:1655:
+^Ival = div_u64((u64)(nonactive - pos_x) * lclk, pclk);^M$
ERROR: DOS line endings
#103: FILE: drivers/video/omap2/dss/dispc.c:1656:
+^IDSSDBG("(nonactive - pos_x) * pcd = %llu,"^M$
ERROR: DOS line endings
#104: FILE: drivers/video/omap2/dss/dispc.c:1657:
+^I^I" max(0, DS - 2) * width = %d\n",^M$
ERROR: DOS line endings
#105: FILE: drivers/video/omap2/dss/dispc.c:1658:
+^I^Ival, max(0, DS - 2) * width);^M$
ERROR: DOS line endings
#106: FILE: drivers/video/omap2/dss/dispc.c:1659:
+^Iif (val < max(0, DS - 2) * width)^M$
ERROR: DOS line endings
#107: FILE: drivers/video/omap2/dss/dispc.c:1660:
+^I^Ireturn -EINVAL;^M$
ERROR: DOS line endings
#108: FILE: drivers/video/omap2/dss/dispc.c:1661:
+^M$
ERROR: trailing whitespace
#109: FILE: drivers/video/omap2/dss/dispc.c:1662:
+^I/*^M$
ERROR: trailing whitespace
#110: FILE: drivers/video/omap2/dss/dispc.c:1663:
+^I * All lines need to be refilled during the nonactive period of
which^M$
ERROR: trailing whitespace
#111: FILE: drivers/video/omap2/dss/dispc.c:1664:
+^I * only one line can be loaded during the active period. So,
atleast^M$
ERROR: trailing whitespace
#112: FILE: drivers/video/omap2/dss/dispc.c:1665:
+^I * DS - 1 lines should be loaded during nonactive period.^M$
ERROR: DOS line endings
#113: FILE: drivers/video/omap2/dss/dispc.c:1666:
+^I */^M$
ERROR: DOS line endings
#114: FILE: drivers/video/omap2/dss/dispc.c:1667:
+^Ival = div_u64((u64)nonactive * lclk, pclk);^M$
ERROR: DOS line endings
#115: FILE: drivers/video/omap2/dss/dispc.c:1668:
+^IDSSDBG("nonactive * pcd = %llu, max(0, DS - 1) * width = %d\n",^M$
ERROR: DOS line endings
#116: FILE: drivers/video/omap2/dss/dispc.c:1669:
+^I^Ival, max(0, DS - 1) * width);^M$
ERROR: DOS line endings
#117: FILE: drivers/video/omap2/dss/dispc.c:1670:
+^Iif (val < max(0, DS - 1) * width)^M$
ERROR: DOS line endings
#118: FILE: drivers/video/omap2/dss/dispc.c:1671:
+^I^Ireturn -EINVAL;^M$
ERROR: DOS line endings
#119: FILE: drivers/video/omap2/dss/dispc.c:1672:
+^M$
ERROR: DOS line endings
#120: FILE: drivers/video/omap2/dss/dispc.c:1673:
+^Ireturn 0;^M$
ERROR: DOS line endings
#121: FILE: drivers/video/omap2/dss/dispc.c:1674:
+}^M$
ERROR: DOS line endings
#122: FILE: drivers/video/omap2/dss/dispc.c:1675:
+^M$
ERROR: DOS line endings
#131: FILE: drivers/video/omap2/dss/dispc.c:1756:
+^I^Iint *x_predecim, int *y_predecim, u16 pos_x)^M$
ERROR: DOS line endings
#139: FILE: drivers/video/omap2/dss/dispc.c:1832:
+^I^I^Ierror = check_horiz_timing(channel, pos_x, in_width,^M$
ERROR: DOS line endings
#140: FILE: drivers/video/omap2/dss/dispc.c:1833:
+^I^I^I^Iin_height, out_width, out_height);^M$
ERROR: DOS line endings
#141: FILE: drivers/video/omap2/dss/dispc.c:1834:
+^M$
ERROR: DOS line endings
#150: FILE: drivers/video/omap2/dss/dispc.c:1842:
+^I^I^Ierror = (error || in_width > maxsinglelinewidth * 2 ||^M$
ERROR: DOS line endings
#158: FILE: drivers/video/omap2/dss/dispc.c:1858:
+^I^Iif (check_horiz_timing(channel, pos_x, width, height,^M$
ERROR: DOS line endings
#159: FILE: drivers/video/omap2/dss/dispc.c:1859:
+^I^I^Iout_width, out_height)){^M$
ERROR: DOS line endings
#160: FILE: drivers/video/omap2/dss/dispc.c:1860:
+^I^I^I^IDSSERR("horizontal timing too tight\n");^M$
ERROR: DOS line endings
#161: FILE: drivers/video/omap2/dss/dispc.c:1861:
+^I^I^I^Ireturn -EINVAL;^M$
ERROR: DOS line endings
#162: FILE: drivers/video/omap2/dss/dispc.c:1862:
+^I^I}^M$
ERROR: DOS line endings
#163: FILE: drivers/video/omap2/dss/dispc.c:1863:
+^M$
ERROR: DOS line endings
#172: FILE: drivers/video/omap2/dss/dispc.c:1964:
+^I^I^I&x_predecim, &y_predecim, oi->pos_x);^M$
ERROR: DOS line endings
#184: FILE: drivers/video/omap2/dss/dispc.c:2535:
+^Iunsigned long r = dispc_fclk_rate();^M$
ERROR: DOS line endings
#187: FILE: drivers/video/omap2/dss/dispc.c:2537:
+^Iif (dispc_mgr_is_lcd(channel)) {^M$
ERROR: DOS line endings
#188: FILE: drivers/video/omap2/dss/dispc.c:2538:
+^I^Iu32 l;^M$
ERROR: DOS line endings
#189: FILE: drivers/video/omap2/dss/dispc.c:2539:
+^I^Iint lcd;^M$
ERROR: DOS line endings
#192: FILE: drivers/video/omap2/dss/dispc.c:2541:
+^I^Il = dispc_read_reg(DISPC_DIVISORo(channel));^M$
ERROR: DOS line endings
#193: FILE: drivers/video/omap2/dss/dispc.c:2542:
+^I^Ilcd = FLD_GET(l, 23, 16);^M$
ERROR: DOS line endings
#209: FILE: drivers/video/omap2/dss/dispc.c:2544:
+^I^Ireturn r / lcd;^M$
ERROR: DOS line endings
#210: FILE: drivers/video/omap2/dss/dispc.c:2545:
+^I} else {^M$
ERROR: DOS line endings
#211: FILE: drivers/video/omap2/dss/dispc.c:2546:
+^I^Ireturn r;^M$
total: 72 errors, 1 warnings, 143 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch
or
scripts/cleanfile
123.mbox has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 0/3] OMAPDSS: DISPC: Enable predecimation for DMA and VRFB
From: Tomi Valkeinen @ 2012-03-27 10:49 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332323484-8975-1-git-send-email-cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
> Hi everyone,
> the following patch set directs to enable predecimation for DMA and VRFB
> which consists of two pacthes.
>
> The first patch is based on code written by Lajos Molnar <lajos@ti.com> in
> Android Kernel, which updates the code with predecimation logic thereby
> increasing the downscaling ability of the DISPC module.
> In version 2 patch description has been modified include reason for maximum
> predecimation limit of 16.
You should have the version changes separately, so that they are easy to
see. For example, a bullet list after the intro text. And you miss to
mention that this patch set adds a new patch to the series.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Tomi Valkeinen @ 2012-03-27 10:57 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332323516-9050-1-git-send-email-cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 6816 bytes --]
On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
> and timing related limitations leading to SYNCLOST errors. Whenever the image
> window is moved towards the right of the screen SYNCLOST errors become
> frequent. Checks have been implemented to see that DISPC driver rejects
> configuration exceeding above limitations.
>
> This code was successfully tested on OMAP3. This code is written based on code
> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
> timing and DISPC horizontal blanking length limitations.
>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
> 1 files changed, 72 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index 5a1963e..d8a1672 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -1622,6 +1622,57 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
> }
> }
>
> +static int check_horiz_timing(enum omap_channel channel, u16 pos_x,
> + u16 width, u16 height, u16 out_width, u16 out_height)
I think the function could be named check_horiz_timing_omap3 or
something. It's kinda hard to realize that this is an omap3 work-around.
Perhaps a short comment above the function would be in order.
> +{
> + int DS = DIV_ROUND_UP(height, out_height);
> + struct omap_dss_device *dssdev = dispc_mgr_get_device(channel);
> + struct omap_video_timings t = dssdev->panel.timings;
> + unsigned long nonactive, lclk, pclk;
> + static const u8 limits[3] = { 8, 10, 20 };
> + u64 val, blank;
> + int i;
> +
> + nonactive = t.x_res + t.hfp + t.hsw + t.hbp - out_width;
> + pclk = dispc_mgr_pclk_rate(channel);
> + lclk = dispc_mgr_lclk_rate(channel);
> +
> + i = 0;
> + if (out_height < height)
> + i++;
> + if (out_width < width)
> + i++;
> + blank = div_u64((u64)(t.hbp + t.hsw + t.hfp) * lclk, pclk);
> + DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]);
> + if (blank <= limits[i])
> + return -EINVAL;
> +
> + /*
> + * Pixel data should be prepared before visible display point starts.
> + * So, atleast DS-2 lines must have already been fetched by DISPC
> + * during nonactive - pos_x period.
> + */
> + val = div_u64((u64)(nonactive - pos_x) * lclk, pclk);
> + DSSDBG("(nonactive - pos_x) * pcd = %llu,"
> + " max(0, DS - 2) * width = %d\n",
> + val, max(0, DS - 2) * width);
> + if (val < max(0, DS - 2) * width)
> + return -EINVAL;
> +
> + /*
> + * All lines need to be refilled during the nonactive period of which
> + * only one line can be loaded during the active period. So, atleast
> + * DS - 1 lines should be loaded during nonactive period.
> + */
> + val = div_u64((u64)nonactive * lclk, pclk);
> + DSSDBG("nonactive * pcd = %llu, max(0, DS - 1) * width = %d\n",
> + val, max(0, DS - 1) * width);
> + if (val < max(0, DS - 1) * width)
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> static unsigned long calc_fclk_five_taps(enum omap_channel channel, u16 width,
> u16 height, u16 out_width, u16 out_height,
> enum omap_color_mode color_mode)
> @@ -1702,7 +1753,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> enum omap_channel channel, u16 width, u16 height,
> u16 out_width, u16 out_height,
> enum omap_color_mode color_mode, bool *five_taps,
> - int *x_predecim, int *y_predecim)
> + int *x_predecim, int *y_predecim, u16 pos_x)
> {
> struct omap_overlay *ovl = omap_dss_get_overlay(plane);
> const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
> @@ -1778,6 +1829,9 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> fclk = calc_fclk_five_taps(channel, in_width, in_height,
> out_width, out_height, color_mode);
>
> + error = check_horiz_timing(channel, pos_x, in_width,
> + in_height, out_width, out_height);
> +
> if (in_width > maxsinglelinewidth)
> if (in_height > out_height &&
> in_height < out_height * 2)
> @@ -1785,7 +1839,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> if (!*five_taps)
> fclk = calc_fclk(channel, in_width, in_height,
> out_width, out_height);
> - error = (in_width > maxsinglelinewidth * 2 ||
> + error = (error || in_width > maxsinglelinewidth * 2 ||
> (in_width > maxsinglelinewidth && *five_taps) ||
> !fclk || fclk > dispc_fclk_rate());
> if (error) {
> @@ -1801,6 +1855,12 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> } while (decim_x <= *x_predecim && decim_y <= *y_predecim
> && error);
>
> + if (check_horiz_timing(channel, pos_x, width, height,
> + out_width, out_height)){
> + DSSERR("horizontal timing too tight\n");
> + return -EINVAL;
> + }
> +
> if (in_width > (maxsinglelinewidth * 2)) {
> DSSERR("Cannot setup scaling");
> DSSERR("width exceeds maximum width possible");
> @@ -1901,7 +1961,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
>
> r = dispc_ovl_calc_scaling(plane, channel, in_width, in_height,
> out_width, out_height, oi->color_mode, &five_taps,
> - &x_predecim, &y_predecim);
> + &x_predecim, &y_predecim, oi->pos_x);
> if (r)
> return r;
>
> @@ -2472,32 +2532,19 @@ unsigned long dispc_fclk_rate(void)
>
> unsigned long dispc_mgr_lclk_rate(enum omap_channel channel)
> {
> - struct platform_device *dsidev;
> - int lcd;
> - unsigned long r;
> - u32 l;
> + unsigned long r = dispc_fclk_rate();
>
> - l = dispc_read_reg(DISPC_DIVISORo(channel));
> + if (dispc_mgr_is_lcd(channel)) {
> + u32 l;
> + int lcd;
>
> - lcd = FLD_GET(l, 23, 16);
> + l = dispc_read_reg(DISPC_DIVISORo(channel));
> + lcd = FLD_GET(l, 23, 16);
>
> - switch (dss_get_lcd_clk_source(channel)) {
> - case OMAP_DSS_CLK_SRC_FCK:
> - r = clk_get_rate(dispc.dss_clk);
> - break;
> - case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
> - dsidev = dsi_get_dsidev_from_id(0);
> - r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
> - break;
> - case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC:
> - dsidev = dsi_get_dsidev_from_id(1);
> - r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
> - break;
> - default:
> - BUG();
> + return r / lcd;
> + } else {
> + return r;
> }
> -
> - return r / lcd;
> }
I don't the change to dispc_mgr_lclk_rate has anything to do with this
patch (fixing omap3 sync lost error). Shouldn't it be a separate fix?
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 3/3] OMAPDSS: DISPC: Correct DISPC functional clock usage
From: Tomi Valkeinen @ 2012-03-27 11:03 UTC (permalink / raw)
To: Chandrabhanu Mahapatra; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332323530-9088-1-git-send-email-cmahapatra@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]
On Wed, 2012-03-21 at 15:22 +0530, Chandrabhanu Mahapatra wrote:
> DISPC_FCLK is incorrectly used as functional clock of DISPC in scaling
> calculations. So, DISPC_CORE_CLK replaces as functional clock of DISPC.
> DISPC_CORE_CLK is derived from DISPC_FCLK divided by an independent DISPC
> divisor LCD.
>
> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> ---
> drivers/video/omap2/dss/dispc.c | 13 +++++++------
> 1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index d8a1672..1fdac73 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -1761,6 +1761,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH);
> const int max_decim_limit = 16;
> unsigned long fclk = 0;
> + unsigned long dispc_core_clk = dispc_mgr_lclk_rate(channel);
Hmm, I don't think this is correct. dispc_mgr_lclk_rate() returns the
logic clock for the LCD output path. It's not DISPC core clock.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Tomi Valkeinen @ 2012-03-27 11:10 UTC (permalink / raw)
To: Mahapatra, Chandrabhanu; +Cc: linux-omap, linux-fbdev
In-Reply-To: <CAF0AtAsfE4xjiLOcvmPB4KCJn4QjN+PumJWQEM3m6ZziK4zhVw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1573 bytes --]
On Tue, 2012-03-27 at 16:31 +0530, Mahapatra, Chandrabhanu wrote:
> On Tue, Mar 27, 2012 at 4:13 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > Hi,
> >
> > On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
> >> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
> >> and timing related limitations leading to SYNCLOST errors. Whenever the image
> >> window is moved towards the right of the screen SYNCLOST errors become
> >> frequent. Checks have been implemented to see that DISPC driver rejects
> >> configuration exceeding above limitations.
> >>
> >> This code was successfully tested on OMAP3. This code is written based on code
> >> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
> >> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
> >> timing and DISPC horizontal blanking length limitations.
> >>
> >> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> >> ---
> >> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
> >> 1 files changed, 72 insertions(+), 25 deletions(-)
> >
> > The patch seems to be using dos line endings... Where did they come
> > from? The two others are fine. I think git am removed the dos line
> > endings, so it's fine.
> >
>
> How did you find these errors? scripts/checkpatch.pl still returns me nothing.
Well I just saved the email and ran checkpatch. Could be a problem in
gmail or my end too, but I've never seen it happen before.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Mahapatra, Chandrabhanu @ 2012-03-27 11:13 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332845034.1867.116.camel@deskari>
On Tue, Mar 27, 2012 at 4:13 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
>> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
>> and timing related limitations leading to SYNCLOST errors. Whenever the image
>> window is moved towards the right of the screen SYNCLOST errors become
>> frequent. Checks have been implemented to see that DISPC driver rejects
>> configuration exceeding above limitations.
>>
>> This code was successfully tested on OMAP3. This code is written based on code
>> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
>> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
>> timing and DISPC horizontal blanking length limitations.
>>
>> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
>> ---
>> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
>> 1 files changed, 72 insertions(+), 25 deletions(-)
>
> The patch seems to be using dos line endings... Where did they come
> from? The two others are fine. I think git am removed the dos line
> endings, so it's fine.
>
How did you find these errors? scripts/checkpatch.pl still returns me nothing.
> Tomi
>
>
> ERROR: DOS line endings
> #72: FILE: drivers/video/omap2/dss/dispc.c:1625:
> +static int check_horiz_timing(enum omap_channel channel, u16 pos_x,^M$
>
> ERROR: DOS line endings
> #73: FILE: drivers/video/omap2/dss/dispc.c:1626:
> +^I^Iu16 width, u16 height, u16 out_width, u16 out_height)^M$
>
> ERROR: DOS line endings
> #74: FILE: drivers/video/omap2/dss/dispc.c:1627:
> +{^M$
>
> ERROR: DOS line endings
> #75: FILE: drivers/video/omap2/dss/dispc.c:1628:
> +^Iint DS = DIV_ROUND_UP(height, out_height);^M$
>
> ERROR: DOS line endings
> #76: FILE: drivers/video/omap2/dss/dispc.c:1629:
> +^Istruct omap_dss_device *dssdev = dispc_mgr_get_device(channel);^M$
>
> ERROR: DOS line endings
> #77: FILE: drivers/video/omap2/dss/dispc.c:1630:
> +^Istruct omap_video_timings t = dssdev->panel.timings;^M$
>
> ERROR: DOS line endings
> #78: FILE: drivers/video/omap2/dss/dispc.c:1631:
> +^Iunsigned long nonactive, lclk, pclk;^M$
>
> ERROR: DOS line endings
> #79: FILE: drivers/video/omap2/dss/dispc.c:1632:
> +^Istatic const u8 limits[3] = { 8, 10, 20 };^M$
>
> ERROR: DOS line endings
> #80: FILE: drivers/video/omap2/dss/dispc.c:1633:
> +^Iu64 val, blank;^M$
>
> ERROR: DOS line endings
> #81: FILE: drivers/video/omap2/dss/dispc.c:1634:
> +^Iint i;^M$
>
> ERROR: DOS line endings
> #82: FILE: drivers/video/omap2/dss/dispc.c:1635:
> +^M$
>
> ERROR: DOS line endings
> #83: FILE: drivers/video/omap2/dss/dispc.c:1636:
> +^Inonactive = t.x_res + t.hfp + t.hsw + t.hbp - out_width;^M$
>
> ERROR: DOS line endings
> #84: FILE: drivers/video/omap2/dss/dispc.c:1637:
> +^Ipclk = dispc_mgr_pclk_rate(channel);^M$
>
> ERROR: DOS line endings
> #85: FILE: drivers/video/omap2/dss/dispc.c:1638:
> +^Ilclk = dispc_mgr_lclk_rate(channel);^M$
>
> ERROR: DOS line endings
> #86: FILE: drivers/video/omap2/dss/dispc.c:1639:
> +^M$
>
> ERROR: DOS line endings
> #87: FILE: drivers/video/omap2/dss/dispc.c:1640:
> +^Ii = 0;^M$
>
> ERROR: DOS line endings
> #88: FILE: drivers/video/omap2/dss/dispc.c:1641:
> +^Iif (out_height < height)^M$
>
> ERROR: DOS line endings
> #89: FILE: drivers/video/omap2/dss/dispc.c:1642:
> +^I^Ii++;^M$
>
> ERROR: DOS line endings
> #90: FILE: drivers/video/omap2/dss/dispc.c:1643:
> +^Iif (out_width < width)^M$
>
> ERROR: DOS line endings
> #91: FILE: drivers/video/omap2/dss/dispc.c:1644:
> +^I^Ii++;^M$
>
> ERROR: DOS line endings
> #92: FILE: drivers/video/omap2/dss/dispc.c:1645:
> +^Iblank = div_u64((u64)(t.hbp + t.hsw + t.hfp) * lclk, pclk);^M$
>
> ERROR: DOS line endings
> #93: FILE: drivers/video/omap2/dss/dispc.c:1646:
> +^IDSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank,
> limits[i]);^M$
>
> WARNING: line over 80 characters
> #93: FILE: drivers/video/omap2/dss/dispc.c:1646:
> + DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank,
> limits[i]);
>
> ERROR: DOS line endings
> #94: FILE: drivers/video/omap2/dss/dispc.c:1647:
> +^Iif (blank <= limits[i])^M$
>
> ERROR: DOS line endings
> #95: FILE: drivers/video/omap2/dss/dispc.c:1648:
> +^I^Ireturn -EINVAL;^M$
>
> ERROR: DOS line endings
> #96: FILE: drivers/video/omap2/dss/dispc.c:1649:
> +^M$
>
> ERROR: trailing whitespace
> #97: FILE: drivers/video/omap2/dss/dispc.c:1650:
> +^I/*^M$
>
> ERROR: trailing whitespace
> #98: FILE: drivers/video/omap2/dss/dispc.c:1651:
> +^I * Pixel data should be prepared before visible display point
> starts.^M$
>
> ERROR: trailing whitespace
> #99: FILE: drivers/video/omap2/dss/dispc.c:1652:
> +^I * So, atleast DS-2 lines must have already been fetched by DISPC^M$
>
> ERROR: trailing whitespace
> #100: FILE: drivers/video/omap2/dss/dispc.c:1653:
> +^I * during nonactive - pos_x period.^M$
>
> ERROR: DOS line endings
> #101: FILE: drivers/video/omap2/dss/dispc.c:1654:
> +^I */^M$
>
> ERROR: DOS line endings
> #102: FILE: drivers/video/omap2/dss/dispc.c:1655:
> +^Ival = div_u64((u64)(nonactive - pos_x) * lclk, pclk);^M$
>
> ERROR: DOS line endings
> #103: FILE: drivers/video/omap2/dss/dispc.c:1656:
> +^IDSSDBG("(nonactive - pos_x) * pcd = %llu,"^M$
>
> ERROR: DOS line endings
> #104: FILE: drivers/video/omap2/dss/dispc.c:1657:
> +^I^I" max(0, DS - 2) * width = %d\n",^M$
>
> ERROR: DOS line endings
> #105: FILE: drivers/video/omap2/dss/dispc.c:1658:
> +^I^Ival, max(0, DS - 2) * width);^M$
>
> ERROR: DOS line endings
> #106: FILE: drivers/video/omap2/dss/dispc.c:1659:
> +^Iif (val < max(0, DS - 2) * width)^M$
>
> ERROR: DOS line endings
> #107: FILE: drivers/video/omap2/dss/dispc.c:1660:
> +^I^Ireturn -EINVAL;^M$
>
> ERROR: DOS line endings
> #108: FILE: drivers/video/omap2/dss/dispc.c:1661:
> +^M$
>
> ERROR: trailing whitespace
> #109: FILE: drivers/video/omap2/dss/dispc.c:1662:
> +^I/*^M$
>
> ERROR: trailing whitespace
> #110: FILE: drivers/video/omap2/dss/dispc.c:1663:
> +^I * All lines need to be refilled during the nonactive period of
> which^M$
>
> ERROR: trailing whitespace
> #111: FILE: drivers/video/omap2/dss/dispc.c:1664:
> +^I * only one line can be loaded during the active period. So,
> atleast^M$
>
> ERROR: trailing whitespace
> #112: FILE: drivers/video/omap2/dss/dispc.c:1665:
> +^I * DS - 1 lines should be loaded during nonactive period.^M$
>
> ERROR: DOS line endings
> #113: FILE: drivers/video/omap2/dss/dispc.c:1666:
> +^I */^M$
>
> ERROR: DOS line endings
> #114: FILE: drivers/video/omap2/dss/dispc.c:1667:
> +^Ival = div_u64((u64)nonactive * lclk, pclk);^M$
>
> ERROR: DOS line endings
> #115: FILE: drivers/video/omap2/dss/dispc.c:1668:
> +^IDSSDBG("nonactive * pcd = %llu, max(0, DS - 1) * width = %d\n",^M$
>
> ERROR: DOS line endings
> #116: FILE: drivers/video/omap2/dss/dispc.c:1669:
> +^I^Ival, max(0, DS - 1) * width);^M$
>
> ERROR: DOS line endings
> #117: FILE: drivers/video/omap2/dss/dispc.c:1670:
> +^Iif (val < max(0, DS - 1) * width)^M$
>
> ERROR: DOS line endings
> #118: FILE: drivers/video/omap2/dss/dispc.c:1671:
> +^I^Ireturn -EINVAL;^M$
>
> ERROR: DOS line endings
> #119: FILE: drivers/video/omap2/dss/dispc.c:1672:
> +^M$
>
> ERROR: DOS line endings
> #120: FILE: drivers/video/omap2/dss/dispc.c:1673:
> +^Ireturn 0;^M$
>
> ERROR: DOS line endings
> #121: FILE: drivers/video/omap2/dss/dispc.c:1674:
> +}^M$
>
> ERROR: DOS line endings
> #122: FILE: drivers/video/omap2/dss/dispc.c:1675:
> +^M$
>
> ERROR: DOS line endings
> #131: FILE: drivers/video/omap2/dss/dispc.c:1756:
> +^I^Iint *x_predecim, int *y_predecim, u16 pos_x)^M$
>
> ERROR: DOS line endings
> #139: FILE: drivers/video/omap2/dss/dispc.c:1832:
> +^I^I^Ierror = check_horiz_timing(channel, pos_x, in_width,^M$
>
> ERROR: DOS line endings
> #140: FILE: drivers/video/omap2/dss/dispc.c:1833:
> +^I^I^I^Iin_height, out_width, out_height);^M$
>
> ERROR: DOS line endings
> #141: FILE: drivers/video/omap2/dss/dispc.c:1834:
> +^M$
>
> ERROR: DOS line endings
> #150: FILE: drivers/video/omap2/dss/dispc.c:1842:
> +^I^I^Ierror = (error || in_width > maxsinglelinewidth * 2 ||^M$
>
> ERROR: DOS line endings
> #158: FILE: drivers/video/omap2/dss/dispc.c:1858:
> +^I^Iif (check_horiz_timing(channel, pos_x, width, height,^M$
>
> ERROR: DOS line endings
> #159: FILE: drivers/video/omap2/dss/dispc.c:1859:
> +^I^I^Iout_width, out_height)){^M$
>
> ERROR: DOS line endings
> #160: FILE: drivers/video/omap2/dss/dispc.c:1860:
> +^I^I^I^IDSSERR("horizontal timing too tight\n");^M$
>
> ERROR: DOS line endings
> #161: FILE: drivers/video/omap2/dss/dispc.c:1861:
> +^I^I^I^Ireturn -EINVAL;^M$
>
> ERROR: DOS line endings
> #162: FILE: drivers/video/omap2/dss/dispc.c:1862:
> +^I^I}^M$
>
> ERROR: DOS line endings
> #163: FILE: drivers/video/omap2/dss/dispc.c:1863:
> +^M$
>
> ERROR: DOS line endings
> #172: FILE: drivers/video/omap2/dss/dispc.c:1964:
> +^I^I^I&x_predecim, &y_predecim, oi->pos_x);^M$
>
> ERROR: DOS line endings
> #184: FILE: drivers/video/omap2/dss/dispc.c:2535:
> +^Iunsigned long r = dispc_fclk_rate();^M$
>
> ERROR: DOS line endings
> #187: FILE: drivers/video/omap2/dss/dispc.c:2537:
> +^Iif (dispc_mgr_is_lcd(channel)) {^M$
>
> ERROR: DOS line endings
> #188: FILE: drivers/video/omap2/dss/dispc.c:2538:
> +^I^Iu32 l;^M$
>
> ERROR: DOS line endings
> #189: FILE: drivers/video/omap2/dss/dispc.c:2539:
> +^I^Iint lcd;^M$
>
> ERROR: DOS line endings
> #192: FILE: drivers/video/omap2/dss/dispc.c:2541:
> +^I^Il = dispc_read_reg(DISPC_DIVISORo(channel));^M$
>
> ERROR: DOS line endings
> #193: FILE: drivers/video/omap2/dss/dispc.c:2542:
> +^I^Ilcd = FLD_GET(l, 23, 16);^M$
>
> ERROR: DOS line endings
> #209: FILE: drivers/video/omap2/dss/dispc.c:2544:
> +^I^Ireturn r / lcd;^M$
>
> ERROR: DOS line endings
> #210: FILE: drivers/video/omap2/dss/dispc.c:2545:
> +^I} else {^M$
>
> ERROR: DOS line endings
> #211: FILE: drivers/video/omap2/dss/dispc.c:2546:
> +^I^Ireturn r;^M$
>
> total: 72 errors, 1 warnings, 143 lines checked
>
> NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch
> or
> scripts/cleanfile
>
> 123.mbox has style problems, please review.
>
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Tomi Valkeinen @ 2012-03-27 11:17 UTC (permalink / raw)
To: Mahapatra, Chandrabhanu; +Cc: linux-omap, linux-fbdev
In-Reply-To: <CAF0AtAtOSw73YuKyTxc6=RwN75oQaFxRCBW3_=PTmUoxgAFyew@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]
On Tue, 2012-03-27 at 16:37 +0530, Mahapatra, Chandrabhanu wrote:
> On Tue, Mar 27, 2012 at 4:27 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
> >> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
> >> and timing related limitations leading to SYNCLOST errors. Whenever the image
> >> window is moved towards the right of the screen SYNCLOST errors become
> >> frequent. Checks have been implemented to see that DISPC driver rejects
> >> configuration exceeding above limitations.
> >>
> >> This code was successfully tested on OMAP3. This code is written based on code
> >> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
> >> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
> >> timing and DISPC horizontal blanking length limitations.
> >>
> >> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> >> ---
> >> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
> >> 1 files changed, 72 insertions(+), 25 deletions(-)
> >>
> >> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> >> index 5a1963e..d8a1672 100644
> >> --- a/drivers/video/omap2/dss/dispc.c
> >> +++ b/drivers/video/omap2/dss/dispc.c
> >> @@ -1622,6 +1622,57 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
> >> }
> >> }
> >>
> >> +static int check_horiz_timing(enum omap_channel channel, u16 pos_x,
> >> + u16 width, u16 height, u16 out_width, u16 out_height)
> >
> > I think the function could be named check_horiz_timing_omap3 or
> > something. It's kinda hard to realize that this is an omap3 work-around.
> > Perhaps a short comment above the function would be in order.
> >
>
> Yes, you are right! Do you mean to include some comments within the
> code definition itself? The patch description includes all that this
> function does.
I mean just a short comment above the function that mentions that this
function is used to avoid the synclosts on omap3, because yadda yadda,
so that the reader will immediately realize that this is doing some
special handling.
> > I don't the change to dispc_mgr_lclk_rate has anything to do with this
> > patch (fixing omap3 sync lost error). Shouldn't it be a separate fix?
> >
> > Tomi
> >
> I am thinking to to move this fix to the third patch in the series
> "OMAPDSS: DISPC: Correct DISPC functional clock usage" and make it
> separate patch from the series and if possible move it ahead of the
> predecimation patch series. What do you say?
This patch is using dispc_mgr_lclk_rate. Does it depend on the change?
If so, it needs to be fixed before this patch. But yes, separating it
sounds fine.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Mahapatra, Chandrabhanu @ 2012-03-27 11:19 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332845843.1867.126.camel@deskari>
On Tue, Mar 27, 2012 at 4:27 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
>> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
>> and timing related limitations leading to SYNCLOST errors. Whenever the image
>> window is moved towards the right of the screen SYNCLOST errors become
>> frequent. Checks have been implemented to see that DISPC driver rejects
>> configuration exceeding above limitations.
>>
>> This code was successfully tested on OMAP3. This code is written based on code
>> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
>> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
>> timing and DISPC horizontal blanking length limitations.
>>
>> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
>> ---
>> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
>> 1 files changed, 72 insertions(+), 25 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
>> index 5a1963e..d8a1672 100644
>> --- a/drivers/video/omap2/dss/dispc.c
>> +++ b/drivers/video/omap2/dss/dispc.c
>> @@ -1622,6 +1622,57 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
>> }
>> }
>>
>> +static int check_horiz_timing(enum omap_channel channel, u16 pos_x,
>> + u16 width, u16 height, u16 out_width, u16 out_height)
>
> I think the function could be named check_horiz_timing_omap3 or
> something. It's kinda hard to realize that this is an omap3 work-around.
> Perhaps a short comment above the function would be in order.
>
Yes, you are right! Do you mean to include some comments within the
code definition itself? The patch description includes all that this
function does.
>> +{
>> + int DS = DIV_ROUND_UP(height, out_height);
>> + struct omap_dss_device *dssdev = dispc_mgr_get_device(channel);
>> + struct omap_video_timings t = dssdev->panel.timings;
>> + unsigned long nonactive, lclk, pclk;
>> + static const u8 limits[3] = { 8, 10, 20 };
>> + u64 val, blank;
>> + int i;
>> +
>> + nonactive = t.x_res + t.hfp + t.hsw + t.hbp - out_width;
>> + pclk = dispc_mgr_pclk_rate(channel);
>> + lclk = dispc_mgr_lclk_rate(channel);
>> +
>> + i = 0;
>> + if (out_height < height)
>> + i++;
>> + if (out_width < width)
>> + i++;
>> + blank = div_u64((u64)(t.hbp + t.hsw + t.hfp) * lclk, pclk);
>> + DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]);
>> + if (blank <= limits[i])
>> + return -EINVAL;
>> +
>> + /*
>> + * Pixel data should be prepared before visible display point starts.
>> + * So, atleast DS-2 lines must have already been fetched by DISPC
>> + * during nonactive - pos_x period.
>> + */
>> + val = div_u64((u64)(nonactive - pos_x) * lclk, pclk);
>> + DSSDBG("(nonactive - pos_x) * pcd = %llu,"
>> + " max(0, DS - 2) * width = %d\n",
>> + val, max(0, DS - 2) * width);
>> + if (val < max(0, DS - 2) * width)
>> + return -EINVAL;
>> +
>> + /*
>> + * All lines need to be refilled during the nonactive period of which
>> + * only one line can be loaded during the active period. So, atleast
>> + * DS - 1 lines should be loaded during nonactive period.
>> + */
>> + val = div_u64((u64)nonactive * lclk, pclk);
>> + DSSDBG("nonactive * pcd = %llu, max(0, DS - 1) * width = %d\n",
>> + val, max(0, DS - 1) * width);
>> + if (val < max(0, DS - 1) * width)
>> + return -EINVAL;
>> +
>> + return 0;
>> +}
>> +
>> static unsigned long calc_fclk_five_taps(enum omap_channel channel, u16 width,
>> u16 height, u16 out_width, u16 out_height,
>> enum omap_color_mode color_mode)
>> @@ -1702,7 +1753,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
>> enum omap_channel channel, u16 width, u16 height,
>> u16 out_width, u16 out_height,
>> enum omap_color_mode color_mode, bool *five_taps,
>> - int *x_predecim, int *y_predecim)
>> + int *x_predecim, int *y_predecim, u16 pos_x)
>> {
>> struct omap_overlay *ovl = omap_dss_get_overlay(plane);
>> const int maxdownscale = dss_feat_get_param_max(FEAT_PARAM_DOWNSCALE);
>> @@ -1778,6 +1829,9 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
>> fclk = calc_fclk_five_taps(channel, in_width, in_height,
>> out_width, out_height, color_mode);
>>
>> + error = check_horiz_timing(channel, pos_x, in_width,
>> + in_height, out_width, out_height);
>> +
>> if (in_width > maxsinglelinewidth)
>> if (in_height > out_height &&
>> in_height < out_height * 2)
>> @@ -1785,7 +1839,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
>> if (!*five_taps)
>> fclk = calc_fclk(channel, in_width, in_height,
>> out_width, out_height);
>> - error = (in_width > maxsinglelinewidth * 2 ||
>> + error = (error || in_width > maxsinglelinewidth * 2 ||
>> (in_width > maxsinglelinewidth && *five_taps) ||
>> !fclk || fclk > dispc_fclk_rate());
>> if (error) {
>> @@ -1801,6 +1855,12 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
>> } while (decim_x <= *x_predecim && decim_y <= *y_predecim
>> && error);
>>
>> + if (check_horiz_timing(channel, pos_x, width, height,
>> + out_width, out_height)){
>> + DSSERR("horizontal timing too tight\n");
>> + return -EINVAL;
>> + }
>> +
>> if (in_width > (maxsinglelinewidth * 2)) {
>> DSSERR("Cannot setup scaling");
>> DSSERR("width exceeds maximum width possible");
>> @@ -1901,7 +1961,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
>>
>> r = dispc_ovl_calc_scaling(plane, channel, in_width, in_height,
>> out_width, out_height, oi->color_mode, &five_taps,
>> - &x_predecim, &y_predecim);
>> + &x_predecim, &y_predecim, oi->pos_x);
>> if (r)
>> return r;
>>
>> @@ -2472,32 +2532,19 @@ unsigned long dispc_fclk_rate(void)
>>
>> unsigned long dispc_mgr_lclk_rate(enum omap_channel channel)
>> {
>> - struct platform_device *dsidev;
>> - int lcd;
>> - unsigned long r;
>> - u32 l;
>> + unsigned long r = dispc_fclk_rate();
>>
>> - l = dispc_read_reg(DISPC_DIVISORo(channel));
>> + if (dispc_mgr_is_lcd(channel)) {
>> + u32 l;
>> + int lcd;
>>
>> - lcd = FLD_GET(l, 23, 16);
>> + l = dispc_read_reg(DISPC_DIVISORo(channel));
>> + lcd = FLD_GET(l, 23, 16);
>>
>> - switch (dss_get_lcd_clk_source(channel)) {
>> - case OMAP_DSS_CLK_SRC_FCK:
>> - r = clk_get_rate(dispc.dss_clk);
>> - break;
>> - case OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC:
>> - dsidev = dsi_get_dsidev_from_id(0);
>> - r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
>> - break;
>> - case OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC:
>> - dsidev = dsi_get_dsidev_from_id(1);
>> - r = dsi_get_pll_hsdiv_dispc_rate(dsidev);
>> - break;
>> - default:
>> - BUG();
>> + return r / lcd;
>> + } else {
>> + return r;
>> }
>> -
>> - return r / lcd;
>> }
>
> I don't the change to dispc_mgr_lclk_rate has anything to do with this
> patch (fixing omap3 sync lost error). Shouldn't it be a separate fix?
>
> Tomi
>
I am thinking to to move this fix to the third patch in the series
"OMAPDSS: DISPC: Correct DISPC functional clock usage" and make it
separate patch from the series and if possible move it ahead of the
predecimation patch series. What do you say?
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* Re: [PATCH V2 3/3] OMAPDSS: DISPC: Correct DISPC functional clock usage
From: Mahapatra, Chandrabhanu @ 2012-03-27 11:26 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332846215.1867.130.camel@deskari>
On Tue, Mar 27, 2012 at 4:33 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Wed, 2012-03-21 at 15:22 +0530, Chandrabhanu Mahapatra wrote:
>> DISPC_FCLK is incorrectly used as functional clock of DISPC in scaling
>> calculations. So, DISPC_CORE_CLK replaces as functional clock of DISPC.
>> DISPC_CORE_CLK is derived from DISPC_FCLK divided by an independent DISPC
>> divisor LCD.
>>
>> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
>> ---
>> drivers/video/omap2/dss/dispc.c | 13 +++++++------
>> 1 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
>> index d8a1672..1fdac73 100644
>> --- a/drivers/video/omap2/dss/dispc.c
>> +++ b/drivers/video/omap2/dss/dispc.c
>> @@ -1761,6 +1761,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
>> dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH);
>> const int max_decim_limit = 16;
>> unsigned long fclk = 0;
>> + unsigned long dispc_core_clk = dispc_mgr_lclk_rate(channel);
>
> Hmm, I don't think this is correct. dispc_mgr_lclk_rate() returns the
> logic clock for the LCD output path. It's not DISPC core clock.
>
> Tomi
>
As per the OMAP4 TRM DISPC_CORE_CLK is DISPC_FCLK / LCD factor and
dispc_mgr_lclk_rate() exactly does the same. Should we rename the
function or have a separate fucntion for dispc_core_clk to avoid
confusion?
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* Re: [PATCH V2 3/3] OMAPDSS: DISPC: Correct DISPC functional clock usage
From: Tomi Valkeinen @ 2012-03-27 11:26 UTC (permalink / raw)
To: Mahapatra, Chandrabhanu, Archit Taneja; +Cc: linux-omap, linux-fbdev
In-Reply-To: <CAF0AtAuxR6pa0y_kTgh454=joFoy_kG4XCnHAS94qkPk0+kLFw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2580 bytes --]
On Tue, 2012-03-27 at 16:44 +0530, Mahapatra, Chandrabhanu wrote:
> On Tue, Mar 27, 2012 at 4:33 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Wed, 2012-03-21 at 15:22 +0530, Chandrabhanu Mahapatra wrote:
> >> DISPC_FCLK is incorrectly used as functional clock of DISPC in scaling
> >> calculations. So, DISPC_CORE_CLK replaces as functional clock of DISPC.
> >> DISPC_CORE_CLK is derived from DISPC_FCLK divided by an independent DISPC
> >> divisor LCD.
> >>
> >> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
> >> ---
> >> drivers/video/omap2/dss/dispc.c | 13 +++++++------
> >> 1 files changed, 7 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> >> index d8a1672..1fdac73 100644
> >> --- a/drivers/video/omap2/dss/dispc.c
> >> +++ b/drivers/video/omap2/dss/dispc.c
> >> @@ -1761,6 +1761,7 @@ static int dispc_ovl_calc_scaling(enum omap_plane plane,
> >> dss_feat_get_param_max(FEAT_PARAM_LINEWIDTH);
> >> const int max_decim_limit = 16;
> >> unsigned long fclk = 0;
> >> + unsigned long dispc_core_clk = dispc_mgr_lclk_rate(channel);
> >
> > Hmm, I don't think this is correct. dispc_mgr_lclk_rate() returns the
> > logic clock for the LCD output path. It's not DISPC core clock.
> >
> > Tomi
> >
>
> As per the OMAP4 TRM DISPC_CORE_CLK is DISPC_FCLK / LCD factor and
Hmm? No it isn't. DISPC_CORE_CLK is DISPC_FCLK / LCD, where LCD is
defined in DISPC_DIVISOR register.
dispc_mgr_lclk_rate() returns the logic clock of an output, which is
LCD1_CLK / LCD1 or LCD2_CLK / LCD2. And LCD1 and LCD2 are defined in
DISPC_DIVISORo(n) register.
(Very confusing to have LCD mean a liquid-crystal-display and also
logic-clock-divisor =) I think we should rename them. Perhaps LCKD and
PCKD).
So the clocks for DISPC and for LCD outputs are totally separate ones,
on OMAP4. For OMAP2/3 they are the same.
That said, I have no idea which of the clock is used for what regarding
scaling calculations, and even less do I know how it's managed for
TV-out...
> dispc_mgr_lclk_rate() exactly does the same. Should we rename the
> function or have a separate fucntion for dispc_core_clk to avoid
> confusion?
I think we definitely should have a separate function, as it's a
separate clock. And I guess the places where FCKs and LCKs are used
should be verified so that they use the correct one. If somebody knows
what is the correct one (the TRM is a bit vague at times =).
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Mahapatra, Chandrabhanu @ 2012-03-27 11:37 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332846616.1867.132.camel@deskari>
On Tue, Mar 27, 2012 at 4:40 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Tue, 2012-03-27 at 16:31 +0530, Mahapatra, Chandrabhanu wrote:
>> On Tue, Mar 27, 2012 at 4:13 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> > Hi,
>> >
>> > On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
>> >> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
>> >> and timing related limitations leading to SYNCLOST errors. Whenever the image
>> >> window is moved towards the right of the screen SYNCLOST errors become
>> >> frequent. Checks have been implemented to see that DISPC driver rejects
>> >> configuration exceeding above limitations.
>> >>
>> >> This code was successfully tested on OMAP3. This code is written based on code
>> >> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
>> >> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
>> >> timing and DISPC horizontal blanking length limitations.
>> >>
>> >> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
>> >> ---
>> >> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
>> >> 1 files changed, 72 insertions(+), 25 deletions(-)
>> >
>> > The patch seems to be using dos line endings... Where did they come
>> > from? The two others are fine. I think git am removed the dos line
>> > endings, so it's fine.
>> >
>>
>> How did you find these errors? scripts/checkpatch.pl still returns me nothing.
>
> Well I just saved the email and ran checkpatch. Could be a problem in
> gmail or my end too, but I've never seen it happen before.
>
> Tomi
>
Save it as text file and then run checkpatch it wont give any errors.
By default it tries to save it as a eml file. Just check it.
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* Re: [PATCH V2 2/3] OMAPDSS: DISPC: Handle synclost errors in OMAP3
From: Mahapatra, Chandrabhanu @ 2012-03-27 11:45 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, linux-fbdev
In-Reply-To: <1332847059.1867.140.camel@deskari>
On Tue, Mar 27, 2012 at 4:47 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Tue, 2012-03-27 at 16:37 +0530, Mahapatra, Chandrabhanu wrote:
>> On Tue, Mar 27, 2012 at 4:27 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> > On Wed, 2012-03-21 at 15:21 +0530, Chandrabhanu Mahapatra wrote:
>> >> In OMAP3 DISPC video overlays suffer from some undocumented horizontal position
>> >> and timing related limitations leading to SYNCLOST errors. Whenever the image
>> >> window is moved towards the right of the screen SYNCLOST errors become
>> >> frequent. Checks have been implemented to see that DISPC driver rejects
>> >> configuration exceeding above limitations.
>> >>
>> >> This code was successfully tested on OMAP3. This code is written based on code
>> >> written by Ville Syrjälä <ville.syrjala@nokia.com> in Linux OMAP kernel. Ville
>> >> Syrjälä <ville.syrjala@nokia.com> had added checks for video overlay horizontal
>> >> timing and DISPC horizontal blanking length limitations.
>> >>
>> >> Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com>
>> >> ---
>> >> drivers/video/omap2/dss/dispc.c | 97 +++++++++++++++++++++++++++++----------
>> >> 1 files changed, 72 insertions(+), 25 deletions(-)
>> >>
>> >> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
>> >> index 5a1963e..d8a1672 100644
>> >> --- a/drivers/video/omap2/dss/dispc.c
>> >> +++ b/drivers/video/omap2/dss/dispc.c
>> >> @@ -1622,6 +1622,57 @@ static void calc_dma_rotation_offset(u8 rotation, bool mirror,
>> >> }
>> >> }
>> >>
>> >> +static int check_horiz_timing(enum omap_channel channel, u16 pos_x,
>> >> + u16 width, u16 height, u16 out_width, u16 out_height)
>> >
>> > I think the function could be named check_horiz_timing_omap3 or
>> > something. It's kinda hard to realize that this is an omap3 work-around.
>> > Perhaps a short comment above the function would be in order.
>> >
>>
>> Yes, you are right! Do you mean to include some comments within the
>> code definition itself? The patch description includes all that this
>> function does.
>
> I mean just a short comment above the function that mentions that this
> function is used to avoid the synclosts on omap3, because yadda yadda,
> so that the reader will immediately realize that this is doing some
> special handling.
>
Ok.
>> > I don't the change to dispc_mgr_lclk_rate has anything to do with this
>> > patch (fixing omap3 sync lost error). Shouldn't it be a separate fix?
>> >
>> > Tomi
>> >
>> I am thinking to to move this fix to the third patch in the series
>> "OMAPDSS: DISPC: Correct DISPC functional clock usage" and make it
>> separate patch from the series and if possible move it ahead of the
>> predecimation patch series. What do you say?
>
> This patch is using dispc_mgr_lclk_rate. Does it depend on the change?
> If so, it needs to be fixed before this patch. But yes, separating it
> sounds fine.
>
> Tomi
>
To a certain extent it does. Moving it to the third patch will
introduce certain code changes as
if (dispc_mgr_is_lcd(channel)) while initialising dispc_core_clk.
Anyways that can be cleaned up in the third patch.
--
Chandrabhanu Mahapatra
Texas Instruments India Pvt. Ltd.
^ permalink raw reply
* Hello
From: laurarey111 @ 2012-03-27 13:30 UTC (permalink / raw)
To: linux-fbdev
Hello xxxxx,
How are you doing over there? My name is Laura, Please let
me know if i got the right address so we can open
communication, here is my email address I am waiting for
your confirmation with care Laura...
^ permalink raw reply
* Re: [PATCH] video:uvesafb: Fix oops that uvesafb try to execute NX-protected page
From: Alan Cox @ 2012-03-27 13:32 UTC (permalink / raw)
To: Wang YanQing; +Cc: FlorianSchandinat, linux-fbdev, linux-kernel, spock
In-Reply-To: <20120327100136.GA3829@udknight>
On Tue, 27 Mar 2012 18:01:36 +0800
Wang YanQing <udknight@gmail.com> wrote:
>
> Ok! I try to check pcibios_enabled first, but get some opposition by Alan Cox,
> but I want to make thing work and fix the oops, so I choice the simple way to
> check the (__supported_pte_mask & _PAGE_NX) instead of to check this variable plus
> pci kernel boot parameter, pci mmconfig works or not, and more, and more. It is not
> the best method, but it works and maybe all will feel happy.
Okay let me ask the obvious question - why is it not the best method ?
Apart from adding a helper in the includes for the arch code of
static inline is_nx_enabled(void)
{
return !!(__supported_pte_mask & _PAGE_NX);
}
is there anything else it lacks ?
Yes ideally we'd set the relevant ROM areas executable, but for a simple
fix is there anything else that's a problem with it ?
Alan
^ permalink raw reply
* Re: [PATCH] video:uvesafb: Fix oops that uvesafb try to execute NX-protected page
From: Wang YanQing @ 2012-03-28 0:52 UTC (permalink / raw)
To: Alan Cox; +Cc: FlorianSchandinat, linux-fbdev, linux-kernel, spock
In-Reply-To: <20120327143243.015ecff6@pyramind.ukuu.org.uk>
On Tue, Mar 27, 2012 at 02:32:43PM +0100, Alan Cox wrote:
> On Tue, 27 Mar 2012 18:01:36 +0800
> Wang YanQing <udknight@gmail.com> wrote:
>
> >
> > Ok! I try to check pcibios_enabled first, but get some opposition by Alan Cox,
> > but I want to make thing work and fix the oops, so I choice the simple way to
> > check the (__supported_pte_mask & _PAGE_NX) instead of to check this variable plus
> > pci kernel boot parameter, pci mmconfig works or not, and more, and more. It is not
> > the best method, but it works and maybe all will feel happy.
>
> Okay let me ask the obvious question - why is it not the best method ?
>
> Apart from adding a helper in the includes for the arch code of
>
> static inline is_nx_enabled(void)
> {
> return !!(__supported_pte_mask & _PAGE_NX);
> }
>
> is there anything else it lacks ?
>
> Yes ideally we'd set the relevant ROM areas executable, but for a simple
> fix is there anything else that's a problem with it ?
Ok! Maybe you had missed my previous reply
http://permalink.gmane.org/gmane.linux.kernel/1272433
It is not the best method, because the check is not enough.
I means when NX is actively, the pci bios is NX or not also depend on
the code path in pci_arch_init which will be influenced by the acpi on or off, pci kernel boot
parameter, even kernel config like pci access method PCI_GOANY, PCI_GOMMCONFIG, or PCI_GODIRECT,
but if I check the pcibios_enabled, all the above can be ignored.
if uvesafb use the PMI when PCI BIOS is X, it can get the better work efficience then use the redraw
method as a fallback when do the panning.
^ permalink raw reply
* RE: [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
From: Jingoo Han @ 2012-03-28 10:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1332606528-32338-5-git-send-email-thomas.abraham@linaro.org>
On 25 March 2012 01:29, Thomas Abraham < thomas.abraham@linaro.org> wrote:
> Subject: [PATCH v3 4/4] ARM: Samsung: Rework platform data of s3c-fb driver
>
> For all the Samsung SoC based boards which have the platform data for
> s3c-fb driver, the 'default_win' element in the platform data is removed
> and the lcd panel video timing values are moved out of individual window
> configuration data.
>
> Cc: Jingoo Han <jg1.han@samsung.com>
It looks good for SMDK boards.
Acked-by: Jingoo Han <jg1.han@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: JeongHyeon Kim <jhkim@insignal.co.kr>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Kwangwoo Lee <kwangwoo.lee@gmail.com>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Darius Augulis <augulis.darius@gmail.com>
> Cc: Maurus Cuelenaere <mcuelenaere@gmail.com>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
> arch/arm/mach-exynos/mach-nuri.c | 26 ++++++++------
> arch/arm/mach-exynos/mach-origen.c | 24 +++++++-----
> arch/arm/mach-exynos/mach-smdkv310.c | 28 ++++++++------
> arch/arm/mach-exynos/mach-universal_c210.c | 26 ++++++++------
> arch/arm/mach-s3c24xx/mach-smdk2416.c | 27 ++++++++------
> arch/arm/mach-s3c64xx/mach-anw6410.c | 25 +++++++------
> arch/arm/mach-s3c64xx/mach-crag6410.c | 25 +++++++------
> arch/arm/mach-s3c64xx/mach-hmt.c | 24 +++++++-----
> arch/arm/mach-s3c64xx/mach-mini6410.c | 54 ++++++++++++++++-----------
> arch/arm/mach-s3c64xx/mach-real6410.c | 52 +++++++++++++++-----------
> arch/arm/mach-s3c64xx/mach-smartq5.c | 26 ++++++++------
> arch/arm/mach-s3c64xx/mach-smartq7.c | 26 ++++++++------
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 25 +++++++------
> arch/arm/mach-s5p64x0/mach-smdk6440.c | 24 +++++++-----
> arch/arm/mach-s5p64x0/mach-smdk6450.c | 24 +++++++-----
> arch/arm/mach-s5pc100/mach-smdkc100.c | 27 ++++++++------
> arch/arm/mach-s5pv210/mach-aquila.c | 36 ++++++++----------
> arch/arm/mach-s5pv210/mach-goni.c | 26 ++++++++------
> arch/arm/mach-s5pv210/mach-smdkv210.c | 24 +++++++-----
> 19 files changed, 311 insertions(+), 238 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
> index 7ac81ce..a7e6731 100644
> --- a/arch/arm/mach-exynos/mach-nuri.c
> +++ b/arch/arm/mach-exynos/mach-nuri.c
> @@ -212,25 +212,29 @@ static struct platform_device nuri_gpio_keys = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win nuri_fb_win0 = {
> - .win_mode = {
> - .left_margin = 64,
> - .right_margin = 16,
> - .upper_margin = 64,
> - .lower_margin = 1,
> - .hsync_len = 48,
> - .vsync_len = 3,
> - .xres = 1024,
> - .yres = 600,
> - .refresh = 60,
> - },
> .max_bpp = 24,
> .default_bpp = 16,
> + .xres = 1024,
> + .yres = 600,
> .virtual_x = 1024,
> .virtual_y = 2 * 600,
> };
>
> +static struct fb_videomode nuri_lcd_timing = {
> + .left_margin = 64,
> + .right_margin = 16,
> + .upper_margin = 64,
> + .lower_margin = 1,
> + .hsync_len = 48,
> + .vsync_len = 3,
> + .xres = 1024,
> + .yres = 600,
> + .refresh = 60,
> +};
> +
> static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
> .win[0] = &nuri_fb_win0,
> + .vtiming = &nuri_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
> index 25c9b46..de71237 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -583,22 +583,26 @@ static struct platform_device origen_lcd_hv070wsa = {
> };
>
> static struct s3c_fb_pd_win origen_fb_win0 = {
> - .win_mode = {
> - .left_margin = 64,
> - .right_margin = 16,
> - .upper_margin = 64,
> - .lower_margin = 16,
> - .hsync_len = 48,
> - .vsync_len = 3,
> - .xres = 1024,
> - .yres = 600,
> - },
> + .xres = 1024,
> + .yres = 600,
> .max_bpp = 32,
> .default_bpp = 24,
> };
>
> +static struct fb_videomode origen_lcd_timing = {
> + .left_margin = 64,
> + .right_margin = 16,
> + .upper_margin = 64,
> + .lower_margin = 16,
> + .hsync_len = 48,
> + .vsync_len = 3,
> + .xres = 1024,
> + .yres = 600,
> +};
> +
> static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
> .win[0] = &origen_fb_win0,
> + .vtiming = &origen_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> VIDCON1_INV_VCLK,
> diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
> index f08529f..6c00fa6 100644
> --- a/arch/arm/mach-exynos/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos/mach-smdkv310.c
> @@ -157,22 +157,26 @@ static struct platform_device smdkv310_lcd_lte480wv = {
> };
>
> static struct s3c_fb_pd_win smdkv310_fb_win0 = {
> - .win_mode = {
> - .left_margin = 13,
> - .right_margin = 8,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> - .max_bpp = 32,
> - .default_bpp = 24,
> + .max_bpp = 32,
> + .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkv310_lcd_timing = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdkv310_lcd0_pdata __initdata = {
> .win[0] = &smdkv310_fb_win0,
> + .vtiming = &smdkv310_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
> index 57e4418..67a9547 100644
> --- a/arch/arm/mach-exynos/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos/mach-universal_c210.c
> @@ -813,25 +813,29 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win universal_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 2,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 800,
> - .refresh = 55,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> .virtual_x = 480,
> .virtual_y = 2 * 800,
> };
>
> +static struct fb_videomode universal_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 2,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 800,
> + .refresh = 55,
> +};
> +
> static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
> .win[0] = &universal_fb_win0,
> + .vtiming = &universal_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
> diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
> index 30a44f8..c3100a0 100644
> --- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
> +++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
> @@ -148,23 +148,25 @@ static struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
>
> static struct s3c_fb_pd_win smdk2416_fb_win[] = {
> [0] = {
> - /* think this is the same as the smdk6410 */
> - .win_mode = {
> - .pixclock = 41094,
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .default_bpp = 16,
> .max_bpp = 32,
> + .xres = 800,
> + .yres = 480,
> },
> };
>
> +static struct fb_videomode smdk2416_lcd_timing = {
> + .pixclock = 41094,
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> static void s3c2416_fb_gpio_setup_24bpp(void)
> {
> unsigned int gpio;
> @@ -187,6 +189,7 @@ static void s3c2416_fb_gpio_setup_24bpp(void)
>
> static struct s3c_fb_platdata smdk2416_fb_platdata = {
> .win[0] = &smdk2416_fb_win[0],
> + .vtiming = &smdk2416_lcd_timing,
> .setup_gpio = s3c2416_fb_gpio_setup_24bpp,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
> index b86f277..58fd0e3 100644
> --- a/arch/arm/mach-s3c64xx/mach-anw6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
> @@ -134,24 +134,27 @@ static struct platform_device anw6410_lcd_powerdev = {
> };
>
> static struct s3c_fb_pd_win anw6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode anw6410_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata anw6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &anw6410_lcd_timing,
> .win[0] = &anw6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
> index e20bf58..c1ef57e 100644
> --- a/arch/arm/mach-s3c64xx/mach-crag6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
> @@ -151,26 +151,29 @@ static struct platform_device crag6410_lcd_powerdev = {
>
> /* 640x480 URT */
> static struct s3c_fb_pd_win crag6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 150,
> - .right_margin = 80,
> - .upper_margin = 40,
> - .lower_margin = 5,
> - .hsync_len = 40,
> - .vsync_len = 5,
> - .xres = 640,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 640,
> + .yres = 480,
> .virtual_y = 480 * 2,
> .virtual_x = 640,
> };
>
> +static struct fb_videomode crag6410_lcd_timing = {
> + .left_margin = 150,
> + .right_margin = 80,
> + .upper_margin = 40,
> + .lower_margin = 5,
> + .hsync_len = 40,
> + .vsync_len = 5,
> + .xres = 640,
> + .yres = 480,
> +};
> +
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata crag6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &crag6410_lcd_timing,
> .win[0] = &crag6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
> index 521e07b..4e9b1ac 100644
> --- a/arch/arm/mach-s3c64xx/mach-hmt.c
> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c
> @@ -129,23 +129,27 @@ static struct platform_device hmt_backlight_device = {
> };
>
> static struct s3c_fb_pd_win hmt_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode hmt_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata hmt_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &hmt_lcd_timing,
> .win[0] = &hmt_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
> index 34f5195..2f425d5 100644
> --- a/arch/arm/mach-s3c64xx/mach-mini6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
> @@ -152,43 +152,53 @@ static struct s3c2410_platform_nand mini6410_nand_info = {
> };
>
> static struct s3c_fb_pd_win mini6410_lcd_type0_fb_win = {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 272,
> +};
> +
> +static struct fb_videomode mini6410_lcd_type0_timing = {
> + /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 272,
> };
>
> static struct s3c_fb_pd_win mini6410_lcd_type1_fb_win = {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode mini6410_lcd_type1_timing = {
> + /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata mini6410_lcd_pdata[] __initdata = {
> {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &mini6410_lcd_type0_timing,
> .win[0] = &mini6410_lcd_type0_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> }, {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &mini6410_lcd_type1_timing,
> .win[0] = &mini6410_lcd_type1_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> @@ -316,8 +326,8 @@ static void __init mini6410_machine_init(void)
> mini6410_parse_features(&features, mini6410_features_str);
>
> printk(KERN_INFO "MINI6410: selected LCD display is %dx%d\n",
> - mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> - mini6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
> + mini6410_lcd_pdata[features.lcd_index].win[0]->xres,
> + mini6410_lcd_pdata[features.lcd_index].win[0]->yres);
>
> s3c_nand_set_platdata(&mini6410_nand_info);
> s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
> index 21f91e5..0fbd32c 100644
> --- a/arch/arm/mach-s3c64xx/mach-real6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-real6410.c
> @@ -118,43 +118,51 @@ static struct platform_device real6410_device_eth = {
> };
>
> static struct s3c_fb_pd_win real6410_lcd_type0_fb_win = {
> - .win_mode = { /* 4.3" 480x272 */
> - .left_margin = 3,
> - .right_margin = 2,
> - .upper_margin = 1,
> - .lower_margin = 1,
> - .hsync_len = 40,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 272,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 272,
> +};
> +
> +static struct fb_videomode real6410_lcd_type0_timing = {
> + /* 4.3" 480x272 */
> + .left_margin = 3,
> + .right_margin = 2,
> + .upper_margin = 1,
> + .lower_margin = 1,
> + .hsync_len = 40,
> + .vsync_len = 1,
> };
>
> static struct s3c_fb_pd_win real6410_lcd_type1_fb_win = {
> - .win_mode = { /* 7.0" 800x480 */
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode real6410_lcd_type1_timing = {
> + /* 7.0" 800x480 */
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata real6410_lcd_pdata[] __initdata = {
> {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &real6410_lcd_type0_timing,
> .win[0] = &real6410_lcd_type0_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> }, {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &real6410_lcd_type1_timing,
> .win[0] = &real6410_lcd_type1_fb_win,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> @@ -297,8 +305,8 @@ static void __init real6410_machine_init(void)
> real6410_parse_features(&features, real6410_features_str);
>
> printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
> - real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.xres,
> - real6410_lcd_pdata[features.lcd_index].win[0]->win_mode.yres);
> + real6410_lcd_pdata[features.lcd_index].win[0]->xres,
> + real6410_lcd_pdata[features.lcd_index].win[0]->yres);
>
> s3c_fb_set_platdata(&real6410_lcd_pdata[features.lcd_index]);
> s3c_nand_set_platdata(&real6410_nand_info);
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
> index 3f42431..03a2f88 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
> @@ -108,23 +108,27 @@ static struct platform_device smartq5_buttons_device = {
> };
>
> static struct s3c_fb_pd_win smartq5_fb_win0 = {
> - .win_mode = {
> - .left_margin = 216,
> - .right_margin = 40,
> - .upper_margin = 35,
> - .lower_margin = 10,
> - .hsync_len = 1,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smartq5_lcd_timing = {
> + .left_margin = 216,
> + .right_margin = 40,
> + .upper_margin = 35,
> + .lower_margin = 10,
> + .hsync_len = 1,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smartq5_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smartq5_lcd_timing,
> .win[0] = &smartq5_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
> index e5c09b6..4e3b038 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
> @@ -124,23 +124,27 @@ static struct platform_device smartq7_buttons_device = {
> };
>
> static struct s3c_fb_pd_win smartq7_fb_win0 = {
> - .win_mode = {
> - .left_margin = 3,
> - .right_margin = 5,
> - .upper_margin = 1,
> - .lower_margin = 20,
> - .hsync_len = 10,
> - .vsync_len = 3,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smartq7_lcd_timing = {
> + .left_margin = 3,
> + .right_margin = 5,
> + .upper_margin = 1,
> + .lower_margin = 20,
> + .hsync_len = 10,
> + .vsync_len = 3,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smartq7_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smartq7_lcd_timing,
> .win[0] = &smartq7_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index d55bc96..3cfc90f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -146,26 +146,29 @@ static struct platform_device smdk6410_lcd_powerdev = {
> };
>
> static struct s3c_fb_pd_win smdk6410_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> .virtual_y = 480 * 2,
> .virtual_x = 800,
> };
>
> +static struct fb_videomode smdk6410_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
> static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
> .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
> + .vtiming = &smdk6410_lcd_timing,
> .win[0] = &smdk6410_fb_win0,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> index a40e325..92fefad 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> @@ -103,22 +103,26 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdk6440_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdk6440_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdk6440_lcd_pdata __initdata = {
> .win[0] = &smdk6440_fb_win0,
> + .vtiming = &smdk6440_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> index efb69e2..e2335ec 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> @@ -121,22 +121,26 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdk6450_fb_win0 = {
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdk6450_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdk6450_lcd_pdata __initdata = {
> .win[0] = &smdk6450_fb_win0,
> + .vtiming = &smdk6450_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5p64x0_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
> index 674d229..0c3ae38 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -136,24 +136,27 @@ static struct platform_device smdkc100_lcd_powerdev = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win smdkc100_fb_win0 = {
> - /* this is to ensure we use win0 */
> - .win_mode = {
> - .left_margin = 8,
> - .right_margin = 13,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - .refresh = 80,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkc100_lcd_timing = {
> + .left_margin = 8,
> + .right_margin = 13,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> + .refresh = 80,
> };
>
> static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
> .win[0] = &smdkc100_fb_win0,
> + .vtiming = &smdkc100_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5pc100_fb_gpio_setup_24bpp,
> diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
> index a9ea64e..7b91bbf 100644
> --- a/arch/arm/mach-s5pv210/mach-aquila.c
> +++ b/arch/arm/mach-s5pv210/mach-aquila.c
> @@ -96,38 +96,34 @@ static struct s3c2410_uartcfg aquila_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win aquila_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 3,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 2,
> - .xres = 480,
> - .yres = 800,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> };
>
> static struct s3c_fb_pd_win aquila_fb_win1 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 3,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 2,
> - .xres = 480,
> - .yres = 800,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> +};
> +
> +static struct fb_videomode aquila_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 3,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 2,
> + .xres = 480,
> + .yres = 800,
> };
>
> static struct s3c_fb_platdata aquila_lcd_pdata __initdata = {
> .win[0] = &aquila_fb_win0,
> .win[1] = &aquila_fb_win1,
> + .vtiming = &aquila_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC |
> VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
> diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
> index 2cf5ed7..07a840d 100644
> --- a/arch/arm/mach-s5pv210/mach-goni.c
> +++ b/arch/arm/mach-s5pv210/mach-goni.c
> @@ -105,25 +105,29 @@ static struct s3c2410_uartcfg goni_uartcfgs[] __initdata = {
>
> /* Frame Buffer */
> static struct s3c_fb_pd_win goni_fb_win0 = {
> - .win_mode = {
> - .left_margin = 16,
> - .right_margin = 16,
> - .upper_margin = 2,
> - .lower_margin = 28,
> - .hsync_len = 2,
> - .vsync_len = 1,
> - .xres = 480,
> - .yres = 800,
> - .refresh = 55,
> - },
> .max_bpp = 32,
> .default_bpp = 16,
> + .xres = 480,
> + .yres = 800,
> .virtual_x = 480,
> .virtual_y = 2 * 800,
> };
>
> +static struct fb_videomode goni_lcd_timing = {
> + .left_margin = 16,
> + .right_margin = 16,
> + .upper_margin = 2,
> + .lower_margin = 28,
> + .hsync_len = 2,
> + .vsync_len = 1,
> + .xres = 480,
> + .yres = 800,
> + .refresh = 55,
> +};
> +
> static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
> .win[0] = &goni_fb_win0,
> + .vtiming = &goni_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> VIDCON0_CLKSEL_LCD,
> .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
> index 91d4ad8..5e0c955 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -189,22 +189,26 @@ static struct platform_device smdkv210_lcd_lte480wv = {
> };
>
> static struct s3c_fb_pd_win smdkv210_fb_win0 = {
> - .win_mode = {
> - .left_margin = 13,
> - .right_margin = 8,
> - .upper_margin = 7,
> - .lower_margin = 5,
> - .hsync_len = 3,
> - .vsync_len = 1,
> - .xres = 800,
> - .yres = 480,
> - },
> .max_bpp = 32,
> .default_bpp = 24,
> + .xres = 800,
> + .yres = 480,
> +};
> +
> +static struct fb_videomode smdkv210_lcd_timing = {
> + .left_margin = 13,
> + .right_margin = 8,
> + .upper_margin = 7,
> + .lower_margin = 5,
> + .hsync_len = 3,
> + .vsync_len = 1,
> + .xres = 800,
> + .yres = 480,
> };
>
> static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
> .win[0] = &smdkv210_fb_win0,
> + .vtiming = &smdkv210_lcd_timing,
> .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
> .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
> --
> 1.6.6.rc2
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox