Skip to content

Commit

Permalink
OMAP: DSS2: Don't allow moving managers away from enabled displays
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Morsing authored and Tomi Valkeinen committed Sep 14, 2011
1 parent 05e1d60 commit 0f770b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/video/omap2/dss/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f770b4

Please sign in to comment.