Lines Matching refs:fair

623 	u64 fair;  in pf_estimate_fair_ggtt()  local
633 fair = div_u64(available, num_vfs); in pf_estimate_fair_ggtt()
634 fair = ALIGN_DOWN(fair, alignment); in pf_estimate_fair_ggtt()
636 available / SZ_1K, num_vfs, fair / SZ_1K); in pf_estimate_fair_ggtt()
637 return fair; in pf_estimate_fair_ggtt()
653 u64 fair; in xe_gt_sriov_pf_config_set_fair_ggtt() local
660 fair = pf_estimate_fair_ggtt(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_ggtt()
663 if (!fair) in xe_gt_sriov_pf_config_set_fair_ggtt()
666 return xe_gt_sriov_pf_config_bulk_set_ggtt(gt, vfid, num_vfs, fair); in xe_gt_sriov_pf_config_set_fair_ggtt()
925 u32 fair = (idm->total - spare) / num_vfs; in pf_estimate_fair_ctxs() local
928 for (; fair; --fair) { in pf_estimate_fair_ctxs()
929 ret = xe_guc_id_mgr_reserve(idm, fair * num_vfs, spare); in pf_estimate_fair_ctxs()
932 xe_guc_id_mgr_release(idm, ret, fair * num_vfs); in pf_estimate_fair_ctxs()
936 xe_gt_sriov_dbg_verbose(gt, "contexts fair(%u x %u)\n", num_vfs, fair); in pf_estimate_fair_ctxs()
937 return fair; in pf_estimate_fair_ctxs()
953 u32 fair; in xe_gt_sriov_pf_config_set_fair_ctxs() local
959 fair = pf_estimate_fair_ctxs(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_ctxs()
962 if (!fair) in xe_gt_sriov_pf_config_set_fair_ctxs()
965 return xe_gt_sriov_pf_config_bulk_set_ctxs(gt, vfid, num_vfs, fair); in xe_gt_sriov_pf_config_set_fair_ctxs()
1169 u32 fair = (GUC_NUM_DOORBELLS - spare) / num_vfs; in pf_estimate_fair_dbs() local
1172 for (; fair; --fair) { in pf_estimate_fair_dbs()
1173 ret = xe_guc_db_mgr_reserve_range(dbm, fair * num_vfs, spare); in pf_estimate_fair_dbs()
1176 xe_guc_db_mgr_release_range(dbm, ret, fair * num_vfs); in pf_estimate_fair_dbs()
1180 xe_gt_sriov_dbg_verbose(gt, "doorbells fair(%u x %u)\n", num_vfs, fair); in pf_estimate_fair_dbs()
1181 return fair; in pf_estimate_fair_dbs()
1197 u32 fair; in xe_gt_sriov_pf_config_set_fair_dbs() local
1203 fair = pf_estimate_fair_dbs(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_dbs()
1206 if (!fair) in xe_gt_sriov_pf_config_set_fair_dbs()
1209 return xe_gt_sriov_pf_config_bulk_set_dbs(gt, vfid, num_vfs, fair); in xe_gt_sriov_pf_config_set_fair_dbs()
1543 u64 fair; in pf_estimate_fair_lmem() local
1545 fair = div_u64(available, num_vfs); in pf_estimate_fair_lmem()
1546 fair = rounddown_pow_of_two(fair); /* XXX: ttm_vram_mgr & drm_buddy limitation */ in pf_estimate_fair_lmem()
1547 fair = ALIGN_DOWN(fair, alignment); in pf_estimate_fair_lmem()
1549 fair = min_t(u64, MAX_FAIR_LMEM, fair); in pf_estimate_fair_lmem()
1552 available / SZ_1M, num_vfs, fair / SZ_1M); in pf_estimate_fair_lmem()
1553 return fair; in pf_estimate_fair_lmem()
1569 u64 fair; in xe_gt_sriov_pf_config_set_fair_lmem() local
1579 fair = pf_estimate_fair_lmem(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_lmem()
1582 if (!fair) in xe_gt_sriov_pf_config_set_fair_lmem()
1585 return xe_gt_sriov_pf_config_bulk_set_lmem(gt, vfid, num_vfs, fair); in xe_gt_sriov_pf_config_set_fair_lmem()