Skip to content

Commit a1498ab

Browse files
committed
drm/xe/pf: Add thresholds to the VF KLV config
We are pushing threshold KLV to the GuC immediately during the threshold provisioning, but those configs will be lost during a GT reset. Include threshold KLVs while encoding full VF config buffer to make sure the GuC receives all of the config KLVs. Signed-off-by: Michal Wajdeczko <[email protected]> Reviewed-by: Piotr Piórkowski <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bf75822 commit a1498ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ static u32 encode_config(u32 *cfg, const struct xe_gt_sriov_config *config)
277277
cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_PREEMPT_TIMEOUT);
278278
cfg[n++] = config->preempt_timeout;
279279

280+
#define encode_threshold_config(TAG, ...) ({ \
281+
cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_THRESHOLD_##TAG); \
282+
cfg[n++] = config->thresholds[MAKE_XE_GUC_KLV_THRESHOLD_INDEX(TAG)]; \
283+
});
284+
285+
MAKE_XE_GUC_KLV_THRESHOLDS_SET(encode_threshold_config);
286+
#undef encode_threshold_config
287+
280288
return n;
281289
}
282290

0 commit comments

Comments
 (0)