summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2007-11-26 00:04:39 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2007-11-26 00:04:39 +0000
commit59e9d416df56e7e25b6c94625ec9439a6483280c (patch)
treebb002bc3bdc47b1a622be2f8193699a87b4067bd /sys
parent85717c4b3ba5e5831c4f00889d468ffd93bfad3f (diff)
Fix hardware cursor mapping.
ok matthieu.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/agp_i810.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index f0414dd925f..030fcb5c88c 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.18 2007/11/25 17:11:12 oga Exp $ */
+/* $OpenBSD: agp_i810.c,v 1.19 2007/11/26 00:04:38 oga Exp $ */
/* $NetBSD: agp_i810.c,v 1.15 2003/01/31 00:07:39 thorpej Exp $ */
/*-
@@ -791,7 +791,9 @@ agp_i810_bind_memory(struct agp_softc *sc, struct agp_memory *mem,
regval = 0;
if (mem->am_type == 2) {
- WRITEGTT(offset, mem->am_physical);
+ for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE) {
+ WRITEGTT(offset + i, (mem->am_physical + i));
+ }
mem->am_offset = offset;
mem->am_is_bound = 1;
return (0);
@@ -816,7 +818,9 @@ agp_i810_unbind_memory(struct agp_softc *sc, struct agp_memory *mem)
u_int32_t i;
if (mem->am_type == 2) {
- WRITEGTT(mem->am_offset, 0);
+ for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE) {
+ WRITEGTT(mem->am_offset + i, 0);
+ }
mem->am_offset = 0;
mem->am_is_bound = 0;
return (0);