Created attachment 72278 [details] dmesg Hi, KMS with radeon driver doesn't work properly using the svideo output connected to a CRT TV. See startup with and without KMS : http://aprovin.linux62.org/others/forums/kms/startup_with_kms.mp4 http://aprovin.linux62.org/others/forums/kms/startup_without_kms.mp4 I tested with 3.2, 3.1, 2.6.39, 2.6.32 kernels. The bug is present. Because of this bug, it's impossible to use a X session (color and resolution corrupted). I built a custom kernel (3.2.2) with debug flags enabled for radeon driver. See the dmesg. If you need others informations or I test a patch, I'll do it with pleasure. Regards, Aurélien PROVIN
My video card is an 'ATI Technologies Inc RV516 [Radeon X1300/X1550 Series]'
Created attachment 72279 [details] dmesg with drm.debug=5
Looks like the radeon driver uses NTSC output by default, can the TV handle that?
I don't know if this TV supports NTSC but it supports PAL and SECAM. Is it possible to force driver to use PAL by a kernel option or by a patch ?
xrandr --output S-video --set "tv standard" pal use xrandr --verbose to double check the output and attribute name for your board.
Created attachment 72458 [details] xrandr --verbose I tried to set pal with xrandr : http://aprovin.linux62.org/others/forums/kms/startup_xrandr_pal.mp4 01m09s -> to pal 01m21s -> to ntsc 01m27s -> to pal The display change when PAL is set but it's already unreadable and green ...
same problem on my system with VGA compatible controller: ATI Technologies Inc RV570 [Radeon X1950 Pro] (rev 9a)
I can confirm it's not a cable problem or a TV problem (Tested with Windows 7 on the same config : no problem)
Yes. With Windosw 7 and on linux without KMS all right.
Please grab radeonreg (http://cgit.freedesktop.org/~airlied/radeontool/) and dump the display registers with KMS and without KMS (as root). ./radeonreg regs avivo > working.regs and ./radeonreg regs avivo > broken.regs And attach the outputs here.
Created attachment 72484 [details] without kms
Created attachment 72485 [details] with kms
The only difference seems to be which crtc is driving the TV. Can you try booting with only the DVI port connected, and then connecting the TV later once your desktop is up with both KMS and UMS?
Well, I'll do it in the evening when I'll be home. Simply plug the TV or turn on the output and adjust the resolution?
Created attachment 72491 [details] rv570.kms.s-video-turn_off
Created attachment 72492 [details] rv570.kms.s-video-turn_on
Created attachment 72493 [details] rv570.ums.s-video-turn_off
Created attachment 72494 [details] rv570.ums.s-video-turn_on
Boot up without the TV attached to the video card, then when your desktop is up, use xrandr to turn on the TV connector and adjust the mode, etc. Does it work any better or worse in either case (UMS or KMS)? What exactly did you do to generate the files you attached?
> Boot up without the TV attached to the video card, then when your desktop is up, use xrandr to turn on the TV connector and adjust the mode, etc. Yes. I did exactly. I first boot the system with KMS. Plug the TV. Launched # ./radeonreg regs avivo > rv570.kms.turn_off Then set up S-video output in systemsetings (kde). Launched # ./radeonreg regs avivo > rv570.kms.turn_on In the same way rv570.ums.turn_off and rv570.ums.turn_on are created (UMS). With UMS all good. With KMS screen TV is striped.
Created attachment 72501 [details] possible fix Does this kernel patch help?
Unfortunately the patch did not help. Everything remains as before.
Please attach a copy of your video bios. (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
Created attachment 72505 [details] vbios.rom
What mode are you trying to use on the TV? Can you attach the output of xrandr --verbose with KMS?
Created attachment 72506 [details] testing patch Does this patch help?
No, did not help. :( $ xrandr --verbose Screen 0: minimum 320 x 200, current 2304 x 1024, maximum 8192 x 8192 DVI-0 connected 1280x1024+0+0 (0x54) normal (normal left inverted right x axis y axis) 337mm x 270mm Identifier: 0x51 Timestamp: 264987 Subpixel: horizontal rgb Gamma: 1.0:1.0:1.0 Brightness: 1.0 Clones: DVI-1 CRTC: 0 CRTCs: 0 1 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: EDID: 00ffffffffffff000469b4175b070000 2f0f010380221b962ac5c8a3574a9c23 12484cbfee0081800101010101010101 010101010101302a009851002a403070 1300510e1100001e000000fd003c4b1e 410b000a202020202020000000fc0041 53555320504d313754550a20000000ff 0035414c373030313838330a2020006f load detection: 1 (0x00000001) range: (0,1) underscan vborder: 0 (0x00000000) range: (0,128) underscan hborder: 0 (0x00000000) range: (0,128) underscan: off supported: off on auto coherent: 1 (0x00000001) range: (0,1) 1280x1024 (0x54) 108.0MHz +HSync +VSync *current +preferred h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 64.0KHz v: height 1024 start 1025 end 1028 total 1066 clock 60.0Hz 1024x768 (0x55) 78.8MHz +HSync +VSync h: width 1024 start 1040 end 1136 total 1312 skew 0 clock 60.1KHz v: height 768 start 769 end 772 total 800 clock 75.1Hz 1024x768 (0x56) 75.0MHz -HSync -VSync h: width 1024 start 1048 end 1184 total 1328 skew 0 clock 56.5KHz v: height 768 start 771 end 777 total 806 clock 70.1Hz 1024x768 (0x57) 65.0MHz -HSync -VSync h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.4KHz v: height 768 start 771 end 777 total 806 clock 60.0Hz 832x624 (0x58) 57.3MHz -HSync -VSync h: width 832 start 864 end 928 total 1152 skew 0 clock 49.7KHz v: height 624 start 625 end 628 total 667 clock 74.6Hz 800x600 (0x59) 50.0MHz +HSync +VSync h: width 800 start 856 end 976 total 1040 skew 0 clock 48.1KHz v: height 600 start 637 end 643 total 666 clock 72.2Hz 800x600 (0x5a) 49.5MHz +HSync +VSync h: width 800 start 816 end 896 total 1056 skew 0 clock 46.9KHz v: height 600 start 601 end 604 total 625 clock 75.0Hz 800x600 (0x5b) 40.0MHz +HSync +VSync h: width 800 start 840 end 968 total 1056 skew 0 clock 37.9KHz v: height 600 start 601 end 605 total 628 clock 60.3Hz 800x600 (0x5c) 36.0MHz +HSync +VSync h: width 800 start 824 end 896 total 1024 skew 0 clock 35.2KHz v: height 600 start 601 end 603 total 625 clock 56.2Hz 640x480 (0x5d) 31.5MHz -HSync -VSync h: width 640 start 664 end 704 total 832 skew 0 clock 37.9KHz v: height 480 start 489 end 491 total 520 clock 72.8Hz 640x480 (0x5e) 31.5MHz -HSync -VSync h: width 640 start 656 end 720 total 840 skew 0 clock 37.5KHz v: height 480 start 481 end 484 total 500 clock 75.0Hz 640x480 (0x5f) 30.2MHz -HSync -VSync h: width 640 start 704 end 768 total 864 skew 0 clock 35.0KHz v: height 480 start 483 end 486 total 525 clock 66.7Hz 640x480 (0x60) 25.2MHz -HSync -VSync h: width 640 start 656 end 752 total 800 skew 0 clock 31.5KHz v: height 480 start 490 end 492 total 525 clock 60.0Hz 720x400 (0x61) 28.3MHz -HSync +VSync h: width 720 start 738 end 846 total 900 skew 0 clock 31.5KHz v: height 400 start 412 end 414 total 449 clock 70.1Hz S-video connected 1024x768+1280+0 (0x177) normal (normal left inverted right x axis y axis) 0mm x 0mm Identifier: 0x52 Timestamp: 264987 Subpixel: no subpixels Gamma: 1.0:1.0:1.0 Brightness: 1.0 Clones: CRTC: 1 CRTCs: 0 1 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: tv standard: pal supported: ntsc pal pal-m pal-60 ntsc-j scart-pal pal-cn secam load detection: 1 (0x00000001) range: (0,1) 1024x768 (0x177) 63.5MHz -HSync +VSync *current h: width 1024 start 1072 end 1176 total 1328 skew 0 clock 47.8KHz v: height 768 start 771 end 775 total 798 clock 59.9Hz 800x600 (0x178) 38.2MHz -HSync +VSync h: width 800 start 832 end 912 total 1024 skew 0 clock 37.4KHz v: height 600 start 603 end 607 total 624 clock 59.9Hz 848x480 (0x179) 31.5MHz -HSync +VSync h: width 848 start 872 end 952 total 1056 skew 0 clock 29.8KHz v: height 480 start 483 end 493 total 500 clock 59.7Hz 720x480 (0x17a) 26.8MHz -HSync +VSync h: width 720 start 744 end 808 total 896 skew 0 clock 29.9KHz v: height 480 start 483 end 493 total 500 clock 59.7Hz 640x480 (0x17b) 23.8MHz -HSync +VSync h: width 640 start 664 end 720 total 800 skew 0 clock 29.7KHz v: height 480 start 483 end 487 total 500 clock 59.4Hz DVI-1 disconnected (normal left inverted right x axis y axis) Identifier: 0x53 Timestamp: 264987 Subpixel: horizontal rgb Clones: DVI-0 CRTCs: 0 1 Transform: 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 filter: load detection: 1 (0x00000001) range: (0,1) underscan vborder: 0 (0x00000000) range: (0,128) underscan hborder: 0 (0x00000000) range: (0,128) underscan: off supported: off on auto coherent: 1 (0x00000001) range: (0,1)
Can you attach the dmesg output with that patch applied?
For some reason the entire secondary display path is disabled (tv encoder, dac, crtc) with KMS on your system for some reason. I can't reproduce it here unfortunately. Does the following help? ./radeonreg regset 0x000004f4 0x80000062 ./radeonreg regset 0x00005e00 0x00000001 ./radeonreg regset 0x00006810 0x00000000 ./radeonreg regset 0x00006830 0x00000000 ./radeonreg regset 0x00006880 0x00010101 ./radeonreg regset 0x00006884 0x00000000 ./radeonreg regset 0x00007a00 0x00000001
Created attachment 72515 [details] dmesg
I run # ./radeonreg regset 0x000004f4 0x80000062 OLD: 0x000004f4 (04f4) 0x80000062 (-2147483550) NEW: 0x000004f4 (04f4) 0x80000062 (-2147483550) EGOROV radeontool # ./radeonreg regset 0x00005e00 0x00000001 OLD: 0x00005e00 (5e00) 0x00000001 (1) NEW: 0x00005e00 (5e00) 0x00000001 (1) EGOROV radeontool # ./radeonreg regset 0x00006810 0x00000000 OLD: 0x00006810 (6810) 0x00000000 (0) NEW: 0x00006810 (6810) 0x00000000 (0) EGOROV radeontool # ./radeonreg regset 0x00006830 0x00000000 OLD: 0x00006830 (6830) 0x00000000 (0) NEW: 0x00006830 (6830) 0x00000000 (0) EGOROV radeontool # ./radeonreg regset 0x00006880 0x00010101 OLD: 0x00006880 (6880) 0x00010101 (65793) NEW: 0x00006880 (6880) 0x00010101 (65793) EGOROV radeontool # ./radeonreg regset 0x00006884 0x00000000 OLD: 0x00006884 (6884) 0x00000000 (0) NEW: 0x00006884 (6884) 0x00000000 (0) EGOROV radeontool # ./radeonreg regset 0x00007a00 0x00000001 OLD: 0x00007a00 (7a00) 0x00000001 (1) NEW: 0x00007a00 (7a00) 0x00000001 (1) EGOROV radeontool # but everything remains as before
I'm back. I'm sorry for the delay... I started computer with only DVI connected with KMS enabled. -> xrandr --verbose (KMS-xrandr1-notv) I connected the S-video cable -> xrandr --verbose (KMS-xrandr2-tv-connected) -> ./radeonreg regs avivo (KMS-radeonreg-just-connected) -> xrandr --output S-video --auto -> xrandr --verbose (KMS-xrandr3-tv-activated) -> ./radeonreg regs avivo (KMS-radeonreg-connected-activated) I started computer with only DVI connected with KMS disabled. -> xrandr --verbose (UMS-xrandr1-notv) I connected the S-video cable -> xrandr --verbose (UMS-xrandr2-tv-connected) => TV not detected -> ./radeonreg regs avivo (UMS-radeonreg-just-connected) I also add ./radeonreg regs avivo without X session : kms-radeonreg-noX ums-radeonreg-noX There is no change with your patch : - dmesg (dmesg-patch-noX) - dmesg (dmesg-patch-withX) I also attach vbios.rom
Created attachment 72517 [details] KMS-radeonreg-connected-activated
Created attachment 72518 [details] KMS-radeonreg-just-connected
Created attachment 72519 [details] KMS-xrandr1-notv
Created attachment 72520 [details] KMS-xrandr2-tv-connected
Created attachment 72521 [details] KMS-xrandr3-tv-activated
Created attachment 72522 [details] UMS-radeonreg-just-connected
Created attachment 72524 [details] UMS-xrandr1-notv
Created attachment 72525 [details] UMS-xrandr2-tv-connected
Created attachment 72526 [details] dmesg-patch-noX
Created attachment 72527 [details] dmesg-patch-withX
Created attachment 72529 [details] kms-radeonreg-noX
Created attachment 72530 [details] ums-radeonreg-noX
Created attachment 72531 [details] vbios.rom
Alex, where can I read the description of the registers for the rv570?
See the documents linked from the bottom of this page: http://wiki.x.org/wiki/RadeonFeature See the M56 and rs690 pdfs.
Thanks.
Created attachment 73452 [details] working.regs Alex, I have news. Today I ran the system with the KMS enabled and then sent the computer into standby mode. After leaving the sleep mode on the TV image was fine. In the file contents of the registers. I hope this will help in solving the problem. Thank you.