After modifying navi10 in previous commit, extend the changes so all implementations of
 pp_hwmgr_func->get_power_profile_mode and pptable_funcs->get_power_profile_mode use
 amdgpu_pp_profile_name
 == Test ==
 LOGFILE=pp_profile_strings.test.log
 AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
 AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | awk '{print $9}'`
 HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
 lspci -nn | grep "VGA\|Display"  > $LOGFILE
 FILES="pp_power_profile_mode "
 for f in $FILES
 do
   echo === $f === >> $LOGFILE
   cat $HWMON_DIR/device/$f >> $LOGFILE
 done
 cat $LOGFILE
Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
                                                {70, 90, 0, 0,},
                                                {30, 60, 0, 6,},
                                                };
-       static const char *profile_name[6] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE"};
        static const char *title[6] = {"NUM",
                        "MODE_NAME",
                        "BUSY_SET_POINT",
 
        for (i = 0; i <= PP_SMC_POWER_PROFILE_COMPUTE; i++)
                size += sysfs_emit_at(buf, size, "%3d %14s%s: %14d %3d %10d %14d\n",
-                       i, profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
+                       i, amdgpu_pp_profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
                        profile_mode_setting[i][0], profile_mode_setting[i][1],
                        profile_mode_setting[i][2], profile_mode_setting[i][3]);
 
 
        uint32_t i, size = 0;
        uint32_t len;
 
-       static const char *profile_name[7] = {"BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
-
        static const char *title[8] = {"NUM",
                        "MODE_NAME",
                        "SCLK_UP_HYST",
        for (i = 0; i < len; i++) {
                if (i == hwmgr->power_profile_mode) {
                        size += sysfs_emit_at(buf, size, "%3d %14s %s: %8d %16d %16d %16d %16d %16d\n",
-                       i, profile_name[i], "*",
+                       i, amdgpu_pp_profile_name[i], "*",
                        data->current_profile_setting.sclk_up_hyst,
                        data->current_profile_setting.sclk_down_hyst,
                        data->current_profile_setting.sclk_activity,
                }
                if (smu7_profiling[i].bupdate_sclk)
                        size += sysfs_emit_at(buf, size, "%3d %16s: %8d %16d %16d ",
-                       i, profile_name[i], smu7_profiling[i].sclk_up_hyst,
+                       i, amdgpu_pp_profile_name[i], smu7_profiling[i].sclk_up_hyst,
                        smu7_profiling[i].sclk_down_hyst,
                        smu7_profiling[i].sclk_activity);
                else
                        size += sysfs_emit_at(buf, size, "%3d %16s: %8s %16s %16s ",
-                       i, profile_name[i], "-", "-", "-");
+                       i, amdgpu_pp_profile_name[i], "-", "-", "-");
 
                if (smu7_profiling[i].bupdate_mclk)
                        size += sysfs_emit_at(buf, size, "%16d %16d %16d\n",
 
                                                {70, 90, 0, 0,},
                                                {30, 60, 0, 6,},
                                                };
-       static const char *profile_name[7] = {"BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        static const char *title[6] = {"NUM",
                        "MODE_NAME",
                        "BUSY_SET_POINT",
 
        for (i = 0; i < PP_SMC_POWER_PROFILE_CUSTOM; i++)
                size += sysfs_emit_at(buf, size, "%3d %14s%s: %14d %3d %10d %14d\n",
-                       i, profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
+                       i, amdgpu_pp_profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
                        profile_mode_setting[i][0], profile_mode_setting[i][1],
                        profile_mode_setting[i][2], profile_mode_setting[i][3]);
+
        size += sysfs_emit_at(buf, size, "%3d %14s%s: %14d %3d %10d %14d\n", i,
-                       profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
+                       amdgpu_pp_profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ",
                        data->custom_profile_mode[0], data->custom_profile_mode[1],
                        data->custom_profile_mode[2], data->custom_profile_mode[3]);
        return size;
 
        DpmActivityMonitorCoeffInt_t activity_monitor;
        uint32_t i, size = 0;
        uint16_t workload_type = 0;
-       static const char *profile_name[] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        static const char *title[] = {
                        "PROFILE_INDEX(NAME)",
                        "CLOCK_TYPE(NAME)",
                                return result);
 
                size += sysfs_emit_at(buf, size, "%2d %14s%s:\n",
-                       i, profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ");
+                       i, amdgpu_pp_profile_name[i], (i == hwmgr->power_profile_mode) ? "*" : " ");
 
                size += sysfs_emit_at(buf, size, "%19s %d(%13s) %7d %7d %7d %7d %7d %7d %7d %7d %7d\n",
                        " ",
 
                                           char *buf)
 {
        DpmActivityMonitorCoeffInt_t activity_monitor;
-       static const char *profile_name[] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        static const char *title[] = {
                        "PROFILE_INDEX(NAME)",
                        "CLOCK_TYPE(NAME)",
                }
 
                size += sysfs_emit_at(buf, size, "%2d %14s%s\n",
-                       i, profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
+                       i, amdgpu_pp_profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
 
                if (smu_version >= 0x360d00) {
                        size += sysfs_emit_at(buf, size, "%19s %d(%13s) %7d %7d %7d %7d %7d %7d %7d %7d %7d\n",
 
                &(activity_monitor_external.DpmActivityMonitorCoeffInt);
        uint32_t i, size = 0;
        int16_t workload_type = 0;
-       static const char *profile_name[] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        static const char *title[] = {
                        "PROFILE_INDEX(NAME)",
                        "CLOCK_TYPE(NAME)",
                }
 
                size += sysfs_emit_at(buf, size, "%2d %14s%s:\n",
-                       i, profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
+                       i, amdgpu_pp_profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
 
                size += sysfs_emit_at(buf, size, "%19s %d(%13s) %7d %7d %7d %7d %7d %7d %7d %7d %7d\n",
                        " ",
 
 static int vangogh_get_power_profile_mode(struct smu_context *smu,
                                           char *buf)
 {
-       static const char *profile_name[] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        uint32_t i, size = 0;
        int16_t workload_type = 0;
 
                        continue;
 
                size += sysfs_emit_at(buf, size, "%2d %14s%s\n",
-                       i, profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
+                       i, amdgpu_pp_profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
        }
 
        return size;
 
 static int renoir_get_power_profile_mode(struct smu_context *smu,
                                           char *buf)
 {
-       static const char *profile_name[] = {
-                                       "BOOTUP_DEFAULT",
-                                       "3D_FULL_SCREEN",
-                                       "POWER_SAVING",
-                                       "VIDEO",
-                                       "VR",
-                                       "COMPUTE",
-                                       "CUSTOM"};
        uint32_t i, size = 0;
        int16_t workload_type = 0;
 
                        continue;
 
                size += sysfs_emit_at(buf, size, "%2d %14s%s\n",
-                       i, profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
+                       i, amdgpu_pp_profile_name[i], (i == smu->power_profile_mode) ? "*" : " ");
        }
 
        return size;