Re: [PATCH v2 07/16] drm/i915/pxp: Create the arbitrary session after boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/3/2021 2:08 PM, Chris Wilson wrote:
Quoting Daniele Ceraolo Spurio (2021-03-01 19:31:51)
+static inline bool intel_pxp_is_active(const struct intel_pxp *pxp)
+{
+       return pxp->arb_is_in_play;
+}
+static bool intel_pxp_session_is_in_play(struct intel_pxp *pxp, u32 id)
+{
+       struct intel_gt *gt = pxp_to_gt(pxp);
+       intel_wakeref_t wakeref;
+       u32 sip = 0;
+
+       with_intel_runtime_pm(gt->uncore->rpm, wakeref)
+               sip = intel_uncore_read(gt->uncore, GEN12_KCR_SIP);
+
+       return sip & BIT(id);
+}
+
+bool intel_pxp_arb_session_is_in_play(struct intel_pxp *pxp)
+{
+       return intel_pxp_session_is_in_play(pxp, ARB_SESSION);
+}
So pxp->arb_is_in_play is not the same as intel_pxp_arb_session_is_in_play().

That's confusing.

The HW is counfusing :)

The HW reporting that a session is in play does not mean that the session is actually valid. When a teardown occurs the session is still in play on the HW but the relevant keys are gone, so the session is not actually usable (and attempting to use it will likely cause hangs). intel_pxp_session_is_in_play() reflect the HW in_play state while pxp->arb_is_in_play reflect usability of the session. I'll rename the latter to pxp->arb_is_valid.

Daniele

-Chris

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux