Message ID | cfa1a4083eefd112362e640deeb2e120584ac3f5.1537191359.git.leonard.crestez@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 6D08013AD for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 18 Sep 2018 09:58:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A54A29C9B for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 18 Sep 2018 09:58:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DEDB29CA9; Tue, 18 Sep 2018 09:58:58 +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 F1B6729C9B for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 18 Sep 2018 09:58:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 711BB6E3A3; Tue, 18 Sep 2018 09:58:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30067.outbound.protection.outlook.com [40.107.3.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id C26F688FE1 for <dri-devel@lists.freedesktop.org>; Mon, 17 Sep 2018 13:43:07 +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:43:04 +0000 From: Leonard Crestez <leonard.crestez@nxp.com> To: Daniel Vetter <daniel.vetter@ffwll.ch>, Philipp Zabel <p.zabel@pengutronix.de>, Marek Vasut <marex@denx.de> Subject: [RESEND 4/5] drm/mxsfb: Add PM_SLEEP support Date: Mon, 17 Sep 2018 16:42:14 +0300 Message-Id: <cfa1a4083eefd112362e640deeb2e120584ac3f5.1537191359.git.leonard.crestez@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <cover.1537191359.git.leonard.crestez@nxp.com> References: <cover.1537191359.git.leonard.crestez@nxp.com> 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: 2efac388-a0aa-489c-ab47-08d61ca37ef1 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:P78QgowvxqLdUqCPB1dIVnTrB08ICnt5QDsIg1fn7jCfU6rXVl76v2LWSUpa99Ry7NYssIflc8g1UEWVY9BaqAGpYVSZrnDahpMZIYfrC+F1Qyja7QvcBg3f2sxwmcadPLELMv4xudtHAhoQkehh1EG6+bLyCmO2wsoHX3w6G1q05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HTOjQQS44I59AKKQ370ctTwXHZnLEcJFGfJj/BF6/gOoHiH+czX6BiyKTEizu84ygAJwIwRx+nivMxziZ6STjwCgiiHFa0Bw5VRvRbk1BDK6vrDzRPCuuazp3+5z4193gcpjoIT179+SjrGYdkKO5reALAtnK4wXcad8Vgwu/SPA2Qg; 4:gIL48VA7/fPm+8rEiGHh6FYmJB4rC+xU5kqmOamMmeacjWPBrwmFg6Ep6g0/c5v789Va5af7BeMedLEzyS233doaOCO47XbCLiBHcSyzYZX5hvEaOTtX3OAtU9GuN0j3jCkPJWWz7Ro7nonmC/ZfQxDLSAM2Lq8yCZUSeCZvlP9vl9hMqsM+WpoWuLfMaH8gb/yikkR/nj5zQDT3EtdikDRPOn0ZCDXGiBJVZ5a27lqt4HeW+yhnNLqZhx7CnYiLd0L5jeZdixwwqytNyXWKQJQo6nl3UfAnyUp4C31wLz264PGE50AJcoDwvSzJNF74 X-Microsoft-Antispam-PRVS: <AM0PR04MB4290FF6691B9FC4ACB33792DEE1E0@AM0PR04MB4290.eurprd04.prod.outlook.com> 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)(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)(81166006)(81156014)(8936002)(14444005)(50226002)(478600001)(16526019)(186003)(106356001)(3846002)(6116002)(105586002)(97736004)(47776003)(26005)(68736007)(50466002)(48376002)(66066001)(6512007)(2906002)(5660300001)(118296001)(11346002)(446003)(386003)(110136005)(4326008)(7736002)(6666003)(476003)(956004)(2616005)(54906003)(51416003)(16586007)(575784001)(86362001)(305945005)(6486002)(44832011)(25786009)(53936002)(36756003)(8676002)(52116002)(486006)(69590400006)(76176011)(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?1; AM0PR04MB4290; 23:doo2tDTW2qRxKbWdUIz+DXdJ2Q123lgZuPVwGOd/f?= jHqZjm/5A5BLvTNEHi5MeRRmHJx+ivroFYNYLmwHT6K76iqyv1F3bE7Hpv4XnD0adoEXZlnegMkgvBBSz+iuseq0nWxu/LrIOeoIZtfU8Y8+9PZX6kGSXDNol2IwfglIHL9JTxf5Gshc0kYeQM2HafA31uydoVNrf+JlUDe2958FUj8N2HCU5Uc1b6V1AePXkmvyQHAFJSvtJusjAoYaLGbpJQV/FY349SPsA2IFWNh9nGnxS8X6GX/0ZlnbaEchNB1alW9ePZplPlkjegYJzWYHnq7YardC0HT5azwKx2GHzfc8cpYn7GOq5zIx4d3rFkdvaWmx4lDeq/VvDwoav9N0oEWaWwj/S6ztdl1GL6bQuZUz8UQDn7zXriHn3Cnl2PlmOdO3WMBRsFC59TdfTEIMi6drP59plTdk25funPIqdXqZZTFEC8JUYyeQ0ixlIBl1f7G9BP9TEFp0FCTGd3ySDKSeHvjcDvWoMQIcblNka/zl9cXavIECzNfuNTSdaN5DkMT4E/yeYd1nq2//bqndMioX5BqNc6Cjs/ZjMYalWd0p9Nme/2mz42QKg5o693SANM6/T03VvDMwqXcQqTVsanCZT/Oz77EEUCZ887e/joxVh9mUEaSMY7+iPWObLaVHAQFPsbI3UhpqaTzjunOKqSc+b8Kyg+MAGl1TWdEiQXKXYRWLK+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Mutvj1QDLCEUBOh/6kELKYbqegH6eYC0oYiJgG8hZYCdJnZ4vjQqc2Vk6UGk9vUNTXtF+8p5H/dTXrMRjpg7GROicZhLN9kuRE1A8BKolkTvxTeW2SNcAKLXg4abi+ZBqRmW+5MD4/hizasLIA7wzYHfR7ix0AOpeHOi654NcJua/YBprsSBEGn/vQfoDBN0YHDZJ+oKnU6bCM3yZoobw2gv5p2vgQKkOXklC4/gkavoxHKJk2INFnvgxrSPB+tJNJ+UBBf9OOEritooeY3dHpjG6TOPlhC1GjA4ypx2FCiV7b/2BWHuDHfSt2M9ATANYsEqEE1r4c6czqLIp2+/mULbIysz478Wi0fwR41vAGcyeGjMK7t8pjHu5JRW5pgeBGzUF/GYlmBVQ7ZTL17hQ1ql4YNPldMz+WkYZK+lyUEt3/A==; 5:eGvO6PeCs7/TbPGif6I3GBNlf4nvIEVYlEXL+0dk4ApVMcH55ZCr6QgvZIdsz3xGG8tHrwX48IoDjrQV+VZb79tgN1SxCjXm8PR3x1c/RpLoiw459+UZyTaSwWvnTIRtyDXOteLMGbbbMmj5EmXWfNxoVoD7IERmXt8vSYkJa48=; 7:ETsNgnzl/Zi/AJibkBxnv6x/pbE0LATjAr2ou8Zi/1F6OaQBaEJPshOD/Nf3TmNR81eUDL/gnZSnJwZTdWYePAklRh2oN90kf22jos9uXG+Ckit4heXAi/h/xLiAd/KxX0W4dhsLKG0FB/xHi8YCNS21+4H5H8KeET7/tl5rn+MnivX6Kfn+0bWrmxPTAu0c+7XmV0o0c9SNgoybkQc5JvOUHGirVib6f3P3zGyBEEW5fS7VhNA/zA5LSOpdATtS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2018 13:43:04.0538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2efac388-a0aa-489c-ab47-08d61ca37ef1 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 <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Anson Huang <Anson.Huang@nxp.com>, David Airlie <airlied@linux.ie>, linux-kernel@vger.kernel.org, Robert Chiras <robert.chiras@nxp.com>, dri-devel@lists.freedesktop.org, kernel@pengutronix.de, Fabio Estevam <fabio.estevam@nxp.com>, Shawn Guo <shawnguo@kernel.org>, linux-imx@nxp.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
drm/mxsfb: Fix runtime PM for unpowering lcdif block
|
expand
|
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 68d79f5dc0d3..d797dfd40d98 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -416,17 +416,38 @@ static int mxsfb_remove(struct platform_device *pdev) drm_dev_unref(drm); return 0; } +#ifdef CONFIG_PM_SLEEP +static int mxsfb_suspend(struct device *dev) +{ + struct drm_device *drm = dev_get_drvdata(dev); + + return drm_mode_config_helper_suspend(drm); +} + +static int mxsfb_resume(struct device *dev) +{ + struct drm_device *drm = dev_get_drvdata(dev); + + return drm_mode_config_helper_resume(drm); +} +#endif + +static const struct dev_pm_ops mxsfb_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(mxsfb_suspend, mxsfb_resume) +}; + static struct platform_driver mxsfb_platform_driver = { .probe = mxsfb_probe, .remove = mxsfb_remove, .id_table = mxsfb_devtype, .driver = { .name = "mxsfb", .of_match_table = mxsfb_dt_ids, + .pm = &mxsfb_pm_ops, }, }; module_platform_driver(mxsfb_platform_driver);