[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4813a6885648e5368028cd822e8b2381@manjaro.org>
Date: Tue, 18 Jun 2024 12:33:36 +0200
From: Dragan Simic <dsimic@...jaro.org>
To: Maxime Ripard <mripard@...nel.org>
Cc: Qiang Yu <yuq825@...il.com>, dri-devel@...ts.freedesktop.org,
lima@...ts.freedesktop.org, maarten.lankhorst@...ux.intel.com,
tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch,
linux-kernel@...r.kernel.org, Philip Muller <philm@...jaro.org>, Oliver
Smith <ollieparanoid@...tmarketos.org>, Daniel Smith <danct12@...root.org>,
stable@...r.kernel.org
Subject: Re: [PATCH] drm/lima: Mark simple_ondemand governor as softdep
Hello Qiang and Maxime,
On 2024-06-18 10:13, Maxime Ripard wrote:
> On Tue, Jun 18, 2024 at 04:01:26PM GMT, Qiang Yu wrote:
>> On Tue, Jun 18, 2024 at 12:33 PM Qiang Yu <yuq825@...il.com> wrote:
>> >
>> > I see the problem that initramfs need to build a module dependency chain,
>> > but lima does not call any symbol from simpleondemand governor module.
>> > softdep module seems to be optional while our dependency is hard one,
>> > can we just add MODULE_INFO(depends, _depends), or create a new
>> > macro called MODULE_DEPENDS()?
I had the same thoughts, because softdeps are for optional module
dependencies, while in this case it's a hard dependency. Though,
I went with adding a softdep, simply because I saw no better option
available.
>> This doesn't work on my side because depmod generates modules.dep
>> by symbol lookup instead of modinfo section. So softdep may be our
>> only
>> choice to add module dependency manually. I can accept the softdep
>> first, then make PM optional later.
I also thought about making devfreq optional in the Lima driver,
which would make this additional softdep much more appropriate.
Though, I'm not really sure that's a good approach, because not
having working devfreq for Lima might actually cause issues on
some devices, such as increased power consumption.
In other words, it might be better to have Lima probing fail if
devfreq can't be initialized, rather than having probing succeed
with no working devfreq. Basically, failed probing is obvious,
while a warning in the kernel log about no devfreq might easily
be overlooked, causing regressions on some devices.
> It's still super fragile, and depends on the user not changing the
> policy. It should be solved in some other, more robust way.
I see, but I'm not really sure how to make it more robust? In
the end, some user can blacklist the simple_ondemand governor
module, and we can't do much about it.
Introducing harddeps alongside softdeps would make sense from
the design standpoint, but the amount of required changes wouldn't
be trivial at all, on various levels.
Powered by blists - more mailing lists