12.08.2013 08:24, gregkh@xxxxxxxxxxxxxxxxxxx skrev:
The patch below does not apply to the 3.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. thanks, greg k-h
commit 6fab3febf6d949b0a12b1e4e73db38e4a177a79e Author: Alex Deucher <alexander.deucher@xxxxxxx> Date: Sun Aug 4 12:13:17 2013 -0400 drm/radeon: always program the MC on startup For r6xx+ asics. This mirrors the behavior of pre-r6xx asics. We need to program the MC even if something else in startup() fails. Failure to do so results in an unusable GPU. Based on a fix from: Mark Kettenis <kettenis@xxxxxxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: stable@xxxxxxxxxxxxxxx [ rebased for 3.10 and dropped the drivers/gpu/drm/radeon/cik.c bit as it's 3.11 specific code / tmb ] Signed-off-by: Thomas Backlund <tmb@xxxxxxxxxx> --- drivers/gpu/drm/radeon/evergreen.c | 3 ++- drivers/gpu/drm/radeon/ni.c | 3 ++- drivers/gpu/drm/radeon/r600.c | 3 ++- drivers/gpu/drm/radeon/rv770.c | 3 ++- drivers/gpu/drm/radeon/si.c | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff -Nurp linux-3.10.6/drivers/gpu/drm/radeon/evergreen.c linux-3.10.6.radeon/drivers/gpu/drm/radeon/evergreen.c --- linux-3.10.6/drivers/gpu/drm/radeon/evergreen.c 2013-07-01 01:13:29.000000000 +0300 +++ linux-3.10.6.radeon/drivers/gpu/drm/radeon/evergreen.c 2013-08-12 19:01:42.812509120 +0300 @@ -4681,6 +4681,8 @@ static int evergreen_startup(struct rade /* enable pcie gen2 link */ evergreen_pcie_gen2_enable(rdev); + evergreen_mc_program(rdev); + if (ASIC_IS_DCE5(rdev)) { if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw || !rdev->mc_fw) { r = ni_init_microcode(rdev); @@ -4708,7 +4710,6 @@ static int evergreen_startup(struct rade if (r) return r; - evergreen_mc_program(rdev); if (rdev->flags & RADEON_IS_AGP) { evergreen_agp_enable(rdev); } else { diff -Nurp linux-3.10.6/drivers/gpu/drm/radeon/ni.c linux-3.10.6.radeon/drivers/gpu/drm/radeon/ni.c --- linux-3.10.6/drivers/gpu/drm/radeon/ni.c 2013-07-01 01:13:29.000000000 +0300 +++ linux-3.10.6.radeon/drivers/gpu/drm/radeon/ni.c 2013-08-12 19:01:42.813509123 +0300 @@ -1929,6 +1929,8 @@ static int cayman_startup(struct radeon_ /* enable pcie gen2 link */ evergreen_pcie_gen2_enable(rdev); + evergreen_mc_program(rdev); + if (rdev->flags & RADEON_IS_IGP) { if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r = ni_init_microcode(rdev); @@ -1957,7 +1959,6 @@ static int cayman_startup(struct radeon_ if (r) return r; - evergreen_mc_program(rdev); r = cayman_pcie_gart_enable(rdev); if (r) return r; diff -Nurp linux-3.10.6/drivers/gpu/drm/radeon/r600.c linux-3.10.6.radeon/drivers/gpu/drm/radeon/r600.c --- linux-3.10.6/drivers/gpu/drm/radeon/r600.c 2013-08-12 18:01:09.164494873 +0300 +++ linux-3.10.6.radeon/drivers/gpu/drm/radeon/r600.c 2013-08-12 19:01:42.815509135 +0300 @@ -3206,6 +3206,8 @@ static int r600_startup(struct radeon_de /* enable pcie gen2 link */ r600_pcie_gen2_enable(rdev); + r600_mc_program(rdev); + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r = r600_init_microcode(rdev); if (r) { @@ -3218,7 +3220,6 @@ static int r600_startup(struct radeon_de if (r) return r; - r600_mc_program(rdev); if (rdev->flags & RADEON_IS_AGP) { r600_agp_enable(rdev); } else { diff -Nurp linux-3.10.6/drivers/gpu/drm/radeon/rv770.c linux-3.10.6.radeon/drivers/gpu/drm/radeon/rv770.c --- linux-3.10.6/drivers/gpu/drm/radeon/rv770.c 2013-08-12 18:01:09.168494908 +0300 +++ linux-3.10.6.radeon/drivers/gpu/drm/radeon/rv770.c 2013-08-12 19:01:42.815509135 +0300 @@ -1829,6 +1829,8 @@ static int rv770_startup(struct radeon_d /* enable pcie gen2 link */ rv770_pcie_gen2_enable(rdev); + rv770_mc_program(rdev); + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { r = r600_init_microcode(rdev); if (r) { @@ -1841,7 +1843,6 @@ static int rv770_startup(struct radeon_d if (r) return r; - rv770_mc_program(rdev); if (rdev->flags & RADEON_IS_AGP) { rv770_agp_enable(rdev); } else { diff -Nurp linux-3.10.6/drivers/gpu/drm/radeon/si.c linux-3.10.6.radeon/drivers/gpu/drm/radeon/si.c --- linux-3.10.6/drivers/gpu/drm/radeon/si.c 2013-07-01 01:13:29.000000000 +0300 +++ linux-3.10.6.radeon/drivers/gpu/drm/radeon/si.c 2013-08-12 19:01:42.818509168 +0300 @@ -5270,6 +5270,8 @@ static int si_startup(struct radeon_devi struct radeon_ring *ring; int r; + si_mc_program(rdev); + if (!rdev->me_fw || !rdev->pfp_fw || !rdev->ce_fw || !rdev->rlc_fw || !rdev->mc_fw) { r = si_init_microcode(rdev); @@ -5289,7 +5291,6 @@ static int si_startup(struct radeon_devi if (r) return r; - si_mc_program(rdev); r = si_pcie_gart_enable(rdev); if (r) return r;