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: 1393661 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 603CADFFCF for ; Fri, 31 Aug 2012 14:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753822Ab2HaOgo (ORCPT ); Fri, 31 Aug 2012 10:36:44 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:58830 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753739Ab2HaOgo (ORCPT ); Fri, 31 Aug 2012 10:36:44 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7VEaex2023383; Fri, 31 Aug 2012 09:36:41 -0500 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: CC: Florian Tobias Schandinat , , "Manjunathappa, Prakash" 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 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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();