]> code.ossystems Code Review - openembedded-core.git/blob
c96f97f7630e51c113e657dea9120a4b9ef889e3
[openembedded-core.git] /
1 From 8fe1805debbf54143073a2f85e8568ed7b9ca38b Mon Sep 17 00:00:00 2001
2 From: Roger Quadros <roger.quadros@nokia.com>
3 Date: Wed, 17 Mar 2010 12:35:19 +0000
4 Subject: [PATCH 1/10] OMAP: DSS2: Add Kconfig option for DPI display type
5
6 From: Roger Quadros <roger.quadros@nokia.com>
7
8 Patch-mainline: 2.6.35?
9 Git-repo: http://www.gitorious.org/linux-omap-dss2/linux/commit/36b33efe80eb07e3447107c2bdba3c674c10a41a
10
11 This allows us to disable DPI on systems that do not have it
12
13 Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
14 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
15 ---
16  drivers/video/omap2/dss/Kconfig   |    6 ++++++
17  drivers/video/omap2/dss/Makefile  |    3 ++-
18  drivers/video/omap2/dss/core.c    |    4 ++++
19  drivers/video/omap2/dss/display.c |    4 ++++
20  4 files changed, 16 insertions(+), 1 deletions(-)
21
22 diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig
23 index c63ce76..cbe8ea0 100644
24 --- a/drivers/video/omap2/dss/Kconfig
25 +++ b/drivers/video/omap2/dss/Kconfig
26 @@ -32,6 +32,12 @@ config OMAP2_DSS_COLLECT_IRQ_STATS
27         help
28           Collect DSS IRQ statistics, printable via debugfs
29  
30 +config OMAP2_DSS_DPI
31 +       bool "DPI support"
32 +       default y
33 +       help
34 +         DPI Interface. This is the Parallel Display Interface.
35 +
36  config OMAP2_DSS_RFBI
37         bool "RFBI support"
38          default n
39 diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile
40 index 980c72c..d71b5d9 100644
41 --- a/drivers/video/omap2/dss/Makefile
42 +++ b/drivers/video/omap2/dss/Makefile
43 @@ -1,5 +1,6 @@
44  obj-$(CONFIG_OMAP2_DSS) += omapdss.o
45 -omapdss-y := core.o dss.o dispc.o dpi.o display.o manager.o overlay.o
46 +omapdss-y := core.o dss.o dispc.o display.o manager.o overlay.o
47 +omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
48  omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
49  omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
50  omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
51 diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
52 index 82918ee..0988781 100644
53 --- a/drivers/video/omap2/dss/core.c
54 +++ b/drivers/video/omap2/dss/core.c
55 @@ -473,11 +473,13 @@ static int omap_dss_probe(struct platform_device *pdev)
56         }
57  #endif
58  
59 +#ifdef CONFIG_OMAP2_DSS_DPI
60         r = dpi_init();
61         if (r) {
62                 DSSERR("Failed to initialize dpi\n");
63                 goto fail0;
64         }
65 +#endif
66  
67         r = dispc_init();
68         if (r) {
69 @@ -548,7 +550,9 @@ static int omap_dss_remove(struct platform_device *pdev)
70         venc_exit();
71  #endif
72         dispc_exit();
73 +#ifdef CONFIG_OMAP2_DSS_DPI
74         dpi_exit();
75 +#endif
76  #ifdef CONFIG_OMAP2_DSS_RFBI
77         rfbi_exit();
78  #endif
79 diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
80 index 3b92b84..2150f12 100644
81 --- a/drivers/video/omap2/dss/display.c
82 +++ b/drivers/video/omap2/dss/display.c
83 @@ -405,7 +405,9 @@ void dss_init_device(struct platform_device *pdev,
84         int r;
85  
86         switch (dssdev->type) {
87 +#ifdef CONFIG_OMAP2_DSS_DPI
88         case OMAP_DISPLAY_TYPE_DPI:
89 +#endif
90  #ifdef CONFIG_OMAP2_DSS_RFBI
91         case OMAP_DISPLAY_TYPE_DBI:
92  #endif
93 @@ -430,9 +432,11 @@ void dss_init_device(struct platform_device *pdev,
94         dssdev->wait_vsync = default_wait_vsync;
95  
96         switch (dssdev->type) {
97 +#ifdef CONFIG_OMAP2_DSS_DPI
98         case OMAP_DISPLAY_TYPE_DPI:
99                 r = dpi_init_display(dssdev);
100                 break;
101 +#endif
102  #ifdef CONFIG_OMAP2_DSS_RFBI
103         case OMAP_DISPLAY_TYPE_DBI:
104                 r = rfbi_init_display(dssdev);
105 -- 
106 1.6.0.4
107