aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-08-08 04:58:54 -0400
committerArchit Taneja <archit@ti.com>2012-08-13 06:14:39 -0400
commitc499144c3b69a657b5dfd707b35871e066fabd3a (patch)
tree8de519506a07041ee0a2f0f0f8e8d7a8207d042f /drivers/video/omap2/dss/dpi.c
parente19d659bbf040823048101c31e3b213d13dd815f (diff)
OMAPDSS: DPI: Maintain our own timings field in driver data
The DPI driver currently relies on the timings in omap_dss_device struct to configure the DISPC accordingly. This makes the DPI interface driver dependent on the omap_dss_device struct. Make the DPI driver data maintain it's own timings field. The panel driver is expected to call dpi_set_timings()(renamed to omapdss_dpi_set_timings) to set these timings before the panel is enabled. In the set_timings() op, we still ensure that the omap_dss_device timings (dssdev->panel.timings) are configured. This will later be configured only by the DPI panel drivers. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dpi.c')
-rw-r--r--drivers/video/omap2/dss/dpi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 15c2c3301f4..97c7a10bc9f 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -41,6 +41,7 @@ static struct {
41 41
42 struct mutex lock; 42 struct mutex lock;
43 43
44 struct omap_video_timings timings;
44 struct dss_lcd_mgr_config mgr_config; 45 struct dss_lcd_mgr_config mgr_config;
45} dpi; 46} dpi;
46 47
@@ -123,7 +124,7 @@ static int dpi_set_dispc_clk(struct omap_dss_device *dssdev,
123 124
124static int dpi_set_mode(struct omap_dss_device *dssdev) 125static int dpi_set_mode(struct omap_dss_device *dssdev)
125{ 126{
126 struct omap_video_timings *t = &dssdev->panel.timings; 127 struct omap_video_timings *t = &dpi.timings;
127 int lck_div = 0, pck_div = 0; 128 int lck_div = 0, pck_div = 0;
128 unsigned long fck = 0; 129 unsigned long fck = 0;
129 unsigned long pck; 130 unsigned long pck;
@@ -272,8 +273,8 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
272} 273}
273EXPORT_SYMBOL(omapdss_dpi_display_disable); 274EXPORT_SYMBOL(omapdss_dpi_display_disable);
274 275
275void dpi_set_timings(struct omap_dss_device *dssdev, 276void omapdss_dpi_set_timings(struct omap_dss_device *dssdev,
276 struct omap_video_timings *timings) 277 struct omap_video_timings *timings)
277{ 278{
278 int r; 279 int r;
279 280
@@ -281,7 +282,9 @@ void dpi_set_timings(struct omap_dss_device *dssdev,
281 282
282 mutex_lock(&dpi.lock); 283 mutex_lock(&dpi.lock);
283 284
285 dpi.timings = *timings;
284 dssdev->panel.timings = *timings; 286 dssdev->panel.timings = *timings;
287
285 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { 288 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
286 r = dispc_runtime_get(); 289 r = dispc_runtime_get();
287 if (r) 290 if (r)
@@ -296,7 +299,7 @@ void dpi_set_timings(struct omap_dss_device *dssdev,
296 299
297 mutex_unlock(&dpi.lock); 300 mutex_unlock(&dpi.lock);
298} 301}
299EXPORT_SYMBOL(dpi_set_timings); 302EXPORT_SYMBOL(omapdss_dpi_set_timings);
300 303
301int dpi_check_timings(struct omap_dss_device *dssdev, 304int dpi_check_timings(struct omap_dss_device *dssdev,
302 struct omap_video_timings *timings) 305 struct omap_video_timings *timings)