From patchwork Fri Aug 31 14:18:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manjunathappa, Prakash" X-Patchwork-Id: 1393671 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork2.kernel.org (Postfix) with ESMTP id E6F2DDFFCF for ; Fri, 31 Aug 2012 14:38:38 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7VEahOa006962; Fri, 31 Aug 2012 09:36:43 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7VEah0B001291; Fri, 31 Aug 2012 09:36:43 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 31 Aug 2012 09:36:42 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7VEag0H024194; Fri, 31 Aug 2012 09:36:42 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 9C6BA80627; Fri, 31 Aug 2012 09:36:42 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp20.itg.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by linux.omap.com (Postfix) with ESMTP id 41FC480626 for ; Fri, 31 Aug 2012 09:36:39 -0500 (CDT) Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q7VEaa6c022550; Fri, 31 Aug 2012 20:06:36 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Fri, 31 Aug 2012 20:06:36 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with SMTP id q7VEaYqh004260; Fri, 31 Aug 2012 20:06:35 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id E47A0158002; Fri, 31 Aug 2012 20:06:34 +0530 (IST) Received: from linux-psp-server.india.ext.ti.com (linux-psp-server [192.168.247.76]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q7VEaXI02214; Fri, 31 Aug 2012 20:06:34 +0530 (IST) From: "Manjunathappa, Prakash" To: Subject: [PATCH v2] da8xx-fb: enable LCDC if FB is unblanked Date: Fri, 31 Aug 2012 19:48:59 +0530 Message-ID: <1346422739-11362-1-git-send-email-prakash.pm@ti.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 CC: , Florian Tobias Schandinat X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com It is expected that LCDC to continue to be disabled after resume if it is blanked before suspend. This is also true for DVFS. But it is observed that LCDC being enabled after suspend/resume cycle or DVFS. Correcting it by having check for FB_BLANK_UNBLANK before enabling. Signed-off-by: Manjunathappa, Prakash --- Applies on top of fbdev-next of Florian Tobias Schandinat's tree. Since v1: Re-written commit message. drivers/video/da8xx-fb.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 761c8d1..1273354 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -962,7 +962,8 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb, par->lcd_fck_rate = clk_get_rate(par->lcdc_clk); lcd_disable_raster(); lcd_calc_clk_divider(par); - lcd_enable_raster(); + if (par->blank == FB_BLANK_UNBLANK) + lcd_enable_raster(); } } @@ -1486,10 +1487,12 @@ static int fb_resume(struct platform_device *dev) console_lock(); clk_enable(par->lcdc_clk); - lcd_enable_raster(); + if (par->blank == FB_BLANK_UNBLANK) { + lcd_enable_raster(); - if (par->panel_power_ctrl) - par->panel_power_ctrl(1); + if (par->panel_power_ctrl) + par->panel_power_ctrl(1); + } fb_set_suspend(info, 0); console_unlock();