提交 0f770b47 编写于 作者: D Daniel Morsing 提交者: Tomi Valkeinen

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: NDaniel Morsing <daniel.morsing@gmail.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 05e1d606
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册