dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/26] drm: Get rid of #ifdef CONFIG_PM* guards
@ 2022-11-07 17:50 Paul Cercueil
  2022-11-07 17:50 ` [PATCH 01/26] drm: modeset-helper: Export dev_pm_ops for simple drivers Paul Cercueil
                   ` (11 more replies)
  0 siblings, 12 replies; 44+ messages in thread
From: Paul Cercueil @ 2022-11-07 17:50 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter
  Cc: Paul Cercueil, linux-kernel, dri-devel

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(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2022-11-21  4:25 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 17:50 [PATCH 00/26] drm: Get rid of #ifdef CONFIG_PM* guards Paul Cercueil
2022-11-07 17:50 ` [PATCH 01/26] drm: modeset-helper: Export dev_pm_ops for simple drivers Paul Cercueil
2022-11-08 12:10   ` Thomas Zimmermann
2022-11-08 12:33     ` Paul Cercueil
2022-11-07 17:50 ` [PATCH 02/26] drm: bochs: Use the dev_pm_ops provided by modeset helper Paul Cercueil
2022-11-07 17:50 ` [PATCH 03/26] drm: imx: " Paul Cercueil
2022-11-07 17:50 ` [PATCH 04/26] drm: rockchip: " Paul Cercueil
2022-11-07 17:50 ` [PATCH 05/26] drm: tegra: " Paul Cercueil
2022-11-07 17:50 ` [PATCH 06/26] drm: sun4i: " Paul Cercueil
2022-11-14  0:34   ` Samuel Holland
2022-11-07 17:50 ` [PATCH 07/26] drm: msxfb: " Paul Cercueil
2022-11-07 17:50 ` [PATCH 08/26] drm: atmel-hlcdc: Remove #ifdef guards for PM related functions Paul Cercueil
2022-11-07 17:53   ` Sam Ravnborg
2022-11-10 15:28   ` Claudiu.Beznea
2022-11-07 17:50 ` [PATCH 09/26] drm: exynos: " Paul Cercueil
2022-11-21  4:25   ` Inki Dae
2022-11-07 17:50 ` [PATCH 10/26] drm: imx/dcss: " Paul Cercueil
2022-11-11 14:27   ` Laurentiu Palcu
2022-11-07 17:52 ` [PATCH 11/26] drm: bridge/dw-hdmi: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 12/26] drm: etnaviv: " Paul Cercueil
2022-11-07 18:07     ` Lucas Stach
2022-11-07 21:03       ` Paul Cercueil
2022-11-07 17:52   ` [PATCH 13/26] drm: fsl-dcu: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 14/26] drm: mediatek: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 15/26] drm: omap: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 16/26] drm: panfrost: " Paul Cercueil
2022-11-09 15:16     ` Steven Price
2022-11-07 17:52   ` [PATCH 17/26] drm: rcar-du: " Paul Cercueil
2022-11-16 13:41     ` Kieran Bingham
2022-11-07 17:52   ` [PATCH 18/26] drm: rockchip: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 19/26] drm: shmobile: " Paul Cercueil
2022-11-16 13:41     ` Kieran Bingham
2022-11-07 17:52   ` [PATCH 20/26] drm: tegra: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 21/26] drm: tilcdc: " Paul Cercueil
2022-11-07 17:52   ` [PATCH 22/26] drm: vboxvideo: " Paul Cercueil
2022-11-07 19:43     ` Hans de Goede
2022-11-07 17:52   ` [PATCH 23/26] drm: vc4: " Paul Cercueil
2022-11-07 20:27   ` [PATCH 21/26] drm: tilcdc: " sarha
2022-11-07 17:55 ` [PATCH 24/26] drm: gm12u320: " Paul Cercueil
2022-11-07 17:55   ` [PATCH 25/26] drm: tidss: " Paul Cercueil
2022-11-07 17:55   ` [PATCH 26/26] drm/i915/gt: " Paul Cercueil
2022-11-07 20:31     ` Rodrigo Vivi
2022-11-07 20:59       ` Paul Cercueil
2022-11-07 19:43   ` [PATCH 24/26] drm: gm12u320: " Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).