Bug 20089

Summary: [945GME] LVDS incorrectly detected as "connected"
Product: xorg Reporter: Eric Smith <eric225125>
Component: Driver/intelAssignee: Wang Zhenyu <zhenyu.z.wang>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: minor    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log with problem
none
xorg.conf with debug turned on
none
xrandr output
none
dmesg
none
Xorg.0.log with debug turned on
none
lspci -vn
none
dmidecode
none
Jetway J9F2 LVDS quirk
none
vbios
none
Use LVDS config from vbios none

Description Eric Smith 2009-02-12 13:48:47 UTC
I am using the current git libdrm, xorg-server, mesa, xf86-video-intel, and 2.6.29-rc4.  I have a single LCD monitor connected to my 945GME (Jetway J9F2 Extreme) and with no options set in xorg.conf it tries to set up a dual monitor setup with two 1024x768 screens.  If I add a monitor section for "LVDS" and set it to "ignore", then I get the proper behavior (a single 1280x1024 screen).  Attached is my Xorg.0.log with no options set in xorg.conf.
Comment 1 Eric Smith 2009-02-12 13:49:39 UTC
Created attachment 22872 [details]
Xorg.0.log with problem
Comment 2 Michael Fu 2009-02-12 15:18:20 UTC
pls refer to http://intellinuxgraphics.org/how_to_report_bug.html to see how to report a bug...

especially, turns modedebug on and submit the log..
Comment 3 Gordon Jin 2009-02-12 18:57:54 UTC
So this machine is not a laptop, so doesn't have a local flat panel connected, right?
Comment 4 Eric Smith 2009-02-14 10:19:47 UTC
Ok I have attached some more info.  This is a not a laptop, but I think it is using a mobile chipset.  There is an LVDS connector, but it's not connected to anything and I have disabled it in BIOS.

gentoo ~ # uname -a
Linux gentoo 2.6.29-rc5-zen1 #1 SMP PREEMPT Sat Feb 14 12:30:57 EST 2009 x86_64 Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GenuineIntel GNU/Linux
Comment 5 Eric Smith 2009-02-14 10:20:41 UTC
Created attachment 22948 [details]
xorg.conf with debug turned on
Comment 6 Eric Smith 2009-02-14 10:21:07 UTC
Created attachment 22949 [details]
xrandr output
Comment 7 Eric Smith 2009-02-14 10:21:44 UTC
Created attachment 22950 [details]
dmesg
Comment 8 Eric Smith 2009-02-14 10:22:27 UTC
Created attachment 22951 [details]
Xorg.0.log with debug turned on
Comment 9 Wang Zhenyu 2009-02-15 22:39:12 UTC
Does your system has 'lid' directory under /proc/acpi/button/? if yes, what about its status? Looks we need a quirk for your system, please attach lspci -vn.
Comment 10 Eric Smith 2009-02-16 14:26:54 UTC
I do not have /proc/acpi/button/lid/, only /proc/acpi/button/power/PWRB and /proc/acpi/button/power/PWRF: 

gentoo / # cat /proc/acpi/button/power/PWRB/info
type:                    Power Button (CM)
gentoo / # cat /proc/acpi/button/power/PWRF/info
type:                    Power Button (FF)
Comment 11 Eric Smith 2009-02-16 14:27:33 UTC
Created attachment 23003 [details]
lspci -vn
Comment 12 Wang Zhenyu 2009-02-16 16:43:15 UTC
oh, subdevice id is same as device id...Could you attach dmidecode output too?
Comment 13 Eric Smith 2009-02-17 09:46:48 UTC
Created attachment 23037 [details]
dmidecode
Comment 14 Wang Zhenyu 2009-02-17 17:02:56 UTC
Created attachment 23053 [details] [review]
Jetway J9F2 LVDS quirk

It looks there's no specific product info within dmi? Do you know any method can be used to identify this board? Otherwise we might just use this quirk patch or try another way to parse VBT.

Could you attach your vbios dump? Do like

cd /sys/devices/pci0000:00/0000:00:02.0/
echo 1 > rom
cat rom > /tmp/vbios

Then attach vbios file.
Comment 15 Eric Smith 2009-02-17 18:16:32 UTC
Created attachment 23059 [details]
vbios
Comment 16 Wang Zhenyu 2009-02-17 21:18:04 UTC
Created attachment 23065 [details] [review]
Use LVDS config from vbios

Here's the patch against git master, that trys to use driver feature block data from vbios for LVDS info. That should eliminate the need for your quirk.
Comment 17 Eric Smith 2009-02-18 09:17:34 UTC
Thanks, your patch fixes the problem.  Will this be included in the main git tree?
Comment 18 Wang Zhenyu 2009-02-18 16:54:41 UTC
I hope I can get more test to show this patch should work at least in most case, and reviews from intel-gfx list is also what I'd like to see. Keep open until I push the patch.
Comment 19 Wang Zhenyu 2009-02-24 18:25:31 UTC
Pushed the patch. Close.

commit f6d8ae69b0f97e696c142f06c8038f336ed024f9
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Wed Feb 25 09:57:00 2009 +0800

    Use LVDS config in Driver feature BDB for integrated LVDS check
    
    The LVDS config bits in VBT driver feature block is used by vendor
    to identify the board implement of integrated LVDS/eDP or SDVO LVDS.
    And video bios uses these bits for LVDS enabling or not. So check
    these bits for integrated LVDS might eliminate more quirks.

Comment 20 Eric Smith 2009-03-01 15:10:14 UTC
Your pushed patch has been working, but after switching to KMS, I now have the same problem.  I can again work around it by adding a LVDS1 "ignore" line to my xorg.conf.  I suppose your same fix just needs to be applied somewhere else in the kernel code?  Do you need any additional information?
Comment 21 Wang Zhenyu 2009-03-01 19:14:41 UTC
I've sent patch for KMS to intel-gfx list, and Eric Anholt has my patch integrated to drm-intel-next tree, which might haven't hit linus's tree yet. And I have a little updated patch for checking this block only for 9XX chips, which has also been sent to intel-gfx. You can try anholt's drm-intel-next tree from http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=summary, or wait for my patch to hit linus's.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.