Lines Matching defs:func
46 res->used_prio = (res->res_dirty) ? res->func->dirty_prio :
47 res->func->prio;
102 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
117 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
127 res->func->unbind != NULL) {
132 res->func->unbind(res, false, &val_buf);
137 res->func->dirty_free(res);
184 struct idr *idr = &dev_priv->res_idr[res->func->res_type];
209 * @func: Resource function table.
214 const struct vmw_res_func *func)
220 res->func = func;
372 res->func->backup_placement,
400 const struct vmw_res_func *func = res->func;
403 ret = func->create(res);
408 if (func->bind &&
409 ((func->needs_backup && !vmw_resource_mob_attached(res) &&
411 (!func->needs_backup && val_buf->bo != NULL))) {
412 ret = func->bind(res, val_buf);
415 if (func->needs_backup)
423 if (func->dirty_alloc && vmw_resource_mob_attached(res) &&
426 ret = func->dirty_alloc(res);
430 func->dirty_free(res);
449 return func->dirty_sync(res);
455 func->destroy(res);
518 if (!res->func->may_evict || res->id == -1 || res->pin_count)
523 &res->dev_priv->res_lru[res->func->res_type]);
565 if (res->func->needs_backup && !vmw_resource_mob_attached(res))
570 res->func->backup_placement,
609 if (res->func->needs_backup && res->backup == NULL &&
658 const struct vmw_res_func *func = res->func;
661 BUG_ON(!func->may_evict);
669 if (unlikely(func->unbind != NULL &&
670 (!func->needs_backup || vmw_resource_mob_attached(res)))) {
671 ret = func->unbind(res, res->res_dirty, &val_buf);
676 ret = func->destroy(res);
707 struct list_head *lru_list = &dev_priv->res_lru[res->func->res_type];
711 if (!res->func->create)
724 if (list_empty(lru_list) || !res->func->may_evict) {
726 "for %s.\n", res->func->type_name);
757 else if (!res->func->needs_backup && res->backup) {
793 if (!WARN_ON_ONCE(!res->func->unbind))
794 (void) res->func->unbind(res, res->res_dirty, &val_buf);
902 return res->func->needs_backup;
1008 res->func->backup_placement,
1077 return res->func->res_type;
1091 res->func->dirty_range_add(res, start << PAGE_SHIFT,
1140 if (!found->func->clean)
1143 ret = found->func->clean(found);