From: Greg Kroah-Hartman Date: Fri, 27 Sep 2013 23:07:16 +0000 (-0700) Subject: 3.11-stable patches X-Git-Tag: v3.0.98~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c464dbab7129d6138da51e20241a1691c9eb7ae2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.11-stable patches added patches: drm-radeon-add-some-additional-berlin-pci-ids.patch drm-radeon-atom-workaround-vbios-bug-in-transmitter-table-on-rs880-v2.patch drm-radeon-avoid-uvd-corruptions-on-agp-cards.patch drm-radeon-dpm-fix-fallback-for-empty-uvd-clocks.patch drm-radeon-dpm-handle-bapm-on-trinity.patch drm-radeon-dpm-rs780-don-t-enable-sclk-scaling-if-not-required.patch drm-radeon-fix-panel-scaling-with-edp-and-lvds-bridges.patch drm-radeon-r6xx-add-a-stubbed-out-set_uvd_clocks-callback.patch skge-fix-broken-driver.patch tg3-don-t-turn-off-led-on-5719-serdes-port-0.patch tg3-expand-led-off-fix-to-include-5720.patch --- diff --git a/queue-3.11/drm-radeon-add-some-additional-berlin-pci-ids.patch b/queue-3.11/drm-radeon-add-some-additional-berlin-pci-ids.patch new file mode 100644 index 00000000000..1001a6425cf --- /dev/null +++ b/queue-3.11/drm-radeon-add-some-additional-berlin-pci-ids.patch @@ -0,0 +1,33 @@ +From 9a71677874d200865433647e9282fcf9fa6b05dd Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 4 Sep 2013 16:48:40 -0400 +Subject: drm/radeon: add some additional berlin pci ids + +From: Alex Deucher + +commit 9a71677874d200865433647e9282fcf9fa6b05dd upstream. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + include/drm/drm_pciids.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -12,11 +12,14 @@ + {0x1002, 0x130F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1310, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ ++ {0x1002, 0x1312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1313, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1316, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ ++ {0x1002, 0x1317, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x131B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x131C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ ++ {0x1002, 0x131D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ + {0x1002, 0x3151, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ diff --git a/queue-3.11/drm-radeon-atom-workaround-vbios-bug-in-transmitter-table-on-rs880-v2.patch b/queue-3.11/drm-radeon-atom-workaround-vbios-bug-in-transmitter-table-on-rs880-v2.patch new file mode 100644 index 00000000000..734bdd439d1 --- /dev/null +++ b/queue-3.11/drm-radeon-atom-workaround-vbios-bug-in-transmitter-table-on-rs880-v2.patch @@ -0,0 +1,51 @@ +From 91f3a6aaf280294b07c05dfe606e6c27b7ba3c72 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 9 Sep 2013 10:54:22 -0400 +Subject: drm/radeon/atom: workaround vbios bug in transmitter table on rs880 (v2) + +From: Alex Deucher + +commit 91f3a6aaf280294b07c05dfe606e6c27b7ba3c72 upstream. + +The OUTPUT_ENABLE action jumps past the point in the coder where +the data_offset is set on certain rs780 cards. This worked +previously because the OUTPUT_ENABLE action is always called +immediately after the ENABLE action so the data_offset remained +set. In 6f8bbaf568c7f2c497558bfd04654c0b9841ad57 +(drm/radeon/atom: initialize more atom interpretor elements to 0), +we explictly reset data_offset to 0 between atom calls which then +caused this to fail. The fix is to just skip calling the +OUTPUT_ENABLE action on the problematic chipsets. The ENABLE +action does the same thing and more. Ultimately, we could +probably drop the OUTPUT_ENABLE action all together on DCE3 +asics. + +fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=60791 + +v2: only rs880 seems to be affected + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atombios_encoders.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/atombios_encoders.c ++++ b/drivers/gpu/drm/radeon/atombios_encoders.c +@@ -1652,8 +1652,12 @@ radeon_atom_encoder_dpms_dig(struct drm_ + atombios_dig_encoder_setup(encoder, ATOM_ENABLE, 0); + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_SETUP, 0, 0); + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); +- /* some early dce3.2 boards have a bug in their transmitter control table */ +- if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730)) ++ /* some dce3.x boards have a bug in their transmitter control table. ++ * ACTION_ENABLE_OUTPUT can probably be dropped since ACTION_ENABLE ++ * does the same thing and more. ++ */ ++ if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730) && ++ (rdev->family != CHIP_RS880)) + atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); + } + if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { diff --git a/queue-3.11/drm-radeon-avoid-uvd-corruptions-on-agp-cards.patch b/queue-3.11/drm-radeon-avoid-uvd-corruptions-on-agp-cards.patch new file mode 100644 index 00000000000..d2db599db56 --- /dev/null +++ b/queue-3.11/drm-radeon-avoid-uvd-corruptions-on-agp-cards.patch @@ -0,0 +1,36 @@ +From 4f66c59922cbcda14c9e103e6c7f4ee616360d43 Mon Sep 17 00:00:00 2001 +From: Christian König +Date: Sun, 15 Sep 2013 13:31:28 +0200 +Subject: drm/radeon: avoid UVD corruptions on AGP cards + +From: Christian König + +commit 4f66c59922cbcda14c9e103e6c7f4ee616360d43 upstream. + +Putting everything into VRAM seems to help. + +Signed-off-by: Christian König +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_cs.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_cs.c ++++ b/drivers/gpu/drm/radeon/radeon_cs.c +@@ -80,9 +80,11 @@ static int radeon_cs_parser_relocs(struc + p->relocs[i].lobj.bo = p->relocs[i].robj; + p->relocs[i].lobj.written = !!r->write_domain; + +- /* the first reloc of an UVD job is the +- msg and that must be in VRAM */ +- if (p->ring == R600_RING_TYPE_UVD_INDEX && i == 0) { ++ /* the first reloc of an UVD job is the msg and that must be in ++ VRAM, also but everything into VRAM on AGP cards to avoid ++ image corruptions */ ++ if (p->ring == R600_RING_TYPE_UVD_INDEX && ++ (i == 0 || p->rdev->flags & RADEON_IS_AGP)) { + /* TODO: is this still needed for NI+ ? */ + p->relocs[i].lobj.domain = + RADEON_GEM_DOMAIN_VRAM; diff --git a/queue-3.11/drm-radeon-dpm-fix-fallback-for-empty-uvd-clocks.patch b/queue-3.11/drm-radeon-dpm-fix-fallback-for-empty-uvd-clocks.patch new file mode 100644 index 00000000000..4432f608581 --- /dev/null +++ b/queue-3.11/drm-radeon-dpm-fix-fallback-for-empty-uvd-clocks.patch @@ -0,0 +1,73 @@ +From 84f3d9f7b4781dea6e11dcaf7f81367c1b39fef0 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Tue, 10 Sep 2013 09:40:37 -0400 +Subject: drm/radeon/dpm: fix fallback for empty UVD clocks + +From: Alex Deucher + +commit 84f3d9f7b4781dea6e11dcaf7f81367c1b39fef0 upstream. + +Some older 6xx-7xx boards didn't always fill in the +UVD clocks properly in the UVD power states. This +leads to the driver trying to set a 0 clock which +results in slow or broken UVD playback. + +Fixes: +https://bugs.freedesktop.org/show_bug.cgi?id=69120 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/rs780_dpm.c | 10 +++++++--- + drivers/gpu/drm/radeon/rv770_dpm.c | 10 +++++++--- + 2 files changed, 14 insertions(+), 6 deletions(-) + +--- a/drivers/gpu/drm/radeon/rs780_dpm.c ++++ b/drivers/gpu/drm/radeon/rs780_dpm.c +@@ -717,14 +717,18 @@ static void rs780_parse_pplib_non_clock_ + if (ATOM_PPLIB_NONCLOCKINFO_VER1 < table_rev) { + rps->vclk = le32_to_cpu(non_clock_info->ulVCLK); + rps->dclk = le32_to_cpu(non_clock_info->ulDCLK); +- } else if (r600_is_uvd_state(rps->class, rps->class2)) { +- rps->vclk = RS780_DEFAULT_VCLK_FREQ; +- rps->dclk = RS780_DEFAULT_DCLK_FREQ; + } else { + rps->vclk = 0; + rps->dclk = 0; + } + ++ if (r600_is_uvd_state(rps->class, rps->class2)) { ++ if ((rps->vclk == 0) || (rps->dclk == 0)) { ++ rps->vclk = RS780_DEFAULT_VCLK_FREQ; ++ rps->dclk = RS780_DEFAULT_DCLK_FREQ; ++ } ++ } ++ + if (rps->class & ATOM_PPLIB_CLASSIFICATION_BOOT) + rdev->pm.dpm.boot_ps = rps; + if (rps->class & ATOM_PPLIB_CLASSIFICATION_UVDSTATE) +--- a/drivers/gpu/drm/radeon/rv770_dpm.c ++++ b/drivers/gpu/drm/radeon/rv770_dpm.c +@@ -2147,14 +2147,18 @@ static void rv7xx_parse_pplib_non_clock_ + if (ATOM_PPLIB_NONCLOCKINFO_VER1 < table_rev) { + rps->vclk = le32_to_cpu(non_clock_info->ulVCLK); + rps->dclk = le32_to_cpu(non_clock_info->ulDCLK); +- } else if (r600_is_uvd_state(rps->class, rps->class2)) { +- rps->vclk = RV770_DEFAULT_VCLK_FREQ; +- rps->dclk = RV770_DEFAULT_DCLK_FREQ; + } else { + rps->vclk = 0; + rps->dclk = 0; + } + ++ if (r600_is_uvd_state(rps->class, rps->class2)) { ++ if ((rps->vclk == 0) || (rps->dclk == 0)) { ++ rps->vclk = RV770_DEFAULT_VCLK_FREQ; ++ rps->dclk = RV770_DEFAULT_DCLK_FREQ; ++ } ++ } ++ + if (rps->class & ATOM_PPLIB_CLASSIFICATION_BOOT) + rdev->pm.dpm.boot_ps = rps; + if (rps->class & ATOM_PPLIB_CLASSIFICATION_UVDSTATE) diff --git a/queue-3.11/drm-radeon-dpm-handle-bapm-on-trinity.patch b/queue-3.11/drm-radeon-dpm-handle-bapm-on-trinity.patch new file mode 100644 index 00000000000..3ee784cb250 --- /dev/null +++ b/queue-3.11/drm-radeon-dpm-handle-bapm-on-trinity.patch @@ -0,0 +1,85 @@ +From ef4e03658420bbf91365647615460668c2510e79 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 9 Sep 2013 18:56:50 -0400 +Subject: drm/radeon/dpm: handle bapm on trinity + +From: Alex Deucher + +commit ef4e03658420bbf91365647615460668c2510e79 upstream. + +bapm is a power management feature for handling the +power budget between the CPU and GPU on APUs. This +patch adds support for enabling or disabling it. +For now disable it by default. Enabling it properly +requires quite a bit more work and will be addressed +in a separate patch. + +This patch fixes hangs on boot on certain trinity +laptops when the system is on battery power. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/ppsmc.h | 2 ++ + drivers/gpu/drm/radeon/trinity_dpm.c | 2 ++ + drivers/gpu/drm/radeon/trinity_dpm.h | 1 + + drivers/gpu/drm/radeon/trinity_smc.c | 8 ++++++++ + 4 files changed, 13 insertions(+) + +--- a/drivers/gpu/drm/radeon/ppsmc.h ++++ b/drivers/gpu/drm/radeon/ppsmc.h +@@ -106,6 +106,8 @@ typedef uint8_t PPSMC_Result; + #define PPSMC_MSG_DPM_N_LevelsDisabled ((uint32_t) 0x112) + #define PPSMC_MSG_DCE_RemoveVoltageAdjustment ((uint32_t) 0x11d) + #define PPSMC_MSG_DCE_AllowVoltageAdjustment ((uint32_t) 0x11e) ++#define PPSMC_MSG_EnableBAPM ((uint32_t) 0x120) ++#define PPSMC_MSG_DisableBAPM ((uint32_t) 0x121) + #define PPSMC_MSG_UVD_DPM_Config ((uint32_t) 0x124) + + +--- a/drivers/gpu/drm/radeon/trinity_dpm.c ++++ b/drivers/gpu/drm/radeon/trinity_dpm.c +@@ -1091,6 +1091,7 @@ int trinity_dpm_enable(struct radeon_dev + trinity_program_sclk_dpm(rdev); + trinity_start_dpm(rdev); + trinity_wait_for_dpm_enabled(rdev); ++ trinity_dpm_bapm_enable(rdev, false); + trinity_release_mutex(rdev); + + if (rdev->irq.installed && +@@ -1116,6 +1117,7 @@ void trinity_dpm_disable(struct radeon_d + trinity_release_mutex(rdev); + return; + } ++ trinity_dpm_bapm_enable(rdev, false); + trinity_disable_clock_power_gating(rdev); + sumo_clear_vc(rdev); + trinity_wait_for_level_0(rdev); +--- a/drivers/gpu/drm/radeon/trinity_dpm.h ++++ b/drivers/gpu/drm/radeon/trinity_dpm.h +@@ -118,6 +118,7 @@ struct trinity_power_info { + #define TRINITY_AT_DFLT 30 + + /* trinity_smc.c */ ++int trinity_dpm_bapm_enable(struct radeon_device *rdev, bool enable); + int trinity_dpm_config(struct radeon_device *rdev, bool enable); + int trinity_uvd_dpm_config(struct radeon_device *rdev); + int trinity_dpm_force_state(struct radeon_device *rdev, u32 n); +--- a/drivers/gpu/drm/radeon/trinity_smc.c ++++ b/drivers/gpu/drm/radeon/trinity_smc.c +@@ -56,6 +56,14 @@ static int trinity_notify_message_to_smu + return 0; + } + ++int trinity_dpm_bapm_enable(struct radeon_device *rdev, bool enable) ++{ ++ if (enable) ++ return trinity_notify_message_to_smu(rdev, PPSMC_MSG_EnableBAPM); ++ else ++ return trinity_notify_message_to_smu(rdev, PPSMC_MSG_DisableBAPM); ++} ++ + int trinity_dpm_config(struct radeon_device *rdev, bool enable) + { + if (enable) diff --git a/queue-3.11/drm-radeon-dpm-rs780-don-t-enable-sclk-scaling-if-not-required.patch b/queue-3.11/drm-radeon-dpm-rs780-don-t-enable-sclk-scaling-if-not-required.patch new file mode 100644 index 00000000000..55e1ff57386 --- /dev/null +++ b/queue-3.11/drm-radeon-dpm-rs780-don-t-enable-sclk-scaling-if-not-required.patch @@ -0,0 +1,36 @@ +From e40210cca98068835acd5a4fe760bf96b3a1aa48 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Sep 2013 10:55:10 -0400 +Subject: drm/radeon/dpm/rs780: don't enable sclk scaling if not required + +From: Alex Deucher + +commit e40210cca98068835acd5a4fe760bf96b3a1aa48 upstream. + +If the low and high sclks are the same, there is no need to +enable sclk scaling. This causes display stability issues on +certain boards. + +Fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=60857 + +Signed-off-by: Alex Deucher +Reviewed-by: Christian König +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/rs780_dpm.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/radeon/rs780_dpm.c ++++ b/drivers/gpu/drm/radeon/rs780_dpm.c +@@ -486,6 +486,9 @@ static void rs780_activate_engine_clk_sc + (new_state->sclk_low == old_state->sclk_low)) + return; + ++ if (new_state->sclk_high == new_state->sclk_low) ++ return; ++ + rs780_clk_scaling_enable(rdev, true); + } + diff --git a/queue-3.11/drm-radeon-fix-panel-scaling-with-edp-and-lvds-bridges.patch b/queue-3.11/drm-radeon-fix-panel-scaling-with-edp-and-lvds-bridges.patch new file mode 100644 index 00000000000..23b58222b7a --- /dev/null +++ b/queue-3.11/drm-radeon-fix-panel-scaling-with-edp-and-lvds-bridges.patch @@ -0,0 +1,98 @@ +From 855f5f1d882a34e4e9dd27b299737cd3508a5624 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 13 Sep 2013 18:33:16 -0400 +Subject: drm/radeon: fix panel scaling with eDP and LVDS bridges + +From: Alex Deucher + +commit 855f5f1d882a34e4e9dd27b299737cd3508a5624 upstream. + +We were using the wrong set_properly callback so we always +ended up with Full scaling even if something else (Center or +Full aspect) was selected. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_connectors.c | 34 ++++++++++++++++++++++++++--- + 1 file changed, 31 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_connectors.c ++++ b/drivers/gpu/drm/radeon/radeon_connectors.c +@@ -1489,6 +1489,24 @@ static const struct drm_connector_funcs + .force = radeon_dvi_force, + }; + ++static const struct drm_connector_funcs radeon_edp_connector_funcs = { ++ .dpms = drm_helper_connector_dpms, ++ .detect = radeon_dp_detect, ++ .fill_modes = drm_helper_probe_single_connector_modes, ++ .set_property = radeon_lvds_set_property, ++ .destroy = radeon_dp_connector_destroy, ++ .force = radeon_dvi_force, ++}; ++ ++static const struct drm_connector_funcs radeon_lvds_bridge_connector_funcs = { ++ .dpms = drm_helper_connector_dpms, ++ .detect = radeon_dp_detect, ++ .fill_modes = drm_helper_probe_single_connector_modes, ++ .set_property = radeon_lvds_set_property, ++ .destroy = radeon_dp_connector_destroy, ++ .force = radeon_dvi_force, ++}; ++ + void + radeon_add_atom_connector(struct drm_device *dev, + uint32_t connector_id, +@@ -1580,8 +1598,6 @@ radeon_add_atom_connector(struct drm_dev + goto failed; + radeon_dig_connector->igp_lane_info = igp_lane_info; + radeon_connector->con_priv = radeon_dig_connector; +- drm_connector_init(dev, &radeon_connector->base, &radeon_dp_connector_funcs, connector_type); +- drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); + if (i2c_bus->valid) { + /* add DP i2c bus */ + if (connector_type == DRM_MODE_CONNECTOR_eDP) +@@ -1598,6 +1614,10 @@ radeon_add_atom_connector(struct drm_dev + case DRM_MODE_CONNECTOR_VGA: + case DRM_MODE_CONNECTOR_DVIA: + default: ++ drm_connector_init(dev, &radeon_connector->base, ++ &radeon_dp_connector_funcs, connector_type); ++ drm_connector_helper_add(&radeon_connector->base, ++ &radeon_dp_connector_helper_funcs); + connector->interlace_allowed = true; + connector->doublescan_allowed = true; + radeon_connector->dac_load_detect = true; +@@ -1610,6 +1630,10 @@ radeon_add_atom_connector(struct drm_dev + case DRM_MODE_CONNECTOR_HDMIA: + case DRM_MODE_CONNECTOR_HDMIB: + case DRM_MODE_CONNECTOR_DisplayPort: ++ drm_connector_init(dev, &radeon_connector->base, ++ &radeon_dp_connector_funcs, connector_type); ++ drm_connector_helper_add(&radeon_connector->base, ++ &radeon_dp_connector_helper_funcs); + drm_object_attach_property(&radeon_connector->base.base, + rdev->mode_info.underscan_property, + UNDERSCAN_OFF); +@@ -1634,6 +1658,10 @@ radeon_add_atom_connector(struct drm_dev + break; + case DRM_MODE_CONNECTOR_LVDS: + case DRM_MODE_CONNECTOR_eDP: ++ drm_connector_init(dev, &radeon_connector->base, ++ &radeon_lvds_bridge_connector_funcs, connector_type); ++ drm_connector_helper_add(&radeon_connector->base, ++ &radeon_dp_connector_helper_funcs); + drm_object_attach_property(&radeon_connector->base.base, + dev->mode_config.scaling_mode_property, + DRM_MODE_SCALE_FULLSCREEN); +@@ -1797,7 +1825,7 @@ radeon_add_atom_connector(struct drm_dev + goto failed; + radeon_dig_connector->igp_lane_info = igp_lane_info; + radeon_connector->con_priv = radeon_dig_connector; +- drm_connector_init(dev, &radeon_connector->base, &radeon_dp_connector_funcs, connector_type); ++ drm_connector_init(dev, &radeon_connector->base, &radeon_edp_connector_funcs, connector_type); + drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); + if (i2c_bus->valid) { + /* add DP i2c bus */ diff --git a/queue-3.11/drm-radeon-r6xx-add-a-stubbed-out-set_uvd_clocks-callback.patch b/queue-3.11/drm-radeon-r6xx-add-a-stubbed-out-set_uvd_clocks-callback.patch new file mode 100644 index 00000000000..8bfcd58e0f6 --- /dev/null +++ b/queue-3.11/drm-radeon-r6xx-add-a-stubbed-out-set_uvd_clocks-callback.patch @@ -0,0 +1,70 @@ +From 1b9ba70a49ba92e910d8e5df702edf8c1858cecf Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 5 Sep 2013 09:52:37 -0400 +Subject: drm/radeon/r6xx: add a stubbed out set_uvd_clocks callback + +From: Alex Deucher + +commit 1b9ba70a49ba92e910d8e5df702edf8c1858cecf upstream. + +Certain r6xx boards use the same power state for both UVD +and other things. Since we don't support UVD on r6xx boards +at the moment, there was no callback installed for setting +the UVD clocks, however, on systems that use the same power +state, this leads to a NULL pointer dereference. Fill +in a stubbed out implementation for now to avoid the crash. + +Fixes: +https://bugs.freedesktop.org/show_bug.cgi?id=66963 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/r600.c | 5 +++++ + drivers/gpu/drm/radeon/radeon_asic.c | 2 ++ + drivers/gpu/drm/radeon/radeon_asic.h | 1 + + 3 files changed, 8 insertions(+) + +--- a/drivers/gpu/drm/radeon/r600.c ++++ b/drivers/gpu/drm/radeon/r600.c +@@ -119,6 +119,11 @@ u32 r600_get_xclk(struct radeon_device * + return rdev->clock.spll.reference_freq; + } + ++int r600_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk) ++{ ++ return 0; ++} ++ + /* get temperature in millidegrees */ + int rv6xx_get_temp(struct radeon_device *rdev) + { +--- a/drivers/gpu/drm/radeon/radeon_asic.c ++++ b/drivers/gpu/drm/radeon/radeon_asic.c +@@ -1146,6 +1146,7 @@ static struct radeon_asic rv6xx_asic = { + .set_pcie_lanes = &r600_set_pcie_lanes, + .set_clock_gating = NULL, + .get_temperature = &rv6xx_get_temp, ++ .set_uvd_clocks = &r600_set_uvd_clocks, + }, + .dpm = { + .init = &rv6xx_dpm_init, +@@ -1257,6 +1258,7 @@ static struct radeon_asic rs780_asic = { + .set_pcie_lanes = NULL, + .set_clock_gating = NULL, + .get_temperature = &rv6xx_get_temp, ++ .set_uvd_clocks = &r600_set_uvd_clocks, + }, + .dpm = { + .init = &rs780_dpm_init, +--- a/drivers/gpu/drm/radeon/radeon_asic.h ++++ b/drivers/gpu/drm/radeon/radeon_asic.h +@@ -405,6 +405,7 @@ int r600_mc_wait_for_idle(struct radeon_ + u32 r600_get_xclk(struct radeon_device *rdev); + uint64_t r600_get_gpu_clock_counter(struct radeon_device *rdev); + int rv6xx_get_temp(struct radeon_device *rdev); ++int r600_set_uvd_clocks(struct radeon_device *rdev, u32 vclk, u32 dclk); + int r600_dpm_pre_set_power_state(struct radeon_device *rdev); + void r600_dpm_post_set_power_state(struct radeon_device *rdev); + /* rv6xx dpm */ diff --git a/queue-3.11/series b/queue-3.11/series index 5d3791da617..e3d1846ad15 100644 --- a/queue-3.11/series +++ b/queue-3.11/series @@ -45,3 +45,14 @@ drm-radeon-update-line-buffer-allocation-for-dce6.patch drm-radeon-fix-resume-on-some-rs4xx-boards-v2.patch drm-radeon-fix-handling-of-variable-sized-arrays-for-router-objects.patch drm-radeon-dpm-make-sure-dc-performance-level-limits-are-valid-btc-si-v2.patch +tg3-don-t-turn-off-led-on-5719-serdes-port-0.patch +tg3-expand-led-off-fix-to-include-5720.patch +drm-radeon-add-some-additional-berlin-pci-ids.patch +drm-radeon-r6xx-add-a-stubbed-out-set_uvd_clocks-callback.patch +drm-radeon-atom-workaround-vbios-bug-in-transmitter-table-on-rs880-v2.patch +drm-radeon-dpm-handle-bapm-on-trinity.patch +drm-radeon-dpm-fix-fallback-for-empty-uvd-clocks.patch +drm-radeon-dpm-rs780-don-t-enable-sclk-scaling-if-not-required.patch +drm-radeon-fix-panel-scaling-with-edp-and-lvds-bridges.patch +drm-radeon-avoid-uvd-corruptions-on-agp-cards.patch +skge-fix-broken-driver.patch diff --git a/queue-3.11/skge-fix-broken-driver.patch b/queue-3.11/skge-fix-broken-driver.patch new file mode 100644 index 00000000000..44df6f0afb8 --- /dev/null +++ b/queue-3.11/skge-fix-broken-driver.patch @@ -0,0 +1,63 @@ +From c194992cbe71c20bb3623a566af8d11b0bfaa721 Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Thu, 19 Sep 2013 14:13:17 -0400 +Subject: skge: fix broken driver + +From: Mikulas Patocka + +commit c194992cbe71c20bb3623a566af8d11b0bfaa721 upstream. + +The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver. +Note this part of the patch: ++ if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) { ++ dev_kfree_skb(nskb); ++ goto resubmit; ++ } ++ + pci_unmap_single(skge->hw->pdev, + dma_unmap_addr(e, mapaddr), + dma_unmap_len(e, maplen), + PCI_DMA_FROMDEVICE); + skb = e->skb; + prefetch(skb->data); +- skge_rx_setup(skge, e, nskb, skge->rx_buf_size); + +The function skge_rx_setup modifies e->skb to point to the new skb. Thus, +after this change, the new buffer, not the old, is returned to the +networking stack. + +This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should +be queued for 3.11-stable. + +Signed-off-by: Mikulas Patocka +Reported-by: Mikulas Patocka +Reported-by: Vasiliy Glazov +Tested-by: Mikulas Patocka +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/marvell/skge.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/marvell/skge.c ++++ b/drivers/net/ethernet/marvell/skge.c +@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc + if (!nskb) + goto resubmit; + ++ skb = e->skb; ++ prefetch(skb->data); ++ + if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) { + dev_kfree_skb(nskb); + goto resubmit; +@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc + dma_unmap_addr(e, mapaddr), + dma_unmap_len(e, maplen), + PCI_DMA_FROMDEVICE); +- skb = e->skb; +- prefetch(skb->data); + } + + skb_put(skb, len); diff --git a/queue-3.11/tg3-don-t-turn-off-led-on-5719-serdes-port-0.patch b/queue-3.11/tg3-don-t-turn-off-led-on-5719-serdes-port-0.patch new file mode 100644 index 00000000000..3f67bd7eb28 --- /dev/null +++ b/queue-3.11/tg3-don-t-turn-off-led-on-5719-serdes-port-0.patch @@ -0,0 +1,57 @@ +From 989038e217e94161862a959e82f9a1ecf8dda152 Mon Sep 17 00:00:00 2001 +From: Nithin Sujir +Date: Fri, 30 Aug 2013 17:01:36 -0700 +Subject: tg3: Don't turn off led on 5719 serdes port 0 + +From: Nithin Sujir + +commit 989038e217e94161862a959e82f9a1ecf8dda152 upstream. + +Turning off led on port 0 of the 5719 serdes causes all other ports to +lose power and stop functioning. Add tg3_phy_led_bug() function to check +for this condition. We use a switch() in tg3_phy_led_bug() for +consistency with the tg3_phy_power_bug() function. + +Signed-off-by: Nithin Nayak Sujir +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/broadcom/tg3.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -3030,6 +3030,19 @@ static bool tg3_phy_power_bug(struct tg3 + return false; + } + ++static bool tg3_phy_led_bug(struct tg3 *tp) ++{ ++ switch (tg3_asic_rev(tp)) { ++ case ASIC_REV_5719: ++ if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && ++ !tp->pci_fn) ++ return true; ++ return false; ++ } ++ ++ return false; ++} ++ + static void tg3_power_down_phy(struct tg3 *tp, bool do_low_power) + { + u32 val; +@@ -3077,8 +3090,9 @@ static void tg3_power_down_phy(struct tg + } + return; + } else if (do_low_power) { +- tg3_writephy(tp, MII_TG3_EXT_CTRL, +- MII_TG3_EXT_CTRL_FORCE_LED_OFF); ++ if (!tg3_phy_led_bug(tp)) ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, ++ MII_TG3_EXT_CTRL_FORCE_LED_OFF); + + val = MII_TG3_AUXCTL_PCTL_100TX_LPWR | + MII_TG3_AUXCTL_PCTL_SPR_ISOLATE | diff --git a/queue-3.11/tg3-expand-led-off-fix-to-include-5720.patch b/queue-3.11/tg3-expand-led-off-fix-to-include-5720.patch new file mode 100644 index 00000000000..a938c3200b5 --- /dev/null +++ b/queue-3.11/tg3-expand-led-off-fix-to-include-5720.patch @@ -0,0 +1,33 @@ +From 300cf9b93f74c3d969a0ad50bdac65416107c44c Mon Sep 17 00:00:00 2001 +From: Nithin Sujir +Date: Thu, 12 Sep 2013 14:01:31 -0700 +Subject: tg3: Expand led off fix to include 5720 + +From: Nithin Sujir + +commit 300cf9b93f74c3d969a0ad50bdac65416107c44c upstream. + +Commit 989038e217e94161862a959e82f9a1ecf8dda152 ("tg3: Don't turn off +led on 5719 serdes port 0") added code to skip turning led off on port +0 of the 5719 since it powered down other ports. This workaround needs +to be enabled on the 5720 as well. + +Signed-off-by: Nithin Nayak Sujir +Signed-off-by: Michael Chan +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/broadcom/tg3.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/broadcom/tg3.c ++++ b/drivers/net/ethernet/broadcom/tg3.c +@@ -3034,6 +3034,7 @@ static bool tg3_phy_led_bug(struct tg3 * + { + switch (tg3_asic_rev(tp)) { + case ASIC_REV_5719: ++ case ASIC_REV_5720: + if ((tp->phy_flags & TG3_PHYFLG_MII_SERDES) && + !tp->pci_fn) + return true;