summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-2.6.29/dss2
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-04-21 09:22:15 +0200
committerKoen Kooi <koen@openembedded.org>2009-04-21 09:22:15 +0200
commitd7a39e79303d572a6441aeeb3c6176eea0dfc198 (patch)
tree251afc80913d7b429842fa15d8e7ae74ed705aaf /recipes/linux/linux-omap-2.6.29/dss2
parent69abd77e5791ca2878f70e0e59c1a013688b62ed (diff)
linux-omap 2.6.29: add support for changing tranparency of overlays
Diffstat (limited to 'recipes/linux/linux-omap-2.6.29/dss2')
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch135
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch66
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch118
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch150
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch56
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch59
-rw-r--r--recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch97
7 files changed, 681 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch b/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
new file mode 100644
index 0000000000..fdfc25fb47
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0034-DSS2-VRAM-improve-omap_vram_add_region.patch
@@ -0,0 +1,135 @@
+From 946eb774e95cdc2f2fa5cdc24aa69229f82814b8 Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 16 Apr 2009 17:56:00 +0300
+Subject: [PATCH] DSS2: VRAM: improve omap_vram_add_region()
+
+Combine postponed and non-posponed versions of omap_vram_add_region.
+Make the func non-static, so it can be called from board files.
+---
+ arch/arm/plat-omap/include/mach/vram.h | 1 +
+ arch/arm/plat-omap/vram.c | 54 +++++++++++++------------------
+ 2 files changed, 24 insertions(+), 31 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/vram.h b/arch/arm/plat-omap/include/mach/vram.h
+index f176562..8639e08 100644
+--- a/arch/arm/plat-omap/include/mach/vram.h
++++ b/arch/arm/plat-omap/include/mach/vram.h
+@@ -24,6 +24,7 @@
+
+ #include <asm/types.h>
+
++extern int omap_vram_add_region(unsigned long paddr, size_t size);
+ extern int omap_vram_free(unsigned long paddr, size_t size);
+ extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr);
+ extern int omap_vram_reserve(unsigned long paddr, size_t size);
+diff --git a/arch/arm/plat-omap/vram.c b/arch/arm/plat-omap/vram.c
+index 520f260..8e9fe77 100644
+--- a/arch/arm/plat-omap/vram.c
++++ b/arch/arm/plat-omap/vram.c
+@@ -60,6 +60,7 @@
+ * time when we cannot yet allocate the region list */
+ #define MAX_POSTPONED_REGIONS 10
+
++static bool vram_initialized;
+ static int postponed_cnt __initdata;
+ static struct {
+ unsigned long paddr;
+@@ -145,39 +146,32 @@ static void omap_vram_free_allocation(struct vram_alloc *va)
+ kfree(va);
+ }
+
+-static __init int omap_vram_add_region_postponed(unsigned long paddr,
+- size_t size)
+-{
+- if (postponed_cnt == MAX_POSTPONED_REGIONS)
+- return -ENOMEM;
+-
+- postponed_regions[postponed_cnt].paddr = paddr;
+- postponed_regions[postponed_cnt].size = size;
+-
+- ++postponed_cnt;
+-
+- return 0;
+-}
+-
+-/* add/remove_region can be exported if there's need to add/remove regions
+- * runtime */
+-static int omap_vram_add_region(unsigned long paddr, size_t size)
++int omap_vram_add_region(unsigned long paddr, size_t size)
+ {
+ struct vram_region *rm;
+ unsigned pages;
+
+- DBG("adding region paddr %08lx size %d\n",
+- paddr, size);
++ if (vram_initialized) {
++ DBG("adding region paddr %08lx size %d\n",
++ paddr, size);
+
+- size &= PAGE_MASK;
+- pages = size >> PAGE_SHIFT;
++ size &= PAGE_MASK;
++ pages = size >> PAGE_SHIFT;
+
+- rm = omap_vram_create_region(paddr, pages);
+- if (rm == NULL)
+- return -ENOMEM;
++ rm = omap_vram_create_region(paddr, pages);
++ if (rm == NULL)
++ return -ENOMEM;
++
++ list_add(&rm->list, &region_list);
++ } else {
++ if (postponed_cnt == MAX_POSTPONED_REGIONS)
++ return -ENOMEM;
+
+- list_add(&rm->list, &region_list);
++ postponed_regions[postponed_cnt].paddr = paddr;
++ postponed_regions[postponed_cnt].size = size;
+
++ ++postponed_cnt;
++ }
+ return 0;
+ }
+
+@@ -438,6 +432,8 @@ static __init int omap_vram_init(void)
+ {
+ int i, r;
+
++ vram_initialized = 1;
++
+ for (i = 0; i < postponed_cnt; i++)
+ omap_vram_add_region(postponed_regions[i].paddr,
+ postponed_regions[i].size);
+@@ -472,10 +468,6 @@ static void __init omapfb_early_vram(char **p)
+ omapfb_def_sdram_vram_size = memparse(*p, p);
+ if (**p == ',')
+ omapfb_def_sdram_vram_start = simple_strtoul((*p) + 1, p, 16);
+-
+- printk("omapfb_early_vram, %d, 0x%x\n",
+- omapfb_def_sdram_vram_size,
+- omapfb_def_sdram_vram_start);
+ }
+ __early_param("vram=", omapfb_early_vram);
+
+@@ -538,7 +530,7 @@ void __init omapfb_reserve_sdram(void)
+ BUG_ON(paddr & ~PAGE_MASK);
+ }
+
+- omap_vram_add_region_postponed(paddr, size);
++ omap_vram_add_region(paddr, size);
+
+ pr_info("Reserving %u bytes SDRAM for VRAM\n", size);
+ }
+@@ -594,7 +586,7 @@ unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
+ reserved = pend_avail - paddr;
+ size_avail = pend_avail - reserved - pstart_avail;
+
+- omap_vram_add_region_postponed(paddr, size);
++ omap_vram_add_region(paddr, size);
+
+ if (reserved)
+ pr_info("Reserving %lu bytes SRAM for VRAM\n", reserved);
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch b/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
new file mode 100644
index 0000000000..b7b395458f
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
@@ -0,0 +1,66 @@
+From f825cafd5ee5c600218740507f85594c825b0c00 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 16 Apr 2009 18:47:49 +0530
+Subject: [PATCH] DSS2: Added the function pointer for getting default color.
+
+V4L2 Framework has a CID for getting/setting default color.
+So added the function pointer for doing same.
+SYSFS based getting the default color will remain same
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 1 +
+ drivers/video/omap2/dss/manager.c | 11 +++++++----
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index b0a6272..073cdda 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -414,6 +414,7 @@ struct omap_overlay_manager {
+ int (*apply)(struct omap_overlay_manager *mgr);
+
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
++ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
+ void (*set_trans_key)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 8ca0bbb..12cf7b0 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -98,10 +98,8 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, const cha
+ static ssize_t manager_default_color_show(struct omap_overlay_manager *mgr,
+ char *buf)
+ {
+- u32 default_color;
+-
+- default_color = dispc_get_default_color(mgr->id);
+- return snprintf(buf, PAGE_SIZE, "%d", default_color);
++ return snprintf(buf, PAGE_SIZE, "%d",
++ mgr->get_default_color(mgr));
+ }
+
+ static ssize_t manager_default_color_store(struct omap_overlay_manager *mgr,
+@@ -470,6 +468,10 @@ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ {
+ dispc_enable_trans_key(mgr->id, enable);
+ }
++static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
++{
++ return dispc_get_default_color(mgr->id);
++}
+
+ static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
+ {
+@@ -512,6 +514,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+ mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->get_default_color = &omap_dss_mgr_get_default_color;
+ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
+
+ dss_overlay_setup_dispc_manager(mgr);
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch b/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
new file mode 100644
index 0000000000..c6e9f16b3a
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0036-DSS2-Added-support-for-setting-and-querying-alpha-b.patch
@@ -0,0 +1,118 @@
+From 6c56dc10226c84f41917ac2117b0e654fa080d40 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Thu, 16 Apr 2009 19:00:11 +0530
+Subject: [PATCH] DSS2: Added support for setting and querying alpha blending.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 3 +++
+ drivers/video/omap2/dss/dispc.c | 26 ++++++++++++++++++++++++++
+ drivers/video/omap2/dss/dss.h | 2 ++
+ drivers/video/omap2/dss/manager.c | 14 ++++++++++++++
+ 4 files changed, 45 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index 073cdda..e1f615a 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -415,11 +415,14 @@ struct omap_overlay_manager {
+
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
+ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
++ bool (*get_alpha_blending_status)(struct omap_overlay_manager *mgr);
+ void (*set_trans_key)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+ void (*enable_trans_key)(struct omap_overlay_manager *mgr,
+ bool enable);
++ void (*enable_alpha_blending)(struct omap_overlay_manager *mgr,
++ bool enable);
+ };
+
+ enum omap_display_caps {
+diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
+index b631dd8..7e551c2 100644
+--- a/drivers/video/omap2/dss/dispc.c
++++ b/drivers/video/omap2/dss/dispc.c
+@@ -1847,6 +1847,32 @@ void dispc_enable_trans_key(enum omap_channel ch, bool enable)
+ REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
+ enable_clocks(0);
+ }
++void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
++{
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
++ else /* OMAP_DSS_CHANNEL_DIGIT */
++ REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
++ enable_clocks(0);
++}
++bool dispc_alpha_blending_enabled(enum omap_channel ch)
++{
++ bool enabled;
++
++ enable_clocks(1);
++ if (ch == OMAP_DSS_CHANNEL_LCD)
++ enabled = REG_GET(DISPC_CONFIG, 18, 18);
++ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
++ enabled = REG_GET(DISPC_CONFIG, 18, 18);
++ else
++ BUG();
++ enable_clocks(0);
++
++ return enabled;
++
++}
++
+
+ bool dispc_trans_key_enabled(enum omap_channel ch)
+ {
+diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
+index 584dce6..1d01ff6 100644
+--- a/drivers/video/omap2/dss/dss.h
++++ b/drivers/video/omap2/dss/dss.h
+@@ -294,7 +294,9 @@ void dispc_get_trans_key(enum omap_channel ch,
+ enum omap_dss_color_key_type *type,
+ u32 *trans_key);
+ void dispc_enable_trans_key(enum omap_channel ch, bool enable);
++void dispc_enable_alpha_blending(enum omap_channel ch, bool enable);
+ bool dispc_trans_key_enabled(enum omap_channel ch);
++bool dispc_alpha_blending_enabled(enum omap_channel ch);
+
+ void dispc_set_lcd_timings(struct omap_video_timings *timings);
+ unsigned long dispc_fclk_rate(void);
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 12cf7b0..90acd28 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -468,6 +468,16 @@ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ {
+ dispc_enable_trans_key(mgr->id, enable);
+ }
++static void omap_dss_mgr_enable_alpha_blending(struct omap_overlay_manager *mgr,
++ bool enable)
++{
++ dispc_enable_alpha_blending(mgr->id, enable);
++}
++static bool omap_dss_mgr_get_alpha_blending_status(
++ struct omap_overlay_manager *mgr)
++{
++ return dispc_alpha_blending_enabled(mgr->id);
++}
+ static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
+ {
+ return dispc_get_default_color(mgr->id);
+@@ -514,6 +524,10 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+ mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->enable_alpha_blending =
++ &omap_dss_mgr_enable_alpha_blending;
++ mgr->get_alpha_blending_status =
++ omap_dss_mgr_get_alpha_blending_status;
+ mgr->get_default_color = &omap_dss_mgr_get_default_color;
+ mgr->caps = OMAP_DSS_OVL_MGR_CAP_DISPC,
+
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch b/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
new file mode 100644
index 0000000000..fc62b09512
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0037-DSS2-Added-support-for-querying-color-keying.patch
@@ -0,0 +1,150 @@
+From 2c9edd6af31a812a9487dd8bc12322e105a29f44 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 09:42:36 +0530
+Subject: [PATCH] DSS2: Added support for querying color keying.
+
+V4L2 Framework has a ioctl for getting/setting color keying.
+So added the function manager pointers for doing same.
+
+Modifed the color keying sysfs entries to use manager
+function pointer. Earlier they were calling direcly
+dispc function to set/enable color keying.
+
+Some of color-keying function pointers in the overlay_manager
+structure re-named to be more specific.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ arch/arm/plat-omap/include/mach/display.h | 6 ++++-
+ drivers/video/omap2/dss/manager.c | 36 +++++++++++++++++++++--------
+ 2 files changed, 31 insertions(+), 11 deletions(-)
+
+diff --git a/arch/arm/plat-omap/include/mach/display.h b/arch/arm/plat-omap/include/mach/display.h
+index e1f615a..d0b4c83 100644
+--- a/arch/arm/plat-omap/include/mach/display.h
++++ b/arch/arm/plat-omap/include/mach/display.h
+@@ -416,7 +416,11 @@ struct omap_overlay_manager {
+ void (*set_default_color)(struct omap_overlay_manager *mgr, u32 color);
+ u32 (*get_default_color)(struct omap_overlay_manager *mgr);
+ bool (*get_alpha_blending_status)(struct omap_overlay_manager *mgr);
+- void (*set_trans_key)(struct omap_overlay_manager *mgr,
++ bool (*get_trans_key_status)(struct omap_overlay_manager *mgr);
++ void (*get_trans_key_type_and_value)(struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key);
++ void (*set_trans_key_type_and_value)(struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key);
+ void (*enable_trans_key)(struct omap_overlay_manager *mgr,
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 90acd28..e0501c4 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -124,7 +124,7 @@ static ssize_t manager_color_key_type_show(struct omap_overlay_manager *mgr,
+ {
+ enum omap_dss_color_key_type key_type;
+
+- dispc_get_trans_key(mgr->id, &key_type, NULL);
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
+ BUG_ON(key_type >= ARRAY_SIZE(color_key_type_str));
+
+ return snprintf(buf, PAGE_SIZE, "%s\n", color_key_type_str[key_type]);
+@@ -143,8 +143,8 @@ static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr,
+ }
+ if (key_type == ARRAY_SIZE(color_key_type_str))
+ return -EINVAL;
+- dispc_get_trans_key(mgr->id, NULL, &key_value);
+- dispc_set_trans_key(mgr->id, key_type, key_value);
++ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
++ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+ return size;
+ }
+@@ -154,7 +154,7 @@ static ssize_t manager_color_key_value_show(struct omap_overlay_manager *mgr,
+ {
+ u32 key_value;
+
+- dispc_get_trans_key(mgr->id, NULL, &key_value);
++ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
+
+ return snprintf(buf, PAGE_SIZE, "%d\n", key_value);
+ }
+@@ -167,8 +167,8 @@ static ssize_t manager_color_key_value_store(struct omap_overlay_manager *mgr,
+
+ if (sscanf(buf, "%d", &key_value) != 1)
+ return -EINVAL;
+- dispc_get_trans_key(mgr->id, &key_type, NULL);
+- dispc_set_trans_key(mgr->id, key_type, key_value);
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
++ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+ return size;
+ }
+@@ -177,7 +177,7 @@ static ssize_t manager_color_key_enabled_show(struct omap_overlay_manager *mgr,
+ char *buf)
+ {
+ return snprintf(buf, PAGE_SIZE, "%d\n",
+- dispc_trans_key_enabled(mgr->id));
++ mgr->get_trans_key_status(mgr));
+ }
+
+ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+@@ -188,7 +188,7 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
+
+- dispc_enable_trans_key(mgr->id, enable);
++ mgr->enable_trans_key(mgr, enable);
+
+ return size;
+ }
+@@ -456,12 +456,20 @@ static void omap_dss_mgr_set_def_color(struct omap_overlay_manager *mgr,
+ dispc_set_default_color(mgr->id, color);
+ }
+
+-static void omap_dss_mgr_set_trans_key(struct omap_overlay_manager *mgr,
++static void omap_dss_mgr_set_trans_key_type_and_value(
++ struct omap_overlay_manager *mgr,
+ enum omap_dss_color_key_type type,
+ u32 trans_key)
+ {
+ dispc_set_trans_key(mgr->id, type, trans_key);
+ }
++static void omap_dss_mgr_get_trans_key_type_and_value(
++ struct omap_overlay_manager *mgr,
++ enum omap_dss_color_key_type *type,
++ u32 *trans_key)
++{
++ dispc_get_trans_key(mgr->id, type, trans_key);
++}
+
+ static void omap_dss_mgr_enable_trans_key(struct omap_overlay_manager *mgr,
+ bool enable)
+@@ -482,6 +490,10 @@ static u32 omap_dss_mgr_get_default_color(struct omap_overlay_manager *mgr)
+ {
+ return dispc_get_default_color(mgr->id);
+ }
++static bool omap_dss_mgr_get_trans_key_status(struct omap_overlay_manager *mgr)
++{
++ return dispc_trans_key_enabled(mgr->id);
++}
+
+ static void omap_dss_add_overlay_manager(struct omap_overlay_manager *manager)
+ {
+@@ -522,8 +534,12 @@ int dss_init_overlay_managers(struct platform_device *pdev)
+ mgr->unset_display = &omap_dss_unset_display,
+ mgr->apply = &omap_dss_mgr_apply,
+ mgr->set_default_color = &omap_dss_mgr_set_def_color,
+- mgr->set_trans_key = &omap_dss_mgr_set_trans_key,
++ mgr->set_trans_key_type_and_value =
++ &omap_dss_mgr_set_trans_key_type_and_value,
++ mgr->get_trans_key_type_and_value =
++ &omap_dss_mgr_get_trans_key_type_and_value,
+ mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key,
++ mgr->get_trans_key_status = &omap_dss_mgr_get_trans_key_status,
+ mgr->enable_alpha_blending =
+ &omap_dss_mgr_enable_alpha_blending;
+ mgr->get_alpha_blending_status =
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch b/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
new file mode 100644
index 0000000000..65cb113574
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0038-DSS2-OMAPFB-Some-color-keying-pointerd-renamed-in-D.patch
@@ -0,0 +1,56 @@
+From 9e8877f0e5b17d3ddd101d6a63aa86fdb14d35d5 Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 09:51:25 +0530
+Subject: [PATCH] DSS2:OMAPFB: Some color keying pointerd renamed in DSS2. Replicated in FB
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/omapfb/omapfb-ioctl.c | 11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+index 7f18d2a..79d8916 100644
+--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
++++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
+@@ -288,7 +288,8 @@ static int _omapfb_set_color_key(struct omap_overlay_manager *mgr,
+ {
+ enum omap_dss_color_key_type kt;
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key)
+ return 0;
+
+@@ -310,7 +311,7 @@ static int _omapfb_set_color_key(struct omap_overlay_manager *mgr,
+ }
+
+ mgr->set_default_color(mgr, ck->background);
+- mgr->set_trans_key(mgr, kt, ck->trans_key);
++ mgr->set_trans_key_type_and_value(mgr, kt, ck->trans_key);
+ mgr->enable_trans_key(mgr, 1);
+
+ omapfb_color_keys[mgr->id] = *ck;
+@@ -341,7 +342,8 @@ static int omapfb_set_color_key(struct fb_info *fbi,
+ goto err;
+ }
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key) {
+ r = -ENODEV;
+ goto err;
+@@ -377,7 +379,8 @@ static int omapfb_get_color_key(struct fb_info *fbi,
+ goto err;
+ }
+
+- if(!mgr->set_default_color || !mgr->set_trans_key ||
++ if (!mgr->set_default_color ||
++ !mgr->set_trans_key_type_and_value ||
+ !mgr->enable_trans_key) {
+ r = -ENODEV;
+ goto err;
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch b/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
new file mode 100644
index 0000000000..af8c2cd09b
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
@@ -0,0 +1,59 @@
+From 6f1f0c7b19ecb468824b79f9d181ef0da41b7d7d Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 13:58:21 +0530
+Subject: [PATCH] DSS2: Add sysfs entry to for the alpha blending support.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/manager.c | 21 +++++++++++++++++++++
+ 1 files changed, 21 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index e0501c4..7965a84 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -192,6 +192,22 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+
+ return size;
+ }
++static ssize_t manager_alpha_blending_enabled_show(
++ struct omap_overlay_manager *mgr, char *buf)
++{
++ return snprintf(buf, PAGE_SIZE, "%d\n",
++ mgr->get_alpha_blending_status(mgr));
++}
++static ssize_t manager_alpha_blending_enabled_store(
++ struct omap_overlay_manager *mgr,
++ const char *buf, size_t size)
++{
++ int enable;
++ if (sscanf(buf, "%d", &enable) != 1)
++ return -EINVAL;
++ mgr->enable_alpha_blending(mgr, enable);
++ return size;
++}
+
+
+ struct manager_attribute {
+@@ -215,6 +231,10 @@ static MANAGER_ATTR(color_key_value, S_IRUGO|S_IWUSR,
+ manager_color_key_value_show, manager_color_key_value_store);
+ static MANAGER_ATTR(color_key_enabled, S_IRUGO|S_IWUSR,
+ manager_color_key_enabled_show, manager_color_key_enabled_store);
++static MANAGER_ATTR(alpha_blending_enabled, S_IRUGO|S_IWUSR,
++ manager_alpha_blending_enabled_show,
++ manager_alpha_blending_enabled_store);
++
+
+ static struct attribute *manager_sysfs_attrs[] = {
+ &manager_attr_name.attr,
+@@ -223,6 +243,7 @@ static struct attribute *manager_sysfs_attrs[] = {
+ &manager_attr_color_key_type.attr,
+ &manager_attr_color_key_value.attr,
+ &manager_attr_color_key_enabled.attr,
++ &manager_attr_alpha_blending_enabled.attr,
+ NULL
+ };
+
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
new file mode 100644
index 0000000000..66be75f3f7
--- /dev/null
+++ b/recipes/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch
@@ -0,0 +1,97 @@
+From a5129f272a48aa22629137c9c31e60eddb8c3f5d Mon Sep 17 00:00:00 2001
+From: Hardik Shah <hardik.shah@ti.com>
+Date: Fri, 17 Apr 2009 14:24:46 +0530
+Subject: [PATCH] DSS2: Provided proper exclusion for destination color keying and alpha blending.
+
+OMAP does not support destination color key and alpha blending
+simultaneously. So this patch does not allow the user
+so set both at a time.
+
+Signed-off-by: Hardik Shah <hardik.shah@ti.com>
+---
+ drivers/video/omap2/dss/manager.c | 50 ++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 49 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
+index 7965a84..108489c 100644
+--- a/drivers/video/omap2/dss/manager.c
++++ b/drivers/video/omap2/dss/manager.c
+@@ -137,12 +137,26 @@ static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr,
+ u32 key_value;
+
+ for (key_type = OMAP_DSS_COLOR_KEY_GFX_DST;
+- key_type < ARRAY_SIZE(color_key_type_str); key_type++) {
++ key_type < ARRAY_SIZE(color_key_type_str); key_type++) {
+ if (sysfs_streq(buf, color_key_type_str[key_type]))
+ break;
+ }
+ if (key_type == ARRAY_SIZE(color_key_type_str))
+ return -EINVAL;
++ /* OMAP does not support destination color key and alpha blending
++ * simultaneously. So if alpha blending and color keying both are
++ * enabled then refrain from setting the color key type to
++ * gfx-destination
++ */
++ if (!key_type) {
++ bool color_key_enabled;
++ bool alpha_blending_enabled;
++ color_key_enabled = mgr->get_trans_key_status(mgr);
++ alpha_blending_enabled = mgr->get_alpha_blending_status(mgr);
++ if (color_key_enabled && alpha_blending_enabled)
++ return -EINVAL;
++ }
++
+ mgr->get_trans_key_type_and_value(mgr, NULL, &key_value);
+ mgr->set_trans_key_type_and_value(mgr, key_type, key_value);
+
+@@ -188,6 +202,23 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr,
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
+
++ /* OMAP does not support destination color keying and
++ * alpha blending simultaneously. so if alpha blending
++ * is enabled refrain from enabling destination color
++ * keying.
++ */
++ if (enable) {
++ bool enabled;
++ enabled = mgr->get_alpha_blending_status(mgr);
++ if (enabled) {
++ enum omap_dss_color_key_type key_type;
++ mgr->get_trans_key_type_and_value(mgr,
++ &key_type, NULL);
++ if (!key_type)
++ return -EINVAL;
++ }
++
++ }
+ mgr->enable_trans_key(mgr, enable);
+
+ return size;
+@@ -205,6 +236,23 @@ static ssize_t manager_alpha_blending_enabled_store(
+ int enable;
+ if (sscanf(buf, "%d", &enable) != 1)
+ return -EINVAL;
++ /* OMAP does not support destination color keying and
++ * alpha blending simultaneously. so if destination
++ * color keying is enabled refrain from enabling
++ * alpha blending
++ */
++ if (enable) {
++ bool enabled;
++ enabled = mgr->get_trans_key_status(mgr);
++ if (enabled) {
++ enum omap_dss_color_key_type key_type;
++ mgr->get_trans_key_type_and_value(mgr, &key_type, NULL);
++ if (!key_type)
++ return -EINVAL;
++
++ }
++
++ }
+ mgr->enable_alpha_blending(mgr, enable);
+ return size;
+ }
+--
+1.5.6.5
+