mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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:
parent
1f95f61818
commit
02eca6edcb
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user