View | Details | Raw Unified | Return to bug 71547 | Differences between
and this patch

Collapse All | Expand All

(-)agp_nvidia.c (-7 / +9 lines)
Lines 109-115 Link Here
109
	case NVIDIA_DEVICEID_NFORCE2:
109
	case NVIDIA_DEVICEID_NFORCE2:
110
		return ("NVIDIA nForce2 AGP Controller");
110
		return ("NVIDIA nForce2 AGP Controller");
111
	}
111
	}
112
	return ("NVIDIA Generic AGP Controller");
112
	return (NULL);
113
}
113
}
114
114
115
static int
115
static int
Lines 148-155 Link Here
148
		sc->wbc_mask = 0x80000000;
148
		sc->wbc_mask = 0x80000000;
149
		break;
149
		break;
150
	default:
150
	default:
151
		sc->wbc_mask = 0;
151
		device_printf(dev, "Bad chip id\n");
152
		break;
152
		return (ENODEV);
153
	}
153
	}
154
154
155
	/* AGP Controller */
155
	/* AGP Controller */
Lines 227-234 Link Here
227
	for (i = 0; i < 8; i++) {
227
	for (i = 0; i < 8; i++) {
228
		pci_write_config(sc->mc2_dev, AGP_NVIDIA_2_ATTBASE(i),
228
		pci_write_config(sc->mc2_dev, AGP_NVIDIA_2_ATTBASE(i),
229
				 (sc->gatt->ag_physical +
229
				 (sc->gatt->ag_physical +
230
				   (i % sc->num_dirs) * 64 * 1024),
230
				   (i % sc->num_dirs) * 64 * 1024) | 1, 4);
231
				 4);
232
	}
231
	}
233
232
234
	/* GTLB Control */
233
	/* GTLB Control */
Lines 343-348 Link Here
343
{
342
{
344
	struct agp_nvidia_softc *sc;
343
	struct agp_nvidia_softc *sc;
345
	u_int32_t wbc_reg, temp;
344
	u_int32_t wbc_reg, temp;
345
	volatile u_int32_t *ag_virtual;
346
	int i;
346
	int i;
347
347
348
	sc = (struct agp_nvidia_softc *)device_get_softc(dev);
348
	sc = (struct agp_nvidia_softc *)device_get_softc(dev);
Lines 366-376 Link Here
366
				"TLB flush took more than 3 seconds.\n");
366
				"TLB flush took more than 3 seconds.\n");
367
	}
367
	}
368
368
369
	ag_virtual = (volatile u_int32_t *)sc->gatt->ag_virtual;
370
369
	/* Flush TLB entries. */
371
	/* Flush TLB entries. */
370
	for(i = 0; i < 32 + 1; i++)
372
	for(i = 0; i < 32 + 1; i++)
371
		temp = sc->gatt->ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
373
		temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
372
	for(i = 0; i < 32 + 1; i++)
374
	for(i = 0; i < 32 + 1; i++)
373
		temp = sc->gatt->ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
375
		temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)];
374
376
375
	return (0);
377
	return (0);
376
}
378
}

Return to bug 71547