OSDN Git Service

drm/i915/pxp: Enable PXP power management
authorHuang, Sean Z <sean.z.huang@intel.com>
Fri, 24 Sep 2021 19:14:47 +0000 (12:14 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 4 Oct 2021 17:11:11 +0000 (13:11 -0400)
commit0cfab4cb3c4e90c1c2f4b18c0b8ac4cb946808c8
tree3ed348297ced5c1833ac0f78db6a521c933c2c67
parent32271ecd6596e67458c75d2d61805bb1c60d7363
drm/i915/pxp: Enable PXP power management

During the power event S3+ sleep/resume, hardware will lose all the
encryption keys for every hardware session, even though the
session state might still be marked as alive after resume. Therefore,
we should consider the session as dead on suspend and invalidate all the
objects. The session will be automatically restarted on the first
protected submission on resume.

v2: runtime suspend also invalidates the keys
v3: fix return codes, simplify rpm ops (Chris), use the new worker func
v4: invalidate the objects on suspend, don't re-create the arb sesson on
resume (delayed to first submission).
v5: move irq changes back to irq patch (Rodrigo)
v6: drop invalidation in runtime suspend (Rodrigo)

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-13-alan.previn.teres.alexis@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/pxp/intel_pxp_irq.c
drivers/gpu/drm/i915/pxp/intel_pxp_pm.c [new file with mode: 0644]
drivers/gpu/drm/i915/pxp/intel_pxp_pm.h [new file with mode: 0644]
drivers/gpu/drm/i915/pxp/intel_pxp_session.c
drivers/gpu/drm/i915/pxp/intel_pxp_tee.c