• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/tidspbridge/rmgr/

Lines Matching refs:hnode

82 #define NODE_SET_PRIORITY(hnode, prio) ((hnode)->prio = prio)
83 #define NODE_SET_STATE(hnode, state) ((hnode)->node_state = state)
241 static void delete_node(struct node_object *hnode,
247 static void fill_stream_def(struct node_object *hnode,
251 static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
254 struct node_object *hnode,
279 enum node_state node_get_state(void *hnode)
281 struct node_object *pnode = (struct node_object *)hnode;
689 DBAPI node_alloc_msg_buf(struct node_object *hnode, u32 usize,
693 struct node_object *pnode = (struct node_object *)hnode;
776 int node_change_priority(struct node_object *hnode, s32 prio)
778 struct node_object *pnode = (struct node_object *)hnode;
787 if (!hnode || !hnode->hnode_mgr) {
790 hnode_mgr = hnode->hnode_mgr;
791 node_type = node_get_type(hnode);
803 state = node_get_state(hnode);
805 NODE_SET_PRIORITY(hnode, prio);
815 hnode,
818 hnode->node_env, prio);
821 NODE_SET_PRIORITY(hnode, prio);
849 struct node_object *hnode;
874 /* node_get_type() will return NODE_GPP if hnode =
1071 hnode = node1;
1077 hnode = node2;
1103 dev_node_obj->device_owner = hnode;
1146 int node_create(struct node_object *hnode)
1148 struct node_object *pnode = (struct node_object *)hnode;
1169 hprocessor = hnode->hprocessor;
1182 node_type = node_get_type(hnode);
1183 hnode_mgr = hnode->hnode_mgr;
1189 if (node_get_state(hnode) != NODE_ALLOCATED)
1202 if ((hnode->num_inputs && hnode->max_input_index >
1203 hnode->num_inputs - 1) ||
1204 (hnode->num_outputs && hnode->max_output_index >
1205 hnode->num_outputs - 1))
1215 status = hnode_mgr->nldr_fxns.pfn_load(hnode->nldr_node_obj,
1219 hnode->loaded = true;
1221 status = get_fxn_address(hnode, &ul_create_fxn,
1237 (hnode->nldr_node_obj,
1238 hnode->dcd_props.obj_data.node_obj.
1240 &hnode->create_args.asa.
1247 status = disp_node_create(hnode_mgr->disp_obj, hnode,
1251 &(hnode->create_args),
1252 &(hnode->node_env));
1257 (*intf_fxns->pfn_msg_set_queue_id) (hnode->
1259 hnode->node_env);
1265 if (hnode->loaded && hnode->phase_split) {
1268 status1 = hnode_mgr->nldr_fxns.pfn_unload(hnode->nldr_node_obj,
1270 hnode->loaded = false;
1278 NODE_SET_STATE(hnode, NODE_CREATED);
1284 NODE_SET_STATE(hnode, NODE_ALLOCATED);
1291 proc_notify_clients(hnode->hprocessor, DSP_NODESTATECHANGE);
1292 ntfy_notify(hnode->ntfy_obj, DSP_NODESTATECHANGE);
1295 dev_dbg(bridge, "%s: hnode: %p status: 0x%x\n", __func__,
1296 hnode, status);
1441 struct node_object *pnode = noderes->hnode;
1623 struct node_object *hnode;
1643 hnode = (struct node_object *)lst_first(hnode_mgr->
1646 DBC_ASSERT(hnode);
1647 node_tab[i] = hnode;
1648 hnode = (struct node_object *)lst_next
1650 (struct list_head *)hnode);
1680 int node_free_msg_buf(struct node_object *hnode, u8 * pbuffer,
1683 struct node_object *pnode = (struct node_object *)hnode;
1691 if (!hnode) {
1722 int node_get_attr(struct node_object *hnode,
1731 if (!hnode) {
1734 hnode_mgr = hnode->hnode_mgr;
1743 pattr->in_node_attr_in.prio = hnode->prio;
1744 pattr->in_node_attr_in.utimeout = hnode->utimeout;
1746 hnode->create_args.asa.task_arg_obj.heap_size;
1748 hnode->create_args.asa.task_arg_obj.ugpp_heap_addr;
1749 pattr->node_attr_inputs = hnode->num_gpp_inputs;
1750 pattr->node_attr_outputs = hnode->num_gpp_outputs;
1752 get_node_info(hnode, &(pattr->node_info));
1766 int node_get_channel_id(struct node_object *hnode, u32 dir, u32 index,
1775 if (!hnode) {
1779 node_type = node_get_type(hnode);
1785 if (index < MAX_INPUTS(hnode)) {
1786 if (hnode->inputs[index].type == HOSTCONNECT) {
1787 *chan_id = hnode->inputs[index].dev_id;
1793 if (index < MAX_OUTPUTS(hnode)) {
1794 if (hnode->outputs[index].type == HOSTCONNECT) {
1795 *chan_id = hnode->outputs[index].dev_id;
1808 int node_get_message(struct node_object *hnode,
1822 if (!hnode) {
1826 hprocessor = hnode->hprocessor;
1837 hnode_mgr = hnode->hnode_mgr;
1838 node_type = node_get_type(hnode);
1851 (*intf_fxns->pfn_msg_get) (hnode->msg_queue_obj, message, utimeout);
1857 tmp_buf = cmm_xlator_translate(hnode->xlator,
1859 hnode->hnode_mgr->
1863 tmp_buf = cmm_xlator_translate(hnode->xlator, tmp_buf,
1868 message->dw_arg2 *= hnode->hnode_mgr->udsp_word_size;
1876 dev_dbg(bridge, "%s: hnode: %p message: %p utimeout: 0x%x\n", __func__,
1877 hnode, message, utimeout);
1905 int node_get_strm_mgr(struct node_object *hnode,
1912 if (!hnode)
1915 *strm_man = hnode->hnode_mgr->strm_mgr_obj;
1923 enum nldr_loadtype node_get_load_type(struct node_object *hnode)
1926 DBC_REQUIRE(hnode);
1927 if (!hnode) {
1928 dev_dbg(bridge, "%s: Failed. hnode: %p\n", __func__, hnode);
1931 return hnode->dcd_props.obj_data.node_obj.us_load_type;
1940 u32 node_get_timeout(struct node_object *hnode)
1943 DBC_REQUIRE(hnode);
1944 if (!hnode) {
1945 dev_dbg(bridge, "%s: failed. hnode: %p\n", __func__, hnode);
1948 return hnode->utimeout;
1957 enum node_type node_get_type(struct node_object *hnode)
1961 if (hnode == (struct node_object *)DSP_HGPPNODE)
1964 if (!hnode)
1967 node_type = hnode->ntype;
1991 void node_on_exit(struct node_object *hnode, s32 node_status)
1993 if (!hnode)
1997 NODE_SET_STATE(hnode, NODE_DONE);
1998 hnode->exit_status = node_status;
1999 if (hnode->loaded && hnode->phase_split) {
2000 (void)hnode->hnode_mgr->nldr_fxns.pfn_unload(hnode->
2003 hnode->loaded = false;
2006 (void)sync_set_event(hnode->sync_done);
2008 proc_notify_clients(hnode->hprocessor, DSP_NODESTATECHANGE);
2009 ntfy_notify(hnode->ntfy_obj, DSP_NODESTATECHANGE);
2017 int node_pause(struct node_object *hnode)
2019 struct node_object *pnode = (struct node_object *)hnode;
2030 if (!hnode) {
2033 node_type = node_get_type(hnode);
2046 hnode_mgr = hnode->hnode_mgr;
2050 state = node_get_state(hnode);
2057 hprocessor = hnode->hprocessor;
2069 status = disp_node_change_priority(hnode_mgr->disp_obj, hnode,
2071 hnode->node_env, NODE_SUSPENDEDPRI);
2075 NODE_SET_STATE(hnode, NODE_PAUSED);
2082 proc_notify_clients(hnode->hprocessor,
2084 ntfy_notify(hnode->ntfy_obj, DSP_NODESTATECHANGE);
2088 dev_dbg(bridge, "%s: hnode: %p status 0x%x\n", __func__, hnode, status);
2099 int node_put_message(struct node_object *hnode,
2115 if (!hnode) {
2119 hprocessor = hnode->hprocessor;
2130 hnode_mgr = hnode->hnode_mgr;
2131 node_type = node_get_type(hnode);
2145 state = node_get_state(hnode);
2160 tmp_buf = cmm_xlator_translate(hnode->xlator,
2165 if (hnode->hnode_mgr->udsp_word_size != 0) {
2168 hnode->hnode_mgr->udsp_word_size;
2170 new_msg.dw_arg2 /= hnode->hnode_mgr->
2183 status = (*intf_fxns->pfn_msg_put) (hnode->msg_queue_obj,
2187 dev_dbg(bridge, "%s: hnode: %p pmsg: %p utimeout: 0x%x, "
2188 "status 0x%x\n", __func__, hnode, pmsg, utimeout, status);
2197 int node_register_notify(struct node_object *hnode, u32 event_mask,
2207 if (!hnode) {
2225 status = ntfy_register(hnode->ntfy_obj, hnotification,
2230 intf_fxns = hnode->hnode_mgr->intf_fxns;
2232 (hnode->msg_queue_obj,
2238 dev_dbg(bridge, "%s: hnode: %p event_mask: 0x%x notify_type: 0x%x "
2239 "hnotification: %p status 0x%x\n", __func__, hnode,
2251 int node_run(struct node_object *hnode)
2253 struct node_object *pnode = (struct node_object *)hnode;
2267 if (!hnode) {
2271 hprocessor = hnode->hprocessor;
2281 node_type = node_get_type(hnode);
2287 hnode_mgr = hnode->hnode_mgr;
2296 state = node_get_state(hnode);
2311 if (!(hnode->loaded) && hnode->phase_split) {
2313 hnode_mgr->nldr_fxns.pfn_load(hnode->nldr_node_obj,
2316 hnode->loaded = true;
2325 ul_execute_fxn = (u32) hnode->node_env;
2327 status = get_fxn_address(hnode, &ul_execute_fxn,
2334 disp_node_run(hnode_mgr->disp_obj, hnode,
2336 hnode->node_env);
2340 status = disp_node_change_priority(hnode_mgr->disp_obj, hnode,
2341 ul_fxn_addr, hnode->node_env,
2342 NODE_GET_PRIORITY(hnode));
2350 NODE_SET_STATE(hnode, NODE_RUNNING);
2352 NODE_SET_STATE(hnode, state);
2357 proc_notify_clients(hnode->hprocessor, DSP_NODESTATECHANGE);
2358 ntfy_notify(hnode->ntfy_obj, DSP_NODESTATECHANGE);
2361 dev_dbg(bridge, "%s: hnode: %p status 0x%x\n", __func__, hnode, status);
2371 int node_terminate(struct node_object *hnode, int *pstatus)
2373 struct node_object *pnode = (struct node_object *)hnode;
2387 if (!hnode || !hnode->hnode_mgr) {
2398 hnode_mgr = hnode->hnode_mgr;
2399 node_type = node_get_type(hnode);
2406 state = node_get_state(hnode);
2412 *pstatus = hnode->exit_status;
2415 NODE_SET_STATE(hnode, NODE_TERMINATING);
2437 msg.dw_arg1 = hnode->node_env;
2439 killmsg.dw_arg1 = hnode->node_env;
2442 if (hnode->utimeout > MAXTIMEOUT)
2445 kill_time_out = (hnode->utimeout) * 2;
2447 status = (*intf_fxns->pfn_msg_put) (hnode->msg_queue_obj, &msg,
2448 hnode->utimeout);
2455 * message, or by node_delete. Check for valid hnode,
2458 status = sync_wait_on_event(hnode->sync_done,
2463 status = (*intf_fxns->pfn_msg_put)(hnode->msg_queue_obj,
2464 &killmsg, hnode->utimeout);
2467 status = sync_wait_on_event(hnode->sync_done,
2487 if (!hnode) {
2490 *pstatus = hnode->exit_status;
2491 dev_dbg(bridge, "%s: hnode: %p env 0x%x status 0x%x\n",
2492 __func__, hnode, hnode->node_env, status);
2505 static void delete_node(struct node_object *hnode,
2519 (struct proc_object *)hnode->hprocessor;
2522 if (!hnode)
2524 hnode_mgr = hnode->hnode_mgr;
2527 xlator = hnode->xlator;
2528 node_type = node_get_type(hnode);
2530 node_msg_args = hnode->create_args.asa.node_msg_args;
2534 if (hnode->msg_queue_obj) {
2536 (*intf_fxns->pfn_msg_delete_queue) (hnode->
2538 hnode->msg_queue_obj = NULL;
2541 kfree(hnode->sync_done);
2544 if (hnode->inputs) {
2545 for (i = 0; i < MAX_INPUTS(hnode); i++) {
2546 stream = hnode->inputs[i];
2549 kfree(hnode->inputs);
2550 hnode->inputs = NULL;
2552 if (hnode->outputs) {
2553 for (i = 0; i < MAX_OUTPUTS(hnode); i++) {
2554 stream = hnode->outputs[i];
2557 kfree(hnode->outputs);
2558 hnode->outputs = NULL;
2560 task_arg_obj = hnode->create_args.asa.task_arg_obj;
2562 for (i = 0; i < MAX_INPUTS(hnode); i++) {
2570 for (i = 0; i < MAX_OUTPUTS(hnode); i++) {
2578 status = proc_un_map(hnode->hprocessor, (void *)
2582 status = proc_un_reserve_memory(hnode->hprocessor,
2597 kfree(hnode->stream_connect);
2598 hnode->stream_connect = NULL;
2600 kfree(hnode->pstr_dev_name);
2601 hnode->pstr_dev_name = NULL;
2603 if (hnode->ntfy_obj) {
2604 ntfy_delete(hnode->ntfy_obj);
2605 kfree(hnode->ntfy_obj);
2606 hnode->ntfy_obj = NULL;
2610 kfree(hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn);
2611 hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn = NULL;
2613 kfree(hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn);
2614 hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn = NULL;
2616 kfree(hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn);
2617 hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn = NULL;
2619 kfree(hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name);
2620 hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name = NULL;
2628 kfree(hnode->nldr_node_obj);
2629 hnode->nldr_node_obj = NULL;
2630 hnode->hnode_mgr = NULL;
2631 kfree(hnode);
2632 hnode = NULL;
2644 struct node_object *hnode;
2653 while ((hnode = (struct node_object *)
2655 delete_node(hnode, NULL);
2763 static void fill_stream_def(struct node_object *hnode,
2767 struct node_mgr *hnode_mgr = hnode->hnode_mgr;
2823 static int get_fxn_address(struct node_object *hnode, u32 * fxn_addr,
2827 struct node_mgr *hnode_mgr = hnode->hnode_mgr;
2829 DBC_REQUIRE(node_get_type(hnode) == NODE_TASK ||
2830 node_get_type(hnode) == NODE_DAISSOCKET ||
2831 node_get_type(hnode) == NODE_MESSAGE);
2836 hnode->dcd_props.obj_data.node_obj.pstr_create_phase_fxn;
2840 hnode->dcd_props.obj_data.node_obj.pstr_execute_phase_fxn;
2844 hnode->dcd_props.obj_data.node_obj.pstr_delete_phase_fxn;
2853 hnode_mgr->nldr_fxns.pfn_get_fxn_addr(hnode->nldr_node_obj,
2864 void get_node_info(struct node_object *hnode, struct dsp_nodeinfo *node_info)
2868 DBC_REQUIRE(hnode);
2873 hnode->dcd_props.obj_data.node_obj.ndb_props;
2874 node_info->execution_priority = hnode->prio;
2875 node_info->device_owner = hnode->device_owner;
2876 node_info->number_streams = hnode->num_inputs + hnode->num_outputs;
2877 node_info->node_env = hnode->node_env;
2879 node_info->ns_execution_state = node_get_state(hnode);
2882 for (i = 0; i < hnode->num_inputs + hnode->num_outputs; i++)
2883 node_info->sc_stream_connection[i] = hnode->stream_connect[i];
2893 struct node_object *hnode,
2910 hnode->ntype = node_type = pndb_props->ntype;
2919 pmsg_args = &(hnode->create_args.asa.node_msg_args);
2932 hnode->pstr_dev_name = kzalloc(len + 1, GFP_KERNEL);
2933 if (hnode->pstr_dev_name == NULL) {
2936 strncpy(hnode->pstr_dev_name,
2944 task_arg_obj = &(hnode->create_args.asa.task_arg_obj);
3134 struct node_object *hnode = (struct node_object *)priv_ref;
3144 DBC_REQUIRE(hnode);
3146 hnode_mgr = hnode->hnode_mgr;
3149 ul_timeout = hnode->utimeout;
3178 struct node_object *hnode = (struct node_object *)priv_ref;
3187 DBC_REQUIRE(hnode);
3190 hnode_mgr = hnode->hnode_mgr;
3192 ul_timeout = hnode->utimeout;