@@ -376,7 +376,7 @@ static u64 pf_get_spare_ggtt(struct xe_gt *gt)
376376{
377377 u64 spare ;
378378
379- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
379+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
380380 xe_gt_assert (gt , IS_SRIOV_PF (gt_to_xe (gt )));
381381 lockdep_assert_held (xe_gt_sriov_pf_master_mutex (gt ));
382382
@@ -388,7 +388,7 @@ static u64 pf_get_spare_ggtt(struct xe_gt *gt)
388388
389389static int pf_set_spare_ggtt (struct xe_gt * gt , u64 size )
390390{
391- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
391+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
392392 xe_gt_assert (gt , IS_SRIOV_PF (gt_to_xe (gt )));
393393 lockdep_assert_held (xe_gt_sriov_pf_master_mutex (gt ));
394394
@@ -443,7 +443,7 @@ static int pf_provision_vf_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size)
443443 int err ;
444444
445445 xe_gt_assert (gt , vfid );
446- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
446+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
447447 xe_gt_assert (gt , IS_SRIOV_PF (gt_to_xe (gt )));
448448
449449 size = round_up (size , alignment );
@@ -492,7 +492,7 @@ static u64 pf_get_vf_config_ggtt(struct xe_gt *gt, unsigned int vfid)
492492 struct xe_gt_sriov_config * config = pf_pick_vf_config (gt , vfid );
493493 struct xe_ggtt_node * node = config -> ggtt_region ;
494494
495- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
495+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
496496 return xe_ggtt_node_allocated (node ) ? node -> base .size : 0 ;
497497}
498498
@@ -560,7 +560,7 @@ int xe_gt_sriov_pf_config_set_ggtt(struct xe_gt *gt, unsigned int vfid, u64 size
560560{
561561 int err ;
562562
563- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
563+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
564564
565565 mutex_lock (xe_gt_sriov_pf_master_mutex (gt ));
566566 if (vfid )
@@ -622,7 +622,7 @@ int xe_gt_sriov_pf_config_bulk_set_ggtt(struct xe_gt *gt, unsigned int vfid,
622622 int err = 0 ;
623623
624624 xe_gt_assert (gt , vfid );
625- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
625+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
626626
627627 if (!num_vfs )
628628 return 0 ;
@@ -693,7 +693,7 @@ int xe_gt_sriov_pf_config_set_fair_ggtt(struct xe_gt *gt, unsigned int vfid,
693693
694694 xe_gt_assert (gt , vfid );
695695 xe_gt_assert (gt , num_vfs );
696- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
696+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
697697
698698 mutex_lock (xe_gt_sriov_pf_master_mutex (gt ));
699699 fair = pf_estimate_fair_ggtt (gt , num_vfs );
@@ -1406,7 +1406,7 @@ static int pf_update_vf_lmtt(struct xe_device *xe, unsigned int vfid)
14061406static void pf_release_vf_config_lmem (struct xe_gt * gt , struct xe_gt_sriov_config * config )
14071407{
14081408 xe_gt_assert (gt , IS_DGFX (gt_to_xe (gt )));
1409- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
1409+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
14101410 lockdep_assert_held (xe_gt_sriov_pf_master_mutex (gt ));
14111411
14121412 if (config -> lmem_obj ) {
@@ -1425,7 +1425,7 @@ static int pf_provision_vf_lmem(struct xe_gt *gt, unsigned int vfid, u64 size)
14251425
14261426 xe_gt_assert (gt , vfid );
14271427 xe_gt_assert (gt , IS_DGFX (xe ));
1428- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
1428+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
14291429
14301430 size = round_up (size , pf_get_lmem_alignment (gt ));
14311431
@@ -1552,7 +1552,7 @@ int xe_gt_sriov_pf_config_bulk_set_lmem(struct xe_gt *gt, unsigned int vfid,
15521552 int err = 0 ;
15531553
15541554 xe_gt_assert (gt , vfid );
1555- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
1555+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
15561556
15571557 if (!num_vfs )
15581558 return 0 ;
@@ -1629,7 +1629,7 @@ int xe_gt_sriov_pf_config_set_fair_lmem(struct xe_gt *gt, unsigned int vfid,
16291629
16301630 xe_gt_assert (gt , vfid );
16311631 xe_gt_assert (gt , num_vfs );
1632- xe_gt_assert (gt , ! xe_gt_is_media_type (gt ));
1632+ xe_gt_assert (gt , xe_gt_is_main_type (gt ));
16331633
16341634 if (!xe_device_has_lmtt (gt_to_xe (gt )))
16351635 return 0 ;
@@ -1663,7 +1663,7 @@ int xe_gt_sriov_pf_config_set_fair(struct xe_gt *gt, unsigned int vfid,
16631663 xe_gt_assert (gt , vfid );
16641664 xe_gt_assert (gt , num_vfs );
16651665
1666- if (! xe_gt_is_media_type (gt )) {
1666+ if (xe_gt_is_main_type (gt )) {
16671667 err = xe_gt_sriov_pf_config_set_fair_ggtt (gt , vfid , num_vfs );
16681668 result = result ?: err ;
16691669 err = xe_gt_sriov_pf_config_set_fair_lmem (gt , vfid , num_vfs );
@@ -1991,7 +1991,7 @@ static void pf_release_vf_config(struct xe_gt *gt, unsigned int vfid)
19911991 struct xe_gt_sriov_config * config = pf_pick_vf_config (gt , vfid );
19921992 struct xe_device * xe = gt_to_xe (gt );
19931993
1994- if (! xe_gt_is_media_type (gt )) {
1994+ if (xe_gt_is_main_type (gt )) {
19951995 pf_release_vf_config_ggtt (gt , config );
19961996 if (IS_DGFX (xe )) {
19971997 pf_release_vf_config_lmem (gt , config );
@@ -2082,7 +2082,7 @@ static int pf_sanitize_vf_resources(struct xe_gt *gt, u32 vfid, long timeout)
20822082 * Only GGTT and LMEM requires to be cleared by the PF.
20832083 * GuC doorbell IDs and context IDs do not need any clearing.
20842084 */
2085- if (! xe_gt_is_media_type (gt )) {
2085+ if (xe_gt_is_main_type (gt )) {
20862086 pf_sanitize_ggtt (config -> ggtt_region , vfid );
20872087 if (IS_DGFX (xe ))
20882088 err = pf_sanitize_lmem (tile , config -> lmem_obj , timeout );
@@ -2149,7 +2149,7 @@ static int pf_validate_vf_config(struct xe_gt *gt, unsigned int vfid)
21492149{
21502150 struct xe_gt * primary_gt = gt_to_tile (gt )-> primary_gt ;
21512151 struct xe_device * xe = gt_to_xe (gt );
2152- bool is_primary = ! xe_gt_is_media_type (gt );
2152+ bool is_primary = xe_gt_is_main_type (gt );
21532153 bool valid_ggtt , valid_ctxs , valid_dbs ;
21542154 bool valid_any , valid_all ;
21552155
0 commit comments