FreeBSD Bugzilla – Attachment 46638 Details for
Bug 71547
R200 (8500) hang on startx (nforce2)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
agp_nvidia.c-3.diff
agp_nvidia.c-3.diff (text/x-patch), 2.29 KB, created by
Eric Anholt
on 2005-06-24 02:27:59 UTC
(
hide
)
Description:
agp_nvidia.c-3.diff
Filename:
MIME Type:
Creator:
Eric Anholt
Created:
2005-06-24 02:27:59 UTC
Size:
2.29 KB
patch
obsolete
>Index: agp_nvidia.c >=================================================================== >RCS file: /home/ncvs/src/sys/pci/agp_nvidia.c,v >retrieving revision 1.9 >diff -u -r1.9 agp_nvidia.c >--- agp_nvidia.c 2 Apr 2005 01:10:09 -0000 1.9 >+++ agp_nvidia.c 24 Jun 2005 01:24:29 -0000 >@@ -148,8 +148,8 @@ > sc->wbc_mask = 0x80000000; > break; > default: >- sc->wbc_mask = 0; >- break; >+ device_printf(dev, "Bad chip id\n"); >+ return (ENODEV); > } > > /* AGP Controller */ >@@ -227,8 +227,7 @@ > for (i = 0; i < 8; i++) { > pci_write_config(sc->mc2_dev, AGP_NVIDIA_2_ATTBASE(i), > (sc->gatt->ag_physical + >- (i % sc->num_dirs) * 64 * 1024), >- 4); >+ (i % sc->num_dirs) * 64 * 1024) | 1, 4); > } > > /* GTLB Control */ >@@ -279,10 +278,17 @@ > static u_int32_t > agp_nvidia_get_aperture(device_t dev) > { >- u_int8_t key; >- >- key = ffs(pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1) & 0x0f); >- return (1 << (24 + (key ? key : 5))); >+ switch (pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1) & 0x0f) { >+ case 0: return (512 * 1024 * 1024); break; >+ case 8: return (256 * 1024 * 1024); break; >+ case 12: return (128 * 1024 * 1024); break; >+ case 14: return (64 * 1024 * 1024); break; >+ case 15: return (32 * 1024 * 1024); break; >+ default: >+ device_printf(dev, "Invalid aperture setting 0x%x", >+ pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1)); >+ return 0; >+ } > } > > static int >@@ -318,7 +324,7 @@ > return (EINVAL); > > index = (sc->pg_offset + offset) >> AGP_PAGE_SHIFT; >- sc->gatt->ag_virtual[index] = physical; >+ sc->gatt->ag_virtual[index] = physical | 1; > > return (0); > } >@@ -343,6 +349,7 @@ > { > struct agp_nvidia_softc *sc; > u_int32_t wbc_reg, temp; >+ volatile u_int32_t *ag_virtual; > int i; > > sc = (struct agp_nvidia_softc *)device_get_softc(dev); >@@ -366,11 +373,13 @@ > "TLB flush took more than 3 seconds.\n"); > } > >+ ag_virtual = (volatile u_int32_t *)sc->gatt->ag_virtual; >+ > /* Flush TLB entries. */ > for(i = 0; i < 32 + 1; i++) >- temp = sc->gatt->ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; >+ temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; > for(i = 0; i < 32 + 1; i++) >- temp = sc->gatt->ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; >+ temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; > > return (0); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 71547
:
46636
|
46637
| 46638