Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe/guc: Treat non-response message after BUSY as unexpected
Date: Thu, 11 Jan 2024 16:52:12 +0000	[thread overview]
Message-ID: <ZaAcvHnNlblQG9Qt@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240111154838.541-1-michal.wajdeczko@intel.com>

On Thu, Jan 11, 2024 at 04:48:38PM +0100, Michal Wajdeczko wrote:
> Once GuC replied with GUC_HXG_TYPE_NO_RESPONSE_BUSY message then
> we may expect that only RESPONSE_SUCCESS or FAILURE message will
> be sent, anything else is a violation of the HXG protocol.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_guc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 6e73ebf67251..254c9d3c8c73 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -718,8 +718,12 @@ int xe_guc_mmio_send_recv(struct xe_guc *guc, const u32 *request,
>  		if (unlikely(FIELD_GET(GUC_HXG_MSG_0_ORIGIN, header) !=
>  			     GUC_HXG_ORIGIN_GUC))
>  			goto proto;
> -		if (unlikely(ret))
> +		if (unlikely(ret)) {
> +			if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) !=
> +			    GUC_HXG_TYPE_NO_RESPONSE_BUSY)
> +				goto proto;
>  			goto timeout;
> +		}
>  	}
>  
>  	if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) ==
> 
> base-commit: 79184e72263e91528195db01783148435c7e4fad
> -- 
> 2.25.1
> 

  reply	other threads:[~2024-01-11 16:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 15:48 [PATCH] drm/xe/guc: Treat non-response message after BUSY as unexpected Michal Wajdeczko
2024-01-11 16:52 ` Matthew Brost [this message]
2024-01-11 16:54 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-11 16:54 ` ✓ CI.checkpatch: " Patchwork
2024-01-11 16:55 ` ✓ CI.KUnit: " Patchwork
2024-01-11 17:03 ` ✓ CI.Build: " Patchwork
2024-01-11 17:03 ` ✓ CI.Hooks: " Patchwork
2024-01-11 17:05 ` ✓ CI.checksparse: " Patchwork
2024-01-11 17:40 ` ✓ CI.BAT: " 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=ZaAcvHnNlblQG9Qt@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@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