Message ID | 20221107175106.360578-1-paul@crapouillou.net |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2200290wru; Mon, 7 Nov 2022 09:53:20 -0800 (PST) X-Google-Smtp-Source: AMsMyM6n6SigFvhyGouLyG6C1i+hmIqeKmXN3Df/kSwdw3bOj0uzGTNEi/T7VXuMeKgcu3p3GfQU X-Received: by 2002:a17:90b:1c0c:b0:213:1455:131f with SMTP id oc12-20020a17090b1c0c00b002131455131fmr69855514pjb.129.1667843600427; Mon, 07 Nov 2022 09:53:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667843600; cv=none; d=google.com; s=arc-20160816; b=uF+u78pXY2Q99OQZRwfCiQotuBOtZh+BNhYtiBFm921oeW5WU2ObLSrtlBHv8FNAI6 ghj48RnXz6M81tFA2xC9qsbQv7j+5aiq8lHu2shDzIJO1TOjsUa2l+mirw8Bmd24n82q PufBIw4IllbTNEYcXU8V8o3vHjucy+7va2tha/zwJu9JuDa3nDpdqjqE4S83Qlz23tGo mrnZm1/B9cWFCOhEBmD3qKER+OSoDlZkZeZmROJiyHKqFlorfOBk0GdfJML+EA23shBW 68xmskDK/9jvG2GjN0mPwLLnpPOZrcEcIafvIrFMsa+ZGuJ1EQHxNPSl2q6JFGSUt/fn 1uYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hdEUekyaNWhEw4kzFyt4Bl/1PuD932ymmDA1Ih0y8+0=; b=x1X3RV/St02NzOrbLPsbEwS8p8ZmYhd3nSi8fB+9SXOqjQeSiGYYSzaKwSp9TX0wRW eXMIDcIcepAJvd0CX2sybhgM5kgHuQWyCtHgmg6SZGiTkDxOLHbIHJTZMtZYALibpthM DuVs0MVmSnaGN31ctEuyiLsSC/NgDsV0E1MEmp2o25NSmcGxBtz6XRXJMO3p5cKfg1sh tgJ2F7IM+y5pjl442Mn9W9WK2HTkoETs2ErDrD+blCZelm1we5fJinmHdEnH/O5TkI67 lwPN85LqCaXyQX6P3uJ76RAbfVY5C68SrwiVWQpl8mROSUcHU0Le0YucItHcJ7+gdNMC Mb5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=HRoelFvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a625105000000b0056dde9895e1si10084504pfb.46.2022.11.07.09.53.07; Mon, 07 Nov 2022 09:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=HRoelFvU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231426AbiKGRvQ (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 12:51:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231500AbiKGRvO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 12:51:14 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE101DA57 for <linux-kernel@vger.kernel.org>; Mon, 7 Nov 2022 09:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1667843471; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=hdEUekyaNWhEw4kzFyt4Bl/1PuD932ymmDA1Ih0y8+0=; b=HRoelFvULKP+voKUXck7nbcDssqVqd7XyLiJ6fco6NItU5sy8amGPX6kLKHi8CmWPFDwj4 0/v/WE24jJvPE627E5NYGU3YZ7AgkUnR6AwlOS7+G9Vm8+aSWo4BsdYEmf8O7LuQgFE8Le 8n0sYARonZ32Joz5HqfV1fUIdjvy92I= From: Paul Cercueil <paul@crapouillou.net> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Paul Cercueil <paul@crapouillou.net> Subject: [PATCH 00/26] drm: Get rid of #ifdef CONFIG_PM* guards Date: Mon, 7 Nov 2022 17:50:40 +0000 Message-Id: <20221107175106.360578-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748860771241164978?= X-GMAIL-MSGID: =?utf-8?q?1748860771241164978?= |
Series |
drm: Get rid of #ifdef CONFIG_PM* guards
|
|
Message
Paul Cercueil
Nov. 7, 2022, 5:50 p.m. UTC
Hi, This patchset updates the DRM drivers to use the new set of PM-related macros introduced recently. The point of these macros is to allow the PM functions to be automatically dropped by the compiler when CONFIG_PM or CONFIG_SUSPEND is disabled, without having to use #ifdef guards. This has the advantages of always compiling these functions in, independently of any Kconfig option. Thanks to that, bugs and other regressions are subsequently easier to catch. Note that some drivers (etnaviv, tegra, vc4) currently don't have any .suspend/.resume callbacks, but do provide .runtime_suspend/.runtime_resume callbacks. These drivers should most likely use DEFINE_RUNTIME_DEV_PM_OPS(), which provides .suspend/.resume callbacks as well (pm_runtime_force_suspend / pm_runtime_force_resume respectively). I did not do that, because that would be a functional change and the callbacks being missing may actually be on purpose. Checkpatch complains about patch [11/26], as I replaced a "#if defined(IS_NOT_BROKEN)" to a "if (IS_ENABLED(IS_NOT_BROKEN))". I don't really know how to make it better so I left it like that. Compile-tested with allyesconfig, with the following cases: - CONFIG_PM=y CONFIG_PM_SLEEP=y - CONFIG_PM=y CONFIG_PM_SLEEP=n - CONFIG_PM=n Cheers, -Paul Paul Cercueil (26): drm: modeset-helper: Export dev_pm_ops for simple drivers drm: bochs: Use the dev_pm_ops provided by modeset helper drm: imx: Use the dev_pm_ops provided by modeset helper drm: rockchip: Use the dev_pm_ops provided by modeset helper drm: tegra: Use the dev_pm_ops provided by modeset helper drm: sun4i: Use the dev_pm_ops provided by modeset helper drm: msxfb: Use the dev_pm_ops provided by modeset helper drm: atmel-hlcdc: Remove #ifdef guards for PM related functions drm: exynos: Remove #ifdef guards for PM related functions drm: imx/dcss: Remove #ifdef guards for PM related functions drm: bridge/dw-hdmi: Remove #ifdef guards for PM related functions drm: etnaviv: Remove #ifdef guards for PM related functions drm: fsl-dcu: Remove #ifdef guards for PM related functions drm: mediatek: Remove #ifdef guards for PM related functions drm: omap: Remove #ifdef guards for PM related functions drm: panfrost: Remove #ifdef guards for PM related functions drm: rcar-du: Remove #ifdef guards for PM related functions drm: rockchip: Remove #ifdef guards for PM related functions drm: shmobile: Remove #ifdef guards for PM related functions drm: tegra: Remove #ifdef guards for PM related functions drm: tilcdc: Remove #ifdef guards for PM related functions drm: vboxvideo: Remove #ifdef guards for PM related functions drm: vc4: Remove #ifdef guards for PM related functions drm: gm12u320: Remove #ifdef guards for PM related functions drm: tidss: Remove #ifdef guards for PM related functions drm/i915/gt: Remove #ifdef guards for PM related functions drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 9 +++--- .../drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 17 ++++------ drivers/gpu/drm/drm_modeset_helper.c | 32 +++++++++++++++++++ drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 30 +++++++---------- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 13 +++----- drivers/gpu/drm/exynos/exynos7_drm_decon.c | 12 ++----- drivers/gpu/drm/exynos/exynos_dp.c | 11 ++----- drivers/gpu/drm/exynos/exynos_drm_fimc.c | 11 ++----- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 11 ++----- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 10 ++---- drivers/gpu/drm/exynos/exynos_drm_mic.c | 11 ++----- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 12 ++----- drivers/gpu/drm/exynos/exynos_drm_scaler.c | 12 ++----- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 9 ++---- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 8 +---- drivers/gpu/drm/imx/dcss/dcss-dev.c | 17 +++++----- drivers/gpu/drm/imx/dcss/dcss-dev.h | 7 ++-- drivers/gpu/drm/imx/dcss/dcss-drv.c | 8 +---- drivers/gpu/drm/imx/imx-drm-core.c | 21 ++---------- drivers/gpu/drm/mediatek/mtk_dp.c | 6 ++-- drivers/gpu/drm/mediatek/mtk_hdmi.c | 9 +++--- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 22 +------------ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 ++-- drivers/gpu/drm/omapdrm/omap_drv.c | 7 ++-- drivers/gpu/drm/omapdrm/omap_gem.c | 5 +-- drivers/gpu/drm/omapdrm/omap_gem.h | 2 -- drivers/gpu/drm/panfrost/panfrost_device.c | 10 +++--- drivers/gpu/drm/panfrost/panfrost_device.h | 4 +-- drivers/gpu/drm/panfrost/panfrost_drv.c | 7 +--- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 9 ++---- .../gpu/drm/rockchip/analogix_dp-rockchip.c | 6 +--- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 23 +------------ drivers/gpu/drm/shmobile/shmob_drm_drv.c | 9 ++---- drivers/gpu/drm/sun4i/sun4i_drv.c | 24 ++------------ drivers/gpu/drm/tegra/dpaux.c | 6 ++-- drivers/gpu/drm/tegra/drm.c | 21 +----------- drivers/gpu/drm/tidss/tidss_drv.c | 29 ++++++++--------- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 9 ++---- drivers/gpu/drm/tiny/bochs.c | 27 ++-------------- drivers/gpu/drm/tiny/gm12u320.c | 15 ++++----- drivers/gpu/drm/vboxvideo/vbox_drv.c | 6 +--- drivers/gpu/drm/vc4/vc4_v3d.c | 6 ++-- include/drm/drm_modeset_helper.h | 4 +++ 43 files changed, 171 insertions(+), 362 deletions(-)