Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: [PATCH 1/2] drm/xe/pf: Add thresholds to the VF KLV config
Date: Fri, 30 Aug 2024 15:20:59 +0200	[thread overview]
Message-ID: <20240830132100.1704-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240830132100.1704-1-michal.wajdeczko@intel.com>

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>
---
 drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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;
 }
 
-- 
2.43.0


  reply	other threads:[~2024-08-30 13:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-30 13:20 [PATCH 0/2] PF: threshold config fixes Michal Wajdeczko
2024-08-30 13:20 ` Michal Wajdeczko [this message]
2024-09-02  9:36   ` [PATCH 1/2] drm/xe/pf: Add thresholds to the VF KLV config Piotr Piórkowski
2024-08-30 13:21 ` [PATCH 2/2] drm/xe/pf: Reset thresholds when releasing a VF config Michal Wajdeczko
2024-09-02  9:37   ` Piotr Piórkowski
2024-08-30 14:20 ` ✓ CI.Patch_applied: success for PF: threshold config fixes Patchwork
2024-08-30 14:20 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-30 14:21 ` ✓ CI.KUnit: success " Patchwork
2024-08-30 14:33 ` ✓ CI.Build: " Patchwork
2024-08-30 14:36 ` ✓ CI.Hooks: " Patchwork
2024-08-30 14:37 ` ✓ CI.checksparse: " Patchwork
2024-08-30 14:57 ` ✓ CI.BAT: " Patchwork
2024-08-31  2:41 ` ✗ CI.FULL: failure " Patchwork
2024-09-02 18:44   ` Michal Wajdeczko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240830132100.1704-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox