[Intel-gfx] [PATCH v5] drm/i915/pxp: Add drm_dbgs for critical PXP events.
Teres Alexis, Alan Previn
alan.previn.teres.alexis at intel.com
Wed Nov 29 19:22:00 UTC 2023
On Fri, 2023-11-24 at 08:30 +0000, Tvrtko Ursulin wrote:
> On 22/11/2023 19:15, Alan Previn wrote:
alan:snip
alan: thanks for reviewing.
> > if (iir & GEN12_DISPLAY_STATE_RESET_COMPLETE_INTERRUPT)
> > - pxp->session_events |= PXP_TERMINATION_COMPLETE;
> > + pxp->session_events |= PXP_TERMINATION_COMPLETE | PXP_EVENT_TYPE_IRQ;
>
> This looked to be doing more than adding debug logs, but then no one is
> actually consuming this new flag?!
alan: see below hunk, inside pxp_session_work the drm_dbg that was prints
the "events" that came from above. we need this debug message to uniquely
recognize that contexts pxp keys would get invalidated in response to
a KCR IRQ (as opposed to other known flows that are being reported by other
means like banning hanging contexts, or as part of suspend etc).
NOTE: pxp->session_events does get set in at lease one other path
outside the IRQ (which triggers teardown but not coming from KCR-hw)
This flag is solely for the debug message. Hope this works.
>
> Regards,
>
> Tvrtko
>
> >
> > if (pxp->session_events)
> > queue_work(system_unbound_wq, &pxp->session_work);
> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_session.c b/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
> > index 0a3e66b0265e..091c86e03d1a 100644
> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_session.c
> > @@ -137,8 +137,10 @@ void intel_pxp_terminate(struct intel_pxp *pxp, bool post_invalidation_needs_res
> > static void pxp_terminate_complete(struct intel_pxp *pxp)
> > {
> > /* Re-create the arb session after teardown handle complete */
> > - if (fetch_and_zero(&pxp->hw_state_invalidated))
> > + if (fetch_and_zero(&pxp->hw_state_invalidated)) {
> > + drm_dbg(&pxp->ctrl_gt->i915->drm, "PXP: creating arb_session after invalidation");
> > pxp_create_arb_session(pxp);
> > + }
> >
> > complete_all(&pxp->termination);
> > }
> > @@ -157,6 +159,8 @@ static void pxp_session_work(struct work_struct *work)
> > if (!events)
> > return;
> >
> > + drm_dbg(>->i915->drm, "PXP: processing event-flags 0x%08x", events);
> > +
> > if (events & PXP_INVAL_REQUIRED)
> > intel_pxp_invalidate(pxp);
> >
> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> > index 7e11fa8034b2..07864b584cf4 100644
> > --- a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> > @@ -124,6 +124,7 @@ struct intel_pxp {
> > #define PXP_TERMINATION_REQUEST BIT(0)
> > #define PXP_TERMINATION_COMPLETE BIT(1)
> > #define PXP_INVAL_REQUIRED BIT(2)
> > +#define PXP_EVENT_TYPE_IRQ BIT(3)
> > };
> >
> > #endif /* __INTEL_PXP_TYPES_H__ */
> >
> > base-commit: 5429d55de723544dfc0630cf39d96392052b27a1
More information about the Intel-gfx
mailing list