From patchwork Thu Oct 16 09:39:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 5089571 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 21A73C11AC for ; Thu, 16 Oct 2014 09:40:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53C19201EC for ; Thu, 16 Oct 2014 09:40:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 822AF201C7 for ; Thu, 16 Oct 2014 09:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751929AbaJPJkA (ORCPT ); Thu, 16 Oct 2014 05:40:00 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:45705 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbaJPJj6 (ORCPT ); Thu, 16 Oct 2014 05:39:58 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9G9dwoY025704; Thu, 16 Oct 2014 04:39:58 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9G9dwRp022808; Thu, 16 Oct 2014 04:39:58 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 16 Oct 2014 04:39:58 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9G9doGC003164; Thu, 16 Oct 2014 04:39:56 -0500 From: Tomi Valkeinen To: , CC: Felipe Balbi , Tomi Valkeinen Subject: [PATCH 4/5] OMAPFB: fix overlay disable when freeing resources. Date: Thu, 16 Oct 2014 12:39:46 +0300 Message-ID: <1413452387-25452-4-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1413452387-25452-1-git-send-email-tomi.valkeinen@ti.com> References: <1413452387-25452-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Tomi Valkeinen --- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index 9cbf1ced51c2..36ffb525be73 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c @@ -1833,14 +1833,10 @@ 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); - } + ovl->disable(ovl); } for (i = 0; i < fbdev->num_fbs; i++)