diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2010-10-26 21:21:47 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-27 03:07:46 +0200 |
commit | 135cba0dc399fdd47bd3ae305c1db75fcd77243f (patch) | |
tree | 3eedcd7c5701dfe05246aca3479ab7396169f2e7 /drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | |
parent | drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2 (diff) | |
download | linux-135cba0dc399fdd47bd3ae305c1db75fcd77243f.tar.xz linux-135cba0dc399fdd47bd3ae305c1db75fcd77243f.zip |
vmwgfx: Implement a proper GMR eviction mechanism
Use Ben's new range manager hooks to implement a manager for
GMRs that manages ids rather than ranges.
This means we can use the standard TTM code for binding, unbinding and
eviction.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_fb.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index e7304188a784..41d9a5b73c03 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c @@ -612,7 +612,6 @@ int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv, { struct ttm_buffer_object *bo = &vmw_bo->base; struct ttm_placement ne_placement = vmw_vram_ne_placement; - struct drm_mm_node *mm_node; int ret = 0; ne_placement.lpfn = bo->num_pages; @@ -626,9 +625,9 @@ int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv, if (unlikely(ret != 0)) goto err_unlock; - mm_node = bo->mem.mm_node; if (bo->mem.mem_type == TTM_PL_VRAM && - mm_node->start < bo->num_pages) + bo->mem.start < bo->num_pages && + bo->mem.start > 0) (void) ttm_bo_validate(bo, &vmw_sys_placement, false, false, false); |