From: "David E. Box" <david.e.box@linux.intel.com>
To: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org
Cc: david.e.box@linux.intel.com, markgross@kernel.org,
hdegoede@redhat.com, irenic.rajneesh@gmail.com,
ilpo.jarvinen@linux.intel.com, xi.pardee@intel.com,
rajvi.jingar@linux.intel.com
Subject: [PATCH V2 2/2] platform/x86/intel/pmc/mtl: Put devices in D3 during resume
Date: Wed, 7 Jun 2023 16:38:49 -0700 [thread overview]
Message-ID: <20230607233849.239047-2-david.e.box@linux.intel.com> (raw)
In-Reply-To: <20230607233849.239047-1-david.e.box@linux.intel.com>
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: 336ba968d3e3 ("platform/x86/intel/pmc/mtl: Put GNA/IPU/VPU devices in D3")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
V2 - rename mtl_fixup to mtl_d3_fixup. Call it from new mtl_resume
function, followed by the common resume. Suggested by Ilpo.
drivers/platform/x86/intel/pmc/mtl.c | 29 ++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index e8cc156412ce..2b00ad9da621 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -68,16 +68,29 @@ static void mtl_set_device_d3(unsigned int device)
}
}
-void mtl_core_init(struct pmc_dev *pmcdev)
+/*
+ * 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)
{
- pmcdev->map = &mtl_reg_map;
- pmcdev->core_configure = mtl_core_configure;
-
- /*
- * Set power state of select devices that do not have drivers to D3
- * so that they do not block Package C entry.
- */
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)
+{
+ pmcdev->map = &mtl_reg_map;
+ pmcdev->core_configure = mtl_core_configure;
+
+ mtl_d3_fixup();
+
+ pmcdev->resume = mtl_resume;
+}
--
2.34.1
next prev parent reply other threads:[~2023-06-07 23:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 23:38 [PATCH V2 1/2] platform/x86/intel/pmc: Add resume callback David E. Box
2023-06-07 23:38 ` David E. Box [this message]
2023-06-08 14:32 ` [PATCH V2 2/2] platform/x86/intel/pmc/mtl: Put devices in D3 during resume Ilpo Järvinen
2023-06-12 9:42 ` Hans de Goede
2023-06-12 18:02 ` David E. Box
2023-06-13 10:29 ` Hans de Goede
2023-06-08 14:34 ` [PATCH V2 1/2] platform/x86/intel/pmc: Add resume callback Ilpo Järvinen
2023-06-13 10:30 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230607233849.239047-2-david.e.box@linux.intel.com \
--to=david.e.box@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=irenic.rajneesh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajvi.jingar@linux.intel.com \
--cc=xi.pardee@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox