aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-01-09 06:46:20 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-01-13 05:19:56 -0500
commitb52a6e7fb61682db1ae309c5fa51b5c04168838d (patch)
tree48d204506a0ddef8c1185969bd74cdc61a4dbea6
parent40359a9b08cc51362a4dddfa2beb3b59e24e2b53 (diff)
OMAPFB: disable overlays on driver removal
When omapfb module is removed, the driver will turn off all the displays it manages. However, it leaves the overlays enabled. While the overlays are obviously disabled as the displays are disabled, it causes issues when the driver module is loaded again, as at that point the overlays are still enabled on the hardware level. The result is that even if the SW thinks overlays are disabled, they are actually enabled. Fix this by making sure the overlays are disabled at module removal. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 2ff9f039b7cb..fcb9e932d00c 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1833,6 +1833,16 @@ static void omapfb_free_resources(struct omapfb2_device *fbdev)
1833 if (fbdev == NULL) 1833 if (fbdev == NULL)
1834 return; 1834 return;
1835 1835
1836 for (i = 0; i < fbdev->num_fbs; i++) {
1837 struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
1838 int j;
1839
1840 for (j = 0; j < ofbi->num_overlays; j++) {
1841 struct omap_overlay *ovl = ofbi->overlays[j];
1842 ovl->disable(ovl);
1843 }
1844 }
1845
1836 for (i = 0; i < fbdev->num_fbs; i++) 1846 for (i = 0; i < fbdev->num_fbs; i++)
1837 unregister_framebuffer(fbdev->fbs[i]); 1847 unregister_framebuffer(fbdev->fbs[i]);
1838 1848