aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-06-15 08:34:24 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-10-29 06:44:44 -0400
commitb276dd091673589450d56812ffcfddca961c1a41 (patch)
treec3bd9bcf77f3fe4313111b38ec8be0760ca6ba91 /drivers/video
parent4c6c65b013a20054585dfca5cfbf3a2f6393ab50 (diff)
OMAPDSS: DISPC: remove dssdev depependency from error handler
The dispc error handler tries to "fix" issues by disabling and enabling panel. This is problematic, as we're trying to remove the dependency from omapdss to the omap_dss_devices. It's also racy, and doesn't really fix anything. This patch removes the use of omap_dss_device from the error handler, and just disables and enables the associated overlay manager. This should produce similar results as the previous solution, without using dssdev. However, the error handling is still horrible. But the problem boils down to one question, to which I don't have a clear answer: what to do when a HW error happens? Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dispc.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 070ce306da1..05def42e528 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3902,15 +3902,12 @@ static void dispc_error_worker(struct work_struct *work)
3902 3902
3903 if (bit & errors) { 3903 if (bit & errors) {
3904 int j; 3904 int j;
3905 struct omap_dss_device *dssdev = mgr->get_device(mgr);
3906 bool enable;
3907 3905
3908 DSSERR("SYNC_LOST on channel %s, restarting the output " 3906 DSSERR("SYNC_LOST on channel %s, restarting the output "
3909 "with video overlays disabled\n", 3907 "with video overlays disabled\n",
3910 mgr->name); 3908 mgr->name);
3911 3909
3912 enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; 3910 dss_mgr_disable(mgr);
3913 dssdev->driver->disable(dssdev);
3914 3911
3915 for (j = 0; j < omap_dss_get_num_overlays(); ++j) { 3912 for (j = 0; j < omap_dss_get_num_overlays(); ++j) {
3916 struct omap_overlay *ovl; 3913 struct omap_overlay *ovl;
@@ -3918,14 +3915,10 @@ static void dispc_error_worker(struct work_struct *work)
3918 3915
3919 if (ovl->id != OMAP_DSS_GFX && 3916 if (ovl->id != OMAP_DSS_GFX &&
3920 ovl->manager == mgr) 3917 ovl->manager == mgr)
3921 dispc_ovl_enable(ovl->id, false); 3918 ovl->disable(ovl);
3922 } 3919 }
3923 3920
3924 dispc_mgr_go(mgr->id); 3921 dss_mgr_enable(mgr);
3925 msleep(50);
3926
3927 if (enable)
3928 dssdev->driver->enable(dssdev);
3929 } 3922 }
3930 } 3923 }
3931 3924
@@ -3933,13 +3926,9 @@ static void dispc_error_worker(struct work_struct *work)
3933 DSSERR("OCP_ERR\n"); 3926 DSSERR("OCP_ERR\n");
3934 for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) { 3927 for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
3935 struct omap_overlay_manager *mgr; 3928 struct omap_overlay_manager *mgr;
3936 struct omap_dss_device *dssdev;
3937 3929
3938 mgr = omap_dss_get_overlay_manager(i); 3930 mgr = omap_dss_get_overlay_manager(i);
3939 dssdev = mgr->get_device(mgr); 3931 dss_mgr_disable(mgr);
3940
3941 if (dssdev && dssdev->driver)
3942 dssdev->driver->disable(dssdev);
3943 } 3932 }
3944 } 3933 }
3945 3934