summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-24 03:16:28 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-24 03:16:28 +0000
commit182459c1837dd2aeab6973ad0c11d1fb9cc63bb1 (patch)
tree3b53738b74d0bc04c9bb185dd4449adf82aab9a8 /sys/dev/pci
parent6e36029167f479641684e533993ff7e2226f6e81 (diff)
oops. Use the correct struct member to map so that radeon doesn't panic
on X startup. found by ckuethe@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915_drv.c2
-rw-r--r--sys/dev/pci/drm/mach64_drv.c2
-rw-r--r--sys/dev/pci/drm/mga_drv.c4
-rw-r--r--sys/dev/pci/drm/r128_drv.c2
-rw-r--r--sys/dev/pci/drm/radeon_drv.c4
-rw-r--r--sys/dev/pci/drm/savage_drv.c12
6 files changed, 14 insertions, 12 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index d70d273115d..022ed8254a7 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -143,7 +143,7 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux)
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
diff --git a/sys/dev/pci/drm/mach64_drv.c b/sys/dev/pci/drm/mach64_drv.c
index ea92e429252..fdfc8a22051 100644
--- a/sys/dev/pci/drm/mach64_drv.c
+++ b/sys/dev/pci/drm/mach64_drv.c
@@ -112,7 +112,7 @@ machdrm_attach(struct device *parent, struct device *self, void *aux)
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
diff --git a/sys/dev/pci/drm/mga_drv.c b/sys/dev/pci/drm/mga_drv.c
index 59911938323..2ec3dbcacec 100644
--- a/sys/dev/pci/drm/mga_drv.c
+++ b/sys/dev/pci/drm/mga_drv.c
@@ -155,14 +155,14 @@ mgadrm_attach(struct device *parent, struct device *self, void *aux)
return;
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
diff --git a/sys/dev/pci/drm/r128_drv.c b/sys/dev/pci/drm/r128_drv.c
index f4042a2864a..06dae98d011 100644
--- a/sys/dev/pci/drm/r128_drv.c
+++ b/sys/dev/pci/drm/r128_drv.c
@@ -129,7 +129,7 @@ ragedrm_attach(struct device *parent, struct device *self, void *aux)
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
diff --git a/sys/dev/pci/drm/radeon_drv.c b/sys/dev/pci/drm/radeon_drv.c
index 994183f194f..387f863353a 100644
--- a/sys/dev/pci/drm/radeon_drv.c
+++ b/sys/dev/pci/drm/radeon_drv.c
@@ -529,7 +529,7 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux)
return;
}
dev_priv->fb_aper_offset = bar->base;
- dev_priv->fb_aper_size = bar->size;
+ dev_priv->fb_aper_size = bar->maxsize;
bar = vga_pci_bar_info((struct vga_pci_softc *)parent, 2);
if (bar == NULL) {
@@ -538,7 +538,7 @@ radeondrm_attach(struct device *parent, struct device *self, void *aux)
}
dev_priv->regs = vga_pci_bar_map((struct vga_pci_softc *)parent,
- bar->addr, bar->size, 0);
+ bar->addr, 0, 0);
if (dev_priv->regs == NULL) {
printf(": can't map mmio space\n");
return;
diff --git a/sys/dev/pci/drm/savage_drv.c b/sys/dev/pci/drm/savage_drv.c
index 8c0ec5866ca..b809871c80d 100644
--- a/sys/dev/pci/drm/savage_drv.c
+++ b/sys/dev/pci/drm/savage_drv.c
@@ -112,8 +112,9 @@ savagedrm_attach(struct device *parent, struct device *self, void *aux)
dev_priv->aperture_base = dev_priv->fb_base +
SAVAGE_APERTURE_OFFSET;
/* this should always be true */
- if (bar->size != 0x08000000) {
- printf(": strange pci resource len $08lx\n", bar->size);
+ if (bar->maxsize != 0x08000000) {
+ printf(": strange pci resource len $08lx\n",
+ bar->maxsize);
return;
}
} else if (dev_priv->chipset != S3_SUPERSAVAGE &&
@@ -135,8 +136,9 @@ savagedrm_attach(struct device *parent, struct device *self, void *aux)
dev_priv->aperture_base = dev_priv->fb_base +
SAVAGE_APERTURE_OFFSET;
/* this should always be true */
- if (bar->size != 0x08000000) {
- printf(": strange pci resource len $08lx\n", bar->size);
+ if (bar->maxsize != 0x08000000) {
+ printf(": strange pci resource len $08lx\n",
+ bar->maxsize);
return;
}
} else {
@@ -152,7 +154,7 @@ savagedrm_attach(struct device *parent, struct device *self, void *aux)
return;
}
dev_priv->fb_base = bar->base;
- dev_priv->fb_size = bar->size;
+ dev_priv->fb_size = bar->maxsize;
bar = vga_pci_bar_info((struct vga_pci_softc *)parent, 2);
if (bar == NULL) {
printf(": can't find aperture info\n");