Bug 24282

Summary: Regression: intel driver 2.9.0 fails on G33 with external DVI connector card while 2.8.1 has worked fine
Product: xorg Reporter: Markus Heinz <markusheinz>
Component: Driver/intelAssignee: ykzhao <yakui.zhao>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: high CC: marius
Version: unspecifiedKeywords: regression
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
Attachments:
Description Flags
Xorg.0.log with unaltered intel driver
none
Xorg.0.log with the change described in the description of the bug
none
use the DDC1 to see whether the EDID can be obtained
none
Xorg.0.log with the ddc1 edid patch applied
none
dmesg after boot with linux 2.6.31.3 and KMS enabled
none
Video BIOS dump
none
try to read the first 256bytes from SDVO SPD ROM
none
dmesg trying to read sdvo spd rom
none
dmesg output with boot options i915.modeset=1 drm.debug=0x06
none
dmesg output with boot options i915.modeset=1 drm.debug=0x06
none
try the updated debug patch
none
dmesg output with new patch with boot options i915.modeset=1 drm.debug=0x06
none
rerun of the last test with an updated git tree from drm-intel
none
dmidecode for driver with sdvo patch and drm.debug=0x06
none
edid obtained with third party tool
none
try the debug patch which deletes the strict EDID check none

Description Markus Heinz 2009-10-02 13:15:35 UTC
PC: Lenovo ThinkCentre with Intel onboard graphics and DVI connector card
Chipset:
00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)
00:02.1 Display controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)
Monitor: Asus VW222U flat panel connected with a DVI cable
System architecture: 32-bit
xf86-video-intel: 2.9.0
xserver: X.Org X Server 1.6.4
mesa: 7.6
libdrm:2.4.14
kernel: 2.6.31.1
Linux distribution: Crux 2.6

Reproducing steps: Update the intel driver from 2.8.1 to 2.9.0 and try to start the X server

Expected result: a running X server

Actual result: The screen goes black for a moment and then returns to  text console

Additional info:
Kernel mode setting is not activated. I have also tried with kernel mode setting activated. This did not work either.

I have identified the code change which leads to the regression:

Lines 1827 - 1829 in file i830_sdvo.c:
/* when there is no EDID, it should be detected as disconnected */
if (!edid_mon)
    return XF86OutputStatusDisconnected;

If I comment out these lines the X server starts up again and is normally usable. I cannot switch back to the text console though. The monitor then reports "Out of range".

If you need additional information let me know. I am up to testing patches too.
Comment 1 Julien Cristau 2009-10-02 13:26:30 UTC
On Fri, Oct  2, 2009 at 13:15:36 -0700, bugzilla-daemon@freedesktop.org wrote:

> I have identified the code change which leads to the regression:
> 
> Lines 1827 - 1829 in file i830_sdvo.c:
> /* when there is no EDID, it should be detected as disconnected */
> if (!edid_mon)
>     return XF86OutputStatusDisconnected;
> 
sounds a lot like bug#24255.
Comment 2 Markus Heinz 2009-10-02 14:04:59 UTC
Created attachment 30001 [details]
Xorg.0.log with unaltered intel driver
Comment 3 Markus Heinz 2009-10-02 14:07:55 UTC
Created attachment 30002 [details]
Xorg.0.log with the change described in the description of the bug
Comment 4 Markus Heinz 2009-10-02 14:17:51 UTC
I have these lines in both Xorg.0.logs:

(II) intel(0): the SDVO device with slave addr 70 is found on DVO 1 port
(II) intel(0): the SDVO device with slave addr 70 is found on DVO 1 port
(WW) intel(0): One DVO port is shared by two slave address. Maybe it can't be handled

