diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-13 20:05:32 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-13 20:05:32 +0100 |
commit | 9efdae317ce01cea95f75855b175243ae858fde4 (patch) | |
tree | eb28b84efa1c046fc34cab82c0263e255c141f8b /linux-core/i915_buffer.c | |
parent | abc14ddfb5ad85bf2a5094597d829e6614e6c359 (diff) |
More bugfixes.
Fixed memory, pinned buffers and unmappable memory now seems
fully functional.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r-- | linux-core/i915_buffer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index 4fab0bef..3ccfab38 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -93,7 +93,7 @@ int i915_init_mem_type(drm_device_t * dev, uint32_t type, man->io_offset = dev->agp->agp_info.aper_base; man->io_size = dev->agp->agp_info.aper_size * 1024 * 1024; man->io_addr = NULL; - man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE | + man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE | _DRM_FLAG_MEMTYPE_FIXED | _DRM_FLAG_NEEDS_IOREMAP; break; @@ -111,7 +111,7 @@ uint32_t i915_evict_flags(drm_device_t * dev, uint32_t type) case DRM_BO_MEM_TT: return DRM_BO_FLAG_MEM_LOCAL; default: - return DRM_BO_FLAG_MEM_TT; + return DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_CACHED; } } @@ -204,10 +204,11 @@ static int i915_move_flip(drm_buffer_object_t * bo, goto out_cleanup; ret = drm_bo_move_ttm(bo, evict, no_wait, new_mem); - out_cleanup: +out_cleanup: if (tmp_mem.mm_node) { mutex_lock(&dev->struct_mutex); - drm_mm_put_block(tmp_mem.mm_node); + if (tmp_mem.mm_node != bo->pinned_node) + drm_mm_put_block(tmp_mem.mm_node); tmp_mem.mm_node = NULL; mutex_unlock(&dev->struct_mutex); } |