Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1006973imm; Wed, 8 Aug 2018 09:11:27 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwh2g0m1m51Z40S4k2r7qcq3GuoSuzvE4PpSlL/Jq6zGqAskcZyoXEYvGR7SyAlh+7rF8DH X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr3255413plz.3.1533744687033; Wed, 08 Aug 2018 09:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533744687; cv=none; d=google.com; s=arc-20160816; b=xMyzw3orm0L18isNBES2TKVHPmHCIhFNXSKYelhB1/KzCpfaB5DEd0uiMQBGHQPWP3 GrHfgJ9RZeOVfdiAQD80luj8BSrFb5AEN8ymEcfxNi5Hk6rCW9kc3pgzv1oomT10bI+W hyh2CzJC/AGlHloDkXmRj9W8KFqMlgWYcA5/dHx0m1KicFeQjThWbI6t1j6l1A53cA84 hHDeLQJRRonOn9fean8mvr5J477WBr7m1SPZH9qhjTmTr/RN8Bwms55LIUfm+edId3X7 zLa16zzqEYLXs/5q5+2/8pekUmtIFYdeQKqQJc+bNlPJoRzZs62MyS2LhzudWUgrkXYL povA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=1QAhmaXx6KCcyr6kdBHbCSNBB1V8087ar5J2iuHWfNE=; b=jmoeWQn3IhdEStoiQE2cAc89sTzmOJH18m4xU1Uv6TLRvyHSjTDgz3vWykNxNHtAvm EmzXDRbtG26cE1c+psIypS/NjfvhVaPH3WBsJ5+OhchzVh3qw05cNeFqxUnI9p1E5606 IOavYoJXjVcOY93BS0AHerPkaZ8WGRHHaeQiCffMhFRHZEIPGLK89/wpRIYOKMxzCFfn uQ2wMqIsO1V/45HJki6+q4B0a17kcc3Ma2MjPiBuuA3gssp1GEblY97XF7VV8EG/WZ9B olpP4oRnTfXXcXN+QGR3EzwijBW+3UhVKbzVJTZkqsR4hy5I4U75e1TfYTByEUSyrFlc 7KYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=JbeOsKNF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f26-v6si4391035pgm.428.2018.08.08.09.11.12; Wed, 08 Aug 2018 09:11:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=JbeOsKNF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728326AbeHHSaC (ORCPT + 99 others); Wed, 8 Aug 2018 14:30:02 -0400 Received: from mail-eopbgr40068.outbound.protection.outlook.com ([40.107.4.68]:40736 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727386AbeHHSaA (ORCPT ); Wed, 8 Aug 2018 14:30:00 -0400 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=JbeOsKNFUWPD+6YFoUUuVzBp5mZVvg8TCrfH4uZIcuAnN9Hsa2QYIlB15m4uUpd3a4wB5PVT80mzB/JKCYLQ/8njvtXMRNAXj58dmmVIGjIgwpV3VvHzYnVNlZiHj4g/MgJCRJG+h7qcMvcOCPEKTFT24gxWOOu2KYPjS0QnO1k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; 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:31 +0000 From: Leonard Crestez To: Stefan Agner , Marek Vasut , Shawn Guo Cc: Philipp Zabel , Robert Chiras , Fabio Estevam , Anson Huang , dri-devel@lists.freedesktop.org, Dong Aisheng , linux-imx@nxp.com, kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/5] drm/mxsfb: Add pm_runtime calls to pipe_enable/disable Date: Wed, 8 Aug 2018 19:09:00 +0300 Message-Id: <5b434a3d8b2968552e9bdff9eb5c78266c3bb28b.1533743954.git.leonard.crestez@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain 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: 8a3e8284-ceb8-4fbe-fc31-08d5fd49543b 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:HCY3J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RhHfeGdvK2sNiAMn0cfmkgf96u4sF6u+BBf8+2V2M6cdu9iSObsId9gJQECbQV6FKhVLMeyM9uvouLG6pqmbtYbB+48wbY5B8MvTk0NlXv6VMjWSt6nJnIUP7URGU4xtsDpwloq98HEG+EcLdIRQGJjAcZXzuMuYmkpmUqzJn4xZDQiO8m2SkPfYPkWxFUDF6NBNfVmpXHTh01YIR0jMZ8xzbDOUxP3uPC6yAxJhTpN1lGpSKwa4oZFFrlZM+a66sUAE4WEphgjxrsmTjkgCyRaePrfmNXa767KiaSJLpeodafiBb8AGzvAzdKa1gG2Py1B7tiHNHSLf/mWbvm+Y;4:EIGGgQEOVtLQefZV6qnkvCEpnNSg/DGJD+q130izkHPJ7ZPD1dOhbO2hV6tJ1+kfrDMyWI3YQ8N4ob0ICOcS65MjK5jzEir6wbR2I/TYe61sZuezHdvSMcf1bhFjNx2HltdyexoS3Ik+gpVlfWbX6CCNJvYgqJennZ8xX0drSyYdNjpaKYQYZ2B2yDzlxzIB2BFVxqNUrvoSbVdGaVyNMgs0i98DyJnEX8+n7wTEU1v29ATE19PY2zovlrVWNyg14zg771CRQ612GGKmT2bvz0bg8rcxP+UZbZDxWs615+8rxACbXdMu3UOx6bPMBjnP 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)(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)(76176011)(47776003)(6512007)(81166006)(68736007)(81156014)(25786009)(8676002)(6666003)(110136005)(54906003)(36756003)(14444005)(305945005)(106356001)(105586002)(53936002)(50466002)(6486002)(97736004)(48376002)(86362001)(4326008)(575784001)(3846002)(5660300001)(26005)(486006)(16526019)(186003)(316002)(2906002)(16586007)(6116002)(6506007)(44832011)(478600001)(8936002)(956004)(11346002)(2616005)(50226002)(386003)(446003)(476003)(51416003)(52116002)(118296001);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:a6W7MBoGtyGyLRWRsAfUmXb44FY52HCrj7WXmy1z9?= =?us-ascii?Q?OjDxRMWtGzvswikUOL2Fk1JIyLVWHx+y+60czaNpUENiCjdOiTJKfgnStAr6?= =?us-ascii?Q?Gi8L2RBtsfFzjsF124MqYtYqmOHYiJQJC/Cpn8oJHcxFlQG1M0J0lGnDNH/e?= =?us-ascii?Q?QyROitQBarTlQZarN7HsFFv8Fpyyt1bdJzxA/m5jWzXILnr+rNlBUzI6U9iG?= =?us-ascii?Q?ZyKkbveF27fByo4rewVvvGQ0sqcFPvVcPgmXBbCrt466iykG2KJgW/TdrSo+?= =?us-ascii?Q?qGcgCCZ56xIAGmM0XmR1vzNLOUxyeUslaw8W9sLZuJ6lmCTnbVcEgL0nMPYT?= =?us-ascii?Q?ouplPDCQe6zjn1n9wF2RAQS6XnCFDK/3pnj48/Wx24bW6vwONTEG/k4zXOGk?= =?us-ascii?Q?zQuJt+w6LBeUrW647uclGHukyad4BtXTTpRh8x5Un7iO/OJXBSuqjOwc2Qtm?= =?us-ascii?Q?RWDZX39ThZWMkJxurBN2VQkxt10g1X05j8GF22I/d4p6X7IjETeONGyR0SW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JVIIItXR9K+dXHFpb7upgJBNdjle71/mM3OkoJAWZy8RWf3ufTFpPpHY1xPQmf8Iz4fdPfERt2MOY7quCIpYqVWMLlZaocvdnZSoByFDUTHQwfe9gt84plSy0iqN5SJzlWI8Gk0UKLcPUedYeiHouQMassFujXruC81/gpON SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2018 16:09:31.7325 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a3e8284-ceb8-4fbe-fc31-08d5fd49543b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4301 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { -- 2.17.1