@@ -238,25 +238,34 @@ static struct xe_gt_sriov_config *pf_pick_vf_config(struct xe_gt *gt, unsigned i
238238}
239239
240240/* Return: number of configuration dwords written */
241- static u32 encode_config_ggtt (u32 * cfg , const struct xe_gt_sriov_config * config , bool details )
241+ static u32 encode_ggtt (u32 * cfg , u64 start , u64 size , bool details )
242242{
243243 u32 n = 0 ;
244244
245- if (xe_ggtt_node_allocated (config -> ggtt_region )) {
246- if (details ) {
247- cfg [n ++ ] = PREP_GUC_KLV_TAG (VF_CFG_GGTT_START );
248- cfg [n ++ ] = lower_32_bits (config -> ggtt_region -> base .start );
249- cfg [n ++ ] = upper_32_bits (config -> ggtt_region -> base .start );
250- }
251-
252- cfg [n ++ ] = PREP_GUC_KLV_TAG (VF_CFG_GGTT_SIZE );
253- cfg [n ++ ] = lower_32_bits (config -> ggtt_region -> base .size );
254- cfg [n ++ ] = upper_32_bits (config -> ggtt_region -> base .size );
245+ if (details ) {
246+ cfg [n ++ ] = PREP_GUC_KLV_TAG (VF_CFG_GGTT_START );
247+ cfg [n ++ ] = lower_32_bits (start );
248+ cfg [n ++ ] = upper_32_bits (start );
255249 }
256250
251+ cfg [n ++ ] = PREP_GUC_KLV_TAG (VF_CFG_GGTT_SIZE );
252+ cfg [n ++ ] = lower_32_bits (size );
253+ cfg [n ++ ] = upper_32_bits (size );
254+
257255 return n ;
258256}
259257
258+ /* Return: number of configuration dwords written */
259+ static u32 encode_config_ggtt (u32 * cfg , const struct xe_gt_sriov_config * config , bool details )
260+ {
261+ struct xe_ggtt_node * node = config -> ggtt_region ;
262+
263+ if (!xe_ggtt_node_allocated (node ))
264+ return 0 ;
265+
266+ return encode_ggtt (cfg , node -> base .start , node -> base .size , details );
267+ }
268+
260269/* Return: number of configuration dwords written */
261270static u32 encode_config (u32 * cfg , const struct xe_gt_sriov_config * config , bool details )
262271{
0 commit comments