@@ -686,21 +686,22 @@ static int relay_action_handshake(struct xe_gt *gt, u32 *major, u32 *minor)
686
686
return 0 ;
687
687
}
688
688
689
- static void vf_connect_pf (struct xe_gt * gt , u16 major , u16 minor )
689
+ static void vf_connect_pf (struct xe_device * xe , u16 major , u16 minor )
690
690
{
691
- xe_gt_assert ( gt , IS_SRIOV_VF (gt_to_xe ( gt ) ));
691
+ xe_assert ( xe , IS_SRIOV_VF (xe ));
692
692
693
- gt -> sriov .vf .pf_version .major = major ;
694
- gt -> sriov .vf .pf_version .minor = minor ;
693
+ xe -> sriov .vf .pf_version .major = major ;
694
+ xe -> sriov .vf .pf_version .minor = minor ;
695
695
}
696
696
697
- static void vf_disconnect_pf (struct xe_gt * gt )
697
+ static void vf_disconnect_pf (struct xe_device * xe )
698
698
{
699
- vf_connect_pf (gt , 0 , 0 );
699
+ vf_connect_pf (xe , 0 , 0 );
700
700
}
701
701
702
702
static int vf_handshake_with_pf (struct xe_gt * gt )
703
703
{
704
+ struct xe_device * xe = gt_to_xe (gt );
704
705
u32 major_wanted = GUC_RELAY_VERSION_LATEST_MAJOR ;
705
706
u32 minor_wanted = GUC_RELAY_VERSION_LATEST_MINOR ;
706
707
u32 major = major_wanted , minor = minor_wanted ;
@@ -716,13 +717,13 @@ static int vf_handshake_with_pf(struct xe_gt *gt)
716
717
}
717
718
718
719
xe_gt_sriov_dbg (gt , "using VF/PF ABI %u.%u\n" , major , minor );
719
- vf_connect_pf (gt , major , minor );
720
+ vf_connect_pf (xe , major , minor );
720
721
return 0 ;
721
722
722
723
failed :
723
724
xe_gt_sriov_err (gt , "Unable to confirm VF/PF ABI version %u.%u (%pe)\n" ,
724
725
major , minor , ERR_PTR (err ));
725
- vf_disconnect_pf (gt );
726
+ vf_disconnect_pf (xe );
726
727
return err ;
727
728
}
728
729
@@ -775,10 +776,12 @@ void xe_gt_sriov_vf_migrated_event_handler(struct xe_gt *gt)
775
776
776
777
static bool vf_is_negotiated (struct xe_gt * gt , u16 major , u16 minor )
777
778
{
778
- xe_gt_assert ( gt , IS_SRIOV_VF ( gt_to_xe (gt )) );
779
+ struct xe_device * xe = gt_to_xe (gt );
779
780
780
- return major == gt -> sriov .vf .pf_version .major &&
781
- minor <= gt -> sriov .vf .pf_version .minor ;
781
+ xe_gt_assert (gt , IS_SRIOV_VF (xe ));
782
+
783
+ return major == xe -> sriov .vf .pf_version .major &&
784
+ minor <= xe -> sriov .vf .pf_version .minor ;
782
785
}
783
786
784
787
static int vf_prepare_runtime_info (struct xe_gt * gt , unsigned int num_regs )
@@ -1072,9 +1075,10 @@ void xe_gt_sriov_vf_print_runtime(struct xe_gt *gt, struct drm_printer *p)
1072
1075
*/
1073
1076
void xe_gt_sriov_vf_print_version (struct xe_gt * gt , struct drm_printer * p )
1074
1077
{
1078
+ struct xe_device * xe = gt_to_xe (gt );
1075
1079
struct xe_uc_fw_version * guc_version = & gt -> sriov .vf .guc_version ;
1076
1080
struct xe_uc_fw_version * wanted = & gt -> sriov .vf .wanted_guc_version ;
1077
- struct xe_gt_sriov_vf_relay_version * pf_version = & gt -> sriov .vf .pf_version ;
1081
+ struct xe_sriov_vf_relay_version * pf_version = & xe -> sriov .vf .pf_version ;
1078
1082
struct xe_uc_fw_version ver ;
1079
1083
1080
1084
xe_gt_assert (gt , IS_SRIOV_VF (gt_to_xe (gt )));
0 commit comments