Lines Matching refs:guest_memory_bo
43 struct vmw_bo *gbo = res->guest_memory_bo; in vmw_resource_mob_attach()
71 struct vmw_bo *gbo = res->guest_memory_bo; in vmw_resource_mob_detach()
124 if (res->guest_memory_bo) { in vmw_resource_release()
125 struct ttm_buffer_object *bo = &res->guest_memory_bo->tbo; in vmw_resource_release()
142 vmw_bo_dirty_release(res->guest_memory_bo); in vmw_resource_release()
144 vmw_user_bo_unref(&res->guest_memory_bo); in vmw_resource_release()
227 res->guest_memory_bo = NULL; in vmw_resource_init()
336 if (likely(res->guest_memory_bo)) { in vmw_resource_buf_alloc()
337 BUG_ON(res->guest_memory_bo->tbo.base.size < size); in vmw_resource_buf_alloc()
345 res->guest_memory_bo = gbo; in vmw_resource_buf_alloc()
393 if (res->guest_memory_bo->dirty && !res->dirty) { in vmw_resource_do_validate()
397 } else if (!res->guest_memory_bo->dirty && res->dirty) { in vmw_resource_do_validate()
413 vmw_bo_dirty_unmap(res->guest_memory_bo, start, end); in vmw_resource_do_validate()
455 if (switch_guest_memory && new_guest_memory_bo != res->guest_memory_bo) { in vmw_resource_unreserve()
456 if (res->guest_memory_bo) { in vmw_resource_unreserve()
459 vmw_bo_dirty_release(res->guest_memory_bo); in vmw_resource_unreserve()
460 vmw_user_bo_unref(&res->guest_memory_bo); in vmw_resource_unreserve()
464 res->guest_memory_bo = vmw_user_bo_ref(new_guest_memory_bo); in vmw_resource_unreserve()
474 res->guest_memory_bo = NULL; in vmw_resource_unreserve()
477 vmw_bo_dirty_release(res->guest_memory_bo); in vmw_resource_unreserve()
518 if (unlikely(!res->guest_memory_bo)) { in vmw_resource_check_buffer()
525 ttm_bo_get(&res->guest_memory_bo->tbo); in vmw_resource_check_buffer()
526 val_buf->bo = &res->guest_memory_bo->tbo; in vmw_resource_check_buffer()
537 vmw_bo_placement_set(res->guest_memory_bo, res->func->domain, in vmw_resource_check_buffer()
539 ret = ttm_bo_validate(&res->guest_memory_bo->tbo, in vmw_resource_check_buffer()
540 &res->guest_memory_bo->placement, in vmw_resource_check_buffer()
554 vmw_user_bo_unref(&res->guest_memory_bo); in vmw_resource_check_buffer()
580 if (res->func->needs_guest_memory && !res->guest_memory_bo && in vmw_resource_reserve()
687 if (res->guest_memory_bo) in vmw_resource_validate()
688 val_buf.bo = &res->guest_memory_bo->tbo; in vmw_resource_validate()
728 else if (!res->func->needs_guest_memory && res->guest_memory_bo) { in vmw_resource_validate()
730 vmw_user_bo_unref(&res->guest_memory_bo); in vmw_resource_validate()
971 if (res->guest_memory_bo) { in vmw_resource_pin()
972 vbo = res->guest_memory_bo; in vmw_resource_pin()
1029 if (--res->pin_count == 0 && res->guest_memory_bo) { in vmw_resource_unpin()
1030 struct vmw_bo *vbo = res->guest_memory_bo; in vmw_resource_unpin()