Message ID | 1312402251-31588-1-git-send-email-daniel.morsing@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Tomi Valkeinen |
Headers | show |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;
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> --- drivers/video/omap2/dss/manager.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)