Messages in this thread Patch in this message | | | Date | Wed, 30 Jun 2010 12:04:35 -0400 | Subject | Re: [git pull] drm fixes + agp + one fb patch (bisected) | From | Alex Deucher <> |
| |
On Wed, Jun 30, 2010 at 11:50 AM, Markus Trippelsdorf <markus@trippelsdorf.de> wrote: > On Wed, Jun 30, 2010 at 11:34:53AM -0400, Alex Deucher wrote: >> On Wed, Jun 30, 2010 at 11:14 AM, Markus Trippelsdorf >> <markus@trippelsdorf.de> wrote: >> > On Wed, Jun 30, 2010 at 11:03:33AM -0400, Alex Deucher wrote: >> >> On Wed, Jun 30, 2010 at 10:58 AM, Markus Trippelsdorf >> >> <markus@trippelsdorf.de> wrote: >> >> > On Wed, Jun 30, 2010 at 10:49:41AM -0400, Alex Deucher wrote: >> >> >> On Wed, Jun 30, 2010 at 3:31 AM, Markus Trippelsdorf >> >> >> <markus@trippelsdorf.de> wrote: >> >> >> > On Wed, Jun 30, 2010 at 08:54:40AM +0200, Markus Trippelsdorf wrote: >> >> >> >> On Wed, Jun 30, 2010 at 02:03:04AM +0100, Dave Airlie wrote: >> >> >> >> > >> >> >> >> > one fb layer fix in a flag I introduced, >> >> >> >> > >> >> >> >> > the rest are drm fixes: >> >> >> >> > radeon fixes: the larger ones in the command stream checker for older cards, >> >> >> >> > which was causing a lot of userspace apps to fail. Also some powerpc server fixes. >> >> >> >> > along with some updates to the evergreen command stream checker introduced in -rc1. >> >> >> >> > >> >> >> >> > agp: fix issue with warning on memory allocation + fallback to vmalloc. >> >> >> >> > ttm: fix regression introduced in -rc1 in memory allocation paths. >> >> >> >> > >> >> >> >> > The following changes since commit 7e27d6e778cd87b6f2415515d7127eba53fe5d02: >> >> >> >> > >> >> >> >> > Linux 2.6.35-rc3 (2010-06-11 19:14:04 -0700) >> >> >> >> > >> >> >> >> >> >> >> >> I've tested these patches and they break my setup (RS780). On reboot, the >> >> >> >> monitor goes straight to powersaving mode and no framebuffer is shown. >> >> >> > >> >> >> > This is the result of the bisection: >> >> >> > >> >> >> > 07d4190327b02ab3aaad25a2d168f79d92e8f8c2 is the first bad commit >> >> >> > commit 07d4190327b02ab3aaad25a2d168f79d92e8f8c2 >> >> >> > Author: Alex Deucher <alexdeucher@gmail.com> >> >> >> > Date: Sat Jun 12 11:50:13 2010 -0400 >> >> >> > >> >> >> > drm/radeon/kms: fix bandwidth calculation when sideport is present >> >> >> > >> >> >> > Fixes fdo bug 27529: >> >> >> > https://bugs.freedesktop.org/show_bug.cgi?id=27529 >> >> >> > >> >> >> > Reported-by: steckdenis@yahoo.fr >> >> >> > Signed-off-by: Alex Deucher <alexdeucher@gmail.com> >> >> >> > Cc: stable <stable@kernel.org> >> >> >> > Signed-off-by: Dave Airlie <airlied@redhat.com> >> >> >> >> >> >> Markus, can you send me a copy of your vbios? as root: >> >> >> cd /sys/bus/pci/devices/<pci bus id of video card> >> >> >> echo 1 > rom >> >> >> cat rom ? /tmp/vbio.rom >> >> >> echo 0 > rom >> >> > >> >> > Attached. >> >> > >> >> >> >> >> >> Also, when you say "on reboot" do you mean the card comes up ok >> >> >> initially with the new kernel and then fails after a reboot, or fails >> >> >> directly after booting the new kernel? Also, is there an oops or >> >> >> anything like that in dmesg? >> >> > >> >> > It fails directly after booting the new kernel. There is no oops or >> >> > anything like it in dmesg, because the kernel fails so early that it >> >> > could not log anything. >> >> >> >> Is the machine still pingable? Can you ssh in? or is it completely dead? >> > >> > I don't think so. There is no disk activivy after the hang, but maybe >> > the kernel displays an oops, which I just can't see. >> >> The attached patch should fix the issue. > > Sorry, but it does not. I've still the same issue with your patch > applied.
New patch attached. The rs690_pm_info function wasn't getting called at all on rs780/rs880 and it needs to be.
Alex From b79c8299fec572953ef6d870990293c0ee4ca678 Mon Sep 17 00:00:00 2001 From: Alex Deucher <alexdeucher@gmail.com> Date: Wed, 30 Jun 2010 12:02:03 -0400 Subject: [PATCH] drm/radeon/kms/igp: fix possible divide by 0 in bandwidth code (v2)
Some IGP systems specify the system memory clock in the Firmware table rather than the IGP info table. Check both and make sure we have a value system memory clock value.
v2: make sure rs690_pm_info is called on rs780/rs880 as well.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> --- drivers/gpu/drm/radeon/r600.c | 4 +++- drivers/gpu/drm/radeon/radeon.h | 1 + drivers/gpu/drm/radeon/rs690.c | 35 +++++++++++++++++++---------------- 3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 7f48593..1d5057b 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -1224,8 +1224,10 @@ int r600_mc_init(struct radeon_device *rdev) rdev->mc.visible_vram_size = rdev->mc.aper_size; r600_vram_gtt_location(rdev, &rdev->mc); - if (rdev->flags & RADEON_IS_IGP) + if (rdev->flags & RADEON_IS_IGP) { + rs690_pm_info(rdev); rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); + } radeon_update_bandwidth_info(rdev); return 0; } diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 35f0800..9fcdba7 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -177,6 +177,7 @@ void radeon_pm_resume(struct radeon_device *rdev); void radeon_combios_get_power_modes(struct radeon_device *rdev); void radeon_atombios_get_power_modes(struct radeon_device *rdev); void radeon_atom_set_voltage(struct radeon_device *rdev, u16 level); +void rs690_pm_info(struct radeon_device *rdev); /* * Fences. diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index 64b94a8..f4f0a61 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c @@ -79,7 +79,13 @@ void rs690_pm_info(struct radeon_device *rdev) tmp.full = dfixed_const(100); rdev->pm.igp_sideport_mclk.full = dfixed_const(info->info.ulBootUpMemoryClock); rdev->pm.igp_sideport_mclk.full = dfixed_div(rdev->pm.igp_sideport_mclk, tmp); - rdev->pm.igp_system_mclk.full = dfixed_const(le16_to_cpu(info->info.usK8MemoryClock)); + if (info->info.usK8MemoryClock) + rdev->pm.igp_system_mclk.full = dfixed_const(le16_to_cpu(info->info.usK8MemoryClock)); + else if (rdev->clock.default_mclk) { + rdev->pm.igp_system_mclk.full = dfixed_const(rdev->clock.default_mclk); + rdev->pm.igp_system_mclk.full = dfixed_div(rdev->pm.igp_system_mclk, tmp); + } else + rdev->pm.igp_system_mclk.full = dfixed_const(400); rdev->pm.igp_ht_link_clk.full = dfixed_const(le16_to_cpu(info->info.usFSBClock)); rdev->pm.igp_ht_link_width.full = dfixed_const(info->info.ucHTLinkWidth); break; @@ -87,34 +93,31 @@ void rs690_pm_info(struct radeon_device *rdev) tmp.full = dfixed_const(100); rdev->pm.igp_sideport_mclk.full = dfixed_const(info->info_v2.ulBootUpSidePortClock); rdev->pm.igp_sideport_mclk.full = dfixed_div(rdev->pm.igp_sideport_mclk, tmp); - rdev->pm.igp_system_mclk.full = dfixed_const(info->info_v2.ulBootUpUMAClock); + if (info->info_v2.ulBootUpUMAClock) + rdev->pm.igp_system_mclk.full = dfixed_const(info->info_v2.ulBootUpUMAClock); + else if (rdev->clock.default_mclk) + rdev->pm.igp_system_mclk.full = dfixed_const(rdev->clock.default_mclk); + else + rdev->pm.igp_system_mclk.full = dfixed_const(66700); rdev->pm.igp_system_mclk.full = dfixed_div(rdev->pm.igp_system_mclk, tmp); rdev->pm.igp_ht_link_clk.full = dfixed_const(info->info_v2.ulHTLinkFreq); rdev->pm.igp_ht_link_clk.full = dfixed_div(rdev->pm.igp_ht_link_clk, tmp); rdev->pm.igp_ht_link_width.full = dfixed_const(le16_to_cpu(info->info_v2.usMinHTLinkWidth)); break; default: - tmp.full = dfixed_const(100); /* We assume the slower possible clock ie worst case */ - /* DDR 333Mhz */ - rdev->pm.igp_sideport_mclk.full = dfixed_const(333); - /* FIXME: system clock ? */ - rdev->pm.igp_system_mclk.full = dfixed_const(100); - rdev->pm.igp_system_mclk.full = dfixed_div(rdev->pm.igp_system_mclk, tmp); - rdev->pm.igp_ht_link_clk.full = dfixed_const(200); + rdev->pm.igp_sideport_mclk.full = dfixed_const(200); + rdev->pm.igp_system_mclk.full = dfixed_const(200); + rdev->pm.igp_ht_link_clk.full = dfixed_const(1000); rdev->pm.igp_ht_link_width.full = dfixed_const(8); DRM_ERROR("No integrated system info for your GPU, using safe default\n"); break; } } else { - tmp.full = dfixed_const(100); /* We assume the slower possible clock ie worst case */ - /* DDR 333Mhz */ - rdev->pm.igp_sideport_mclk.full = dfixed_const(333); - /* FIXME: system clock ? */ - rdev->pm.igp_system_mclk.full = dfixed_const(100); - rdev->pm.igp_system_mclk.full = dfixed_div(rdev->pm.igp_system_mclk, tmp); - rdev->pm.igp_ht_link_clk.full = dfixed_const(200); + rdev->pm.igp_sideport_mclk.full = dfixed_const(200); + rdev->pm.igp_system_mclk.full = dfixed_const(200); + rdev->pm.igp_ht_link_clk.full = dfixed_const(1000); rdev->pm.igp_ht_link_width.full = dfixed_const(8); DRM_ERROR("No integrated system info for your GPU, using safe default\n"); } -- 1.7.0.1
| |