Bug 24611 - KMS: Plugging in only S-video locks up machine
Summary: KMS: Plugging in only S-video locks up machine
Status: RESOLVED WONTFIX
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: DRI git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 00:22 UTC by Pierre Ossman
Modified: 2013-11-15 18:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
radeon-crtc-off.patch (1.74 KB, patch)
2009-11-29 03:26 UTC, Pierre Ossman
no flags Details | Splinter Review
radeon-crtc-off.patch (1.63 KB, patch)
2009-11-29 09:37 UTC, Pierre Ossman
no flags Details | Splinter Review

Description Pierre Ossman 2009-10-19 00:22:11 UTC
Connecting only the S-video connector to a radeon makes the machine lock up completely when KMS inits. It only responds to pressing the power button for four seconds.

Having S-video and VGA connected makes the problem go away. Also, S-video without KMS works fine.

This has been confirmed by myself on Fedora rawhide with a Radeon 9700 (r300) and by soreau with drm-next and a Radeon 9600 (rv350).
Comment 1 Pierre Ossman 2009-11-15 04:23:35 UTC
Also observed on a x550 (rv370).
Comment 2 Pierre Ossman 2009-11-15 09:09:08 UTC
I fiddles a bit, and managed to get this over netconsole before the machine locked up:

[drm] Initialized drm 1.1.0 20060810
[drm] radeon kernel modesetting enabled.
[drm:drm_init], 
[drm:drm_get_dev], 
radeon 0000:01:00.0: setting latency timer to 64
[drm:drm_get_minor], 
[drm:drm_get_minor], new minor assigned 64
[drm:drm_get_minor], 
[drm:drm_get_minor], new minor assigned 0
[drm] radeon: Initializing kernel modesetting.
[drm] register mmio base: 0xDFDE0000
[drm] register mmio size: 65536
[drm:radeon_get_bios], COMBIOS detected
[drm] GPU reset succeed (RBBM_STATUS=0x00000140)
[drm] Generation 2 PCI interface, using max accessible memory
[drm] radeon: VRAM 128M
[drm] radeon: VRAM from 0x00000000 to 0x07FFFFFF
[drm] radeon: GTT 512M
[drm] radeon: GTT from 0x20000000 to 0x3FFFFFFF
radeon 0000:01:00.0: irq 27 for MSI/MSI-X
[drm:drm_irq_install], irq=27
[drm] radeon: irq initialized.
[drm] Detected VRAM RAM=128M, BAR=128M
[drm] RAM width 64bits DDR
[TTM] Zone  kernel: Available graphics memory: 435900 kiB.
[TTM] Zone highmem: Available graphics memory: 1030096 kiB.
[drm] radeon: 128M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.
[drm] GART: num cpu pages 131072, num gpu pages 131072
[drm] radeon: 1 quad pipes, 1 Z pipes initialized.
[drm] PCIE GART of 512M enabled (table at 0x00040000).
[drm] radeon: cp idle (0x10000C03)
[drm:r100_cp_init_microcode], 
[drm] Loading R300 Microcode
platform radeon_cp.0: firmware: requesting radeon/R300_cp.bin
[drm] radeon: ring at 0x0000000020000000
[drm] ring test succeeded in 1 usecs
[drm] radeon: ib pool ready.
[drm] ib test succeeded in 0 usecs
[drm:drm_sysfs_connector_add], adding "VGA-1" to sysfs
[drm:drm_sysfs_hotplug_event], generating hotplug event
[drm] Default TV standard: NTSC
[drm] 27.000000000 MHz TV ref clk
[drm] DFP table revision: 4
[drm:radeon_legacy_get_tmds_info_from_combios], TMDS PLL From COMBIOS 142001fbb0114
[drm:radeon_legacy_get_tmds_info_from_combios], TMDS PLL From COMBIOS 200001fbb018c
[drm:radeon_legacy_get_tmds_info_from_combios], TMDS PLL From COMBIOS 0 4e20000c
[drm:drm_sysfs_connector_add], adding "DVI-I-1" to sysfs
[drm:drm_sysfs_hotplug_event], generating hotplug event
[drm:drm_sysfs_connector_add], adding "SVIDEO-1" to sysfs
[drm:drm_sysfs_hotplug_event], generating hotplug event
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm]   VGA
[drm]   DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60
[drm]   Encoders:
[drm]     CRT1: INTERNAL_DAC1
[drm] Connector 1:
[drm]   DVI-I
[drm]   DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64
[drm]   Encoders:
[drm]     CRT2: INTERNAL_DAC2
[drm]     DFP1: INTERNAL_TMDS1
[drm] Connector 2:
[drm]   S-video
[drm]   Encoders:
[drm]     TV1: INTERNAL_DAC2
[drm:radeon_combios_connected_scratch_regs], CRT1 disconnected
[drm:radeon_combios_connected_scratch_regs], CRT2 disconnected
[drm:radeon_combios_connected_scratch_regs], DFP1 disconnected
[drm:r300_legacy_tv_detect], S-video TV connection detected
[drm:radeon_combios_connected_scratch_regs], TV1 connected
[drm] fb mappable at 0xD00C0000
[drm] vram apper at 0xD0000000
[drm] size 1920000
[drm] fb depth is 24
[drm]    pitch is 3200
fbcon: radeondrmfb (fb0) is primary device
Comment 3 Pierre Ossman 2009-11-15 09:22:59 UTC
Did the same run with VGA and S-video connected. Output is identical (except for CRT1 now being connected), but with these extra lines:

