From patchwork Thu Sep 14 06:53:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Wang X-Patchwork-Id: 9952505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5AAB8602C9 for ; Thu, 14 Sep 2017 07:11:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C7FA27FA5 for ; Thu, 14 Sep 2017 07:11:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4138A28D5F; Thu, 14 Sep 2017 07:11:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97C6C27FA5 for ; Thu, 14 Sep 2017 07:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=6NkGLSk8QwFAORK6ZQSFRTFibYQ27ANfUBtQrorL6HA=; b=R/RLKNmYoEH1j5 vJB8nee5P3HyoqNWIVijtNDPnBBnEkIZOC0vaLsOkiSkVR43bjL3UB03cFKD3oV8pMUTD6vdNqqbn 0rnKVbkcpBh6Dfu8JkuM4Ja1YbNI2RCpCuHNxQIUBVDW/iTKs+I7Tj1DwqOybuXjek0TQNwd+FVij +neJnJXamErsVt8gfxHHwDKJR1FrMu/GoJwoIALNYDTgn6Eo5QxBk4nLcb1QFShRiC6hgBVVWOpx2 St2xkM1cfrUT09qo9o/qaEA514DHn9lEzWJ0stmRp3YXHWKAvSW7zpku1ZIJa8Rao5eFSC2Sk+Q0f bX4SuoM6aJX/o+G4rWuw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dsOJ4-0004RM-A5; Thu, 14 Sep 2017 07:11:26 +0000 Received: from mail-dm3nam03on0111.outbound.protection.outlook.com ([104.47.41.111] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dsOJ0-0004MI-HR for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2017 07:11:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freescale.onmicrosoft.com; s=selector1-freescale-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=U6lK7ZcHTsjlq9Rj7/lxI9/HrukmeIYCd3awcwaah+w=; b=OrdGrF2I5WS3NNXmCxpwNlxOsb64ObQ0EDtfiGi6sZXc1+fbaftFFpsUBR/KVfAG8OXmxea5CYuIa10t5ol4SLPB5Kx7qniOwlxJ1NxM39NExJlmTcAw2gAz4ZcPJmjDdjrpk1Uxa49zstmzlQs7mL/rhcj8jyeRCdhv2pfSYU0= Received: from BN6PR03CA0062.namprd03.prod.outlook.com (10.173.137.24) by BY2PR0301MB0776.namprd03.prod.outlook.com (10.160.64.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Thu, 14 Sep 2017 07:10:58 +0000 Received: from BN1AFFO11OLC004.protection.gbl (2a01:111:f400:7c10::194) by BN6PR03CA0062.outlook.office365.com (2603:10b6:404:4c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Thu, 14 Sep 2017 07:10:57 +0000 Authentication-Results: spf=neutral (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=none action=none header.from=freescale.com; Received-SPF: Neutral (protection.outlook.com: 192.88.168.50 is neither permitted nor denied by domain of freescale.com) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11OLC004.mail.protection.outlook.com (10.58.53.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Thu, 14 Sep 2017 07:10:57 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8E7ArT5003664; Thu, 14 Sep 2017 00:10:54 -0700 From: Alison Wang To: , , , , Subject: [PATCH 1/2] drm/fsl-dcu: Fix DCU pixel clock issue in suspend/resume functions Date: Thu, 14 Sep 2017 14:53:40 +0800 Message-ID: <20170914065341.17615-1-b18965@freescale.com> X-Mailer: git-send-email 2.14.1 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(39860400002)(2980300002)(189002)(199003)(5660300001)(356003)(316002)(47776003)(189998001)(305945005)(15650500001)(8676002)(16586007)(81156014)(81166006)(1076002)(2201001)(5003940100001)(36756003)(2906002)(50466002)(48376002)(8656003)(498600001)(575784001)(8936002)(50986999)(4326008)(53936002)(54906002)(50226002)(104016004)(77096006)(6666003)(97736004)(106466001)(105606002)(68736007)(42882006)(33646002)(42262002)(2101003); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0776; H:tx30smr01.am.freescale.net; FPR:; SPF:Neutral; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11OLC004; 1:hJN/Q8s0pUp/V6bhGfZq+FkfeyhIWoOK2P5MEL3IxysqSWfu/jKCS6Y+w3Sp4QHDdjrzvAynS5bd5rxqt+bBdfKAuGHr4i7QajUebo1ROH0pZNAKLTpz/Qj7pDPbJlS9 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cbdbf0a8-f3b0-4f52-c2d2-08d4fb3fbf3d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR0301MB0776; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0776; 3:J+yiEidacgvXQi7us332CDlhvV8nouAM5SpvHa0M/BDY7Qca8UK6W4ezEe4krW6pPmce9BnDtCe0zIkztrrCMIykkSIgP+e2OcRJ145Yo4JkCCz/QN/S3B69bPdk0MQXHHmHk1QVuapOPsmpWCAu/mzxWpnG1OUBWHWrTKgi9rkZO2eZH2gMoHwdo3hgUnxNmyNvIV/Ryb+UqOc9K1GXRep1wExJfHkE1voi4EYROuiOv7IYmjOdjDgkiunwe0a5C2qJdA4B9jC3fWYIaJq9Pbso//7k1J6XMLQ1OiNDZdmp4QIGIuz74X76MJ+Qyj/sJrFePNLNyPQtIK0qGwcnUwINE/VuMQ4wFzer52G9xR8=; 25:PYUlKAUlPNysklCijb8JCUpQJXmDv3VNHjR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js2MhgQ9g/RSG56ypzelAIqNA707URW+dIFjnaKQgh1IIJKR6ecMet+2HCY7qMibym6Hn9EA60UInqwQZrRodeR09jOZqGZjq7SlDI84i+diiDXi7U0ETdgFk8V22+tPayNPsFGHQzy8Nsjw7SSqtKuMLbfImthTjjhdKKjaI01nr6OGxJkAL+xfrwgl+eqPlyTraEj670EhYwAQm2BRysa6CjcGOGI= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0301MB0776; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0301MB0776; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB0776; 4:wdArR1d1GYdcBigYIqtRdymAxUBAx8gyi26nKAg1lsCfpEXDV4ZL0vM4m1RANMzeU158o+Z3cckJqacx6RgyCjk9El2Frr2cbjmcViU6asy/1/eG1l6LesOSNAXoNgDBhsI9y/XNbDkYbCXG8pZdYRpBVoFZ+bTRtX0dCvnJ8yF8H71g2/YT6wJpmZwbvnXAhYndk1kwPbQBamKLLM3kFhD7DEo8BxXXJcXv2O2LKUbd/6yydHx1gidvKfj235i+dvZvINuN66tkVsvP5nsI8w6REcTZAODdpSF7SAJLGus= X-Forefront-PRVS: 0430FA5CB7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0301MB0776; 23:/G7dfPcaYa52ePy/hkt7Sy+XGtFtRjwL/X19hhP?= =?us-ascii?Q?Z0kTMCumUz12xC1XmsJC3DLeLBtQOglmadVAfDTUhVQBnj2OeIlAJfhxZUTc?= =?us-ascii?Q?9OX/Gk49SquR0GVQHvtczdDuhRDn14n8lerSSYomJgG0Nqfp6v/FydJHX+48?= =?us-ascii?Q?Djwbj6i07gn1++WhoAf/s4qPNkDql/E7Fz1OTbdcVpsh0LFrmYJUWX6bjslA?= =?us-ascii?Q?HMlghurPGREjwk7HcAkI/HOiIgzJaJJ80WJK9iUfGbTlYBWNVUKyVti795Ao?= =?us-ascii?Q?XtTTicoJ780kSg2zLabahqYx54OFDvjccsZ6upGxOwBuBn9osAzrItBayunw?= =?us-ascii?Q?WWBjf1tvderJDN0sTuX1Xq+401qs/cSSTgvLz4bjy0PEbl9U6gQW+uyzPIZd?= =?us-ascii?Q?WqcHMARGAYT9zwrr+RYeNcp7RY0e5m+nM40KgP7gPDEvLXwFajx65JuJnWqx?= =?us-ascii?Q?RGKlHJT2m87e9ciwHV9fCrkBYjhS4ZBhCs4Ez4DIx6jG4Yhbn2k6Kg3FtJ33?= =?us-ascii?Q?VjiqU9jb5tovT+n2qtu40YKDssCY7561VYUbejzaJGiTPXmzBetCUIpeXPId?= =?us-ascii?Q?YyTiYv1NPlttdiwTiDKxXRM+1i58Gwx26oZT7LHl1fNeniY/vQSPmvcioBaM?= =?us-ascii?Q?eqtnGDmWj0SC7xuGjfY8o84zIgqz88ZD6Z1tGSSeANp8me96uS9wV+gnKsJj?= =?us-ascii?Q?YEol17K4Xu4wKBDZAqyigdnyY7NPQQnglXVlVL1QfEDHOqWcsFtMs5ih11EA?= =?us-ascii?Q?nNraO81B5FTKc6pFUpYm9CkLvmtVWgSD4BukBqQp7UF13ldMwvUCQfHacplG?= =?us-ascii?Q?IK/LwDx2yPVwV7/9cu1ly56qhdkaDCgqCPCrNRPS4LwdES/lViUSAVhvcB4I?= =?us-ascii?Q?HaX3UjxmaoJTDma8TRGTCyFSoJeyu81vVuD91SZ0Xx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cuG0Axr5cW9g16eq5HyFbAlPbszsiUfWl+4mCPO6YQ0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 07:10:57.4373 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0776 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170914_001122_735323_5F528CCB X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alison Wang , alison.wang@freescale.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As there is not corresponding clk_prepare_enable() for fsl_dev->pix_clk in previous contexts, clk_disable_unprepare() for fsl_dcu->pix_clk in suspend function will fail. This patch will add clk_prepare_enable() for fsl_dev->pix_clk in previous contexts and resume function to fix the issue. This patch is verified on LS1021ATWR board. Signed-off-by: Alison Wang --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 58e9e0601a61..875b0fdc4274 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -230,6 +230,12 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) return ret; } + ret = clk_prepare_enable(fsl_dev->pix_clk); + if (ret < 0) { + dev_err(dev, "failed to enable dcu pix clk\n"); + return ret; + } + if (fsl_dev->tcon) fsl_tcon_bypass_enable(fsl_dev->tcon); fsl_dcu_drm_init_planes(fsl_dev->drm); @@ -351,6 +357,12 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) goto disable_clk; } + ret = clk_prepare_enable(fsl_dev->pix_clk); + if (ret < 0) { + dev_err(dev, "failed to enable dcu pix clk\n"); + return ret; + } + fsl_dev->tcon = fsl_tcon_init(dev); drm = drm_dev_alloc(driver, dev);