summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-11-22 07:40:37 +0100
committerDave Airlie <airlied@redhat.com>2008-02-07 06:09:38 +0100
commit8b40958032fd236194de57d29be9cf2c1f2643ee (patch)
treef9fb723d3d4d8ef1f860ee85c9000c2b1ebcfb8d /drivers/char
parentdrm: move two function extern into the correct block (diff)
downloadlinux-8b40958032fd236194de57d29be9cf2c1f2643ee.tar.xz
linux-8b40958032fd236194de57d29be9cf2c1f2643ee.zip
drm: Initialize the AGP structure's base address at init rather than enable.
Not all drivers call enable (intel), but they would still like to use this member in driver code. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/drm/drm_agpsupport.c3
-rw-r--r--drivers/char/drm/i915_dma.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/drm/drm_agpsupport.c b/drivers/char/drm/drm_agpsupport.c
index 214f4fbcba73..9468c7889ff1 100644
--- a/drivers/char/drm/drm_agpsupport.c
+++ b/drivers/char/drm/drm_agpsupport.c
@@ -166,7 +166,6 @@ int drm_agp_enable(struct drm_device * dev, struct drm_agp_mode mode)
dev->agp->mode = mode.mode;
agp_enable(dev->agp->bridge, mode.mode);
- dev->agp->base = dev->agp->agp_info.aper_base;
dev->agp->enabled = 1;
return 0;
}
@@ -417,7 +416,7 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
INIT_LIST_HEAD(&head->memory);
head->cant_use_aperture = head->agp_info.cant_use_aperture;
head->page_mask = head->agp_info.page_mask;
-
+ head->base = head->agp_info.aper_base;
return head;
}
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c
index 9e4fc96aa0a0..842db3233e9e 100644
--- a/drivers/char/drm/i915_dma.c
+++ b/drivers/char/drm/i915_dma.c
@@ -757,7 +757,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
dev_priv->status_gfx_addr = hws->addr & (0x1ffff<<12);
- dev_priv->hws_map.offset = dev->agp->agp_info.aper_base + hws->addr;
+ dev_priv->hws_map.offset = dev->agp->base + hws->addr;
dev_priv->hws_map.size = 4*1024;
dev_priv->hws_map.type = 0;
dev_priv->hws_map.flags = 0;