summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-pm/dss2/0039-DSS2-Add-sysfs-entry-to-for-the-alpha-blending-supp.patch
blob: af8c2cd09b4aba9477934223f84d71c9940e65dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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