[drm:radeon_encoder_set_active_device], setting active device to 00000001 from 00000001 00000001 for encoder 1
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 0, ret: 0
[drm:drm_update_vblank_count], enabling vblank interrupts on crtc 0, missed 76727
[drm:radeon_crtc_set_base], 
[drm:r100_bandwidth_update], GRPH_BUFFER_CNTL from to 200c7c7c
[drm:radeon_set_crtc_timing], 
[drm:radeon_set_pll], 
[drm:radeon_compute_pll], PLL freq 56250 2 1023
[drm:radeon_set_pll], dc=5625, fd=25, rd=2, pd=6
[drm:radeon_set_pll], Wrote: 0x00000002 0x00060019 0x00000000 (0x00008f00)
[drm:radeon_set_pll], Wrote: rd=2, fd=25, pd=6
[drm] DAC-9: set mode 800x600 1d
[drm:radeon_legacy_primary_dac_mode_set], 
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:radeon_encoder_set_active_device], setting active device to 00000004 from 00000014 00000004 for encoder 4
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 1, ret: 0
[drm:drm_update_vblank_count], enabling vblank interrupts on crtc 1, missed 0
[drm:radeon_crtc_set_base], 
[drm:r100_bandwidth_update], GRPH_BUFFER_CNTL from to 200c7c7c
[drm:r100_bandwidth_update], GRPH2_BUFFER_CNTL from to 20107c7c
[drm:radeon_set_crtc_timing], 
[drm] crtc 1 is connected to a TV
[drm:radeon_set_pll], 
[drm:radeon_compute_pll], PLL freq 38250 2 1023
[drm:radeon_set_pll], dc=3825, fd=17, rd=2, pd=6
[drm:radeon_set_pll], Wrote2: 0x0000005b 0x00020250 0x00000006 (0x00008c00)
[drm:radeon_set_pll], Wrote2: rd=91, fd=592, pd=2
[drm] TV-11: set mode 800x600 1e
[drm:radeon_legacy_tv_dac_mode_set], 
[drm:radeon_legacy_tv_init_restarts], compute_restarts: def = 625592 h = 0 v = 0, p1 = 123b, p2 = 1ac1, restart = 625643
[drm:radeon_legacy_tv_init_restarts], compute_restart: F/H/V=0,631,953
[drm:radeon_legacy_tv_init_restarts], compute_restart: h_size = 0 h_inc = 1593
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
Console: switching to colour frame buffer device 100x37
fb0: radeondrmfb frame buffer device
registered panic notifier
[drm] Initialized radeon 2.0.0 20080528 for 0000:01:00.0 on minor 0
[drm:vblank_disable_fn], disabling vblank on crtc 0
[drm:vblank_disable_fn], disabling vblank on crtc 1
Comment 4 Pierre Ossman 2009-11-15 11:34:24 UTC
More testing. I built fbcon as a module (and didn't load it), which avoided the hang. I was even able to start X without things locking up. Unfortunately things don't work completely as the screen is corrupted. From a subjective look of the corruption, there seems to be a framebuffer pitch issue.
Comment 5 Pierre Ossman 2009-11-15 11:40:33 UTC
Hmm... I spoke too soon. It locked up under this scenario as well.
Comment 6 Pierre Ossman 2009-11-15 11:43:47 UTC
For reference, this is the output given in the last test (I added some extra DRM_DEBUG()):

*preivous output*
...
[drm] vram apper at 0xD0000000
[drm] size 1920000
[drm] fb depth is 24
[drm]    pitch is 3200
fb0: radeondrmfb frame buffer device
registered panic notifier
[drm] Initialized radeon 2.0.0 20080528 for 0000:01:00.0 on minor 0
[drm:drm_stub_open], 
[drm:drm_open_helper], pid = 1100, minor = 0
[drm:drm_setup], 
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_release], open_count = 1
[drm:drm_release], pid = 1100, device = 0xe200, open_count = 1
[drm:drm_lastclose], 
[drm:drm_lastclose], driver lastclose completed
[drm:drm_lastclose], lastclose completed
[drm:drm_stub_open], 
[drm:drm_open_helper], pid = 1100, minor = 0
[drm:drm_setup], 
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_release], open_count = 1
[drm:drm_release], pid = 1100, device = 0xe200, open_count = 1
[drm:drm_lastclose], 
[drm:drm_lastclose], driver lastclose completed
[drm:drm_lastclose], lastclose completed
[drm:drm_stub_open], 
[drm:drm_open_helper], pid = 1100, minor = 0
[drm:drm_setup], 
[drm:drm_ioctl], pid=1100, cmd=0xc0106407, nr=0x07, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086401, nr=0x01, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086401, nr=0x01, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0106407, nr=0x07, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0186415, nr=0x15, dev 0xe200, auth=1
[drm:drm_addmap_core], offset = 0x00000000, size = 0x00002000, type = 2
[drm:drm_addmap_core], 8192 13 f7e3d000
[drm:drm_mmap_locked], start = 0xb7fd6000, end = 0xb7fd8000, page offset = 0xf7e3d
[drm:drm_vm_open_locked], 0xb7fd6000,0x00002000
[drm:drm_do_vm_shm_fault], shm_fault 0x0
[drm:drm_do_vm_shm_fault], shm_fault 0x1000
[drm:drm_ioctl], pid=1100, cmd=0xc04064a0, nr=0xa0, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064a0, nr=0xa0, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc06864a1, nr=0xa1, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc06864a1, nr=0xa1, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc01464a6, nr=0xa6, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT2 disconnected
[drm:radeon_combios_connected_scratch_regs], DFP1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT2 disconnected
[drm:radeon_combios_connected_scratch_regs], DFP1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc01464a6, nr=0xa6, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:r300_legacy_tv_detect], S-video TV connection detected
[drm:radeon_combios_connected_scratch_regs], TV1 connected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01464a6, nr=0xa6, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT2 disconnected
[drm:radeon_combios_connected_scratch_regs], DFP1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:radeon_combios_connected_scratch_regs], CRT2 disconnected
[drm:radeon_combios_connected_scratch_regs], DFP1 disconnected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:r300_legacy_tv_detect], S-video TV connection detected
[drm:radeon_combios_connected_scratch_regs], TV1 connected
[drm:drm_ioctl], pid=1100, cmd=0xc04c64a7, nr=0xa7, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01064ac, nr=0xac, dev 0xe200, auth=1
[drm:drm_ioctl], ret = ffffffea
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc04064aa, nr=0xaa, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0246400, nr=0x00, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc018645c, nr=0x5c, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0106467, nr=0x67, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0x641e, nr=0x1e, dev 0xe200, auth=1
[drm:drm_stub_open], 
[drm:drm_open_helper], pid = 1100, minor = 0
[drm:drm_ioctl], pid=1100, cmd=0xc0086401, nr=0x01, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086401, nr=0x01, dev 0xe200, auth=1
[drm:drm_release], open_count = 2
[drm:drm_release], pid = 1100, device = 0xe200, open_count = 2
[drm:drm_ioctl], pid=1100, cmd=0xc01c645d, nr=0x5d, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc020645e, nr=0x5e, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086464, nr=0x64, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01c645d, nr=0x5d, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc020645e, nr=0x5e, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086464, nr=0x64, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01c645d, nr=0x5d, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0106467, nr=0x67, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01c645d, nr=0x5d, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc020645e, nr=0x5e, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc0086464, nr=0x64, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc01c64ad, nr=0xad, dev 0xe200, auth=1
[drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[drm:drm_ioctl], ret = ffffffea
[drm:drm_ioctl], pid=1100, cmd=0xc01c64ae, nr=0xae, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc02064a5, nr=0xa5, dev 0xe200, auth=1
[drm:drm_ioctl], pid=1100, cmd=0xc06864a2, nr=0xa2, dev 0xe200, auth=1
[drm:drm_crtc_helper_set_mode], 1
[drm:radeon_legacy_tv_dac_mode_fixup], 
[drm:radeon_encoder_set_active_device], 
[drm:radeon_encoder_set_active_device], setting active device to 00000004 from 00000014 00000004 for encoder 4
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 0, ret: 0
[drm:drm_update_vblank_count], enabling vblank interrupts on crtc 0, missed 72226
[drm:radeon_crtc_set_base], 
[drm:r100_bandwidth_update], GRPH_BUFFER_CNTL from to 20087c7c
[drm:radeon_set_crtc_timing], 
[drm] crtc 0 is connected to a TV
[drm:radeon_set_pll], 
[drm:radeon_compute_pll], PLL freq 38250 2 1023
[drm:radeon_set_pll], dc=3825, fd=17, rd=2, pd=6
[drm:radeon_set_pll], Wrote: 0x0000005b 0x00020250 0x10000006 (0x00008f00)
[drm:radeon_set_pll], Wrote: rd=91, fd=592, pd=2
[drm] TV-11: set mode 800x600 13
[drm:radeon_legacy_tv_dac_mode_set], 
[drm:radeon_legacy_tv_init_restarts], compute_restarts: def = 625592 h = 0 v = 0, p1 = 123b, p2 = 1ac1, restart = 625643
[drm:radeon_legacy_tv_init_restarts], compute_restart: F/H/V=0,631,953
[drm:radeon_legacy_tv_init_restarts], compute_restart: h_size = 0 h_inc = 1593
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 1, ret: 0
[drm:drm_update_vblank_count], 
BUG: recent printk recursion!
enabling vblank interrupts on crtc 1, missed -1


Comment 7 Pierre Ossman 2009-11-15 12:50:07 UTC
More printk-debugging narrows the issue down to when fbcon is bound in drivers/char/vt.c. IOW registering completes fine:

fbcon_takeover: 
take_over_console: Registering
fbcon_startup: mode:   radeondrmfb
fbcon_startup: visual: 2
fbcon_startup: res:    800x600-32
take_over_console: Binding
Comment 8 Pierre Ossman 2009-11-15 22:01:43 UTC
It seems like the card kills a bus as the system cannot be protected by nmi_watchdog (I confirmed that the NMI:s were ticking).
Comment 9 Pierre Ossman 2009-11-16 11:49:48 UTC
More ugly hacking. One reason there was so little output when hanging was that the console semaphore was locked, preventing output. So I commented out that locking, and got this:

------------[ cut here ]------------
WARNING: at drivers/char/vt.c:631 save_screen+0x3a/0x5d()
Hardware name: Dimension 5000               
Modules linked in: radeon(+) ttm drm_kms_helper fbcon tileblit font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor drm netconsole configfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer ppdev i2c_i801 floppy snd b44 ssb mii soundcore dcdbas pcspkr joydev parport_pc parport iTCO_wdt iTCO_vendor_support snd_page_alloc serio_raw ata_generic pata_acpi i2c_algo_bit i2c_core [last unloaded: drm]
Pid: 1092, comm: modprobe Not tainted 2.6.31-rc9 #6
Call Trace:
 [<c0449bd2>] warn_slowpath_common+0x75/0x9d
 [<c06781f0>] ? save_screen+0x3a/0x5d
 [<c0449c1b>] warn_slowpath_null+0x21/0x35
 [<c06781f0>] save_screen+0x3a/0x5d
 [<c0679bb8>] bind_con_driver+0x1f6/0x387
 [<c0679daf>] take_over_console+0x66/0x91
 [<f7e528ca>] fbcon_takeover+0x6d/0xa1 [fbcon]
 [<f7e53a5b>] fbcon_event_notify+0x23d/0x522 [fbcon]
 [<c05e97af>] ? idr_get_empty_slot+0x14a/0x206
 [<c04ffad4>] ? find_inode+0x37/0x82
 [<c0500815>] ? wait_on_inode+0x3d/0x52
 [<c04ff8c8>] ? iput+0x37/0x73
 [<c053c73e>] ? sysfs_addrm_finish+0x56/0x1c2
 [<c053cb81>] ? sysfs_add_one+0x26/0xe2
 [<c080e907>] notifier_call_chain+0x37/0x67
 [<c04667b6>] __blocking_notifier_call_chain+0x52/0x78
 [<c04667fd>] blocking_notifier_call_chain+0x21/0x37
 [<c06189d5>] fb_notifier_call_chain+0x25/0x38
 [<c061abe0>] register_framebuffer+0x293/0x2b5
 [<f7e9ddda>] drm_fb_helper_single_fb_probe+0x334/0x3ca [drm_kms_helper]
 [<f830c9a1>] radeonfb_probe+0x23/0x36 [radeon]
 [<f7ea02ce>] drm_helper_initial_config+0x60/0x78 [drm_kms_helper]
 [<f830abc8>] radeon_modeset_init+0x476/0x492 [radeon]
 [<f82f6ded>] radeon_driver_load_kms+0x10b/0x12a [radeon]
 [<fa40c5c5>] drm_get_dev+0x2e1/0x3cb [drm]
 [<f832a464>] radeon_pci_probe+0x21/0xbb [radeon]
 [<c0600100>] local_pci_probe+0x22/0x35
 [<c0600f6f>] pci_device_probe+0x54/0x8a
 [<c069aa8b>] driver_probe_device+0xca/0x1d9
 [<c069abf0>] __driver_attach+0x56/0x84
 [<c0699f4d>] bus_for_each_dev+0x53/0x8e
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a80a>] driver_attach+0x27/0x3a
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a4b5>] bus_add_driver+0xbe/0x211
 [<c069af3c>] driver_register+0x89/0x101
 [<c0601188>] __pci_register_driver+0x48/0xb9
 [<fa407b58>] drm_init+0x6d/0xd6 [drm]
 [<f7e60000>] ? radeon_init+0x0/0xcd [radeon]
 [<f7e600ba>] radeon_init+0xba/0xcd [radeon]
 [<c0403085>] do_one_initcall+0x5c/0x15b
 [<c0477b7f>] sys_init_module+0xc6/0x1eb
 [<c040a07b>] sysenter_do_call+0x12/0x28
---[ end trace c57f4681b5154f7c ]---
bind_con_driver: : 0 b
------------[ cut here ]------------
WARNING: at drivers/char/vt.c:831 vc_do_resize+0x44/0x339()
Hardware name: Dimension 5000               
Modules linked in: radeon(+) ttm drm_kms_helper fbcon tileblit font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor drm netconsole configfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer ppdev i2c_i801 floppy snd b44 ssb mii soundcore dcdbas pcspkr joydev parport_pc parport iTCO_wdt iTCO_vendor_support snd_page_alloc serio_raw ata_generic pata_acpi i2c_algo_bit i2c_core [last unloaded: drm]
Pid: 1092, comm: modprobe Tainted: G        W  2.6.31-rc9 #6
Call Trace:
 [<c0449bd2>] warn_slowpath_common+0x75/0x9d
 [<c067c08a>] ? vc_do_resize+0x44/0x339
 [<c0449c1b>] warn_slowpath_null+0x21/0x35
 [<c067c08a>] vc_do_resize+0x44/0x339
 [<c061e2c4>] ? fb_match_mode+0x39/0x66
 [<c067c407>] vc_resize+0x2a/0x40
 [<f7e53494>] fbcon_init+0x2c0/0x361 [fbcon]
 [<c0677c76>] visual_init+0xa2/0xef
 [<c0679bf0>] bind_con_driver+0x22e/0x387
 [<c0679daf>] take_over_console+0x66/0x91
 [<f7e528ca>] fbcon_takeover+0x6d/0xa1 [fbcon]
 [<f7e53a5b>] fbcon_event_notify+0x23d/0x522 [fbcon]
 [<c05e97af>] ? idr_get_empty_slot+0x14a/0x206
 [<c04ffad4>] ? find_inode+0x37/0x82
 [<c0500815>] ? wait_on_inode+0x3d/0x52
 [<c04ff8c8>] ? iput+0x37/0x73
 [<c053c73e>] ? sysfs_addrm_finish+0x56/0x1c2
 [<c053cb81>] ? sysfs_add_one+0x26/0xe2
 [<c080e907>] notifier_call_chain+0x37/0x67
 [<c04667b6>] __blocking_notifier_call_chain+0x52/0x78
 [<c04667fd>] blocking_notifier_call_chain+0x21/0x37
 [<c06189d5>] fb_notifier_call_chain+0x25/0x38
 [<c061abe0>] register_framebuffer+0x293/0x2b5
 [<f7e9ddda>] drm_fb_helper_single_fb_probe+0x334/0x3ca [drm_kms_helper]
 [<f830c9a1>] radeonfb_probe+0x23/0x36 [radeon]
 [<f7ea02ce>] drm_helper_initial_config+0x60/0x78 [drm_kms_helper]
 [<f830abc8>] radeon_modeset_init+0x476/0x492 [radeon]
 [<f82f6ded>] radeon_driver_load_kms+0x10b/0x12a [radeon]
 [<fa40c5c5>] drm_get_dev+0x2e1/0x3cb [drm]
 [<f832a464>] radeon_pci_probe+0x21/0xbb [radeon]
 [<c0600100>] local_pci_probe+0x22/0x35
 [<c0600f6f>] pci_device_probe+0x54/0x8a
 [<c069aa8b>] driver_probe_device+0xca/0x1d9
 [<c069abf0>] __driver_attach+0x56/0x84
 [<c0699f4d>] bus_for_each_dev+0x53/0x8e
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a80a>] driver_attach+0x27/0x3a
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a4b5>] bus_add_driver+0xbe/0x211
 [<c069af3c>] driver_register+0x89/0x101
 [<c0601188>] __pci_register_driver+0x48/0xb9
 [<fa407b58>] drm_init+0x6d/0xd6 [drm]
 [<f7e60000>] ? radeon_init+0x0/0xcd [radeon]
 [<f7e600ba>] radeon_init+0xba/0xcd [radeon]
 [<c0403085>] do_one_initcall+0x5c/0x15b
 [<c0477b7f>] sys_init_module+0xc6/0x1eb
 [<c040a07b>] sysenter_do_call+0x12/0x28
---[ end trace c57f4681b5154f7d ]---
------------[ cut here ]------------
WARNING: at drivers/char/vt.c:618 set_origin+0x3a/0x90()
Hardware name: Dimension 5000               
Modules linked in: radeon(+) ttm drm_kms_helper fbcon tileblit font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor drm netconsole configfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer ppdev i2c_i801 floppy snd b44 ssb mii soundcore dcdbas pcspkr joydev parport_pc parport iTCO_wdt iTCO_vendor_support snd_page_alloc serio_raw ata_generic pata_acpi i2c_algo_bit i2c_core [last unloaded: drm]
Pid: 1092, comm: modprobe Tainted: G        W  2.6.31-rc9 #6
Call Trace:
 [<c0449bd2>] warn_slowpath_common+0x75/0x9d
 [<c06780a3>] ? set_origin+0x3a/0x90
 [<c0449c1b>] warn_slowpath_null+0x21/0x35
 [<c06780a3>] set_origin+0x3a/0x90
 [<c067c273>] vc_do_resize+0x22d/0x339
 [<c067c407>] vc_resize+0x2a/0x40
 [<f7e53494>] fbcon_init+0x2c0/0x361 [fbcon]
 [<c0677c76>] visual_init+0xa2/0xef
 [<c0679bf0>] bind_con_driver+0x22e/0x387
 [<c0679daf>] take_over_console+0x66/0x91
 [<f7e528ca>] fbcon_takeover+0x6d/0xa1 [fbcon]
 [<f7e53a5b>] fbcon_event_notify+0x23d/0x522 [fbcon]
 [<c05e97af>] ? idr_get_empty_slot+0x14a/0x206
 [<c04ffad4>] ? find_inode+0x37/0x82
 [<c0500815>] ? wait_on_inode+0x3d/0x52
 [<c04ff8c8>] ? iput+0x37/0x73
 [<c053c73e>] ? sysfs_addrm_finish+0x56/0x1c2
 [<c053cb81>] ? sysfs_add_one+0x26/0xe2
 [<c080e907>] notifier_call_chain+0x37/0x67
 [<c04667b6>] __blocking_notifier_call_chain+0x52/0x78
 [<c04667fd>] blocking_notifier_call_chain+0x21/0x37
 [<c06189d5>] fb_notifier_call_chain+0x25/0x38
 [<c061abe0>] register_framebuffer+0x293/0x2b5
 [<f7e9ddda>] drm_fb_helper_single_fb_probe+0x334/0x3ca [drm_kms_helper]
 [<f830c9a1>] radeonfb_probe+0x23/0x36 [radeon]
 [<f7ea02ce>] drm_helper_initial_config+0x60/0x78 [drm_kms_helper]
 [<f830abc8>] radeon_modeset_init+0x476/0x492 [radeon]
 [<f82f6ded>] radeon_driver_load_kms+0x10b/0x12a [radeon]
 [<fa40c5c5>] drm_get_dev+0x2e1/0x3cb [drm]
 [<f832a464>] radeon_pci_probe+0x21/0xbb [radeon]
 [<c0600100>] local_pci_probe+0x22/0x35
 [<c0600f6f>] pci_device_probe+0x54/0x8a
 [<c069aa8b>] driver_probe_device+0xca/0x1d9
 [<c069abf0>] __driver_attach+0x56/0x84
 [<c0699f4d>] bus_for_each_dev+0x53/0x8e
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a80a>] driver_attach+0x27/0x3a
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a4b5>] bus_add_driver+0xbe/0x211
 [<c069af3c>] driver_register+0x89/0x101
 [<c0601188>] __pci_register_driver+0x48/0xb9
 [<fa407b58>] drm_init+0x6d/0xd6 [drm]
 [<f7e60000>] ? radeon_init+0x0/0xcd [radeon]
 [<f7e600ba>] radeon_init+0xba/0xcd [radeon]
 [<c0403085>] do_one_initcall+0x5c/0x15b
 [<c0477b7f>] sys_init_module+0xc6/0x1eb
 [<c040a07b>] sysenter_do_call+0x12/0x28
---[ end trace c57f4681b5154f7e ]---
------------[ cut here ]------------
WARNING: at drivers/char/vt.c:656 redraw_screen+0x3e/0x169()
Hardware name: Dimension 5000               
Modules linked in: radeon(+) ttm drm_kms_helper fbcon tileblit font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor drm netconsole configfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer ppdev i2c_i801 floppy snd b44 ssb mii soundcore dcdbas pcspkr joydev parport_pc parport iTCO_wdt iTCO_vendor_support snd_page_alloc serio_raw ata_generic pata_acpi i2c_algo_bit i2c_core [last unloaded: drm]
Pid: 1092, comm: modprobe Tainted: G        W  2.6.31-rc9 #6
Call Trace:
 [<c0449bd2>] warn_slowpath_common+0x75/0x9d
 [<c0679897>] ? redraw_screen+0x3e/0x169
 [<c0449c1b>] warn_slowpath_null+0x21/0x35
 [<c0679897>] redraw_screen+0x3e/0x169
 [<c0668df0>] ? tty_do_resize+0x9b/0xb6
 [<c067c362>] vc_do_resize+0x31c/0x339
 [<c067c407>] vc_resize+0x2a/0x40
 [<f7e53494>] fbcon_init+0x2c0/0x361 [fbcon]
 [<c0677c76>] visual_init+0xa2/0xef
 [<c0679bf0>] bind_con_driver+0x22e/0x387
 [<c0679daf>] take_over_console+0x66/0x91
 [<f7e528ca>] fbcon_takeover+0x6d/0xa1 [fbcon]
 [<f7e53a5b>] fbcon_event_notify+0x23d/0x522 [fbcon]
 [<c05e97af>] ? idr_get_empty_slot+0x14a/0x206
 [<c04ffad4>] ? find_inode+0x37/0x82
 [<c0500815>] ? wait_on_inode+0x3d/0x52
 [<c04ff8c8>] ? iput+0x37/0x73
 [<c053c73e>] ? sysfs_addrm_finish+0x56/0x1c2
 [<c053cb81>] ? sysfs_add_one+0x26/0xe2
 [<c080e907>] notifier_call_chain+0x37/0x67
 [<c04667b6>] __blocking_notifier_call_chain+0x52/0x78
 [<c04667fd>] blocking_notifier_call_chain+0x21/0x37
 [<c06189d5>] fb_notifier_call_chain+0x25/0x38
 [<c061abe0>] register_framebuffer+0x293/0x2b5
 [<f7e9ddda>] drm_fb_helper_single_fb_probe+0x334/0x3ca [drm_kms_helper]
 [<f830c9a1>] radeonfb_probe+0x23/0x36 [radeon]
 [<f7ea02ce>] drm_helper_initial_config+0x60/0x78 [drm_kms_helper]
 [<f830abc8>] radeon_modeset_init+0x476/0x492 [radeon]
 [<f82f6ded>] radeon_driver_load_kms+0x10b/0x12a [radeon]
 [<fa40c5c5>] drm_get_dev+0x2e1/0x3cb [drm]
 [<f832a464>] radeon_pci_probe+0x21/0xbb [radeon]
 [<c0600100>] local_pci_probe+0x22/0x35
 [<c0600f6f>] pci_device_probe+0x54/0x8a
 [<c069aa8b>] driver_probe_device+0xca/0x1d9
 [<c069abf0>] __driver_attach+0x56/0x84
 [<c0699f4d>] bus_for_each_dev+0x53/0x8e
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a80a>] driver_attach+0x27/0x3a
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a4b5>] bus_add_driver+0xbe/0x211
 [<c069af3c>] driver_register+0x89/0x101
 [<c0601188>] __pci_register_driver+0x48/0xb9
 [<fa407b58>] drm_init+0x6d/0xd6 [drm]
 [<f7e60000>] ? radeon_init+0x0/0xcd [radeon]
 [<f7e600ba>] radeon_init+0xba/0xcd [radeon]
 [<c0403085>] do_one_initcall+0x5c/0x15b
 [<c0477b7f>] sys_init_module+0xc6/0x1eb
 [<c040a07b>] sysenter_do_call+0x12/0x28
---[ end trace c57f4681b5154f7f ]---
------------[ cut here ]------------
WARNING: at drivers/char/vt.c:618 set_origin+0x3a/0x90()
Hardware name: Dimension 5000               
Modules linked in: radeon(+) ttm drm_kms_helper fbcon tileblit font bitblit fbcon_rotate fbcon_cw fbcon_ud fbcon_ccw softcursor drm netconsole configfs nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipv6 snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer ppdev i2c_i801 floppy snd b44 ssb mii soundcore dcdbas pcspkr joydev parport_pc parport iTCO_wdt iTCO_vendor_support snd_page_alloc serio_raw ata_generic pata_acpi i2c_algo_bit i2c_core [last unloaded: drm]
Pid: 1092, comm: modprobe Tainted: G        W  2.6.31-rc9 #6
Call Trace:
 [<c0449bd2>] warn_slowpath_common+0x75/0x9d
 [<c06780a3>] ? set_origin+0x3a/0x90
 [<c0449c1b>] warn_slowpath_null+0x21/0x35
 [<c06780a3>] set_origin+0x3a/0x90
 [<c0679913>] redraw_screen+0xba/0x169
 [<c0668d01>] ? do_SAK_work+0x1d/0x34
 [<c067c362>] vc_do_resize+0x31c/0x339
 [<c067c407>] vc_resize+0x2a/0x40
 [<f7e53494>] fbcon_init+0x2c0/0x361 [fbcon]
 [<c0677c76>] visual_init+0xa2/0xef
 [<c0679bf0>] bind_con_driver+0x22e/0x387
 [<c0679daf>] take_over_console+0x66/0x91
 [<f7e528ca>] fbcon_takeover+0x6d/0xa1 [fbcon]
 [<f7e53a5b>] fbcon_event_notify+0x23d/0x522 [fbcon]
 [<c05e97af>] ? idr_get_empty_slot+0x14a/0x206
 [<c04ffad4>] ? find_inode+0x37/0x82
 [<c0500815>] ? wait_on_inode+0x3d/0x52
 [<c04ff8c8>] ? iput+0x37/0x73
 [<c053c73e>] ? sysfs_addrm_finish+0x56/0x1c2
 [<c053cb81>] ? sysfs_add_one+0x26/0xe2
 [<c080e907>] notifier_call_chain+0x37/0x67
 [<c04667b6>] __blocking_notifier_call_chain+0x52/0x78
 [<c04667fd>] blocking_notifier_call_chain+0x21/0x37
 [<c06189d5>] fb_notifier_call_chain+0x25/0x38
 [<c061abe0>] register_framebuffer+0x293/0x2b5
 [<f7e9ddda>] drm_fb_helper_single_fb_probe+0x334/0x3ca [drm_kms_helper]
 [<f830c9a1>] radeonfb_probe+0x23/0x36 [radeon]
 [<f7ea02ce>] drm_helper_initial_config+0x60/0x78 [drm_kms_helper]
 [<f830abc8>] radeon_modeset_init+0x476/0x492 [radeon]
 [<f82f6ded>] radeon_driver_load_kms+0x10b/0x12a [radeon]
 [<fa40c5c5>] drm_get_dev+0x2e1/0x3cb [drm]
 [<f832a464>] radeon_pci_probe+0x21/0xbb [radeon]
 [<c0600100>] local_pci_probe+0x22/0x35
 [<c0600f6f>] pci_device_probe+0x54/0x8a
 [<c069aa8b>] driver_probe_device+0xca/0x1d9
 [<c069abf0>] __driver_attach+0x56/0x84
 [<c0699f4d>] bus_for_each_dev+0x53/0x8e
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a80a>] driver_attach+0x27/0x3a
 [<c069ab9a>] ? __driver_attach+0x0/0x84
 [<c069a4b5>] bus_add_driver+0xbe/0x211
 [<c069af3c>] driver_register+0x89/0x101
 [<c0601188>] __pci_register_driver+0x48/0xb9
 [<fa407b58>] drm_init+0x6d/0xd6 [drm]
 [<f7e60000>] ? radeon_init+0x0/0xcd [radeon]
 [<f7e600ba>] radeon_init+0xba/0xcd [radeon]
 [<c0403085>] do_one_initcall+0x5c/0x15b
 [<c0477b7f>] sys_init_module+0xc6/0x1eb
 [<c040a07b>] sysenter_do_call+0x12/0x28
---[ end trace c57f4681b5154f80 ]---
[drm:drm_crtc_helper_set_mode], 1
[drm:radeon_legacy_tv_dac_mode_fixup], 
[drm:radeon_encoder_set_active_device], 
[drm:radeon_encoder_set_active_device], setting active device to 00000004 from 00000014 00000004 for encoder 4
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 0, ret: 0
[drm:drm_update_vblank_count], enabling vblank interrupts on crtc 0, missed 68392
[drm:radeon_crtc_set_base], 
[drm:r100_bandwidth_update], GRPH_BUFFER_CNTL from to 20087c7c
[drm:radeon_set_crtc_timing], 
[drm] crtc 0 is connected to a TV
[drm:radeon_set_pll], 
[drm:radeon_compute_pll], PLL freq 38250 2 1023
[drm:radeon_set_pll], dc=3825, fd=17, rd=2, pd=6
[drm:radeon_set_pll], Wrote: 0x0000005b 0x00020250 0x10000006 (0x00008f00)
[drm:radeon_set_pll], Wrote: rd=91, fd=592, pd=2
[drm] TV-11: set mode 800x600 11
[drm:radeon_legacy_tv_dac_mode_set], 
[drm:radeon_legacy_tv_init_restarts], compute_restarts: def = 625592 h = 0 v = 0, p1 = 123b, p2 = 1ac1, restart = 625643
[drm:radeon_legacy_tv_init_restarts], compute_restart: F/H/V=0,631,953
[drm:radeon_legacy_tv_init_restarts], compute_restart: h_size = 0 h_inc = 1593
[drm:radeon_legacy_tv_dac_dpms], 
[drm:radeon_legacy_primary_dac_dpms], 
[drm:radeon_legacy_tmds_int_dpms], 
[drm:drm_vblank_get], enabling vblank on crtc 1, ret: 0

