drm/i915/pxp: Implement PXP irq handler
The HW will generate a teardown interrupt when session termination is required, which requires i915 to submit a terminating batch. Once the HW is done with the termination it will generate another interrupt, at which point it is safe to re-create the session. Since the termination and re-creation flow is something we want to trigger from the driver as well, use a common work function that can be called both from the irq handler and from the driver set-up flows, which has the addded benefit of allowing us to skip any extra locks because the work itself serializes the operations. v2: use struct completion instead of bool (Chris) v3: drop locks, clean up functions and improve comments (Chris), move to common work function. v4: improve comments, simplify wait logic (Rodrigo) v5: unconditionally set interrupts, rename state_attacked var (Rodrigo) v10: remove inclusion of intel_gt_types.h from intel_pxp.h (Jani) Signed-off-by:Alan Previn <alan.previn.teres.alexis@intel.com> Signed-off-by:
Huang, Sean Z <sean.z.huang@intel.com> Signed-off-by:
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by:
Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by:
Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210924191452.1539378-10-alan.previn.teres.alexis@intel.com
Showing
- drivers/gpu/drm/i915/Makefile 1 addition, 0 deletionsdrivers/gpu/drm/i915/Makefile
- drivers/gpu/drm/i915/gt/intel_gt_irq.c 7 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_gt_irq.c
- drivers/gpu/drm/i915/i915_reg.h 1 addition, 0 deletionsdrivers/gpu/drm/i915/i915_reg.h
- drivers/gpu/drm/i915/pxp/intel_pxp.c 60 additions, 6 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp.c
- drivers/gpu/drm/i915/pxp/intel_pxp.h 8 additions, 0 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp.h
- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c 100 additions, 0 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_irq.c
- drivers/gpu/drm/i915/pxp/intel_pxp_irq.h 32 additions, 0 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_irq.h
- drivers/gpu/drm/i915/pxp/intel_pxp_session.c 51 additions, 3 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_session.c
- drivers/gpu/drm/i915/pxp/intel_pxp_session.h 2 additions, 3 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_session.h
- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c 4 additions, 4 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_tee.c
- drivers/gpu/drm/i915/pxp/intel_pxp_types.h 18 additions, 0 deletionsdrivers/gpu/drm/i915/pxp/intel_pxp_types.h
Please register or sign in to comment