summaryrefslogtreecommitdiffstats
path: root/sys/pci/agp_i810.c
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2002-09-13 04:17:28 +0000
committeranholt <anholt@FreeBSD.org>2002-09-13 04:17:28 +0000
commit44b216d9353b8b1e6f5e87db67b08724cc32eb4f (patch)
treede7b246fb050b4f8e850290156ab95d6fdc707ca /sys/pci/agp_i810.c
parentb1e3c0a0255215ab6967444719d178004e6ad4d0 (diff)
downloadFreeBSD-src-44b216d9353b8b1e6f5e87db67b08724cc32eb4f.zip
FreeBSD-src-44b216d9353b8b1e6f5e87db67b08724cc32eb4f.tar.gz
Fix an i830/i845 test that shouldn't get hit in normal use and remove a printf.
Submitted by: David Dawes <dawes@XFree86.Org>
Diffstat (limited to 'sys/pci/agp_i810.c')
-rw-r--r--sys/pci/agp_i810.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c
index a8ac38e..4353f80 100644
--- a/sys/pci/agp_i810.c
+++ b/sys/pci/agp_i810.c
@@ -446,9 +446,10 @@ agp_i810_unbind_page(device_t dev, int offset)
return EINVAL;
if ( sc->chiptype == CHIP_I830 ) {
- if ( (offset >> AGP_PAGE_SHIFT) < sc->stolen )
+ if ( (offset >> AGP_PAGE_SHIFT) < sc->stolen ) {
device_printf(dev, "trying to unbind from stolen memory");
- return EINVAL;
+ return EINVAL;
+ }
}
WRITE4(AGP_I810_GTT + (offset >> AGP_PAGE_SHIFT) * 4, 0);
@@ -570,11 +571,8 @@ agp_i810_bind_memory(device_t dev, struct agp_memory *mem,
if (mem->am_type != 1)
return agp_generic_bind_memory(dev, mem, offset);
- if ( sc->chiptype == CHIP_I830 ) {
- if ((offset >> AGP_PAGE_SHIFT) < sc->stolen)
- device_printf(dev, "trying to bind into stolen memory");
+ if ( sc->chiptype == CHIP_I830 )
return EINVAL;
- }
for (i = 0; i < mem->am_size; i += AGP_PAGE_SIZE) {
WRITE4(AGP_I810_GTT + (offset >> AGP_PAGE_SHIFT) * 4,
OpenPOWER on IntegriCloud