summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-05-04 13:18:30 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-05-04 13:18:30 +0000
commitacd6bb699adcae30bfb94aa6ba2d792fa7e63342 (patch)
tree69e1285bf73282578227e20ecb257f23b7b07697 /sys/dev/pci
parentda1041532ae829801559f0b33bc0e3db7df73e4c (diff)
In i915_alloc_ifp() and i965_alloc_ifp() use extent_alloc_subregion() to make
sure we allocate outside the Legacy Address Range. Gets rid of the "no ifp" warning on the x41.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915/i915_drv.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c
index 2b522e651d5..7e15044d087 100644
--- a/sys/dev/pci/drm/i915/i915_drv.c
+++ b/sys/dev/pci/drm/i915/i915_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_drv.c,v 1.23 2013/04/30 19:56:46 kettenis Exp $ */
+/* $OpenBSD: i915_drv.c,v 1.24 2013/05/04 13:18:29 kettenis Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -1226,9 +1226,11 @@ i915_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa)
&dev_priv->ifp.i9xx.bsh) != 0)
goto nope;
return;
- } else if (bpa->pa_memex == NULL || extent_alloc(bpa->pa_memex,
- PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || bus_space_map(bpa->pa_memt,
- addr, PAGE_SIZE, 0, &dev_priv->ifp.i9xx.bsh))
+ } else if (bpa->pa_memex == NULL ||
+ extent_alloc_subregion(bpa->pa_memex, 0x100000, 0xffffffff,
+ PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) ||
+ bus_space_map(bpa->pa_memt, addr, PAGE_SIZE, 0,
+ &dev_priv->ifp.i9xx.bsh))
goto nope;
pci_conf_write(bpa->pa_pc, bpa->pa_tag, I915_IFPADDR, addr | 0x1);
@@ -1258,9 +1260,11 @@ i965_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa)
&dev_priv->ifp.i9xx.bsh) != 0)
goto nope;
return;
- } else if (bpa->pa_memex == NULL || extent_alloc(bpa->pa_memex,
- PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) || bus_space_map(bpa->pa_memt,
- addr, PAGE_SIZE, 0, &dev_priv->ifp.i9xx.bsh))
+ } else if (bpa->pa_memex == NULL ||
+ extent_alloc_subregion(bpa->pa_memex, 0x100000, 0xffffffff,
+ PAGE_SIZE, PAGE_SIZE, 0, 0, 0, &addr) ||
+ bus_space_map(bpa->pa_memt, addr, PAGE_SIZE, 0,
+ &dev_priv->ifp.i9xx.bsh))
goto nope;
pci_conf_write(bpa->pa_pc, bpa->pa_tag, I965_IFPADDR + 4,