summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/drm/drm_memory.c3
-rw-r--r--sys/dev/pci/drm/i915_dma.c7
-rw-r--r--sys/dev/pci/drm/i915_drv.c9
3 files changed, 9 insertions, 10 deletions
diff --git a/sys/dev/pci/drm/drm_memory.c b/sys/dev/pci/drm/drm_memory.c
index 19fea19d38d..cdc3781b173 100644
--- a/sys/dev/pci/drm/drm_memory.c
+++ b/sys/dev/pci/drm/drm_memory.c
@@ -94,7 +94,8 @@ drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev)
DRM_DEBUG("AGP map\n");
map->bst = dev->bst;
if (bus_space_map(map->bst, map->offset,
- map->size, BUS_SPACE_MAP_LINEAR, &map->bsh)) {
+ map->size, BUS_SPACE_MAP_LINEAR |
+ BUS_SPACE_MAP_PREFETCHABLE, &map->bsh)) {
DRM_ERROR("ioremap fail\n");
return;
}
diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c
index a221dfb4768..5e80c387bce 100644
--- a/sys/dev/pci/drm/i915_dma.c
+++ b/sys/dev/pci/drm/i915_dma.c
@@ -131,7 +131,8 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
dev_priv->ring.size = init->ring_size;
if ((ret = bus_space_map(dev_priv->bst, init->ring_start,
- init->ring_size, 0, &dev_priv->ring.bsh)) != 0) {
+ init->ring_size, BUS_SPACE_MAP_PREFETCHABLE,
+ &dev_priv->ring.bsh)) != 0) {
DRM_INFO("can't map ringbuffer\n");
i915_dma_cleanup(dev);
return (ret);
@@ -678,8 +679,8 @@ int i915_set_status_page(struct drm_device *dev, void *data,
dev_priv->hws_map.size = 4*1024;
if ((ret = bus_space_map(dev_priv->bst, dev_priv->hws_map.offset,
- dev_priv->hws_map.size, BUS_SPACE_MAP_LINEAR,
- &dev_priv->hws_map.bsh)) != 0) {
+ dev_priv->hws_map.size, BUS_SPACE_MAP_LINEAR |
+ BUS_SPACE_MAP_PREFETCHABLE, &dev_priv->hws_map.bsh)) != 0) {
DRM_INFO("can't hws page\n");
i915_dma_cleanup(dev);
dev_priv->status_gfx_addr = 0;
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index b3e2b61add3..53f6cce666e 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -469,10 +469,9 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux)
/* array of vm pages that physload introduced. */
dev_priv->pgs = PHYS_TO_VM_PAGE(dev->agp->base);
KASSERT(dev_priv->pgs != NULL);
- /* XXX wc and do earlier */
if (bus_space_map(dev_priv->bst, dev->agp->base,
- dev->agp->info.ai_aperture_size, BUS_SPACE_MAP_LINEAR,
- &dev_priv->aperture_bsh) != 0)
+ dev->agp->info.ai_aperture_size, BUS_SPACE_MAP_LINEAR |
+ BUS_SPACE_MAP_PREFETCHABLE, &dev_priv->aperture_bsh) != 0)
panic("can't map aperture");
#endif /* INTELDRM_GEM */
}
@@ -2326,8 +2325,7 @@ inteldrm_fault(struct drm_obj *obj, struct uvm_faultinfo *ufi, off_t offset,
UVMHIST_LOG(maphist,
" MAPPING: device: pm=%p, va=0x%lx, pa=0x%lx, at=%ld",
ufi->orig_map->pmap, vaddr, (u_long)paddr, mapprot);
- /* XXX writecombining */
- if (pmap_enter(ufi->orig_map->pmap, vaddr, paddr | PMAP_NOCACHE,
+ if (pmap_enter(ufi->orig_map->pmap, vaddr, paddr,
mapprot, PMAP_CANFAIL | mapprot) != 0) {
drm_unhold_object(obj);
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap,
@@ -3833,7 +3831,6 @@ i915_gem_init_ringbuffer(struct drm_i915_private *dev_priv)
/* Set up the kernel mapping for the ring. */
dev_priv->ring.size = obj->size;
- /* XXX WC */
if ((ret = bus_space_subregion(dev_priv->bst, dev_priv->aperture_bsh,
obj_priv->gtt_offset, obj->size, &dev_priv->ring.bsh)) != 0) {
DRM_INFO("can't map ringbuffer\n");