From patchwork Wed Aug 8 16:08:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10563427 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 1D63A14C0 for ; Sat, 11 Aug 2018 12:05:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFFB72A515 for ; Sat, 11 Aug 2018 12:05:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E44892A529; Sat, 11 Aug 2018 12:05: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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 948422A515 for ; Sat, 11 Aug 2018 12:05:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 746346E1B3; Sat, 11 Aug 2018 12:05:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40045.outbound.protection.outlook.com [40.107.4.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id D14C189E08 for ; Wed, 8 Aug 2018 16:09:31 +0000 (UTC) Received: from localhost.localdomain (95.76.156.53) by VI1PR04MB4301.eurprd04.prod.outlook.com (2603:10a6:803:3f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Wed, 8 Aug 2018 16:09:26 +0000 From: Leonard Crestez To: Stefan Agner , Marek Vasut , Shawn Guo Subject: [PATCH v4 0/5] drm/mxsfb: Fix runtime PM for unpowering lcdif block Date: Wed, 8 Aug 2018 19:08:57 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: DB6PR02CA0004.eurprd02.prod.outlook.com (2603:10a6:6:15::17) To VI1PR04MB4301.eurprd04.prod.outlook.com (2603:10a6:803:3f::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ce8921f-ac90-4693-3004-08d5fd495148 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB4301; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB4301; 3:UF36lloBX5EYVj+BGZXrBphHMXqOJNanhvYdoyUlGMTDoeS0VGkXA0cm0+5vq4Q3d7TDDXAIcOqCsY+mJ2SB4XCbks4ALgiKaFIXDtI6e3MXB76Ck25hhQz6/QhyCNp7gdYrq3Kkncdh8QwLbF02j2TAvmfS2PNUHR4RONJNozBeZgg+zT3sKSjEDEOBA9h7Lkjhi5PQQlaylv8jsGPudvm+fgwiOs7hbuAJonExZIFPP2BGie9Ca3W2g4xJKaS4; 25:v17ZS1f20BpJZPbt4qXhswlyxNSSXGuFEBW1IA4O/0j6X0n41GcO2vw/ouWI4LTYk3J4VLTmd2cgLlZ9n34BBCdKHCwGaT+HegPt79D39n8oeOtn+wjs/nd8Ji64d7nWAztlhZcZjpu93XnlZ1zfey2z80KRXw2SSAkALDmoVJ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3whnownIEgcGba+Vq1xwhpVvkn2IVXVm1JjOkocG6eNEQm2Ok53OxkbFT52GNxIUnwli3bzdJUd5gvIWDTLHfZd6OFt3mYjHPokR2y47RzMu7/plFwCPthgDAZIhVcD+NaWdrg/vZZu+mJuHEhg12ej+k7dmOAR97n6m99UtonfGYYmqQvmpoKuvxm7RPJuTNbhu4TEHUA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:VI1PR04MB4301; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB4301; X-Forefront-PRVS: 07584EDBCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39850400004)(376002)(396003)(346002)(366004)(136003)(199004)(189003)(66066001)(7736002)(47776003)(6512007)(81166006)(68736007)(81156014)(25786009)(8676002)(6666003)(110136005)(54906003)(36756003)(5024004)(305945005)(6306002)(106356001)(105586002)(53936002)(50466002)(6486002)(97736004)(48376002)(86362001)(4326008)(966005)(3846002)(5660300001)(26005)(486006)(16526019)(186003)(316002)(2906002)(16586007)(6116002)(6506007)(44832011)(478600001)(8936002)(956004)(2616005)(50226002)(386003)(476003)(51416003)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4301; 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; VI1PR04MB4301; 23:hjxDHEsOpyYT7ZK3Wx0n3ntzhinmF9j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qzBtTd1KhOF8Yh+kvwZdtvaNEgH8jXHfZDivuHrfwtxp+EVu8i+ebB02NHAa0cQxWKbe1+cSuuK21tzAA+/YYRcKtSnX8TTLXI8MtBiJzU=; 7:trJhKxuvOp/7io8xhsdYSA5QJSMSuckHeT/ieNZXOoTAo0iPhfNEVn0WOf0gkk3CjGYipM0seDFL+6+boh3ZrWDqeMdA/BHbdyaP11rmi9ltz4iGCHF+tHXFHTFZAfM2maiUoqB/ttiZh9LgZqab30mJ9gpkHR6fn4tT4/lnCfa0vsoeQo8SHiWl05aJu1Hg3w+hr6Sz8cQIFvkdDCI8B/a7H4P6o43bS4hbkwYWyNyY79ArbIWrgutxzQupk+Qp SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2018 16:09:26.7793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ce8921f-ac90-4693-3004-08d5fd495148 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4301 X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dong Aisheng , kernel@pengutronix.de, Anson Huang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Fabio Estevam , linux-imx@nxp.com, Robert Chiras Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Adding lcdif nodes to a power domain currently does work, it results in black/corrupted screens or hangs. While the driver does enable runtime pm it does not deal correctly with the block being unpowered. Changes since v3: * Don't set initial fb in mode_set_nofb, do it in crtc_enable * Simplify AXI clk handling to allow setting fb in crtc_enable * No functional changes Last 3 patches are identical to v3 with review tags attached. Link to v3: https://lkml.org/lkml/2018/8/6/728 Leonard Crestez (5): drm/mxsfb: Move axi clk enable/disable to crtc enable/disable drm/mxsfb: Fix initial corrupt frame when activating display drm/mxsfb: Add pm_runtime calls to pipe_enable/disable drm/mxsfb: Add PM_SLEEP support drm/mxsfb: Switch to drm_atomic_helper_commit_tail_rpm drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 53 +++++++++++++++++++----------- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 40 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 19 deletions(-)