drm/xe/xe_sysctrl: Add System Controller power management support

Add resume handling for System Controller to support system (S3/S4) and
runtime power management transitions.

On resume, restore SoC remapper configuration and mailbox interface to
re‑establish communication with firmware.

Signed-off-by: Anoop Vijay <anoop.c.vijay@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patch.msgid.link/20260327131837.2192929-15-anoop.c.vijay@intel.com
This commit is contained in:
Anoop Vijay 2026-03-27 06:18:43 -07:00 committed by Umesh Nerlige Ramappa
parent 1f95f61818
commit 02eca6edcb
3 changed files with 29 additions and 0 deletions

View File

@ -26,6 +26,7 @@
#include "xe_pcode.h"
#include "xe_pxp.h"
#include "xe_sriov_vf_ccs.h"
#include "xe_sysctrl.h"
#include "xe_trace.h"
#include "xe_vm.h"
#include "xe_wa.h"
@ -259,6 +260,8 @@ int xe_pm_resume(struct xe_device *xe)
xe_i2c_pm_resume(xe, true);
xe_sysctrl_pm_resume(xe);
xe_irq_resume(xe);
for_each_gt(gt, xe, id) {
@ -670,6 +673,9 @@ int xe_pm_runtime_resume(struct xe_device *xe)
xe_i2c_pm_resume(xe, xe->d3cold.allowed);
if (xe->d3cold.allowed)
xe_sysctrl_pm_resume(xe);
xe_irq_resume(xe);
for_each_gt(gt, xe, id) {

View File

@ -77,3 +77,25 @@ int xe_sysctrl_init(struct xe_device *xe)
return 0;
}
/**
* xe_sysctrl_pm_resume() - System Controller resume handler
* @xe: xe device instance
*
* Invoked during system resume (S3/S4 to S0) and runtime resume from D3cold.
* Restores SoC remapper configuration and reinitializes mailbox interface.
*/
void xe_sysctrl_pm_resume(struct xe_device *xe)
{
struct xe_sysctrl *sc = &xe->sc;
if (!xe->info.has_soc_remapper_sysctrl)
return;
if (!xe->info.has_sysctrl)
return;
xe->soc_remapper.set_sysctrl_region(xe, SYSCTRL_MAILBOX_INDEX);
xe_sysctrl_mailbox_init(sc);
}

View File

@ -17,5 +17,6 @@ static inline struct xe_device *sc_to_xe(struct xe_sysctrl *sc)
}
int xe_sysctrl_init(struct xe_device *xe);
void xe_sysctrl_pm_resume(struct xe_device *xe);
#endif