Skip to contentSkip to conversation

drm/i915/pxp: limit drm-errors or warning on firmware API failures

PATCH Superseded Alan Previn 2 participants 2 messages Mar 23, 2023

Subsystems (2)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 drm/i915/pxp: limit drm-errors or warning on firmware API failures

MESA driver is creating protected context on every driver handle creation to query caps bits for app. So when running CI tests, they are observing hundreds of drm_errors when enabling PXP in .config but using SOC fusing or BIOS configuration that cannot support PXP sessions.

The fixes tag referenced below was to resolve a related issue where we wanted to silence error messages, but that case was due to outdated IFWI (firmware) that definitely needed an upgrade and was, at that point, considered a one-off case as opposed to today's realization that default CI was enabling PXP in kernel config for all testing.

So with this patch, let's strike a balance between issues that is critical but are root-caused from HW/platform gaps (louder drm-warn but just ONCE) vs other cases where it could also come from session state machine (which cannot be a WARN_ONCE since it can be triggered due to runtime operation events).

Let's use helpers for these so as more functions are added in future features / HW (or as FW designers continue to bless upstreaming of the error codes and meanings), we only need to update the helpers.

NOTE: Don't completely remove FW errors (via drm_debug) or else cusomer apps that really needs to know that content protection failed won't be aware of it.

v2: - Add fixes tag (Trvtko)
v3: - Break multi-line drm_dbg strings into separate drm_dbg (Daniele)
- Fix couple of typecasting nits (Daniele)
v4: - Unsuccessful PXP FW cmd due to platform configuration shouldn't
use drm_WARN_once (Tvrtko), Switched to use drm_info_once.

Fixes b762787bf767 ("drm/i915/pxp: Use drm_dbg if arb session failed due to fw version")
---
 .../i915/pxp/intel_pxp_cmd_interface_cmn.h    |  3 +
 drivers/gpu/drm/i915/pxp/intel_pxp_session.c  |  2 +-
 drivers/gpu/drm/i915/pxp/intel_pxp_tee.c      | 77 +++++++++++++++----
 3 files changed, 67 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h +3 -0
index ae9b151b7cb7..6f6541d5e49a 100644
@@ -18,6 +18,9 @@
 enum pxp_status {
 	PXP_STATUS_SUCCESS = 0x0,
 	PXP_STATUS_ERROR_API_VERSION = 0x1002,
+	PXP_STATUS_NOT_READY = 0x100e,
+	PXP_STATUS_PLATFCONFIG_KF1_NOVERIF = 0x101a,
+	PXP_STATUS_PLATFCONFIG_KF1_BAD = 0x101f,
 	PXP_STATUS_OP_NOT_PERMITTED = 0x4013
 };
 
drivers/gpu/drm/i915/pxp/intel_pxp_session.c +1 -1
index 448cacb0465d..7de849cb6c47 100644
@@ -74,7 +74,7 @@ static int pxp_create_arb_session(struct intel_pxp *pxp)
 
 	ret = pxp_wait_for_session_state(pxp, ARB_SESSION, true);
 	if (ret) {
-		drm_err(&gt->i915->drm, "arb session failed to go in play\n");
+		drm_dbg(&gt->i915->drm, "arb session failed to go in play\n");
 		return ret;
 	}
 	drm_dbg(&gt->i915->drm, "PXP ARB session is alive\n");
drivers/gpu/drm/i915/pxp/intel_pxp_tee.c +63 -14

94 lines not on this page · raw message

base-commit: da2f18fbe9bca96a24a134d0f371b15d104fbf59

Signature · 1 line
2.39.0
#1 lore raw

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/pxp: limit drm-errors or warning on firmware API failures (rev3)

== Series Details ==

== Series Details ==

Series: drm/i915/pxp: limit drm-errors or warning on firmware API failures (rev3)
URL : https://patchwork.freedesktop.org/series/113680/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12902 -> Patchwork_113680v3
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_113680v3 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_113680v3, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/index.html

Participating hosts (37 -> 36)
------------------------------

Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_113680v3:

### IGT changes ###

#### Possible regressions ####

* igt@i915_suspend@basic-s3-without-i915:
- bat-rpls-2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-rpls-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-rpls-2/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_113680v3 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live@slpc:
- bat-adln-1: NOTRUN -> [DMESG-FAIL][3] ([i915#6997])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-adln-1/igt@i915_selftest@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-adln-1: NOTRUN -> [SKIP][4] ([i915#7828])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-adln-1/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3@lmem0:
- bat-dg2-9: [FAIL][5] ([fdo#103375]) -> [PASS][6] +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-dg2-9/igt@gem_exec_suspend@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-dg2-9/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-adln-1: [INCOMPLETE][7] ([i915#4983] / [i915#7467] / [i915#7981]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-adln-1/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-adln-1/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-3:
- bat-dg2-9: [FAIL][9] ([fdo#103375] / [i915#7932]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-dg2-9/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@i915_selftest@live@reset:
- bat-rpls-1: [ABORT][11] ([i915#4983] / [i915#7981]) -> [ABORT][12] ([i915#4983])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-rpls-1/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-rpls-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rpls-2: [DMESG-FAIL][13] ([i915#6997] / [i915#7913]) -> [DMESG-FAIL][14] ([i915#6367] / [i915#7913] / [i915#7996])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12902/bat-rpls-2/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/bat-rpls-2/igt@i915_selftest@[email protected]

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7467]: https://gitlab.freedesktop.org/drm/intel/issues/7467
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#7996]: https://gitlab.freedesktop.org/drm/intel/issues/7996

Build changes
-------------

* Linux: CI_DRM_12902 -> Patchwork_113680v3

CI-20190529: 20190529
CI_DRM_12902: c8333f1c10ebbdaad7a642cc66041b4f90bc81be @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7211: c0cc1de7b2f4041ca68960362aa55f881d416bac @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113680v3: c8333f1c10ebbdaad7a642cc66041b4f90bc81be @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

32db9340223a drm/i915/pxp: limit drm-errors or warning on firmware API failures

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113680v3/index.html