summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays/panel-taal.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-11 15:11:01 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-24 14:31:27 +0200
commit225b650d41e7cdbf5cd322a461b04493caabed09 (patch)
treedcd6b3f83036eeb13777f018aca4cf8273d087c5 /drivers/video/omap2/displays/panel-taal.c
parenta269950405ab17ce3a604ddcd939709a4a7a747c (diff)
downloadlinux-stable-225b650d41e7cdbf5cd322a461b04493caabed09.tar.gz
linux-stable-225b650d41e7cdbf5cd322a461b04493caabed09.tar.bz2
linux-stable-225b650d41e7cdbf5cd322a461b04493caabed09.zip
OMAP: DSS2: move enable/get_te()
Move enable/get_te() from omap_dss_device to omap_dss_driver. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/displays/panel-taal.c')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index e00502ea46e5..af4b0b03b745 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -736,6 +736,8 @@ static int taal_enable_te(struct omap_dss_device *dssdev, bool enable)
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
int r;
+ dsi_bus_lock();
+
td->te_enabled = enable;
if (enable)
@@ -743,9 +745,23 @@ static int taal_enable_te(struct omap_dss_device *dssdev, bool enable)
else
r = taal_dcs_write_0(DCS_TEAR_OFF);
+ omapdss_dsi_enable_te(dssdev, enable);
+
+ /* XXX for some reason, DSI TE breaks if we don't wait here.
+ * Panel bug? Needs more studying */
+ msleep(100);
+
+ dsi_bus_unlock();
+
return r;
}
+static int taal_get_te(struct omap_dss_device *dssdev)
+{
+ struct taal_data *td = dev_get_drvdata(&dssdev->dev);
+ return td->te_enabled;
+}
+
static int taal_wait_te(struct omap_dss_device *dssdev)
{
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
@@ -993,7 +1009,9 @@ static struct omap_dss_driver taal_driver = {
.get_recommended_bpp = omapdss_default_get_recommended_bpp,
.enable_te = taal_enable_te,
+ .get_te = taal_get_te,
.wait_for_te = taal_wait_te,
+
.set_rotate = taal_rotate,
.get_rotate = taal_get_rotate,
.set_mirror = taal_mirror,