* [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers
@ 2024-03-15 7:43 Asad Kamal
2024-03-15 7:43 ` [PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width Asad Kamal
2024-03-15 8:45 ` [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Lazar, Lijo
0 siblings, 2 replies; 5+ messages in thread
From: Asad Kamal @ 2024-03-15 7:43 UTC (permalink / raw)
To: amd-gfx
Cc: lijo.lazar, hawking.zhang, le.ma, shiwu.zhang, asad.kamal,
donald.cheung, sepehr.khatir, daniel.oliveira, charis.poag
Update PMFW interface headers for updated metrics table
with pcie link speed and pcie link width
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
index 7b812b9994d7..0b3c2f54a343 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
@@ -123,7 +123,7 @@ typedef enum {
VOLTAGE_GUARDBAND_COUNT
} GFX_GUARDBAND_e;
-#define SMU_METRICS_TABLE_VERSION 0xB
+#define SMU_METRICS_TABLE_VERSION 0xC
typedef struct __attribute__((packed, aligned(4))) {
uint32_t AccumulationCounter;
@@ -223,6 +223,10 @@ typedef struct __attribute__((packed, aligned(4))) {
// VCN/JPEG ACTIVITY
uint32_t VcnBusy[4];
uint32_t JpegBusy[32];
+
+ // PCIE LINK Speed and width
+ uint32_t PCIeLinkSpeed;
+ uint32_t PCIeLinkWidth;
} MetricsTableX_t;
typedef struct __attribute__((packed, aligned(4))) {
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width
2024-03-15 7:43 [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Asad Kamal
@ 2024-03-15 7:43 ` Asad Kamal
2024-03-15 8:45 ` [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Lazar, Lijo
1 sibling, 0 replies; 5+ messages in thread
From: Asad Kamal @ 2024-03-15 7:43 UTC (permalink / raw)
To: amd-gfx
Cc: lijo.lazar, hawking.zhang, le.ma, shiwu.zhang, asad.kamal,
donald.cheung, sepehr.khatir, daniel.oliveira, charis.poag
Report pcie link speed/width using metric table in case
of one vf & if pmfw support is available, else report directly from
registers in case of pf. Skip reporting it for other cases.
v2: Skip multi-vf check(Lijo)
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index 744c84f3029f..c1dcbbd88464 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -2229,7 +2229,15 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
gpu_metrics->gfxclk_lock_status = GET_METRIC_FIELD(GfxLockXCDMak) >> GET_INST(GC, 0);
if (!(adev->flags & AMD_IS_APU)) {
- if (!amdgpu_sriov_vf(adev)) {
+ /*Check smu version, PCIE link speed and width will be reported from pmfw metric
+ * table for both pf & one vf for smu version 85.99.0 or higher else report only
+ * for pf from registers
+ */
+ if (smu->smc_fw_version >= 0x556300) {
+ gpu_metrics->pcie_link_width = metrics_x->PCIeLinkWidth;
+ gpu_metrics->pcie_link_speed =
+ pcie_gen_to_speed(metrics_x->PCIeLinkSpeed);
+ } else if (!amdgpu_sriov_vf(adev)) {
link_width_level = smu_v13_0_6_get_current_pcie_link_width_level(smu);
if (link_width_level > MAX_LINK_WIDTH)
link_width_level = 0;
@@ -2239,6 +2247,7 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
gpu_metrics->pcie_link_speed =
smu_v13_0_6_get_current_pcie_link_speed(smu);
}
+
gpu_metrics->pcie_bandwidth_acc =
SMUQ10_ROUND(metrics_x->PcieBandwidthAcc[0]);
gpu_metrics->pcie_bandwidth_inst =
--
2.42.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers
2024-03-15 7:43 [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Asad Kamal
2024-03-15 7:43 ` [PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width Asad Kamal
@ 2024-03-15 8:45 ` Lazar, Lijo
1 sibling, 0 replies; 5+ messages in thread
From: Lazar, Lijo @ 2024-03-15 8:45 UTC (permalink / raw)
To: Asad Kamal, amd-gfx
Cc: hawking.zhang, le.ma, shiwu.zhang, donald.cheung, sepehr.khatir,
daniel.oliveira, charis.poag
On 3/15/2024 1:13 PM, Asad Kamal wrote:
> Update PMFW interface headers for updated metrics table
> with pcie link speed and pcie link width
>
> Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Series is -
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Thanks,
Lijo
> ---
> drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
> index 7b812b9994d7..0b3c2f54a343 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
> +++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
> @@ -123,7 +123,7 @@ typedef enum {
> VOLTAGE_GUARDBAND_COUNT
> } GFX_GUARDBAND_e;
>
> -#define SMU_METRICS_TABLE_VERSION 0xB
> +#define SMU_METRICS_TABLE_VERSION 0xC
>
> typedef struct __attribute__((packed, aligned(4))) {
> uint32_t AccumulationCounter;
> @@ -223,6 +223,10 @@ typedef struct __attribute__((packed, aligned(4))) {
> // VCN/JPEG ACTIVITY
> uint32_t VcnBusy[4];
> uint32_t JpegBusy[32];
> +
> + // PCIE LINK Speed and width
> + uint32_t PCIeLinkSpeed;
> + uint32_t PCIeLinkWidth;
> } MetricsTableX_t;
>
> typedef struct __attribute__((packed, aligned(4))) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers
@ 2024-10-09 12:14 Asad Kamal
0 siblings, 0 replies; 5+ messages in thread
From: Asad Kamal @ 2024-10-09 12:14 UTC (permalink / raw)
To: amd-gfx, lijo.lazar
Cc: le.ma, hawking.zhang, shiwu.zhang, Asad.Kamal, charis.poag,
donald.cheung, sepehr.khatir, daniel.oliveira
Update pmfw headers for smuv13.0.6 to version 0xE
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
index 822c6425d90e..0f96b8c59a0e 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
@@ -123,7 +123,7 @@ typedef enum {
VOLTAGE_GUARDBAND_COUNT
} GFX_GUARDBAND_e;
-#define SMU_METRICS_TABLE_VERSION 0xD
+#define SMU_METRICS_TABLE_VERSION 0xE
typedef struct __attribute__((packed, aligned(4))) {
uint32_t AccumulationCounter;
@@ -231,6 +231,9 @@ typedef struct __attribute__((packed, aligned(4))) {
// PER XCD ACTIVITY
uint32_t GfxBusy[8];
uint64_t GfxBusyAcc[8];
+
+ //PCIE BW Data and error count
+ uint32_t PCIeOtherEndRecoveryAcc; // The Pcie counter itself is accumulated
} MetricsTableX_t;
typedef struct __attribute__((packed, aligned(4))) {
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers
@ 2023-08-16 12:32 Asad Kamal
0 siblings, 0 replies; 5+ messages in thread
From: Asad Kamal @ 2023-08-16 12:32 UTC (permalink / raw)
To: amd-gfx; +Cc: le.ma, Lijo Lazar, asad.kamal, shiwu.zhang, hawking.zhang
Update PMFW interface headers for updated metrics table and
critical temperature message
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
---
.../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h | 4 ++--
.../amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 16 +++++++++++++++-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
index 252aef190c5c..9be4051c0865 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h
@@ -123,7 +123,7 @@ typedef enum {
VOLTAGE_GUARDBAND_COUNT
} GFX_GUARDBAND_e;
-#define SMU_METRICS_TABLE_VERSION 0x5
+#define SMU_METRICS_TABLE_VERSION 0x7
typedef struct __attribute__((packed, aligned(4))) {
uint32_t AccumulationCounter;
@@ -198,7 +198,7 @@ typedef struct __attribute__((packed, aligned(4))) {
uint32_t SocketThmResidencyAcc;
uint32_t VrThmResidencyAcc;
uint32_t HbmThmResidencyAcc;
- uint32_t spare;
+ uint32_t GfxLockXCDMak;
// New Items at end to maintain driver compatibility
uint32_t GfxclkFrequency[8];
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h
index ae4f44c4b877..70a4a717fd3f 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h
@@ -83,13 +83,27 @@
#define PPSMC_MSG_GetMinGfxDpmFreq 0x32
#define PPSMC_MSG_GetMaxGfxDpmFreq 0x33
#define PPSMC_MSG_PrepareForDriverUnload 0x34
-#define PPSMC_Message_Count 0x35
+#define PPSMC_MSG_ReadThrottlerLimit 0x35
+#define PPSMC_MSG_QueryValidMcaCount 0x36
+#define PPSMC_MSG_McaBankDumpDW 0x37
+#define PPSMC_MSG_GetCTFLimit 0x38
+#define PPSMC_Message_Count 0x39
//PPSMC Reset Types for driver msg argument
#define PPSMC_RESET_TYPE_DRIVER_MODE_1_RESET 0x1
#define PPSMC_RESET_TYPE_DRIVER_MODE_2_RESET 0x2
#define PPSMC_RESET_TYPE_DRIVER_MODE_3_RESET 0x3
+//PPSMC Reset Types for driver msg argument
+#define PPSMC_THROTTLING_LIMIT_TYPE_SOCKET 0x1
+#define PPSMC_THROTTLING_LIMIT_TYPE_HBM 0x2
+
+//CTF/Throttle Limit types
+#define PPSMC_AID_THM_TYPE 0x1
+#define PPSMC_CCD_THM_TYPE 0x2
+#define PPSMC_XCD_THM_TYPE 0x3
+#define PPSMC_HBM_THM_TYPE 0x4
+
typedef uint32_t PPSMC_Result;
typedef uint32_t PPSMC_MSG;
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-09 12:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-15 7:43 [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Asad Kamal
2024-03-15 7:43 ` [PATCH v2 2/2] drm/amd/pm: Use metric table for pcie speed/width Asad Kamal
2024-03-15 8:45 ` [PATCH v2 1/2] drm/amd/pm: Update SMUv13.0.6 PMFW headers Lazar, Lijo
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 12:14 Asad Kamal
2023-08-16 12:32 Asad Kamal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox