LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message
@ 2024-02-27 19:01 David E. Box
  2024-02-27 19:01 ` [PATCH V2 2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support David E. Box
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David E. Box @ 2024-02-27 19:01 UTC (permalink / raw
  To: david.e.box, rajvi.jingar, platform-driver-x86, linux-kernel,
	sathyanarayanan.kuppuswamy, hdegoede, ilpo.jarvinen

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.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---

V2 - no changes

 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 778eb0aa3479..0fdfaf3a4f5c 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;
 	}
 

base-commit: 841c35169323cd833294798e58b9bf63fa4fa1de
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH V2 2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support
  2024-02-27 19:01 [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message David E. Box
@ 2024-02-27 19:01 ` David E. Box
  2024-02-27 19:01 ` [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3 David E. Box
  2024-03-04 13:16 ` [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message Ilpo Järvinen
  2 siblings, 0 replies; 5+ messages in thread
From: David E. Box @ 2024-02-27 19:01 UTC (permalink / raw
  To: david.e.box, rajvi.jingar, platform-driver-x86, linux-kernel,
	sathyanarayanan.kuppuswamy, hdegoede, ilpo.jarvinen

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")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---

V2 - Removed non-imperative language in changelog.

 drivers/platform/x86/intel/pmc/lnl.c | 38 +++-------------------------
 1 file changed, 4 insertions(+), 34 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index abad17cdd3d7..068d72504683 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->map = &lnl_socm_reg_map;
+	ret = get_primary_reg_base(pmc);
+	if (ret)
+		return ret;
 
 	pmc_core_get_low_power_modes(pmcdev);
 
-	if (ssram_init) {
-		ret = pmc_core_ssram_get_lpm_reqs(pmcdev);
-		if (ret)
-			return ret;
-	}
-
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3
  2024-02-27 19:01 [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message David E. Box
  2024-02-27 19:01 ` [PATCH V2 2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support David E. Box
@ 2024-02-27 19:01 ` David E. Box
  2024-02-27 19:54   ` Kuppuswamy Sathyanarayanan
  2024-03-04 13:16 ` [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message Ilpo Järvinen
  2 siblings, 1 reply; 5+ messages in thread
From: David E. Box @ 2024-02-27 19:01 UTC (permalink / raw
  To: david.e.box, rajvi.jingar, platform-driver-x86, linux-kernel,
	sathyanarayanan.kuppuswamy, hdegoede, ilpo.jarvinen

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")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---

V2 - Better explain the issue in the changelog and spell out GNA.

 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 683ae828276b..34b4cd23bfe5 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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3
  2024-02-27 19:01 ` [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3 David E. Box
@ 2024-02-27 19:54   ` Kuppuswamy Sathyanarayanan
  0 siblings, 0 replies; 5+ messages in thread
From: Kuppuswamy Sathyanarayanan @ 2024-02-27 19:54 UTC (permalink / raw
  To: David E. Box, rajvi.jingar, platform-driver-x86, linux-kernel,
	hdegoede, ilpo.jarvinen


On 2/27/24 11:01 AM, David E. Box wrote:
> 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.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

>
> Fixes: 83f168a1a437 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")
> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
>
> V2 - Better explain the issue in the changelog and spell out GNA.
>
>  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 683ae828276b..34b4cd23bfe5 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)

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message
  2024-02-27 19:01 [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message David E. Box
  2024-02-27 19:01 ` [PATCH V2 2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support David E. Box
  2024-02-27 19:01 ` [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3 David E. Box
@ 2024-03-04 13:16 ` Ilpo Järvinen
  2 siblings, 0 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2024-03-04 13:16 UTC (permalink / raw
  To: rajvi.jingar, platform-driver-x86, linux-kernel,
	sathyanarayanan.kuppuswamy, hdegoede, David E. Box

On Tue, 27 Feb 2024 11:01:32 -0800, David E. Box wrote:

> 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.
> 
> 


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/3] platform/x86/intel/vsec: Remove nuisance message
      commit: ad742f6580e1d50a5482fc4f2ed0d248fa784677
[2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support
      commit: 728720381879e9e0bc68ff9edca52261c1f5bc31
[3/3] platform/x86/intel/pmc/arl: Put GNA device in D3
      commit: a5e28e2b384fe5c8fed36907cf4297d629612bdb

--
 i.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-04 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 19:01 [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message David E. Box
2024-02-27 19:01 ` [PATCH V2 2/3] platform/x86/intel/pmc/lnl: Remove SSRAM support David E. Box
2024-02-27 19:01 ` [PATCH V2 3/3] platform/x86/intel/pmc/arl: Put GNA device in D3 David E. Box
2024-02-27 19:54   ` Kuppuswamy Sathyanarayanan
2024-03-04 13:16 ` [PATCH V2 1/3] platform/x86/intel/vsec: Remove nuisance message Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).