Linux ACPI
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Len Brown <lenb@kernel.org>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] ACPI video: print out a warning message when duplicate video bus devices under the same VGA controller are detected
Date: Thu, 26 Nov 2009 09:05:33 +0800	[thread overview]
Message-ID: <1259197533.10510.76.camel@rzhang1-desktop> (raw)
In-Reply-To: <alpine.LFD.2.00.0911251638220.3950@localhost.localdomain>

On Thu, 2009-11-26 at 05:39 +0800, Len Brown wrote:
> On Wed, 25 Nov 2009, Zhang Rui wrote:
> 
> > 
> > Some buggy BIOS exports multiple ACPI video bus devices for the same
> > VGA controller, and multiple backlight control methods as well.
> > This may mess up the ACPI video backlight control.
> > http://bugzilla.kernel.org/show_bug.cgi?id=13577
> > 
> > We should at least send out a warning message in this case.
> > 
> > Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> > ---
> >  drivers/acpi/video.c |   24 ++++++++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> > 
> > Index: linux-2.6/drivers/acpi/video.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/acpi/video.c
> > +++ linux-2.6/drivers/acpi/video.c
> > @@ -2233,12 +2233,36 @@ static int acpi_video_resume(struct acpi
> >  	return AE_OK;
> >  }
> >  
> > +static acpi_status
> > +acpi_video_bus_match(acpi_handle handle, u32 level, void *context,
> > +			void **return_value)
> > +{
> > +	struct acpi_device *device = context;
> > +	struct acpi_device *sibling;
> > +	int result;
> > +
> > +	if (handle == device->handle)
> > +		return AE_CTRL_TERMINATE;
> > +
> > +	result = acpi_bus_get_device(handle, &sibling);
> > +	if (result)
> > +		return AE_OK;
> > +
> > +	if (!strcmp(acpi_device_name(sibling), ACPI_VIDEO_BUS_NAME))
> > +		printk(KERN_WARNING FW_BUG "Duplicate ACPI video bus "
> > +				"devices for the same VGA controller\n");
> 
> what is somebody supposed to _do_ when they see this message?
> 
I think this warning message gives us clues when debugging backlight
issues.
Say we see a bug report that brightness switching doesn't work and find
out that there is such a warning message in the dmesg output, then we
can see which video bus device under this VGA controller actually works.

If this bug is not rare, then we can set up a dmi list to choose the
working video bus device for these laptops.

thanks,
rui


  reply	other threads:[~2009-11-26  1:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  9:16 [PATCH] ACPI video: print out a warning message when duplicate video bus devices under the same VGA controller are detected Zhang Rui
2009-11-25 21:39 ` Len Brown
2009-11-26  1:05   ` Zhang Rui [this message]
2009-11-26  5:10     ` Matthew Garrett
2009-12-29  2:40       ` Len Brown

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=1259197533.10510.76.camel@rzhang1-desktop \
    --to=rui.zhang@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@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