X86 platform drivers
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: AceLan Kao <acelan.kao@canonical.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <markgross@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: Re: [PATCH] platform/x86: dell-laptop: Add drm module soft dependency
Date: Wed, 7 Jun 2023 08:56:04 +0200	[thread overview]
Message-ID: <20230607065604.yaivqbbd3dkawxo4@pali> (raw)
In-Reply-To: <20230607062341.GA30618@srcf.ucam.org>

On Wednesday 07 June 2023 07:23:41 Matthew Garrett wrote:
> On Wed, Jun 07, 2023 at 02:13:31PM +0800, AceLan Kao wrote:
> > Matthew Garrett <mjg59@srcf.ucam.org> 於 2023年6月7日 週三 下午1:27寫道:
> > >
> > > On Wed, Jun 07, 2023 at 01:19:40PM +0800, AceLan Kao wrote:
> > > > Gfx drivers(i915/amdgpu/nvidia) depend on the drm driver, so delaying
> > > > the loading of dell_laptop after drm can ease the issue the most.
> > > > Right, it's still possible to encounter the issue, unfortunately, we
> > > > do not have a better solution for it at the moment.
> > >
> > > We could unregister inappropriate backlight drivers when a more
> > > appropriate one is loaded, or the policy decision around which driver to
> > > use could be made in userland?
> > It's hard to decide which backlight driver is redundant, and it's kind of ugly
> > to unregister the backlight driver which is registered by other driver and maybe
> > problematic.
> 
> But you're relying on registering the working backlight first, which is 
> an inherently racy thing? We shouldn't be relying on order of 
> initialisation to make this work, either we should only export a working 
> interface or we should expose enough information for whatever is using 
> the interfaces to make an appropriate policy decision itself.

IIRC, drm drivers unregister redundant fbcon drivers (vesafb), so cannot
drm drivers use similar strategy also for backlight drivers and
unregister the redundant? If every backlight driver would have some
"flag" which say if it should be unregistered by drm then maybe it could
work? Or are there some other pitfalls?

  reply	other threads:[~2023-06-07  6:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-07  3:43 [PATCH] platform/x86: dell-laptop: Add drm module soft dependency AceLan Kao
2023-06-07  4:20 ` Matthew Garrett
2023-06-07  5:19   ` AceLan Kao
2023-06-07  5:27     ` Matthew Garrett
2023-06-07  6:13       ` AceLan Kao
2023-06-07  6:23         ` Matthew Garrett
2023-06-07  6:56           ` Pali Rohár [this message]
2023-06-07  7:39             ` AceLan Kao
2023-06-07  7:47               ` Matthew Garrett
2023-06-07 19:16                 ` Hans de Goede
2023-06-08  3:04                   ` AceLan Kao
2023-06-08  9:16                     ` Hans de Goede
2023-06-13  7:30                       ` AceLan Kao
2023-06-13  8:54                         ` Hans de Goede
2023-06-15  1:53                           ` AceLan Kao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230607065604.yaivqbbd3dkawxo4@pali \
    --to=pali@kernel.org \
    --cc=acelan.kao@canonical.com \
    --cc=hdegoede@redhat.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markgross@kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox