Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci make the hardware cursor work



details:   https://anonhg.NetBSD.org/src/rev/dd0b85ef014d
branches:  trunk
changeset: 514942:dd0b85ef014d
user:      drochner <drochner%NetBSD.org@localhost>
date:      Fri Sep 14 12:05:03 2001 +0000

description:
make the hardware cursor work

diffstat:

 sys/dev/pci/agp_i810.c |  18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 8c47cb24b7df -r dd0b85ef014d sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c    Fri Sep 14 11:58:39 2001 +0000
+++ b/sys/dev/pci/agp_i810.c    Fri Sep 14 12:05:03 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp_i810.c,v 1.4 2001/09/13 16:18:53 drochner Exp $    */
+/*     $NetBSD: agp_i810.c,v 1.5 2001/09/14 12:05:03 drochner Exp $    */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -430,8 +430,14 @@
                                  isc->gatt->ag_physical | 1);
        }
 
-       if (mem->am_type == 2)
+       if (mem->am_type == 2) {
+               WRITE4(AGP_I810_GTT + (u_int32_t)(offset >> AGP_PAGE_SHIFT) * 4,
+                      mem->am_physical | 1);
+               mem->am_offset = offset;
+               mem->am_is_bound = 1;
                return 0;
+       }
+
        if (mem->am_type != 1)
                return agp_generic_bind_memory(sc, mem, offset);
 
@@ -449,8 +455,14 @@
        struct agp_i810_softc *isc = sc->as_chipc;
        u_int32_t i;
 
-       if (mem->am_type == 2)
+       if (mem->am_type == 2) {
+               WRITE4(AGP_I810_GTT +
+                      (u_int32_t)(mem->am_offset >> AGP_PAGE_SHIFT) * 4,
+                      0);
+               mem->am_offset = 0;
+               mem->am_is_bound = 0;
                return 0;
+       }
 
        if (mem->am_type != 1)
                return agp_generic_unbind_memory(sc, mem);



Home | Main Index | Thread Index | Old Index