RFC: Porting radeonhds HDMI support to KMS
Hi everybody, since i didn't got so much todo in the last week than i thought i would, i finally sit down and ported the HDMI support for R600 and up chipsets from radeonhd to KMS. So the attached patch is based on Dave Airlies drm-next tree (http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=d...). It's been a while since i last coded inside kernel space and the patch is not very well tested, so there are quite a bunch of "TODO"s inside the code, but at least it's a starting point and seems to work fine with the radeon driver+KMS. So any comments or test results would be very welcome. Bye, Christian.
2009/9/27 Christian König
since i didn't got so much todo in the last week than i thought i would, i finally sit down and ported the HDMI support for R600 and up chipsets from radeonhd to KMS.
So the attached patch is based on Dave Airlies drm-next tree (http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=d...).
It's been a while since i last coded inside kernel space and the patch is not very well tested, so there are quite a bunch of "TODO"s inside the code, but at least it's a starting point and seems to work fine with the radeon driver+KMS.
So any comments or test results would be very welcome.
It doesn't work for me, and sorry but I'm too dumb to fix that :( Playback speed in mplayer is alright, but my AV doesn't get any audio signal. --- kms.playing.broken.dump.log 2009-09-28 16:06:00.000000000 +0200 +++ radeonhd.playing.dump.log 2009-09-28 14:21:51.000000000 +0200 @@ -5,8 +5,8 @@ 0x0518: 0x00E297D0 0x051C: 0x00000000 0x0520: 0x00000070 -0x0524: 0x00249F00 -0x0528: 0x008719F0 +0x0524: 0x00000000 +0x0528: 0x00000000 0x052C: 0x00000000 0x0530: 0x00000070 0x0534: 0x00000000 @@ -24,7 +24,7 @@ 0x7388: 0x00010001 0x738C: 0x00020002 0x7390: 0x00000001 -0x7394: 0x00020070 +0x7394: 0x00060040 0x7398: 0x00000001 0x739C: 0x00000009 0x73A0: 0x00000201 It seems KMS set also second pair of registers, probably for my LVDS (PANEL). No reason for that, but shouldn't hurt, right? I don't know meaning of R600_AUDIO_SUPPORTED_SIZE_RATE (0x7394) is this something important? I've tried rhd_dump -w 0524: 0x00000000 1:00.0 rhd_dump -w 0528: 0x00000000 1:00.0 rhd_dump -w 7394: 0x00060040 1:00.0 but it didn't help. It reminds me RV770 issue from radeonhd, where we don't get working audio. All registers are 100% alright, but no sound. Maybe order of setting registers matters? Do we set registers in different order than radeonhd does? Please, check attached log files. In both cases I've started playback *just once*. In case of radeonhd there is one RHDHdmiUpdateAudioSettings operation. However KMS prints 4*playing messages. -- Rafał
W dniu 28 września 2009 16:28 użytkownik Rafał Miłecki
It doesn't work for me, and sorry but I'm too dumb to fix that :(
Playback speed in mplayer is alright, but my AV doesn't get any audio signal.
Just to make it sure: I don't need to set any magic options, do I? audio param seems to be enabled by default, plus it seems to be respected as registers are being set and mplayer playback speed is correct. Also, my GPU is M82==RV620. -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
Am Montag, den 28.09.2009, 16:28 +0200 schrieb Rafał Miłecki:
It doesn't work for me, and sorry but I'm too dumb to fix that :(
Playback speed in mplayer is alright, but my AV doesn't get any audio signal.
It seems KMS set also second pair of registers, probably for my LVDS (PANEL). No reason for that, but shouldn't hurt, right? As long as register 0x0534 isn't changed that shouldn't hurt bit.
I don't know meaning of R600_AUDIO_SUPPORTED_SIZE_RATE (0x7394) is this something important? No, that register only tells alsa which sampling rates and bits per sample are supported. As long as you don't want to use 24bit audio or sampling rates other than 48000 Hz we don't need to change a bit.
It reminds me RV770 issue from radeonhd, where we don't get working audio. All registers are 100% alright, but no sound. Your script is missing something, the 0x7400, 0x7700 and 0x7800 are only bases. Try comparing the whole 0x7400-0x74ff, 0x7700-0x77ff and 0x7800-0x78ff ranges.
For the RV770 i have the strong feeling that ATI have started to double buffer the HDMI registers, and there is a bit somewhere that tells the hardware to start using the new values on the next vertical or horizontal retrace.
Maybe order of setting registers matters? Do we set registers in different order than radeonhd does? There are registers in the 0x7304-0x7340 range that can deadlock the audio codec if not written in the right order (i think they are for interrupt and dma control), but i really avoid touching those, the bios sets them up on boot pretty fine.
Please, check attached log files. In both cases I've started playback *just once*. In case of radeonhd there is one RHDHdmiUpdateAudioSettings operation. However KMS prints 4*playing messages. Yeah that's another point that could go wrong. At the moment i enable hdmi on any digital interface i can find, even if it's an LVDS, the worst thing that could happen is that you don't get a picture on your panel.
Bye, Christian. -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
I'm still getting a black screen and a total lock up at the keyboard when X is started with DRI enabled. Card works fine with xf86-video-ati driver. Once again, I attach my Xorg.0.log. greetings, Dariem This is a pre-release version of the X server from The X.Org Foundation. It is not supported in any way. Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/. Select the "xorg" product for bugs you find in this release. Before reporting bugs in pre-release versions please check the latest version in the X.Org Foundation git repository. See http://wiki.x.org/wiki/GitPage for git access instructions. X.Org X Server 1.6.3.901 (1.6.4 RC 1) Release Date: 2009-8-25 X Protocol Version 11, Revision 0 Build Operating System: Linux 2.6.31 i686 Current Operating System: Linux dariem-pc 2.6.31 #1 SMP PREEMPT Wed Sep 30 17:19:47 CDT 2009 i686 Build Date: 30 September 2009 07:18:19PM Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Wed Sep 30 22:41:38 2009 (==) Using config file: "/etc/X11/xorg.conf" (==) No Layout section. Using the first Screen section. (==) No screen section available. Using defaults. (**) |-->Screen "Default Screen Section" (0) (**) | |-->Monitor "<default monitor>" (==) No device specified for screen "Default Screen Section". Using the first device section listed. (**) | |-->Device "Card0" (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. (==) Automatically adding devices (==) Automatically enabling devices (==) FontPath set to: /usr/share/fonts/misc/, /usr/share/fonts/TTF/, /usr/share/fonts/OTF, /usr/share/fonts/Type1/, /usr/share/fonts/100dpi/, /usr/share/fonts/75dpi/ (==) ModulePath set to "/usr/lib/xorg/modules" (II) Cannot locate a core pointer device. (II) Cannot locate a core keyboard device. (II) The server relies on HAL to provide the list of input devices. If no devices become available, reconfigure HAL or disable AllowEmptyInput. (II) Loader magic: 0x1ebc (II) Module ABI versions: X.Org ANSI C Emulation: 0.4 X.Org Video Driver: 5.0 X.Org XInput driver : 4.0 X.Org Server Extension : 2.0 (II) Loader running on linux (++) using VT number 7 (--) PCI:*(0:1:5:0) 1002:7942:144d:c036 ATI Technologies Inc Radeon Xpress 1250 rev 0, Mem @ 0xd8000000/134217728, 0xd0100000/65536, I/O @ 0x00009000/256 (II) Open ACPI successful (/var/run/acpid.socket) (II) System resource ranges: [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B] [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [5] -1 0 0x00000000 - 0x00000000 (0x1) IX[B] (II) LoadModule: "extmod" (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so (II) Module extmod: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.0.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 2.0 (II) Loading extension MIT-SCREEN-SAVER (II) Loading extension XFree86-VidModeExtension (II) Loading extension XFree86-DGA (II) Loading extension DPMS (II) Loading extension XVideo (II) Loading extension XVideo-MotionCompensation (II) Loading extension X-Resource (II) LoadModule: "dbe" (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so (II) Module dbe: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.0.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 2.0 (II) Loading extension DOUBLE-BUFFER (II) LoadModule: "glx" (II) Loading /usr/lib/xorg/modules/extensions//libglx.so (II) Module glx: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.0.0 ABI class: X.Org Server Extension, version 2.0 (==) AIGLX enabled (II) Loading extension GLX (II) LoadModule: "record" (II) Loading /usr/lib/xorg/modules/extensions//librecord.so (II) Module record: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.13.0 Module class: X.Org Server Extension ABI class: X.Org Server Extension, version 2.0 (II) Loading extension RECORD (II) LoadModule: "dri" (II) Loading /usr/lib/xorg/modules/extensions//libdri.so (II) Module dri: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.0.0 ABI class: X.Org Server Extension, version 2.0 (II) Loading extension XFree86-DRI (II) LoadModule: "dri2" (II) Loading /usr/lib/xorg/modules/extensions//libdri2.so (II) Module dri2: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.1.0 ABI class: X.Org Server Extension, version 2.0 (II) Loading extension DRI2 (II) LoadModule: "radeonhd" (II) Loading /usr/lib/xorg/modules/drivers//radeonhd_drv.so (II) Module radeonhd: vendor="AMD GPG" compiled for 1.6.3.901, module version = 1.2.5 Module class: X.Org Video Driver ABI class: X.Org Video Driver, version 5.0 (II) RADEONHD: X driver for the following AMD GPG (ATI) graphics devices: RV505 : Radeon X1550, X1550 64bit. RV515 : Radeon X1300, X1550, X1600; FireGL V3300, V3350. RV516 : Radeon X1300, X1550, X1550 64-bit, X1600; FireMV 2250. R520 : Radeon X1800; FireGL V5300, V7200, V7300, V7350. RV530 : Radeon X1300 XT, X1600, X1600 Pro, X1650; FireGL V3400, V5200. RV535 : Radeon X1300, X1650. RV550 : Radeon X2300 HD. RV560 : Radeon X1650. RV570 : Radeon X1950, X1950 GT; FireGL V7400. R580 : Radeon X1900, X1950; AMD Stream Processor. R600 : Radeon HD 2900 GT/Pro/XT; FireGL V7600/V8600/V8650. RV610 : Radeon HD 2350, HD 2400 Pro/XT, HD 2400 Pro AGP; FireGL V4000. RV620 : Radeon HD 3450, HD 3470. RV630 : Radeon HD 2600 LE/Pro/XT, HD 2600 Pro/XT AGP; Gemini RV630; FireGL V3600/V5600. RV635 : Radeon HD 3650, HD 3670. RV670 : Radeon HD 3690, 3850, HD 3870, FireGL V7700, FireStream 9170. R680 : Radeon HD 3870 X2. M52 : Mobility Radeon X1300. M54 : Mobility Radeon X1400; M54-GL. M56 : Mobility Radeon X1600; Mobility FireGL V5200. M58 : Mobility Radeon X1800, X1800 XT; Mobility FireGL V7100, V7200. M62 : Mobility Radeon X1350. M64 : Mobility Radeon X1450, X2300. M66 : Mobility Radeon X1700, X1700 XT; FireGL V5250. M68 : Mobility Radeon X1900. M71 : Mobility Radeon HD 2300. M72 : Mobility Radeon HD 2400; Radeon E2400. M74 : Mobility Radeon HD 2400 XT. M76 : Mobility Radeon HD 2600; (Gemini ATI) Mobility Radeon HD 2600 XT. M82 : Mobility Radeon HD 3400. M86 : Mobility Radeon HD 3650, HD 3670, Mobility FireGL V5700. M88 : Mobility Radeon HD 3850, HD 3850 X2, HD 3870, HD3870 X2. RS600 : Radeon Xpress 1200, Xpress 1250. RS690 : Radeon X1200, X1250, X1270. RS740 : RS740, RS740M. RS780 : Radeon HD 3100/3200/3300 Series. R700 : Radeon R700. RV710 : Radeon HD4570, HD4350. RV730 : Radeon HD4670, HD4650. RV740 : Radeon HD4770. EXPERIMENTAL AND UNTESTED. RV770 : Radeon HD 4800 Series; Everest, K2, Denali ATI FirePro. RV790 : Radeon HD 4890. M92 : Mobility Radeon HD4330, HD4530, HD4570. EXPERIMENTAL. M93 : Mobility Radeon M93. EXPERIMENTAL AND UNTESTED. M96 : Mobility Radeon HD4600. M97 : Mobility Radeon HD4860. EXPERIMENTAL AND UNTESTED. M98 : Mobility Radeon HD4850, HD4870. (II) RADEONHD: version 1.2.5, built from git branch branch-master, commit be7216fc (II) Primary Device is: PCI 01@00:05:0 (II) resource ranges after xf86ClaimFixedResources() call: [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B] [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [5] -1 0 0x00000000 - 0x00000000 (0x1) IX[B] (II) resource ranges after probing: [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B] [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B] [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B] [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B] [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[B] [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B] [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[B] (II) Setting vga for screen 0. (II) RADEONHD(0): Creating default Display subsection in Screen section "Default Screen Section" for depth/fbbpp 24/32 (==) RADEONHD(0): Depth 24, (--) framebuffer bpp 32 (**) RADEONHD(0): Option "accel" "true" (**) RADEONHD(0): Option "AccelMethod" "EXA" (**) RADEONHD(0): Option "DRI" "true" (**) RADEONHD(0): Selected EXA 2D acceleration. (II) RADEONHD(0): Card not in database: 0x7942:0x144D:0xC036; using generic modesetting. If - and only if - your card does not work or does not work optimally please contact radeonhd@opensuse.org to help rectify this. Use the subject: 0x7942:0x144D:0xC036: <name of board> and *please* describe the problems you are seeing in your message. (--) RADEONHD(0): Detected an RS600 on an unidentified card (II) RADEONHD(0): Mapped IO @ 0xd0100000 to 0xb78d4000 (size 0x00010000) (II) RADEONHD(0): Getting BIOS copy from legacy VBIOS location (II) RADEONHD(0): ATOM BIOS Rom: SubsystemVendorID: 0x144d SubsystemID: 0xc036 IOBaseAddress: 0x9000 Filename: Br22542F.bin BIOS Bootup Message: ATI Radeon Xpress 1250 for Samsung/Firenze2 (II) RADEONHD(0): Analog TV Default Mode: 1 (II) RADEONHD(0): Found default TV Mode NTSC (--) RADEONHD(0): VideoRAM: 131072 kByte (II) RADEONHD(0): Framebuffer space used by Firmware (kb): 20 (II) RADEONHD(0): Start of VRAM area used by Firmware: 0x7ffb000 (II) RADEONHD(0): AtomBIOS requests 20kB of VRAM scratch space (II) RADEONHD(0): AtomBIOS VRAM scratch base: 0x7ffb000 (II) RADEONHD(0): Default Engine Clock: 500000 (II) RADEONHD(0): Default Memory Clock: 333000 (II) RADEONHD(0): Maximum Pixel ClockPLL Frequency Output: 1200000 (II) RADEONHD(0): Minimum Pixel ClockPLL Frequency Output: 0 (II) RADEONHD(0): Maximum Pixel ClockPLL Frequency Input: 13500 (II) RADEONHD(0): Minimum Pixel ClockPLL Frequency Input: 1000 (II) RADEONHD(0): Maximum Pixel Clock: 400000 (II) RADEONHD(0): Reference Clock: 14320 (II) RADEONHD(0): Found libdri 5.4.0. drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 8, (OK) drmOpenByBusid: Searching for BusID pci:0000:01:05.0 drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 8, (OK) drmOpenByBusid: drmOpenMinor returns 8 drmOpenByBusid: drmGetBusid reports pci:0000:01:05.0 (II) RADEONHD(0): Found libdrm 1.3.0. (II) RADEONHD(0): Found radeon drm 1.31.0. (II) Loading sub module "i2c" (II) LoadModule: "i2c" (II) Module "i2c" already built-in (II) RADEONHD(0): Default Engine Clock: 500000 (II) RADEONHD(0): GPIO_I2C_Clk_Mask: 0x1f90 (II) RADEONHD(0): GPIO_I2C_Clk_Mask_Shift: 0x0 (II) RADEONHD(0): GPIO_I2C_Data_Mask: 0x1f90 (II) RADEONHD(0): GPIO_I2C_Data_Mask_Shift: 0x8 (II) RADEONHD(0): I2C bus "RHD I2C line 0" initialized. (II) RADEONHD(0): GPIO_I2C_Clk_Mask: 0x1f90 (II) RADEONHD(0): GPIO_I2C_Clk_Mask_Shift: 0x0 (II) RADEONHD(0): GPIO_I2C_Data_Mask: 0x1f94 (II) RADEONHD(0): GPIO_I2C_Data_Mask_Shift: 0x8 (II) RADEONHD(0): I2C bus "RHD I2C line 1" initialized. (II) RADEONHD(0): GPIO_I2C_Clk_Mask: 0x1f90 (II) RADEONHD(0): GPIO_I2C_Clk_Mask_Shift: 0x0 (II) RADEONHD(0): GPIO_I2C_Data_Mask: 0x1f98 (II) RADEONHD(0): GPIO_I2C_Data_Mask_Shift: 0x8 (II) RADEONHD(0): I2C bus "RHD I2C line 2" initialized. (II) RADEONHD(0): GPIO_I2C_Clk_Mask: 0x1f90 (II) RADEONHD(0): GPIO_I2C_Clk_Mask_Shift: 0x0 (II) RADEONHD(0): GPIO_I2C_Data_Mask: 0x1f98 (II) RADEONHD(0): GPIO_I2C_Data_Mask_Shift: 0x8 (II) RADEONHD(0): I2C bus "RHD I2C line 3" initialized. (II) Loading sub module "ddc" (II) LoadModule: "ddc" (II) Module "ddc" already built-in (II) RADEONHD(0): Detected VGA mode. (II) RADEONHD(0): Minimum Pixel ClockPLL Frequency Output: 0 (II) RADEONHD(0): Maximum Pixel ClockPLL Frequency Output: 1200000 (II) RADEONHD(0): Maximum Pixel Clock: 400000 (II) RADEONHD(0): Reference Clock: 14320 (II) RADEONHD(0): FB: Allocated Cursor Image at offset 0x00000000 (size = 0x00004000) (II) RADEONHD(0): FB: Allocated Cursor Image at offset 0x00004000 (size = 0x00004000) (II) RADEONHD(0): FirmwareInfo Revision 0104 (II) RADEONHD(0): Unused attribute: ul3DAccelerationEngineClock 0 (II) RADEONHD(0): Unused attribute: ulDriverTargetEngineClock 0 (II) RADEONHD(0): Unused attribute: ulDriverTargetMemoryClock 0 (II) RADEONHD(0): Unused attribute: ucASICMaxTemperature 0 (II) RADEONHD(0): Scary bits: Estimated MinEngineClock 250000 kHz (II) RADEONHD(0): Scary bits: Estimated MinMemoryClock 250000 kHz (II) RADEONHD(0): Default Engine Clock: 500000 (II) RADEONHD(0): Default Memory Clock: 333000 (II) RADEONHD(0): Current Engine Clock: 250600 (WW) RADEONHD(0): AtomBIOS command table 47 does not exist (II) RADEONHD(0): Query for AtomBIOS Exec: not implemented (WW) RADEONHD(0): Unusupported SetVoltage Revision (II) RADEONHD(0): Power Management: used engine clock / memory clock / core (VDDC) voltage (0: ignore) (II) RADEONHD(0): Power Management: Raw Ranges (II) RADEONHD(0): Minimum 250000 kHz / 250000 kHz / 0.000 V (II) RADEONHD(0): Maximum 0 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Default 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): PowerPlayInfo Revision 0000 (EE) RADEONHD(0): Unusupported PowerPlayInfo Revision (II) RADEONHD(0): Query for Get Chip Configs: not implemented (EE) RADEONHD(0): Power Management: Cannot get known good chip configurations (II) RADEONHD(0): Power Management: Validated Ranges (II) RADEONHD(0): Minimum 250000 kHz / 250000 kHz / 0.000 V (II) RADEONHD(0): Maximum 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Default 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Power Management: Final Levels (II) RADEONHD(0): Off 250000 kHz / 250000 kHz / 0.000 V (II) RADEONHD(0): Idle 250000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Slow2D 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Fast2D 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Slow3D 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Fast3D 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Max3D 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): User 500000 kHz / 333000 kHz / 0.000 V (II) RADEONHD(0): Connector[0] {RHD_CONNECTOR_VGA, "VGA CRT1", RHD_DDC_0, RHD_HPD_NONE, { RHD_OUTPUT_DACA, RHD_OUTPUT_NONE } } (II) RADEONHD(0): Connector[1] {RHD_CONNECTOR_PANEL, "PANEL LCD1", RHD_DDC_1, RHD_HPD_NONE, { RHD_OUTPUT_LVTMA, RHD_OUTPUT_NONE } } (II) RADEONHD(0): Connector[2] {RHD_CONNECTOR_TV, "SVIDEO TV1", RHD_DDC_NONE, RHD_HPD_NONE, { RHD_OUTPUT_DACA, RHD_OUTPUT_NONE } } (--) RADEONHD(0): Attaching Output DAC A to Connector VGA 1 (II) RADEONHD(0): LVDS SEQ Dig onto DE: 30 (II) RADEONHD(0): LVDS SEQ DE to BL: 360 (II) RADEONHD(0): LVDS Off Delay: 500 (II) RADEONHD(0): LVDS Duallink: 0x0 (II) RADEONHD(0): LVDS 24Bit: 0x0 (II) RADEONHD(0): LVDS FPDI: 0x0 (II) RADEONHD(0): LVDS Temporal Dither : 0x1 (II) RADEONHD(0): LVDS Spatial Dither : 0x0 (II) RADEONHD(0): LVDS Grey Level: 0x3 (II) RADEONHD(0): AtomBIOS returned 3 Grey Levels (--) RADEONHD(0): Detected a 18bit single link panel. (--) RADEONHD(0): Attaching Output LVDS to Connector PANEL (--) RADEONHD(0): Attaching Output DAC A to Connector TV SVIDEO (II) RADEONHD(0): RandR: Adding RRoutput VGA_1 for Output DAC A (II) RADEONHD(0): RandR: Adding RRoutput PANEL for Output LVDS (II) RADEONHD(0): RandR: Adding RRoutput TV_SVIDEO for Output DAC A (II) RADEONHD(0): Output VGA_1 has no monitor section (II) RADEONHD(0): Output VGA_1 has no monitor section (II) RADEONHD(0): Output PANEL has no monitor section (II) RADEONHD(0): Output TV_SVIDEO has no monitor section (II) RADEONHD(0): I2C device "RHD I2C line 1:E-EDID segment register" registered at address 0x60. (II) RADEONHD(0): I2C device "RHD I2C line 1:ddc2" registered at address 0xA0. (II) RADEONHD(0): Query for AtomBIOS Get Panel EDID: failed (II) RADEONHD(0): Found native mode: Modeline "1280x800" 68.90 1280 1301 1333 1408 800 804 808 816 (WW) RADEONHD(0): No monitor size info, assuming 96dpi. (II) RADEONHD(0): Output VGA_1 disconnected (II) RADEONHD(0): Output PANEL connected (II) RADEONHD(0): Output TV_SVIDEO disconnected (II) RADEONHD(0): Using exact sizes for initial modes (II) RADEONHD(0): Output PANEL using initial mode 1280x800 (II) RADEONHD(0): RandR 1.2 support enabled (==) RADEONHD(0): RGB weight 888 (==) RADEONHD(0): Default visual is TrueColor (==) RADEONHD(0): Using gamma correction (1.0, 1.0, 1.0) (II) RADEONHD(0): Using 3840x1920 Framebuffer with 3840 pitch (II) RADEONHD(0): FB: Allocated ScanoutBuffer at offset 0x00008000 (size = 0x01C20000) (==) RADEONHD(0): DPI set to (96, 96) (II) Loading sub module "fb" (II) LoadModule: "fb" (II) Loading /usr/lib/xorg/modules//libfb.so (II) Module fb: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 1.0.0 ABI class: X.Org ANSI C Emulation, version 0.4 (II) Loading sub module "ramdac" (II) LoadModule: "ramdac" (II) Module "ramdac" already built-in (II) Loading sub module "exa" (II) LoadModule: "exa" (II) Loading /usr/lib/xorg/modules//libexa.so (II) Module exa: vendor="X.Org Foundation" compiled for 1.6.3.901, module version = 2.4.0 ABI class: X.Org Video Driver, version 5.0 (II) RADEONHD(0): FB: Allocated Offscreen Buffer at offset 0x01C28000 (size = 0x00CCA000) (II) RADEONHD(0): FB: Allocated DRI Back Buffer at offset 0x028F2000 (size = 0x01C20000) (II) RADEONHD(0): FB: Allocated DRI Depth Buffer at offset 0x04512000 (size = 0x01C20000) (II) RADEONHD(0): FB: Allocated DRI Textures at offset 0x06132000 (size = 0x01E80000) (II) RADEONHD(0): Using 16 MB GART aperture (II) RADEONHD(0): Using 2 MB for the ring buffer (II) RADEONHD(0): Using 2 MB for vertex/indirect buffers (II) RADEONHD(0): Using 12 MB for GART textures (--) Depth 24 pixmap format is 32 bpp (II) do I need RAC? No, I don't. (II) resource ranges after preInit: [0] -1 0 0xffffffff - 0xffffffff (0x1) MX[B] [1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[B] [2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[B] [3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[B] [4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[B] [5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[B] [6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[B] [7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[B] [8] -1 0 0x00000000 - 0x00000000 (0x1) IX[B] [9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[B] [10] 0 0 0x000003c0 - 0x000003df (0x20) IS[B] (II) RADEONHD(0): Mapped IO @ 0xd0100000 to 0xb78d4000 (size 0x00010000) (II) RADEONHD(0): Mapped FB @ 0xd8000000 to 0xaf82f000 (size 0x08000000) (II) RADEONHD(0): Attempting to enable power management (WW) RADEONHD(0): AtomBIOS command table 19 does not exist (II) RADEONHD(0): Query for AtomBIOS Exec: not implemented (WW) RADEONHD(0): Failed to set power management (II) RADEONHD(0): Query for Set Power Management: failed (II) RADEONHD(0): Attempting to enable clock gating (II) RADEONHD(0): Current Engine Clock: 250600 (WW) RADEONHD(0): AtomBIOS command table 47 does not exist (II) RADEONHD(0): Query for AtomBIOS Exec: not implemented (WW) RADEONHD(0): Unusupported SetVoltage Revision drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 8, (OK) drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 8, (OK) drmOpenByBusid: Searching for BusID pci:0000:01:05.0 drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 8, (OK) drmOpenByBusid: drmOpenMinor returns 8 drmOpenByBusid: drmGetBusid reports pci:0000:01:05.0 (II) [drm] DRM interface version 1.3 (II) [drm] DRM open master succeeded. (II) RADEONHD(0): [drm] Using the DRM lock SAREA also for drawables. (II) RADEONHD(0): [drm] framebuffer handle = 0xd8000000 (II) RADEONHD(0): [drm] added 1 reserved context for kernel (II) RADEONHD(0): X context handle = 0x1 (II) RADEONHD(0): [drm] installed DRM signal handler (II) RADEONHD(0): [pci] 16384 kB allocated with handle 0xf9be8000 (II) RADEONHD(0): [pci] ring handle = 0xf9be8000 (II) RADEONHD(0): [pci] Ring mapped at 0xaf5eb000 (II) RADEONHD(0): [pci] Ring contents 0x00000000 (II) RADEONHD(0): [pci] ring read ptr handle = 0xf9de9000 (II) RADEONHD(0): [pci] Ring read ptr mapped at 0xaf5ea000 (II) RADEONHD(0): [pci] Ring read ptr contents 0x00000000 (II) RADEONHD(0): [pci] vertex/indirect buffers handle = 0xf9dea000 (II) RADEONHD(0): [pci] Vertex/indirect buffers mapped at 0xaf3ea000 (II) RADEONHD(0): [pci] Vertex/indirect buffers contents 0x00000000 (II) RADEONHD(0): [pci] GART texture map handle = 0xf9fea000 (II) RADEONHD(0): [pci] GART Texture map mapped at 0xae82a000 (II) RADEONHD(0): [drm] register handle = 0x2a020000 (II) RADEONHD(0): [dri] Visual configs initialized (II) RADEONHD(0): Attempting to set Engine Clock to 250000 (II) RADEONHD(0): Current Engine Clock: 250600 (WW) RADEONHD(0): AtomBIOS command table 47 does not exist (II) RADEONHD(0): Query for AtomBIOS Exec: not implemented (WW) RADEONHD(0): Unusupported SetVoltage Revision (II) RADEONHD(0): [DRI] installation complete
W dniu 1 października 2009 00:50 użytkownik Christian König
It reminds me RV770 issue from radeonhd, where we don't get working audio. All registers are 100% alright, but no sound. Your script is missing something, the 0x7400, 0x7700 and 0x7800 are only
Am Montag, den 28.09.2009, 16:28 +0200 schrieb Rafał Miłecki: bases. Try comparing the whole 0x7400-0x74ff, 0x7700-0x77ff and 0x7800-0x78ff ranges.
How could I miss that? :/
For the RV770 i have the strong feeling that ATI have started to double buffer the HDMI registers, and there is a bit somewhere that tells the hardware to start using the new values on the next vertical or horizontal retrace.
Did you try reseting base+R600_HDMI_ENABLE on RV770? Or setting it to some magic values? Maybe this register has some value that means for GPU "read settings again"? Can we somehow run fglrx in gdb and run in operation by operation? To track it's changes to registers?
Please, check attached log files. In both cases I've started playback *just once*. In case of radeonhd there is one RHDHdmiUpdateAudioSettings operation. However KMS prints 4*playing messages. Yeah that's another point that could go wrong. At the moment i enable hdmi on any digital interface i can find, even if it's an LVDS, the worst thing that could happen is that you don't get a picture on your panel.
I thought about that but I've LVDS, VGA and HDMI. That are 3 interfaces vs. 4 playing messages. Also I believe that on starting KMS I get two "stopped" messages (will verify that). -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
W dniu 1 października 2009 00:50 użytkownik Christian König
Your script is missing something, the 0x7400, 0x7700 and 0x7800 are only bases. Try comparing the whole 0x7400-0x74ff, 0x7700-0x77ff and 0x7800-0x78ff ranges.
OK, I've compared radeonhd and KMS with that registers. Logs attached (radeonhd.playing.dump.log, kms.playing.broken.dump.log). I've diffed them and used wrote radeonhd's values (potential.fix.sh). After executing potential.fix.sh nothing changed: no sound, no corruptions, playback speed correct. Then I dumped registers once more (kms.hacked.log). Comparing radeonhd.playing.dump.log with kms.hacked.log showed registers that didn't /accept/ new values. Tried overwriting again but didn't success on that (failed.changes.log). -- Rafał
Am Donnerstag, den 01.10.2009, 22:11 +0200 schrieb Rafał Miłecki:
OK, I've compared radeonhd and KMS with that registers. Logs attached (radeonhd.playing.dump.log, kms.playing.broken.dump.log).
I've diffed them and used wrote radeonhd's values (potential.fix.sh).
After executing potential.fix.sh nothing changed: no sound, no corruptions, playback speed correct.
Then I dumped registers once more (kms.hacked.log).
Comparing radeonhd.playing.dump.log with kms.hacked.log showed registers that didn't /accept/ new values.
Tried overwriting again but didn't success on that (failed.changes.log). That's ok, the register values you could overwrite are read only status registers, with the exception of the 0x7408 register, but this really doesn't matter much.
But there is something else which is very interesting: 0x74C4: 0x00000000 That's the last transmitted CTS value which is used for clock recovery in your AV receiver. The setup which values should be transmitted for the different sampling rates is correct (register 0x74AC, 0x74B4, 0x74BC), but this register is still 0 could only mean one thing: we never transmitted a single value. Check the registers 0x75A0 and 0x79A0 (RV620_DIG[12]_CNTL), i suspect that the transmitter isn't running in HDMI mode, maybe because of failed auto detection, but i am not 100% sure. Bye, Christian. -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
W dniu 4 października 2009 20:22 użytkownik Christian König
Check the registers 0x75A0 and 0x79A0 (RV620_DIG[12]_CNTL), i suspect that the transmitter isn't running in HDMI mode, maybe because of failed auto detection, but i am not 100% sure.
Bingo! Manual: 0x75A0: 0x00000211 → 0x00000311 made the trick. It's 2am here and I'm leaving early tomorrow, so won't able to fix your patch. Should be able to try it next weekend, if you won't do it first of course :) -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Oct 05, 09 02:10:21 +0200, Rafał Miłecki wrote:
W dniu 4 października 2009 20:22 użytkownik Christian König
napisał: Check the registers 0x75A0 and 0x79A0 (RV620_DIG[12]_CNTL), i suspect that the transmitter isn't running in HDMI mode, maybe because of failed auto detection, but i am not 100% sure.
Bingo! Manual:
0x75A0: 0x00000211 → 0x00000311
made the trick. It's 2am here and I'm leaving early tomorrow, so won't able to fix your patch. Should be able to try it next weekend, if you won't do it first of course :)
No pressure, but do you guys think this is easy to fix? Looks like it to
me ;-)
In that case we'll wait for the patch for the 1.2.6 release. Otherwise
we won't.
Thanks
Matthias
--
Matthias Hopf
2009/10/6 Matthias Hopf
On Oct 05, 09 02:10:21 +0200, Rafał Miłecki wrote:
W dniu 4 października 2009 20:22 użytkownik Christian König
napisał: Check the registers 0x75A0 and 0x79A0 (RV620_DIG[12]_CNTL), i suspect that the transmitter isn't running in HDMI mode, maybe because of failed auto detection, but i am not 100% sure.
Bingo! Manual:
0x75A0: 0x00000211 → 0x00000311
made the trick. It's 2am here and I'm leaving early tomorrow, so won't able to fix your patch. Should be able to try it next weekend, if you won't do it first of course :)
No pressure, but do you guys think this is easy to fix? Looks like it to me ;-) In that case we'll wait for the patch for the 1.2.6 release. Otherwise we won't.
Please, check what is this topic about... ;) KMS vs. radeonhd? Difference? ;) -- Rafał -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Oct 06, 09 12:13:53 +0200, Rafał Miłecki wrote:
2009/10/6 Matthias Hopf
: On Oct 05, 09 02:10:21 +0200, Rafał Miłecki wrote:
W dniu 4 października 2009 20:22 użytkownik Christian König
napisał: Check the registers 0x75A0 and 0x79A0 (RV620_DIG[12]_CNTL), i suspect that the transmitter isn't running in HDMI mode, maybe because of failed auto detection, but i am not 100% sure.
Bingo! Manual:
0x75A0: 0x00000211 → 0x00000311
made the trick. It's 2am here and I'm leaving early tomorrow, so won't able to fix your patch. Should be able to try it next weekend, if you won't do it first of course :)
No pressure, but do you guys think this is easy to fix? Looks like it to me ;-) In that case we'll wait for the patch for the 1.2.6 release. Otherwise we won't.
Please, check what is this topic about... ;) KMS vs. radeonhd? Difference? ;)
If the issue is only surfacing in radeon KMS (and not in radeonhd) I
would suggest removing the radeonhd ML from CC. I got the impression
this was a general issue of the HDMI audio code.
Matthias
--
Matthias Hopf
Am Dienstag, den 06.10.2009, 12:25 +0200 schrieb Matthias Hopf:
No pressure, but do you guys think this is easy to fix? Looks like it to me ;-) In that case we'll wait for the patch for the 1.2.6 release. Otherwise we won't.
Please, check what is this topic about... ;) KMS vs. radeonhd? Difference? ;)
If the issue is only surfacing in radeon KMS (and not in radeonhd) I would suggest removing the radeonhd ML from CC. I got the impression this was a general issue of the HDMI audio code. I think it is still something wich is related to HDMI audio in general, drm comes with just the right code to get HDMI auto detection to work. A feature wich should be ported to radeonhd (when we got it working right), but that is not a show stopper for the next release.
That also reminds me that i totally forgotten to mail you the "Silence audio stream option" patch i have in the pipeline for a couple of month now. The patch is attached, and since its default value is off it should harm a bit. It would be nice if this gets into mainline bevor the next release. Bye, Christian.
On Oct 08, 09 00:04:01 +0200, Christian König wrote:
That also reminds me that i totally forgotten to mail you the "Silence audio stream option" patch i have in the pipeline for a couple of month now. The patch is attached, and since its default value is off it should harm a bit.
It would be nice if this gets into mainline bevor the next release.
As you are *the* author of HDMI audio, I do not object ;-)
Committed.
Thanks
Matthias
P.S. Do you have any documentation about what the property does written
up already?
--
Matthias Hopf
On Sun, Sep 27, 2009 at 3:38 PM, Christian König
Hi everybody,
since i didn't got so much todo in the last week than i thought i would, i finally sit down and ported the HDMI support for R600 and up chipsets from radeonhd to KMS.
So the attached patch is based on Dave Airlies drm-next tree (http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=d...).
It's been a while since i last coded inside kernel space and the patch is not very well tested, so there are quite a bunch of "TODO"s inside the code, but at least it's a starting point and seems to work fine with the radeon driver+KMS.
So any comments or test results would be very welcome.
Thanks for doing this Christian, I'd been planning to start on this myself, but hadn't had time yet. When I get back from XDC, I should be able to help out a bit with this to fill in the gaps and get the proper register names and bitfields filled in. Alex -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Sun, Sep 27, 2009 at 3:38 PM, Christian König
Hi everybody,
since i didn't got so much todo in the last week than i thought i would, i finally sit down and ported the HDMI support for R600 and up chipsets from radeonhd to KMS.
So the attached patch is based on Dave Airlies drm-next tree (http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=d...).
It's been a while since i last coded inside kernel space and the patch is not very well tested, so there are quite a bunch of "TODO"s inside the code, but at least it's a starting point and seems to work fine with the radeon driver+KMS.
So any comments or test results would be very welcome.
FYI, I've committed this patch to my local drm tree as well as several others to clean up and clarify things (and hopefully fix some bugs). Just waiting for approval to release it for testing. Thanks for your work on this. Alex -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
participants (5)
-
Alex Deucher
-
Christian König
-
Dariem Pérez Herrera
-
Matthias Hopf
-
Rafał Miłecki