From patchwork Tue Mar 25 07:56:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongsheng Wang X-Patchwork-Id: 333307 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 60DB01401A0 for ; Tue, 25 Mar 2014 18:59:12 +1100 (EST) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0952D14008E for ; Tue, 25 Mar 2014 18:58:39 +1100 (EST) Received: from mail100-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 14.1.225.22; Tue, 25 Mar 2014 07:58:34 +0000 Received: from mail100-tx2 (localhost [127.0.0.1]) by mail100-tx2-R.bigfish.com (Postfix) with ESMTP id 9E6C8C01A0; Tue, 25 Mar 2014 07:58:34 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 1 X-BigFish: VS1(z551bizzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6hzz1de098h8275bh1de097hz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh25cch25f6h2605h268bh1155h) Received: from mail100-tx2 (localhost.localdomain [127.0.0.1]) by mail100-tx2 (MessageSwitch) id 1395734313586988_12945; Tue, 25 Mar 2014 07:58:33 +0000 (UTC) Received: from TX2EHSMHS023.bigfish.com (unknown [10.9.14.227]) by mail100-tx2.bigfish.com (Postfix) with ESMTP id 85C4C2200F2; Tue, 25 Mar 2014 07:58:33 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS023.bigfish.com (10.9.99.123) with Microsoft SMTP Server (TLS) id 14.16.227.3; Tue, 25 Mar 2014 07:58:33 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.3.158.2; Tue, 25 Mar 2014 07:58:32 +0000 Received: from titan.am.freescale.net (b45104-01-010192208233.ap.freescale.net [10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s2P7wP33030238; Tue, 25 Mar 2014 00:58:27 -0700 From: Dongsheng Wang To: , Subject: [PATCH] video/fsl: Fix the sleep function for FSL DIU module Date: Tue, 25 Mar 2014 15:56:20 +0800 Message-ID: <1395734180-45012-1-git-send-email-dongsheng.wang@freescale.com> X-Mailer: git-send-email 1.8.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Cc: linux-fbdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Wang Dongsheng , Jason Jin X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Jason Jin For deep sleep, the diu module will power off, when wake up from the deep sleep, the registers need to be reinitialized. Signed-off-by: Jason Jin Signed-off-by: Wang Dongsheng diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index e8758b9..7ec780c 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c @@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) static int fsl_diu_resume(struct platform_device *ofdev) { struct fsl_diu_data *data; + struct mfb_info *mfbi; + int i; data = dev_get_drvdata(&ofdev->dev); - enable_lcdc(data->fsl_diu_info); + fsl_diu_enable_interrupts(data); + update_lcdc(data->fsl_diu_info); + + for (i = 0; i < NUM_AOIS; i++) { + mfbi = &data->mfb[i]; + if (mfbi->count) + fsl_diu_enable_panel(&data->fsl_diu_info[i]); + } return 0; }