Skip to contentSkip to conversation

Radeon monitor + hdmi TV regression between drm-core-next and drm-fixes

DISCUSSION Andy Furniss 2 participants 5 messages Nov 4, 2012 – Nov 5, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

For the last 2 years when running a DVI 60Hz monitor with a radeon HD4890 and a (native 50Hz) HDMI TV I've been able to boot/startx with the TV off and then turn TV on and -

xrandr --output DVI-0 --auto

to bring up the the TV and get a clone of monitor.

This still works with drm-core-next but not with drm-fixes (todays or from a few days ago).

With df I now loose the monitor with signal out of range when doing above, the TV output is OK. To get the monitor back I need to turn off TV, then off/auto the monitor.

xrandr --output DVI-0 --off
xrandr --output DVI-1 --off
xrandr --output DVI-1 --auto

The output from xrandr while the monitor is showing signal out of range looks normal.

If I boot with the TV on it works OK.

#1 lore raw
Quoted 15 lines · Andy Furniss

For the last 2 years when running a DVI 60Hz monitor with a radeon HD4890 and a (native 50Hz) HDMI TV I've been able to boot/startx with the TV off and then turn TV on and -

xrandr --output DVI-0 --auto

to bring up the the TV and get a clone of monitor.

This still works with drm-core-next but not with drm-fixes (todays or from a few days ago).

With df I now loose the monitor with signal out of range when doing above, the TV output is OK. To get the monitor back I need to turn off TV, then off/auto the monitor.

Quoted 8 lines

xrandr --output DVI-0 --off
xrandr --output DVI-1 --off
xrandr --output DVI-1 --auto

The output from xrandr while the monitor is showing signal out of range looks normal.

If I boot with the TV on it works OK.

Can you bisect?

Alex

#2 lore raw
Quoted 20 lines · Alex Deucher
Quoted 19 lines · Andy Furniss

For the last 2 years when running a DVI 60Hz monitor with a radeon HD4890 and a (native 50Hz) HDMI TV I've been able to boot/startx with the TV off and then turn TV on and -

xrandr --output DVI-0 --auto

to bring up the the TV and get a clone of monitor.

This still works with drm-core-next but not with drm-fixes (todays or from a few days ago).

With df I now loose the monitor with signal out of range when doing above, the TV output is OK. To get the monitor back I need to turn off TV, then off/auto the monitor.

xrandr --output DVI-0 --off
xrandr --output DVI-1 --off
xrandr --output DVI-1 --auto

Quoted 6 lines
Quoted 4 lines

The output from xrandr while the monitor is showing signal out of range looks normal.

If I boot with the TV on it works OK.

Can you bisect?

29dbe3bcd2e28e71823febdca989d63d5c27d152 is the first bad commit commit 29dbe3bcd2e28e71823febdca989d63d5c27d152

Author: Alex Deucher <[email protected]>
Date:   Fri Oct 5 10:22:02 2012 -0400

drm/radeon: allocate PPLLs from low to high

The order shouldn't matter, but there have been problems reported on certain older asics. This behaves more like the original code before the PPLL allocation rework.

Cc Markus Trippelsdorf <[email protected]>
#3 lore raw
Quoted 41 lines · Andy Furniss
Quoted 24 lines · Alex Deucher
Quoted 22 lines · Andy Furniss

For the last 2 years when running a DVI 60Hz monitor with a radeon HD4890 and a (native 50Hz) HDMI TV I've been able to boot/startx with the TV off and then turn TV on and -

xrandr --output DVI-0 --auto

to bring up the the TV and get a clone of monitor.

This still works with drm-core-next but not with drm-fixes (todays or from a
few days ago).

With df I now loose the monitor with signal out of range when doing above,
the TV output is OK. To get the monitor back I need to turn off TV, then off/auto the monitor.

xrandr --output DVI-0 --off
xrandr --output DVI-1 --off
xrandr --output DVI-1 --auto

Quoted 7 lines
Quoted 4 lines

The output from xrandr while the monitor is showing signal out of range looks normal.

If I boot with the TV on it works OK.

Can you bisect?

29dbe3bcd2e28e71823febdca989d63d5c27d152 is the first bad commit commit 29dbe3bcd2e28e71823febdca989d63d5c27d152

Author: Alex Deucher <[email protected]>
Date:   Fri Oct 5 10:22:02 2012 -0400

