Bug 32732 - [KMS] HDMI-0 connected, but shown as DVI-0
Summary: [KMS] HDMI-0 connected, but shown as DVI-0
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-29 13:02 UTC by Oldrich Jedlicka
Modified: 2011-01-04 14:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg output (272.61 KB, text/plain)
2010-12-29 13:02 UTC, Oldrich Jedlicka
no flags Details
Xorg.0.log (45.57 KB, text/plain)
2010-12-29 13:03 UTC, Oldrich Jedlicka
no flags Details
`xrandr --verbose` (9.94 KB, text/plain)
2010-12-29 13:03 UTC, Oldrich Jedlicka
no flags Details
ATI's VBIOS (ATI Mobility Radeon HD 3470, 256MB VRAM) (63.00 KB, application/octet-stream)
2010-12-29 23:34 UTC, Oldrich Jedlicka
no flags Details
revert hpd pin swap (1.86 KB, patch)
2011-01-03 09:47 UTC, Alex Deucher
no flags Details | Splinter Review
drop dvi (2.76 KB, patch)
2011-01-04 14:01 UTC, Alex Deucher
no flags Details | Splinter Review

Description Oldrich Jedlicka 2010-12-29 13:02:15 UTC
Created attachment 41509 [details]
dmesg output

I've tried to connect HDMI device to my system (Acer TravelMate 5730G), but it showed as DVI-0.

I have ATI Mobility Radeon HD 3470, xorg-server 1.9.2.902, kernel (git
drm-fixes), mesa (git master), libdrm (git master), xf86-video-ati
(git master).

I've connected TV Samsung UE46C6900.

dmesg output with drm.debug=7 attached. Also Xorg.0.log+xrandr.txt attached, but after restart.

I've had some problems with DVI-0 shown as HDMI-0 and both HDMI-0+DVI-0 (see bug #29387 and bug #25150), so maybe this is related.

The HDMI-0 is available on my notebook directly, the DVI-0 port is accessible only from Acer's port extender.
Comment 1 Oldrich Jedlicka 2010-12-29 13:03:09 UTC
Created attachment 41510 [details]
Xorg.0.log
Comment 2 Oldrich Jedlicka 2010-12-29 13:03:51 UTC
Created attachment 41511 [details]
`xrandr --verbose`
Comment 3 Alex Deucher 2010-12-29 19:36:59 UTC
Please attach a copy of your vbios.
(as root)
(use lspci to get the bus id)
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/vbios.rom
echo 0 > rom
Comment 4 Oldrich Jedlicka 2010-12-29 23:34:14 UTC
Created attachment 41514 [details]
ATI's VBIOS (ATI Mobility Radeon HD 3470, 256MB VRAM)  

The VBIOS was part of bug #21767, which mentions (and fixes) non-KMS problems with DVI/HDMI on my system too. Anyway, here it is.
Comment 5 Alex Deucher 2011-01-03 09:47:30 UTC
Created attachment 41594 [details] [review]
revert hpd pin swap

Does this patch help?  please test both DVI and HDMI if possible, to make sure both work as expected.
Comment 6 Alex Deucher 2011-01-03 09:59:42 UTC
If the patch doesn't help, please try the following using avivotool (http://cgit.freedesktop.org/~airlied/radeontool/) as root:

avivotool regmatch 0x7d08
avivotool regmatch 0x7d14
avivotool regmatch 0x7d20
avivotool regmatch 0x7d2c

and make sure bit 28 is set for each of them.

Then, plug a monitor into the hdmi port and run:

avivotool regmatch 0x7d00
avivotool regmatch 0x7d0c
avivotool regmatch 0x7d18
avivotool regmatch 0x7d24

then unplug it and and run the same commands again and see which, if any of them changed. bit 1 should change when you plug and unplug the monitor. Then repeat the same test for the DVI port and report back your findings.
Comment 7 Oldrich Jedlicka 2011-01-03 10:51:07 UTC
Strange things are happening.

With your patch, both DVI (monitor) and HDMI (Samsung TV) shows as HDMI (same state as reported in bug #29387). I will play with avivotool now.
Comment 8 Oldrich Jedlicka 2011-01-03 11:20:39 UTC
So here are the results.

I wasn't able to set the 24th bit, all values stayed at 0x00fa09c4 (original value). I've tried to run `avivotool regset 0x7d08 0x10fa09c4` (as one example).

Registers:

     0x7d00   0x7d0c   0x7d18   0x7d24

1. Nothing connected
   0x0..000 0x0..000 0x0..000 0x0..002

2. LCD (DVI-D) connected
   0x0..002 0x0..000 0x0..000 0x0..002

3. Samsung TV (HDMI) connected
   0x0..002 0x0..000 0x0..000 0x0..002

4. Both LCD+Samsung TV connected
   0x0..002 0x0..000 0x0..000 0x0..002

So DVI-D and HDMI share the same HPD.
Comment 9 Alex Deucher 2011-01-03 21:53:57 UTC
(In reply to comment #8)
> So DVI-D and HDMI share the same HPD.

So there's no way to tell which is connected.  I'm inclined to expose only one connector since they are wired up to the same encoder and hpd pin and you can't use them independently.
Comment 10 Oldrich Jedlicka 2011-01-04 12:38:17 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > So DVI-D and HDMI share the same HPD.
> 
> So there's no way to tell which is connected.  I'm inclined to expose only one
> connector since they are wired up to the same encoder and hpd pin and you
> can't use them independently.

Having always HDMI connected makes sense, but what about enabling/disabling the HDMI audio?

Cannot DDC/EDID for example offer a hint whether the HDMI/DVI is connected? Or can it be determined from audio HDMI functionality whether the HDMI is plugged-in? I'm just guessing :-)
Comment 11 Alex Deucher 2011-01-04 12:48:19 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > So DVI-D and HDMI share the same HPD.
> > 
> > So there's no way to tell which is connected.  I'm inclined to expose only one
> > connector since they are wired up to the same encoder and hpd pin and you
> > can't use them independently.
> 
> Having always HDMI connected makes sense, but what about enabling/disabling the
> HDMI audio?
> 
> Cannot DDC/EDID for example offer a hint whether the HDMI/DVI is connected? Or
> can it be determined from audio HDMI functionality whether the HDMI is
> plugged-in? I'm just guessing :-)

hdmi audio works over hdmi or dvi (on radeon cards) and whether or not the monitor supports audio is determined by the CEA extension blocks in the EDID.
Comment 12 Alex Deucher 2011-01-04 14:01:16 UTC
Created attachment 41648 [details] [review]
drop dvi

This patch should do the trick.
Comment 13 Oldrich Jedlicka 2011-01-04 14:31:04 UTC
(In reply to comment #12)
> Created an attachment (id=41648) [details]
> drop dvi
> 
> This patch should do the trick.

The patch works, HDMI audio too, `xrandr` doesn't show DVI-D anymore.

So it works for me. Big thanks!
Comment 14 Alex Deucher 2011-01-04 14:42:53 UTC
I've sent the patch to Dave.  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.