summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-pm-2.6.29/dss2/0035-DSS2-Added-the-function-pointer-for-getting-default.patch
blob: 6b29d50dc03aca38b90c42cb6578bdacfd4b4515 (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
60
61
62
63
64
65
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 35/69] 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.6.2.4