From 19c3e7433301c85c65b48080f6929eda0cca8818 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 16 Sep 2008 09:13:06 +0000 Subject: linux-omap git: refresh patchset --- .../000-mru-make-video-mode-selcatable.diff | 155 ---------- .../linux/linux-omap/001-mru-enable-overlay.diff | 113 -------- .../linux-omap/002-mru-set-default-800x600.diff | 61 ---- .../003-mru-omapfb-more-video-modes.diff | 317 --------------------- .../004-mru-export-omapfb-register-panel.diff | 25 -- .../005-mru-add-omapfb-unregister-panel.diff | 67 ----- .../linux/linux-omap/006-mru-lcd-as-modules.diff | 174 ----------- .../linux/linux-omap/007-mru-omapfb-as-module.diff | 50 ---- .../008-mru-lcd-omap3beagle-license.diff | 22 -- .../linux-omap/009-mru-unregister-beagle-lcd.diff | 24 -- packages/linux/linux-omap/01-fix-timing-print.diff | 23 -- .../linux/linux-omap/03-enable-overlay-opt.diff | 27 -- .../linux/linux-omap/05-fix-display-panning.diff | 45 --- packages/linux/linux-omap/06-ensure-fclk.diff | 31 -- packages/linux/linux-omap/07-set-burst-size.diff | 21 -- packages/linux/linux-omap/beagleboard/defconfig | 2 +- .../linux/linux-omap/mru-add-clk-get-parent.diff | 64 +++++ packages/linux/linux-omap/mru-clocks1.diff | 25 -- packages/linux/linux-omap/mru-clocks2.diff | 62 ---- packages/linux/linux-omap/mru-clocks3.diff | 94 ------ .../mru-enable-overlay-optimalization.diff | 117 ++++++++ .../linux/linux-omap/mru-fix-display-panning.diff | 49 ++++ packages/linux/linux-omap/mru-fix-timings.diff | 26 ++ .../linux-omap/mru-improve-pixclock-config.diff | 93 ++++++ .../mru-make-dpll4-m4-ck-programmable.diff | 27 ++ .../mru-make-video-timings-selectable.diff | 312 ++++++++++++++++++++ packages/linux/linux-omap/no-cortex-deadlock.patch | 68 ++--- packages/linux/linux-omap/omap3evm/defconfig | 24 +- .../linux/linux-omap/strongly-ordered-memory.diff | 18 ++ packages/linux/linux-omap_git.bb | 31 +- 30 files changed, 763 insertions(+), 1404 deletions(-) delete mode 100644 packages/linux/linux-omap/000-mru-make-video-mode-selcatable.diff delete mode 100644 packages/linux/linux-omap/001-mru-enable-overlay.diff delete mode 100644 packages/linux/linux-omap/002-mru-set-default-800x600.diff delete mode 100644 packages/linux/linux-omap/003-mru-omapfb-more-video-modes.diff delete mode 100644 packages/linux/linux-omap/004-mru-export-omapfb-register-panel.diff delete mode 100644 packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff delete mode 100644 packages/linux/linux-omap/006-mru-lcd-as-modules.diff delete mode 100644 packages/linux/linux-omap/007-mru-omapfb-as-module.diff delete mode 100644 packages/linux/linux-omap/008-mru-lcd-omap3beagle-license.diff delete mode 100644 packages/linux/linux-omap/009-mru-unregister-beagle-lcd.diff delete mode 100644 packages/linux/linux-omap/01-fix-timing-print.diff delete mode 100644 packages/linux/linux-omap/03-enable-overlay-opt.diff delete mode 100644 packages/linux/linux-omap/05-fix-display-panning.diff delete mode 100644 packages/linux/linux-omap/06-ensure-fclk.diff delete mode 100644 packages/linux/linux-omap/07-set-burst-size.diff create mode 100644 packages/linux/linux-omap/mru-add-clk-get-parent.diff delete mode 100644 packages/linux/linux-omap/mru-clocks1.diff delete mode 100644 packages/linux/linux-omap/mru-clocks2.diff delete mode 100644 packages/linux/linux-omap/mru-clocks3.diff create mode 100644 packages/linux/linux-omap/mru-enable-overlay-optimalization.diff create mode 100644 packages/linux/linux-omap/mru-fix-display-panning.diff create mode 100644 packages/linux/linux-omap/mru-fix-timings.diff create mode 100644 packages/linux/linux-omap/mru-improve-pixclock-config.diff create mode 100644 packages/linux/linux-omap/mru-make-dpll4-m4-ck-programmable.diff create mode 100644 packages/linux/linux-omap/mru-make-video-timings-selectable.diff create mode 100644 packages/linux/linux-omap/strongly-ordered-memory.diff diff --git a/packages/linux/linux-omap/000-mru-make-video-mode-selcatable.diff b/packages/linux/linux-omap/000-mru-make-video-mode-selcatable.diff deleted file mode 100644 index e36aeb5cff..0000000000 --- a/packages/linux/linux-omap/000-mru-make-video-mode-selcatable.diff +++ /dev/null @@ -1,155 +0,0 @@ -From: Mans Rullgard -Date: Mon, 18 Aug 2008 22:55:09 +0000 (+0100) -Subject: OMAP: Make video mode commandline-selectable from pre-defined list -X-Git-Tag: beagle-9 -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=c76a61167997a1dc680c421b1cdb753dfd492b0a - -OMAP: Make video mode commandline-selectable from pre-defined list - -This adds a (small) list of video modes and allows one to be -selected with video=omapfb:mode:name on the command line, -overriding the defaults from lcd_*.c. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h -index a4a84f3..92e9ffd 100644 ---- a/arch/arm/plat-omap/include/mach/omapfb.h -+++ b/arch/arm/plat-omap/include/mach/omapfb.h -@@ -192,6 +192,20 @@ enum omapfb_update_mode { - - struct omapfb_device; - -+struct video_mode { -+ const char *name; -+ int x_res, y_res; -+ int pixel_clock; /* In kHz */ -+ int hsw; /* Horizontal synchronization -+ pulse width */ -+ int hfp; /* Horizontal front porch */ -+ int hbp; /* Horizontal back porch */ -+ int vsw; /* Vertical synchronization -+ pulse width */ -+ int vfp; /* Vertical front porch */ -+ int vbp; /* Vertical back porch */ -+}; -+ - struct lcd_panel { - const char *name; - int config; /* TFT/STN, signal inversion */ -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 24242b9..f2229b1 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -40,6 +40,7 @@ static unsigned long def_vxres; - static unsigned long def_vyres; - static unsigned int def_rotate; - static unsigned int def_mirror; -+static int def_mode = -1; - - #ifdef CONFIG_FB_OMAP_MANUAL_UPDATE - static int manual_update = 1; -@@ -80,6 +81,57 @@ static struct caps_table_struct color_caps[] = { - { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, - }; - -+static const struct video_mode video_modes[] = { -+ { -+ .name = "1280x720@50", -+ .x_res = 1280, -+ .y_res = 720, -+ .hfp = 440, -+ .hsw = 40, -+ .hbp = 220, -+ .vfp = 20, -+ .vsw = 5, -+ .vbp = 5, -+ .pixel_clock = 74250, -+ }, -+ { -+ .name = "1280x720@60", -+ .x_res = 1280, -+ .y_res = 720, -+ .hfp = 110, -+ .hsw = 40, -+ .hbp = 220, -+ .vfp = 20, -+ .vsw = 5, -+ .vbp = 5, -+ .pixel_clock = 74250, -+ }, -+ { -+ .name = "1920x1080@24", -+ .x_res = 1920, -+ .y_res = 1080, -+ .hfp = 148, -+ .hsw = 44, -+ .hbp = 638, -+ .vfp = 36, -+ .vsw = 5, -+ .vbp = 4, -+ .pixel_clock = 74160, -+ }, -+ { -+ .name = "1920x1080@25", -+ .x_res = 1920, -+ .y_res = 1080, -+ .hfp = 148, -+ .hsw = 44, -+ .hbp = 528, -+ .vfp = 36, -+ .vsw = 5, -+ .vbp = 4, -+ .pixel_clock = 74250, -+ } -+}; -+ - /* - * --------------------------------------------------------------------------- - * LCD panel -@@ -1711,6 +1763,18 @@ static int omapfb_do_probe(struct platform_device *pdev, - goto cleanup; - } - -+ if (def_mode != -1) { -+ fbdev->panel->x_res = video_modes[def_mode].x_res; -+ fbdev->panel->y_res = video_modes[def_mode].y_res; -+ fbdev->panel->pixel_clock = video_modes[def_mode].pixel_clock; -+ fbdev->panel->hsw = video_modes[def_mode].hsw; -+ fbdev->panel->hfp = video_modes[def_mode].hfp; -+ fbdev->panel->hbp = video_modes[def_mode].hbp; -+ fbdev->panel->vsw = video_modes[def_mode].vsw; -+ fbdev->panel->vfp = video_modes[def_mode].vfp; -+ fbdev->panel->vbp = video_modes[def_mode].vbp; -+ } -+ - r = fbdev->panel->init(fbdev->panel, fbdev); - if (r) - goto cleanup; -@@ -1867,6 +1931,16 @@ static struct platform_driver omapfb_driver = { - }, - }; - -+static int __init omapfb_find_mode(char *mode) -+{ -+ int i; -+ -+ for (i = 0; i < sizeof(video_modes)/sizeof(video_modes[0]); i++) -+ if (!strcmp(mode, video_modes[i].name)) -+ return i; -+ return -1; -+} -+ - #ifndef MODULE - - /* Process kernel command line parameters */ -@@ -1915,6 +1989,8 @@ static int __init omapfb_setup(char *options) - def_mirror = (simple_strtoul(this_opt + 7, NULL, 0)); - else if (!strncmp(this_opt, "manual_update", 13)) - manual_update = 1; -+ else if (!strncmp(this_opt, "mode:", 5)) -+ def_mode = omapfb_find_mode(this_opt + 5); - else { - pr_debug("omapfb: invalid option\n"); - r = -1; diff --git a/packages/linux/linux-omap/001-mru-enable-overlay.diff b/packages/linux/linux-omap/001-mru-enable-overlay.diff deleted file mode 100644 index 8666c4ac9a..0000000000 --- a/packages/linux/linux-omap/001-mru-enable-overlay.diff +++ /dev/null @@ -1,113 +0,0 @@ -From: Mans Rullgard -Date: Thu, 28 Aug 2008 21:20:39 +0000 (+0100) -Subject: OMAP: Enable overlay optimisation when possible -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=5a7378bb691e76ce247f39f79e1a928166f1aed9 - -OMAP: Enable overlay optimisation when possible ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index 7c525f5..1d56ee0 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -315,6 +315,60 @@ void omap_dispc_enable_digit_out(int enable) - } - EXPORT_SYMBOL(omap_dispc_enable_digit_out); - -+#define MIN(a, b) ((a)<(b)?(a):(b)) -+#define MAX(a, b) ((a)>(b)?(a):(b)) -+ -+static void setup_overlay_opt(void) -+{ -+ struct fb_info **fbi = dispc.fbdev->fb_info; -+ struct omapfb_plane_struct *gfx, *vid; -+ struct fb_var_screeninfo *gvar; -+ unsigned gx, gx2, gy, gy2, gw, gh; -+ unsigned vx, vx2, vy, vy2, vw, vh; -+ unsigned bpp, skip; -+ static unsigned last_skip; -+ -+ if (!fbi[0] || !fbi[1]) -+ return; -+ -+ gfx = fbi[0]->par; -+ vid = fbi[1]->par; -+ gvar = &fbi[0]->var; -+ -+ gx = gfx->info.pos_x; -+ gy = gfx->info.pos_y; -+ gw = gfx->info.out_width; -+ gh = gfx->info.out_height; -+ vx = vid->info.pos_x; -+ vy = vid->info.pos_y; -+ vw = vid->info.out_width; -+ vh = vid->info.out_height; -+ gx2 = gx + gw; -+ gy2 = gy + gh; -+ vx2 = vx + vw; -+ vy2 = vy + vh; -+ bpp = gvar->bits_per_pixel / 8; -+ -+ if (!gfx->info.enabled || !vid->info.enabled || -+ dispc.color_key.key_type != OMAPFB_COLOR_KEY_DISABLED) { -+ skip = 0; -+ } else if (vx <= gx && vx2 >= gx2) { -+ unsigned y = MIN(gy2, vy2) - MAX(gy, vy); -+ skip = y * gvar->xres_virtual * bpp; -+ } else if (vx <= gx || vx2 >= gx2) { -+ unsigned x = MIN(gx2, vx2) - MAX(gx, vx); -+ skip = x * bpp; -+ } else { -+ skip = vw * bpp + 1; -+ } -+ -+ if (skip != last_skip) { -+ last_skip = skip; -+ dispc_write_reg(DISPC_GFX_WINDOW_SKIP, skip); -+ MOD_REG_FLD(DISPC_CONTROL, 1<<12, !!skip<<12); -+ } -+} -+ - static inline int _setup_plane(int plane, int channel_out, - u32 paddr, int screen_width, - int pos_x, int pos_y, int width, int height, -@@ -437,6 +491,9 @@ static inline int _setup_plane(int plane, int channel_out, - - dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1); - -+ if (plane < 2) -+ setup_overlay_opt(); -+ - MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); - - return height * screen_width * bpp / 8; -@@ -586,13 +643,19 @@ static int omap_dispc_enable_plane(int plane, int enable) - const u32 at_reg[] = { DISPC_GFX_ATTRIBUTES, - DISPC_VID1_BASE + DISPC_VID_ATTRIBUTES, - DISPC_VID2_BASE + DISPC_VID_ATTRIBUTES }; -- unsigned overlay_opt = plane & !!enable & !dispc.color_key.key_type; -+ struct omapfb_plane_struct *pi; -+ - if ((unsigned int)plane > dispc.mem_desc.region_cnt) - return -EINVAL; - -+ pi = dispc.fbdev->fb_info[plane]->par; -+ pi->info.enabled = enable; -+ - enable_lcd_clocks(1); - MOD_REG_FLD(at_reg[plane], 1, enable ? 1 : 0); -- MOD_REG_FLD(DISPC_CONTROL, 1<<12 | 1<<5, overlay_opt<<12 | 1<<5); -+ if (plane < 2) -+ setup_overlay_opt(); -+ MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); - enable_lcd_clocks(0); - - return 0; -@@ -636,6 +699,7 @@ static int omap_dispc_set_color_key(struct omapfb_color_key *ck) - if (val != 0) - dispc_write_reg(tr_reg, ck->trans_key); - dispc_write_reg(df_reg, ck->background); -+ setup_overlay_opt(); - enable_lcd_clocks(0); - - dispc.color_key = *ck; diff --git a/packages/linux/linux-omap/002-mru-set-default-800x600.diff b/packages/linux/linux-omap/002-mru-set-default-800x600.diff deleted file mode 100644 index b45f849ba4..0000000000 --- a/packages/linux/linux-omap/002-mru-set-default-800x600.diff +++ /dev/null @@ -1,61 +0,0 @@ -From: Mans Rullgard -Date: Fri, 29 Aug 2008 00:42:02 +0000 (+0100) -Subject: OMAP: Set Beagleboard default video mode to 800x600 60Hz -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=17b546e6d65aee124a2b691727cdb2c1dcadaec5 - -OMAP: Set Beagleboard default video mode to 800x600 60Hz - -This sets the default video mode on the Beagleboard to -800x600 60Hz VESA CVT 0.48M3-R, 16bpp. This is compatible -with a wider range of monitors than the old default values. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c -index 9637735..f2861ec 100644 ---- a/drivers/video/omap/lcd_omap3beagle.c -+++ b/drivers/video/omap/lcd_omap3beagle.c -@@ -31,10 +31,6 @@ - - #define LCD_PANEL_ENABLE_GPIO 170 - --#define LCD_XRES 1024 --#define LCD_YRES 768 --#define LCD_PIXCLOCK 64000 /* in kHz */ -- - static int omap3beagle_panel_init(struct lcd_panel *panel, - struct omapfb_device *fbdev) - { -@@ -65,19 +61,19 @@ static unsigned long omap3beagle_panel_get_caps(struct lcd_panel *panel) - struct lcd_panel omap3beagle_panel = { - .name = "omap3beagle", - .config = OMAP_LCDC_PANEL_TFT, -- -- .bpp = 24, -+ .bpp = 16, - .data_lines = 24, -- .x_res = LCD_XRES, -- .y_res = LCD_YRES, -- .hsw = 3, /* hsync_len (4) - 1 */ -- .hfp = 3, /* right_margin (4) - 1 */ -- .hbp = 39, /* left_margin (40) - 1 */ -- .vsw = 1, /* vsync_len (2) - 1 */ -- .vfp = 2, /* lower_margin */ -- .vbp = 7, /* upper_margin (8) - 1 */ -- -- .pixel_clock = LCD_PIXCLOCK, -+ -+ /* 800 x 600 @ 60 Hz Reduced blanking VESA CVT 0.48M3-R */ -+ .x_res = 800, -+ .y_res = 600, -+ .hfp = 48, -+ .hsw = 32, -+ .hbp = 80, -+ .vfp = 3, -+ .vsw = 4, -+ .vbp = 11, -+ .pixel_clock = 35500, - - .init = omap3beagle_panel_init, - .cleanup = omap3beagle_panel_cleanup, diff --git a/packages/linux/linux-omap/003-mru-omapfb-more-video-modes.diff b/packages/linux/linux-omap/003-mru-omapfb-more-video-modes.diff deleted file mode 100644 index 34241640eb..0000000000 --- a/packages/linux/linux-omap/003-mru-omapfb-more-video-modes.diff +++ /dev/null @@ -1,317 +0,0 @@ -From: Mans Rullgard -Date: Fri, 29 Aug 2008 08:28:31 +0000 (+0100) -Subject: OMAP: Add more video modes, and make the default configurable -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=ef272670f19fac8fb0ceb82933927dab1fb496b7 - -OMAP: Add more video modes, and make the default configurable ---- - -diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h -index 92e9ffd..a4a84f3 100644 ---- a/arch/arm/plat-omap/include/mach/omapfb.h -+++ b/arch/arm/plat-omap/include/mach/omapfb.h -@@ -192,20 +192,6 @@ enum omapfb_update_mode { - - struct omapfb_device; - --struct video_mode { -- const char *name; -- int x_res, y_res; -- int pixel_clock; /* In kHz */ -- int hsw; /* Horizontal synchronization -- pulse width */ -- int hfp; /* Horizontal front porch */ -- int hbp; /* Horizontal back porch */ -- int vsw; /* Vertical synchronization -- pulse width */ -- int vfp; /* Vertical front porch */ -- int vbp; /* Vertical back porch */ --}; -- - struct lcd_panel { - const char *name; - int config; /* TFT/STN, signal inversion */ -diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig -index bdeb8fb..9977e80 100644 ---- a/drivers/video/omap/Kconfig -+++ b/drivers/video/omap/Kconfig -@@ -7,6 +7,14 @@ config FB_OMAP - help - Frame buffer driver for OMAP based boards. - -+config FB_OMAP_VIDEO_MODE -+ string "Default video mode" -+ depends on FB_OMAP -+ help -+ Enter video mode name to use if none is specified on the kernel -+ command line. If left blank, board-specific default timings -+ will be used. See omapfb_main.c for a list of valid mode names. -+ - config FB_OMAP_LCDC_EXTERNAL - bool "External LCD controller support" - depends on FB_OMAP -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index f2229b1..2e53d8f 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -33,6 +33,20 @@ - - #define MODULE_NAME "omapfb" - -+struct video_mode { -+ const char *name; -+ int x_res, y_res; -+ int pixel_clock; /* In kHz */ -+ int hsw; /* Horizontal synchronization -+ pulse width */ -+ int hfp; /* Horizontal front porch */ -+ int hbp; /* Horizontal back porch */ -+ int vsw; /* Vertical synchronization -+ pulse width */ -+ int vfp; /* Vertical front porch */ -+ int vbp; /* Vertical back porch */ -+}; -+ - static unsigned int def_accel; - static unsigned long def_vram[OMAPFB_PLANE_NUM]; - static int def_vram_cnt; -@@ -40,7 +54,7 @@ static unsigned long def_vxres; - static unsigned long def_vyres; - static unsigned int def_rotate; - static unsigned int def_mirror; --static int def_mode = -1; -+static char def_mode[16] = CONFIG_FB_OMAP_VIDEO_MODE; - - #ifdef CONFIG_FB_OMAP_MANUAL_UPDATE - static int manual_update = 1; -@@ -51,6 +65,7 @@ static int manual_update; - static struct platform_device *fbdev_pdev; - static struct lcd_panel *fbdev_panel; - static struct omapfb_device *omapfb_dev; -+static struct video_mode video_mode; - - struct caps_table_struct { - unsigned long flag; -@@ -81,9 +96,88 @@ static struct caps_table_struct color_caps[] = { - { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, - }; - --static const struct video_mode video_modes[] = { -+static struct video_mode video_modes[] __initdata = { -+ { -+ /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ -+ .name = "640x480@60", -+ .x_res = 640, -+ .y_res = 480, -+ .hfp = 48, -+ .hsw = 32, -+ .hbp = 80, -+ .vfp = 3, -+ .vsw = 4, -+ .vbp = 7, -+ .pixel_clock = 23500, -+ }, -+ { -+ /* 800 x 600 @ 60 Hz Reduced blanking VESA CVT 0.48M3-R */ -+ .name = "800x600@60", -+ .x_res = 800, -+ .y_res = 600, -+ .hfp = 48, -+ .hsw = 32, -+ .hbp = 80, -+ .vfp = 3, -+ .vsw = 4, -+ .vbp = 11, -+ .pixel_clock = 35500, -+ }, -+ { -+ /* 1024 x 768 @ 60 Hz Reduced blanking VESA CVT 0.79M3-R */ -+ .name = "1024x768@60", -+ .x_res = 1024, -+ .y_res = 768, -+ .hfp = 48, -+ .hsw = 32, -+ .hbp = 80, -+ .vfp = 3, -+ .vsw = 4, -+ .vbp = 15, -+ .pixel_clock = 56000, -+ }, -+ { -+ /* 1280 x 720 @ 60 Hz Reduced blanking VESA CVT 0.92M9-R */ -+ .name = "1280x720@60", -+ .x_res = 1280, -+ .y_res = 720, -+ .hfp = 48, -+ .hsw = 32, -+ .hbp = 80, -+ .vfp = 3, -+ .vsw = 5, -+ .vbp = 13, -+ .pixel_clock = 64000, -+ }, -+ { -+ /* 720 x 480 @ 60 Hz CEA-861 Format 3 */ -+ .name = "480p60", -+ .x_res = 720, -+ .y_res = 480, -+ .hfp = 16, -+ .hsw = 62, -+ .hbp = 60, -+ .vfp = 9, -+ .vsw = 6, -+ .vbp = 30, -+ .pixel_clock = 27027, -+ }, -+ { -+ /* 720 x 576 @ 60 Hz CEA-861 Format 18 */ -+ .name = "576p50", -+ .x_res = 720, -+ .y_res = 576, -+ .hfp = 12, -+ .hsw = 64, -+ .hbp = 68, -+ .vfp = 5, -+ .vsw = 5, -+ .vbp = 39, -+ .pixel_clock = 27000, -+ }, - { -- .name = "1280x720@50", -+ /* 1280 x 720 @ 50 Hz CEA-861B Format 19 */ -+ .name = "720p50", - .x_res = 1280, - .y_res = 720, - .hfp = 440, -@@ -95,7 +189,8 @@ static const struct video_mode video_modes[] = { - .pixel_clock = 74250, - }, - { -- .name = "1280x720@60", -+ /* 1280 x 720 @ 60 Hz CEA-861B Format 4 */ -+ .name = "720p60", - .x_res = 1280, - .y_res = 720, - .hfp = 110, -@@ -107,7 +202,8 @@ static const struct video_mode video_modes[] = { - .pixel_clock = 74250, - }, - { -- .name = "1920x1080@24", -+ /* 1920 x 1080 @ 24 Hz CEA-861B Format 32 */ -+ .name = "1080p24", - .x_res = 1920, - .y_res = 1080, - .hfp = 148, -@@ -116,10 +212,11 @@ static const struct video_mode video_modes[] = { - .vfp = 36, - .vsw = 5, - .vbp = 4, -- .pixel_clock = 74160, -+ .pixel_clock = 74250, - }, - { -- .name = "1920x1080@25", -+ /* 1920 x 1080 @ 25 Hz CEA-861B Format 33 */ -+ .name = "1080p25", - .x_res = 1920, - .y_res = 1080, - .hfp = 148, -@@ -129,7 +226,20 @@ static const struct video_mode video_modes[] = { - .vsw = 5, - .vbp = 4, - .pixel_clock = 74250, -- } -+ }, -+ { -+ /* 1920 x 1080 @ 25 Hz CEA-861B Format 34 */ -+ .name = "1080p30", -+ .x_res = 1920, -+ .y_res = 1080, -+ .hfp = 148, -+ .hsw = 44, -+ .hbp = 88, -+ .vfp = 36, -+ .vsw = 5, -+ .vbp = 4, -+ .pixel_clock = 74250, -+ }, - }; - - /* -@@ -1763,16 +1873,18 @@ static int omapfb_do_probe(struct platform_device *pdev, - goto cleanup; - } - -- if (def_mode != -1) { -- fbdev->panel->x_res = video_modes[def_mode].x_res; -- fbdev->panel->y_res = video_modes[def_mode].y_res; -- fbdev->panel->pixel_clock = video_modes[def_mode].pixel_clock; -- fbdev->panel->hsw = video_modes[def_mode].hsw; -- fbdev->panel->hfp = video_modes[def_mode].hfp; -- fbdev->panel->hbp = video_modes[def_mode].hbp; -- fbdev->panel->vsw = video_modes[def_mode].vsw; -- fbdev->panel->vfp = video_modes[def_mode].vfp; -- fbdev->panel->vbp = video_modes[def_mode].vbp; -+ if (video_mode.name) { -+ pr_info("omapfb: using mode %s\n", video_mode.name); -+ -+ fbdev->panel->x_res = video_mode.x_res; -+ fbdev->panel->y_res = video_mode.y_res; -+ fbdev->panel->pixel_clock = video_mode.pixel_clock; -+ fbdev->panel->hsw = video_mode.hsw; -+ fbdev->panel->hfp = video_mode.hfp; -+ fbdev->panel->hbp = video_mode.hbp; -+ fbdev->panel->vsw = video_mode.vsw; -+ fbdev->panel->vfp = video_mode.vfp; -+ fbdev->panel->vbp = video_mode.vbp; - } - - r = fbdev->panel->init(fbdev->panel, fbdev); -@@ -1931,14 +2043,15 @@ static struct platform_driver omapfb_driver = { - }, - }; - --static int __init omapfb_find_mode(char *mode) -+static void __init omapfb_find_mode(char *name, struct video_mode *vmode) - { - int i; - - for (i = 0; i < sizeof(video_modes)/sizeof(video_modes[0]); i++) -- if (!strcmp(mode, video_modes[i].name)) -- return i; -- return -1; -+ if (!strcmp(name, video_modes[i].name)) { -+ *vmode = video_modes[i]; -+ break; -+ } - } - - #ifndef MODULE -@@ -1990,7 +2103,7 @@ static int __init omapfb_setup(char *options) - else if (!strncmp(this_opt, "manual_update", 13)) - manual_update = 1; - else if (!strncmp(this_opt, "mode:", 5)) -- def_mode = omapfb_find_mode(this_opt + 5); -+ strncpy(def_mode, this_opt + 5, sizeof(def_mode)); - else { - pr_debug("omapfb: invalid option\n"); - r = -1; -@@ -2012,6 +2125,9 @@ static int __init omapfb_init(void) - return -ENODEV; - omapfb_setup(option); - #endif -+ -+ omapfb_find_mode(def_mode, &video_mode); -+ - /* Register the driver with LDM */ - if (platform_driver_register(&omapfb_driver)) { - pr_debug("failed to register omapfb driver\n"); -@@ -2033,6 +2149,7 @@ module_param_named(vyres, def_vyres, long, 0664); - module_param_named(rotate, def_rotate, uint, 0664); - module_param_named(mirror, def_mirror, uint, 0664); - module_param_named(manual_update, manual_update, bool, 0664); -+module_param_string(video_mode, def_mode, sizeof(def_mode), 0664); - - module_init(omapfb_init); - module_exit(omapfb_cleanup); diff --git a/packages/linux/linux-omap/004-mru-export-omapfb-register-panel.diff b/packages/linux/linux-omap/004-mru-export-omapfb-register-panel.diff deleted file mode 100644 index 24ebcdea52..0000000000 --- a/packages/linux/linux-omap/004-mru-export-omapfb-register-panel.diff +++ /dev/null @@ -1,25 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 20:56:03 +0000 (+0100) -Subject: OMAP: Export omapfb_register_panel() -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=44811584aded9e47a83d69ad31002a6bb94730dc - -OMAP: Export omapfb_register_panel() - -This exports omapfb_register_panel() for use by LCD drivers built -as modules. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 2e53d8f..912cb0c 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -1997,6 +1997,7 @@ void omapfb_register_panel(struct lcd_panel *panel) - if (fbdev_pdev != NULL) - omapfb_do_probe(fbdev_pdev, fbdev_panel); - } -+EXPORT_SYMBOL(omapfb_register_panel); - - /* Called when the device is being detached from the driver */ - static int omapfb_remove(struct platform_device *pdev) diff --git a/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff b/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff deleted file mode 100644 index faee384e74..0000000000 --- a/packages/linux/linux-omap/005-mru-add-omapfb-unregister-panel.diff +++ /dev/null @@ -1,67 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 20:57:59 +0000 (+0100) -Subject: OMAP: Add omapfb_unregister_panel() function -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=85b5d3ba7221193cb2315256b69e97f34d2ae3b7 - -OMAP: Add omapfb_unregister_panel() function - -This adds the function omapfb_unregister_panel() for use by LCD -drivers built as modules. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/arch/arm/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h -index a4a84f3..3ccb076 100644 ---- a/arch/arm/plat-omap/include/mach/omapfb.h -+++ b/arch/arm/plat-omap/include/mach/omapfb.h -@@ -378,6 +378,7 @@ extern struct lcd_ctrl omap2_disp_ctrl; - - extern void omapfb_reserve_sdram(void); - extern void omapfb_register_panel(struct lcd_panel *panel); -+extern void omapfb_unregister_panel(struct lcd_panel *panel); - extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval); - extern void omapfb_notify_clients(struct omapfb_device *fbdev, - unsigned long event); -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 912cb0c..6d09e03 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -1736,7 +1736,8 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) - case 7: - omapfb_unregister_sysfs(fbdev); - case 6: -- fbdev->panel->disable(fbdev->panel); -+ if (fbdev->panel) -+ fbdev->panel->disable(fbdev->panel); - case 5: - omapfb_set_update_mode(fbdev, OMAPFB_UPDATE_DISABLED); - case 4: -@@ -1744,7 +1745,8 @@ static void omapfb_free_resources(struct omapfb_device *fbdev, int state) - case 3: - ctrl_cleanup(fbdev); - case 2: -- fbdev->panel->cleanup(fbdev->panel); -+ if (fbdev->panel) -+ fbdev->panel->cleanup(fbdev->panel); - case 1: - dev_set_drvdata(fbdev->dev, NULL); - kfree(fbdev); -@@ -1999,6 +2001,17 @@ void omapfb_register_panel(struct lcd_panel *panel) - } - EXPORT_SYMBOL(omapfb_register_panel); - -+void omapfb_unregister_panel(struct lcd_panel *panel) -+{ -+ BUG_ON(fbdev_panel != panel); -+ -+ panel->disable(panel); -+ -+ omapfb_dev->panel = NULL; -+ fbdev_panel = NULL; -+} -+EXPORT_SYMBOL(omapfb_unregister_panel); -+ - /* Called when the device is being detached from the driver */ - static int omapfb_remove(struct platform_device *pdev) - { diff --git a/packages/linux/linux-omap/006-mru-lcd-as-modules.diff b/packages/linux/linux-omap/006-mru-lcd-as-modules.diff deleted file mode 100644 index e522b3f7bf..0000000000 --- a/packages/linux/linux-omap/006-mru-lcd-as-modules.diff +++ /dev/null @@ -1,174 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 23:05:33 +0000 (+0100) -Subject: OMAP: Build LCD drivers as separate modules -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=127dc3100fe9d25ed2b6c0a056e4160cc05db653 - -OMAP: Build LCD drivers as separate modules - -This enables building the various LCD drivers as modules separate -from omapfb. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig -index 9977e80..93cd760 100644 ---- a/drivers/video/omap/Kconfig -+++ b/drivers/video/omap/Kconfig -@@ -53,6 +53,70 @@ config FB_OMAP_LCD_MIPID - the Mobile Industry Processor Interface DBI-C/DCS - specification. (Supported LCDs: Philips LPH8923, Sharp LS041Y3) - -+config OMAP_FB_LCD_AMS_DELTA -+ tristate "AMS DELTA LCD support" -+ depends on FB_OMAP && MACH_AMS_DELTA -+ -+config OMAP_FB_LCD_H2 -+ tristate "H2 LCD support" -+ depends on FB_OMAP && MACH_OMAP_H2 -+ -+config OMAP_FB_LCD_H3 -+ tristate "H3 LCD support" -+ depends on FB_OMAP && MACH_OMAP_H3 -+ -+config OMAP_FB_LCD_H4 -+ tristate "OMAP 2420 H4 LCD support" -+ depends on FB_OMAP && MACH_OMAP_H4 -+ -+config OMAP_FB_LCD_PALMTE -+ tristate "PALMTE LCD support" -+ depends on FB_OMAP && MACH_OMAP_PALMTE -+ -+config OMAP_FB_LCD_PALMTT -+ tristate "PALMTT LCD support" -+ depends on FB_OMAP && MACH_OMAP_PALMTT -+ -+config OMAP_FB_LCD_PALMZ71 -+ tristate "PALMZ71 LCD support" -+ depends on FB_OMAP && MACH_OMAP_PALMZ71 -+ -+config OMAP_FB_LCD_INN1610 -+ tristate "INN1610 LCD support" -+ depends on FB_OMAP && ARCH_OMAP16XX && MACH_OMAP_INNOVATOR -+ -+config OMAP_FB_LCD_INN1510 -+ tristate "INN1510 LCD support" -+ depends on FB_OMAP && ARCH_OMAP15XX && MACH_OMAP_INNOVATOR -+ -+config OMAP_FB_LCD_OSK -+ tristate "OSK LCD support" -+ depends on FB_OMAP && MACH_OMAP_OSK -+ -+config OMAP_FB_LCD_SX1 -+ tristate "SX1 LCD support" -+ depends on FB_OMAP && MACH_SX1 -+ -+config OMAP_FB_LCD_APOLLON -+ tristate "OMAP 2420 Apollon LCD support" -+ depends on FB_OMAP && MACH_OMAP_APOLLON -+ -+config OMAP_FB_LCD_2430SDP -+ tristate "OMAP 2430/3430 SDP LCD support" -+ depends on FB_OMAP && (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP) -+ -+config OMAP_FB_LCD_OMAP2EVM -+ tristate "OMAP 2530 EVM LCD support" -+ depends on FB_OMAP && MACH_OMAP2EVM -+ -+config OMAP_FB_LCD_OMAP3EVM -+ tristate "OMAP 3530 EVM LCD support" -+ depends on FB_OMAP && MACH_OMAP3EVM -+ -+config OMAP_FB_LCD_OMAP3BEAGLE -+ tristate "Beagle board DVI port support" -+ depends on FB_OMAP && MACH_OMAP3_BEAGLE -+ - config FB_OMAP_BOOTLOADER_INIT - bool "Check bootloader initialization" - depends on FB_OMAP -diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile -dissimilarity index 64% -index f9b5cd4..dbdcd67 100644 ---- a/drivers/video/omap/Makefile -+++ b/drivers/video/omap/Makefile -@@ -1,40 +1,40 @@ --# --# Makefile for the new OMAP framebuffer device driver --# -- --obj-$(CONFIG_FB_OMAP) += omapfb.o -- --objs-yy := omapfb_main.o -- --objs-y$(CONFIG_ARCH_OMAP1) += lcdc.o --objs-y$(CONFIG_ARCH_OMAP2) += dispc.o --objs-y$(CONFIG_ARCH_OMAP3) += dispc.o -- --objs-$(CONFIG_ARCH_OMAP1)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += sossi.o --objs-$(CONFIG_ARCH_OMAP2)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += rfbi.o -- --objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o --objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o -- --objs-y$(CONFIG_MACH_AMS_DELTA) += lcd_ams_delta.o --objs-y$(CONFIG_MACH_OMAP_H4) += lcd_h4.o --objs-y$(CONFIG_MACH_OMAP_H3) += lcd_h3.o --objs-y$(CONFIG_MACH_OMAP_H2) += lcd_h2.o --objs-y$(CONFIG_MACH_OMAP_PALMTE) += lcd_palmte.o --objs-y$(CONFIG_MACH_OMAP_PALMTT) += lcd_palmtt.o --objs-y$(CONFIG_MACH_OMAP_PALMZ71) += lcd_palmz71.o --objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o --objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o --objs-y$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o --objs-y$(CONFIG_MACH_SX1) += lcd_sx1.o -- --objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o --objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o --objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o --objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o --objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o --objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o --objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o -- --omapfb-objs := $(objs-yy) -- -+# -+# Makefile for the new OMAP framebuffer device driver -+# -+ -+obj-$(CONFIG_FB_OMAP) += omapfb.o -+ -+objs-yy := omapfb_main.o -+ -+objs-y$(CONFIG_ARCH_OMAP1) += lcdc.o -+objs-y$(CONFIG_ARCH_OMAP2) += dispc.o -+objs-y$(CONFIG_ARCH_OMAP3) += dispc.o -+ -+objs-$(CONFIG_ARCH_OMAP1)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += sossi.o -+objs-$(CONFIG_ARCH_OMAP2)$(CONFIG_FB_OMAP_LCDC_EXTERNAL) += rfbi.o -+ -+objs-y$(CONFIG_FB_OMAP_LCDC_HWA742) += hwa742.o -+objs-y$(CONFIG_FB_OMAP_LCDC_BLIZZARD) += blizzard.o -+ -+obj-$(CONFIG_OMAP_FB_LCD_AMS_DELTA) += lcd_ams_delta.o -+obj-$(CONFIG_OMAP_FB_LCD_H4) += lcd_h4.o -+obj-$(CONFIG_OMAP_FB_LCD_H3) += lcd_h3.o -+obj-$(CONFIG_OMAP_FB_LCD_H2) += lcd_h2.o -+obj-$(CONFIG_OMAP_FB_LCD_PALMTE) += lcd_palmte.o -+obj-$(CONFIG_OMAP_FB_LCD_PALMTT) += lcd_palmtt.o -+obj-$(CONFIG_OMAP_FB_LCD_PALMZ71) += lcd_palmz71.o -+obj-$(CONFIG_OMAP_FB_LCD_INN1610) += lcd_inn1610.o -+obj-$(CONFIG_OMAP_FB_LCD_INN1510) += lcd_inn1510.o -+obj-$(CONFIG_OMAP_FB_LCD_OSK) += lcd_osk.o -+obj-$(CONFIG_OMAP_FB_LCD_SX1) += lcd_sx1.o -+ -+obj-$(CONFIG_OMAP_FB_LCD_APOLLON) += lcd_apollon.o -+obj-$(CONFIG_OMAP_FB_LCD_2430SDP) += lcd_2430sdp.o -+obj-$(CONFIG_OMAP_FB_LCD_2430SDP) += lcd_2430sdp.o -+obj-$(CONFIG_OMAP_FB_LCD_OMAP2EVM) += lcd_omap2evm.o -+obj-$(CONFIG_OMAP_FB_LCD_OMAP3EVM) += lcd_omap3evm.o -+obj-$(CONFIG_OMAP_FB_LCD_OMAP3BEAGLE) += lcd_omap3beagle.o -+obj-$(CONFIG_OMAP_FB_LCD_MIPID) += lcd_mipid.o -+ -+omapfb-objs := $(objs-yy) -+ diff --git a/packages/linux/linux-omap/007-mru-omapfb-as-module.diff b/packages/linux/linux-omap/007-mru-omapfb-as-module.diff deleted file mode 100644 index e1eed0d154..0000000000 --- a/packages/linux/linux-omap/007-mru-omapfb-as-module.diff +++ /dev/null @@ -1,50 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 23:10:08 +0000 (+0100) -Subject: OMAP: Fix omapfb built as module -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=ae65001ce247e510121bcda21775263bb4c42e05 - -OMAP: Fix omapfb built as module - -This makes it possible to build omapfb as a module. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index 6187e8f..4213c4f 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -1073,7 +1073,8 @@ static int mmap_kern(struct omapfb_mem_region *region) - pgprot_t pgprot; - unsigned long vaddr; - -- kvma = get_vm_area(region->size, VM_IOREMAP); -+ kvma = __get_vm_area(region->size, VM_IOREMAP, -+ VMALLOC_START, VMALLOC_END); - if (kvma == NULL) { - dev_err(dispc.fbdev->dev, "can't get kernel vm area\n"); - return -ENOMEM; -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 6d09e03..19a1a83 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -2016,12 +2016,15 @@ EXPORT_SYMBOL(omapfb_unregister_panel); - static int omapfb_remove(struct platform_device *pdev) - { - struct omapfb_device *fbdev = platform_get_drvdata(pdev); -- enum omapfb_state saved_state = fbdev->state; - -- /* FIXME: wait till completion of pending events */ -+ if (fbdev) { -+ enum omapfb_state saved_state = fbdev->state; - -- fbdev->state = OMAPFB_DISABLED; -- omapfb_free_resources(fbdev, saved_state); -+ /* FIXME: wait till completion of pending events */ -+ -+ fbdev->state = OMAPFB_DISABLED; -+ omapfb_free_resources(fbdev, saved_state); -+ } - - return 0; - } diff --git a/packages/linux/linux-omap/008-mru-lcd-omap3beagle-license.diff b/packages/linux/linux-omap/008-mru-lcd-omap3beagle-license.diff deleted file mode 100644 index 4f69dd971a..0000000000 --- a/packages/linux/linux-omap/008-mru-lcd-omap3beagle-license.diff +++ /dev/null @@ -1,22 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 23:12:03 +0000 (+0100) -Subject: OMAP: Add missing MODULE_LICENSE in lcd_omap3beagle -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=368ba31e3e7dccdcea790c559ad3d3b4a20d924f - -OMAP: Add missing MODULE_LICENSE in lcd_omap3beagle - -This adds a missing MODULE_LICENSE("GPL") in lcd_omap3beagle. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c -index f2861ec..7b63db9 100644 ---- a/drivers/video/omap/lcd_omap3beagle.c -+++ b/drivers/video/omap/lcd_omap3beagle.c -@@ -127,3 +127,5 @@ static void __exit omap3beagle_panel_drv_exit(void) - - module_init(omap3beagle_panel_drv_init); - module_exit(omap3beagle_panel_drv_exit); -+ -+MODULE_LICENSE("GPL"); diff --git a/packages/linux/linux-omap/009-mru-unregister-beagle-lcd.diff b/packages/linux/linux-omap/009-mru-unregister-beagle-lcd.diff deleted file mode 100644 index c7e94bf3a4..0000000000 --- a/packages/linux/linux-omap/009-mru-unregister-beagle-lcd.diff +++ /dev/null @@ -1,24 +0,0 @@ -From: Mans Rullgard -Date: Wed, 3 Sep 2008 23:17:06 +0000 (+0100) -Subject: OMAP: Fix unloading lcd_omap3beagle module -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=6db3a4c28c6819047362fc8ac460cf8c124c6074 - -OMAP: Fix unloading lcd_omap3beagle module - -Unregister the panel when unloading the lcd_omap3beagle module. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c -index 7b63db9..32bd988 100644 ---- a/drivers/video/omap/lcd_omap3beagle.c -+++ b/drivers/video/omap/lcd_omap3beagle.c -@@ -90,6 +90,7 @@ static int omap3beagle_panel_probe(struct platform_device *pdev) - - static int omap3beagle_panel_remove(struct platform_device *pdev) - { -+ omapfb_unregister_panel(&omap3beagle_panel); - return 0; - } - diff --git a/packages/linux/linux-omap/01-fix-timing-print.diff b/packages/linux/linux-omap/01-fix-timing-print.diff deleted file mode 100644 index 89fbe3a836..0000000000 --- a/packages/linux/linux-omap/01-fix-timing-print.diff +++ /dev/null @@ -1,23 +0,0 @@ -From: Mans Rullgard -Date: Sat, 5 Jul 2008 20:31:56 +0000 (+0100) -Subject: omapfb: fix video timings message -X-Git-Tag: beagle-5~3 -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=2929b75035ebe8702ba2ff2c81b654c487701f64 - -omapfb: fix video timings message ---- - -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 418ed9f..1166a01 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -1789,7 +1789,8 @@ static int omapfb_do_probe(struct platform_device *pdev, - vram, fbdev->mem_desc.region_cnt); - pr_info("omapfb: Pixclock %lu kHz hfreq %lu.%lu kHz " - "vfreq %lu.%lu Hz\n", -- phz / 1000, hhz / 10000, hhz % 10, vhz / 10, vhz % 10); -+ phz / 1000, hhz / 10000, hhz % 10000, -+ vhz / 10, vhz % 10); - - return 0; - diff --git a/packages/linux/linux-omap/03-enable-overlay-opt.diff b/packages/linux/linux-omap/03-enable-overlay-opt.diff deleted file mode 100644 index 9fa749f5fc..0000000000 --- a/packages/linux/linux-omap/03-enable-overlay-opt.diff +++ /dev/null @@ -1,27 +0,0 @@ -From: Mans Rullgard -Date: Sun, 6 Jul 2008 13:15:36 +0000 (+0100) -Subject: omapfb: enable overlay optimisation when possible -X-Git-Tag: beagle-5~1 -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=a63ac3abdf6781f863112321260fe7a5da757802 - -omapfb: enable overlay optimisation when possible ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index 6aff476..3b36227 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -582,11 +582,13 @@ static int omap_dispc_enable_plane(int plane, int enable) - const u32 at_reg[] = { DISPC_GFX_ATTRIBUTES, - DISPC_VID1_BASE + DISPC_VID_ATTRIBUTES, - DISPC_VID2_BASE + DISPC_VID_ATTRIBUTES }; -+ unsigned overlay_opt = plane & !!enable & !dispc.color_key.key_type; - if ((unsigned int)plane > dispc.mem_desc.region_cnt) - return -EINVAL; - - enable_lcd_clocks(1); - MOD_REG_FLD(at_reg[plane], 1, enable ? 1 : 0); -+ MOD_REG_FLD(DISPC_CONTROL, 1<<12 | 1<<5, overlay_opt<<12 | 1<<5); - enable_lcd_clocks(0); - - return 0; diff --git a/packages/linux/linux-omap/05-fix-display-panning.diff b/packages/linux/linux-omap/05-fix-display-panning.diff deleted file mode 100644 index d3c9fffcda..0000000000 --- a/packages/linux/linux-omap/05-fix-display-panning.diff +++ /dev/null @@ -1,45 +0,0 @@ -From: Mans Rullgard -Date: Mon, 7 Jul 2008 00:13:00 +0000 (+0100) -Subject: omapfb: fix display panning -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=9fec252c96b0e69bcef0afd9cb9dd72b7179c239 - -omapfb: fix display panning ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index 4e1a8e3..c17371c 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -435,6 +435,8 @@ static inline int _setup_plane(int plane, int channel_out, - - dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1); - -+ MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); -+ - return height * screen_width * bpp / 8; - } - -diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c -index 1166a01..3e4959e 100644 ---- a/drivers/video/omap/omapfb_main.c -+++ b/drivers/video/omap/omapfb_main.c -@@ -206,8 +206,8 @@ static int ctrl_change_mode(struct fb_info *fbi) - struct omapfb_device *fbdev = plane->fbdev; - struct fb_var_screeninfo *var = &fbi->var; - -- offset = var->yoffset * fbi->fix.line_length + -- var->xoffset * var->bits_per_pixel / 8; -+ offset = (var->yoffset * var->xres_virtual + var->xoffset) * -+ var->bits_per_pixel / 8; - - if (fbdev->ctrl->sync) - fbdev->ctrl->sync(); -@@ -423,6 +423,8 @@ static void set_fb_fix(struct fb_info *fbi) - } - fix->accel = FB_ACCEL_OMAP1610; - fix->line_length = var->xres_virtual * bpp / 8; -+ fix->xpanstep = 1; -+ fix->ypanstep = 1; - } - - static int set_color_mode(struct omapfb_plane_struct *plane, diff --git a/packages/linux/linux-omap/06-ensure-fclk.diff b/packages/linux/linux-omap/06-ensure-fclk.diff deleted file mode 100644 index 79871a7208..0000000000 --- a/packages/linux/linux-omap/06-ensure-fclk.diff +++ /dev/null @@ -1,31 +0,0 @@ -From: Mans Rullgard -Date: Mon, 7 Jul 2008 23:59:08 +0000 (+0100) -Subject: omapfb: ensure fck/lcd < 173MHz -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=0523ece1bad659c48c66aea364d83f7490e7e5ae - -omapfb: ensure fck/lcd < 173MHz ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index c17371c..85d6cad 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -738,14 +738,16 @@ static void setup_color_conv_coef(void) - MOD_REG_FLD(at2_reg, (1 << 11), ct->full_range); - } - -+#define MAX_FCK_LCD 173000000 -+ - static void calc_ck_div(int is_tft, int pck, int *lck_div, int *pck_div) - { - unsigned long fck, lck; - -- *lck_div = 1; - pck = max(1, pck); - fck = clk_get_rate(dispc.dss1_fck); -- lck = fck; -+ *lck_div = (fck + MAX_FCK_LCD - 1) / MAX_FCK_LCD; -+ lck = fck / *lck_div; - *pck_div = (lck + pck - 1) / pck; - if (is_tft) - *pck_div = max(2, *pck_div); diff --git a/packages/linux/linux-omap/07-set-burst-size.diff b/packages/linux/linux-omap/07-set-burst-size.diff deleted file mode 100644 index 99bd80eae0..0000000000 --- a/packages/linux/linux-omap/07-set-burst-size.diff +++ /dev/null @@ -1,21 +0,0 @@ -From: Mans Rullgard -Date: Tue, 8 Jul 2008 18:26:43 +0000 (+0100) -Subject: omapfb: set graphics burst size to 16x32 -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=4f9e415dfcd5613a8de973f6c9878cab959c5869 - -omapfb: set graphics burst size to 16x32 ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index 85d6cad..fd06ca2 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -409,7 +409,7 @@ static inline int _setup_plane(int plane, int channel_out, - l |= cconv_en << 9; - - l &= ~(0x03 << burst_shift); -- l |= DISPC_BURST_8x32 << burst_shift; -+ l |= DISPC_BURST_16x32 << burst_shift; - - l &= ~(1 << chout_shift); - l |= chout_val << chout_shift; diff --git a/packages/linux/linux-omap/beagleboard/defconfig b/packages/linux/linux-omap/beagleboard/defconfig index ad2869fd63..7de6a0aa90 100644 --- a/packages/linux/linux-omap/beagleboard/defconfig +++ b/packages/linux/linux-omap/beagleboard/defconfig @@ -329,7 +329,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_NEON=y -CONFIG_NEON_CACHE_BUG=y +CONFIG_ARM_ERRATUM_451034=y # # Userspace binary formats diff --git a/packages/linux/linux-omap/mru-add-clk-get-parent.diff b/packages/linux/linux-omap/mru-add-clk-get-parent.diff new file mode 100644 index 0000000000..64944a5e47 --- /dev/null +++ b/packages/linux/linux-omap/mru-add-clk-get-parent.diff @@ -0,0 +1,64 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:51:36 +0000 (+0100) +Subject: OMAP: Add clk_get_parent() for OMAP2/3 +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=08d1f1947a5a970b2fe6e4dfeeb70286b9379056 + +OMAP: Add clk_get_parent() for OMAP2/3 + +This makes clk_get_parent() work on OMAP2/3. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c +index 5f48e14..aae0d2e 100644 +--- a/arch/arm/mach-omap2/clock.c ++++ b/arch/arm/mach-omap2/clock.c +@@ -831,6 +831,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) + return 0; + } + ++struct clk *omap2_clk_get_parent(struct clk *clk) ++{ ++ return clk->parent; ++} ++ + /* DPLL rate rounding code */ + + /** +diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h +index 3fa2e26..2916879 100644 +--- a/arch/arm/mach-omap2/clock.h ++++ b/arch/arm/mach-omap2/clock.h +@@ -29,6 +29,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate); + int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); + int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); + long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); ++struct clk *omap2_clk_get_parent(struct clk *clk); + + #ifdef CONFIG_OMAP_RESET_CLOCKS + void omap2_clk_disable_unused(struct clk *clk); +diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c +index c26d9d8..f91bd57 100644 +--- a/arch/arm/mach-omap2/clock24xx.c ++++ b/arch/arm/mach-omap2/clock24xx.c +@@ -423,6 +423,7 @@ static struct clk_functions omap2_clk_functions = { + .clk_round_rate = omap2_clk_round_rate, + .clk_set_rate = omap2_clk_set_rate, + .clk_set_parent = omap2_clk_set_parent, ++ .clk_get_parent = omap2_clk_get_parent, + .clk_disable_unused = omap2_clk_disable_unused, + #ifdef CONFIG_CPU_FREQ + .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, +diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c +index 152d095..2196edd 100644 +--- a/arch/arm/mach-omap2/clock34xx.c ++++ b/arch/arm/mach-omap2/clock34xx.c +@@ -606,6 +606,7 @@ static struct clk_functions omap2_clk_functions = { + .clk_round_rate = omap2_clk_round_rate, + .clk_set_rate = omap2_clk_set_rate, + .clk_set_parent = omap2_clk_set_parent, ++ .clk_get_parent = omap2_clk_get_parent, + .clk_disable_unused = omap2_clk_disable_unused, + }; + diff --git a/packages/linux/linux-omap/mru-clocks1.diff b/packages/linux/linux-omap/mru-clocks1.diff deleted file mode 100644 index d7dadbc85e..0000000000 --- a/packages/linux/linux-omap/mru-clocks1.diff +++ /dev/null @@ -1,25 +0,0 @@ -From: Mans Rullgard -Date: Tue, 22 Jul 2008 00:31:11 +0000 (+0100) -Subject: ARM: OMAP: make dpll4_m4_ck programmable with clk_set_rate() -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=2b7b958dc79e51127d7a4ecf88ce12dbc6c31426 - -ARM: OMAP: make dpll4_m4_ck programmable with clk_set_rate() - -Filling the set_rate and round_rate fields of dpll4_m4_ck makes -this clock programmable through clk_set_rate(). This is needed -to give omapfb control over the dss1_alwon_fck rate. ---- - -diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h -index 161da12..876eb13 100644 ---- a/arch/arm/mach-omap2/clock34xx.h -+++ b/arch/arm/mach-omap2/clock34xx.h -@@ -815,6 +815,8 @@ static struct clk dpll4_m4_ck = { - .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | - PARENT_CONTROLS_CLOCK, - .recalc = &omap2_clksel_recalc, -+ .set_rate = &omap2_clksel_set_rate, -+ .round_rate = &omap2_clksel_round_rate, - }; - - /* The PWRDN bit is apparently only available on 3430ES2 and above */ diff --git a/packages/linux/linux-omap/mru-clocks2.diff b/packages/linux/linux-omap/mru-clocks2.diff deleted file mode 100644 index c8b370da03..0000000000 --- a/packages/linux/linux-omap/mru-clocks2.diff +++ /dev/null @@ -1,62 +0,0 @@ -From: Mans Rullgard -Date: Tue, 22 Jul 2008 00:58:18 +0000 (+0100) -Subject: ARM: OMAP: add clk_get_parent() for OMAP2/3 -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=e2de5e5578fbaa9b4b75074796da0608fc93e6ae - -ARM: OMAP: add clk_get_parent() for OMAP2/3 - -Signed-off-by: Mans Rullgard ---- - -diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c -index 577be44..28aec36 100644 ---- a/arch/arm/mach-omap2/clock.c -+++ b/arch/arm/mach-omap2/clock.c -@@ -824,6 +824,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) - return 0; - } - -+struct clk *omap2_clk_get_parent(struct clk *clk) -+{ -+ return clk->parent; -+} -+ - /* DPLL rate rounding code */ - - /** -diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h -index 49245f7..4aa69d5 100644 ---- a/arch/arm/mach-omap2/clock.h -+++ b/arch/arm/mach-omap2/clock.h -@@ -29,6 +29,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate); - int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); - int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); - long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); -+struct clk *omap2_clk_get_parent(struct clk *clk); - - #ifdef CONFIG_OMAP_RESET_CLOCKS - void omap2_clk_disable_unused(struct clk *clk); -diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c -index 54cc6e1..ed7af21 100644 ---- a/arch/arm/mach-omap2/clock24xx.c -+++ b/arch/arm/mach-omap2/clock24xx.c -@@ -422,6 +422,7 @@ static struct clk_functions omap2_clk_functions = { - .clk_round_rate = omap2_clk_round_rate, - .clk_set_rate = omap2_clk_set_rate, - .clk_set_parent = omap2_clk_set_parent, -+ .clk_get_parent = omap2_clk_get_parent, - .clk_disable_unused = omap2_clk_disable_unused, - #ifdef CONFIG_CPU_FREQ - .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, -diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c -index 04dedec..08c8c46 100644 ---- a/arch/arm/mach-omap2/clock34xx.c -+++ b/arch/arm/mach-omap2/clock34xx.c -@@ -541,6 +541,7 @@ static struct clk_functions omap2_clk_functions = { - .clk_round_rate = omap2_clk_round_rate, - .clk_set_rate = omap2_clk_set_rate, - .clk_set_parent = omap2_clk_set_parent, -+ .clk_get_parent = omap2_clk_get_parent, - .clk_disable_unused = omap2_clk_disable_unused, - }; - diff --git a/packages/linux/linux-omap/mru-clocks3.diff b/packages/linux/linux-omap/mru-clocks3.diff deleted file mode 100644 index f8407fc2d5..0000000000 --- a/packages/linux/linux-omap/mru-clocks3.diff +++ /dev/null @@ -1,94 +0,0 @@ -From: Mans Rullgard -Date: Wed, 23 Jul 2008 08:40:07 +0000 (+0100) -Subject: ARM: OMAP: Set DSS1_ALWON_FCLK to a multiple of the pixel clock -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=01ee28c50701caa94739e764c3dae9298edd8216 - -ARM: OMAP: Set DSS1_ALWON_FCLK to a multiple of the pixel clock - -This sets the DSS1_ALWON_FCLK clock as close as possible to a -multiple of the requested pixel clock, while keeping it below -the 173MHz limit. - -Due to of the structure of the clock tree, dss1_alwon_fck cannot -be set directly, and we must use dpll4_m4_ck instead. - -Signed-off-by: Mans Rullgard ---- - -diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c -index fd06ca2..e0e8528 100644 ---- a/drivers/video/omap/dispc.c -+++ b/drivers/video/omap/dispc.c -@@ -176,6 +176,7 @@ static struct { - - struct clk *dss_ick, *dss1_fck; - struct clk *dss_54m_fck; -+ struct clk *dpll4_m4_ck; - - enum omapfb_update_mode update_mode; - struct omapfb_device *fbdev; -@@ -738,21 +739,34 @@ static void setup_color_conv_coef(void) - MOD_REG_FLD(at2_reg, (1 << 11), ct->full_range); - } - --#define MAX_FCK_LCD 173000000 -+#define MAX_FCK 173000000 - - static void calc_ck_div(int is_tft, int pck, int *lck_div, int *pck_div) - { -+ unsigned long prate = clk_get_rate(clk_get_parent(dispc.dpll4_m4_ck)); -+ unsigned long pcd_min = is_tft? 2: 3; -+ unsigned long fck_div; - unsigned long fck, lck; - - pck = max(1, pck); -+ -+ if (pck * pcd_min > MAX_FCK) { -+ dev_warn(dispc.fbdev->dev, "pixclock %d kHz too high.\n", -+ pck / 1000); -+ pck = MAX_FCK / pcd_min; -+ } -+ -+ fck = pck * 2; -+ fck_div = (prate + pck) / fck; -+ if (fck_div > 16) -+ fck_div /= (fck_div + 15) / 16; -+ if (fck_div < 1) -+ fck_div = 1; -+ clk_set_rate(dispc.dpll4_m4_ck, prate / fck_div); - fck = clk_get_rate(dispc.dss1_fck); -- *lck_div = (fck + MAX_FCK_LCD - 1) / MAX_FCK_LCD; -- lck = fck / *lck_div; -- *pck_div = (lck + pck - 1) / pck; -- if (is_tft) -- *pck_div = max(2, *pck_div); -- else -- *pck_div = max(3, *pck_div); -+ -+ *lck_div = 1; -+ *pck_div = (fck + pck - 1) / pck; - if (*pck_div > 255) { - *pck_div = 255; - lck = pck * *pck_div; -@@ -914,11 +928,21 @@ static int get_dss_clocks(void) - return PTR_ERR(dispc.dss_54m_fck); - } - -+ if (IS_ERR((dispc.dpll4_m4_ck = -+ clk_get(dispc.fbdev->dev, "dpll4_m4_ck")))) { -+ dev_err(dispc.fbdev->dev, "can't get dpll4_m4_ck"); -+ clk_put(dispc.dss_ick); -+ clk_put(dispc.dss1_fck); -+ clk_put(dispc.dss_54m_fck); -+ return PTR_ERR(dispc.dss_54m_fck); -+ } -+ - return 0; - } - - static void put_dss_clocks(void) - { -+ clk_put(dispc.dpll4_m4_ck); - clk_put(dispc.dss_54m_fck); - clk_put(dispc.dss1_fck); - clk_put(dispc.dss_ick); diff --git a/packages/linux/linux-omap/mru-enable-overlay-optimalization.diff b/packages/linux/linux-omap/mru-enable-overlay-optimalization.diff new file mode 100644 index 0000000000..d027c53d6b --- /dev/null +++ b/packages/linux/linux-omap/mru-enable-overlay-optimalization.diff @@ -0,0 +1,117 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:45:26 +0000 (+0100) +Subject: OMAP: Enable overlay optimisation +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=7e052af7e4c73dc450412486ad37eb529e725dc7 + +OMAP: Enable overlay optimisation + +This enables the overlay optimisation feature when the video +overlay is active. This reduces memory bandwidth used by the +display subsystem, improving overall performance. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c +index 888d2c2..0f0b2e5 100644 +--- a/drivers/video/omap/dispc.c ++++ b/drivers/video/omap/dispc.c +@@ -315,6 +315,60 @@ void omap_dispc_enable_digit_out(int enable) + } + EXPORT_SYMBOL(omap_dispc_enable_digit_out); + ++#define MIN(a, b) ((a)<(b)?(a):(b)) ++#define MAX(a, b) ((a)>(b)?(a):(b)) ++ ++static void setup_overlay_opt(void) ++{ ++ struct fb_info **fbi = dispc.fbdev->fb_info; ++ struct omapfb_plane_struct *gfx, *vid; ++ struct fb_var_screeninfo *gvar; ++ unsigned gx, gx2, gy, gy2, gw, gh; ++ unsigned vx, vx2, vy, vy2, vw, vh; ++ unsigned bpp, skip; ++ static unsigned last_skip; ++ ++ if (!fbi[0] || !fbi[1]) ++ return; ++ ++ gfx = fbi[0]->par; ++ vid = fbi[1]->par; ++ gvar = &fbi[0]->var; ++ ++ gx = gfx->info.pos_x; ++ gy = gfx->info.pos_y; ++ gw = gfx->info.out_width; ++ gh = gfx->info.out_height; ++ vx = vid->info.pos_x; ++ vy = vid->info.pos_y; ++ vw = vid->info.out_width; ++ vh = vid->info.out_height; ++ gx2 = gx + gw; ++ gy2 = gy + gh; ++ vx2 = vx + vw; ++ vy2 = vy + vh; ++ bpp = gvar->bits_per_pixel / 8; ++ ++ if (!gfx->info.enabled || !vid->info.enabled || ++ dispc.color_key.key_type != OMAPFB_COLOR_KEY_DISABLED) { ++ skip = 0; ++ } else if (vx <= gx && vx2 >= gx2) { ++ unsigned y = MIN(gy2, vy2) - MAX(gy, vy); ++ skip = y * gvar->xres_virtual * bpp; ++ } else if (vx <= gx || vx2 >= gx2) { ++ unsigned x = MIN(gx2, vx2) - MAX(gx, vx); ++ skip = x * bpp; ++ } else { ++ skip = vw * bpp + 1; ++ } ++ ++ if (skip != last_skip) { ++ last_skip = skip; ++ dispc_write_reg(DISPC_GFX_WINDOW_SKIP, skip); ++ MOD_REG_FLD(DISPC_CONTROL, 1<<12, !!skip<<12); ++ } ++} ++ + static inline int _setup_plane(int plane, int channel_out, + u32 paddr, int screen_width, + int pos_x, int pos_y, int width, int height, +@@ -437,6 +491,9 @@ static inline int _setup_plane(int plane, int channel_out, + + dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1); + ++ if (plane < 2) ++ setup_overlay_opt(); ++ + MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); + + return height * screen_width * bpp / 8; +@@ -585,11 +642,19 @@ static int omap_dispc_enable_plane(int plane, int enable) + const u32 at_reg[] = { DISPC_GFX_ATTRIBUTES, + DISPC_VID1_BASE + DISPC_VID_ATTRIBUTES, + DISPC_VID2_BASE + DISPC_VID_ATTRIBUTES }; ++ struct omapfb_plane_struct *pi; ++ + if ((unsigned int)plane > dispc.mem_desc.region_cnt) + return -EINVAL; + ++ pi = dispc.fbdev->fb_info[plane]->par; ++ pi->info.enabled = enable; ++ + enable_lcd_clocks(1); + MOD_REG_FLD(at_reg[plane], 1, enable ? 1 : 0); ++ if (plane < 2) ++ setup_overlay_opt(); ++ MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); + enable_lcd_clocks(0); + + return 0; +@@ -633,6 +698,7 @@ static int omap_dispc_set_color_key(struct omapfb_color_key *ck) + if (val != 0) + dispc_write_reg(tr_reg, ck->trans_key); + dispc_write_reg(df_reg, ck->background); ++ setup_overlay_opt(); + enable_lcd_clocks(0); + + dispc.color_key = *ck; diff --git a/packages/linux/linux-omap/mru-fix-display-panning.diff b/packages/linux/linux-omap/mru-fix-display-panning.diff new file mode 100644 index 0000000000..a4ba3d29f4 --- /dev/null +++ b/packages/linux/linux-omap/mru-fix-display-panning.diff @@ -0,0 +1,49 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:18:48 +0000 (+0100) +Subject: OMAP: Fix omapfb display panning +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=2ea46e9f28ff57a32d87bc380457a584c913fe78 + +OMAP: Fix omapfb display panning + +This makes the FBIOPAN_DISPLAY ioctl work with omapfb. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c +index ce4c4de..64bf333 100644 +--- a/drivers/video/omap/dispc.c ++++ b/drivers/video/omap/dispc.c +@@ -436,6 +436,8 @@ static inline int _setup_plane(int plane, int channel_out, + + dispc_write_reg(ri_reg[plane], (screen_width - width) * bpp / 8 + 1); + ++ MOD_REG_FLD(DISPC_CONTROL, 1<<5, 1<<5); ++ + return height * screen_width * bpp / 8; + } + +diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c +index e7f3462..e9ffb92 100644 +--- a/drivers/video/omap/omapfb_main.c ++++ b/drivers/video/omap/omapfb_main.c +@@ -207,8 +207,8 @@ static int ctrl_change_mode(struct fb_info *fbi) + struct omapfb_device *fbdev = plane->fbdev; + struct fb_var_screeninfo *var = &fbi->var; + +- offset = var->yoffset * fbi->fix.line_length + +- var->xoffset * var->bits_per_pixel / 8; ++ offset = (var->yoffset * var->xres_virtual + var->xoffset) * ++ var->bits_per_pixel / 8; + + if (fbdev->ctrl->sync) + fbdev->ctrl->sync(); +@@ -426,6 +426,8 @@ static void set_fb_fix(struct fb_info *fbi) + } + fix->accel = FB_ACCEL_OMAP1610; + fix->line_length = var->xres_virtual * bpp / 8; ++ fix->xpanstep = 1; ++ fix->ypanstep = 1; + } + + static int set_color_mode(struct omapfb_plane_struct *plane, diff --git a/packages/linux/linux-omap/mru-fix-timings.diff b/packages/linux/linux-omap/mru-fix-timings.diff new file mode 100644 index 0000000000..37ca7d33ac --- /dev/null +++ b/packages/linux/linux-omap/mru-fix-timings.diff @@ -0,0 +1,26 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:16:14 +0000 (+0100) +Subject: OMAP: Fix video timings info message +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=3a8bdf0967ae2c4eb3cebb97118ef0392f709c1c + +OMAP: Fix video timings info message + +This fixes the hsync frequency value printed on startup. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c +index d176a2c..e7f3462 100644 +--- a/drivers/video/omap/omapfb_main.c ++++ b/drivers/video/omap/omapfb_main.c +@@ -1792,7 +1792,8 @@ static int omapfb_do_probe(struct platform_device *pdev, + vram, fbdev->mem_desc.region_cnt); + pr_info("omapfb: Pixclock %lu kHz hfreq %lu.%lu kHz " + "vfreq %lu.%lu Hz\n", +- phz / 1000, hhz / 10000, hhz % 10, vhz / 10, vhz % 10); ++ phz / 1000, hhz / 10000, hhz % 10000, ++ vhz / 10, vhz % 10); + + return 0; + diff --git a/packages/linux/linux-omap/mru-improve-pixclock-config.diff b/packages/linux/linux-omap/mru-improve-pixclock-config.diff new file mode 100644 index 0000000000..5a702128f2 --- /dev/null +++ b/packages/linux/linux-omap/mru-improve-pixclock-config.diff @@ -0,0 +1,93 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:34:39 +0000 (+0100) +Subject: OMAP: Improve pixel clock configuration +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=01c2d720e59c291de9eb21eb65225f2f215fef84 + +OMAP: Improve pixel clock configuration + +This sets the DSS1_ALWON_FCLK clock as close as possible to a +multiple of the requested pixel clock, while keeping it below +the 173MHz limit. + +Due to of the structure of the clock tree, dss1_alwon_fck cannot +be set directly, and we must use dpll4_m4_ck instead. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c +index 64bf333..888d2c2 100644 +--- a/drivers/video/omap/dispc.c ++++ b/drivers/video/omap/dispc.c +@@ -177,6 +177,7 @@ static struct { + + struct clk *dss_ick, *dss1_fck; + struct clk *dss_54m_fck; ++ struct clk *dpll4_m4_ck; + + enum omapfb_update_mode update_mode; + struct omapfb_device *fbdev; +@@ -736,19 +737,34 @@ static void setup_color_conv_coef(void) + MOD_REG_FLD(at2_reg, (1 << 11), ct->full_range); + } + ++#define MAX_FCK 173000000 ++ + static void calc_ck_div(int is_tft, int pck, int *lck_div, int *pck_div) + { ++ unsigned long prate = clk_get_rate(clk_get_parent(dispc.dpll4_m4_ck)); ++ unsigned long pcd_min = is_tft? 2: 3; ++ unsigned long fck_div; + unsigned long fck, lck; + +- *lck_div = 1; + pck = max(1, pck); ++ ++ if (pck * pcd_min > MAX_FCK) { ++ dev_warn(dispc.fbdev->dev, "pixclock %d kHz too high.\n", ++ pck / 1000); ++ pck = MAX_FCK / pcd_min; ++ } ++ ++ fck = pck * 2; ++ fck_div = (prate + pck) / fck; ++ if (fck_div > 16) ++ fck_div /= (fck_div + 15) / 16; ++ if (fck_div < 1) ++ fck_div = 1; ++ clk_set_rate(dispc.dpll4_m4_ck, prate / fck_div); + fck = clk_get_rate(dispc.dss1_fck); +- lck = fck; +- *pck_div = (lck + pck - 1) / pck; +- if (is_tft) +- *pck_div = max(2, *pck_div); +- else +- *pck_div = max(3, *pck_div); ++ ++ *lck_div = 1; ++ *pck_div = (fck + pck - 1) / pck; + if (*pck_div > 255) { + *pck_div = 255; + lck = pck * *pck_div; +@@ -909,11 +925,21 @@ static int get_dss_clocks(void) + return PTR_ERR(dispc.dss_54m_fck); + } + ++ if (IS_ERR((dispc.dpll4_m4_ck = ++ clk_get(dispc.fbdev->dev, "dpll4_m4_ck")))) { ++ dev_err(dispc.fbdev->dev, "can't get dpll4_m4_ck"); ++ clk_put(dispc.dss_ick); ++ clk_put(dispc.dss1_fck); ++ clk_put(dispc.dss_54m_fck); ++ return PTR_ERR(dispc.dss_54m_fck); ++ } ++ + return 0; + } + + static void put_dss_clocks(void) + { ++ clk_put(dispc.dpll4_m4_ck); + clk_put(dispc.dss_54m_fck); + clk_put(dispc.dss1_fck); + clk_put(dispc.dss_ick); diff --git a/packages/linux/linux-omap/mru-make-dpll4-m4-ck-programmable.diff b/packages/linux/linux-omap/mru-make-dpll4-m4-ck-programmable.diff new file mode 100644 index 0000000000..0a535c5d52 --- /dev/null +++ b/packages/linux/linux-omap/mru-make-dpll4-m4-ck-programmable.diff @@ -0,0 +1,27 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:52:42 +0000 (+0100) +Subject: OMAP: Make dpll4_m4_ck programmable with clk_set_rate() +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=feab5b628c06619196044c15d9d2a113df173eee + +OMAP: Make dpll4_m4_ck programmable with clk_set_rate() + +Filling the set_rate and round_rate fields of dpll4_m4_ck makes +this clock programmable through clk_set_rate(). This is needed +to give omapfb control over the dss1_alwon_fck rate. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h +index 41f91f8..9c8e0c8 100644 +--- a/arch/arm/mach-omap2/clock34xx.h ++++ b/arch/arm/mach-omap2/clock34xx.h +@@ -877,6 +877,8 @@ static struct clk dpll4_m4_ck = { + PARENT_CONTROLS_CLOCK, + .clkdm = { .name = "dpll4_clkdm" }, + .recalc = &omap2_clksel_recalc, ++ .set_rate = &omap2_clksel_set_rate, ++ .round_rate = &omap2_clksel_round_rate, + }; + + /* The PWRDN bit is apparently only available on 3430ES2 and above */ diff --git a/packages/linux/linux-omap/mru-make-video-timings-selectable.diff b/packages/linux/linux-omap/mru-make-video-timings-selectable.diff new file mode 100644 index 0000000000..bba3ef72cc --- /dev/null +++ b/packages/linux/linux-omap/mru-make-video-timings-selectable.diff @@ -0,0 +1,312 @@ +From: Mans Rullgard +Date: Fri, 29 Aug 2008 01:42:12 +0000 (+0100) +Subject: OMAP: Make video mode selectable from pre-defined list +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=7a9e55d7156dae6bc930c77620a88a669d2ed1c9 + +OMAP: Make video mode selectable from pre-defined list + +This adds a list of common video modes and allows one to be +selected with video=omapfb:mode:name on the command line, +overriding the defaults from lcd_*.c. A default named mode +can also be specified in the kernel configuration. + +Signed-off-by: Mans Rullgard +--- + +diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig +index 5ebd591..9977e80 100644 +--- a/drivers/video/omap/Kconfig ++++ b/drivers/video/omap/Kconfig +@@ -7,26 +7,13 @@ config FB_OMAP + help + Frame buffer driver for OMAP based boards. + +-choice +- depends on FB_OMAP && MACH_OVERO +- prompt "Screen resolution" +- default FB_OMAP_079M3R ++config FB_OMAP_VIDEO_MODE ++ string "Default video mode" ++ depends on FB_OMAP + help +- Selected desired screen resolution +- +-config FB_OMAP_031M3R +- boolean "640 x 480 @ 60 Hz Reduced blanking" +- +-config FB_OMAP_048M3R +- boolean "800 x 600 @ 60 Hz Reduced blanking" +- +-config FB_OMAP_079M3R +- boolean "1024 x 768 @ 60 Hz Reduced blanking" +- +-config FB_OMAP_092M9R +- boolean "1280 x 720 @ 60 Hz Reduced blanking" +- +-endchoice ++ Enter video mode name to use if none is specified on the kernel ++ command line. If left blank, board-specific default timings ++ will be used. See omapfb_main.c for a list of valid mode names. + + config FB_OMAP_LCDC_EXTERNAL + bool "External LCD controller support" +diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c +index e9ffb92..c4c4049 100644 +--- a/drivers/video/omap/omapfb_main.c ++++ b/drivers/video/omap/omapfb_main.c +@@ -36,6 +36,20 @@ + + #define MODULE_NAME "omapfb" + ++struct video_mode { ++ const char *name; ++ int x_res, y_res; ++ int pixel_clock; /* In kHz */ ++ int hsw; /* Horizontal synchronization ++ pulse width */ ++ int hfp; /* Horizontal front porch */ ++ int hbp; /* Horizontal back porch */ ++ int vsw; /* Vertical synchronization ++ pulse width */ ++ int vfp; /* Vertical front porch */ ++ int vbp; /* Vertical back porch */ ++}; ++ + static unsigned int def_accel; + static unsigned long def_vram[OMAPFB_PLANE_NUM]; + static unsigned int def_vram_cnt; +@@ -43,6 +57,7 @@ static unsigned long def_vxres; + static unsigned long def_vyres; + static unsigned int def_rotate; + static unsigned int def_mirror; ++static char def_mode[16] = CONFIG_FB_OMAP_VIDEO_MODE; + + #ifdef CONFIG_FB_OMAP_MANUAL_UPDATE + static int manual_update = 1; +@@ -53,6 +68,7 @@ static int manual_update; + static struct platform_device *fbdev_pdev; + static struct lcd_panel *fbdev_panel; + static struct omapfb_device *omapfb_dev; ++static struct video_mode video_mode; + + struct caps_table_struct { + unsigned long flag; +@@ -83,6 +99,152 @@ static struct caps_table_struct color_caps[] = { + { 1 << OMAPFB_COLOR_YUY422, "YUY422", }, + }; + ++static struct video_mode video_modes[] __initdata = { ++ { ++ /* 640 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */ ++ .name = "640x480@60", ++ .x_res = 640, ++ .y_res = 480, ++ .hfp = 48, ++ .hsw = 32, ++ .hbp = 80, ++ .vfp = 3, ++ .vsw = 4, ++ .vbp = 7, ++ .pixel_clock = 23500, ++ }, ++ { ++ /* 800 x 600 @ 60 Hz Reduced blanking VESA CVT 0.48M3-R */ ++ .name = "800x600@60", ++ .x_res = 800, ++ .y_res = 600, ++ .hfp = 48, ++ .hsw = 32, ++ .hbp = 80, ++ .vfp = 3, ++ .vsw = 4, ++ .vbp = 11, ++ .pixel_clock = 35500, ++ }, ++ { ++ /* 1024 x 768 @ 60 Hz Reduced blanking VESA CVT 0.79M3-R */ ++ .name = "1024x768@60", ++ .x_res = 1024, ++ .y_res = 768, ++ .hfp = 48, ++ .hsw = 32, ++ .hbp = 80, ++ .vfp = 3, ++ .vsw = 4, ++ .vbp = 15, ++ .pixel_clock = 56000, ++ }, ++ { ++ /* 1280 x 720 @ 60 Hz Reduced blanking VESA CVT 0.92M9-R */ ++ .name = "1280x720@60", ++ .x_res = 1280, ++ .y_res = 720, ++ .hfp = 48, ++ .hsw = 32, ++ .hbp = 80, ++ .vfp = 3, ++ .vsw = 5, ++ .vbp = 13, ++ .pixel_clock = 64000, ++ }, ++ { ++ /* 720 x 480 @ 60 Hz CEA-861 Format 3 */ ++ .name = "480p60", ++ .x_res = 720, ++ .y_res = 480, ++ .hfp = 16, ++ .hsw = 62, ++ .hbp = 60, ++ .vfp = 9, ++ .vsw = 6, ++ .vbp = 30, ++ .pixel_clock = 27027, ++ }, ++ { ++ /* 720 x 576 @ 60 Hz CEA-861 Format 18 */ ++ .name = "576p50", ++ .x_res = 720, ++ .y_res = 576, ++ .hfp = 12, ++ .hsw = 64, ++ .hbp = 68, ++ .vfp = 5, ++ .vsw = 5, ++ .vbp = 39, ++ .pixel_clock = 27000, ++ }, ++ { ++ /* 1280 x 720 @ 50 Hz CEA-861B Format 19 */ ++ .name = "720p50", ++ .x_res = 1280, ++ .y_res = 720, ++ .hfp = 440, ++ .hsw = 40, ++ .hbp = 220, ++ .vfp = 20, ++ .vsw = 5, ++ .vbp = 5, ++ .pixel_clock = 74250, ++ }, ++ { ++ /* 1280 x 720 @ 60 Hz CEA-861B Format 4 */ ++ .name = "720p60", ++ .x_res = 1280, ++ .y_res = 720, ++ .hfp = 110, ++ .hsw = 40, ++ .hbp = 220, ++ .vfp = 20, ++ .vsw = 5, ++ .vbp = 5, ++ .pixel_clock = 74250, ++ }, ++ { ++ /* 1920 x 1080 @ 24 Hz CEA-861B Format 32 */ ++ .name = "1080p24", ++ .x_res = 1920, ++ .y_res = 1080, ++ .hfp = 148, ++ .hsw = 44, ++ .hbp = 638, ++ .vfp = 36, ++ .vsw = 5, ++ .vbp = 4, ++ .pixel_clock = 74250, ++ }, ++ { ++ /* 1920 x 1080 @ 25 Hz CEA-861B Format 33 */ ++ .name = "1080p25", ++ .x_res = 1920, ++ .y_res = 1080, ++ .hfp = 148, ++ .hsw = 44, ++ .hbp = 528, ++ .vfp = 36, ++ .vsw = 5, ++ .vbp = 4, ++ .pixel_clock = 74250, ++ }, ++ { ++ /* 1920 x 1080 @ 30 Hz CEA-861B Format 34 */ ++ .name = "1080p30", ++ .x_res = 1920, ++ .y_res = 1080, ++ .hfp = 148, ++ .hsw = 44, ++ .hbp = 88, ++ .vfp = 36, ++ .vsw = 5, ++ .vbp = 4, ++ .pixel_clock = 74250, ++ }, ++}; ++ + /* + * --------------------------------------------------------------------------- + * LCD panel +@@ -1714,6 +1876,20 @@ static int omapfb_do_probe(struct platform_device *pdev, + goto cleanup; + } + ++ if (video_mode.name) { ++ pr_info("omapfb: using mode %s\n", video_mode.name); ++ ++ fbdev->panel->x_res = video_mode.x_res; ++ fbdev->panel->y_res = video_mode.y_res; ++ fbdev->panel->pixel_clock = video_mode.pixel_clock; ++ fbdev->panel->hsw = video_mode.hsw; ++ fbdev->panel->hfp = video_mode.hfp; ++ fbdev->panel->hbp = video_mode.hbp; ++ fbdev->panel->vsw = video_mode.vsw; ++ fbdev->panel->vfp = video_mode.vfp; ++ fbdev->panel->vbp = video_mode.vbp; ++ } ++ + r = fbdev->panel->init(fbdev->panel, fbdev); + if (r) + goto cleanup; +@@ -1870,6 +2046,17 @@ static struct platform_driver omapfb_driver = { + }, + }; + ++static void __init omapfb_find_mode(char *name, struct video_mode *vmode) ++{ ++ int i; ++ ++ for (i = 0; i < sizeof(video_modes)/sizeof(video_modes[0]); i++) ++ if (!strcmp(name, video_modes[i].name)) { ++ *vmode = video_modes[i]; ++ break; ++ } ++} ++ + #ifndef MODULE + + /* Process kernel command line parameters */ +@@ -1918,6 +2105,8 @@ static int __init omapfb_setup(char *options) + def_mirror = (simple_strtoul(this_opt + 7, NULL, 0)); + else if (!strncmp(this_opt, "manual_update", 13)) + manual_update = 1; ++ else if (!strncmp(this_opt, "mode:", 5)) ++ strncpy(def_mode, this_opt + 5, sizeof(def_mode)); + else { + pr_debug("omapfb: invalid option\n"); + r = -1; +@@ -1939,6 +2128,9 @@ static int __init omapfb_init(void) + return -ENODEV; + omapfb_setup(option); + #endif ++ ++ omapfb_find_mode(def_mode, &video_mode); ++ + /* Register the driver with LDM */ + if (platform_driver_register(&omapfb_driver)) { + pr_debug("failed to register omapfb driver\n"); +@@ -1960,6 +2152,7 @@ module_param_named(vyres, def_vyres, long, 0664); + module_param_named(rotate, def_rotate, uint, 0664); + module_param_named(mirror, def_mirror, uint, 0664); + module_param_named(manual_update, manual_update, bool, 0664); ++module_param_string(video_mode, def_mode, sizeof(def_mode), 0664); + + module_init(omapfb_init); + module_exit(omapfb_cleanup); diff --git a/packages/linux/linux-omap/no-cortex-deadlock.patch b/packages/linux/linux-omap/no-cortex-deadlock.patch index 5bb6d22484..78547c8969 100644 --- a/packages/linux/linux-omap/no-cortex-deadlock.patch +++ b/packages/linux/linux-omap/no-cortex-deadlock.patch @@ -1,9 +1,9 @@ From: Mans Rullgard -Date: Wed, 30 Jul 2008 08:25:51 +0000 (+0100) -Subject: ARM: NEON L1 cache bug workaround (erratum 451034) -X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=26023493baf13e0a67fd6cf08d87be5ff6f7c56d +Date: Sat, 16 Aug 2008 23:03:06 +0000 (+0100) +Subject: ARM: Workaround for erratum 451034 +X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=b84fa87873ffb68ad23930cf6cddeea8bec43ede -ARM: NEON L1 cache bug workaround (erratum 451034) +ARM: Workaround for erratum 451034 On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer store in the store buffer, can cause a processor deadlock under @@ -15,61 +15,63 @@ counter-measures. Userspace code can still trigger the deadlock, so a different workaround is required to safely run untrusted code. See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details. + +Signed-off-by: Mans Rullgard --- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 8c75840..1172e14 100644 +index aa475d9..41d536e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -1071,6 +1071,22 @@ config NEON +@@ -1117,6 +1117,22 @@ config NEON Say Y to include support code for NEON, the ARMv7 Advanced SIMD Extension. -+config NEON_CACHE_BUG -+ bool "NEON L1 cache bug workaround (erratum 451034)" ++config ARM_ERRATUM_451034 ++ bool "Enable workaround for ARM erratum 451034" + depends on VFPv3 + help -+ On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer -+ store in the store buffer, can cause a processor deadlock under -+ certain conditions. ++ On Cortex-A8 r1p0 and r1p1, executing a NEON store with an integer ++ store in the store buffer, can cause a processor deadlock under ++ certain conditions. + -+ See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details. ++ See ARM Cortex-A8 Errata Notice (PR120-PRDC-008070) for full details. + -+ Say Y to include a workaround. ++ Say Y to include a partial workaround. + -+ WARNING: Even with this option enabled, userspace code can trigger -+ the deadlock. To safely run untrusted code, a different fix is -+ required. ++ WARNING: Even with this option enabled, userspace code can trigger ++ the deadlock. To safely run untrusted code, a different fix is ++ required. + endmenu menu "Userspace binary formats" -diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S -index 597ed00..e50094e 100644 ---- a/arch/arm/kernel/entry-common.S -+++ b/arch/arm/kernel/entry-common.S -@@ -68,6 +68,10 @@ no_work_pending: - /* perform architecture specific actions before user return */ - arch_ret_to_user r1, lr - -+#ifdef CONFIG_NEON_CACHE_BUG -+ dmb -+#endif -+ - @ slow_restore_user_regs - ldr r1, [sp, #S_PSR] @ get calling cpsr - ldr lr, [sp, #S_PC]! @ get pc diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h -index cccb389..c9d2976 100644 +index 422f3cc..934798b 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h @@ -32,6 +32,9 @@ @ write all the working registers out of the VFP .macro VFPFSTMIA, base, tmp -+#ifdef CONFIG_NEON_CACHE_BUG ++#ifdef CONFIG_ARM_ERRATUM_451034 + dmb +#endif #if __LINUX_ARM_ARCH__ < 6 STC p11, cr0, [\base],#33*4 @ FSTMIAX \base!, {d0-d15} #else +diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S +index 060d7e2..9799a35 100644 +--- a/arch/arm/kernel/entry-common.S ++++ b/arch/arm/kernel/entry-common.S +@@ -69,6 +69,10 @@ no_work_pending: + /* perform architecture specific actions before user return */ + arch_ret_to_user r1, lr + ++#ifdef CONFIG_ARM_ERRATUM_451034 ++ dmb ++#endif ++ + @ slow_restore_user_regs + ldr r1, [sp, #S_PSR] @ get calling cpsr + ldr lr, [sp, #S_PC]! @ get pc diff --git a/packages/linux/linux-omap/omap3evm/defconfig b/packages/linux/linux-omap/omap3evm/defconfig index 102f6ecd63..df28cacd44 100644 --- a/packages/linux/linux-omap/omap3evm/defconfig +++ b/packages/linux/linux-omap/omap3evm/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.27-rc6-omap1 -# Sun Sep 14 21:25:30 2008 +# Tue Sep 16 10:26:07 2008 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -202,9 +202,9 @@ CONFIG_OMAP_MCBSP=y CONFIG_OMAP_32K_TIMER=y CONFIG_OMAP_32K_TIMER_HZ=128 CONFIG_OMAP_DM_TIMER=y -# CONFIG_OMAP_LL_DEBUG_UART1 is not set +CONFIG_OMAP_LL_DEBUG_UART1=y # CONFIG_OMAP_LL_DEBUG_UART2 is not set -CONFIG_OMAP_LL_DEBUG_UART3=y +# CONFIG_OMAP_LL_DEBUG_UART3 is not set CONFIG_ARCH_OMAP34XX=y CONFIG_ARCH_OMAP3430=y @@ -213,8 +213,8 @@ CONFIG_ARCH_OMAP3430=y # # CONFIG_MACH_OMAP_LDP is not set # CONFIG_MACH_OMAP_3430SDP is not set -# CONFIG_MACH_OMAP3EVM is not set -CONFIG_MACH_OMAP3_BEAGLE=y +CONFIG_MACH_OMAP3EVM=y +# CONFIG_MACH_OMAP3_BEAGLE is not set # CONFIG_MACH_OVERO is not set CONFIG_OMAP_TICK_GPTIMER=12 @@ -330,7 +330,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_VFP=y CONFIG_VFPv3=y CONFIG_NEON=y -CONFIG_NEON_CACHE_BUG=y +CONFIG_ARM_ERRATUM_451034=y # # Userspace binary formats @@ -798,6 +798,7 @@ CONFIG_INPUT_KEYBOARD=y # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_TWL4030=y # CONFIG_KEYBOARD_LM8323 is not set # CONFIG_KEYBOARD_GPIO is not set CONFIG_INPUT_MOUSE=y @@ -879,7 +880,6 @@ CONFIG_I2C_HELPER_AUTO=y # CONFIG_I2C_GPIO is not set # CONFIG_I2C_OCORES is not set CONFIG_I2C_OMAP=y -# CONFIG_I2C2_OMAP_BEAGLE is not set # CONFIG_I2C_SIMTEC is not set # @@ -931,7 +931,7 @@ CONFIG_SPI_MASTER=y # SPI Master Controller Drivers # # CONFIG_SPI_BITBANG is not set -# CONFIG_SPI_OMAP24XX is not set +CONFIG_SPI_OMAP24XX=y # # SPI Protocol Masters @@ -1292,6 +1292,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set CONFIG_FB_OMAP=y +CONFIG_FB_OMAP_VIDEO_MODE="" # CONFIG_FB_OMAP_LCDC_EXTERNAL is not set # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=8 @@ -1317,10 +1318,7 @@ CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # CONFIG_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y -CONFIG_LOGO=y -CONFIG_LOGO_LINUX_MONO=y -CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_LOGO is not set CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_TIMER=y @@ -1905,7 +1903,7 @@ CONFIG_FRAME_POINTER=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_LATENCYTOP is not set +CONFIG_LATENCYTOP=y CONFIG_HAVE_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE=y # CONFIG_FTRACE is not set diff --git a/packages/linux/linux-omap/strongly-ordered-memory.diff b/packages/linux/linux-omap/strongly-ordered-memory.diff new file mode 100644 index 0000000000..b60e4f4a6b --- /dev/null +++ b/packages/linux/linux-omap/strongly-ordered-memory.diff @@ -0,0 +1,18 @@ +--- /tmp/irq.c 2008-09-16 10:43:30.000000000 +0200 ++++ git/arch/arm/mach-omap2/irq.c 2008-09-16 10:46:18.463198000 +0200 +@@ -64,6 +64,7 @@ + static void omap_ack_irq(unsigned int irq) + { + intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL); ++ intc_bank_read_reg(&irq_banks[0],INTC_REVISION); + } + + static void omap_mask_irq(unsigned int irq) +@@ -73,6 +74,7 @@ + irq &= (IRQ_BITS_PER_REG - 1); + + intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset); ++ intc_bank_read_reg(&irq_banks[0],INTC_REVISION); + } + + static void omap_unmask_irq(unsigned int irq) diff --git a/packages/linux/linux-omap_git.bb b/packages/linux/linux-omap_git.bb index 7107c1b5ba..f4a064f595 100644 --- a/packages/linux/linux-omap_git.bb +++ b/packages/linux/linux-omap_git.bb @@ -9,7 +9,7 @@ COMPATIBLE_MACHINE = "omap5912osk|omap1710h3|omap2430sdp|omap2420h4|beagleboard| SRCREV = "de1121fdb899f762" PV = "2.6.26+2.6.27-rc6+${PR}+git${SRCREV}" -PR = "r3" +PR = "r4" SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \ file://defconfig" @@ -24,28 +24,17 @@ SRC_URI_append = " \ file://musb-dma-iso-in.eml;patch=1 \ file://musb-support-high-bandwidth.patch.eml;patch=1 \ file://musb-mru-otgfix.diff;patch=1 \ - file://01-fix-timing-print.diff;patch=1 \ - file://03-enable-overlay-opt.diff;patch=1 \ - file://05-fix-display-panning.diff;patch=1 \ - file://06-ensure-fclk.diff;patch=1 \ - file://07-set-burst-size.diff;patch=1 \ - file://mru-clocks1.diff;patch=1 \ - file://mru-clocks2.diff;patch=1 \ - file://mru-clocks3.diff;patch=1 \ - file://001-mru-enable-overlay.diff;patch=1 \ - " + file://mru-fix-timings.diff;patch=1 \ + file://mru-fix-display-panning.diff;patch=1 \ + file://mru-make-dpll4-m4-ck-programmable.diff;patch=1 \ + file://mru-add-clk-get-parent.diff;patch=1 \ + file://mru-improve-pixclock-config.diff;patch=1 \ + file://mru-make-video-timings-selectable.diff;patch=1 \ + file://mru-enable-overlay-optimalization.diff;patch=1 \ + file://strongly-ordered-memory.diff;patch=1 \ +" temporarely-disabled = " \ - file://000-mru-make-video-mode-selcatable.diff;patch=1 \ - file://002-mru-set-default-800x600.diff;patch=1 \ - file://003-mru-omapfb-more-video-modes.diff;patch=1 \ - file://004-mru-export-omapfb-register-panel.diff;patch=1 \ - file://005-mru-add-omapfb-unregister-panel.diff;patch=1 \ - file://006-mru-lcd-as-modules.diff;patch=1 \ - file://007-mru-omapfb-as-module.diff;patch=1 \ - file://008-mru-lcd-omap3beagle-license.diff;patch=1 \ - file://009-mru-unregister-beagle-lcd.diff;patch=1 \ - file://010-mru-fix-video-mode-param.diff;patch=1 \ file://musb-dmafix.patch;patch=1 \ " -- cgit v1.2.3