summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-05 17:11:12 +0530
committerArchit Taneja <archit@ti.com>2012-08-15 15:48:45 +0530
commitc7833f7bc049dfd844ce3042798cf48551b5f14d (patch)
tree3f57eb443e028ce3d4d2feb3fa0bfed5f94bc345
parented1aa9003bc359a3139cbd6c31eb834fa71b26d9 (diff)
downloadblackbird-op-linux-c7833f7bc049dfd844ce3042798cf48551b5f14d.tar.gz
blackbird-op-linux-c7833f7bc049dfd844ce3042798cf48551b5f14d.zip
OMAPDSS: SDI: Create a function to set timings
Create function omapdss_sdi_set_timings(). Configuring new timings is done the same way as before, SDI is disabled, and re-enabled with the new timings in dssdev. This just moves the code from the panel drivers to the SDI driver. The panel drivers shouldn't be aware of how SDI manages to configure a new set of timings. This should be taken care of by the SDI driver itself. Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r--drivers/video/omap2/displays/panel-acx565akm.c13
-rw-r--r--drivers/video/omap2/dss/sdi.c17
-rw-r--r--include/video/omapdss.h2
3 files changed, 20 insertions, 12 deletions
diff --git a/drivers/video/omap2/displays/panel-acx565akm.c b/drivers/video/omap2/displays/panel-acx565akm.c
index eaeed4340e04..11bdc883e46b 100644
--- a/drivers/video/omap2/displays/panel-acx565akm.c
+++ b/drivers/video/omap2/displays/panel-acx565akm.c
@@ -731,18 +731,7 @@ static int acx_panel_resume(struct omap_dss_device *dssdev)
static void acx_panel_set_timings(struct omap_dss_device *dssdev,
struct omap_video_timings *timings)
{
- int r;
-
- if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
- omapdss_sdi_display_disable(dssdev);
-
- dssdev->panel.timings = *timings;
-
- if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
- r = omapdss_sdi_display_enable(dssdev);
- if (r)
- dev_err(&dssdev->dev, "%s enable failed\n", __func__);
- }
+ omapdss_sdi_set_timings(dssdev, timings);
}
static int acx_panel_check_timings(struct omap_dss_device *dssdev,
diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c
index 5d31699fbd3c..0474962571c6 100644
--- a/drivers/video/omap2/dss/sdi.c
+++ b/drivers/video/omap2/dss/sdi.c
@@ -146,6 +146,23 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev)
}
EXPORT_SYMBOL(omapdss_sdi_display_disable);
+void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ int r;
+
+ dssdev->panel.timings = *timings;
+
+ if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
+ omapdss_sdi_display_disable(dssdev);
+
+ r = omapdss_sdi_display_enable(dssdev);
+ if (r)
+ DSSERR("failed to set new timings\n");
+ }
+}
+EXPORT_SYMBOL(omapdss_sdi_set_timings);
+
static int __init sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 0898c2fad9ae..a06a9ba3872d 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -744,6 +744,8 @@ int dpi_check_timings(struct omap_dss_device *dssdev,
int omapdss_sdi_display_enable(struct omap_dss_device *dssdev);
void omapdss_sdi_display_disable(struct omap_dss_device *dssdev);
+void omapdss_sdi_set_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings);
int omapdss_rfbi_display_enable(struct omap_dss_device *dssdev);
void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev);
OpenPOWER on IntegriCloud