All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: ak@linux.intel.com, rui.zhang@intel.com, nokos@gmx.net,
	linux-acpi@vger.kernel.org, mjg59@srcf.ucam.org
Subject: Re: [PATCH 02/10] Check for ACPI backlight support otherwise use vendor ACPI drivers
Date: Tue, 18 Nov 2008 03:31:54 +0100	[thread overview]
Message-ID: <200811180331.55114.trenn@suse.de> (raw)
In-Reply-To: <200811171251.43103.bjorn.helgaas@hp.com>

On Monday 17 November 2008 08:51:42 pm Bjorn Helgaas wrote:
> On Sunday 16 November 2008 03:07:31 pm Thomas Renninger wrote:
> > On Friday 14 November 2008 04:27:42 pm Bjorn Helgaas wrote:
> > > On Friday 01 August 2008 09:37:55 am Thomas Renninger wrote:
> > > > @@ -1013,7 +983,7 @@ static void acpi_device_set_id(struct
> > > > acpi_device *device, will get autoloaded and the device might still
> > > > match against another driver.
> > > >  		*/
> > > > -		if (ACPI_SUCCESS(acpi_video_bus_match(device)))
> > > > +		if (acpi_is_video_device(device))
> > > >  			cid_add = ACPI_VIDEO_HID;
> > > >  		else if (ACPI_SUCCESS(acpi_bay_match(device)))
> > > >  			cid_add = ACPI_BAY_HID;
> > >
> > > It doesn't seem right to me to make this core behavior depend
> > > on a config option.  With this approach, the ACPI device tree may
> > > or may not contain an ACPI_VIDEO_HID device, depending on whether
> > > CONFIG_ACPI_VIDEO is set, and that seems capricious.
> > >
> > > What is the benefit of moving this code out of scan.c?  It's not
> > > a very big function, and I think the consistency is worth the extra
> > > code.
> >
> > This was done because the function is re-used later to detect which kind
> > of video functionalities the video device provides.
> > I somehow agree, but I don't see much of a disadvantage having this
> > separated. You do not have the video device marked as such if
> > CONFIG_ACPI_VIDEO is not compiled in, but it shouldn't hurt?
>
> My personal opinion is that the device tree should be the same,
> regardless of which drivers were selected at build-time.  It should
> be possible to build a kernel with CONFIG_ACPI_VIDEO=n, then decide
> later that you want to load a video driver.  Plus, it took me about
> half an hour to figure out why the Makefile looks weird:
>
> 	obj-$(CONFIG_ACPI_VIDEO)        += video.o
> 	ifdef CONFIG_ACPI_VIDEO
> 	obj-y                           += video_detect.o
> 	endif
>
> (I first thought video_detect.o could just be moved up to the
> first line along with video.o.)
>
> > The two corresponding functions:
> > acpi_backlight_cap_match
> > acpi_is_video_device
> >
> > might also go back to video.c again and get exported there. I can do that
> > if you think it's worth it.
>
> As long as we use the "self-defined HID" strategy for binding drivers,
> I think those HIDs should be considered part of the core, and they
> should be set whenever CONFIG_ACPI=y.  I don't think they should
> depend on which drivers were selected at build-time.  In some ways,
> it might be nicer if a driver could supply its own "match" function,
> and then all the video-related special cases could be in the video
> driver.

The video and other drivers cannot provide their own match function or
autoloading of the driver would not work.
Either you compile it into the core and the detection/matching will always 
take place or you do it as it is currently done and the matching for video 
devices will only be done if ACPI_VIDEO is compiled in.

      Thomas

  reply	other threads:[~2008-11-18  2:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01 15:37 Check for ACPI backlight support otherwise use vendor ACPI drivers - version 4 Thomas Renninger
2008-08-01 15:37 ` [PATCH 01/10] ACPI: video: Ignore devices that aren't present in hardware Thomas Renninger
2008-08-01 15:37 ` [PATCH 02/10] Check for ACPI backlight support otherwise use vendor ACPI drivers Thomas Renninger
2008-08-04  1:56   ` Zhang Rui
2008-11-14 22:27   ` Bjorn Helgaas
2008-11-16 22:07     ` Thomas Renninger
2008-11-17 19:51       ` Bjorn Helgaas
2008-11-18  2:31         ` Thomas Renninger [this message]
2008-08-01 15:37 ` [PATCH 03/10] Acer-WMI: fingers off backlight if video.ko is serving this functionality Thomas Renninger
2008-08-01 21:52   ` Carlos Corbacho
2008-08-01 15:37 ` [PATCH 04/10] asus-acpi: " Thomas Renninger
2008-08-01 15:37 ` [PATCH 05/10] compal: " Thomas Renninger
2008-08-01 15:37 ` [PATCH 06/10] eeepc-laptop: " Thomas Renninger
2008-08-01 15:38 ` [PATCH 07/10] fujitsu-laptop: " Thomas Renninger
2008-08-01 15:38 ` [PATCH 08/10] msi-laptop: " Thomas Renninger
2008-08-01 15:38 ` [PATCH 09/10] sony-laptop: " Thomas Renninger
2008-08-01 15:38 ` [PATCH 10/10] thinkpad_acpi: " Thomas Renninger
2008-08-01 17:50   ` Henrique de Moraes Holschuh
2008-11-08  5:45     ` Len Brown
2008-08-01 20:49 ` Check for ACPI backlight support otherwise use vendor ACPI drivers - version 4 Andi Kleen
     [not found] ` <1217632817.4610.6.camel@hidalgo>
2008-08-02 16:57   ` Do not return true to all kind of Windows OSI calls Thomas Renninger
2008-08-02 16:59     ` Matthew Garrett
2008-08-02 16:48       ` Thomas Renninger
2008-08-02 17:31         ` Matthew Garrett
2008-08-02 17:30           ` Thomas Renninger
2008-08-02 19:48             ` Matthew Garrett
2008-08-03  4:43               ` Henrique de Moraes Holschuh
2008-08-03  6:33                 ` Matthew Garrett
2008-08-03 13:31               ` Thomas Renninger
2008-08-03 14:12                 ` Matthew Garrett
2008-08-03 16:24                   ` Thomas Renninger
2008-08-06 17:12                     ` Moore, Robert
2008-08-02 16:57   ` [PATCH 1/2] ACPI: Provide a OSI interface that does not return true for Windows Thomas Renninger
2008-08-02 16:57   ` [PATCH 2/2] patch acpi_lenovo_thinkpad_only_return_vista.patch Thomas Renninger
2008-08-02 16:28     ` Thomas Renninger
2008-08-04  1:16   ` Check for ACPI backlight support otherwise use vendor ACPIdrivers - version 4 Zhang Rui
2008-08-04  6:09     ` Yves-Alexis Perez
2008-08-04  6:20       ` Yves-Alexis Perez
2008-08-04 10:20       ` Thomas Renninger
2008-08-04 10:39         ` Yves-Alexis Perez
2008-08-04 11:19           ` Thomas Renninger
2008-08-04 13:24             ` Matthew Garrett
2008-08-04 13:30               ` Yves-Alexis Perez
2008-08-04 13:40                 ` Thomas Renninger
2008-08-04 13:47                   ` Yves-Alexis Perez
2008-08-05  0:01         ` Henrique de Moraes Holschuh
2008-08-05  5:55           ` Yves-Alexis Perez
2008-08-05  9:13             ` Thomas Renninger
2008-08-05 12:00               ` Yves-Alexis Perez
2008-08-05 13:37             ` Henrique de Moraes Holschuh

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=200811180331.55114.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=ak@linux.intel.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=nokos@gmx.net \
    --cc=rui.zhang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.