public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/lima: Mark simple_ondemand governor as softdep
@ 2024-06-17 20:22 Dragan Simic
  2024-06-18  4:33 ` Qiang Yu
  0 siblings, 1 reply; 15+ messages in thread
From: Dragan Simic @ 2024-06-17 20:22 UTC (permalink / raw)
  To: dri-devel, lima
  Cc: yuq825, maarten.lankhorst, mripard, tzimmermann, airlied, daniel,
	linux-kernel, Philip Muller, Oliver Smith, Daniel Smith, stable

Lima DRM driver uses devfreq to perform DVFS, while using simple_ondemand
devfreq governor by default.  This causes driver initialization to fail on
boot when simple_ondemand governor isn't built into the kernel statically,
as a result of the missing module dependency and, consequently, the required
governor module not being included in the initial ramdisk.  Thus, let's mark
simple_ondemand governor as a softdep for Lima, to have its kernel module
included in the initial ramdisk.

This is a rather longstanding issue that has forced distributions to build
devfreq governors statically into their kernels, [1][2] or may have forced
some users to introduce unnecessary workarounds.

Having simple_ondemand marked as a softdep for Lima may not resolve this
issue for all Linux distributions.  In particular, it will remain unresolved
for the distributions whose utilities for the initial ramdisk generation do
not handle the available softdep information [3] properly yet.  However, some
Linux distributions already handle softdeps properly while generating their
initial ramdisks, [4] and this is a prerequisite step in the right direction
for the distributions that don't handle them properly yet.

[1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/blob/6.7-megi/config?ref_type=heads#L5749
[2] https://gitlab.com/postmarketOS/pmaports/-/blob/7f64e287e7732c9eaa029653e73ca3d4ba1c8598/main/linux-postmarketos-allwinner/config-postmarketos-allwinner.aarch64#L4654
[3] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0b59052999de577ab732b719cfbeb89504d
[4] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f4489054668ad

Cc: Philip Muller <philm@manjaro.org>
Cc: Oliver Smith <ollieparanoid@postmarketos.org>
Cc: Daniel Smith <danct12@disroot.org>
Cc: stable@vger.kernel.org
Fixes: 1996970773a3 ("drm/lima: Add optional devfreq and cooling device support")
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 drivers/gpu/drm/lima/lima_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c
index 739c865b556f..10bce18b7c31 100644
--- a/drivers/gpu/drm/lima/lima_drv.c
+++ b/drivers/gpu/drm/lima/lima_drv.c
@@ -501,3 +501,4 @@ module_platform_driver(lima_platform_driver);
 MODULE_AUTHOR("Lima Project Developers");
 MODULE_DESCRIPTION("Lima DRM Driver");
 MODULE_LICENSE("GPL v2");
+MODULE_SOFTDEP("pre: governor_simpleondemand");

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

end of thread, other threads:[~2024-07-26  9:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 20:22 [PATCH] drm/lima: Mark simple_ondemand governor as softdep Dragan Simic
2024-06-18  4:33 ` Qiang Yu
2024-06-18  8:01   ` Qiang Yu
2024-06-18  8:13     ` Maxime Ripard
2024-06-18 10:33       ` Dragan Simic
2024-06-18 19:22         ` Dragan Simic
2024-06-25 18:15           ` Dragan Simic
2024-06-26  1:11             ` Qiang Yu
2024-06-26  6:49               ` Dragan Simic
2024-06-30 10:04                 ` Qiang Yu
2024-07-25  8:21                 ` Dragan Simic
2024-07-26  6:07                   ` Qiang Yu
2024-07-26  8:03                     ` Dragan Simic
2024-07-26  8:54                       ` Qiang Yu
2024-07-26  9:25                         ` Dragan Simic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox