summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2023-10-11 09:50:59 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2023-10-11 09:50:59 +0200
commit57390019b68b83f96eb98f490367b9df1f2d77cb (patch)
treee6d4b6c75efdd2d7fb7d37f980688c491be3ff6a /drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
parente5f9d543419c78ac58f3b3557bc5a76b20ff600b (diff)
parent389af786f92ecdff35883551d54bf4e507ffcccb (diff)
downloadlinux-57390019b68b83f96eb98f490367b9df1f2d77cb.tar.gz
linux-57390019b68b83f96eb98f490367b9df1f2d77cb.tar.bz2
linux-57390019b68b83f96eb98f490367b9df1f2d77cb.zip
Merge drm/drm-next into drm-misc-next
Updating drm-misc-next to the state of Linux v6.6-rc2. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'drivers/gpu/drm/i915/pxp/intel_pxp_pm.c')
-rw-r--r--drivers/gpu/drm/i915/pxp/intel_pxp_pm.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
index 1a04067f61fc..6dfd24918953 100644
--- a/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
+++ b/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
@@ -34,8 +34,10 @@ void intel_pxp_suspend(struct intel_pxp *pxp)
}
}
-void intel_pxp_resume_complete(struct intel_pxp *pxp)
+static void _pxp_resume(struct intel_pxp *pxp, bool take_wakeref)
{
+ intel_wakeref_t wakeref;
+
if (!intel_pxp_is_enabled(pxp))
return;
@@ -48,7 +50,21 @@ void intel_pxp_resume_complete(struct intel_pxp *pxp)
if (!HAS_ENGINE(pxp->ctrl_gt, GSC0) && !pxp->pxp_component)
return;
+ if (take_wakeref)
+ wakeref = intel_runtime_pm_get(&pxp->ctrl_gt->i915->runtime_pm);
intel_pxp_init_hw(pxp);
+ if (take_wakeref)
+ intel_runtime_pm_put(&pxp->ctrl_gt->i915->runtime_pm, wakeref);
+}
+
+void intel_pxp_resume_complete(struct intel_pxp *pxp)
+{
+ _pxp_resume(pxp, true);
+}
+
+void intel_pxp_runtime_resume(struct intel_pxp *pxp)
+{
+ _pxp_resume(pxp, false);
}
void intel_pxp_runtime_suspend(struct intel_pxp *pxp)