Skip to contentSkip to conversation

drm/amd/pm: Increase cache interval time

PATCH Superseded Asad Kamal 3 participants 3 messages Aug 5, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Asad Kamal

author
#0 lore raw

PATCH 1/1 drm/amd/pm: Increase cache interval time

Increase cache interval time to 50 ms while fetching system metrics table for smu_v13_0_12

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +1 -1
index fca50f6a8ef6..2ee61c7e8bc8 100644
@@ -372,7 +372,7 @@ static int smu_v13_0_12_get_system_metrics_table(struct smu_context *smu, void *
 	if (bypass_cache || !smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time ||
 	    time_after(jiffies,
 		       smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time +
-		       msecs_to_jiffies(1))) {
+		       msecs_to_jiffies(50))) {
 		ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetSystemMetricsTable, NULL);
 		if (ret) {
 			dev_info(smu->adev->dev,
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Asad Kamal

Increase cache interval time to 50 ms while fetching system metrics table for smu_v13_0_12

You may add additional info in commit description like this data is expected to be polled less frequently.

Thanks,
Lijo

Quoted 17 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +1 -1
index fca50f6a8ef6..2ee61c7e8bc8 100644
@@ -372,7 +372,7 @@ static int smu_v13_0_12_get_system_metrics_table(struct smu_context *smu, void *
 	if (bypass_cache || !smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time ||
 	    time_after(jiffies,
 		       smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time +
-		       msecs_to_jiffies(1))) {
+		       msecs_to_jiffies(50))) {
 		ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetSystemMetricsTable, NULL);
 		if (ret) {
 			dev_info(smu->adev->dev,
#2 lore raw
In reply to Asad Kamal
Quoted 4 lines · Asad Kamal

Increase cache interval time to 50 ms while fetching system metrics table for smu_v13_0_12

Can we move the caching up to the device independent level? It would be nice to have this for other GPUs.

Alex

Quoted 21 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +1 -2
index fca50f6a8ef6..2ee61c7e8bc8 100644
@@ -372,7 +372,7 @@ static int smu_v13_0_12_get_system_metrics_table(struct smu_context *smu, void *
        if (bypass_cache || !smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time ||
            time_after(jiffies,
                       smu_table->tables[SMU_TABLE_TEMP_METRICS].metrics_time +
-                      msecs_to_jiffies(1))) {
+                      msecs_to_jiffies(50))) {
                ret = smu_cmn_send_smc_msg(smu, SMU_MSG_GetSystemMetricsTable, NULL);
                if (ret) {
                        dev_info(smu->adev->dev,
--

2.46.0