drm/radeon: allocate PPLLs from low to high

Quoted 9 lines

The order shouldn't matter, but there have been problems reported on certain older asics. This behaves more like the original code before the PPLL allocation rework.

Cc Markus Trippelsdorf <[email protected]>

That's bizarre. That patch reverts the behavior back to the 3.6 and earlier kernel behavior. I guess it's some issue with the ordering of the modesetting programming sequence. I've attached a couple of things to try.

The first patch is a simple fix. It just reverts back to the previous pll allocation order for discrete cards like yours:
0001-drm-radeon-dce3-switch-back-to-old-pll-allocation-or.patch

The second set of patches implements a more complex fix which may help regardless of the order in which plls are allocated:
0001-drm-radeon-split-out-the-pll-disable-into-a-helper-f.patch 0002-drm-radeon-add-a-helper-to-check-if-a-pll-is-shared.patch 0003-drm-radeon-disable-the-pll-before-a-modeset.patch

Can you see if the second set helps? If not, please try the first patch.

Alex

From b6cd7967513fe86c0822db4b41745da2140914b7 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 5 Nov 2012 10:16:12 -0500
Subject: [PATCH] drm/radeon/dce3: switch back to old pll allocation order for
discrete

The order shouldn't matter, but this seems to cause regressions for certain specific cases. This should fix it for now. We probably need to investigate a proper fix in the next development cycle.

---
 drivers/gpu/drm/radeon/atombios_crtc.c |   54 ++++++++++++++++++-------------
 1 files changed, 31 insertions(+), 23 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +31 -23
index 2e566e1..3bce029 100644
@@ -1696,35 +1696,43 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
 			return ATOM_PPLL2;
 		DRM_ERROR("unable to allocate a PPLL\n");
 		return ATOM_PPLL_INVALID;
-	} else {
-		if (ASIC_IS_AVIVO(rdev)) {
-			/* in DP mode, the DP ref clock can come from either PPLL
-			 * depending on the asic:
-			 * DCE3: PPLL1 or PPLL2
-			 */
-			if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) {
-				/* use the same PPLL for all DP monitors */
-				pll = radeon_get_shared_dp_ppll(crtc);
-				if (pll != ATOM_PPLL_INVALID)
-					return pll;
-			} else {
-				/* use the same PPLL for all monitors with the same clock */
-				pll = radeon_get_shared_nondp_ppll(crtc);
-				if (pll != ATOM_PPLL_INVALID)
-					return pll;
-			}
-			/* all other cases */
-			pll_in_use = radeon_get_pll_use_mask(crtc);
+	} else if (ASIC_IS_AVIVO(rdev)) {
+		/* in DP mode, the DP ref clock can come from either PPLL
+		 * depending on the asic:
+		 * DCE3: PPLL1 or PPLL2
+		 */
+		if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) {
+			/* use the same PPLL for all DP monitors */
+			pll = radeon_get_shared_dp_ppll(crtc);
+			if (pll != ATOM_PPLL_INVALID)
+				return pll;
+		} else {
+			/* use the same PPLL for all monitors with the same clock */
+			pll = radeon_get_shared_nondp_ppll(crtc);
+			if (pll != ATOM_PPLL_INVALID)
+				return pll;
+		}
+		/* all other cases */
+		pll_in_use = radeon_get_pll_use_mask(crtc);
+		/* the order shouldn't matter here, but we probably
+		 * need this until we have atomic modeset
+		 */
+		if (rdev->flags & RADEON_IS_IGP) {
 			if (!(pll_in_use & (1 << ATOM_PPLL1)))
 				return ATOM_PPLL1;
 			if (!(pll_in_use & (1 << ATOM_PPLL2)))
 				return ATOM_PPLL2;
-			DRM_ERROR("unable to allocate a PPLL\n");
-			return ATOM_PPLL_INVALID;
 		} else {
-			/* on pre-R5xx asics, the crtc to pll mapping is hardcoded */
-			return radeon_crtc->crtc_id;
+			if (!(pll_in_use & (1 << ATOM_PPLL2)))
+				return ATOM_PPLL2;
+			if (!(pll_in_use & (1 << ATOM_PPLL1)))
+				return ATOM_PPLL1;
 		}
+		DRM_ERROR("unable to allocate a PPLL\n");
+		return ATOM_PPLL_INVALID;
+	} else {
+		/* on pre-R5xx asics, the crtc to pll mapping is hardcoded */
+		return radeon_crtc->crtc_id;
 	}
 }
 
Signature · 1 line
1.7.7.5

From 9ba29cd4eef71624ad8a02291dbdc3a3199be59d Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 5 Nov 2012 10:28:55 -0500
Subject: [PATCH 1/3] drm/radeon: split out the pll disable into a helper
function

This will be used later to share code for disabling the pll.

---
 drivers/gpu/drm/radeon/atombios_crtc.c |   74 +++++++++++++++++++-------------
 1 files changed, 44 insertions(+), 30 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +44 -30

98 lines not on this page · raw message

Signature · 1 line
1.7.7.5

From cb637523b3fff880e37cc474266f62cb1feb4ecb Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 5 Nov 2012 10:41:48 -0500
Subject: [PATCH 2/3] drm/radeon: add a helper to check if a pll is shared

reduces duplicated code.

---
 drivers/gpu/drm/radeon/atombios_crtc.c |   63 +++++++++++++++++++-------------
 1 files changed, 38 insertions(+), 25 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +38 -25

86 lines not on this page · raw message

Signature · 1 line
1.7.7.5

From f7a54adf9b66384afa16fcd00b4602f82e4b6ae9 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Mon, 5 Nov 2012 10:44:53 -0500
Subject: [PATCH 3/3] drm/radeon: disable the pll before a modeset

May fix display issues in certain cases.

---
 drivers/gpu/drm/radeon/atombios_crtc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/atombios_crtc.c +1 -0
index b072c1c..62a72fd 100644
@@ -1901,6 +1901,7 @@ static void atombios_crtc_prepare(struct drm_crtc *crtc)
 
 	atombios_lock_crtc(crtc, ATOM_ENABLE);
 	atombios_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
+	atombios_disable_pll(crtc);
 }
 
 static void atombios_crtc_commit(struct drm_crtc *crtc)
Signature · 1 line
1.7.7.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 61 lines · Alex Deucher
Quoted 41 lines · Andy Furniss
Quoted 24 lines · Alex Deucher
Quoted 22 lines · Andy Furniss

For the last 2 years when running a DVI 60Hz monitor with a radeon HD4890 and a (native 50Hz) HDMI TV I've been able to boot/startx with the TV off and then turn TV on and -

xrandr --output DVI-0 --auto

to bring up the the TV and get a clone of monitor.

This still works with drm-core-next but not with drm-fixes (todays or from a
few days ago).

With df I now loose the monitor with signal out of range when doing above,
the TV output is OK. To get the monitor back I need to turn off TV, then off/auto the monitor.

xrandr --output DVI-0 --off
xrandr --output DVI-1 --off
xrandr --output DVI-1 --auto

Quoted 7 lines
Quoted 4 lines

The output from xrandr while the monitor is showing signal out of range looks normal.

If I boot with the TV on it works OK.

Can you bisect?

29dbe3bcd2e28e71823febdca989d63d5c27d152 is the first bad commit commit 29dbe3bcd2e28e71823febdca989d63d5c27d152

Author: Alex Deucher <[email protected]>
Date:   Fri Oct 5 10:22:02 2012 -0400

drm/radeon: allocate PPLLs from low to high

Quoted 9 lines

The order shouldn't matter, but there have been problems reported on certain older asics. This behaves more like the original code before the PPLL allocation rework.

Cc Markus Trippelsdorf <[email protected]>

That's bizarre. That patch reverts the behavior back to the 3.6 and earlier kernel behavior. I guess it's some issue with the ordering of the modesetting programming sequence. I've attached a couple of things to try.

The first patch is a simple fix. It just reverts back to the previous pll allocation order for discrete cards like yours:
0001-drm-radeon-dce3-switch-back-to-old-pll-allocation-or.patch

Quoted 7 lines

The second set of patches implements a more complex fix which may help regardless of the order in which plls are allocated:
0001-drm-radeon-split-out-the-pll-disable-into-a-helper-f.patch 0002-drm-radeon-add-a-helper-to-check-if-a-pll-is-shared.patch 0003-drm-radeon-disable-the-pll-before-a-modeset.patch

Can you see if the second set helps? If not, please try the first patch.

The second set doesn't fix it.

The first patch does.