From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v2] drm/xe/vf: Skip attempt to start GuC PC if VF
Date: Tue, 25 Jun 2024 11:01:08 -0700 [thread overview]
Message-ID: <dee9dcb9-7935-4f8e-a92e-6ad53bde9294@intel.com> (raw)
In-Reply-To: <20240622094253.1081-1-michal.wajdeczko@intel.com>
On 6/22/2024 2:42 AM, Michal Wajdeczko wrote:
> We have already marked the GuC PC feature as not applicable for
> VF devices, but we missed the fact that there may be still some
> privileged activities performed by this component, who does much
> more than its name suggests.
>
> Explicitly skip xe_guc_pc_start() if running as a VF driver and
> use a GT oriented message to report any error.
>
> v2: also skip xe_guc_pc_stop (Vinay)
LGTM,
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 172b65a50e31..eb655cee19f7 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1113,7 +1113,13 @@ void xe_guc_reset_wait(struct xe_guc *guc)
>
> void xe_guc_stop_prepare(struct xe_guc *guc)
> {
> - XE_WARN_ON(xe_guc_pc_stop(&guc->pc));
> + if (!IS_SRIOV_VF(guc_to_xe(guc))) {
> + int err;
> +
> + err = xe_guc_pc_stop(&guc->pc);
> + xe_gt_WARN(guc_to_gt(guc), err, "Failed to stop GuC PC: %pe\n",
> + ERR_PTR(err));
> + }
> }
>
> void xe_guc_stop(struct xe_guc *guc)
> @@ -1125,10 +1131,13 @@ void xe_guc_stop(struct xe_guc *guc)
>
> int xe_guc_start(struct xe_guc *guc)
> {
> - int ret;
> + if (!IS_SRIOV_VF(guc_to_xe(guc))) {
> + int err;
>
> - ret = xe_guc_pc_start(&guc->pc);
> - XE_WARN_ON(ret);
> + err = xe_guc_pc_start(&guc->pc);
> + xe_gt_WARN(guc_to_gt(guc), err, "Failed to start GuC PC: %pe\n",
> + ERR_PTR(err));
> + }
>
> return xe_guc_submit_start(guc);
> }
prev parent reply other threads:[~2024-06-25 18:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-22 9:42 [PATCH v2] drm/xe/vf: Skip attempt to start GuC PC if VF Michal Wajdeczko
2024-06-22 9:48 ` ✓ CI.Patch_applied: success for drm/xe/vf: Skip attempt to start GuC PC if VF (rev2) Patchwork
2024-06-22 9:48 ` ✓ CI.checkpatch: " Patchwork
2024-06-22 9:49 ` ✓ CI.KUnit: " Patchwork
2024-06-22 10:01 ` ✓ CI.Build: " Patchwork
2024-06-22 10:03 ` ✗ CI.Hooks: failure " Patchwork
2024-06-22 10:05 ` ✓ CI.checksparse: success " Patchwork
2024-06-22 10:28 ` ✓ CI.BAT: " Patchwork
2024-06-22 11:38 ` ✓ CI.FULL: " Patchwork
2024-06-25 18:01 ` Belgaumkar, Vinay [this message]
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=dee9dcb9-7935-4f8e-a92e-6ad53bde9294@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--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