1 From 85848d329ca3a2d6ee6841cdc11cc5951d187931 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@nokia.com>
3 Date: Fri, 3 Apr 2009 19:09:20 +0200
4 Subject: [PATCH 17/69] DSS2: Disable video planes on sync lost error
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
9 When encountering the sync lost error disable the display and all video
10 planes on the affected manager. Afterwards re-enable the display.
12 Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
14 drivers/video/omap2/dss/dispc.c | 50 +++++++++++++++++++++++++++++++++++++++
15 1 files changed, 50 insertions(+), 0 deletions(-)
17 diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
18 index 1bc23f7..41734f3 100644
19 --- a/drivers/video/omap2/dss/dispc.c
20 +++ b/drivers/video/omap2/dss/dispc.c
21 @@ -2518,29 +2518,79 @@ static void dispc_error_worker(struct work_struct *work)
24 if (errors & DISPC_IRQ_SYNC_LOST) {
25 + struct omap_overlay_manager *manager = NULL;
26 + bool enable = false;
28 DSSERR("SYNC_LOST, disabling LCD\n");
30 for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
31 struct omap_overlay_manager *mgr;
32 mgr = omap_dss_get_overlay_manager(i);
34 if (mgr->id == OMAP_DSS_CHANNEL_LCD) {
36 + enable = mgr->display->state ==
37 + OMAP_DSS_DISPLAY_ACTIVE;
38 mgr->display->disable(mgr->display);
44 + for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
45 + struct omap_overlay *ovl;
46 + ovl = omap_dss_get_overlay(i);
48 + if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
51 + if (ovl->id != 0 && ovl->manager == manager)
52 + dispc_enable_plane(ovl->id, 0);
55 + dispc_go(manager->id);
58 + manager->display->enable(manager->display);
62 if (errors & DISPC_IRQ_SYNC_LOST_DIGIT) {
63 + struct omap_overlay_manager *manager = NULL;
64 + bool enable = false;
66 DSSERR("SYNC_LOST_DIGIT, disabling TV\n");
68 for (i = 0; i < omap_dss_get_num_overlay_managers(); ++i) {
69 struct omap_overlay_manager *mgr;
70 mgr = omap_dss_get_overlay_manager(i);
72 if (mgr->id == OMAP_DSS_CHANNEL_DIGIT) {
74 + enable = mgr->display->state ==
75 + OMAP_DSS_DISPLAY_ACTIVE;
76 mgr->display->disable(mgr->display);
82 + for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
83 + struct omap_overlay *ovl;
84 + ovl = omap_dss_get_overlay(i);
86 + if (!(ovl->caps & OMAP_DSS_OVL_CAP_DISPC))
89 + if (ovl->id != 0 && ovl->manager == manager)
90 + dispc_enable_plane(ovl->id, 0);
93 + dispc_go(manager->id);
96 + manager->display->enable(manager->display);
100 if (errors & DISPC_IRQ_OCP_ERR) {