From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
Christian Birchinger <joker@netswarm.net>,
"Li, Shaohua" <shaohua.li@intel.com>, Len Brown <lenb@kernel.org>,
ibm-acpi-devel <ibm-acpi-devel@lists.sourceforge.net>
Subject: Re: [PATCH 1/1] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
Date: Tue, 16 Oct 2007 15:49:01 +0100 [thread overview]
Message-ID: <20071016144901.GB21749@srcf.ucam.org> (raw)
In-Reply-To: <1192545541.9847.600.camel@queen.suse.de>
On Tue, Oct 16, 2007 at 04:39:01PM +0200, Thomas Renninger wrote:
> + /*
> + * Check whether we have really a graphics device physically
> + * in the slot and registered at the system.
> + */
> + dev = acpi_get_physical_device(device->handle);
> + if (!dev) {
> + printk (KERN_DEBUG PREFIX "Video device %s.%s not physically"
> + " connected, ignoring\n", acpi_device_bid(device),
> + device->parent ? acpi_device_bid(device->parent) : "");
> + return -ENODEV;
> + }
> +
I suspect this will break other machines. Not all video extension
implementations are directly associated with the PCI ID. The Toshiba
M200 (for example) has
Device (PCI1)
{
Name (_ADR, 0x00010000)
Device (VGA)
{
Name (_ADR, 0x00)
which will result in VGA not having a physical device. You might be able
to get away with walking the parents until you find a pci ID and then
checking whether it matches the graphics adaptor, but I'm not certain of
that.
To make things more entertaining, Dell tend to implement a video
extension for both the 00:02.0 and 00:02.1 devices on Intel systems. We
need to be smarter about this, but I don't think simply looking for a
physical device is the solution.
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2007-10-16 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 16:33 [PATCH 1/2] Export a func to find the corresponding PCI bus:seg.func of an ACPI device Thomas Renninger
2007-10-15 16:48 ` Matthew Garrett
2007-10-16 1:12 ` Shaohua Li
2007-10-16 14:39 ` [PATCH 1/1] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it Thomas Renninger
2007-10-16 14:43 ` Thomas Renninger
2007-10-16 14:49 ` Matthew Garrett [this message]
[not found] ` <20071016144901.GB21749-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
2007-10-16 15:11 ` Thomas Renninger
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=20071016144901.GB21749@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=joker@netswarm.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=shaohua.li@intel.com \
--cc=trenn@suse.de \
/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.