Comment 10 Pierre Ossman 2009-11-22 15:29:42 UTC
More insight. The initial hang goes away if you prevent the driver from enabling vblank interrupts.

On airlied's request, I checked a couple of registers:

<ossman> 0x3f8 0x02000000 (33554432)
<ossman> 0x3fc 0x00000003 (3)
<ossman> this is what BIOS has left it in, before KMS
<ossman> after KMS:
<ossman> 0x3f8 0x36800000 (914358272)
<ossman> 0x3fc 0x0000000b (11)

One theory is that the code confuses which CRTC is in use. From dmesg:

[drm] crtc 0 is connected to a TV
[drm:drm_vblank_get], enabling vblank on crtc 1, ret: -22
Comment 11 Pierre Ossman 2009-11-26 13:12:33 UTC
More investigation has turned up the following:

vblank ints are enabled on disabled CRTCs as a side effect of keeping vblank counters sane for userspace. That's why vblank ints are enabled for the unused CRTC.

Prohibiting the vblank int interrupt has no effect on the hang, so it isn't the triggering condition. What is though is reading the current vblank counter from the second CRTC. This is where the lockup occurs.

One theory was that reading the vblank counter from a disabled CRTC is dangerous, but investigating that theory turned up something even stranger: the CRTC refuses to disable. The _EN bit keeps being active even though the driver tries to disable it.

It is not known right now why the _EN bit refuses to turn off, but it might be related to the hanging.
Comment 12 Pierre Ossman 2009-11-28 13:50:12 UTC
Oddly enough, the _EN bit doesn't seem to release under any circumstance. I've tried with the VGA connected instead of S-video, as well as both UMS and KMS. No configuration is able to get _EN to 0.

As for the bug at hand, I discovered that if you disable unused stuff before setting the mode (instead of after, as is done now), things work fine. IOW, reading the vblank counter of CRTC 2 works fine until KMS starts fiddling with the settings.
Comment 13 Pierre Ossman 2009-11-28 13:54:34 UTC
Commit 9c2f909ea437a63a408d2398ecabe0b378dbb982 from the userspace driver might also be interesting:

http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=9c2f909ea437a63a408d2398ecabe0b378dbb982
Comment 14 Pierre Ossman 2009-11-29 03:26:03 UTC
Created attachment 31547 [details] [review]
radeon-crtc-off.patch

More testing has narrowed it down to the requirement that it's the mode reconfiguration of the first CRTC that breaks something.

agd5f seems to remember that UMS disables unused CRTCs before configuring the used one, the opposite of how KMS does it. This would explain why noone has complained about this bug until now. Doing the same in KMS is not that trivial though as it would mean reorganising the DRM layer.

Instead, we can copy the code which disables all active CRTCs before each reconfiguration, and extend it to also disable the unused ones.
Comment 15 Pierre Ossman 2009-11-29 09:37:03 UTC
Created attachment 31552 [details] [review]
radeon-crtc-off.patch

Walk the list from the DRM layer instead of hard-coding two CRTCs. This should make the code better prepared for the next gen with more CRTCs.
Comment 16 Alex Deucher 2009-12-04 07:08:13 UTC
I wonder if this is the proper fix:
http://marc.info/?l=dri-devel&m=125986155228388&w=4
Comment 17 Pierre Ossman 2013-11-15 16:47:49 UTC
You can probably close this bug as I have no intention of ever using S-video ever again. :)


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.