Skip to content

Commit f2b689a

Browse files
debox1jwrdegoede
authored andcommitted
platform/x86/intel/pmc/mtl: Put devices in D3 during resume
An earlier commit placed some driverless devices in D3 during boot so that they don't block package cstate entry on Meteor Lake. Also place these devices in D3 after resume from suspend. Fixes: 336ba96 ("platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3") Signed-off-by: David E. Box <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 801e5dc commit f2b689a

File tree

1 file changed

+20
-7
lines changed
  • drivers/platform/x86/intel/pmc

1 file changed

+20
-7
lines changed

drivers/platform/x86/intel/pmc/mtl.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,29 @@ static void mtl_set_device_d3(unsigned int device)
6868
}
6969
}
7070

71+
/*
72+
* Set power state of select devices that do not have drivers to D3
73+
* so that they do not block Package C entry.
74+
*/
75+
static void mtl_d3_fixup(void)
76+
{
77+
mtl_set_device_d3(MTL_GNA_PCI_DEV);
78+
mtl_set_device_d3(MTL_IPU_PCI_DEV);
79+
mtl_set_device_d3(MTL_VPU_PCI_DEV);
80+
}
81+
82+
static int mtl_resume(struct pmc_dev *pmcdev)
83+
{
84+
mtl_d3_fixup();
85+
return pmc_core_resume_common(pmcdev);
86+
}
87+
7188
void mtl_core_init(struct pmc_dev *pmcdev)
7289
{
7390
pmcdev->map = &mtl_reg_map;
7491
pmcdev->core_configure = mtl_core_configure;
7592

76-
/*
77-
* Set power state of select devices that do not have drivers to D3
78-
* so that they do not block Package C entry.
79-
*/
80-
mtl_set_device_d3(MTL_GNA_PCI_DEV);
81-
mtl_set_device_d3(MTL_IPU_PCI_DEV);
82-
mtl_set_device_d3(MTL_VPU_PCI_DEV);
93+
mtl_d3_fixup();
94+
95+
pmcdev->resume = mtl_resume;
8396
}

0 commit comments

Comments
 (0)