All of lore.kernel.org
 help / color / mirror / Atom feed
From: "K V P, Satyanarayana" <satyanarayana.k.v.p@intel.com>
To: Lukasz Laguna <lukasz.laguna@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: <michal.wajdeczko@intel.com>
Subject: Re: [PATCH] drm/xe/vf: Retry GuC state reset until timeout
Date: Mon, 31 Aug 2026 15:15:31 +0530	[thread overview]
Message-ID: <564c4abe-b0e0-4989-afab-b88fa185e995@intel.com> (raw)
In-Reply-To: <20260831092118.488317-1-lukasz.laguna@intel.com>


On 31-Aug-26 2:51 PM, Lukasz Laguna wrote:
> Instead of using a fixed number of GuC state reset retries, keep
> retrying until timeout with sleeps between attempts.
>
> Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt_sriov_vf.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> index 37899fcf5b22..01873896f77b 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf.c
> @@ -31,6 +31,7 @@
>   #include "xe_lrc.h"
>   #include "xe_memirq.h"
>   #include "xe_mmio.h"
> +#include "xe_sleep.h"
>   #include "xe_sriov.h"
>   #include "xe_sriov_vf.h"
>   #include "xe_sriov_vf_ccs.h"
> @@ -86,18 +87,23 @@ static int guc_action_vf_reset(struct xe_guc *guc)
>   	return ret > 0 ? -EPROTO : ret;
>   }
>   
> -#define GUC_RESET_VF_STATE_RETRY_MAX	10
> +#define GUC_RESET_VF_STATE_TIMEOUT_MS	10000

How is this 10 seconds timeout derived? Do we have any references for this?

- Satya.

> +#define GUC_RESET_VF_STATE_SLEEP_MS	10
> +
>   static int vf_reset_guc_state(struct xe_gt *gt)
>   {
> -	unsigned int retry = GUC_RESET_VF_STATE_RETRY_MAX;
>   	struct xe_guc *guc = &gt->uc.guc;
> +	unsigned long jiffies_end;
>   	int err;
>   
> +	jiffies_end = jiffies + msecs_to_jiffies(GUC_RESET_VF_STATE_TIMEOUT_MS);
>   	do {
>   		err = guc_action_vf_reset(guc);
>   		if (!err || err != -ETIMEDOUT)
>   			break;
> -	} while (--retry);
> +
> +		xe_sleep_relaxed_ms(GUC_RESET_VF_STATE_SLEEP_MS);
> +	} while (time_before(jiffies, jiffies_end));
>   
>   	if (unlikely(err))
>   		xe_gt_sriov_err(gt, "Failed to reset GuC state (%pe)\n", ERR_PTR(err));

  reply	other threads:[~2026-08-31  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  9:21 [PATCH] drm/xe/vf: Retry GuC state reset until timeout Lukasz Laguna
2026-08-31  9:45 ` K V P, Satyanarayana [this message]
2026-08-31 10:06 ` Michal Wajdeczko
2026-08-31 17:16   ` Laguna, Lukasz
2026-08-31 13:59 ` ✓ CI.KUnit: success for " Patchwork
2026-08-31 14:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-31 16:27 ` ✓ Xe.CI.FULL: " 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=564c4abe-b0e0-4989-afab-b88fa185e995@intel.com \
    --to=satyanarayana.k.v.p@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.