RE: [suse-amd64] Solving the Tyan 2885 AGP performance issues
From: Andrew Halliwell [mailto:ah@gnd.com]
And even though the patches are mentioned... where can they be downloaded? (I've looked on the nvidia site and couldn't find the newer drivers either)
The patches in plaintext below. I didn't realize the SUSE list doesn't support attachments. -Mark Langsdorf Team Lead, Linux Device Drivers Advanced Micro Devices diff -u -u -r1.39 agpgart_be.c --- linux/drivers/char/agp/agpgart_be.c 2003/10/28 23:20:20 1.39 +++ linux/drivers/char/agp/agpgart_be.c 2003/10/28 23:26:02 @@ -67,6 +67,7 @@ EXPORT_SYMBOL(agp_backend_release); static void flush_cache(void); +static int agp_init_one(struct pci_dev *dev); static struct agp_bridge_data agp_bridge; static int agp_try_unsupported __initdata = 0; @@ -6490,15 +6491,24 @@ static int __init agp_find_supported_device(void) { struct pci_dev *dev = NULL; - u8 cap_ptr = 0x00; + int ret = -ENODEV; #ifdef CONFIG_AGP_HP_ZX1 if (hp_zx1_gart_init() == 0) return 0; #endif - if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL) - return -ENODEV; + while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, dev)) != NULL) { + ret = agp_init_one(dev); + if (ret != -ENODEV) + break; + } + return ret; +} + +static int __init agp_init_one(struct pci_dev *dev) +{ + u8 cap_ptr = 0x00; agp_bridge.dev = dev; diff -u linux-work/arch/x86_64/kernel/mtrr.c-o linux-work/arch/x86_64/kernel/mtrr.c --- linux-work/arch/x86_64/kernel/mtrr.c-o 2002-09-05 17:27:05.000000000 +0200 +++ linux-work/arch/x86_64/kernel/mtrr.c 2004-01-16 18:27:04.000000000 +0100 @@ -70,6 +70,9 @@ #define MTRR_VERSION "2.02 (20020716)" +#define MTRR_BEG_BIT 12 +#define MTRR_END_BIT 7 + #undef Dprintk #define Dprintk(...) @@ -192,8 +195,9 @@ static void get_mtrr (unsigned int reg, u64 *base, u32 *size, mtrr_type * type) { - u32 mask_lo, mask_hi, base_lo, base_hi; - u64 newsize; + u32 count, tmp, mask_lo, mask_hi; + int i; + u32 base_lo, base_hi; rdmsr (MSR_MTRRphysMask(reg), mask_lo, mask_hi); if ((mask_lo & 0x800) == 0) { @@ -206,10 +210,16 @@ rdmsr (MSR_MTRRphysBase(reg), base_lo, base_hi); - /* Work out the shifted address mask. */ - newsize = (u64) mask_hi << 32 | (mask_lo & ~0x800); - newsize = ~newsize+1; - *size = (u32) newsize >> PAGE_SHIFT; + count = 0; + tmp = mask_lo >> MTRR_BEG_BIT; + for (i = MTRR_BEG_BIT; i <= 31; i++, tmp = tmp >> 1) + count = (count << (~tmp & 1)) | (~tmp & 1); + + tmp = mask_hi; + for (i = 0; i <= MTRR_END_BIT; i++, tmp = tmp >> 1) + count = (count << (~tmp & 1)) | (~tmp & 1); + + *size = (count+1); *base = base_hi << (32 - PAGE_SHIFT) | base_lo >> PAGE_SHIFT; *type = base_lo & 0xff; } @@ -243,7 +253,7 @@ base64 = (base << PAGE_SHIFT) & size_and_mask; wrmsr (MSR_MTRRphysBase(reg), base64 | type, base64 >> 32); - size64 = ~((size << PAGE_SHIFT) - 1); + size64 = ~(((u64)size << PAGE_SHIFT) - 1); size64 = size64 & size_and_mask; wrmsr (MSR_MTRRphysMask(reg), (u32) (size64 | 0x800), (u32) (size64 >> 32)); }
On Fri, 23 Jan 2004 23:34:36 -0600 mark.langsdorf@amd.com wrote:
From: Andrew Halliwell [mailto:ah@gnd.com]
And even though the patches are mentioned... where can they be downloaded? (I've looked on the nvidia site and couldn't find the newer drivers either)
The patches in plaintext below. I didn't realize the SUSE list doesn't support attachments.
Both patches are in the newest 9.0 update kernel (-193, available by YOU) In fact the agp patch has been in there for a long time, iirc it was already in the original 9.0 kernel. -Andi
There used to be a SuSE AMD64 driver available from Tyan's ftp site for the Silicon Image 3114 SATA chip at: ftp://ftp.tyan.com/drivers_linux/Silicon_Image/3114/SuSE90AMD64RAIDDriver/ There was a link to it from their driver web pages. All of this in now gone. All that is left is a driver for SuSE 8.2 32bit What happened??? Did we some how offend them by expecting it to be updated for the newer SuSE 9.0 kernels (which they were not doing)? -- Steven A. DuChene linux-clusters@mindspring.com sduchene@mindspring.com
On Sat, 24 Jan 2004 10:50:00 -0500
"Steven A. DuChene"
There used to be a SuSE AMD64 driver available from Tyan's ftp site for the Silicon Image 3114 SATA chip at:
ftp://ftp.tyan.com/drivers_linux/Silicon_Image/3114/SuSE90AMD64RAIDDriver/
There was a link to it from their driver web pages. All of this in now gone. All that is left is a driver for SuSE 8.2 32bit
What happened??? Did we some how offend them by expecting it to be updated for the newer SuSE 9.0 kernels (which they were not doing)?
Maybe it didn't work reliably. The latest 9.0 update kernel has a Silicon Image driver, please try it. -Andi
participants (3)
-
Andi Kleen
-
mark.langsdorf@amd.com
-
Steven A. DuChene