All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <michal.wajdeczko@intel.com>
Subject: Re: [PATCH 3/4] drm/xe/vf: Disallow setting wedged_mode=2
Date: Fri, 25 Apr 2025 10:21:05 -0400	[thread overview]
Message-ID: <aAuaUS1MTXzR68cH@intel.com> (raw)
In-Reply-To: <20250424143043.937-4-lukasz.laguna@intel.com>

On Thu, Apr 24, 2025 at 04:30:42PM +0200, Lukasz Laguna wrote:
> In wedged_mode=2, engine resets need to be disabled, which requires
> changing the GuC reset policy. VFs are not permitted to do that.
> 
> Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_debugfs.c | 3 +++
>  drivers/gpu/drm/xe/xe_device.c  | 5 ++++-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index 2e6d8744003b..369bb2103e4c 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -169,6 +169,9 @@ static ssize_t wedged_mode_set(struct file *f, const char __user *ubuf,
>  	if (xe->wedged.mode == wedged_mode)
>  		return size;
>  
> +	if (wedged_mode == 2 && IS_SRIOV_VF(xe))
> +		return -EPERM;
> +
>  	xe_pm_runtime_get(xe);
>  	for_each_gt(gt, xe, id) {
>  		ret = xe_guc_ads_scheduler_policy_toggle_reset(&gt->uc.guc.ads);
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index d2de6936cc20..13430538f861 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -731,9 +731,12 @@ int xe_device_probe_early(struct xe_device *xe)
>  	if (err)
>  		return err;
>  
> +	xe->wedged.mode = 1; /* default */
> +
>  	if (xe_modparam.wedged_mode > 2) {
>  		drm_dbg(&xe->drm, "Used wedged_mode value is invalid. Setting default (1)\n");
> -		xe->wedged.mode = 1; /* default */
> +	} else if (xe_modparam.wedged_mode == 2 && IS_SRIOV_VF(xe)) {
> +		drm_dbg(&xe->drm, "Can't set wedged_mode=2 when running as VF. Setting default (1)\n");
>  	} else {
>  		xe->wedged.mode = xe_modparam.wedged_mode;
>  	}
> -- 
> 2.40.0
> 

  parent reply	other threads:[~2025-04-25 14:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 14:30 [PATCH 0/4] drm/xe: Improve wedged mode handling Lukasz Laguna
2025-04-24 14:30 ` [PATCH 1/4] drm/xe: Don't update wedged mode in case of an error Lukasz Laguna
2025-04-24 21:37   ` Matthew Brost
2025-04-25 14:18   ` Rodrigo Vivi
2025-04-24 14:30 ` [PATCH 2/4] drm/xe: Validate wedged_mode modparam input Lukasz Laguna
2025-04-24 21:42   ` Matthew Brost
2025-04-25 14:20   ` Rodrigo Vivi
2025-05-12  8:18   ` Michal Wajdeczko
2025-04-24 14:30 ` [PATCH 3/4] drm/xe/vf: Disallow setting wedged_mode=2 Lukasz Laguna
2025-04-24 21:43   ` Matthew Brost
2025-04-25 14:21   ` Rodrigo Vivi [this message]
2025-05-12  8:25   ` Michal Wajdeczko
2025-04-24 14:30 ` [PATCH 4/4] drm/xe/pf: Allow wedged_mode=2 only in debug config Lukasz Laguna
2025-05-12  8:29   ` Michal Wajdeczko
2025-04-24 18:34 ` ✓ CI.Patch_applied: success for drm/xe: Improve wedged mode handling Patchwork
2025-04-24 18:35 ` ✓ CI.checkpatch: " Patchwork
2025-04-24 18:36 ` ✓ CI.KUnit: " Patchwork
2025-04-24 18:44 ` ✓ CI.Build: " Patchwork
2025-04-24 18:46 ` ✗ CI.Hooks: failure " Patchwork
2025-04-24 18:48 ` ✓ CI.checksparse: success " Patchwork
2025-04-24 19:28 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-25 16:27 ` ✗ Xe.CI.Full: failure " Patchwork

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=aAuaUS1MTXzR68cH@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lukasz.laguna@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.