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
25 lines
512 B
C
25 lines
512 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright(c) 2020, Intel Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __INTEL_PXP_PM_H__
|
|
#define __INTEL_PXP_PM_H__
|
|
|
|
#include "intel_pxp_types.h"
|
|
|
|
#ifdef CONFIG_DRM_I915_PXP
|
|
void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime);
|
|
void intel_pxp_resume(struct intel_pxp *pxp);
|
|
#else
|
|
static inline void intel_pxp_suspend(struct intel_pxp *pxp, bool runtime)
|
|
{
|
|
}
|
|
|
|
static inline void intel_pxp_resume(struct intel_pxp *pxp)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* __INTEL_PXP_PM_H__ */
|