Bug 22785 - Reports HDMI outputs incorrectly on ThinkPad X200s
Summary: Reports HDMI outputs incorrectly on ThinkPad X200s
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: 7.4 (2008.09)
Hardware: Other All
: medium normal
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-07-15 10:00 UTC by Ross Burton
Modified: 2010-07-16 03:40 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
vbios without dock (64.00 KB, application/octet-stream)
2009-07-16 00:34 UTC, Ross Burton
no flags Details
parse the child device array from VBT (4.60 KB, patch)
2009-07-20 02:45 UTC, ykzhao
no flags Details | Splinter Review
[patch 2/3]: use the child device to decide whether the given HDMI should be initialized (2.57 KB, patch)
2009-07-20 02:46 UTC, ykzhao
no flags Details | Splinter Review
[Patch 3/3]: use the child device to decide whether the given DP should be initialized (2.44 KB, patch)
2009-07-20 02:46 UTC, ykzhao
no flags Details | Splinter Review

Description Ross Burton 2009-07-15 10:00:42 UTC
intel 2.7.1

I have a Lenovo ThinkPad X200s and xrandr reports HDMI-1 and HDMI-2 outputs.  I'd love my laptop to have just one HDMI output but sadly it has none.

I presume this is just bad detection logic and a quirk is needed.  What numbers are required to do quirk matching?
Comment 1 Julien Cristau 2009-07-15 11:10:28 UTC
> I have a Lenovo ThinkPad X200s and xrandr reports HDMI-1 and HDMI-2 outputs. 

and it tells you that they're connected?
Comment 2 Ross Burton 2009-07-15 14:16:08 UTC
It has the sense to say that they are not connected, but they don't exist.
Comment 3 Gordon Jin 2009-07-15 18:42:00 UTC
please attach Xorg.0.log with ModeDebug enabled in xorg.conf.

It will also be interesting if you could try KMS enabled in a new kernel (like 2.6.30 or even 2.6.31-ish).
Comment 4 Michael Fu 2009-07-15 22:42:34 UTC
(In reply to comment #2)
> It has the sense to say that they are not connected, but they don't exist.
> 

but it might be when you use a dock... technically, these ports exist, but up to platform builder to choose how to export these to user.

As Julien said, as long as they shown as disconnected if you don't use them, that's fine..
Comment 5 Ross Burton 2009-07-15 23:06:44 UTC
The dock has VGA and DisplayPort outputs.  At best one of the HDMI outputs is bogus.  I understand that this is up to the system builder, but my X60's GPU insists it has TV out when it doesn't and there is a quirk for that.
Comment 6 ykzhao 2009-07-16 00:11:48 UTC
Will you please attach the output of VBIOS with/without the dock by using the following command?
    a. echo 1 > /sys/devices/pci0000:00/0000:00:02.0/rom
    b. cat /sys/devices/pci0000:00/0000:00:02.0/rom >vbios.bin
    c. echo 0 > /sys/devices/pci0000:00/0000:00:02.0/rom

Thanks.
Comment 7 Ross Burton 2009-07-16 00:34:38 UTC
Created attachment 27749 [details]
vbios without dock

This is the vbios without a dock.  I don't have a dock because, as far as I know, DisplayPort isn't yet supported.
Comment 8 Ross Burton 2009-07-16 00:35:15 UTC
Forgot to say that I think someone else in the office has a dock, I'll find out.
Comment 9 Michael Fu 2009-07-16 02:05:12 UTC
yakui will try if we could make this look better...
Comment 10 ykzhao 2009-07-20 02:45:25 UTC
Created attachment 27842 [details] [review]
parse the child device array from VBT
Comment 11 ykzhao 2009-07-20 02:46:06 UTC
Created attachment 27843 [details] [review]
[patch 2/3]: use the child device to decide whether the given HDMI should be initialized
Comment 12 ykzhao 2009-07-20 02:46:37 UTC
Created attachment 27844 [details] [review]
[Patch 3/3]: use the child device to decide whether the given DP should be initialized
Comment 13 ykzhao 2009-07-20 02:48:01 UTC
Will you please try the debug patch set on the latest drm-intel-next tree and see whether the issue still exists?
   
Note: the box should be booted with KMS enabled.

Thanks.
Comment 14 Jesse Barnes 2009-11-16 15:51:09 UTC
Yakui, any update on this patchset?  Sounds like Eric wanted a few changes along with support for LFP and TV detection... Can you post a new set with those two as additional patches?
Comment 15 ykzhao 2009-11-16 17:18:00 UTC
(In reply to comment #14)
> Yakui, any update on this patchset?  Sounds like Eric wanted a few changes
> along with support for LFP and TV detection... Can you post a new set with
> those two as additional patches?
> 
Thanks for the reminder. I will rework this patch set on the current Eric's din tree. The LFP and TV will also be included.

Thanks.

Comment 16 Alberto González 2009-11-19 04:31:53 UTC
I have a desktop with a G45 chipset and X4500 IGP. It has VGA and HDMI outputs, but the HDMI one is detected as DVI:

#xrandr -q
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
DVI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x
296mm
   1680x1050      60.0*+
   1280x1024      75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
DP1 disconnected (normal left inverted right x axis y axis)

The output works normally (maybe sound doesn't, don't know - I don't have a an HDMI monitor with integrated sound to test), but I'm having another bug with HDMI interrupts getting stuck and I'd like to test if it's related to this misdetection.

Is there any way to tell xorg that the output is in fact HDMI and not DVI? Some quirk that I can use to force it?

Let me know if you need any info. Thanks.
Comment 17 Ross Burton 2009-11-19 04:44:02 UTC
I've not managed to test the patch, but now that I'm running 2.6.31 I can shortly.

Without it I'm seeing this output from xrandr:

$ xrandr 
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
VGA1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1360x768       59.8  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
   1680x1050      60.0* 
LVDS1 connected (normal left inverted right x axis y axis)
   1440x900       50.0 +   59.9  
   1360x768       59.8  
   1152x864      100.0     85.1     85.0     75.0     75.0     70.0     60.0  
   1024x768       85.0     75.0     70.1     60.0  
   832x624        74.6  
   800x600        85.1     72.2     75.0     60.3     56.2  
   640x480        85.0     72.8     75.0     59.9  
   720x400        85.0  
   640x400        85.1  
   640x350        85.1  
DVI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
DVI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)

(VGA connected and active, LVDS off)
Comment 18 Alberto González 2009-11-20 06:23:10 UTC
I've tried this patches on top of current linus git (they didn't apply on top of .31, and I had to manually modify the first one for it to apply on current git) and they do work here:

$ xrandr -q
Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1


That is, they detect correctly the two outputs I have (before they detected the HDMI1 as DVI1, plus a DP1 that doesn't exist phisically).
Comment 19 ykzhao 2009-12-03 05:54:08 UTC
Thanks for the testing.
It seems that this issue can be fixed by following commit:
  >commit 6363ee6f496eb7e3b3f78dc105e522c7b496089b
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Nov 24 09:48:44 2009 +0800
 
    drm/i915: parse child device from VBT

  >commit fc816655236cd9da162356e96e74c7cfb0834d92
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Nov 24 09:48:45 2009 +0800
 
    drm/i915: Don't set up HDMI ports that aren't in the BIOS device table.

  >commit ae266c98f580a9ba5e0bfdb1d1f0f70ab3cd807f
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Tue Nov 24 09:48:46 2009 +0800
 
    drm/i915: Don't set up DP ports that aren't in the BIOS device table.

And the above commit is already shipped in Eric's drm-intel-next tree. So this bug will be marked as resolved.

Thanks.
Comment 20 Alberto González 2010-02-27 09:33:10 UTC
Hi Yakui,

When I tested this patchset it worked fine for me (as in comment #18 here), but now on 2.6.33 I again get detected a non-existing DP output:

VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm
x 296mm
   1680x1050      60.0*+
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
DP1 disconnected (normal left inverted right x axis y axis)

Any idea of why this is happening? If I had to bisect, I guess it should be drm-intel-next branch, right? Or did this patchset hit mainline as is at some point?
Comment 21 Alberto González 2010-02-28 16:11:11 UTC
Ok, so looking at the history I found that these commits were later reverted by commit 6207937d4feea000913e8ca23fe20c7744be7847:

author	Zhao Yakui <yakui.zhao@intel.com>

drm/i915: Don't use the child device parsed from VBT to setup HDMI/DP

On some boxes the BIOS will report different child device arrays when
the system is booted with/without the dock. In such case the HDMI/DP
port can't be setup correctly.  So revert two commits
(fc816655236cd9da162356e96e74c7cfb0834d92/
6e36595a2131e7ed5ee2674be54b2713ba7f0490) that use the child device
parsed from VBT to setup HDMI/DP.


So what's the solution then? And in any case, shouldn't this bug be reopened since the fix was reverted?
Comment 22 ykzhao 2010-03-02 21:41:42 UTC
(In reply to comment #21)
> Ok, so looking at the history I found that these commits were later reverted by
> commit 6207937d4feea000913e8ca23fe20c7744be7847:

Sorry for the late response. The corresponding patch is reverted as it causes some regression on some machines.

We are trying to find the corresponding solution. But now we haven't gotten the correct solution. 
In fact it won't affect the normal usage although it reports some non-existing HDMI/DP ports.

Yes. This bug should be reopened again.

>
 

Comment 23 Alberto González 2010-03-03 01:23:45 UTC
Thank you for looking at it. For me it is important because if that non existent DP output gets detected and initialized I get lots of interrupts on it (see bug #23183). If you need any info from me let me know.
Comment 24 Michael Fu 2010-03-03 01:25:33 UTC
bugzilla-daemon@freedesktop.org wrote:
> http://bugs.freedesktop.org/show_bug.cgi?id=22785
>
>
>
>
>
> --- Comment #23 from Alberto González <luis6674@yahoo.com>
> 2010-03-03 01:23:45 PST --- Thank you for looking at it. For me it is
> important because if that non existent DP output gets detected and
> initialized I get lots of interrupts on it (see bug #23183). If you
> need any info from me let me know.

getting detected doesn't mean there would be a lot of interrupt, if so, it's another bug we should fix....
Comment 25 Alberto González 2010-03-03 01:28:32 UTC
Yes, of course it shouldn't get interrupts. But Jesse Barnes tried many solutions and the only one that worked was to not initialize that output that doesn't exist. I hope some solution can be found. Thank you to both.
Comment 26 Jesse Barnes 2010-07-15 10:51:11 UTC
I think this is fixed now...  If not we'll need to resurrect the child device detection patches and make them work with more VBIOSes.
Comment 27 Alberto González 2010-07-15 10:58:19 UTC
(In reply to comment #26)
> I think this is fixed now...  If not we'll need to resurrect the child device
> detection patches and make them work with more VBIOSes.

Hi Jesse, I'd like to test it here because until this works for me I will still get the nasty effects of bug #23183 (for now I use the last patch on these series to fix my problem).

So what should I test? Linus' tree? Or something else?
Comment 28 Jesse Barnes 2010-07-15 11:42:34 UTC
On Thu, 15 Jul 2010 10:58:19 -0700 (PDT)
> > I think this is fixed now...  If not we'll need to resurrect the
> > child device detection patches and make them work with more VBIOSes.
> 
> Hi Jesse, I'd like to test it here because until this works for me I
> will still get the nasty effects of bug #23183 (for now I use the
> last patch on these series to fix my problem).
> 
> So what should I test? Linus' tree? Or something else?

Yeah, 2.6.35-rc should have the fix if anything does.
Comment 29 Alberto González 2010-07-16 03:40:32 UTC
> > So what should I test? Linus' tree? Or something else?
> 
> Yeah, 2.6.35-rc should have the fix if anything does.

I have tested 2.6.35-rc and a non-existent DP output still gets detected (patch 3/3 on this bug does fix it, but it causes major grief to other users).

However, and more important for me, is that even if that DP output gets detected and initialized I now don't get the interrupt storm anymore! I even tested with unpatched 2.6.34 and I also don't get the interrupts (when 2.6.34 was released I did get them, so I've been running it with patch 3/3 all this time).

So it seems that while not detecting and not initializing that DP output was a workaround for bug #23183, now the real bug has been fixed in another part of the stack (Intel driver? Out-of-kernel DRM code?) and so my real concern is gone now.

Thanks!


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.