Lines Matching refs:eng_grps

819 	struct otx2_cpt_eng_grps *eng_grps = grp->g;  in find_mirrored_eng_grp()  local
823 if (!eng_grps->grp[i].is_enabled) in find_mirrored_eng_grp()
825 if (eng_grps->grp[i].ucode[0].type && in find_mirrored_eng_grp()
826 eng_grps->grp[i].ucode[1].type) in find_mirrored_eng_grp()
830 if (!strncasecmp(eng_grps->grp[i].ucode[0].ver_str, in find_mirrored_eng_grp()
833 return &eng_grps->grp[i]; in find_mirrored_eng_grp()
840 struct otx2_cpt_eng_grps *eng_grps) in find_unused_eng_grp() argument
845 if (!eng_grps->grp[i].is_enabled) in find_unused_eng_grp()
846 return &eng_grps->grp[i]; in find_unused_eng_grp()
979 struct otx2_cpt_eng_grps *eng_grps, in create_engine_group() argument
989 eng_grp = find_unused_eng_grp(eng_grps); in create_engine_group()
1029 ret = enable_eng_grp(eng_grp, eng_grps->obj); in create_engine_group()
1069 struct otx2_cpt_eng_grps *eng_grps) in delete_engine_grps() argument
1075 if (eng_grps->grp[i].mirror.is_ena) in delete_engine_grps()
1076 delete_engine_group(&pdev->dev, &eng_grps->grp[i]); in delete_engine_grps()
1080 delete_engine_group(&pdev->dev, &eng_grps->grp[i]); in delete_engine_grps()
1116 int otx2_cpt_get_eng_grp(struct otx2_cpt_eng_grps *eng_grps, int eng_type) in otx2_cpt_get_eng_grp() argument
1124 grp = &eng_grps->grp[i]; in otx2_cpt_get_eng_grp()
1145 struct otx2_cpt_eng_grps *eng_grps) in otx2_cpt_create_eng_grps() argument
1154 mutex_lock(&eng_grps->lock); in otx2_cpt_create_eng_grps()
1159 if (eng_grps->is_grps_created) in otx2_cpt_create_eng_grps()
1162 ret = cpt_ucode_load_fw(pdev, &fw_info, eng_grps->rid); in otx2_cpt_create_eng_grps()
1177 engs[0].count = eng_grps->avail.max_se_cnt; in otx2_cpt_create_eng_grps()
1179 ret = create_engine_group(&pdev->dev, eng_grps, engs, 1, in otx2_cpt_create_eng_grps()
1197 engs[0].count = eng_grps->avail.max_se_cnt; in otx2_cpt_create_eng_grps()
1199 engs[1].count = eng_grps->avail.max_ie_cnt; in otx2_cpt_create_eng_grps()
1201 ret = create_engine_group(&pdev->dev, eng_grps, engs, 2, in otx2_cpt_create_eng_grps()
1217 engs[0].count = eng_grps->avail.max_ae_cnt; in otx2_cpt_create_eng_grps()
1219 ret = create_engine_group(&pdev->dev, eng_grps, engs, 1, in otx2_cpt_create_eng_grps()
1224 eng_grps->is_grps_created = true; in otx2_cpt_create_eng_grps()
1268 mutex_unlock(&eng_grps->lock); in otx2_cpt_create_eng_grps()
1272 delete_engine_grps(pdev, eng_grps); in otx2_cpt_create_eng_grps()
1276 mutex_unlock(&eng_grps->lock); in otx2_cpt_create_eng_grps()
1295 cptpf->eng_grps.eng_ref_cnt[i] = 0; in cptx_disable_all_cores()
1338 total_cores = cptpf->eng_grps.avail.max_se_cnt + in otx2_cpt_disable_all_cores()
1339 cptpf->eng_grps.avail.max_ie_cnt + in otx2_cpt_disable_all_cores()
1340 cptpf->eng_grps.avail.max_ae_cnt; in otx2_cpt_disable_all_cores()
1351 struct otx2_cpt_eng_grps *eng_grps) in otx2_cpt_cleanup_eng_grps() argument
1356 mutex_lock(&eng_grps->lock); in otx2_cpt_cleanup_eng_grps()
1357 delete_engine_grps(pdev, eng_grps); in otx2_cpt_cleanup_eng_grps()
1360 grp = &eng_grps->grp[i]; in otx2_cpt_cleanup_eng_grps()
1366 mutex_unlock(&eng_grps->lock); in otx2_cpt_cleanup_eng_grps()
1370 struct otx2_cpt_eng_grps *eng_grps) in otx2_cpt_init_eng_grps() argument
1375 mutex_init(&eng_grps->lock); in otx2_cpt_init_eng_grps()
1376 eng_grps->obj = pci_get_drvdata(pdev); in otx2_cpt_init_eng_grps()
1377 eng_grps->avail.se_cnt = eng_grps->avail.max_se_cnt; in otx2_cpt_init_eng_grps()
1378 eng_grps->avail.ie_cnt = eng_grps->avail.max_ie_cnt; in otx2_cpt_init_eng_grps()
1379 eng_grps->avail.ae_cnt = eng_grps->avail.max_ae_cnt; in otx2_cpt_init_eng_grps()
1381 eng_grps->engs_num = eng_grps->avail.max_se_cnt + in otx2_cpt_init_eng_grps()
1382 eng_grps->avail.max_ie_cnt + in otx2_cpt_init_eng_grps()
1383 eng_grps->avail.max_ae_cnt; in otx2_cpt_init_eng_grps()
1384 if (eng_grps->engs_num > OTX2_CPT_MAX_ENGINES) { in otx2_cpt_init_eng_grps()
1387 eng_grps->engs_num, OTX2_CPT_MAX_ENGINES); in otx2_cpt_init_eng_grps()
1393 grp = &eng_grps->grp[i]; in otx2_cpt_init_eng_grps()
1394 grp->g = eng_grps; in otx2_cpt_init_eng_grps()
1399 kcalloc(BITS_TO_LONGS(eng_grps->engs_num), in otx2_cpt_init_eng_grps()
1410 otx2_cpt_cleanup_eng_grps(pdev, eng_grps); in otx2_cpt_init_eng_grps()
1415 struct otx2_cpt_eng_grps *eng_grps) in create_eng_caps_discovery_grps() argument
1422 mutex_lock(&eng_grps->lock); in create_eng_caps_discovery_grps()
1423 ret = cpt_ucode_load_fw(pdev, &fw_info, eng_grps->rid); in create_eng_caps_discovery_grps()
1425 mutex_unlock(&eng_grps->lock); in create_eng_caps_discovery_grps()
1438 ret = create_engine_group(&pdev->dev, eng_grps, engs, 1, in create_eng_caps_discovery_grps()
1452 ret = create_engine_group(&pdev->dev, eng_grps, engs, 1, in create_eng_caps_discovery_grps()
1466 ret = create_engine_group(&pdev->dev, eng_grps, engs, 1, in create_eng_caps_discovery_grps()
1472 mutex_unlock(&eng_grps->lock); in create_eng_caps_discovery_grps()
1476 delete_engine_grps(pdev, eng_grps); in create_eng_caps_discovery_grps()
1479 mutex_unlock(&eng_grps->lock); in create_eng_caps_discovery_grps()
1511 ret = create_eng_caps_discovery_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()
1554 iq_cmd.cptr.s.grp = otx2_cpt_get_eng_grp(&cptpf->eng_grps, in otx2_cpt_discover_eng_capabilities()
1573 delete_engine_grps(pdev, &cptpf->eng_grps); in otx2_cpt_discover_eng_capabilities()
1583 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_dl_custom_egrp_create() local
1593 if (!eng_grps->is_grps_created) { in otx2_cpt_dl_custom_egrp_create()
1689 mutex_lock(&eng_grps->lock); in otx2_cpt_dl_custom_egrp_create()
1698 ret = load_fw(dev, &fw_info, ucode_filename[0], eng_grps->rid); in otx2_cpt_dl_custom_egrp_create()
1704 ret = load_fw(dev, &fw_info, ucode_filename[1], eng_grps->rid); in otx2_cpt_dl_custom_egrp_create()
1727 ret = create_engine_group(dev, eng_grps, engs, grp_idx, in otx2_cpt_dl_custom_egrp_create()
1733 mutex_unlock(&eng_grps->lock); in otx2_cpt_dl_custom_egrp_create()
1743 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_dl_custom_egrp_delete() local
1763 if (!eng_grps->grp[egrp].is_enabled) { in otx2_cpt_dl_custom_egrp_delete()
1767 mutex_lock(&eng_grps->lock); in otx2_cpt_dl_custom_egrp_delete()
1768 ret = delete_engine_group(dev, &eng_grps->grp[egrp]); in otx2_cpt_dl_custom_egrp_delete()
1769 mutex_unlock(&eng_grps->lock); in otx2_cpt_dl_custom_egrp_delete()
1821 struct otx2_cpt_eng_grps *eng_grps = &cptpf->eng_grps; in otx2_cpt_print_uc_dbg_info() local
1829 pr_debug("max SE %d, max IE %d, max AE %d", eng_grps->avail.max_se_cnt, in otx2_cpt_print_uc_dbg_info()
1830 eng_grps->avail.max_ie_cnt, eng_grps->avail.max_ae_cnt); in otx2_cpt_print_uc_dbg_info()
1831 pr_debug("free SE %d", eng_grps->avail.se_cnt); in otx2_cpt_print_uc_dbg_info()
1832 pr_debug("free IE %d", eng_grps->avail.ie_cnt); in otx2_cpt_print_uc_dbg_info()
1833 pr_debug("free AE %d", eng_grps->avail.ae_cnt); in otx2_cpt_print_uc_dbg_info()
1836 grp = &eng_grps->grp[i]; in otx2_cpt_print_uc_dbg_info()
1840 mirrored_grp = &eng_grps->grp[grp->mirror.idx]; in otx2_cpt_print_uc_dbg_info()
1863 eng_grps->engs_num); in otx2_cpt_print_uc_dbg_info()