aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-09-04 02:19:30 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 07:58:35 -0400
commit7d6069e571d7c0882210ab5e885de4a940ef9391 (patch)
treeac906ea6b80d6c37ed53e85dc0dc3d186082381d /drivers/video
parenteea8340a1da581249a14bc03260af65edf4ededa (diff)
OMAPDSS: SDI: Replace dssdev->manager with dssdev->output->manager references
With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the SDI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/sdi.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 47f9fe4e1741..86f096aaf4fe 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -42,6 +42,8 @@ static struct {
42 42
43static void sdi_config_lcd_manager(struct omap_dss_device *dssdev) 43static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
44{ 44{
45 struct omap_overlay_manager *mgr = dssdev->output->manager;
46
45 sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS; 47 sdi.mgr_config.io_pad_mode = DSS_IO_PAD_MODE_BYPASS;
46 48
47 sdi.mgr_config.stallmode = false; 49 sdi.mgr_config.stallmode = false;
@@ -50,19 +52,20 @@ static void sdi_config_lcd_manager(struct omap_dss_device *dssdev)
50 sdi.mgr_config.video_port_width = 24; 52 sdi.mgr_config.video_port_width = 24;
51 sdi.mgr_config.lcden_sig_polarity = 1; 53 sdi.mgr_config.lcden_sig_polarity = 1;
52 54
53 dss_mgr_set_lcd_config(dssdev->manager, &sdi.mgr_config); 55 dss_mgr_set_lcd_config(mgr, &sdi.mgr_config);
54} 56}
55 57
56int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) 58int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
57{ 59{
60 struct omap_dss_output *out = dssdev->output;
58 struct omap_video_timings *t = &sdi.timings; 61 struct omap_video_timings *t = &sdi.timings;
59 struct dss_clock_info dss_cinfo; 62 struct dss_clock_info dss_cinfo;
60 struct dispc_clock_info dispc_cinfo; 63 struct dispc_clock_info dispc_cinfo;
61 unsigned long pck; 64 unsigned long pck;
62 int r; 65 int r;
63 66
64 if (dssdev->manager == NULL) { 67 if (out == NULL || out->manager == NULL) {
65 DSSERR("failed to enable display: no manager\n"); 68 DSSERR("failed to enable display: no output/manager\n");
66 return -ENODEV; 69 return -ENODEV;
67 } 70 }
68 71
@@ -101,7 +104,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
101 } 104 }
102 105
103 106
104 dss_mgr_set_timings(dssdev->manager, t); 107 dss_mgr_set_timings(out->manager, t);
105 108
106 r = dss_set_clock_div(&dss_cinfo); 109 r = dss_set_clock_div(&dss_cinfo);
107 if (r) 110 if (r)
@@ -120,8 +123,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
120 * need to care about the shadow register mechanism for pck-free. The 123 * need to care about the shadow register mechanism for pck-free. The
121 * exact reason for this is unknown. 124 * exact reason for this is unknown.
122 */ 125 */
123 dispc_mgr_set_clock_div(dssdev->manager->id, 126 dispc_mgr_set_clock_div(out->manager->id, &sdi.mgr_config.clock_info);
124 &sdi.mgr_config.clock_info);
125 127
126 dss_sdi_init(sdi.datapairs); 128 dss_sdi_init(sdi.datapairs);
127 r = dss_sdi_enable(); 129 r = dss_sdi_enable();
@@ -129,7 +131,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
129 goto err_sdi_enable; 131 goto err_sdi_enable;
130 mdelay(2); 132 mdelay(2);
131 133
132 r = dss_mgr_enable(dssdev->manager); 134 r = dss_mgr_enable(out->manager);
133 if (r) 135 if (r)
134 goto err_mgr_enable; 136 goto err_mgr_enable;
135 137
@@ -152,7 +154,9 @@ EXPORT_SYMBOL(omapdss_sdi_display_enable);
152 154
153void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) 155void omapdss_sdi_display_disable(struct omap_dss_device *dssdev)
154{ 156{
155 dss_mgr_disable(dssdev->manager); 157 struct omap_overlay_manager *mgr = dssdev->output->manager;
158
159 dss_mgr_disable(mgr);
156 160
157 dss_sdi_disable(); 161 dss_sdi_disable();
158 162