From 5c1f96f4cffbdde9e194f3ae5373953f3fa12836 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 3 Mar 2010 09:16:54 +0100 Subject: [PATCH 1/3] OMAP: DSS2: VRAM: Fix early_param for vram In commit 2b0d8c251b8876d530a6bf671eb5425838fa698a the __early_param is replaced with the generic early_param. This patch fixes the parameter passing for the vram. Signed-off-by: Thomas Weber [tomi.valkeinen@nokia.com: changed the commit prefix] Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/vram.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index 55a4de5e5d10..b266ffae0bde 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c @@ -511,13 +511,14 @@ static u32 omap_vram_sdram_size __initdata; static u32 omap_vram_def_sdram_size __initdata; static u32 omap_vram_def_sdram_start __initdata; -static void __init omap_vram_early_vram(char **p) +static int __init omap_vram_early_vram(char *p) { - omap_vram_def_sdram_size = memparse(*p, p); - if (**p == ',') - omap_vram_def_sdram_start = simple_strtoul((*p) + 1, p, 16); + omap_vram_def_sdram_size = memparse(p, &p); + if (*p == ',') + omap_vram_def_sdram_start = simple_strtoul(p + 1, &p, 16); + return 0; } -__early_param("vram=", omap_vram_early_vram); +early_param("vram", omap_vram_early_vram); /* * Called from map_io. We need to call to this early enough so that we From ce619e1fb86d68f125e0e6d10a5484f67a6d97b3 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 12 Mar 2010 12:46:05 +0200 Subject: [PATCH 2/3] OMAP: DSS2: initialize dss clk sources properly Clk sources were not initialized, leading to kernel crash, or possibly to strange behaviour if DSI was compiled in. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/dss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 8254a4232a53..54344184dd73 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c @@ -590,6 +590,9 @@ int dss_init(bool skip_init) } } + dss.dsi_clk_source = DSS_SRC_DSS1_ALWON_FCLK; + dss.dispc_clk_source = DSS_SRC_DSS1_ALWON_FCLK; + dss_save_context(); rev = dss_read_reg(DSS_REVISION); From 8871d54b5e1558bd59baad02eb7a80f86d49f4a1 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 4 Mar 2010 17:52:43 +0200 Subject: [PATCH 3/3] OMAP: DSS2: panel-generic: re-implement mode changing Mode changing code was left out with the DSS driver remodeling. Add the code back. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/displays/panel-generic.c | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c index c59e4baed8b2..300eff5de1b4 100644 --- a/drivers/video/omap2/displays/panel-generic.c +++ b/drivers/video/omap2/displays/panel-generic.c @@ -116,6 +116,24 @@ static int generic_panel_resume(struct omap_dss_device *dssdev) return 0; } +static void generic_panel_set_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + dpi_set_timings(dssdev, timings); +} + +static void generic_panel_get_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + *timings = dssdev->panel.timings; +} + +static int generic_panel_check_timings(struct omap_dss_device *dssdev, + struct omap_video_timings *timings) +{ + return dpi_check_timings(dssdev, timings); +} + static struct omap_dss_driver generic_driver = { .probe = generic_panel_probe, .remove = generic_panel_remove, @@ -125,6 +143,10 @@ static struct omap_dss_driver generic_driver = { .suspend = generic_panel_suspend, .resume = generic_panel_resume, + .set_timings = generic_panel_set_timings, + .get_timings = generic_panel_get_timings, + .check_timings = generic_panel_check_timings, + .driver = { .name = "generic_panel", .owner = THIS_MODULE,