From: "Piotr Piórkowski" <piotr.piorkowski@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/pf: Reset thresholds when releasing a VF config
Date: Mon, 2 Sep 2024 11:37:07 +0200 [thread overview]
Message-ID: <20240902093707.xromjcrtvmeq5fbm@intel.com> (raw)
In-Reply-To: <20240830132100.1704-3-michal.wajdeczko@intel.com>
Michal Wajdeczko <michal.wajdeczko@intel.com> wrote on pią [2024-sie-30 15:21:00 +0200]:
> As part of the VF config release, we should reset all parameters,
> including thresholds, to always start with the clean VF config.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 13 +++++++++++++
> 1 file changed, 13 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 151eb69ab4ae..a95e546b7744 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> @@ -1842,6 +1842,18 @@ u32 xe_gt_sriov_pf_config_get_threshold(struct xe_gt *gt, unsigned int vfid,
> return value;
> }
>
> +static void pf_reset_config_thresholds(struct xe_gt *gt, struct xe_gt_sriov_config *config)
> +{
> + lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt));
> +
> +#define reset_threshold_config(TAG, ...) ({ \
> + config->thresholds[MAKE_XE_GUC_KLV_THRESHOLD_INDEX(TAG)] = 0; \
> +});
> +
> + MAKE_XE_GUC_KLV_THRESHOLDS_SET(reset_threshold_config);
> +#undef reset_threshold_config
> +}
> +
> static void pf_release_vf_config(struct xe_gt *gt, unsigned int vfid)
> {
> struct xe_gt_sriov_config *config = pf_pick_vf_config(gt, vfid);
> @@ -1857,6 +1869,7 @@ static void pf_release_vf_config(struct xe_gt *gt, unsigned int vfid)
> pf_release_config_ctxs(gt, config);
> pf_release_config_dbs(gt, config);
> pf_reset_config_sched(gt, config);
> + pf_reset_config_thresholds(gt, config);
> }
>
> /**
LGTM:
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> --
> 2.43.0
>
--
next prev parent reply other threads:[~2024-09-02 11:55 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 ` [PATCH 1/2] drm/xe/pf: Add thresholds to the VF KLV config Michal Wajdeczko
2024-09-02 9:36 ` 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 [this message]
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=20240902093707.xromjcrtvmeq5fbm@intel.com \
--to=piotr.piorkowski@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
/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