Skip to contentSkip to conversation

drm/amd/powerplay: change metrics update period from 1ms to 100ms

PATCH In review Wang, Kevin(Yang) 2 participants 2 messages Sep 26, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amd/powerplay: change metrics update period from 1ms to 100ms

v2:
change period from 10ms to 100ms (typo error)

too high frequence to update mertrics table will cause smu firmware error,so change mertrics table update period from 1ms to 100ms (navi10, 12, 14)

---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +1 -1
index 4c28aadef504..0a44aa81d435 100644
@@ -548,7 +548,7 @@ static int navi10_get_metrics_table(struct smu_context *smu,
 	struct smu_table_context *smu_table= &smu->smu_table;
 	int ret = 0;
 
-	if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
+	if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {
 		ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
 				(void *)smu_table->metrics_table, false);
 		if (ret) {
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Kenneth Feng
#2 lore raw

Note: 1ms works for navi10 but 100ms works for navi14.

-----Original Message-----
From: Wang, Kevin(Yang)
Sent: Thursday, September 26, 2019 5:14 PM
To: [email protected]
Cc: Huang, Ray <[email protected]>; Feng, Kenneth <[email protected]>; Wang, Kevin(Yang) <[email protected]>
Subject: [PATCH v2] drm/amd/powerplay: change metrics update period from 1ms to 100ms

v2:
change period from 10ms to 100ms (typo error)

too high frequence to update mertrics table will cause smu firmware error,so change mertrics table update period from 1ms to 100ms (navi10, 12, 14)

---
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +2 -1
index 4c28aadef504..0a44aa81d435 100644
@@ -548,7 +548,7 @@ static int navi10_get_metrics_table(struct smu_context *smu,
 	struct smu_table_context *smu_table= &smu->smu_table;
 	int ret = 0;
 
-	if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
+	if (!smu_table->metrics_time || time_after(jiffies, 
+smu_table->metrics_time + msecs_to_jiffies(100))) {
 		ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
 				(void *)smu_table->metrics_table, false);

if (ret) {
--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx