From: Greg Kroah-Hartman Date: Wed, 1 Aug 2012 23:07:55 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.5.1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1019bcad4309b3fb3818080558f758e8fd3ee0ba;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: drm-radeon-fix-bo-creation-retry-path.patch drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch drm-radeon-fix-fence-related-segfault-in-cs.patch 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.4/drm-radeon-fix-bo-creation-retry-path.patch b/queue-3.4/drm-radeon-fix-bo-creation-retry-path.patch new file mode 100644 index 00000000000..5f7eb06799c --- /dev/null +++ b/queue-3.4/drm-radeon-fix-bo-creation-retry-path.patch @@ -0,0 +1,41 @@ +From d1c7871ddb1f588b8eb35affd9ee1a3d5e11cd0c Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Thu, 12 Jul 2012 18:23:05 -0400 +Subject: drm/radeon: fix bo creation retry path + +From: Jerome Glisse + +commit d1c7871ddb1f588b8eb35affd9ee1a3d5e11cd0c upstream. + +Retry label was at wrong place in function leading to memory +leak. + +Signed-off-by: Jerome Glisse +Reviewed-by: Michel Dänzer +Reviewed-by: Christian König +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_object.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/radeon_object.c ++++ b/drivers/gpu/drm/radeon/radeon_object.c +@@ -136,7 +136,6 @@ int radeon_bo_create(struct radeon_devic + acc_size = ttm_bo_dma_acc_size(&rdev->mman.bdev, size, + sizeof(struct radeon_bo)); + +-retry: + bo = kzalloc(sizeof(struct radeon_bo), GFP_KERNEL); + if (bo == NULL) + return -ENOMEM; +@@ -150,6 +149,8 @@ retry: + bo->surface_reg = -1; + INIT_LIST_HEAD(&bo->list); + INIT_LIST_HEAD(&bo->va); ++ ++retry: + radeon_ttm_placement_from_domain(bo, domain); + /* Kernel allocation are uninterruptible */ + mutex_lock(&rdev->vram_mutex); diff --git a/queue-3.4/drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch b/queue-3.4/drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch new file mode 100644 index 00000000000..563ad2a30da --- /dev/null +++ b/queue-3.4/drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch @@ -0,0 +1,47 @@ +From fcedac670c3da0d17aaa5db1708694971e8024a9 Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Tue, 24 Jul 2012 17:06:11 -0400 +Subject: drm/radeon: fix dpms on/off on trinity/aruba v2 + +From: Jerome Glisse + +commit fcedac670c3da0d17aaa5db1708694971e8024a9 upstream. + +The external encoder need to be setup again before enabling the +transmiter. This seems to be only needed on some trinity/aruba +to fix dpms on. + +v2: Add comment, only setup again on dce6 ie aruba or newer. + +Signed-off-by: Jerome Glisse +Reviewed-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atombios_encoders.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/atombios_encoders.c ++++ b/drivers/gpu/drm/radeon/atombios_encoders.c +@@ -1392,10 +1392,18 @@ radeon_atom_encoder_dpms_dig(struct drm_ + case DRM_MODE_DPMS_ON: + /* some early dce3.2 boards have a bug in their transmitter control table */ + if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730) || +- ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) ++ ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) { ++ if (ASIC_IS_DCE6(rdev)) { ++ /* It seems we need to call ATOM_ENCODER_CMD_SETUP again ++ * before reenabling encoder on DPMS ON, otherwise we never ++ * get picture ++ */ ++ atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); ++ } + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); +- else ++ } else { + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); ++ } + if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { + if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { + atombios_set_edp_panel_power(connector, diff --git a/queue-3.4/drm-radeon-fix-fence-related-segfault-in-cs.patch b/queue-3.4/drm-radeon-fix-fence-related-segfault-in-cs.patch new file mode 100644 index 00000000000..eab1d00a3ae --- /dev/null +++ b/queue-3.4/drm-radeon-fix-fence-related-segfault-in-cs.patch @@ -0,0 +1,33 @@ +From 93bf888c5c730605e3470f5d2381f296eda88d79 Mon Sep 17 00:00:00 2001 +From: Christian König +Date: Tue, 3 Jul 2012 14:05:41 +0200 +Subject: drm/radeon: fix fence related segfault in CS + +From: Christian König + +commit 93bf888c5c730605e3470f5d2381f296eda88d79 upstream. + +Don't return success if scheduling the IB fails, otherwise +we end up with an oops in ttm_eu_fence_buffer_objects. + +Signed-off-by: Christian König +Reviewed-by: Jerome Glisse +Reviewed-by: Michel Dänzer +Reviewed-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_cs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/radeon_cs.c ++++ b/drivers/gpu/drm/radeon/radeon_cs.c +@@ -377,7 +377,7 @@ static int radeon_cs_ib_chunk(struct rad + if (r) { + DRM_ERROR("Failed to schedule IB !\n"); + } +- return 0; ++ return r; + } + + static int radeon_bo_vm_update_pte(struct radeon_cs_parser *parser, diff --git a/queue-3.4/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch b/queue-3.4/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch new file mode 100644 index 00000000000..4d0356513fd --- /dev/null +++ b/queue-3.4/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 +@@ -64,14 +64,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.4/drm-radeon-fix-non-revealent-error-message.patch b/queue-3.4/drm-radeon-fix-non-revealent-error-message.patch new file mode 100644 index 00000000000..f1cdba1a822 --- /dev/null +++ b/queue-3.4/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" +@@ -637,7 +638,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; + } + +@@ -816,8 +816,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; +@@ -879,8 +881,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.4/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch b/queue-3.4/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch new file mode 100644 index 00000000000..aadca3d493d --- /dev/null +++ b/queue-3.4/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 +@@ -79,10 +79,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.4/drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch b/queue-3.4/drm-radeon-try-harder-to-avoid-hw-cursor-ending-on-a-multiple-of-128-columns.patch new file mode 100644 index 00000000000..693cff65e3e --- /dev/null +++ b/queue-3.4/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 +@@ -262,8 +262,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.4/series b/queue-3.4/series index 5dba81e26b8..f86610b11e4 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -54,3 +54,10 @@ qeth-repair-crash-in-qeth_l3_vlan_rx_kill_vid.patch tg3-add-device-id-of-apple-thunderbolt-ethernet-device.patch tg3-fix-read-dma-workaround-for-5719-a0.patch tg3-fix-race-condition-in-tg3_get_stats64.patch +drm-radeon-fix-fence-related-segfault-in-cs.patch +drm-radeon-fix-bo-creation-retry-path.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 +drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch