Skip to content

Commit b276dd0

Browse files
committed
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>
1 parent 4c6c65b commit b276dd0

1 file changed

Lines changed: 4 additions & 15 deletions

File tree

‎drivers/video/omap2/dss/dispc.c‎

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3902,44 +3902,33 @@ static void dispc_error_worker(struct work_struct *work)
39023902

39033903
if (bit & errors) {
39043904
int j;
3905-
struct omap_dss_device *dssdev = mgr->get_device(mgr);
3906-
bool enable;
39073905

39083906
DSSERR("SYNC_LOST on channel %s, restarting the output "
39093907
"with video overlays disabled\n",
39103908
mgr->name);
39113909

3912-
enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
3913-
dssdev->driver->disable(dssdev);
3910+
dss_mgr_disable(mgr);
39143911

39153912
for (j = 0; j < omap_dss_get_num_overlays(); ++j) {
39163913
struct omap_overlay *ovl;
39173914
ovl = omap_dss_get_overlay(j);
39183915

39193916
if (ovl->id != OMAP_DSS_GFX &&
39203917
ovl->manager == mgr)
3921-
dispc_ovl_enable(ovl->id, false);
3918+
ovl->disable(ovl);
39223919
}
39233920

3924-
dispc_mgr_go(mgr->id);
3925-
msleep(50);
3926-
3927-
if (enable)
3928-
dssdev->driver->enable(dssdev);
3921+
dss_mgr_enable(mgr);
39293922
}
39303923
}
39313924

39323925
if (errors & DISPC_IRQ_OCP_ERR) {
39333926
DSSERR("OCP_ERR\n");
39343927
for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
39353928
struct omap_overlay_manager *mgr;
3936-
struct omap_dss_device *dssdev;
39373929

39383930
mgr = omap_dss_get_overlay_manager(i);
3939-
dssdev = mgr->get_device(mgr);
3940-
3941-
if (dssdev && dssdev->driver)
3942-
dssdev->driver->disable(dssdev);
3931+
dss_mgr_disable(mgr);
39433932
}
39443933
}
39453934

0 commit comments

Comments
 (0)