aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDaniel Morsing <daniel.morsing@gmail.com>2011-08-03 22:10:51 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-14 18:08:23 +0300
commit0f770b4765846846cc531f6828fb8402f92e2649 (patch)
tree31ed12aab54ca0a36de501e7ad64f53bac3c69de /drivers/video
parentOMAP: DSS2: check for manager when enabling display (diff)
downloadlinux-dev-0f770b4765846846cc531f6828fb8402f92e2649.tar.xz
linux-dev-0f770b4765846846cc531f6828fb8402f92e2649.zip
OMAP: DSS2: Don't allow moving managers away from enabled displays
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 <daniel.morsing@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 13d72d5c714b..63674b054d35 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -586,6 +586,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;