[PATCH] OMAP: DSS2: Don't allow moving managers away from enabled displays

Subsystems: framebuffer layer, the rest

STALE5494d

2 messages, 2 authors, 2011-08-04 · open the first message on its own page

[PATCH] OMAP: DSS2: Don't allow moving managers away from enabled displays

From: Daniel Morsing <hidden>
Date: 2011-08-03 20:10:51

If a manager is moved while attached to an enabled display, the DSS
system will be left in an inconsistent state. This will eventually cause
a kernel oops when the enabled display is disabled.

Fix this by not allowing the user to move a manager away from an enabled
display.

Signed-off-by: Daniel Morsing <redacted>
---
 drivers/video/omap2/dss/manager.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 9aeea50..d3372d1 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -502,6 +502,13 @@ static int omap_dss_unset_device(struct omap_overlay_manager *mgr)
 		return -EINVAL;
 	}
 
+	/*
+	 * Don't allow currently enabled displays to have the overlay manager
+	 * pulled out from underneath them
+	 */
+	if (mgr->device->state != OMAP_DSS_DISPLAY_DISABLED)
+		return -EINVAL;
+
 	mgr->device->manager = NULL;
 	mgr->device = NULL;
 	mgr->device_changed = true;
-- 
1.7.6

Re: [PATCH] OMAP: DSS2: Don't allow moving managers away from

From: Tomi Valkeinen <hidden>
Date: 2011-08-04 08:08:43

On Wed, 2011-08-03 at 22:10 +0200, Daniel Morsing wrote:
If a manager is moved while attached to an enabled display, the DSS
system will be left in an inconsistent state. This will eventually cause
a kernel oops when the enabled display is disabled.

Fix this by not allowing the user to move a manager away from an enabled
display.
Thanks, applying.

 Tomi

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help