Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Revert to mapping the whole GTTMMADR region all ...



details:   https://anonhg.NetBSD.org/src/rev/3ff7ba33a10e
branches:  trunk
changeset: 331740:3ff7ba33a10e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Aug 22 15:26:28 2014 +0000

description:
Revert to mapping the whole GTTMMADR region all at once for now.

This was split up so we could map the GTT prefetchable without
interfering with the MMIO registers, but it interferes with old drm
which tries to map the whole region and which is still hooked up for
the moment.

Once we unhook old drm for good we can put this back.

diffstat:

 sys/dev/pci/agp_i810.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 6b481404edf0 -r 3ff7ba33a10e sys/dev/pci/agp_i810.c
--- a/sys/dev/pci/agp_i810.c    Fri Aug 22 14:28:58 2014 +0000
+++ b/sys/dev/pci/agp_i810.c    Fri Aug 22 15:26:28 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: agp_i810.c,v 1.112 2014/07/25 23:05:54 riastradh Exp $ */
+/*     $NetBSD: agp_i810.c,v 1.113 2014/08/22 15:26:28 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2000 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.112 2014/07/25 23:05:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.113 2014/08/22 15:26:28 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -405,7 +405,9 @@
                apbase = AGP_I965_GMADR;
                mmadr_bar = AGP_I965_MMADR;
                mmadr_type |= PCI_MAPREG_MEM_TYPE_64BIT;
-               isc->size = 512*1024;
+               if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
+                       AGP_I965_MMADR, mmadr_type, NULL, &isc->size, NULL))
+                       isc->size = 512*1024; /* XXX */
                gtt_bar = 0;
                gtt_off = AGP_I965_GTT;
                break;
@@ -413,14 +415,18 @@
                apbase = AGP_I965_GMADR;
                mmadr_bar = AGP_I965_MMADR;
                mmadr_type |= PCI_MAPREG_MEM_TYPE_64BIT;
-               isc->size = 512*1024;
+               if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
+                       AGP_I965_MMADR, mmadr_type, NULL, &isc->size, NULL))
+                       isc->size = 512*1024; /* XXX */
                gtt_bar = 0;
                gtt_off = AGP_G4X_GTT;
                break;
        default:
                apbase = AGP_I810_GMADR;
                mmadr_bar = AGP_I810_MMADR;
-               isc->size = 512*1024;
+               if (pci_mapreg_info(isc->vga_pa.pa_pc, isc->vga_pa.pa_tag,
+                       AGP_I965_MMADR, mmadr_type, NULL, &isc->size, NULL))
+                       isc->size = 512*1024; /* XXX */
                gtt_bar = 0;
                gtt_off = AGP_I810_GTT;
                break;



Home | Main Index | Thread Index | Old Index