diff options
-rw-r--r-- | linux-core/i915_buffer.c | 5 | ||||
-rw-r--r-- | linux-core/i915_drv.c | 4 | ||||
-rw-r--r-- | linux-core/intel_fb.c | 2 | ||||
-rw-r--r-- | shared-core/i915_init.c | 8 |
4 files changed, 11 insertions, 8 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index 8589f467..6e93ae21 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -86,7 +86,7 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type, _DRM_FLAG_MEMTYPE_CSELECT | _DRM_FLAG_NEEDS_IOREMAP; man->drm_bus_maptype = _DRM_AGP; break; - case DRM_BO_MEM_PRIV0: + case DRM_BO_MEM_VRAM: if (!(drm_core_has_AGP(dev) && dev->agp)) { DRM_ERROR("AGP is not enabled for memory type %u\n", (unsigned)type); @@ -99,6 +99,9 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type, _DRM_FLAG_MEMTYPE_FIXED | _DRM_FLAG_NEEDS_IOREMAP; man->drm_bus_maptype = _DRM_AGP; break; + case DRM_BO_MEM_PRIV0: /* for OS preallocated space */ + DRM_ERROR("PRIV0 not used yet.\n"); + break; default: DRM_ERROR("Unsupported memory type %u\n", (unsigned)type); return -EINVAL; diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c index ecf42771..4d4029aa 100644 --- a/linux-core/i915_drv.c +++ b/linux-core/i915_drv.c @@ -53,8 +53,8 @@ static drm_fence_driver_t i915_fence_driver = { #endif #ifdef I915_HAVE_BUFFER -static uint32_t i915_mem_prios[] = {DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL}; -static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_LOCAL}; +static uint32_t i915_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL}; +static uint32_t i915_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_VRAM, DRM_BO_MEM_LOCAL}; static drm_bo_driver_t i915_bo_driver = { .mem_type_prio = i915_mem_prios, diff --git a/linux-core/intel_fb.c b/linux-core/intel_fb.c index 449ef543..3bfbcda3 100644 --- a/linux-core/intel_fb.c +++ b/linux-core/intel_fb.c @@ -473,7 +473,7 @@ int intelfb_probe(struct drm_device *dev, struct drm_crtc *crtc) drm_bo_type_kernel, DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | - DRM_BO_FLAG_MEM_PRIV0 | /* FIXME! */ + DRM_BO_FLAG_MEM_VRAM | /* FIXME! */ DRM_BO_FLAG_NO_MOVE, 0, 0, 0, &fbo); diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index 61576aae..7516b2ce 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -175,8 +175,8 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) drm_bo_driver_init(dev); i915_probe_agp(dev->pdev, &agp_size, &prealloc_size); - DRM_DEBUG("setting up %ld bytes of PRIV0 space\n", prealloc_size); - drm_bo_init_mm(dev, DRM_BO_MEM_PRIV0, 0, prealloc_size >> PAGE_SHIFT); + DRM_DEBUG("setting up %ld bytes of VRAM space\n", prealloc_size); + drm_bo_init_mm(dev, DRM_BO_MEM_VRAM, 0, prealloc_size >> PAGE_SHIFT); I915_WRITE(LP_RING + RING_LEN, 0); I915_WRITE(LP_RING + RING_HEAD, 0); @@ -185,7 +185,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) size = PRIMARY_RINGBUFFER_SIZE; ret = drm_buffer_object_create(dev, size, drm_bo_type_kernel, DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | - DRM_BO_FLAG_MEM_PRIV0 | + DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_NO_EVICT, DRM_BO_HINT_DONT_FENCE, 0x1, 0, &dev_priv->ring_buffer); @@ -277,7 +277,7 @@ int i915_driver_unload(drm_device_t *dev) drm_bo_usage_deref_locked(dev_priv->ring_buffer); mutex_unlock(&dev->struct_mutex); - if (drm_bo_clean_mm(dev, DRM_BO_MEM_PRIV0)) { + if (drm_bo_clean_mm(dev, DRM_BO_MEM_VRAM)) { DRM_ERROR("Memory manager type 3 not clean. " "Delaying takedown\n"); } |