From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4790C433E0 for ; Sun, 31 May 2020 19:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7CEE20723 for ; Sun, 31 May 2020 19:40:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728354AbgEaTkM (ORCPT ); Sun, 31 May 2020 15:40:12 -0400 Received: from muru.com ([72.249.23.125]:56390 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgEaTkL (ORCPT ); Sun, 31 May 2020 15:40:11 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 111738126; Sun, 31 May 2020 19:40:58 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Grygorii Strashko , Keerthy , Nishanth Menon , Peter Ujfalusi , Roger Quadros , Suman Anna , Tero Kristo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Laurent Pinchart , Tomi Valkeinen Subject: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Date: Sun, 31 May 2020 12:39:37 -0700 Message-Id: <20200531193941.13179-2-tony@atomide.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200531193941.13179-1-tony@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When booting without legacy platform data, we no longer have omap_device calling PM runtime suspend for us on suspend. This causes the driver context not be saved as we have no suspend and resume functions defined. Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it will call the existing PM runtime suspend functions on suspend. Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") Reported-by: Faiz Abbas Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren --- drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dsi.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dss.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/venc.c | 6 ++---- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -4933,10 +4933,8 @@ static int dispc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dispc_pm_ops = { - .runtime_suspend = dispc_runtime_suspend, - .runtime_resume = dispc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dispc_pm_ops, dispc_runtime_suspend, + dispc_runtime_resume, NULL); struct platform_driver omap_dispchw_driver = { .probe = dispc_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5464,10 +5464,8 @@ static int dsi_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dsi_pm_ops = { - .runtime_suspend = dsi_runtime_suspend, - .runtime_resume = dsi_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dsi_pm_ops, dsi_runtime_suspend, + dsi_runtime_resume, NULL); struct platform_driver omap_dsihw_driver = { .probe = dsi_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1611,10 +1611,8 @@ static int dss_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dss_pm_ops = { - .runtime_suspend = dss_runtime_suspend, - .runtime_resume = dss_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dss_pm_ops, dss_runtime_suspend, + dss_runtime_resume, NULL); struct platform_driver omap_dsshw_driver = { .probe = dss_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -942,10 +942,8 @@ static int venc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops venc_pm_ops = { - .runtime_suspend = venc_runtime_suspend, - .runtime_resume = venc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(venc_pm_ops, venc_runtime_suspend, + venc_runtime_resume, NULL); static const struct of_device_id venc_of_match[] = { { .compatible = "ti,omap2-venc", }, diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -1169,7 +1169,6 @@ int tiler_map_show(struct seq_file *s, void *arg) } #endif -#ifdef CONFIG_PM_SLEEP static int omap_dmm_resume(struct device *dev) { struct tcm_area area; @@ -1193,9 +1192,8 @@ static int omap_dmm_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); +static UNIVERSAL_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume, NULL); #if defined(CONFIG_OF) static const struct dmm_platform_data dmm_omap4_platform_data = { -- 2.26.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA7ADC433E0 for ; Sun, 31 May 2020 19:40:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEEDF206A1 for ; Sun, 31 May 2020 19:40:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MUIN+TWL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEEDF206A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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=MeJjPSdXEjEWEkwPIkp3vVt3tN5cQaZGeYi643jKf9U=; b=MUIN+TWL8e2GOd 3FaS8XRzHw28i4pl4OY7OydjdjN0mWtURU9aANc95E1O+3ZK/TUn3J+Inz+fuv9N9yoUWjKLJV9Iw 9Yz3+XJIHW6wAwSIFgB6Y+awsu6NTMaIpApkSkqZA+GjOZt64T0rjp2YCaFVDUrV72W7KONtjREcP rgheSeDZ4hGgXs30BjT5YB2ZS0qOghjoBfLzciZ0vXefco8RSMaRoea6KZWoDDG+NTaYNR82GhGu/ fL5hhEu6DjNz7zZsDyyvDkN9tP0V2iiTaREZIOUopMaUFWOUaqOrEEg2SOcSymT7NmeXTVGUbDr3w gXRhVW03YwJ4hnM3aIpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfTol-00039H-Mt; Sun, 31 May 2020 19:40:23 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jfToY-0002t9-7v for linux-arm-kernel@lists.infradead.org; Sun, 31 May 2020 19:40:12 +0000 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 111738126; Sun, 31 May 2020 19:40:58 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Subject: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Date: Sun, 31 May 2020 12:39:37 -0700 Message-Id: <20200531193941.13179-2-tony@atomide.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200531193941.13179-1-tony@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200531_124010_327935_5CFE1453 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Tero Kristo , Grygorii Strashko , Dave Gerlach , Keerthy , Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Peter Ujfalusi , Faiz Abbas , Laurent Pinchart , Greg Kroah-Hartman , Suman Anna , linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org When booting without legacy platform data, we no longer have omap_device calling PM runtime suspend for us on suspend. This causes the driver context not be saved as we have no suspend and resume functions defined. Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it will call the existing PM runtime suspend functions on suspend. Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") Reported-by: Faiz Abbas Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren --- drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dsi.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dss.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/venc.c | 6 ++---- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -4933,10 +4933,8 @@ static int dispc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dispc_pm_ops = { - .runtime_suspend = dispc_runtime_suspend, - .runtime_resume = dispc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dispc_pm_ops, dispc_runtime_suspend, + dispc_runtime_resume, NULL); struct platform_driver omap_dispchw_driver = { .probe = dispc_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5464,10 +5464,8 @@ static int dsi_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dsi_pm_ops = { - .runtime_suspend = dsi_runtime_suspend, - .runtime_resume = dsi_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dsi_pm_ops, dsi_runtime_suspend, + dsi_runtime_resume, NULL); struct platform_driver omap_dsihw_driver = { .probe = dsi_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1611,10 +1611,8 @@ static int dss_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dss_pm_ops = { - .runtime_suspend = dss_runtime_suspend, - .runtime_resume = dss_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dss_pm_ops, dss_runtime_suspend, + dss_runtime_resume, NULL); struct platform_driver omap_dsshw_driver = { .probe = dss_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -942,10 +942,8 @@ static int venc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops venc_pm_ops = { - .runtime_suspend = venc_runtime_suspend, - .runtime_resume = venc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(venc_pm_ops, venc_runtime_suspend, + venc_runtime_resume, NULL); static const struct of_device_id venc_of_match[] = { { .compatible = "ti,omap2-venc", }, diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -1169,7 +1169,6 @@ int tiler_map_show(struct seq_file *s, void *arg) } #endif -#ifdef CONFIG_PM_SLEEP static int omap_dmm_resume(struct device *dev) { struct tcm_area area; @@ -1193,9 +1192,8 @@ static int omap_dmm_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); +static UNIVERSAL_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume, NULL); #if defined(CONFIG_OF) static const struct dmm_platform_data dmm_omap4_platform_data = { -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E5ADC433E3 for ; Tue, 2 Jun 2020 07:17:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F07EA20734 for ; Tue, 2 Jun 2020 07:17:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F07EA20734 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDE8D6E392; Tue, 2 Jun 2020 07:16:30 +0000 (UTC) Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F6C589D53 for ; Sun, 31 May 2020 19:40:10 +0000 (UTC) Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 111738126; Sun, 31 May 2020 19:40:58 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Subject: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal Date: Sun, 31 May 2020 12:39:37 -0700 Message-Id: <20200531193941.13179-2-tony@atomide.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200531193941.13179-1-tony@atomide.com> References: <20200531193941.13179-1-tony@atomide.com> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 02 Jun 2020 07:16:26 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Tero Kristo , Grygorii Strashko , Dave Gerlach , Keerthy , Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Peter Ujfalusi , Faiz Abbas , Laurent Pinchart , Greg Kroah-Hartman , Suman Anna , linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When booting without legacy platform data, we no longer have omap_device calling PM runtime suspend for us on suspend. This causes the driver context not be saved as we have no suspend and resume functions defined. Let's fix the issue by switching over to use UNIVERSAL_DEV_PM_OPS as it will call the existing PM runtime suspend functions on suspend. Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") Reported-by: Faiz Abbas Cc: dri-devel@lists.freedesktop.org Cc: Laurent Pinchart Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren --- drivers/gpu/drm/omapdrm/dss/dispc.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dsi.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/dss.c | 6 ++---- drivers/gpu/drm/omapdrm/dss/venc.c | 6 ++---- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -4933,10 +4933,8 @@ static int dispc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dispc_pm_ops = { - .runtime_suspend = dispc_runtime_suspend, - .runtime_resume = dispc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dispc_pm_ops, dispc_runtime_suspend, + dispc_runtime_resume, NULL); struct platform_driver omap_dispchw_driver = { .probe = dispc_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5464,10 +5464,8 @@ static int dsi_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dsi_pm_ops = { - .runtime_suspend = dsi_runtime_suspend, - .runtime_resume = dsi_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dsi_pm_ops, dsi_runtime_suspend, + dsi_runtime_resume, NULL); struct platform_driver omap_dsihw_driver = { .probe = dsi_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c --- a/drivers/gpu/drm/omapdrm/dss/dss.c +++ b/drivers/gpu/drm/omapdrm/dss/dss.c @@ -1611,10 +1611,8 @@ static int dss_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops dss_pm_ops = { - .runtime_suspend = dss_runtime_suspend, - .runtime_resume = dss_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(dss_pm_ops, dss_runtime_suspend, + dss_runtime_resume, NULL); struct platform_driver omap_dsshw_driver = { .probe = dss_probe, diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -942,10 +942,8 @@ static int venc_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops venc_pm_ops = { - .runtime_suspend = venc_runtime_suspend, - .runtime_resume = venc_runtime_resume, -}; +static UNIVERSAL_DEV_PM_OPS(venc_pm_ops, venc_runtime_suspend, + venc_runtime_resume, NULL); static const struct of_device_id venc_of_match[] = { { .compatible = "ti,omap2-venc", }, diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c @@ -1169,7 +1169,6 @@ int tiler_map_show(struct seq_file *s, void *arg) } #endif -#ifdef CONFIG_PM_SLEEP static int omap_dmm_resume(struct device *dev) { struct tcm_area area; @@ -1193,9 +1192,8 @@ static int omap_dmm_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume); +static UNIVERSAL_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume, NULL); #if defined(CONFIG_OF) static const struct dmm_platform_data dmm_omap4_platform_data = { -- 2.26.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel