Bug 41248 - Monitor goes black when starting TV
Summary: Monitor goes black when starting TV
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2011-09-27 02:26 UTC by Gustav Näslund
Modified: 2011-10-06 07:25 UTC (History)
1 user (show)

See Also:
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) &&
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
               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.

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:
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.