From 8e5134ef09e17aa1cb4bcb0bb362070e0a8931d6 Mon Sep 17 00:00:00 2001 From: "David E. Box" Date: Tue, 27 Feb 2024 11:01:32 -0800 Subject: [PATCH 1/4] platform/x86/intel/vsec: Remove nuisance message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mainline:701d40af59373ac3a60c620cbd0ceff7b2b8e565 severity: Moderate upstream commit 701d40af59373ac3a60c620cbd0ceff7b2b8e565 ("platform/x86/intel/vsec: Remove nuisance message") intel_vsec_walk_header() is used to configure features from devices that don't provide a PCI VSEC or DVSEC structure. Some of these features may be unsupported and fail to load. Ignore them silently as we do for unsupported features described by VSEC/DVSEC. Intel-SIG: commit 701d40af5937 ("platform/x86/intel/vsec: Remove nuisance message") Signed-off-by: "David E. Box" Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240227190134.1592072-1-david.e.box@linux.intel.com Signed-off-by: Ilpo Järvinen [ Quanxian Wang: amend commit log ] Signed-off-by: Quanxian Wang --- drivers/platform/x86/intel/vsec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c index b68586731e457..47aea5f14ce1c 100644 --- a/drivers/platform/x86/intel/vsec.c +++ b/drivers/platform/x86/intel/vsec.c @@ -236,10 +236,7 @@ static bool intel_vsec_walk_header(struct pci_dev *pdev, for ( ; *header; header++) { ret = intel_vsec_add_dev(pdev, *header, info); - if (ret) - dev_info(&pdev->dev, "Could not add device for VSEC id %d\n", - (*header)->id); - else + if (!ret) have_devices = true; } From 7257c191323ad4f723e281e8ae3dbe4ed13f9be8 Mon Sep 17 00:00:00 2001 From: "David E. Box" Date: Fri, 22 Dec 2023 19:25:47 -0800 Subject: [PATCH 2/4] platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend mainline:6f9fac5535ba2038063c656f0afb496d7f87bcc1 severity: Moderate upstream commit 6f9fac5535ba2038063c656f0afb496d7f87bcc1 ("platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend") Add the GBE LTR ignore suspend time fix for Lunar Lake. Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") Intel-SIG: commit 6f9fac5535ba ("platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend") Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231223032548.1680738-8-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede [ Quanxian Wang: amend commit log ] Signed-off-by: Quanxian Wang --- drivers/platform/x86/intel/pmc/lnl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c index 842f9cca03921..abad17cdd3d78 100644 --- a/drivers/platform/x86/intel/pmc/lnl.c +++ b/drivers/platform/x86/intel/pmc/lnl.c @@ -509,6 +509,8 @@ static void lnl_d3_fixup(void) static int lnl_resume(struct pmc_dev *pmcdev) { lnl_d3_fixup(); + pmc_core_send_ltr_ignore(pmcdev, 3, 0); + return pmc_core_resume_common(pmcdev); } @@ -521,6 +523,7 @@ int lnl_core_init(struct pmc_dev *pmcdev) lnl_d3_fixup(); + pmcdev->suspend = cnl_suspend; pmcdev->resume = lnl_resume; pmcdev->regmap_list = lnl_pmc_info_list; ret = pmc_core_ssram_init(pmcdev, func); From 5a613ace867cf76189799e59bfd99663262cab06 Mon Sep 17 00:00:00 2001 From: "David E. Box" Date: Tue, 27 Feb 2024 11:01:33 -0800 Subject: [PATCH 3/4] platform/x86/intel/pmc/lnl: Remove SSRAM support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mainline:e6ba4acde44957dc9bdc3222b5739217a102752d severity: Moderate upstream commit e6ba4acde44957dc9bdc3222b5739217a102752d ("platform/x86/intel/pmc/lnl: Remove SSRAM support") A recent PMC firmware change in Lunar Lake caused the pmc_core driver to fail to probe. This is due to a change in the GUID for PMC telemetry coming from the SSRAM device. Until a final release is ready this value may change again. In the meantime, disable the SSRAM support for Lunar Lake so the driver can load and provide some basic functionality. Fixes: 3748dfdae2a6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") Intel-SIG: commit e6ba4acde449 ("platform/x86/intel/pmc/lnl: Remove SSRAM support") Signed-off-by: "David E. Box" Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240227190134.1592072-2-david.e.box@linux.intel.com Signed-off-by: Ilpo Järvinen [ Quanxian Wang: amend commit log ] Signed-off-by: Quanxian Wang --- drivers/platform/x86/intel/pmc/lnl.c | 40 ++++------------------------ 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c index abad17cdd3d78..068d72504683f 100644 --- a/drivers/platform/x86/intel/pmc/lnl.c +++ b/drivers/platform/x86/intel/pmc/lnl.c @@ -13,21 +13,6 @@ #include "core.h" -#define SOCM_LPM_REQ_GUID 0x11594920 - -#define PMC_DEVID_SOCM 0xa87f - -static const u8 LNL_LPM_REG_INDEX[] = {0, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20}; - -static struct pmc_info lnl_pmc_info_list[] = { - { - .guid = SOCM_LPM_REQ_GUID, - .devid = PMC_DEVID_SOCM, - .map = &lnl_socm_reg_map, - }, - {} -}; - const struct pmc_bit_map lnl_ltr_show_map[] = { {"SOUTHPORT_A", CNP_PMC_LTR_SPA}, {"SOUTHPORT_B", CNP_PMC_LTR_SPB}, @@ -490,7 +475,6 @@ const struct pmc_reg_map lnl_socm_reg_map = { .lpm_sts = lnl_lpm_maps, .lpm_status_offset = MTL_LPM_STATUS_OFFSET, .lpm_live_status_offset = MTL_LPM_LIVE_STATUS_OFFSET, - .lpm_reg_index = LNL_LPM_REG_INDEX, }; #define LNL_NPU_PCI_DEV 0x643e @@ -517,33 +501,19 @@ static int lnl_resume(struct pmc_dev *pmcdev) int lnl_core_init(struct pmc_dev *pmcdev) { int ret; - int func = 2; - bool ssram_init = true; struct pmc *pmc = pmcdev->pmcs[PMC_IDX_SOC]; lnl_d3_fixup(); pmcdev->suspend = cnl_suspend; pmcdev->resume = lnl_resume; - pmcdev->regmap_list = lnl_pmc_info_list; - ret = pmc_core_ssram_init(pmcdev, func); - - /* If regbase not assigned, set map and discover using legacy method */ - if (ret) { - ssram_init = false; - pmc->map = &lnl_socm_reg_map; - ret = get_primary_reg_base(pmc); - if (ret) - return ret; - } - pmc_core_get_low_power_modes(pmcdev); + pmc->map = &lnl_socm_reg_map; + ret = get_primary_reg_base(pmc); + if (ret) + return ret; - if (ssram_init) { - ret = pmc_core_ssram_get_lpm_reqs(pmcdev); - if (ret) - return ret; - } + pmc_core_get_low_power_modes(pmcdev); return 0; } From ffc899ff95082dd0ebac64df911464cee1cb2003 Mon Sep 17 00:00:00 2001 From: "David E. Box" Date: Tue, 27 Feb 2024 11:01:34 -0800 Subject: [PATCH 4/4] platform/x86/intel/pmc/arl: Put GNA device in D3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mainline:ac2d1fd9688fcdfba5acc815fb2b13fec83e5dad severity: Moderate upstream commit ac2d1fd9688fcdfba5acc815fb2b13fec83e5dad ("platform/x86/intel/pmc/arl: Put GNA device in D3") As is the case on Meteor Lake, the Gaussian & Neural Accelerator (GNA) device is powered by BIOS to D0 by default. If no driver is loaded, this will cause the Package C state to be limited to PC2, leading to significant power consumption and decrease in batter life. Put the GNA device in D3 by default if no driver is loaded for it. Fixes: 83f168a1a437 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver") Intel-SIG: commit ac2d1fd9688f ("platform/x86/intel/pmc/arl: Put GNA device in D3") Signed-off-by: "David E. Box" Reviewed-by: Ilpo Järvinen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20240227190134.1592072-3-david.e.box@linux.intel.com Signed-off-by: Ilpo Järvinen [ Quanxian Wang: amend commit log ] Signed-off-by: Quanxian Wang --- drivers/platform/x86/intel/pmc/arl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c index e6190247f5df7..b01e93b63b028 100644 --- a/drivers/platform/x86/intel/pmc/arl.c +++ b/drivers/platform/x86/intel/pmc/arl.c @@ -673,6 +673,7 @@ static struct pmc_info arl_pmc_info_list[] = { }; #define ARL_NPU_PCI_DEV 0xad1d +#define ARL_GNA_PCI_DEV 0xae4c /* * Set power state of select devices that do not have drivers to D3 * so that they do not block Package C entry. @@ -680,6 +681,7 @@ static struct pmc_info arl_pmc_info_list[] = { static void arl_d3_fixup(void) { pmc_core_set_device_d3(ARL_NPU_PCI_DEV); + pmc_core_set_device_d3(ARL_GNA_PCI_DEV); } static int arl_resume(struct pmc_dev *pmcdev)