Module Name: src
Committed By: martin
Date: Thu Sep 18 10:25:33 UTC 2014
Modified Files:
src/sys/dev/pci [netbsd-7]: agp_i810.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #94):
sys/dev/pci/agp_i810.c: revision 1.113
sys/dev/pci/agp_i810.c: revision 1.114
Revert to mapping the whole GTTMMADR region all at once for now and
use the right BAR for MMIO register sizing on i810.
To generate a diff of this commit:
cvs rdiff -u -r1.112 -r1.112.2.1 src/sys/dev/pci/agp_i810.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/agp_i810.c
diff -u src/sys/dev/pci/agp_i810.c:1.112 src/sys/dev/pci/agp_i810.c:1.112.2.1
--- src/sys/dev/pci/agp_i810.c:1.112 Fri Jul 25 23:05:54 2014
+++ src/sys/dev/pci/agp_i810.c Thu Sep 18 10:25:33 2014
@@ -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.112.2.1 2014/09/18 10:25:33 martin 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.112.2.1 2014/09/18 10:25:33 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -405,7 +405,9 @@ agp_i810_attach(device_t parent, device_
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 @@ agp_i810_attach(device_t parent, device_
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_I810_MMADR, mmadr_type, NULL, &isc->size, NULL))
+ isc->size = 512*1024; /* XXX */
gtt_bar = 0;
gtt_off = AGP_I810_GTT;
break;