* [PATCH] OMAP: DSS2: Don't allow moving managers away from enabled displays
@ 2011-08-03 20:10 Daniel Morsing
2011-08-04 8:08 ` [PATCH] OMAP: DSS2: Don't allow moving managers away from Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Morsing @ 2011-08-03 20:10 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap, Daniel Morsing, linux-fbdev
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(-)
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAP: DSS2: Don't allow moving managers away from
2011-08-03 20:10 [PATCH] OMAP: DSS2: Don't allow moving managers away from enabled displays Daniel Morsing
@ 2011-08-04 8:08 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2011-08-04 8:08 UTC (permalink / raw)
To: Daniel Morsing; +Cc: linux-omap, linux-fbdev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-04 8:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 20:10 [PATCH] OMAP: DSS2: Don't allow moving managers away from enabled displays Daniel Morsing
2011-08-04 8:08 ` [PATCH] OMAP: DSS2: Don't allow moving managers away from Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).