Commit 8b409580 authored by Eric Anholt's avatar Eric Anholt Committed by Dave Airlie

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: default avatarDave Airlie <airlied@linux.ie>
parent ded23359
...@@ -166,7 +166,6 @@ int drm_agp_enable(struct drm_device * dev, struct drm_agp_mode mode) ...@@ -166,7 +166,6 @@ int drm_agp_enable(struct drm_device * dev, struct drm_agp_mode mode)
dev->agp->mode = mode.mode; dev->agp->mode = mode.mode;
agp_enable(dev->agp->bridge, mode.mode); agp_enable(dev->agp->bridge, mode.mode);
dev->agp->base = dev->agp->agp_info.aper_base;
dev->agp->enabled = 1; dev->agp->enabled = 1;
return 0; return 0;
} }
...@@ -417,7 +416,7 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev) ...@@ -417,7 +416,7 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
INIT_LIST_HEAD(&head->memory); INIT_LIST_HEAD(&head->memory);
head->cant_use_aperture = head->agp_info.cant_use_aperture; head->cant_use_aperture = head->agp_info.cant_use_aperture;
head->page_mask = head->agp_info.page_mask; head->page_mask = head->agp_info.page_mask;
head->base = head->agp_info.aper_base;
return head; return head;
} }
......
...@@ -757,7 +757,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data, ...@@ -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->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.size = 4*1024;
dev_priv->hws_map.type = 0; dev_priv->hws_map.type = 0;
dev_priv->hws_map.flags = 0; dev_priv->hws_map.flags = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment