summaryrefslogtreecommitdiff
path: root/packages/linux/linux-omap-2.6.28
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-01-07 16:31:56 +0100
committerKoen Kooi <koen@openembedded.org>2009-01-07 16:31:56 +0100
commit952fbbaccb3ebe744c463b8090f536a1a856a658 (patch)
tree797185ffb9b94c673c4a41cdc8ba7d43b3d19ea3 /packages/linux/linux-omap-2.6.28
parentf6876205bcd8ad0c86d93a32d426d2deb31c875c (diff)
linux-omap 2.6.28: add patches to make XV work better with DSS2
Diffstat (limited to 'packages/linux/linux-omap-2.6.28')
-rw-r--r--packages/linux/linux-omap-2.6.28/0009-DSS-OMAPFB-allocate-fbmem-only-for-fb0-or-if-spes.patch121
-rw-r--r--packages/linux/linux-omap-2.6.28/0010-DSS-OMAPFB-remove-extra-omapfb_setup_overlay-call.patch29
-rw-r--r--packages/linux/linux-omap-2.6.28/0011-DSS-OMAPFB-fix-GFX_SYNC-to-be-compatible-with-DSS1.patch27
-rw-r--r--packages/linux/linux-omap-2.6.28/beagleboard/defconfig2
-rw-r--r--packages/linux/linux-omap-2.6.28/omap3evm/defconfig2
5 files changed, 179 insertions, 2 deletions
diff --git a/packages/linux/linux-omap-2.6.28/0009-DSS-OMAPFB-allocate-fbmem-only-for-fb0-or-if-spes.patch b/packages/linux/linux-omap-2.6.28/0009-DSS-OMAPFB-allocate-fbmem-only-for-fb0-or-if-spes.patch
new file mode 100644
index 0000000000..89174909a0
--- /dev/null
+++ b/packages/linux/linux-omap-2.6.28/0009-DSS-OMAPFB-allocate-fbmem-only-for-fb0-or-if-spes.patch
@@ -0,0 +1,121 @@
+From bd4fd1dd3be7ff31a6cf779f0683d617280ac92e Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 7 Jan 2009 16:44:17 +0200
+Subject: [PATCH] DSS: OMAPFB: allocate fbmem only for fb0, or if spesified in vram arg
+
+---
+ drivers/video/omap2/omapfb-main.c | 65 +++++++++++++++++++-----------------
+ 1 files changed, 34 insertions(+), 31 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb-main.c b/drivers/video/omap2/omapfb-main.c
+index 76bd416..9dbff42 100644
+--- a/drivers/video/omap2/omapfb-main.c
++++ b/drivers/video/omap2/omapfb-main.c
+@@ -939,11 +939,12 @@ static int omapfb_alloc_fbmem_display(struct omapfb2_device *fbdev, int fbnum,
+ break;
+ }
+
+- size = display->panel->timings.x_res * display->panel->timings.y_res *
+- bytespp;
+-
+- if (def_vram > size)
++ if (def_vram)
+ size = def_vram;
++ else
++ size = display->panel->timings.x_res *
++ display->panel->timings.y_res *
++ bytespp;
+
+ return omapfb_alloc_fbmem(fbdev, fbnum, size);
+ }
+@@ -956,13 +957,25 @@ static int omapfb_allocate_all_fbs(struct omapfb2_device *fbdev)
+ memset(vrams, 0, sizeof(vrams));
+
+ if (def_vram) {
+- char *p = def_vram;
++ char str[64];
++ char *tok, *s;
++
++ if (strlen(def_vram) > sizeof(str) - 1) {
++ dev_err(fbdev->dev, "Illegal vram parameters\n");
++ return -EINVAL;
++ }
++
++ strcpy(str, def_vram);
++
++ s = str;
+ i = 0;
+
+- while (true) {
++ while ((tok = strsep(&s, ","))) {
+ unsigned long size;
+
+- size = memparse(p, &p);
++ printk("param '%s'\n", tok);
++
++ size = memparse(tok, NULL);
+
+ if (size == 0) {
+ dev_err(fbdev->dev, "illegal vram size\n");
+@@ -970,19 +983,18 @@ static int omapfb_allocate_all_fbs(struct omapfb2_device *fbdev)
+ }
+
+ vrams[i++] = size;
+-
+- if (*p != ',')
+- break;
+-
+- p++;
+ }
+ }
+
+ for (i = 0; i < fbdev->num_fbs; i++) {
+- r = omapfb_alloc_fbmem_display(fbdev, i, vrams[i]);
++ /* allocate memory automatically only for fb0, or if
++ * excplicitly defined with vram option */
++ if (i == 0 || vrams[i] != 0) {
++ r = omapfb_alloc_fbmem_display(fbdev, i, vrams[i]);
+
+- if (r)
+- return r;
++ if (r)
++ return r;
++ }
+ }
+
+ for (i = 0; i < fbdev->num_fbs; i++) {
+@@ -1167,24 +1179,15 @@ static int omapfb_create_framebuffers(struct omapfb2_device *fbdev)
+ dev_err(fbdev->dev, "failed to change mode\n");
+ }
+
+- /* Enable the first framebuffer that has overlay that is connected
+- * to display. Usually this would be the GFX plane. */
+- r = 0;
+- for (i = 0; i < fbdev->num_fbs; i++) {
+- struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
+- int t;
++ /* Enable fb0 */
++ if (fbdev->num_fbs > 0) {
++ struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]);
+
+- for (t = 0; t < ofbi->num_overlays; t++) {
+- struct omap_overlay *ovl = ofbi->overlays[t];
+- if (ovl->manager && ovl->manager->display) {
+- ovl->enable(ovl, 1);
+- r = 1;
+- break;
+- }
+- }
++ if (ofbi->num_overlays > 0 ) {
++ struct omap_overlay *ovl = ofbi->overlays[0];
+
+- if (r)
+- break;
++ ovl->enable(ovl, 1);
++ }
+ }
+
+ DBG("create_framebuffers done\n");
+--
+1.5.6.3
+
diff --git a/packages/linux/linux-omap-2.6.28/0010-DSS-OMAPFB-remove-extra-omapfb_setup_overlay-call.patch b/packages/linux/linux-omap-2.6.28/0010-DSS-OMAPFB-remove-extra-omapfb_setup_overlay-call.patch
new file mode 100644
index 0000000000..c5ce980772
--- /dev/null
+++ b/packages/linux/linux-omap-2.6.28/0010-DSS-OMAPFB-remove-extra-omapfb_setup_overlay-call.patch
@@ -0,0 +1,29 @@
+From 70c3edb223f7bfbc6c5b095826c779b7dd853f10 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 7 Jan 2009 17:00:46 +0200
+Subject: [PATCH] OMAPFB: remove extra omapfb_setup_overlay call
+
+It kinda messed things up...
+---
+ drivers/video/omap2/omapfb-ioctl.c | 5 -----
+ 1 files changed, 0 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb-ioctl.c b/drivers/video/omap2/omapfb-ioctl.c
+index 1f0f044..bb5f791 100644
+--- a/drivers/video/omap2/omapfb-ioctl.c
++++ b/drivers/video/omap2/omapfb-ioctl.c
+@@ -67,11 +67,6 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
+ goto out;
+ }
+
+- r = omapfb_setup_overlay(fbi, ovl, pi->pos_x, pi->pos_y,
+- pi->out_width, pi->out_height);
+- if (r)
+- goto out;
+-
+ ovl->enable(ovl, pi->enabled);
+
+ if (ovl->manager)
+--
+1.5.6.3
+
diff --git a/packages/linux/linux-omap-2.6.28/0011-DSS-OMAPFB-fix-GFX_SYNC-to-be-compatible-with-DSS1.patch b/packages/linux/linux-omap-2.6.28/0011-DSS-OMAPFB-fix-GFX_SYNC-to-be-compatible-with-DSS1.patch
new file mode 100644
index 0000000000..8d4165ac7a
--- /dev/null
+++ b/packages/linux/linux-omap-2.6.28/0011-DSS-OMAPFB-fix-GFX_SYNC-to-be-compatible-with-DSS1.patch
@@ -0,0 +1,27 @@
+From 36d6e7edd70d16ad57ed745a1c48694805035dc7 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Wed, 7 Jan 2009 17:17:08 +0200
+Subject: [PATCH] OMAPFB: fix GFX_SYNC to be compatible with DSS1
+
+DSS1 never returned an error from GFX_SYNC ioctl. So we neither.
+---
+ drivers/video/omap2/omapfb-ioctl.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb-ioctl.c b/drivers/video/omap2/omapfb-ioctl.c
+index bb5f791..0cb0370 100644
+--- a/drivers/video/omap2/omapfb-ioctl.c
++++ b/drivers/video/omap2/omapfb-ioctl.c
+@@ -314,7 +314,8 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
+ switch (cmd) {
+ case OMAPFB_SYNC_GFX:
+ if (!display || !display->sync) {
+- r = -EINVAL;
++ /* DSS1 never returns an error here, so we neither */
++ /*r = -EINVAL;*/
+ break;
+ }
+
+--
+1.5.6.3
+
diff --git a/packages/linux/linux-omap-2.6.28/beagleboard/defconfig b/packages/linux/linux-omap-2.6.28/beagleboard/defconfig
index 2257689b2a..6b5cd3fc0b 100644
--- a/packages/linux/linux-omap-2.6.28/beagleboard/defconfig
+++ b/packages/linux/linux-omap-2.6.28/beagleboard/defconfig
@@ -205,7 +205,7 @@ CONFIG_OMAP2_DSS_VENC=y
# CONFIG_OMAP2_DSS_SDI is not set
CONFIG_OMAP2_DSS_DSI=y
CONFIG_OMAP2_DSS_USE_DSI_PLL=y
-CONFIG_OMAP2_DSS_FAKE_VSYNC=y
+CONFIG_OMAP2_DSS_FAKE_VSYNC=n
CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
CONFIG_ARCH_OMAP34XX=y
CONFIG_ARCH_OMAP3430=y
diff --git a/packages/linux/linux-omap-2.6.28/omap3evm/defconfig b/packages/linux/linux-omap-2.6.28/omap3evm/defconfig
index f6117f7915..be0b2cfb44 100644
--- a/packages/linux/linux-omap-2.6.28/omap3evm/defconfig
+++ b/packages/linux/linux-omap-2.6.28/omap3evm/defconfig
@@ -207,7 +207,7 @@ CONFIG_OMAP2_DSS_VENC=y
# CONFIG_OMAP2_DSS_SDI is not set
CONFIG_OMAP2_DSS_DSI=y
CONFIG_OMAP2_DSS_USE_DSI_PLL=y
-CONFIG_OMAP2_DSS_FAKE_VSYNC=y
+CONFIG_OMAP2_DSS_FAKE_VSYNC=n
CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
CONFIG_ARCH_OMAP34XX=y
CONFIG_ARCH_OMAP3430=y