Skip to contentSkip to conversation

drm/amd/powerplay: Allow duplicate enteries in pptable.

PATCH In review Rex Zhu 2 participants 2 messages May 2, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: Allow duplicate enteries in pptable.

Change-Id Iae711f1a33264c44a6819f78e345aba50456861f
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +4 -4
index f72d5a7..b474129 100644
@@ -1137,7 +1137,7 @@ static void vega10_setup_default_single_dpm_table(struct pp_hwmgr *hwmgr,
 	int i;
 
 	for (i = 0; i < dep_table->count; i++) {
-		if (i == 0 || dpm_table->dpm_levels[dpm_table->count - 1].value !=
+		if (i == 0 || dpm_table->dpm_levels[dpm_table->count - 1].value <=
 				dep_table->entries[i].clk) {
 			dpm_table->dpm_levels[dpm_table->count].value =
 					dep_table->entries[i].clk;
@@ -1274,7 +1274,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
 	dpm_table = &(data->dpm_table.eclk_table);
 	for (i = 0; i < dep_mm_table->count; i++) {
 		if (i == 0 || dpm_table->dpm_levels
-				[dpm_table->count - 1].value !=
+				[dpm_table->count - 1].value <=
 						dep_mm_table->entries[i].eclk) {
 			dpm_table->dpm_levels[dpm_table->count].value =
 					dep_mm_table->entries[i].eclk;
@@ -1290,7 +1290,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
 	dpm_table = &(data->dpm_table.vclk_table);
 	for (i = 0; i < dep_mm_table->count; i++) {
 		if (i == 0 || dpm_table->dpm_levels
-				[dpm_table->count - 1].value !=
+				[dpm_table->count - 1].value <=
 						dep_mm_table->entries[i].vclk) {
 			dpm_table->dpm_levels[dpm_table->count].value =
 					dep_mm_table->entries[i].vclk;
@@ -1304,7 +1304,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
 	dpm_table = &(data->dpm_table.dclk_table);
 	for (i = 0; i < dep_mm_table->count; i++) {
 		if (i == 0 || dpm_table->dpm_levels
-				[dpm_table->count - 1].value !=
+				[dpm_table->count - 1].value <=
 						dep_mm_table->entries[i].dclk) {
 			dpm_table->dpm_levels[dpm_table->count].value =
 					dep_mm_table->entries[i].dclk;
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): 1493707275-27835-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 2 lines · Rex Zhu
Change-Id Iae711f1a33264c44a6819f78e345aba50456861f
Quoted 47 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +4 -5
index f72d5a7..b474129 100644
@@ -1137,7 +1137,7 @@ static void vega10_setup_default_single_dpm_table(struct pp_hwmgr *hwmgr,
        int i;
 
        for (i = 0; i < dep_table->count; i++) {
-               if (i == 0 || dpm_table->dpm_levels[dpm_table->count - 1].value !=
+               if (i == 0 || dpm_table->dpm_levels[dpm_table->count - 1].value <=
                                dep_table->entries[i].clk) {
                        dpm_table->dpm_levels[dpm_table->count].value =
                                        dep_table->entries[i].clk;
@@ -1274,7 +1274,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
        dpm_table = &(data->dpm_table.eclk_table);
        for (i = 0; i < dep_mm_table->count; i++) {
                if (i == 0 || dpm_table->dpm_levels
-                               [dpm_table->count - 1].value !=
+                               [dpm_table->count - 1].value <=
                                                dep_mm_table->entries[i].eclk) {
                        dpm_table->dpm_levels[dpm_table->count].value =
                                        dep_mm_table->entries[i].eclk;
@@ -1290,7 +1290,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
        dpm_table = &(data->dpm_table.vclk_table);
        for (i = 0; i < dep_mm_table->count; i++) {
                if (i == 0 || dpm_table->dpm_levels
-                               [dpm_table->count - 1].value !=
+                               [dpm_table->count - 1].value <=
                                                dep_mm_table->entries[i].vclk) {
                        dpm_table->dpm_levels[dpm_table->count].value =
                                        dep_mm_table->entries[i].vclk;
@@ -1304,7 +1304,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
        dpm_table = &(data->dpm_table.dclk_table);
        for (i = 0; i < dep_mm_table->count; i++) {
                if (i == 0 || dpm_table->dpm_levels
-                               [dpm_table->count - 1].value !=
+                               [dpm_table->count - 1].value <=
                                                dep_mm_table->entries[i].dclk) {
                        dpm_table->dpm_levels[dpm_table->count].value =
                                        dep_mm_table->entries[i].dclk;
--

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