Skip to contentSkip to conversation

drm/amd/powerplay: refine dmesg info under powerplay.

PATCH In review Rex Zhu 2 participants 3 messages Aug 8, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/2 drm/amd/powerplay: refine dmesg info under powerplay.

Use pr_debug to prevent spamming unimportant dmesg.

Change-Id Iaad1d4987ea30a9737a9fe13b0672c2fde749b90
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c        | 13 ++++++-------
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c |  2 +-
 2 files changed, 7 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +6 -7
index 27fe108..1a70075 100644
@@ -557,9 +557,8 @@ uint16_t phm_find_closest_vddci(struct pp_atomctrl_voltage_table *vddci_table, u
 			return vddci_table->entries[i].value;
 	}
 
-	PP_ASSERT_WITH_CODE(false,
-			"VDDCI is larger than max VDDCI in VDDCI Voltage Table!",
-			return vddci_table->entries[i-1].value);
+	pr_debug("vddci is larger than max value in vddci_table\n");
+	return vddci_table->entries[i-1].value;
 }
 
 int phm_find_boot_level(void *table,
@@ -597,10 +596,10 @@ int phm_get_sclk_for_voltage_evv(struct pp_hwmgr *hwmgr,
 			break;
 	}
 
-	PP_ASSERT_WITH_CODE(entryId < table_info->vdd_dep_on_sclk->count,
-			"Can't find requested voltage id in vdd_dep_on_sclk table!",
-			return -EINVAL;
-			);
+	if (entryId >= table_info->vdd_dep_on_sclk->count) {
+		pr_debug("Can't find requested voltage id in vdd_dep_on_sclk table\n");
+		return -EINVAL;
+	}
 
 	*sclk = table_info->vdd_dep_on_sclk->entries[entryId].clk;
 
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1 -1
index b0e6e12..0e7be87 100644
@@ -4161,7 +4161,7 @@ static int vega10_notify_smc_display_config_after_ps_adjustment(
 			pr_info("Attempt to set Hard Min for DCEFCLK Failed!");
 		}
 	} else {
-		pr_info("Cannot find requested DCEFCLK!");
+		pr_debug("Cannot find requested DCEFCLK!");
 	}
 
 	if (min_clocks.memoryClock != 0) {
Signature · 6 lines
1.9.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): 1502166243-1874-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amd/powerplay: fix coding style in hwmgr.c

Change-Id I1f31f90b9ed137eac72a7947f07f2d03af16cc7c
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +7 -7
index 1a70075..6eed634 100644
@@ -582,26 +582,26 @@ int phm_get_sclk_for_voltage_evv(struct pp_hwmgr *hwmgr,
 	phm_ppt_v1_voltage_lookup_table *lookup_table,
 	uint16_t virtual_voltage_id, int32_t *sclk)
 {
-	uint8_t entryId;
-	uint8_t voltageId;
+	uint8_t entry_id;
+	uint8_t voltage_id;
 	struct phm_ppt_v1_information *table_info =
 			(struct phm_ppt_v1_information *)(hwmgr->pptable);
 
 	PP_ASSERT_WITH_CODE(lookup_table->count != 0, "Lookup table is empty", return -EINVAL);
 
 	/* search for leakage voltage ID 0xff01 ~ 0xff08 and sckl */
-	for (entryId = 0; entryId < table_info->vdd_dep_on_sclk->count; entryId++) {
-		voltageId = table_info->vdd_dep_on_sclk->entries[entryId].vddInd;
-		if (lookup_table->entries[voltageId].us_vdd == virtual_voltage_id)
+	for (entry_id = 0; entry_id < table_info->vdd_dep_on_sclk->count; entry_id++) {
+		voltage_id = table_info->vdd_dep_on_sclk->entries[entry_id].vddInd;
+		if (lookup_table->entries[voltage_id].us_vdd == virtual_voltage_id)
 			break;
 	}
 
-	if (entryId >= table_info->vdd_dep_on_sclk->count) {
+	if (entry_id >= table_info->vdd_dep_on_sclk->count) {
 		pr_debug("Can't find requested voltage id in vdd_dep_on_sclk table\n");
 		return -EINVAL;
 	}
 
-	*sclk = table_info->vdd_dep_on_sclk->entries[entryId].clk;
+	*sclk = table_info->vdd_dep_on_sclk->entries[entry_id].clk;
 
 	return 0;
 }
Signature · 6 lines
1.9.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): 1502166243-1874-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#4 lore raw

RE: [PATCH 2/2] drm/amd/powerplay: fix coding style in hwmgr.c

Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Tuesday, August 08, 2017 12:24 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 2/2] drm/amd/powerplay: fix coding style in hwmgr.c

Change-Id I1f31f90b9ed137eac72a7947f07f2d03af16cc7c

Series is:

Quoted 56 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +6 -6
index 1a70075..6eed634 100644
@@ -582,26 +582,26 @@ int phm_get_sclk_for_voltage_evv(struct
 pp_hwmgr *hwmgr,
 	phm_ppt_v1_voltage_lookup_table *lookup_table,
 	uint16_t virtual_voltage_id, int32_t *sclk)
 {
-	uint8_t entryId;
-	uint8_t voltageId;
+	uint8_t entry_id;
+	uint8_t voltage_id;
 	struct phm_ppt_v1_information *table_info =
 			(struct phm_ppt_v1_information *)(hwmgr-
 >pptable);
 
 	PP_ASSERT_WITH_CODE(lookup_table->count != 0, "Lookup table is
 empty", return -EINVAL);
 
 	/* search for leakage voltage ID 0xff01 ~ 0xff08 and sckl */
-	for (entryId = 0; entryId < table_info->vdd_dep_on_sclk->count;
 entryId++) {
-		voltageId = table_info->vdd_dep_on_sclk-
 >entries[entryId].vddInd;
-		if (lookup_table->entries[voltageId].us_vdd ==
 virtual_voltage_id)
+	for (entry_id = 0; entry_id < table_info->vdd_dep_on_sclk->count;
 entry_id++) {
+		voltage_id = table_info->vdd_dep_on_sclk-
 >entries[entry_id].vddInd;
+		if (lookup_table->entries[voltage_id].us_vdd ==
 virtual_voltage_id)
 			break;
 	}
 
-	if (entryId >= table_info->vdd_dep_on_sclk->count) {
+	if (entry_id >= table_info->vdd_dep_on_sclk->count) {
 		pr_debug("Can't find requested voltage id in

vdd_dep_on_sclk table\n");

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
 		return -EINVAL;
 	}
 
-	*sclk = table_info->vdd_dep_on_sclk->entries[entryId].clk;
+	*sclk = table_info->vdd_dep_on_sclk->entries[entry_id].clk;
 
 	return 0;
 }
--

1.9.1

Quoted 4 lines

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

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