Commit b762787b authored by Alan Previn's avatar Alan Previn Committed by John Harrison

drm/i915/pxp: Use drm_dbg if arb session failed due to fw version

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).

Changes from prio revs:
   v2 : - remove unnecessary newline. (Jani)
   v1 : - print incorrect version from input packet, not output.
Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221221174901.2703954-1-alan.previn.teres.alexis@intel.com
parent f7a79bdc
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
*/ */
enum pxp_status { enum pxp_status {
PXP_STATUS_SUCCESS = 0x0, PXP_STATUS_SUCCESS = 0x0,
PXP_STATUS_ERROR_API_VERSION = 0x1002,
PXP_STATUS_OP_NOT_PERMITTED = 0x4013 PXP_STATUS_OP_NOT_PERMITTED = 0x4013
}; };
......
...@@ -298,6 +298,10 @@ int intel_pxp_tee_cmd_create_arb_session(struct intel_pxp *pxp, ...@@ -298,6 +298,10 @@ int intel_pxp_tee_cmd_create_arb_session(struct intel_pxp *pxp,
if (ret) if (ret)
drm_err(&i915->drm, "Failed to send tee msg ret=[%d]\n", 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) else if (msg_out.header.status != 0x0)
drm_warn(&i915->drm, "PXP firmware failed arb session init request ret=[0x%08x]\n", drm_warn(&i915->drm, "PXP firmware failed arb session init request ret=[0x%08x]\n",
msg_out.header.status); msg_out.header.status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment