Remove evil hack. I've never seen the printf fire, and xenocara no longer
authorkettenis <kettenis@openbsd.org>
Fri, 9 Oct 2015 13:22:54 +0000 (13:22 +0000)
committerkettenis <kettenis@openbsd.org>
Fri, 9 Oct 2015 13:22:54 +0000 (13:22 +0000)
contains any code that can manipulate the affected register directly.

ok jsg@

sys/dev/pci/agp_i810.c

index 91c4b3f..f881417 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: agp_i810.c,v 1.90 2015/09/09 19:47:11 deraadt Exp $   */
+/*     $OpenBSD: agp_i810.c,v 1.91 2015/10/09 13:22:54 kettenis Exp $  */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -709,7 +709,7 @@ int
 agp_i810_bind_memory(void *sc, struct agp_memory *mem, bus_size_t offset)
 {
        struct agp_i810_softc   *isc = sc;
-       u_int32_t                regval, i;
+       u_int32_t                i;
 
        if (mem->am_is_bound != 0)
                return (EINVAL);
@@ -722,20 +722,6 @@ agp_i810_bind_memory(void *sc, struct agp_memory *mem, bus_size_t offset)
                return (EINVAL);
        }
 
-       /*
-        * XXX evil hack: the PGTBL_CTL appearently gets overwritten by the
-        * X server for mysterious reasons which leads to crashes if we write
-        * to the GTT through the MMIO window.
-        * Until the issue is solved, simply restore it.
-        */
-       regval = READ4(AGP_I810_PGTBL_CTL);
-       if (regval != (isc->gatt->ag_physical | 1)) {
-               printf("agp_i810_bind_memory: PGTBL_CTL is 0x%x - fixing\n",
-                   regval);
-               WRITE4(AGP_I810_PGTBL_CTL, isc->gatt->ag_physical |
-                   INTEL_ENABLED);
-       }
-
        if (mem->am_type == 2) {
                for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE)
                        agp_i810_bind_page(isc, isc->isc_apaddr + offset + i,