Summary: | [r600 KMS] Hotplug detect does not work for HDMI monitor on Fusion E-350 board | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Simon Farnsworth <simon.farnsworth> | ||||||
Component: | DRM/Radeon | Assignee: | Default DRI bug account <dri-devel> | ||||||
Status: | RESOLVED MOVED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | qjn | ||||||
Version: | unspecified | ||||||||
Hardware: | x86 (IA32) | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Simon Farnsworth
2011-10-07 08:44:40 UTC
If you are getting HPD interrupts, radeon_hotplug_work_func() should be getting scheduled. From there drm_helper_hpd_irq_event() gets called which actually generates the uevent. drm_helper_hpd_irq_event() isn't generating uevents, because connector->status is not being updated somewhere, and is remaining at connector_status_connected, when it should be being updated to connector_status_disconnected. If I do cat /sys/class/drm/card0-HDMI-A-1/status, I see the status is "disconnected", but something resets it by the time the helper comes back round. Possibly connected to the following from dmesg: # cat /sys/class/drm/card0-HDMI-A-1/status ; dmesg -c [16791.042128] [drm:radeon_atombios_connected_scratch_regs], DFP1 disconnected # sleep 10 ; dmesg -c [16799.522394] [drm:radeon_atombios_connected_scratch_regs], DFP1 connected [16799.522407] [drm:output_poll_execute], [CONNECTOR:15:HDMI-A-1] status updated from 1 to 1 [16799.524465] [drm:output_poll_execute], [CONNECTOR:17:VGA-1] status updated from 2 to 2 So, I think I see the proximate cause of the bug, but not the reason for it: In radeon_dvi_detect at radeon_connectors.c:962, I see: if (!force) { ret = connector->status; goto out; } A HPD interrupt causes output_poll_execute at drm_crtc_helper.c:897 to execute connector->status = connector->funcs->detect(connector, false); as a result, I cannot see how a hotplug interrupt will ever result in a connector state changing. Created attachment 52093 [details] [review] 1/2: fix the digital only cases Created attachment 52094 [details] [review] 2/2: fix the mixed and analog cases I've applied both patches, and am testing on a machine with DVI-I and DisplayPort. Test sequence: 1) Boot system with no outputs connected. 2) Attach a DVI-D monitor, then remove it. 3) Attach a DVI-A to VGA adapter that has no load, then remove it. 4) Attach a DVI-A to VGA adapter that has load but no DDC, then remove it. 5) Attach a DVI-A to VGA adapter that has load and DDC, then remove it. 6) Repeat steps 2 to 5, watching for uevents. Note that the DVI-A to VGA adapter asserts HPD when connected. Results: DVI-D hotplug works fine. There is a delay on the first DVI-D hotplug after the connector has been used for VGA, but I get an event within 10 seconds. No events when I plug in the adapter with no load and wait 20 seconds. No events when I plug in the adapter with load but not DDC and wait 20 seconds. Events on connect only when I plug in the adapter with DDC. *** Bug 40252 has been marked as a duplicate of this bug. *** (In reply to comment #6) > Results: > > DVI-D hotplug works fine. There is a delay on the first DVI-D hotplug after the > connector has been used for VGA, but I get an event within 10 seconds. good. > > No events when I plug in the adapter with no load and wait 20 seconds. > As expected. > No events when I plug in the adapter with load but not DDC and wait 20 seconds. > There's no way to get events for this case without doing load detection in the hotplug polling. We don't currently support that case as load detection has the potential to cause flicker on connectors that share resources. If you need it, you can remove the !force checks in the connector detect functions, but you may get flicker on other connectors if they share resources. > Events on connect only when I plug in the adapter with DDC. As expected. A patch referencing this bug report has been merged in Linux v3.2-rc1: commit d0d0a225e6ad43314c9aa7ea081f76adc5098ad4 Author: Alex Deucher <alexander.deucher@amd.com> Date: Fri Oct 7 14:23:48 2011 -0400 drm/radeon/kms: handle !force case in connector detect more gracefully A patch referencing this bug report has been merged in Linux v3.2-rc1: commit 5f0a26128d66ef81613fe923d5c288942844ccdc Author: Alex Deucher <alexander.deucher@amd.com> Date: Fri Oct 7 14:23:47 2011 -0400 drm/radeon/kms: bail early in dvi_detect for digital only connectors A patch referencing a commit referencing this bug report has been merged in Linux v3.2-rc1: commit 340764465aa4a586ca332e61ae64883e5ad6f183 Author: Jerome Glisse <jglisse@redhat.com> Date: Mon Oct 24 18:16:34 2011 -0400 drm/radeon: avoid bouncing connector status btw disconnected & unknown -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/218. |
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.