From: Greg Kroah-Hartman Date: Wed, 1 Aug 2012 23:11:07 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.5.1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f2fe40222be73bfe2dfc0b7c7a4dd57f5304228;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch drm-radeon-fix-non-revealent-error-message.patch drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch --- diff --git a/queue-3.0/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch b/queue-3.0/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch new file mode 100644 index 00000000000..5be4a563d4c --- /dev/null +++ b/queue-3.0/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch @@ -0,0 +1,65 @@ +From 266dcba541a1ef7e5d82d9e67c67fde2910636e8 Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Thu, 19 Jul 2012 17:15:56 -0400 +Subject: drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2) + +From: Jerome Glisse + +commit 266dcba541a1ef7e5d82d9e67c67fde2910636e8 upstream. + +No need to retrain the link for passive adapters. + +v2: agd5f +- no passive DP to VGA adapters, update comments +- assign radeon_connector_atom_dig after we are sure + we have a digital connector as analog connectors + have different private data. +- get new sink type before checking for retrain. No + need to check if it's no longer a DP connection. + +Signed-off-by: Jerome Glisse +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_connectors.c | 27 ++++++++++++++++++++------- + 1 file changed, 20 insertions(+), 7 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_connectors.c ++++ b/drivers/gpu/drm/radeon/radeon_connectors.c +@@ -66,14 +66,27 @@ void radeon_connector_hotplug(struct drm + + /* just deal with DP (not eDP) here. */ + if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { +- int saved_dpms = connector->dpms; ++ struct radeon_connector_atom_dig *dig_connector = ++ radeon_connector->con_priv; + +- /* Only turn off the display it it's physically disconnected */ +- 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); +- connector->dpms = saved_dpms; ++ /* if existing sink type was not DP no need to retrain */ ++ if (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT) ++ return; ++ ++ /* first get sink type as it may be reset after (un)plug */ ++ dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); ++ /* don't do anything if sink is not display port, i.e., ++ * passive dp->(dvi|hdmi) adaptor ++ */ ++ if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { ++ int saved_dpms = connector->dpms; ++ /* Only turn off the display if it's physically disconnected */ ++ 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); ++ connector->dpms = saved_dpms; ++ } + } + } + diff --git a/queue-3.0/drm-radeon-fix-non-revealent-error-message.patch b/queue-3.0/drm-radeon-fix-non-revealent-error-message.patch new file mode 100644 index 00000000000..b325d04c985 --- /dev/null +++ b/queue-3.0/drm-radeon-fix-non-revealent-error-message.patch @@ -0,0 +1,68 @@ +From 8d1c702aa0b2c4b22b0742b72a1149d91690674b Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Tue, 17 Jul 2012 17:17:16 -0400 +Subject: drm/radeon: fix non revealent error message + +From: Jerome Glisse + +commit 8d1c702aa0b2c4b22b0742b72a1149d91690674b upstream. + +We want to print link status query failed only if it's +an unexepected fail. If we query to see if we need +link training it might be because there is nothing +connected and thus link status query have the right +to fail in that case. + +To avoid printing failure when it's expected, move the +failure message to proper place. + +Signed-off-by: Jerome Glisse +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atombios_dp.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/radeon/atombios_dp.c ++++ b/drivers/gpu/drm/radeon/atombios_dp.c +@@ -22,6 +22,7 @@ + * + * Authors: Dave Airlie + * Alex Deucher ++ * Jerome Glisse + */ + #include "drmP.h" + #include "radeon_drm.h" +@@ -624,7 +625,6 @@ static bool radeon_dp_get_link_status(st + ret = radeon_dp_aux_native_read(radeon_connector, DP_LANE0_1_STATUS, + link_status, DP_LINK_STATUS_SIZE, 100); + if (ret <= 0) { +- DRM_ERROR("displayport link status failed\n"); + return false; + } + +@@ -797,8 +797,10 @@ static int radeon_dp_link_train_cr(struc + else + mdelay(dp_info->rd_interval * 4); + +- if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) ++ if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) { ++ DRM_ERROR("displayport link status failed\n"); + break; ++ } + + if (dp_clock_recovery_ok(dp_info->link_status, dp_info->dp_lane_count)) { + clock_recovery = true; +@@ -860,8 +862,10 @@ static int radeon_dp_link_train_ce(struc + else + mdelay(dp_info->rd_interval * 4); + +- if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) ++ if (!radeon_dp_get_link_status(dp_info->radeon_connector, dp_info->link_status)) { ++ DRM_ERROR("displayport link status failed\n"); + break; ++ } + + if (dp_channel_eq_ok(dp_info->link_status, dp_info->dp_lane_count)) { + channel_eq = true; diff --git a/queue-3.0/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch b/queue-3.0/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch new file mode 100644 index 00000000000..e22a99bcbc2 --- /dev/null +++ b/queue-3.0/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch @@ -0,0 +1,48 @@ +From ca2ccde5e2f24a792caa4cca919fc5c6f65d1887 Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Thu, 19 Jul 2012 17:25:55 -0400 +Subject: drm/radeon: on hotplug force link training to happen (v2) + +From: Jerome Glisse + +commit ca2ccde5e2f24a792caa4cca919fc5c6f65d1887 upstream. + +To have DP behave like VGA/DVI we need to retrain the link +on hotplug. For this to happen we need to force link +training to happen by setting connector dpms to off +before asking it turning it on again. + +v2: agd5f +- drop the dp_get_link_status() change in atombios_dp.c + for now. We still need the dpms OFF change. + +Signed-off-by: Jerome Glisse +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_connectors.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_connectors.c ++++ b/drivers/gpu/drm/radeon/radeon_connectors.c +@@ -81,10 +81,16 @@ void radeon_connector_hotplug(struct drm + if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { + int saved_dpms = connector->dpms; + /* Only turn off the display if it's physically disconnected */ +- if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) ++ 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)) ++ } else if (radeon_dp_needs_link_train(radeon_connector)) { ++ /* set it to OFF so that drm_helper_connector_dpms() ++ * won't return immediately since the current state ++ * is ON at this point. ++ */ ++ connector->dpms = DRM_MODE_DPMS_OFF; + drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); ++ } + connector->dpms = saved_dpms; + } + } diff --git a/queue-3.0/drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch b/queue-3.0/drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch new file mode 100644 index 00000000000..569c80548ad --- /dev/null +++ b/queue-3.0/drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch @@ -0,0 +1,44 @@ +From f60ec4c7df043df81e62891ac45383d012afe0da Mon Sep 17 00:00:00 2001 +From: Michel Dänzer +Date: Tue, 17 Jul 2012 19:02:09 +0200 +Subject: drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns. + +From: Michel Dänzer + +commit f60ec4c7df043df81e62891ac45383d012afe0da upstream. + +This could previously fail if either of the enabled displays was using a +horizontal resolution that is a multiple of 128, and only the leftmost column +of the cursor was (supposed to be) visible at the right edge of that display. + +The solution is to move the cursor one pixel to the left in that case. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33183 + +Signed-off-by: Michel Dänzer +Reviewed-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_cursor.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/radeon_cursor.c ++++ b/drivers/gpu/drm/radeon/radeon_cursor.c +@@ -257,8 +257,14 @@ int radeon_crtc_cursor_move(struct drm_c + if (!(cursor_end & 0x7f)) + w--; + } +- if (w <= 0) ++ if (w <= 0) { + w = 1; ++ cursor_end = x - xorigin + w; ++ if (!(cursor_end & 0x7f)) { ++ x--; ++ WARN_ON_ONCE(x < 0); ++ } ++ } + } + } + diff --git a/queue-3.0/series b/queue-3.0/series index 3a260206393..ec17c1bcbd9 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -17,3 +17,7 @@ stable-update-references-to-older-2.6-versions-for-3.x.patch workqueue-perform-cpu-down-operations-from-low-priority-cpu_notifier.patch acpi-ac-prevent-oops-on-some-boxes-due-to-missing-check-power_supply_register-return-value-check.patch btrfs-call-the-ordered-free-operation-without-any-locks-held.patch +drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch +drm-radeon-fix-non-revealent-error-message.patch +drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch +drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch