* [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
@ 2007-10-15 16:33 Thomas Renninger
[not found] ` <1192465995.9847.587.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Renninger @ 2007-10-15 16:33 UTC (permalink / raw)
To: linux-acpi; +Cc: Len Brown, Li, Shaohua, Christian Birchinger, ibm-acpi-devel
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
Those laptops define one grahpics device on a PCI Express (e.g. Internal Intel
965 card) and one on a separate PCI bus (via a PCI root bridge, e.g. in AGP
case for an Nvidia graphics card).
PCI devices need to be enumerated and checked whether on the ACPI video device
a graphics card is really connected to.
This patch only checks whether a PCI device exists (could also be a PCI bridge).
To really get the pci_dev struct and check it whether it really is of class
"graphics card" or to further make use of it in this driver, it must be checked
what got set up behind a possilbe bridge.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/acpi/video.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
Index: lenb/drivers/acpi/video.c
===================================================================
--- lenb.orig/drivers/acpi/video.c
+++ lenb/drivers/acpi/video.c
@@ -34,6 +34,8 @@
#include <linux/input.h>
#include <linux/backlight.h>
#include <linux/video_output.h>
+#include <linux/pci.h>
+#include <linux/acpi.h>
#include <asm/uaccess.h>
#include <acpi/acpi_bus.h>
@@ -1901,11 +1903,29 @@ static int acpi_video_bus_add(struct acp
acpi_status status = 0;
struct acpi_video_bus *video = NULL;
struct input_dev *input;
+ struct pci_dev *pci = NULL;
if (!device)
return -EINVAL;
+ /* TBD(trenn):
+ * Check against pci->class whether we have a graphics device
+ * If we have a bridge, find out the bus no. it is associated
+ * to and check whether there a graphics device sits.
+ *
+ * Not sure whether this is needed, maybe it's enough to find out
+ * whether there is a PCI device registered at as done now,
+ * but it might be helpful for the video module to access the
+ * video device's struct pci_dev* structure.
+ */
+ result = acpi_find_pci_device(device, pci);
+ if (result < 0) {
+ printk (KERN_DEBUG PREFIX "Video device %s not physically"
+ " connected, ignoring\n", acpi_device_bid(device));
+ return -ENODEV;
+ }
+
video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL);
if (!video)
return -ENOMEM;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
[not found] ` <1192465995.9847.587.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
@ 2007-10-16 17:50 ` Christian Birchinger
2007-10-16 18:09 ` Maik Broemme
0 siblings, 1 reply; 6+ messages in thread
From: Christian Birchinger @ 2007-10-16 17:50 UTC (permalink / raw)
To: Thomas Renninger; +Cc: linux-acpi, Li, Shaohua, ibm-acpi-devel, Len Brown
On Mon, Oct 15, 2007 at 06:33:15PM +0200, Thomas Renninger wrote:
> Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
# ls /proc/acpi/video/
VID/
(Only one entry now -> good)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
2007-10-16 17:50 ` Christian Birchinger
@ 2007-10-16 18:09 ` Maik Broemme
2007-10-17 8:25 ` Thomas Renninger
0 siblings, 1 reply; 6+ messages in thread
From: Maik Broemme @ 2007-10-16 18:09 UTC (permalink / raw)
To: Christian Birchinger
Cc: Thomas Renninger, linux-acpi, Len Brown, Li, Shaohua,
ibm-acpi-devel
Hi,
Christian Birchinger <joker@netswarm.net> wrote:
> On Mon, Oct 15, 2007 at 06:33:15PM +0200, Thomas Renninger wrote:
> > Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
>
> I think it's ok. dmesg says:
>
> ACPI: Video device VID not physically connected, ignoring
> input: Video Bus as /devices/virtual/input/input11
> ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
>
No i think thats not enough because not everyone is using the ACPI video
extension at this moment and at least for my ThinkPad X61 i got:
babyface@bart:~$ ls /proc/acpi/video/VID
CRT0 DOS DVI0 LCD0 POST POST_info ROM info
babyface@bart:~$ ls /proc/acpi/video/VID1
CRT0 DOS DVI0 LCD0 POST POST_info ROM info
input: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
input: Video Bus as /devices/virtual/input/input4
ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
Anyway, also tools like lspci should show you the fake vga device and
the X.org will complaint about it like:
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
And if you add this section (just for people who want to fix those
warnings) your X server will no longer start. :) Can someone correct me if
i am wrong?
> # ls /proc/acpi/video/
> VID/
>
> (Only one entry now -> good)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--Maik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
2007-10-16 18:09 ` Maik Broemme
@ 2007-10-17 8:25 ` Thomas Renninger
2007-10-17 10:12 ` Maik Broemme
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Renninger @ 2007-10-17 8:25 UTC (permalink / raw)
To: Maik Broemme
Cc: Christian Birchinger, linux-acpi, Len Brown, Li, Shaohua,
ibm-acpi-devel
On Tue, 2007-10-16 at 20:09 +0200, Maik Broemme wrote:
> Hi,
>
> Christian Birchinger <joker@netswarm.net> wrote:
> > On Mon, Oct 15, 2007 at 06:33:15PM +0200, Thomas Renninger wrote:
> > > Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
> >
> > I think it's ok. dmesg says:
> >
> > ACPI: Video device VID not physically connected, ignoring
> > input: Video Bus as /devices/virtual/input/input11
> > ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> >
>
> No i think thats not enough because not everyone is using the ACPI video
> extension at this moment and at least for my ThinkPad X61 i got:
>
> babyface@bart:~$ ls /proc/acpi/video/VID
> CRT0 DOS DVI0 LCD0 POST POST_info ROM info
> babyface@bart:~$ ls /proc/acpi/video/VID1
> CRT0 DOS DVI0 LCD0 POST POST_info ROM info
>
> input: Video Bus as /devices/virtual/input/input3
> ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> input: Video Bus as /devices/virtual/input/input4
> ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
>
> Anyway, also tools like lspci should show you the fake vga device and
> the X.org will complaint about it like:
>
> (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
>
> And if you add this section (just for people who want to fix those
> warnings) your X server will no longer start. :) Can someone correct me if
> i am wrong?
Can you send lspci output and check your BIOS version (dmidecode |less,
there should be a string like KEWWT456 and a version, not sure, AFAIK
2.01 should be about the latest...).
Thanks,
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
2007-10-17 8:25 ` Thomas Renninger
@ 2007-10-17 10:12 ` Maik Broemme
2007-10-17 10:40 ` Thomas Renninger
0 siblings, 1 reply; 6+ messages in thread
From: Maik Broemme @ 2007-10-17 10:12 UTC (permalink / raw)
To: Thomas Renninger
Cc: Christian Birchinger, linux-acpi, Len Brown, Li, Shaohua,
ibm-acpi-devel
Hi,
Thomas Renninger <trenn@suse.de> wrote:
> On Tue, 2007-10-16 at 20:09 +0200, Maik Broemme wrote:
> > Hi,
> >
> > Christian Birchinger <joker@netswarm.net> wrote:
> > > On Mon, Oct 15, 2007 at 06:33:15PM +0200, Thomas Renninger wrote:
> > > > Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
> > >
> > > I think it's ok. dmesg says:
> > >
> > > ACPI: Video device VID not physically connected, ignoring
> > > input: Video Bus as /devices/virtual/input/input11
> > > ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> > >
> >
> > No i think thats not enough because not everyone is using the ACPI video
> > extension at this moment and at least for my ThinkPad X61 i got:
> >
> > babyface@bart:~$ ls /proc/acpi/video/VID
> > CRT0 DOS DVI0 LCD0 POST POST_info ROM info
> > babyface@bart:~$ ls /proc/acpi/video/VID1
> > CRT0 DOS DVI0 LCD0 POST POST_info ROM info
> >
> > input: Video Bus as /devices/virtual/input/input3
> > ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> > input: Video Bus as /devices/virtual/input/input4
> > ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
> >
> > Anyway, also tools like lspci should show you the fake vga device and
> > the X.org will complaint about it like:
> >
> > (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
> >
> > And if you add this section (just for people who want to fix those
> > warnings) your X server will no longer start. :) Can someone correct me if
> > i am wrong?
> Can you send lspci output and check your BIOS version (dmidecode |less,
> there should be a string like KEWWT456 and a version, not sure, AFAIK
> 2.01 should be about the latest...).
>
First sorry Thomas, it was my fault with ACPI video, i habe at this
moemnt to many different modules of that for testing and used the wrong
one at time of writing the e-mail yesterday. :) It is correct now and
looks like:
babyface@bart:~$ dmesg | grep video -i
Boot video device is 0000:00:02.0
input: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
ACPI: Video device VID not physically connected, ignoring
This will fix the issue with multiple VID devices in /proc but the rest
will still occur, of course this is no fault of ACPI video. X.org will
still show:
(II) Primary Device is: PCI 00:02:0
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
(--) Chipset 965GM found
babyface@bart:~$ lspci
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
05:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
05:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
05:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
ThinkPad BIOS 7SET18WW (1.04)
ThinkPad EC 7RHT16WW (1.02)
Notebook is a X61 tablet and the latest bios would be 1.06, but i had not
enough time to upgrade it. With dmidecode i was not able to find a string
called KEWWT456.
> Thanks,
>
> Thomas
--Maik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
2007-10-17 10:12 ` Maik Broemme
@ 2007-10-17 10:40 ` Thomas Renninger
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Renninger @ 2007-10-17 10:40 UTC (permalink / raw)
To: Maik Broemme
Cc: Christian Birchinger, linux-acpi, Len Brown, Li, Shaohua,
ibm-acpi-devel, Matthew Garrett
On Wed, 2007-10-17 at 12:12 +0200, Maik Broemme wrote:
> Hi,
>
> Thomas Renninger <trenn@suse.de> wrote:
> > On Tue, 2007-10-16 at 20:09 +0200, Maik Broemme wrote:
> > > Hi,
> > >
> > > Christian Birchinger <joker@netswarm.net> wrote:
> > > > On Mon, Oct 15, 2007 at 06:33:15PM +0200, Thomas Renninger wrote:
> > > > > Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
> > > >
> > > > I think it's ok. dmesg says:
> > > >
> > > > ACPI: Video device VID not physically connected, ignoring
> > > > input: Video Bus as /devices/virtual/input/input11
> > > > ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> > > >
> > >
> > > No i think thats not enough because not everyone is using the ACPI video
> > > extension at this moment and at least for my ThinkPad X61 i got:
> > >
> > > babyface@bart:~$ ls /proc/acpi/video/VID
> > > CRT0 DOS DVI0 LCD0 POST POST_info ROM info
> > > babyface@bart:~$ ls /proc/acpi/video/VID1
> > > CRT0 DOS DVI0 LCD0 POST POST_info ROM info
> > >
> > > input: Video Bus as /devices/virtual/input/input3
> > > ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> > > input: Video Bus as /devices/virtual/input/input4
> > > ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
> > >
> > > Anyway, also tools like lspci should show you the fake vga device and
> > > the X.org will complaint about it like:
> > >
> > > (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
> > >
> > > And if you add this section (just for people who want to fix those
> > > warnings) your X server will no longer start. :) Can someone correct me if
> > > i am wrong?
> > Can you send lspci output and check your BIOS version (dmidecode |less,
> > there should be a string like KEWWT456 and a version, not sure, AFAIK
> > 2.01 should be about the latest...).
> >
>
> First sorry Thomas, it was my fault with ACPI video, i habe at this
> moemnt to many different modules of that for testing and used the wrong
> one at time of writing the e-mail yesterday. :) It is correct now and
> looks like:
>
> babyface@bart:~$ dmesg | grep video -i
> Boot video device is 0000:00:02.0
> input: Video Bus as /devices/virtual/input/input3
> ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
> ACPI: Video device VID not physically connected, ignoring
>
Great, thanks.
So what to do here now?
Matthew had some concerns that this one might break other machines, but
it definitely fixes the Lenovo ThinkPads.
Shall it be put into -mm until we find offending machines we can debug
and provide a better solution?
I try to find a Dell or Toshiba with video extensions (this could get
difficult) and try a bit there...
If time is running out for 2.6.24, maybe we can add this check with a
Lenovo dmi check added, so that at least those work as expected and
remove it if we find a safer way of detecting fake devices?
> This will fix the issue with multiple VID devices in /proc but the rest
> will still occur, of course this is no fault of ACPI video. X.org will
> still show:
>
> (II) Primary Device is: PCI 00:02:0
> (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
> (--) Chipset 965GM found
>
> babyface@bart:~$ lspci
> 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
> 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
> 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
> 00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
> 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03)
> 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
> 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
> 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
> 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
> 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
> 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
> 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
> 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
> 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
> 00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03)
> 00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
> 00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)
> 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
> 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
> 05:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
> 05:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)
> 05:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
>
> ThinkPad BIOS 7SET18WW (1.04)
> ThinkPad EC 7RHT16WW (1.02)
>
> Notebook is a X61 tablet and the latest bios would be 1.06, but i had not
> enough time to upgrade it. With dmidecode i was not able to find a string
> called KEWWT456.
I meant the 7SET18WW one...
The newest BIOS version is: 7SET20WW (1.06), EC is 1.02.
Don't know whether it helps for your X problem you should probably ask
on a X-server related list for that..., updating the BIOS first is
probably a good idea and Lenovo fortunately provides BIOS iso's.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-17 10:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-15 16:33 [PATCH 2/2] Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it Thomas Renninger
[not found] ` <1192465995.9847.587.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
2007-10-16 17:50 ` Christian Birchinger
2007-10-16 18:09 ` Maik Broemme
2007-10-17 8:25 ` Thomas Renninger
2007-10-17 10:12 ` Maik Broemme
2007-10-17 10:40 ` Thomas Renninger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox