Lines Matching defs:func
47 res->used_prio = (res->res_dirty) ? res->func->dirty_prio :
48 res->func->prio;
103 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
119 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
130 res->func->unbind != NULL) {
135 res->func->unbind(res, false, &val_buf);
140 res->func->dirty_free(res);
187 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
211 * @func: Resource function table.
216 const struct vmw_res_func *func)
222 res->func = func;
328 .domain = res->func->domain,
329 .busy_domain = res->func->busy_domain,
368 const struct vmw_res_func *func = res->func;
371 ret = func->create(res);
376 if (func->bind &&
377 ((func->needs_guest_memory && !vmw_resource_mob_attached(res) &&
379 (!func->needs_guest_memory && val_buf->bo))) {
380 ret = func->bind(res, val_buf);
383 if (func->needs_guest_memory)
391 if (func->dirty_alloc && vmw_resource_mob_attached(res) &&
394 ret = func->dirty_alloc(res);
398 func->dirty_free(res);
417 return func->dirty_sync(res);
423 func->destroy(res);
486 if (!res->func->may_evict || res->id == -1 || res->pin_count)
491 &res->dev_priv->res_lru[res->func->res_type]);
533 if (res->func->needs_guest_memory && !vmw_resource_mob_attached(res))
537 vmw_bo_placement_set(res->guest_memory_bo, res->func->domain,
538 res->func->busy_domain);
580 if (res->func->needs_guest_memory && !res->guest_memory_bo &&
629 const struct vmw_res_func *func = res->func;
632 BUG_ON(!func->may_evict);
640 if (unlikely(func->unbind != NULL &&
641 (!func->needs_guest_memory || vmw_resource_mob_attached(res)))) {
642 ret = func->unbind(res, res->res_dirty, &val_buf);
647 ret = func->destroy(res);
678 struct list_head *lru_list = &dev_priv->res_lru[res->func->res_type];
682 if (!res->func->create)
695 if (list_empty(lru_list) || !res->func->may_evict) {
697 "for %s.\n", res->func->type_name);
728 else if (!res->func->needs_guest_memory && res->guest_memory_bo) {
764 if (!WARN_ON_ONCE(!res->func->unbind))
765 (void) res->func->unbind(res, res->res_dirty, &val_buf);
873 return res->func->needs_guest_memory;
979 res->func->domain,
980 res->func->busy_domain);
1049 return res->func->res_type;
1063 res->func->dirty_range_add(res, start << PAGE_SHIFT,
1112 if (!found->func->clean)
1115 ret = found->func->clean(found);