Lines Matching refs:func

108 	struct idr *idr = &dev_priv->res_idr[res->func->res_type];  in vmw_resource_release_id()
123 struct idr *idr = &dev_priv->res_idr[res->func->res_type]; in vmw_resource_release()
134 res->func->unbind != NULL) { in vmw_resource_release()
139 res->func->unbind(res, false, &val_buf); in vmw_resource_release()
187 struct idr *idr = &dev_priv->res_idr[res->func->res_type]; in vmw_resource_alloc_id()
217 const struct vmw_res_func *func) in vmw_resource_init() argument
224 res->func = func; in vmw_resource_init()
1099 res->func->backup_placement, in vmw_resource_buf_alloc()
1126 const struct vmw_res_func *func = res->func; in vmw_resource_do_validate() local
1129 ret = func->create(res); in vmw_resource_do_validate()
1134 if (func->bind && in vmw_resource_do_validate()
1135 ((func->needs_backup && list_empty(&res->mob_head) && in vmw_resource_do_validate()
1137 (!func->needs_backup && val_buf->bo != NULL))) { in vmw_resource_do_validate()
1138 ret = func->bind(res, val_buf); in vmw_resource_do_validate()
1141 if (func->needs_backup) in vmw_resource_do_validate()
1156 func->destroy(res); in vmw_resource_do_validate()
1202 if (!res->func->may_evict || res->id == -1 || res->pin_count) in vmw_resource_unreserve()
1207 &res->dev_priv->res_lru[res->func->res_type]); in vmw_resource_unreserve()
1245 if (res->func->needs_backup && list_empty(&res->mob_head)) in vmw_resource_check_buffer()
1250 res->func->backup_placement, in vmw_resource_check_buffer()
1288 if (res->func->needs_backup && res->backup == NULL && in vmw_resource_reserve()
1332 const struct vmw_res_func *func = res->func; in vmw_resource_do_evict() local
1335 BUG_ON(!func->may_evict); in vmw_resource_do_evict()
1343 if (unlikely(func->unbind != NULL && in vmw_resource_do_evict()
1344 (!func->needs_backup || !list_empty(&res->mob_head)))) { in vmw_resource_do_evict()
1345 ret = func->unbind(res, res->res_dirty, &val_buf); in vmw_resource_do_evict()
1350 ret = func->destroy(res); in vmw_resource_do_evict()
1376 struct list_head *lru_list = &dev_priv->res_lru[res->func->res_type]; in vmw_resource_validate()
1380 if (!res->func->create) in vmw_resource_validate()
1393 if (list_empty(lru_list) || !res->func->may_evict) { in vmw_resource_validate()
1395 "for %s.\n", res->func->type_name); in vmw_resource_validate()
1425 else if (!res->func->needs_backup && res->backup) { in vmw_resource_validate()
1506 if (unlikely(res->func->unbind == NULL)) in vmw_resource_move_notify()
1509 (void) res->func->unbind(res, true, &val_buf); in vmw_resource_move_notify()
1621 return res->func->needs_backup; in vmw_resource_needs_backup()
1725 res->func->backup_placement, in vmw_resource_pin()
1794 return res->func->res_type; in vmw_res_type()