On Wed, Jun 30, 2010 at 11:14 AM, Markus Trippelsdorf
<mar...@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
>> <mar...@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
>> >> <mar...@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 <alexdeuc...@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: steckde...@yahoo.fr
>> >> >    Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
>> >> >    Cc: stable <sta...@kernel.org>
>> >> >    Signed-off-by: Dave Airlie <airl...@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.

Alex
From 3b2fef39e0172099a766ce536489d008b444c48b Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexdeuc...@gmail.com>
Date: Wed, 30 Jun 2010 11:31:13 -0400
Subject: [PATCH] drm/radeon/kms/igp: fix possible divide by 0 in bandwidth code

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.

Signed-off-by: Alex Deucher <alexdeuc...@gmail.com>
---
 drivers/gpu/drm/radeon/rs690.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

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

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to