summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-netbook-2.6.33.2/linux-2.6.35-OMAP-DSS2-Add-Kconfig-option-for-DPI-display-type.patch
blob: c96f97f7630e51c113e657dea9120a4b9ef889e3 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From 8fe1805debbf54143073a2f85e8568ed7b9ca38b Mon Sep 17 00:00:00 2001
From: Roger Quadros <roger.quadros@nokia.com>
Date: Wed, 17 Mar 2010 12:35:19 +0000
Subject: [PATCH 1/10] OMAP: DSS2: Add Kconfig option for DPI display type

From: Roger Quadros <roger.quadros@nokia.com>

Patch-mainline: 2.6.35?
Git-repo: http://www.gitorious.org/linux-omap-dss2/linux/commit/36b33efe80eb07e3447107c2bdba3c674c10a41a

This allows us to disable DPI on systems that do not have it

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
---
 drivers/video/omap2/dss/Kconfig   |    6 ++++++
 drivers/video/omap2/dss/Makefile  |    3 ++-
 drivers/video/omap2/dss/core.c    |    4 ++++
 drivers/video/omap2/dss/display.c |    4 ++++
 4 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig
index c63ce76..cbe8ea0 100644
--- a/drivers/video/omap2/dss/Kconfig
+++ b/drivers/video/omap2/dss/Kconfig
@@ -32,6 +32,12 @@ config OMAP2_DSS_COLLECT_IRQ_STATS
 	help
 	  Collect DSS IRQ statistics, printable via debugfs
 
+config OMAP2_DSS_DPI
+	bool "DPI support"
+	default y
+	help
+	  DPI Interface. This is the Parallel Display Interface.
+
 config OMAP2_DSS_RFBI
 	bool "RFBI support"
         default n
diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
index 980c72c..d71b5d9 100644
--- a/drivers/video/omap2/dss/Makefile
+++ b/drivers/video/omap2/dss/Makefile
@@ -1,5 +1,6 @@
 obj-$(CONFIG_OMAP2_DSS) += omapdss.o
-omapdss-y := core.o dss.o dispc.o dpi.o display.o manager.o overlay.o
+omapdss-y := core.o dss.o dispc.o display.o manager.o overlay.o
+omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
 omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
 omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
 omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 82918ee..0988781 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -473,11 +473,13 @@ static int omap_dss_probe(struct platform_device *pdev)
 	}
 #endif
 
+#ifdef CONFIG_OMAP2_DSS_DPI
 	r = dpi_init();
 	if (r) {
 		DSSERR("Failed to initialize dpi\n");
 		goto fail0;
 	}
+#endif
 
 	r = dispc_init();
 	if (r) {
@@ -548,7 +550,9 @@ static int omap_dss_remove(struct platform_device *pdev)
 	venc_exit();
 #endif
 	dispc_exit();
+#ifdef CONFIG_OMAP2_DSS_DPI
 	dpi_exit();
+#endif
 #ifdef CONFIG_OMAP2_DSS_RFBI
 	rfbi_exit();
 #endif
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 3b92b84..2150f12 100644
--- a/drivers/video/omap2/dss/display.c
+++ b/drivers/video/omap2/dss/display.c
@@ -405,7 +405,9 @@ void dss_init_device(struct platform_device *pdev,
 	int r;
 
 	switch (dssdev->type) {
+#ifdef CONFIG_OMAP2_DSS_DPI
 	case OMAP_DISPLAY_TYPE_DPI:
+#endif
 #ifdef CONFIG_OMAP2_DSS_RFBI
 	case OMAP_DISPLAY_TYPE_DBI:
 #endif
@@ -430,9 +432,11 @@ void dss_init_device(struct platform_device *pdev,
 	dssdev->wait_vsync = default_wait_vsync;
 
 	switch (dssdev->type) {
+#ifdef CONFIG_OMAP2_DSS_DPI
 	case OMAP_DISPLAY_TYPE_DPI:
 		r = dpi_init_display(dssdev);
 		break;
+#endif
 #ifdef CONFIG_OMAP2_DSS_RFBI
 	case OMAP_DISPLAY_TYPE_DBI:
 		r = rfbi_init_display(dssdev);
-- 
1.6.0.4