From patchwork Fri Aug 31 13:00:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manjunathappa, Prakash" X-Patchwork-Id: 1393221 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F9EF3FF1B for ; Fri, 31 Aug 2012 13:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836Ab2HaNSJ (ORCPT ); Fri, 31 Aug 2012 09:18:09 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:48475 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752686Ab2HaNSH (ORCPT ); Fri, 31 Aug 2012 09:18:07 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q7VDI39S003254; Fri, 31 Aug 2012 08:18:04 -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 q7VDI0LW009355; Fri, 31 Aug 2012 18:48:00 +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 18:48:00 +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 q7VDHwEV031665; Fri, 31 Aug 2012 18:47:59 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 9BBD6158002; Fri, 31 Aug 2012 18:47:58 +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 q7VDHuI01067; Fri, 31 Aug 2012 18:47:57 +0530 (IST) From: "Manjunathappa, Prakash" To: CC: Florian Tobias Schandinat , , "Manjunathappa, Prakash" Subject: [PATCH] da8xx-fb: enable LCDC if FB is unblanked Date: Fri, 31 Aug 2012 18:30:20 +0530 Message-ID: <1346418020-31779-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 Check for FB_BLANK_UNBLANK before enabling LCDC from PM resume and DVFS. Without this, behavior in case of below used case is not be not expected, 1) Issue FB_BLANK, LCDC disabled. 2) Do suspend/resume cycle or DVFS. 3) Do not expect LCDC to get enabled at this point. Re-enabling of LCDC is done when FB_BLANK_UNBLANK is issued. Signed-off-by: Manjunathappa, Prakash --- Applies on top of fbdev-next of Florian Tobias Schandinat's tree. 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();