Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Zhanjun Dong <zhanjun.dong@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Skip pxp init if gt is wedged
Date: Fri, 3 Nov 2023 11:45:44 -0400	[thread overview]
Message-ID: <ZUUVqCh/By+whSYv@intel.com> (raw)
In-Reply-To: <20231101214446.600290-1-zhanjun.dong@intel.com>

On Wed, Nov 01, 2023 at 02:44:46PM -0700, Zhanjun Dong wrote:
> The gt wedged could be triggered by missing guc firmware file, HW not
> working, etc. Once triggered, it means all gt usage is dead, therefore we
> can't enable pxp under this fatal error condition.
> 
> v2: Updated commit message.
> 
> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
> ---
>  drivers/gpu/drm/i915/pxp/intel_pxp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> index dc327cf40b5a..923f233c91e1 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> @@ -212,6 +212,9 @@ int intel_pxp_init(struct drm_i915_private *i915)
>  	if (!gt)
>  		return -ENODEV;
>  
> +	if (intel_gt_is_wedged(gt))
> +		return -ENODEV;

we need some error message.
also we need to fix the fact that these returns are entirely ignored.

or you convert this function to void and then add a message here before
return; on this case.

Or you return some different error and at probe if error but error different
then ENODEV you print a message saying pxp init failed.

but we need some log/error information. I honestly would prefer to convert to
void and print the msg here.

with some changes like this you can count with my rv-b

> +
>  	/*
>  	 * At this point, we will either enable full featured PXP capabilities
>  	 * including session and object management, or we will init the backend tee
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2023-11-03 15:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-01 21:44 [Intel-gfx] [PATCH] drm/i915: Skip pxp init if gt is wedged Zhanjun Dong
2023-11-01 22:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Skip pxp init if gt is wedged (rev2) Patchwork
2023-11-02 13:39 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-11-03 15:45 ` Rodrigo Vivi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-10-26 21:54 [Intel-gfx] [PATCH] drm/i915: Skip pxp init if gt is wedged Zhanjun Dong
2023-10-27  7:13 ` Jani Nikula
2023-10-31 21:38   ` Teres Alexis, Alan Previn
2023-11-01 17:57     ` Dong, Zhanjun

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=ZUUVqCh/By+whSYv@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=zhanjun.dong@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