Lines Matching refs:func

107 	struct idr *idr = &dev_priv->res_idr[res->func->res_type];  in vmw_resource_release_id()
122 struct idr *idr = &dev_priv->res_idr[res->func->res_type]; in vmw_resource_release()
132 res->func->unbind != NULL) { in vmw_resource_release()
137 res->func->unbind(res, false, &val_buf); in vmw_resource_release()
188 struct idr *idr = &dev_priv->res_idr[res->func->res_type]; in vmw_resource_alloc_id()
218 const struct vmw_res_func *func) in vmw_resource_init() argument
225 res->func = func; in vmw_resource_init()
1101 res->func->backup_placement, in vmw_resource_buf_alloc()
1128 const struct vmw_res_func *func = res->func; in vmw_resource_do_validate() local
1131 ret = func->create(res); in vmw_resource_do_validate()
1136 if (func->bind && in vmw_resource_do_validate()
1137 ((func->needs_backup && list_empty(&res->mob_head) && in vmw_resource_do_validate()
1139 (!func->needs_backup && val_buf->bo != NULL))) { in vmw_resource_do_validate()
1140 ret = func->bind(res, val_buf); in vmw_resource_do_validate()
1143 if (func->needs_backup) in vmw_resource_do_validate()
1158 func->destroy(res); in vmw_resource_do_validate()
1199 if (!res->func->may_evict || res->id == -1) in vmw_resource_unreserve()
1204 &res->dev_priv->res_lru[res->func->res_type]); in vmw_resource_unreserve()
1242 if (res->func->needs_backup && list_empty(&res->mob_head)) in vmw_resource_check_buffer()
1247 res->func->backup_placement, in vmw_resource_check_buffer()
1284 if (res->func->needs_backup && res->backup == NULL && in vmw_resource_reserve()
1324 const struct vmw_res_func *func = res->func; in vmw_resource_do_evict() local
1327 BUG_ON(!func->may_evict); in vmw_resource_do_evict()
1335 if (unlikely(func->unbind != NULL && in vmw_resource_do_evict()
1336 (!func->needs_backup || !list_empty(&res->mob_head)))) { in vmw_resource_do_evict()
1337 ret = func->unbind(res, res->res_dirty, &val_buf); in vmw_resource_do_evict()
1342 ret = func->destroy(res); in vmw_resource_do_evict()
1368 struct list_head *lru_list = &dev_priv->res_lru[res->func->res_type]; in vmw_resource_validate()
1372 if (likely(!res->func->may_evict)) in vmw_resource_validate()
1385 if (list_empty(lru_list) || !res->func->may_evict) { in vmw_resource_validate()
1387 "for %s.\n", res->func->type_name); in vmw_resource_validate()
1417 else if (!res->func->needs_backup && res->backup) { in vmw_resource_validate()
1498 if (unlikely(res->func->unbind == NULL)) in vmw_resource_move_notify()
1501 (void) res->func->unbind(res, true, &val_buf); in vmw_resource_move_notify()
1518 return res->func->needs_backup; in vmw_resource_needs_backup()