Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63cec5a2 authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

OMAPFB: fix overlay disable when freeing resources.



When omapfb is shutting down, it will disable all the overlays. However,
instead of actually disabling all the overlays, it disables only all the
overlays that are currently attached to framebuffers.

On OMAP4+, this leaves the fourth overlay left enabled.

Fix the loop so that we actually go through all the overlays.

Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 22500c19
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1833,15 +1833,11 @@ static void omapfb_free_resources(struct omapfb2_device *fbdev)
	if (fbdev == NULL)
		return;

	for (i = 0; i < fbdev->num_fbs; i++) {
		struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
		int j;
	for (i = 0; i < fbdev->num_overlays; i++) {
		struct omap_overlay *ovl = fbdev->overlays[i];

		for (j = 0; j < ofbi->num_overlays; j++) {
			struct omap_overlay *ovl = ofbi->overlays[j];
		ovl->disable(ovl);
	}
	}

	for (i = 0; i < fbdev->num_fbs; i++)
		unregister_framebuffer(fbdev->fbs[i]);