From cb613491c89e9800b17ae24feb7a13adc5ce8fe4 Mon Sep 17 00:00:00 2001 From: Owain Ainsworth Date: Sun, 24 May 2009 02:06:16 +0000 Subject: If flags to bind_page include BUS_DMA_COHERENT, set the snooped bit on the pte. This is currently unused, but will be used soon. --- sys/dev/pci/agp_i810.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index 5bf42fe13af..93e87cb7ff0 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_i810.c,v 1.53 2009/05/24 01:40:58 oga Exp $ */ +/* $OpenBSD: agp_i810.c,v 1.54 2009/05/24 02:06:15 oga Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -520,6 +520,13 @@ agp_i810_bind_page(void *sc, bus_addr_t offset, paddr_t physical, int flags) { struct agp_i810_softc *isc = sc; + /* + * COHERENT mappings mean set the snoop bit. this should never be + * accessed by the gpu through the gtt. + */ + if (flags & BUS_DMA_COHERENT) + physical |= INTEL_COHERENT; + intagp_write_gtt(isc, offset - isc->isc_apaddr, physical); } -- cgit v1.2.3