diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-08-30 16:20:59 +0300 |
---|---|---|
committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-09-02 21:51:02 +0300 |
commit | a1498ab229ca16dfc35331dfb309f8e28b84bb5d (patch) | |
tree | 2288fc1593e6cebdb067ad1e246fceb401de72e8 | |
parent | bf758226c7e6927f1c2c34fd6eb2cb580b77f543 (diff) | |
download | linux-a1498ab229ca16dfc35331dfb309f8e28b84bb5d.tar.xz |
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 <michal.wajdeczko@intel.com>
Reviewed-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240830132100.1704-2-michal.wajdeczko@intel.com
-rw-r--r-- | drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c index 497af3949b19..151eb69ab4ae 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c @@ -277,6 +277,14 @@ static u32 encode_config(u32 *cfg, const struct xe_gt_sriov_config *config) cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_PREEMPT_TIMEOUT); cfg[n++] = config->preempt_timeout; +#define encode_threshold_config(TAG, ...) ({ \ + cfg[n++] = PREP_GUC_KLV_TAG(VF_CFG_THRESHOLD_##TAG); \ + cfg[n++] = config->thresholds[MAKE_XE_GUC_KLV_THRESHOLD_INDEX(TAG)]; \ +}); + + MAKE_XE_GUC_KLV_THRESHOLDS_SET(encode_threshold_config); +#undef encode_threshold_config + return n; } |