summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-11-28 17:01:39 +0530
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-29 12:48:49 +0200
commitbdb736abfad5d61d1004dcc11dae2f7b651e5bb4 (patch)
tree0d6a328de87490b546ab84fa1ff831378316866f /drivers/video/omap2/dss/dss.c
parent8f46efadf30476692a2f311ad335077ba8fca383 (diff)
downloadop-kernel-dev-bdb736abfad5d61d1004dcc11dae2f7b651e5bb4.zip
op-kernel-dev-bdb736abfad5d61d1004dcc11dae2f7b651e5bb4.tar.gz
OMAPDSS: Use only "omapdss_dss" platform device to get context lost count
When enabling a hwmod, omap_hwmod refers to the register mentioned in the hwmod struct's member 'prcm.omap4.context_offs' to see whether context was lost or not. It increments the context lost count for the hwmod and then clears the register. All the DSS hwmods have the same register(RM_DSS_DSS_CONTEXT) as context_offs. When DSS is enabled, the first hwmod to be enabled is the "dss_core" hwmod since it's corresponding platform device is the parent platform device("omapdss_dss"). The dss_core hwmod updates it's context lost count correctly and clears the register. When the hwmods corresponding to the children platform devices are enabled, they see that the register is clear, and don't increment their context lost count. Therefore, all the children platform devices never report a loss in context. The DISPC driver currently gets the context lost count for DSS power domain from it's corresponding platform device instance("omapdss_dispc"). The DISPC platform device is one of the child devices, and it's corresponding hwmod("dss_dispc") doesn't report the context lost count correctly. Modify dss_get_ctx_loss_count() such that it always takes the "omapdss_dss" platform device as it's input, move the function to dss.c so that it has access to that platform device. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r--drivers/video/omap2/dss/dss.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 6ca69d5..833f162 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -154,6 +154,21 @@ static void dss_restore_context(void)
#undef SR
#undef RR
+int dss_get_ctx_loss_count(void)
+{
+ struct omap_dss_board_info *board_data = dss.pdev->dev.platform_data;
+ int cnt;
+
+ if (!board_data->get_context_loss_count)
+ return -ENOENT;
+
+ cnt = board_data->get_context_loss_count(&dss.pdev->dev);
+
+ WARN_ONCE(cnt < 0, "get_context_loss_count failed: %d\n", cnt);
+
+ return cnt;
+}
+
void dss_sdi_init(int datapairs)
{
u32 l;
OpenPOWER on IntegriCloud