Skip to contentSkip to conversation

rename file name.

PATCH In review Rex Zhu 3 participants 6 messages Sep 12, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

cover rename file name.

As tonga/fiji/polaris10/11 use ppt table version 1. so rename tonga_processtable to process_pptables_v1_0

Rex Zhu (3):
drm/amd/powerplay: rename tonga_processpptable* to

    processpptable_v1_0*.

drm/amd/powerplay: add pp_table_version in hwmgr. drm/amd/powerplay: add pptable point check before use it

 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |    2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c   |   10 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c        |    4 +-
 .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c  |   10 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h |  436 +++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.c    | 1326 ++++++++++++++++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.h    |   35 +
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c  |   10 +-
 .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h    |  436 -------
 .../amd/powerplay/hwmgr/tonga_processpptables.c    | 1326 --------------------
 .../amd/powerplay/hwmgr/tonga_processpptables.h    |   35 -
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h          |    8 +
 12 files changed, 1824 insertions(+), 1814 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.h
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#2 lore raw

PATCH 1/3 drm/amd/powerplay: rename tonga_processpptable* to processpptable_v1_0*.

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |    2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c   |   10 +-
 .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c  |   10 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h |  436 +++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.c    | 1326 ++++++++++++++++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.h    |   35 +
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c  |   10 +-
 .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h    |  436 -------
 .../amd/powerplay/hwmgr/tonga_processpptables.c    | 1326 --------------------
 .../amd/powerplay/hwmgr/tonga_processpptables.h    |   35 -
 10 files changed, 1813 insertions(+), 1813 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.h
drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +1 -1
index abbcbc9..6e359c9 100644
@@ -5,7 +5,7 @@
 HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \
 	       hardwaremanager.o pp_acpi.o cz_hwmgr.o \
                cz_clockpowergating.o tonga_powertune.o\
-	       tonga_processpptables.o ppatomctrl.o \
+	       process_pptables_v1_0.o ppatomctrl.o \
                tonga_hwmgr.o pppcielanes.o  tonga_thermal.o\
                fiji_powertune.o fiji_hwmgr.o tonga_clockpowergating.o \
                fiji_clockpowergating.o fiji_thermal.o \
drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c +5 -5
index e93492b..c5ef3ec 100644
@@ -45,8 +45,8 @@
 #include "dce/dce_10_0_sh_mask.h"
 #include "pppcielanes.h"
 #include "fiji_hwmgr.h"
-#include "tonga_processpptables.h"
-#include "tonga_pptable.h"
+#include "process_pptables_v1_0.h"
+#include "pptable_v1_0.h"
 #include "pp_debug.h"
 #include "pp_acpi.h"
 #include "amd_pcie_helpers.h"
