From patchwork Mon Aug 27 11:10:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10576981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D40161803 for ; Mon, 27 Aug 2018 11:13:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C315D2931C for ; Mon, 27 Aug 2018 11:13:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B64082950B; Mon, 27 Aug 2018 11:13:07 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 366402931C for ; Mon, 27 Aug 2018 11:13:07 +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:References:In-Reply-To: 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: List-Owner; bh=engZ3AbLRlASJoRS/tngqqa2f9aroFdF/STNLFnypXg=; b=ly6Q5N/myMiSr2 4UjHCrwDMPokNIigsWkjqS6VkKfKV/UOdLZdoAgI0D2ZgGtd7J8ZgY7h6rya3T5FUNhuh+mXmiyNG mUaaVCJy9PynuwZpe69ltHKrbTJhJp7Ge+1DpIKbKh9i+fuCPq/oFWJFGpNT6yM09svBWSigG6kYa 8FWVaFt/31Z0BwljtgpIH/nEaPF3/fG/A7v9kYYYF4vD6tL7Sw6uJsRfS5KiOfzJHNJdWeGZBm4BQ SLxiog8e7EYIe7ScTf9bxo48RQ67XkNJ8bWb2JDTs5PfcQOyXPOgLCvpb4hw3+/btWCE+UWnhEiQ7 cgTdEVJvsx4Hti4scUvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuFS5-0008N5-6c; Mon, 27 Aug 2018 11:12:57 +0000 Received: from mail-he1eur01on0088.outbound.protection.outlook.com ([104.47.0.88] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuFQb-0007gC-CJ for linux-arm-kernel@lists.infradead.org; Mon, 27 Aug 2018 11:11:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1QAhmaXx6KCcyr6kdBHbCSNBB1V8087ar5J2iuHWfNE=; b=xJLzMNQ5Inc8M4Tx9FlYlkaVv6egd16lG3hESyW2cgFhOz/E+AuxHCGM/s8fxUqJRFAz9DQExwIJ+fnPtIXEeqbyFGDhV6PtwKhaihqsJ0FAAu7S7+fYw77IlxFYFbb6EmogPJN4HJ6JDpmUIyR7ZIn6y5CMXnOKb5KEuVGgmFU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; Received: from localhost.localdomain (95.76.156.53) by DB7PR04MB4297.eurprd04.prod.outlook.com (2603:10a6:5:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Mon, 27 Aug 2018 11:11:09 +0000 From: Leonard Crestez To: Marek Vasut , Philipp Zabel Subject: [RESEND 3/5] drm/mxsfb: Add pm_runtime calls to pipe_enable/disable Date: Mon, 27 Aug 2018 14:10:39 +0300 Message-Id: <22181175cbefbd997596969e1e3addc04063be03.1535367027.git.leonard.crestez@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: HE1PR0802CA0012.eurprd08.prod.outlook.com (2603:10a6:3:bd::22) To DB7PR04MB4297.eurprd04.prod.outlook.com (2603:10a6:5:28::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f6f00e5-7826-41c6-ad15-08d60c0dcbd9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR04MB4297; X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4297; 3:SXo4Oc16xeUF8QTXzMgnOxvwyWHskd0Spc8MiLj82cMaFDJXVsLYDgJmwQv3JLs7ucLitW7eniw8N1bkJKNzrqd7hicC4ueu7IWggOdK89SNxnslgDA7n9ukmLl0RTEQGN9Ig9IIYlCKD68Cdl8/wnJc/zfE+m9Lea5iPty6ls4pu4ElSOfkSHEfQ55JHIdwgBuSTOqqCa7zRmZo/EHi9b9RtoacdkEk6S+KB/+HUp0cBBjYpy8y8+lAMH2KmxCE; 25:Esfzaml00Nd68lmiz8YLV3RIMORNaJGUMGn9WQyMPIH0osz4yTvpGOjIEdBM2Chn8rkFySQYAqhkO1XZg/J45FGUJHH3Je2kD1vwFl1N46ccNqG4xWSXCAxDjJZCV9PgpIXXc2XY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2ebVlW5pWeEy+XzcmkkV2HvyYJd/JP+7TLozgcSIBmPncWEFnq916xmB8P/8CiacipmNZtfVLpLPlS8B97jqDSRr226QUEChT1TmfeQ4/TQqJ2UbgolCUuRVvTKgPhxEDvNvaH5Lw6xGJuA/BbpfmvbxjH1j/lDKp4h1pLPJ2J8TFYHXs9oYSCHMw1eHCUXYNRnw3bIx6Fy0C3WFqDUudh3ThvxQJr8ejFYhrVv7NpgmFpSBhe+3B4KGQyJUgmhcefFlXeyA5P X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(3231311)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016); SRVR:DB7PR04MB4297; BCL:0; PCL:0; RULEID:; SRVR:DB7PR04MB4297; X-Forefront-PRVS: 07778E4001 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(376002)(136003)(366004)(346002)(39860400002)(199004)(189003)(4326008)(305945005)(478600001)(6666003)(2906002)(36756003)(446003)(476003)(2616005)(956004)(81166006)(8676002)(81156014)(14444005)(44832011)(7736002)(486006)(11346002)(3846002)(6116002)(47776003)(6486002)(66066001)(97736004)(575784001)(86362001)(54906003)(5660300001)(53936002)(6512007)(16586007)(110136005)(316002)(50466002)(48376002)(50226002)(118296001)(105586002)(8936002)(106356001)(51416003)(186003)(26005)(52116002)(16526019)(6506007)(386003)(68736007)(25786009)(76176011)(69590400005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4297; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR04MB4297; 23:z1tAnZm9ViCd5PDep5ImvkaAFjgsRy/ymaR+mInz9?= xYdp6UyyAZ9avE0dnY9CFtRUm6kZutfUFdhSUFshXr/nviZ1q6ZtoYOlUYNXH03xD1GRg2V6JeCuRGxAkxmJ69O68WcW1oRlGvUuAtH5+J6BhrHfW79fmcrkUKl1lmvM0eCe662fr/lRw5Gi1kHsIlFcqWxSXCthT1SjQPejSVz1Nx6Sj1FTQbavaJSmRM7FnJuf29yxqlqDnrURbVwdGj4KLd1fcDxRE85/w0v/e2gXsbCoUo245dL807xIQ9yDVEle20YbBY1nqlKLhaITjVHuaXxYlDRMnDtVlOjBBQHjctlOQRrwyAieCGLjhWcf+YARvjqo1kNjfDBg5YK/g69Isp+2To22eaWLAJF64P8HeCnvViYwEFKitd/2hxdga2fJ8u6rxf0KINwQR5nOzRMCuUX5PfQiXOesU33hHus6uNYyW/S0KGVVR8WCbJ9T3YZcROlG+JxFEBUY956uvu3wfJkTnZO95Q7AX+A+EPmLeHAYhhILx69LGfmysu4EZeex+dq10XupQ4JQ1wBLjb627wQvhlGlWQ3QdJ3Lsg6P7jJDu4Sx715m7WEd6oImN3W/IARxemwB8xAW9zBSwu8yQdLmk8EE6YETT/RvoUS9WgrsFUGMC7hgXmxbsMWrGbRIyD3XU0ozJ2OqGH5K03Je2XM3pDwZx9R/uukrQXsZRSDdJEAC7hXynd3Zsp7Ka/2VApFlYJFDOtE7TMAcJq1ysqvAV9GAkfu9RFLeEfcGHIsuqheCV3k+40TQHX40LMQRurJjifxvuCWojTY/mZDiXdnmDimk5kNyXOsrWsDQ2zNpiqvdbESXz9WROYuhMuJXXM2mWHU5Kms8znpGky2C/Udjyb5lDxxfb4fVwpJppPwLlJHojcqvZWSvIz/ESdJgZXM0D9vpalRn+eBcapNB1+KfRKvw0mnR3EJ8vzSjNbr54TvOh8UaxUr8rxDG7SEdw/A9AaTUU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Fc59cvP1KHBybDYZsuNTmMfLlnRQrhm21BF0iMhySj1br8AOkksIr+YgjTUuQdnhz16oCXzNgcuSjwRcexBY2xfBz/PpKb8xIsFEfoTWO8IQDGyFfBotXcJhHrw51E4dhHJeYJZoqAVYSKtRbupQ==; 5:kHYEUVkilbdeFzEhA8vYDEpuSPh2nn1fpkZSZOETtfX4kp5AMFbnHpdxK+GvSBdui0ZcHsqSQYeMMJ3JqTylkp6BtiuIsYq7sQsWuoT4eyFjWTZYyQi1iyyEJKBEKIXRDfCyMiSZBzg+MNsOHgrgEZ7DCl2kSOD/V1Ay0jawOLs=; 7:dMTr6Ok5DY16j/YpMF2rjmN0wFyu4PVVLIon4hT3/vpFckfHAeDfAn0y5KNEAz7PZqcQyYR+h76pau9lsJ+4I2j/q+iOND0UftKn0810HmqHjNKNKMwiu98fS8uCebsp/dnBC9BEXDdlW1wNG5vuOzrmBqhYkw26x1PLb9iya4mO++Z8jIcHEysKxlUqT1yg3wW5mfYbae+6KnbMf9E3o9uBMb+qlUxutO+7KkpCAp3/h0iGT5HiqOy5zcc8oLPw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2018 11:11:09.5609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f6f00e5-7826-41c6-ad15-08d60c0dcbd9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4297 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180827_041125_453801_9612F1D4 X-CRM114-Status: GOOD ( 10.80 ) 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: Dong Aisheng , David Airlie , linux-kernel@vger.kernel.org, Stefan Agner , Robert Chiras , dri-devel@lists.freedesktop.org, kernel@pengutronix.de, Fabio Estevam , Marco Franchi , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-imx@nxp.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 Adding lcdif nodes to a power domain currently results in black/corrupted screens or hangs because power is not correctly enabled when required. Ensure power is on when display is active by adding pm_runtime_get/put_sync to mxsfb_pipe_enable/disable. Signed-off-by: Leonard Crestez Reviewed-by: Stefan Agner --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index ffe5137ccaf8..68d79f5dc0d3 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -101,23 +101,27 @@ static const struct drm_mode_config_funcs mxsfb_mode_config_funcs = { static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe, struct drm_crtc_state *crtc_state, struct drm_plane_state *plane_state) { struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); + struct drm_device *drm = pipe->plane.dev; + pm_runtime_get_sync(drm->dev); drm_panel_prepare(mxsfb->panel); mxsfb_crtc_enable(mxsfb); drm_panel_enable(mxsfb->panel); } static void mxsfb_pipe_disable(struct drm_simple_display_pipe *pipe) { struct mxsfb_drm_private *mxsfb = drm_pipe_to_mxsfb_drm_private(pipe); + struct drm_device *drm = pipe->plane.dev; drm_panel_disable(mxsfb->panel); mxsfb_crtc_disable(mxsfb); drm_panel_unprepare(mxsfb->panel); + pm_runtime_put_sync(drm->dev); } static void mxsfb_pipe_update(struct drm_simple_display_pipe *pipe, struct drm_plane_state *plane_state) {