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

Collapse All | Expand All

(-)agp_via.c (-7 / +27 lines)
Lines 165-175 Link Here
165
	}
165
	}
166
	sc->gatt = gatt;
166
	sc->gatt = gatt;
167
167
168
	/* Install the gatt. */
168
	if (sc->regs == via_v2_regs) {
169
	pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical | 3, 4);
169
		/* Install the gatt. */
170
	
170
		pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical | 3, 4);
171
	/* Enable the aperture. */
171
		
172
	pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x0f, 4);
172
		/* Enable the aperture. */
173
		pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x0f, 4);
174
	} else {
175
		u_int32_t gartctrl;
176
177
		/* Install the gatt. */
178
		pci_write_config(dev, sc->regs[REG_ATTBASE], gatt->ag_physical, 4);
179
		
180
		/* Enable the aperture. */
181
		gartctrl = pci_read_config(dev, sc->regs[REG_ATTBASE], 4);
182
		pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl | (3 << 7), 4);
183
	}
173
184
174
	return 0;
185
	return 0;
175
}
186
}
Lines 260-268 Link Here
260
agp_via_flush_tlb(device_t dev)
271
agp_via_flush_tlb(device_t dev)
261
{
272
{
262
	struct agp_via_softc *sc = device_get_softc(dev);
273
	struct agp_via_softc *sc = device_get_softc(dev);
274
	u_int32_t gartctrl;
263
275
264
	pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x8f, 4);
276
	if (sc->regs == via_v2_regs) {
265
	pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x0f, 4);
277
		pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x8f, 4);
278
		pci_write_config(dev, sc->regs[REG_GARTCTRL], 0x0f, 4);
279
	} else {
280
		gartctrl = pci_read_config(dev, sc->regs[REG_GARTCTRL], 4);
281
		pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl &
282
		    ~(1 << 7), 4);
283
		pci_write_config(dev, sc->regs[REG_GARTCTRL], gartctrl, 4);
284
	}
285
	
266
}
286
}
267
287
268
static device_method_t agp_via_methods[] = {
288
static device_method_t agp_via_methods[] = {

Return to bug 69953