diff options
author | Archit Taneja <archit@ti.com> | 2012-07-20 07:48:49 -0400 |
---|---|---|
committer | Archit Taneja <archit@ti.com> | 2012-08-16 08:30:55 -0400 |
commit | 889b4fd7eed2d7c155dc642e15a714f87ab2842c (patch) | |
tree | 5b70f29adae68d236d6b0336c09c45e068d2e102 | |
parent | c6b393d4bc8bc076589bf03433728c1fc2a44d4c (diff) |
OMAPDSS: SDI: Maintain copy of data pairs in driver data
The SDI driver currently relies on the omap_dss_device struct to configure the
number of data pairs as specified by the panel. This makes the SDI interface
driver dependent on the omap_dss_device struct.
Make the SDI driver data maintain it's own data lines field. A panel driver
is expected to call omapdss_sdi_set_datapairs() before enabling the interface.
Even though we configure the number of data pairs here, this function would be
finally mapped to a generic interface op called set_data_lines. The datapairs
argument type has been changed from u8 to int at some places to be in sync with
the 'set_data_lines' ops of other interfaces.
Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r-- | drivers/video/omap2/displays/panel-acx565akm.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss.h | 2 | ||||
-rw-r--r-- | drivers/video/omap2/dss/sdi.c | 10 | ||||
-rw-r--r-- | include/video/omapdss.h | 1 |
5 files changed, 13 insertions, 3 deletions
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c index 77fe59f6a8cd..c835aa70f96f 100644 --- a/drivers/video/omap2/displays/panel-acx565akm.c +++ b/drivers/video/omap2/displays/panel-acx565akm.c | |||
@@ -601,6 +601,7 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev) | |||
601 | mutex_lock(&md->mutex); | 601 | mutex_lock(&md->mutex); |
602 | 602 | ||
603 | omapdss_sdi_set_timings(dssdev, &dssdev->panel.timings); | 603 | omapdss_sdi_set_timings(dssdev, &dssdev->panel.timings); |
604 | omapdss_sdi_set_datapairs(dssdev, dssdev->phy.sdi.datapairs); | ||
604 | 605 | ||
605 | r = omapdss_sdi_display_enable(dssdev); | 606 | r = omapdss_sdi_display_enable(dssdev); |
606 | if (r) { | 607 | if (r) { |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 4491ab7ef800..92353be58036 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -144,7 +144,7 @@ static void dss_restore_context(void) | |||
144 | #undef SR | 144 | #undef SR |
145 | #undef RR | 145 | #undef RR |
146 | 146 | ||
147 | void dss_sdi_init(u8 datapairs) | 147 | void dss_sdi_init(int datapairs) |
148 | { | 148 | { |
149 | u32 l; | 149 | u32 l; |
150 | 150 | ||
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index 78493dbd38eb..f919dc8d94b8 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h | |||
@@ -279,7 +279,7 @@ void dss_dump_clocks(struct seq_file *s); | |||
279 | void dss_debug_dump_clocks(struct seq_file *s); | 279 | void dss_debug_dump_clocks(struct seq_file *s); |
280 | #endif | 280 | #endif |
281 | 281 | ||
282 | void dss_sdi_init(u8 datapairs); | 282 | void dss_sdi_init(int datapairs); |
283 | int dss_sdi_enable(void); | 283 | int dss_sdi_enable(void); |
284 | void dss_sdi_disable(void); | 284 | void dss_sdi_disable(void); |
285 | 285 | ||
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 6ec6614009ed..3bf1bfe29585 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c | |||
@@ -35,6 +35,7 @@ static struct { | |||
35 | 35 | ||
36 | struct dss_lcd_mgr_config mgr_config; | 36 | struct dss_lcd_mgr_config mgr_config; |
37 | struct omap_video_timings timings; | 37 | struct omap_video_timings timings; |
38 | int datapairs; | ||
38 | } sdi; | 39 | } sdi; |
39 | 40 | ||
40 | static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) | 41 | static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) |
@@ -106,7 +107,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) | |||
106 | 107 | ||
107 | sdi_config_lcd_manager(dssdev); | 108 | sdi_config_lcd_manager(dssdev); |
108 | 109 | ||
109 | dss_sdi_init(dssdev->phy.sdi.datapairs); | 110 | dss_sdi_init(sdi.datapairs); |
111 | |||
110 | r = dss_sdi_enable(); | 112 | r = dss_sdi_enable(); |
111 | if (r) | 113 | if (r) |
112 | goto err_sdi_enable; | 114 | goto err_sdi_enable; |
@@ -164,6 +166,12 @@ void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, | |||
164 | } | 166 | } |
165 | EXPORT_SYMBOL(omapdss_sdi_set_timings); | 167 | EXPORT_SYMBOL(omapdss_sdi_set_timings); |
166 | 168 | ||
169 | void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) | ||
170 | { | ||
171 | sdi.datapairs = datapairs; | ||
172 | } | ||
173 | EXPORT_SYMBOL(omapdss_sdi_set_datapairs); | ||
174 | |||
167 | static int __init sdi_init_display(struct omap_dss_device *dssdev) | 175 | static int __init sdi_init_display(struct omap_dss_device *dssdev) |
168 | { | 176 | { |
169 | DSSDBG("SDI init\n"); | 177 | DSSDBG("SDI init\n"); |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 38633b29195d..88ac6e8f6683 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -749,6 +749,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev); | |||
749 | void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); | 749 | void omapdss_sdi_display_disable(struct omap_dss_device *dssdev); |
750 | void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, | 750 | void omapdss_sdi_set_timings(struct omap_dss_device *dssdev, |
751 | struct omap_video_timings *timings); | 751 | struct omap_video_timings *timings); |
752 | void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs); | ||
752 | 753 | ||
753 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); | 754 | int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev); |
754 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); | 755 | void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev); |