Bug 41248

Summary: Monitor goes black when starting TV
Product: DRI Reporter: Gustav Näslund <gonaslund>
Component: DRM/RadeonAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: leann.ogasawara
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://launchpad.net/bugs/860868
Whiteboard:
i915 platform: i915 features:

Description Gustav Näslund 2011-09-27 02:26:51 UTC
The problem is this:
I have an HD5770 card with 3 screens connected, 1 monitor to DisplaPort-0 and 1 monitor to the DVI-0 and a TV to the HDMI-0

When I turn my tv on the screen connected to displayport immidiately goes black and it says "no signal". To wake this screen again i need to issue the command "xset dpms force suspend" This will wake the screen connected to the displayport. The same thing also happens when I turn the tv off again.

How it should work and has worked before:
I should be able to turn my tv on and off without it interfering with my other screens.

I have pinned this regression down to happen in the kernel 3.0.3 found here http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.0.3-oneiric/
But it is alright in the kernel 3.0.2 found here http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.0.2-oneiric/ 

This is the changes made between 3.0.2 and 3.0.3 that i think has something to do with my problem.

Alex Deucher (3):
      drm/radeon/kms: don't enable connectors that are off in the hotplug handler
      drm/radeon/kms: fix regression is handling>2 heads on cedar/caicos
      drm/radeon/kms: don't try to be smart in the hpd handler
Comment 1 Gustav Näslund 2011-09-29 01:45:47 UTC
I have also filed this bug @ launchpad and we have found the problematic patches
Comment 2 Leann Ogasawara 2011-09-29 09:49:40 UTC
Just adding relevant information here.  Gustav has tested and confirmed that reverting the following two patches resolves the issue:

commit d5811e8731213f80c80d89e980505052f16aca1c
Author: Alex Deucher <alexander.deucher@amd.com>
Date: Sat Aug 13 13:36:13 2011 -0400

    drm/radeon/kms: don't try to be smart in the hpd handler

commit 73104b5cfe3067d68f2c2de3f3d4d4964c55873e
Author: Alex Deucher <alexander.deucher@amd.com>
Date: Tue Aug 9 17:09:06 2011 +0000

    drm/radeon/kms: don't enable connectors that are off in the hotplug handler

Gustav has also tested and confirmed the issue remains in the latest v3.1-rc8 upstream kernel.
Comment 3 Alex Deucher 2011-09-29 22:50:19 UTC
I don't have access to source code at the moment, but the following change should fix the issue.  I'll make a proper patch in the next few days.  The existing code has a logic error; we should only disable an output in the hotplug handler if the monitor is physically disconnected.

Replace this code in radeon_connector_hotplug() in radeon_connectors.c:
		if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
		    radeon_dp_needs_link_train(radeon_connector))
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
		else
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
with:
               if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
                       drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
               else if (radeon_dp_needs_link_train(radeon_connector))
                       drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
Comment 4 Leann Ogasawara 2011-09-30 13:23:30 UTC
Thanks Alex.  Gustav, I've built an Ubuntu test kernel with the changes Alex noted in comment #3.  I've placed the patch and test kernel at the following location.  Please test and let us know your results.

http://people.canonical.com/~ogasawara/lp860868/v7/
Comment 5 Gustav Näslund 2011-09-30 14:45:03 UTC
Success! it works as it should
Comment 6 Alex Deucher 2011-10-03 05:38:17 UTC
I've sent the patch upstream:
http://lists.freedesktop.org/archives/dri-devel/2011-October/014882.html
Comment 7 Florian Mickler 2011-10-06 05:51:15 UTC
A patch referencing this bug report has been merged in Linux v3.1-rc9:

commit 5ba7ddf81634bfdf32d09261d2959e3f5b7c4263
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Oct 3 08:37:33 2011 -0400

    drm/radeon/kms: Fix logic error in DP HPD handler
Comment 8 Gustav Näslund 2011-10-06 06:04:07 UTC
Yes, that's correct and i have tried the kernel v3.1-rc9 and this bug that occured for me was fixed with it.

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.