Skip to content

Commit 9e134ed

Browse files
aalteresRadhakrishna Sripada
authored andcommitted
drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component
On legacy platforms, KCR HW enabling is done at the time the mei component interface is bound. It's also disabled during unbind. However, for MTL onwards, we don't depend on a tee component to start sending GSC-CS firmware messages. Thus, immediately enable (or disable) KCR HW on PXP's init, fini and resume. Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230511231738.1077674-8-alan.previn.teres.alexis@intel.com
1 parent d1da138 commit 9e134ed

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "gt/uc/intel_gsc_uc_heci_cmd_submit.h"
1111

1212
#include "i915_drv.h"
13+
#include "intel_pxp.h"
1314
#include "intel_pxp_cmd_interface_42.h"
1415
#include "intel_pxp_cmd_interface_43.h"
1516
#include "intel_pxp_gsccs.h"
@@ -422,10 +423,22 @@ gsccs_allocate_execution_resource(struct intel_pxp *pxp)
422423

423424
void intel_pxp_gsccs_fini(struct intel_pxp *pxp)
424425
{
426+
intel_wakeref_t wakeref;
427+
425428
gsccs_destroy_execution_resource(pxp);
429+
with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref)
430+
intel_pxp_fini_hw(pxp);
426431
}
427432

428433
int intel_pxp_gsccs_init(struct intel_pxp *pxp)
429434
{
430-
return gsccs_allocate_execution_resource(pxp);
435+
int ret;
436+
intel_wakeref_t wakeref;
437+
438+
ret = gsccs_allocate_execution_resource(pxp);
439+
if (!ret) {
440+
with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref)
441+
intel_pxp_init_hw(pxp);
442+
}
443+
return ret;
431444
}

drivers/gpu/drm/i915/pxp/intel_pxp_pm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ void intel_pxp_resume_complete(struct intel_pxp *pxp)
4343
* The PXP component gets automatically unbound when we go into S3 and
4444
* re-bound after we come out, so in that scenario we can defer the
4545
* hw init to the bind call.
46+
* NOTE: GSC-CS backend doesn't rely on components.
4647
*/
47-
if (!pxp->pxp_component)
48+
if (!HAS_ENGINE(pxp->ctrl_gt, GSC0) && !pxp->pxp_component)
4849
return;
4950

5051
intel_pxp_init_hw(pxp);

0 commit comments

Comments
 (0)