Bug 27649 - [R300 KMS] S-video output could not be enabled with "load detection"
Summary: [R300 KMS] S-video output could not be enabled with "load detection"
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.5 (2009.10)
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-04-14 13:55 UTC by Tomasz Czapiewski
Modified: 2010-04-21 22:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (84.31 KB, patch)
2010-04-14 13:55 UTC, Tomasz Czapiewski
no flags Details | Splinter Review
xorg.conf (4.01 KB, application/octet-stream)
2010-04-14 13:56 UTC, Tomasz Czapiewski
no flags Details
xrandr -q --verbose (2.57 KB, patch)
2010-04-14 13:58 UTC, Tomasz Czapiewski
no flags Details | Splinter Review
lspci -vvv (13.73 KB, application/octet-stream)
2010-04-14 13:58 UTC, Tomasz Czapiewski
no flags Details
Xorg.0.log (95.46 KB, patch)
2010-04-14 14:00 UTC, Tomasz Czapiewski
no flags Details | Splinter Review
dmesg after added and selected mode 800x600 on S-video (100.66 KB, application/octet-stream)
2010-04-14 14:15 UTC, Tomasz Czapiewski
no flags Details
fix (1.86 KB, patch)
2010-04-15 10:42 UTC, Alex Deucher
no flags Details | Splinter Review

Description Tomasz Czapiewski 2010-04-14 13:55:57 UTC
Created attachment 35034 [details] [review]
dmesg

I can't enable S-video output with KMS on RV350 card.
I've tried:
$ xrandr --output S-video --set "load detection" 1
$ xrandr --output S-video --set "tv standard" pal
$ xrandr --output S-video --same-as DVI-0
and
$ xrandr -s 2 # to enable video mode of 800x600
or
$ xrandr --output S-video --off
$ xrandr --output S-video --auto
but none of them helped (no errors on console).
I've got connected LCD monitor to DVI-0 and CRT TV to S-video and I've used this configuration (with different naming on UMS: load_detection and tv_standard) with UMS before (before upgrade from Kubuntu 9.10 to 10.04).

For clarify logs reading, I use two R3xx graphic cards (RV350 and RV370) for multiseat.
LCD 17" monitor (1280x1024) is connected to DVI-0 and 28" CRT TV (800x600) to S-video of RV350 (clone mode) and LCD TV 32" (1920x1080) is connected to DVI-0 with DVI-HDMI cable to RV370 (second head on second X-server).
Comment 1 Tomasz Czapiewski 2010-04-14 13:56:48 UTC
Created attachment 35035 [details]
xorg.conf
Comment 2 Alex Deucher 2010-04-14 13:57:55 UTC
please attach your xorg log and the output of xrandr.
Comment 3 Tomasz Czapiewski 2010-04-14 13:58:17 UTC
Created attachment 35037 [details] [review]
xrandr -q --verbose
Comment 4 Tomasz Czapiewski 2010-04-14 13:58:55 UTC
Created attachment 35038 [details]
lspci -vvv
Comment 5 Tomasz Czapiewski 2010-04-14 14:00:15 UTC
Created attachment 35039 [details] [review]
Xorg.0.log
Comment 6 Alex Deucher 2010-04-14 14:01:52 UTC
xrandr --output S-video --set "tv standard" pal
xrandr --output S-video --addmode 800x600
xrandr --output S-video --mode 800x600

should enable the S-video port.
Comment 7 Tomasz Czapiewski 2010-04-14 14:05:58 UTC
distribution: Kubuntu 10.04 (post beta2 up-to-date)
xserver-xorg-video-radeon: 6.13.0
xserver-xorg: 7.5
xserver-xorg-core: 1.7.6
kernel: 2.6.32-20-generic
Comment 8 Tomasz Czapiewski 2010-04-14 14:15:07 UTC
Created attachment 35041 [details]
dmesg after added and selected mode 800x600 on S-video

Those commands:
$ xrandr --output S-video --set "tv standard" pal
$ xrandr --addmode S-video 800x600
$ xrandr --output S-video --mode 800x600
added video mode of 800x600 to S-video port but even then S-video could not be enabled as shown in dmesg (attachment).
$ xrandr
Screen 0: minimum 320 x 200, current 800 x 600, maximum 4096 x 4096
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 800x600+0+0 (normal left inverted right x axis y axis) 330mm x 270mm
   1280x1024      60.0 +
   1024x768       60.0  
   800x600        60.3* 
   640x480        60.0     59.9  
S-video disconnected 800x600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   800x600        60.3*
Comment 9 Tomasz Czapiewski 2010-04-14 14:33:53 UTC
Might those logs in dmesg come from second graphic card? (RV370):

[18814.237220] [drm] 2: conflicting encoders switching off SVIDEO-1
[18814.237224] [drm] in favor of DVI-I-1

This card (on display :1) does not have S-video port:
$ xrandr -display :1 -q
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 4096 x 4096
VGA-1 disconnected (normal left inverted right x axis y axis)
DVI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
   1920x1080      50.0*+   60.0  
   1280x1024      75.0     60.0  
   1360x765       59.8  
   1280x720       50.0  
   1024x768       75.1     70.1     60.0  
   800x600        72.2     75.0     60.3  
   720x576        50.0  
   720x480        59.9  
   640x480        72.8     75.0     60.0  

but my primary RV350 (with logs attached before) on display :0 has it.

Does "S-video disconnected 800x600+0+0" really mean that it's disconnected by the driver or it's unimportant?
I've got problems with enabling S-video output before on UMS but there were related rather to choosing TV standard or something else, but not load detection (it said "connected" after --set load_detection 1 on UMS).
I mean if should I try to mix those commands in script many times (as before I've did on UMS) to see anything on TV even if xrandr shows "disconnected" or it doesn't make sense? ;-)
Comment 10 Alex Deucher 2010-04-15 08:18:29 UTC
this looks like a drm bug in the connector code.
Comment 11 Tomasz Czapiewski 2010-04-15 09:06:40 UTC
Should I give you more verbose/debug information? How to do it? Any kernel boot parameter?
Comment 12 Alex Deucher 2010-04-15 09:32:13 UTC
(In reply to comment #11)
> Should I give you more verbose/debug information? How to do it? Any kernel boot
> parameter?

It just need to be debugged and fixed.  I'll take a look today.
Comment 13 Alex Deucher 2010-04-15 10:42:10 UTC
Created attachment 35067 [details] [review]
fix

This drm patch fixes the issue.  I've sent it upstream to Dave.
Comment 14 Tomasz Czapiewski 2010-04-15 11:39:37 UTC
Thank you very much for this very quick fixing this issue. I'll try to test it ASAP (somehow).
Comment 15 Tomasz Czapiewski 2010-04-18 15:39:20 UTC
Sorry for so late testing. Since I've get information that no more patches will be applied to Ubuntu Lucid until kernel update after release, I've just recompiled stock Ubuntu 2.6.32-21-generic (2.6.32.11+drm33.2) kernel with this patch and now S-video is connected out of the box (no need to set "load detection") and my both screens resolution was set to 800x600 by default (I could change my LCD resolution to it's native later). Thanks a lot for this fix.

Unfortunately I thought that my other problems will disappear with new driver, too, but they don't...
I mean problems with "tv standard" change/enable - I still need to make a loop of xrandr commands:
$ for i in `seq 1000`; do xrandr --output S-video --set "tv standard" pal; xrandr --output S-video --set "tv standard" ntsc; done
until I get proper video on S-video (the same was on Karmic or even earlier distributions (I'm not 100% sure about which earlier versions)).
I've done more testing and when I run this loop I've got video after few seconds in NTSC (I'm interrupting script after I get video and try to change to PAL or NTSC to see what standard I have enabled) and later I've managed to try if I can get PAL after more time running script. After few minutes later I've got PAL, but NTSC was unavailable then. [I've wrote on this issue in Kubuntu Karmic some time ago at Phoronix forums]
Should I write a new bug report for it?
Comment 16 Alex Deucher 2010-04-21 22:31:24 UTC
(In reply to comment #15)

> Should I write a new bug report for it?

Yes.


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.