drm/ttm: replace context flags with bools v2
[linux-2.6-microblaze.git] / drivers / gpu / drm / ttm / ttm_bo.c
index e9f91cf..e2a124b 100644 (file)
@@ -612,7 +612,7 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
        /* Don't evict this BO if it's outside of the
         * requested placement range
         */
-       if (place->fpfn >= (bo->mem.start + bo->mem.size) ||
+       if (place->fpfn >= (bo->mem.start + bo->mem.num_pages) ||
            (place->lpfn && place->lpfn <= bo->mem.start))
                return false;
 
@@ -637,7 +637,7 @@ static bool ttm_bo_evict_swapout_allowable(struct ttm_buffer_object *bo,
 
        if (bo->base.resv == ctx->resv) {
                dma_resv_assert_held(bo->base.resv);
-               if (ctx->flags & TTM_OPT_FLAG_ALLOW_RES_EVICT)
+               if (ctx->allow_res_evict)
                        ret = true;
                *locked = false;
                if (busy)
@@ -1333,7 +1333,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
        INIT_DELAYED_WORK(&bdev->wq, ttm_bo_delayed_workqueue);
        INIT_LIST_HEAD(&bdev->ddestroy);
        bdev->dev_mapping = mapping;
-       bdev->need_dma32 = use_dma32;
        mutex_lock(&ttm_global_mutex);
        list_add_tail(&bdev->device_list, &glob->device_list);
        mutex_unlock(&ttm_global_mutex);