diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch b/meta/recipes-kernel/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/meta/recipes-kernel/linux/linux-omap-2.6.29/dss2/0040-DSS2-Provided-proper-exclusion-for-destination-colo.patch | |||
@@ -0,0 +1,97 @@ | |||
1 | From a5129f272a48aa22629137c9c31e60eddb8c3f5d Mon Sep 17 00:00:00 2001 | ||
2 | From: Hardik Shah <hardik.shah@ti.com> | ||
3 | Date: Fri, 17 Apr 2009 14:24:46 +0530 | ||
4 | Subject: [PATCH] DSS2: Provided proper exclusion for destination color keying and alpha blending. | ||
5 | |||
6 | OMAP does not support destination color key and alpha blending | ||
7 | simultaneously. So this patch does not allow the user | ||
8 | so set both at a time. | ||
9 | |||
10 | Signed-off-by: Hardik Shah <hardik.shah@ti.com> | ||
11 | --- | ||
12 | drivers/video/omap2/dss/manager.c | 50 ++++++++++++++++++++++++++++++++++++- | ||
13 | 1 files changed, 49 insertions(+), 1 deletions(-) | ||
14 | |||
15 | diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c | ||
16 | index 7965a84..108489c 100644 | ||
17 | --- a/drivers/video/omap2/dss/manager.c | ||
18 | +++ b/drivers/video/omap2/dss/manager.c | ||
19 | @@ -137,12 +137,26 @@ static ssize_t manager_color_key_type_store(struct omap_overlay_manager *mgr, | ||
20 | u32 key_value; | ||
21 | |||
22 | for (key_type = OMAP_DSS_COLOR_KEY_GFX_DST; | ||
23 | - key_type < ARRAY_SIZE(color_key_type_str); key_type++) { | ||
24 | + key_type < ARRAY_SIZE(color_key_type_str); key_type++) { | ||
25 | if (sysfs_streq(buf, color_key_type_str[key_type])) | ||
26 | break; | ||
27 | } | ||
28 | if (key_type == ARRAY_SIZE(color_key_type_str)) | ||
29 | return -EINVAL; | ||
30 | + /* OMAP does not support destination color key and alpha blending | ||
31 | + * simultaneously. So if alpha blending and color keying both are | ||
32 | + * enabled then refrain from setting the color key type to | ||
33 | + * gfx-destination | ||
34 | + */ | ||
35 | + if (!key_type) { | ||
36 | + bool color_key_enabled; | ||
37 | + bool alpha_blending_enabled; | ||
38 | + color_key_enabled = mgr->get_trans_key_status(mgr); | ||
39 | + alpha_blending_enabled = mgr->get_alpha_blending_status(mgr); | ||
40 | + if (color_key_enabled && alpha_blending_enabled) | ||
41 | + return -EINVAL; | ||
42 | + } | ||
43 | + | ||
44 | mgr->get_trans_key_type_and_value(mgr, NULL, &key_value); | ||
45 | mgr->set_trans_key_type_and_value(mgr, key_type, key_value); | ||
46 | |||
47 | @@ -188,6 +202,23 @@ static ssize_t manager_color_key_enabled_store(struct omap_overlay_manager *mgr, | ||
48 | if (sscanf(buf, "%d", &enable) != 1) | ||
49 | return -EINVAL; | ||
50 | |||
51 | + /* OMAP does not support destination color keying and | ||
52 | + * alpha blending simultaneously. so if alpha blending | ||
53 | + * is enabled refrain from enabling destination color | ||
54 | + * keying. | ||
55 | + */ | ||
56 | + if (enable) { | ||
57 | + bool enabled; | ||
58 | + enabled = mgr->get_alpha_blending_status(mgr); | ||
59 | + if (enabled) { | ||
60 | + enum omap_dss_color_key_type key_type; | ||
61 | + mgr->get_trans_key_type_and_value(mgr, | ||
62 | + &key_type, NULL); | ||
63 | + if (!key_type) | ||
64 | + return -EINVAL; | ||
65 | + } | ||
66 | + | ||
67 | + } | ||
68 | mgr->enable_trans_key(mgr, enable); | ||
69 | |||
70 | return size; | ||
71 | @@ -205,6 +236,23 @@ static ssize_t manager_alpha_blending_enabled_store( | ||
72 | int enable; | ||
73 | if (sscanf(buf, "%d", &enable) != 1) | ||
74 | return -EINVAL; | ||
75 | + /* OMAP does not support destination color keying and | ||
76 | + * alpha blending simultaneously. so if destination | ||
77 | + * color keying is enabled refrain from enabling | ||
78 | + * alpha blending | ||
79 | + */ | ||
80 | + if (enable) { | ||
81 | + bool enabled; | ||
82 | + enabled = mgr->get_trans_key_status(mgr); | ||
83 | + if (enabled) { | ||
84 | + enum omap_dss_color_key_type key_type; | ||
85 | + mgr->get_trans_key_type_and_value(mgr, &key_type, NULL); | ||
86 | + if (!key_type) | ||
87 | + return -EINVAL; | ||
88 | + | ||
89 | + } | ||
90 | + | ||
91 | + } | ||
92 | mgr->enable_alpha_blending(mgr, enable); | ||
93 | return size; | ||
94 | } | ||
95 | -- | ||
96 | 1.5.6.5 | ||
97 | |||