They are not present in the log in bug#24255.
Comment 5 ykzhao 2009-10-08 19:34:27 UTC
(In reply to comment #4)
> I have these lines in both Xorg.0.logs:
> 
> (II) intel(0): the SDVO device with slave addr 70 is found on DVO 1 port
> (II) intel(0): the SDVO device with slave addr 70 is found on DVO 1 port
> (WW) intel(0): One DVO port is shared by two slave address. Maybe it can't be
> handled
> 
> They are not present in the log in bug#24255.
>
This is different with the bug24255. Instead it is a dup of bug23842.

From the log it seems that this is a SDVO device with multiple inputs and outputs. For example: it seems that it supports the VGA and TMDS-0.
>(II) intel(0): SDVOB: W: 02                         (SDVO_CMD_GET_DEVICE_CAPS)
>(II) intel(0): SDVOB: R: 03 94 02 01 01 02 1F 00 (Success)

At the same time as there is no EDID for the external monitor, it is regarded as disconnected.

Before the following commit is applied, it is still regarded as connected.
02fe9be695f7e209944bd0f7b67950f93619feee
    >commit 02fe9be695f7e209944bd0f7b67950f93619feee
    >Author: Zhao Yakui <yakui.zhao@intel.com>
    >Date:   Tue Sep 22 10:58:38 2009 +0800

    Check whether the DVI-I/D is connected or disconnected based on EDID




Comment 6 ykzhao 2009-10-08 20:21:47 UTC
Created attachment 30192 [details] [review]
use the DDC1 to see whether the EDID can be obtained

Will you please try the debug patch and attach the output of xorg.0.log?
Thanks.
Comment 7 Markus Heinz 2009-10-09 10:24:49 UTC
Created attachment 30229 [details]
Xorg.0.log with the ddc1 edid patch applied

I have tried the DDC1 patch from the above comment. From a user's perspective the result was the same as using the release version, this means the X server refused to start. Log file Xorg-ddc1_edid.0.log attached.
Comment 8 ykzhao 2009-10-09 19:13:10 UTC
(In reply to comment #7)
> Created an attachment (id=30229) [details]
> Xorg.0.log with the ddc1 edid patch applied
> 
> I have tried the DDC1 patch from the above comment. From a user's perspective
> the result was the same as using the release version, this means the X server
> refused to start. Log file Xorg-ddc1_edid.0.log attached.
Thanks for the test.
From the log we can know that this is a SDVO device with multiple outputs(RGB/TV/TMDS-0). In such case it will have DDC1/DDC2, which can be used to obtain the EDID from the external monitor.
But unfortunately we try the DDC1/DDC2 and still can't ge the EDID for the external monitor. Then it is regarded as disconnected. 

In fact this is a SDVO device with multiple inputs and multiple outputs. 
Will you please describe the hardware info in detail? For example: 
    whether there exist two or more DVI ports?
    Whether the DVI cable is shipped with the box?
    
Will you please try the KMS mode and see whether the monitor can be detected on the DVI-connector?
Please also attach the output of vbios.dump. The vbios.dump can be obtained by using the following 
   > echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
   > cat /sys/devices/pci0000:00/0000:00:02.0/rom > vbios.dump
   > echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom

thanks.
> 

Comment 9 ykzhao 2009-10-09 22:27:04 UTC
From the log in comment #3 and #7 it seems that we still can't get the EDID from external monitor by using the different DDC bus.
   > DDC1/DDC2 bus, this is initiated by using SDVO command
   > CRT DDC_A bus. 

If there is no EDID for the digital monitor, it will be regarded as disconnected.

Do you have an opportunity to try the monitor on another box and see whether the EDID can be obtained?

Will you please give more detailed info about the SDVO card? 

Thanks.
Comment 10 Markus Heinz 2009-10-10 07:17:38 UTC
Created attachment 30250 [details]
dmesg after boot with linux 2.6.31.3 and KMS enabled

I have tried to use KMS with linux 2.6.31.3 by specifying the parameter i915.modeset=1. The kernel has not succeeded in reading EDID too. Dmesg output is attached. After boot the X server did not start up, even with the modified version described in the original bug description. 

The extension card with the DVI connector has only one external DVI connector to which the monitor is attached. I use the DVI cable which had been bundled with the monitor. The motherboard has another VGA output which is not used. The extension card with the DVI connector had been preinstalled when I bought the PC. I have no other DVI capable devices (computer/monitor) with which I could test.
Comment 11 Markus Heinz 2009-10-10 07:24:14 UTC
Created attachment 30251 [details]
Video BIOS dump

Dump of the video BIOS attached.
Comment 12 ykzhao 2009-10-11 20:56:47 UTC
Created attachment 30277 [details] [review]
try to read the first 256bytes from SDVO SPD ROM

Will you please try the debug patch on the Eric's drm-intel-next tree and attach the output of dmesg? (Please boot the system with KMS enabled).
Thanks.
Comment 13 Markus Heinz 2009-10-12 13:59:40 UTC
Created attachment 30305 [details]
dmesg trying to read sdvo spd rom
Comment 14 Markus Heinz 2009-10-12 14:04:33 UTC
Comment on attachment 30305 [details]
dmesg trying to read sdvo spd rom 

I have compiled a kernel from this branch  git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel and applied the aforementioned patch. The output when loading the i915.ko module is attached.
Comment 15 ykzhao 2009-10-12 23:48:00 UTC
(In reply to comment #13)
> Created an attachment (id=30305) [details]
> dmesg trying to read sdvo spd rom 
please add the boot option of "drm.debug=0x06" and attach the output of dmesg.
Thanks.
Comment 16 Markus Heinz 2009-10-13 11:43:24 UTC
Created attachment 30356 [details]
dmesg output with boot options i915.modeset=1 drm.debug=0x06

I have booted the drm-intel kernel with the boot options i915.modeset=1 and drm.debug=0x06. The dmesg output is attached.
Comment 17 Markus Heinz 2009-10-13 11:44:55 UTC
Created attachment 30357 [details]
dmesg output with boot options i915.modeset=1 drm.debug=0x06

I have booted the drm-intel kernel with the boot options i915.modeset=1 and drm.debug=0x06. The dmesg output is attached.
Comment 18 ykzhao 2009-10-13 22:37:28 UTC
Created attachment 30370 [details] [review]
try the updated debug patch

Will you please try the debug patch and attach the output of dmesg?(please add the boot option of "drm.debug=0x06")

thanks.
Comment 19 Markus Heinz 2009-10-14 13:40:18 UTC
Created attachment 30416 [details]
dmesg output with new patch with boot options i915.modeset=1 drm.debug=0x06

I have booted a kernel with the updated drm debug patch and the boot options i915.modeset=1 drm.debug=0x06. The dmesg output is attached.
Comment 20 Markus Heinz 2009-10-14 14:15:17 UTC
Created attachment 30417 [details]
rerun of the last test with an updated git tree from drm-intel

I have rerun the last test after updating my drm-intel git tree to 2.6.32-rc4.
Comment 21 ykzhao 2009-10-15 00:40:18 UTC
*** Bug 24522 has been marked as a duplicate of this bug. ***
Comment 22 ykzhao 2009-10-15 20:19:40 UTC
(In reply to comment #20)
> Created an attachment (id=30417) [details]
> rerun of the last test with an updated git tree from drm-intel
> 
> I have rerun the last test after updating my drm-intel git tree to 2.6.32-rc4.
> 
From the dmesg log it seems that it can't get the EDID by using the different SDVO-DDC bus.(DDC1/DDC2/DDC3). I am not sure whether there is no EDID for the external monitor or there is no DDC bus in the DVI-D connector.

Will you please give the detailed info about the SDVO card? For example: the model info.

thanks.

Comment 23 Marius Orcsik 2009-10-16 03:11:03 UTC
Created attachment 30476 [details]
dmidecode for driver with sdvo patch and drm.debug=0x06
Comment 24 Markus Heinz 2009-10-16 14:37:52 UTC
(In reply to comment #22)
> From the dmesg log it seems that it can't get the EDID by using the different
> SDVO-DDC bus.(DDC1/DDC2/DDC3). I am not sure whether there is no EDID for the
> external monitor or there is no DDC bus in the DVI-D connector.
> 
> Will you please give the detailed info about the SDVO card? For example: the
> model info.

This is what Windows Vista identifies the SDVO card as:

*   SDVO Encoder Report   *

** Encoder 1 **
Vendor ID:	Conexant
Device ID:	148
Device Revision:	2
Major Version:	1
Minor Version:	1
Firmware Revision:	4.17.76

Comment 25 Markus Heinz 2009-10-20 11:52:41 UTC
Created attachment 30590 [details]
edid obtained with third party tool

I have tried tried the tools get-edid and parse-edid from http://www.polypux.org/projects/read-edid/

I have used version 1.4.2 of the package. This software managed to read the EDID from my Monitor successfully. I have attached the output of both programs and I can provide the EDID data in binary form too if it helps.
Comment 26 ykzhao 2009-10-21 22:37:03 UTC
Created attachment 30610 [details] [review]
try the debug patch which deletes the strict EDID check

Will you please try the debug patch and see whether the issue still exists?
Thanks.
Comment 27 Markus Heinz 2009-10-22 10:29:06 UTC
(In reply to comment #26)
> Created an attachment (id=30610) [details]
> try the debug patch which deletes the strict EDID check
> 
> Will you please try the debug patch and see whether the issue still exists?
> Thanks.
> 

I have tried booting a kernel from an updated drm-intel tree with the aforementioned patch applied and an unaltered xorg driver version release 2.9.0. 

The X server has started up and seems to function properly. But I cannot switch back to a text console with Ctrl-Alt-F1. The keyboard then switches to the text console, but I get the picture from the X-server nevertheless.

Comment 28 Markus Heinz 2009-10-22 12:23:21 UTC
(In reply to comment #27)
> 
> The X server has started up and seems to function properly. But I cannot switch
> back to a text console with Ctrl-Alt-F1. The keyboard then switches to the text
> console, but I get the picture from the X-server nevertheless.

After removing the vesa framebuffer module from the kernel configuration the aforementioned  issue has been resolved. But this has resulted in the next bug: All colors in the X display have been wrong. I was able to resolve this issue by applying the patch listed in http://lists.freedesktop.org/archives/intel-gfx/2009-October/004488.html too.

Conclusion: With the kernel patch and the xorg driver patch applied and a proper kernel configuration everything is fine.


Comment 29 ykzhao 2009-11-08 18:32:24 UTC
As the following commit is already shipped in 2.9.1 branch, this bug will be marked as resolved.

commit 8e4fc7d3ba0baa6b680c685429060cb62a08f89f
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Oct 26 04:40:51 2009 -0700

    Revert "Check whether the DVI-I/D is connected or disconnected based on EDID"

The issue in KMS version will be tracked in bug 23842.

Thanks.