diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-24 02:06:16 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-05-24 02:06:16 +0000 |
commit | cb613491c89e9800b17ae24feb7a13adc5ce8fe4 (patch) | |
tree | 540b3fa476cae9e51f08d1b1a5113f66d9fa5d2e /sys/dev | |
parent | 666eaba82d7e6355f951dadbe98fbf44cb6e03c0 (diff) |
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.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/agp_i810.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); } |