Lines Matching refs:grp
188 eng_grp->g->grp[eng_grp->mirror.idx].ucode[0].align_dma; in cpt_set_ucode_base()
524 eng_grp->g->grp[eng_grp->mirror.idx].ucode[0].ver_str, in print_ucode_info()
548 &eng_grp->g->grp[eng_grp->mirror.idx], in print_engs_info()
604 struct otx_cpt_eng_grp_info *grp; in print_dbg_info() local
616 grp = &eng_grps->grp[i]; in print_dbg_info()
617 pr_debug("engine_group%d, state %s\n", i, grp->is_enabled ? in print_dbg_info()
619 if (grp->is_enabled) { in print_dbg_info()
620 mirrored_grp = &eng_grps->grp[grp->mirror.idx]; in print_dbg_info()
622 grp->mirror.is_ena ? in print_dbg_info()
624 grp->ucode[0].filename, in print_dbg_info()
625 grp->mirror.is_ena ? in print_dbg_info()
627 grp->ucode[0].ver_str); in print_dbg_info()
631 engs = &grp->engs[j]; in print_dbg_info()
633 print_engs_info(grp, engs_info, in print_dbg_info()
643 if (grp->is_enabled) { in print_dbg_info()
644 cpt_print_engines_mask(grp, dev, engs_mask, in print_dbg_info()
693 static int release_engines(struct device *dev, struct otx_cpt_eng_grp_info *grp) in release_engines() argument
698 if (!grp->engs[i].type) in release_engines()
701 if (grp->engs[i].count > 0) { in release_engines()
702 ret = update_engines_avail_count(dev, &grp->g->avail, in release_engines()
703 &grp->engs[i], in release_engines()
704 grp->engs[i].count); in release_engines()
709 grp->engs[i].type = 0; in release_engines()
710 grp->engs[i].count = 0; in release_engines()
711 grp->engs[i].offset = 0; in release_engines()
712 grp->engs[i].ucode = NULL; in release_engines()
713 bitmap_zero(grp->engs[i].bmap, grp->g->engs_num); in release_engines()
720 struct otx_cpt_eng_grp_info *grp, in do_reserve_engines() argument
727 if (!grp->engs[i].type) { in do_reserve_engines()
728 engs = &grp->engs[i]; in do_reserve_engines()
739 ret = update_engines_offset(dev, &grp->g->avail, engs); in do_reserve_engines()
744 ret = update_engines_avail_count(dev, &grp->g->avail, engs, in do_reserve_engines()
754 struct otx_cpt_eng_grp_info *grp, in check_engines_availability() argument
761 avail_cnt = grp->g->avail.se_cnt; in check_engines_availability()
765 avail_cnt = grp->g->avail.ae_cnt; in check_engines_availability()
784 static int reserve_engines(struct device *dev, struct otx_cpt_eng_grp_info *grp, in reserve_engines() argument
791 ret = check_engines_availability(dev, grp, &req_engs[i]); in reserve_engines()
798 ret = do_reserve_engines(dev, grp, &req_engs[i]); in reserve_engines()
996 src_grp = &dst_grp->g->grp[dst_grp->mirror.idx]; in remove_eng_grp_mirroring()
1035 struct otx_cpt_eng_grp_info *grp) in find_mirrored_eng_grp() argument
1037 struct otx_cpt_eng_grps *eng_grps = grp->g; in find_mirrored_eng_grp()
1041 if (!eng_grps->grp[i].is_enabled) in find_mirrored_eng_grp()
1043 if (eng_grps->grp[i].ucode[0].type) in find_mirrored_eng_grp()
1045 if (grp->idx == i) in find_mirrored_eng_grp()
1047 if (!strncasecmp(eng_grps->grp[i].ucode[0].ver_str, in find_mirrored_eng_grp()
1048 grp->ucode[0].ver_str, in find_mirrored_eng_grp()
1050 return &eng_grps->grp[i]; in find_mirrored_eng_grp()
1062 if (!eng_grps->grp[i].is_enabled) in find_unused_eng_grp()
1063 return &eng_grps->grp[i]; in find_unused_eng_grp()
1124 &eng_grp->g->grp[eng_grp->mirror.idx], in eng_grp_update_masks()
1155 if (eng_grp->g->grp[i].mirror.is_ena && in delete_engine_group()
1156 eng_grp->g->grp[i].mirror.idx == eng_grp->idx) in delete_engine_group()
1207 ucode = &eng_grp->g->grp[eng_grp->mirror.idx].ucode[0]; in update_ucode_ptrs()
1429 if (!eng_grps->grp[del_grp_idx].is_enabled) { in ucode_load_store()
1455 ret = delete_engine_group(dev, &eng_grps->grp[del_grp_idx]); in ucode_load_store()
1491 if (eng_grps->grp[i].is_enabled) in otx_cpt_try_create_default_eng_grps()
1565 int grp, timeout = 100; in otx_cpt_disable_all_cores() local
1569 for (grp = 0; grp < OTX_CPT_MAX_ENGINE_GROUPS; grp++) { in otx_cpt_disable_all_cores()
1570 writeq(0, cpt->reg_base + OTX_CPT_PF_GX_EN(grp)); in otx_cpt_disable_all_cores()
1591 struct otx_cpt_eng_grp_info *grp; in otx_cpt_cleanup_eng_grps() local
1603 if (eng_grps->grp[i].mirror.is_ena) in otx_cpt_cleanup_eng_grps()
1604 delete_engine_group(&pdev->dev, &eng_grps->grp[i]); in otx_cpt_cleanup_eng_grps()
1608 delete_engine_group(&pdev->dev, &eng_grps->grp[i]); in otx_cpt_cleanup_eng_grps()
1612 grp = &eng_grps->grp[i]; in otx_cpt_cleanup_eng_grps()
1614 kfree(grp->engs[j].bmap); in otx_cpt_cleanup_eng_grps()
1615 grp->engs[j].bmap = NULL; in otx_cpt_cleanup_eng_grps()
1625 struct otx_cpt_eng_grp_info *grp; in otx_cpt_init_eng_grps() local
1644 grp = &eng_grps->grp[i]; in otx_cpt_init_eng_grps()
1645 grp->g = eng_grps; in otx_cpt_init_eng_grps()
1646 grp->idx = i; in otx_cpt_init_eng_grps()
1648 snprintf(grp->sysfs_info_name, OTX_CPT_UCODE_NAME_LENGTH, in otx_cpt_init_eng_grps()
1651 grp->engs[j].bmap = in otx_cpt_init_eng_grps()
1654 if (!grp->engs[j].bmap) { in otx_cpt_init_eng_grps()