From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>,
<intel-gfx@lists.freedesktop.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version
Date: Wed, 11 Jan 2023 19:19:51 -0800 [thread overview]
Message-ID: <d0be5318-f968-2b7f-fa77-9711337bc703@intel.com> (raw)
In-Reply-To: <20221221174901.2703954-1-alan.previn.teres.alexis@intel.com>
On 12/21/2022 9:49 AM, Alan Previn wrote:
> If PXP arb-session is being attempted on older hardware SKUs or
> on hardware with older, unsupported, firmware versions, then don't
> report the failure with a drm_error. Instead, look specifically for
> the API-version error reply and drm_dbg that reply. In this case, the
> user-space will eventually get a -ENODEV for the protected context
> creation which is the correct behavior and we don't create unnecessary
> drm_error's in our dmesg (for what is unsupported platforms).
LGTM. Is there a link to where these pxp status codes are documented?
Reviewed-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>
> Changes from prio revs:
> v2 : - remove unnecessary newline. (Jani)
> v1 : - print incorrect version from input packet, not output.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> ---
> drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h | 1 +
> drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h b/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h
> index c2f23394f9b8..aaa8187a0afb 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h
> @@ -17,6 +17,7 @@
> */
> enum pxp_status {
> PXP_STATUS_SUCCESS = 0x0,
> + PXP_STATUS_ERROR_API_VERSION = 0x1002,
> PXP_STATUS_OP_NOT_PERMITTED = 0x4013
> };
>
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> index d50354bfb993..73aa8015f828 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> @@ -298,6 +298,10 @@ int intel_pxp_tee_cmd_create_arb_session(struct intel_pxp *pxp,
>
> if (ret)
> drm_err(&i915->drm, "Failed to send tee msg ret=[%d]\n", ret);
> + else if (msg_out.header.status == PXP_STATUS_ERROR_API_VERSION)
> + drm_dbg(&i915->drm, "PXP firmware version unsupported, requested: "
> + "CMD-ID-[0x%08x] on API-Ver-[0x%08x]\n",
> + msg_in.header.command_id, msg_in.header.api_version);
> else if (msg_out.header.status != 0x0)
> drm_warn(&i915->drm, "PXP firmware failed arb session init request ret=[0x%08x]\n",
> msg_out.header.status);
>
> base-commit: cc44a1e87ea6b788868878295119398966f98a81
next prev parent reply other threads:[~2023-01-12 3:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 22:11 [Intel-gfx] [PATCH v2 1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version Alan Previn
2022-12-21 10:21 ` Jani Nikula
2022-12-21 17:33 ` Teres Alexis, Alan Previn
2022-12-21 17:49 ` [Intel-gfx] [PATCH v3 " Alan Previn
2023-01-12 3:19 ` Belgaumkar, Vinay [this message]
2022-12-22 9:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v3,1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version (rev2) Patchwork
2022-12-22 15:52 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=d0be5318-f968-2b7f-fa77-9711337bc703@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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