Commit f2b689ab authored by David E. Box's avatar David E. Box Committed by Hans de Goede

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: 336ba968 ("platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3")
Signed-off-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20230607233849.239047-2-david.e.box@linux.intel.comReviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 801e5dc9
...@@ -68,16 +68,29 @@ static void mtl_set_device_d3(unsigned int device) ...@@ -68,16 +68,29 @@ static void mtl_set_device_d3(unsigned int device)
} }
} }
/*
* Set power state of select devices that do not have drivers to D3
* so that they do not block Package C entry.
*/
static void mtl_d3_fixup(void)
{
mtl_set_device_d3(MTL_GNA_PCI_DEV);
mtl_set_device_d3(MTL_IPU_PCI_DEV);
mtl_set_device_d3(MTL_VPU_PCI_DEV);
}
static int mtl_resume(struct pmc_dev *pmcdev)
{
mtl_d3_fixup();
return pmc_core_resume_common(pmcdev);
}
void mtl_core_init(struct pmc_dev *pmcdev) void mtl_core_init(struct pmc_dev *pmcdev)
{ {
pmcdev->map = &mtl_reg_map; pmcdev->map = &mtl_reg_map;
pmcdev->core_configure = mtl_core_configure; pmcdev->core_configure = mtl_core_configure;
/* mtl_d3_fixup();
* Set power state of select devices that do not have drivers to D3
* so that they do not block Package C entry. pmcdev->resume = mtl_resume;
*/
mtl_set_device_d3(MTL_GNA_PCI_DEV);
mtl_set_device_d3(MTL_IPU_PCI_DEV);
mtl_set_device_d3(MTL_VPU_PCI_DEV);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment