From patchwork Mon Sep 17 13:42:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10604017 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 11ED313AD for ; Tue, 18 Sep 2018 09:58:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01F7329C91 for ; Tue, 18 Sep 2018 09:58:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9F8F29CA2; Tue, 18 Sep 2018 09:58:48 +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 977F629C91 for ; Tue, 18 Sep 2018 09:58:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D08EF6E3B9; Tue, 18 Sep 2018 09:57:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50043.outbound.protection.outlook.com [40.107.5.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2135388FE1 for ; Mon, 17 Sep 2018 13:43:01 +0000 (UTC) Received: from localhost.localdomain (95.76.156.53) by AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.18; Mon, 17 Sep 2018 13:42:56 +0000 From: Leonard Crestez To: Daniel Vetter , Philipp Zabel , Marek Vasut Subject: [RESEND 0/5] drm/mxsfb: Fix runtime PM for unpowering lcdif block Date: Mon, 17 Sep 2018 16:42:10 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: HE1P190CA0028.EURP190.PROD.OUTLOOK.COM (2603:10a6:7:52::17) To AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46a3d8b7-0949-411f-3c3a-08d61ca37aa3 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:AM0PR04MB4290; X-Microsoft-Exchange-Diagnostics: 1; AM0PR04MB4290; 3:Rx58XoU8wbFPem7AJsP91QBKJbz5rsR5HKexbEV4XfbXeZOWsL+yL/PMhJDWM6xVbN0+IqPx/FkAIJoBCNIdxfQY5agy1GwepEIr2W15ePzdf7TLnTLQvzNz40iSC8fTnZeAyill28qCp+W5sau5i9A+z1JPMRurg78NYS72b3NrtxI0UMYtiuYP0O/cQqN4Ls2kuvTKY8/zNduMfxSQlwUPjbqczuOpWttKynDSmoCXa1GCf9YfjHz36+JSPNvp; 25:+99MuH5F91HzlbYq0T594R5a1Zz6STTe2OV1j7YZ4gdy8wIEuABzwkaGx7pHI35NSPcd+G7i8G6erSNhjhnIub2KVvELxMT9Z/IxuFwvpNbsNhNPjGhuUQIho3Dv9UAEvn5PLFcDums/qlEXZ0ncS5NjCD77DmsYaCL/8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YJVWuQVikVwoP9px3sKT0HrzHs6BVnpD7WMv6KcWS8bE1Sr9xqfsvrfKPvqus/aU6glVq3hywJxnyWC6txYLxP4L1YyQDOD6v0xe4XDtY5bBkN/9F5C0Qthk2opAuZDSTlLG2VIqp6rtiMXsXbUvGTwlteRG3yQAHDGLP5mIJKqNDEKS5F76wsvOu5FPH6OOggBpDNkgMjXPnSA/A88fieZLrEg+O8sz+6zsVHmGvPcw0jACM6PigjsWoj X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(269456686620040); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231355)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699050); SRVR:AM0PR04MB4290; BCL:0; PCL:0; RULEID:; SRVR:AM0PR04MB4290; X-Forefront-PRVS: 0798146F16 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(376002)(396003)(346002)(136003)(39860400002)(366004)(199004)(189003)(6506007)(6306002)(81166006)(81156014)(8936002)(50226002)(478600001)(966005)(16526019)(186003)(106356001)(3846002)(6116002)(105586002)(97736004)(47776003)(26005)(68736007)(50466002)(48376002)(66066001)(6512007)(2906002)(5660300001)(386003)(110136005)(4326008)(7736002)(6666003)(476003)(956004)(2616005)(54906003)(51416003)(16586007)(86362001)(305945005)(6486002)(44832011)(25786009)(53936002)(36756003)(8676002)(52116002)(486006)(69590400006)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR04MB4290; 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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IvenCBtXWfffH9j80AKyZfxWJYrfbwJMZmvVfIOLz5UPjemuzhrXC3rZl9fmf4UuvYjxXx2LV+v+5yUsHORXxzq+JKc0C8IaDOGQZTwOT1RESXUICMsIEwKj0B0jUO/35BVOiiOyoBsmcuvcZsDhrr82gbtP7PkQEtHxEI/0=; 7:lnIX3OhUPAQXihPnjOTCIuIzcZQzC+/pqPnCapu/m+ochnqBIdQaK8J/u08OO6x49bdrRwi68yzvd+tUamHM+UUH9lFhwznJqR+ThZRWOMcKCoLuuT3Ri1jHblzsju3iwEX/bZCncsYmPKR1sOL3tvmXHoeliYbHVW1Yabxvl0ZogFUDZp4TPCM4oU3HhSGAncZTeTqBQMQwFgFCvg8j55FrZW6HE9ztLu7QwNuAB7ok2+FmVXsOIz2bUBOLk9ZY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 13:42:56.8249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46a3d8b7-0949-411f-3c3a-08d61ca37aa3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4290 X-Mailman-Approved-At: Tue, 18 Sep 2018 09:57:51 +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: Anson Huang , David Airlie , linux-kernel@vger.kernel.org, Robert Chiras , dri-devel@lists.freedesktop.org, kernel@pengutronix.de, Fabio Estevam , Shawn Guo , linux-imx@nxp.com 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 doesn't 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. Reviewed-by: Sean Paul --- All patches in this series have review tags from a while ago and I tested them again on top of next-20180913. No changes since last version: https://lkml.org/lkml/2018/8/27/299 This series stalled so I reached out to Marek on IRC and he was surprised to be listed as maintainer and asked me to resend and add Daniel Vetter. Perhaps it would help to clarify that the pengutronix people should feel free to push patches in this area? Right now drm/imx is mostly for IPUv3 but there are other display output paths on imx, such as the LCDIF supported by this driver. This LCDIF block is included on imx8 so still quite relevant. 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(-)