diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2007-09-27 14:21:29 +0100 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2007-09-27 14:21:29 +0100 |
commit | bf9bd5671c184e1caeeb25ead588cbb2ab77c360 (patch) | |
tree | cc4421e535b9991e1e96d7c7fb505b90bb934998 | |
parent | 2ed12b6b7eee8a1b5b0adf0cd8f3cb8c1bc3ccaf (diff) |
Create memory pool for TT memory
-rw-r--r-- | shared-core/i915_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index 918bbcb8..8e419b8a 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -175,8 +175,10 @@ int i915_driver_load(struct drm_device *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 VRAM space\n", prealloc_size); + printk("setting up %ld bytes of VRAM space\n", prealloc_size); + printk("setting up %ld bytes of TT space\n", (agp_size - prealloc_size)); drm_bo_init_mm(dev, DRM_BO_MEM_VRAM, 0, prealloc_size >> PAGE_SHIFT); + drm_bo_init_mm(dev, DRM_BO_MEM_TT, prealloc_size >> PAGE_SHIFT, (agp_size - prealloc_size) >> PAGE_SHIFT); I915_WRITE(LP_RING + RING_LEN, 0); I915_WRITE(LP_RING + RING_HEAD, 0); @@ -292,6 +294,10 @@ int i915_driver_unload(struct drm_device *dev) mutex_lock(&dev->struct_mutex); drm_bo_usage_deref_locked(&dev_priv->ring_buffer); + if (drm_bo_clean_mm(dev, DRM_BO_MEM_TT)) { + DRM_ERROR("Memory manager type 3 not clean. " + "Delaying takedown\n"); + } if (drm_bo_clean_mm(dev, DRM_BO_MEM_VRAM)) { DRM_ERROR("Memory manager type 3 not clean. " "Delaying takedown\n"); |