@@ -4006,7 +4006,7 @@ static int fiji_get_pp_table_entry(struct pp_hwmgr *hwmgr,
 
 	ps = (struct fiji_power_state *)(&state->hardware);
 
-	result = tonga_get_powerplay_table_entry(hwmgr, entry_index, state,
+	result = get_powerplay_table_entry_v1_0(hwmgr, entry_index, state,
 			fiji_get_pp_table_entry_callback_func);
 
 	/* This is the earliest time we have all the dependency table and the VBIOS boot state
@@ -5548,7 +5548,7 @@ static const struct pp_hwmgr_func fiji_hwmgr_funcs = {
 	.dynamic_state_management_enable = &fiji_enable_dpm_tasks,
 	.dynamic_state_management_disable = &fiji_disable_dpm_tasks,
 	.force_dpm_level = &fiji_dpm_force_dpm_level,
-	.get_num_of_pp_table_entries = &tonga_get_number_of_powerplay_table_entries,
+	.get_num_of_pp_table_entries = &get_number_of_powerplay_table_entries_v1_0,
 	.get_power_state_size = &fiji_get_power_state_size,
 	.get_pp_table_entry = &fiji_get_pp_table_entry,
 	.patch_boot_state = &fiji_patch_boot_state,
@@ -5590,7 +5590,7 @@ static const struct pp_hwmgr_func fiji_hwmgr_funcs = {
 int fiji_hwmgr_init(struct pp_hwmgr *hwmgr)
 {
 	hwmgr->hwmgr_func = &fiji_hwmgr_funcs;
-	hwmgr->pptable_func = &tonga_pptable_funcs;
+	hwmgr->pptable_func = &pptable_v1_0_funcs;
 	pp_fiji_thermal_initialize(hwmgr);
 	return 0;
 }
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c +5 -5
index be90a19..5542253 100644
@@ -34,11 +34,11 @@
 #include "pp_debug.h"
 #include "ppatomctrl.h"
 #include "atombios.h"
-#include "tonga_pptable.h"
+#include "pptable_v1_0.h"
 #include "pppcielanes.h"
 #include "amd_pcie_helpers.h"
 #include "hardwaremanager.h"
-#include "tonga_processpptables.h"
+#include "process_pptables_v1_0.h"
 #include "cgs_common.h"
 #include "smu74.h"
 #include "smu_ucode_xfer_vi.h"
@@ -3895,7 +3895,7 @@ static int polaris10_get_pp_table_entry(struct pp_hwmgr *hwmgr,
 
 	ps = (struct polaris10_power_state *)(&state->hardware);
 
-	result = tonga_get_powerplay_table_entry(hwmgr, entry_index, state,
+	result = get_powerplay_table_entry_v1_0(hwmgr, entry_index, state,
 			polaris10_get_pp_table_entry_callback_func);
 
 	/* This is the earliest time we have all the dependency table and the VBIOS boot state
@@ -5240,7 +5240,7 @@ static const struct pp_hwmgr_func polaris10_hwmgr_funcs = {
 	.get_sclk = polaris10_dpm_get_sclk,
 	.patch_boot_state = polaris10_dpm_patch_boot_state,
 	.get_pp_table_entry = polaris10_get_pp_table_entry,
-	.get_num_of_pp_table_entries = tonga_get_number_of_powerplay_table_entries,
+	.get_num_of_pp_table_entries = get_number_of_powerplay_table_entries_v1_0,
 	.print_current_perforce_level = polaris10_print_current_perforce_level,
 	.powerdown_uvd = polaris10_phm_powerdown_uvd,
 	.powergate_uvd = polaris10_phm_powergate_uvd,
@@ -5277,7 +5277,7 @@ static const struct pp_hwmgr_func polaris10_hwmgr_funcs = {
 int polaris10_hwmgr_init(struct pp_hwmgr *hwmgr)
 {
 	hwmgr->hwmgr_func = &polaris10_hwmgr_funcs;
-	hwmgr->pptable_func = &tonga_pptable_funcs;
+	hwmgr->pptable_func = &pptable_v1_0_funcs;
 	pp_polaris10_thermal_initialize(hwmgr);
 
 	return 0;
drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h new file +436 -0

436 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c new file +1326 -0

1,326 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.h new file +35 -0
new file mode 100644
index 0000000..b9710ab
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+#ifndef _PROCESSPPTABLES_V1_0_H
+#define _PROCESSPPTABLES_V1_0_H
+
+#include "hwmgr.h"
+
+extern const struct pp_table_func pptable_v1_0_funcs;
+extern int get_number_of_powerplay_table_entries_v1_0(struct pp_hwmgr *hwmgr);
+extern int get_powerplay_table_entry_v1_0(struct pp_hwmgr *hwmgr, uint32_t entry_index,
+		struct pp_power_state *power_state, int (*call_back_func)(struct pp_hwmgr *, void *,
+				struct pp_power_state *, void *, uint32_t));
+
+#endif
+
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c +5 -5
index 57b9b01..a4e9df7 100644
@@ -30,8 +30,8 @@
 #include "tonga_hwmgr.h"
 #include "pptable.h"
 #include "processpptables.h"
-#include "tonga_processpptables.h"
-#include "tonga_pptable.h"
+#include "process_pptables_v1_0.h"
+#include "pptable_v1_0.h"
 #include "pp_debug.h"
 #include "tonga_ppsmc.h"
 #include "cgs_common.h"
@@ -5166,7 +5166,7 @@ static int tonga_get_pp_table_entry(struct pp_hwmgr *hwmgr,
 
 	tonga_ps = cast_phw_tonga_power_state(&(ps->hardware));
 
-	result = tonga_get_powerplay_table_entry(hwmgr, entry_index, ps,
+	result = get_powerplay_table_entry_v1_0(hwmgr, entry_index, ps,
 			tonga_get_pp_table_entry_callback_func);
 
 	/* This is the earliest time we have all the dependency table and the VBIOS boot state
@@ -6330,7 +6330,7 @@ static const struct pp_hwmgr_func tonga_hwmgr_funcs = {
 	.get_sclk = tonga_dpm_get_sclk,
 	.patch_boot_state = tonga_dpm_patch_boot_state,
 	.get_pp_table_entry = tonga_get_pp_table_entry,
-	.get_num_of_pp_table_entries = tonga_get_number_of_powerplay_table_entries,
+	.get_num_of_pp_table_entries = get_number_of_powerplay_table_entries_v1_0,
 	.print_current_perforce_level = tonga_print_current_perforce_level,
 	.powerdown_uvd = tonga_phm_powerdown_uvd,
 	.powergate_uvd = tonga_phm_powergate_uvd,
@@ -6366,7 +6366,7 @@ static const struct pp_hwmgr_func tonga_hwmgr_funcs = {
 int tonga_hwmgr_init(struct pp_hwmgr *hwmgr)
 {
 	hwmgr->hwmgr_func = &tonga_hwmgr_funcs;
-	hwmgr->pptable_func = &tonga_pptable_funcs;
+	hwmgr->pptable_func = &pptable_v1_0_funcs;
 	pp_tonga_thermal_initialize(hwmgr);
 	return 0;
 }
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h deleted +0 -436

436 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c deleted +0 -1326

654 lines not on this page · raw message

drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.h deleted +0 -35
deleted file mode 100644
index d24b888..0000000

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
1.9.1

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

Part of the diff is not shown here. View the raw message.

author
#3 lore raw

PATCH 2/3 drm/amd/powerplay: add pp_table_version in hwmgr.

In reply to a message not in the archive
Change-Id Iee3c7ab9c1318ec7206bf5a5ae59d8c48b8e823b
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 +
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h   | 8 ++++++++
 2 files changed, 9 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
index 2d72e06..82427fb 100644
@@ -67,6 +67,7 @@ int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
 	hwmgr->chip_id = pp_init->chip_id;
 	hwmgr->usec_timeout = AMD_MAX_USEC_TIMEOUT;
 	hwmgr->power_source = PP_PowerSource_AC;
+	hwmgr->pp_table_version = PP_TABLE_V1;
 
 	hwmgr_init_default_caps(hwmgr);
 	hwmgr_set_user_specify_caps(hwmgr);
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +8 -0
index 7caf8d0..e987483 100644
@@ -599,6 +599,13 @@ enum PP_VCE_LEVEL {
 };
 
 
+enum PP_TABLE_VERSION {
+	PP_TABLE_V0 = 0,
+	PP_TABLE_V1,
+	PP_TABLE_V2,
+	PP_TABLE_MAX
+};
+
 /**
  * The main hardware manager structure.
  */
@@ -606,6 +613,7 @@ struct pp_hwmgr {
 	uint32_t chip_family;
 	uint32_t chip_id;
 
+	uint32_t pp_table_version;
 	void *device;
 	struct pp_smumgr *smumgr;
 	const void *soft_pp_table;
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#4 lore raw

PATCH 3/3 drm/amd/powerplay: add pptable point check before use it

In reply to a message not in the archive
Change-Id Ibad281cd7fd660abe612894df82be284c9b865a9
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -1
index 82427fb..1b3151c 100644
@@ -555,7 +555,8 @@ int phm_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr
 		table_clk_vlt->entries[2].v = 810;
 		table_clk_vlt->entries[3].clk = PP_DAL_POWERLEVEL_PERFORMANCE;
 		table_clk_vlt->entries[3].v = 900;
-		pptable_info->vddc_dep_on_dal_pwrl = table_clk_vlt;
+		if (pptable_info != NULL)
+			pptable_info->vddc_dep_on_dal_pwrl = table_clk_vlt;
 		hwmgr->dyn_state.vddc_dep_on_dal_pwrl = table_clk_vlt;
 	}
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#5 lore raw
In reply to a message not in the archive

This series is,

Quoted 21 lines · Rex Zhu

As tonga/fiji/polaris10/11 use ppt table version 1. so rename tonga_processtable to process_pptables_v1_0

Rex Zhu (3):
drm/amd/powerplay: rename tonga_processpptable* to

    processpptable_v1_0*.

drm/amd/powerplay: add pp_table_version in hwmgr. drm/amd/powerplay: add pptable point check before use it

 drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |    2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c   |   10 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c        |    4 +-
 .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c  |   10 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h |  436 +++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.c    | 1326 ++++++++++++++++++++
 .../amd/powerplay/hwmgr/process_pptables_v1_0.h    |   35 +
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c  |   10 +-
 .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h    |  436 -------
 .../amd/powerplay/hwmgr/tonga_processpptables.c    | 1326 --------------------
 .../amd/powerplay/hwmgr/tonga_processpptables.h    |   35 -
Quoted 9 lines
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h          |    8 +
 12 files changed, 1824 insertions(+), 1814 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
 create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
 delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.h

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

#7 lore raw
In reply to a message not in the archive

Am 12.09.2016 um 10:36 schrieb Edward O'Callaghan:

Quoted 2 lines

This series is,

Quoted 34 lines · Rex Zhu
Quoted 23 lines

As tonga/fiji/polaris10/11 use ppt table version 1. so rename tonga_processtable to process_pptables_v1_0

Rex Zhu (3):
drm/amd/powerplay: rename tonga_processpptable* to

     processpptable_v1_0*.

drm/amd/powerplay: add pp_table_version in hwmgr. drm/amd/powerplay: add pptable point check before use it

  drivers/gpu/drm/amd/powerplay/hwmgr/Makefile       |    2 +-
  drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c   |   10 +-
  drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c        |    4 +-
  .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c  |   10 +-
  drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h |  436 +++++++
  .../amd/powerplay/hwmgr/process_pptables_v1_0.c    | 1326 ++++++++++++++++++++
  .../amd/powerplay/hwmgr/process_pptables_v1_0.h    |   35 +
  drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c  |   10 +-
  .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h    |  436 -------
  .../amd/powerplay/hwmgr/tonga_processpptables.c    | 1326 --------------------
  .../amd/powerplay/hwmgr/tonga_processpptables.h    |   35 -
  drivers/gpu/drm/amd/powerplay/inc/hwmgr.h          |    8 +
  12 files changed, 1824 insertions(+), 1814 deletions(-)
Quoted 7 lines

create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.h delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c delete mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.h

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