drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carp
Subsystems (3)
PATCH 1/1 drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carp
Since there's nothing special in smu implementation for yellow carp, it's better to reuse the common smu_v13_0 interfaces and drop the specific smu_v13_0_1.c|h files.
--- drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h | 57 ---- drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile | 2 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 26 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c | 311 ------------------ .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 39 ++- 6 files changed, 59 insertions(+), 377 deletions(-) delete mode 100644 drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h delete mode 100644 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c
drivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1 -0
@@ -26,6 +26,7 @@#include "amdgpu_smu.h" #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF +#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x03#define SMU13_DRIVER_IF_VERSION_ALDE 0x07/* MP Apertures */
drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0 -57
57 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile +1 -1
@@ -23,7 +23,7 @@ # Makefile for the 'smu manager' sub-component of powerplay. # It provides the smu management services for the driver. -SMU13_MGR = smu_v13_0.o aldebaran_ppt.o smu_v13_0_1.o yellow_carp_ppt.o +SMU13_MGR = smu_v13_0.o aldebaran_ppt.o yellow_carp_ppt.o AMD_SWSMU_SMU13MGR = $(addprefix $(AMD_SWSMU_PATH)/smu13/,$(SMU13_MGR))
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +26 -0
@@ -41,6 +41,8 @@#include "asic_reg/thm/thm_13_0_2_offset.h" #include "asic_reg/thm/thm_13_0_2_sh_mask.h" +#include "asic_reg/mp/mp_13_0_1_offset.h" +#include "asic_reg/mp/mp_13_0_1_sh_mask.h" #include "asic_reg/mp/mp_13_0_2_offset.h" #include "asic_reg/mp/mp_13_0_2_sh_mask.h" #include "asic_reg/smuio/smuio_13_0_2_offset.h"
@@ -210,6 +212,9 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)case CHIP_ALDEBARAN : smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_ALDE ;break ; +case CHIP_YELLOW_CARP : + smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_YELLOW_CARP ; +break ;default :dev_err (smu->adev->dev,"smu unsupported asic type:%d.\n" , smu->adev->asic_type); smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_INV ;
@@ -694,6 +699,27 @@ int smu_v13_0_set_allowed_mask(struct smu_context *smu)return ret; } +int smu_v13_0_gfx_off_control (struct smu_context *smu,bool enable) +{ +int ret =0 ; +struct amdgpu_device *adev = smu->adev; + +switch (adev->asic_type) { +case CHIP_YELLOW_CARP : +if (!(adev->pm.pp_feature &PP_GFXOFF_MASK )) +return 0 ; +if (enable) + ret =smu_cmn_send_smc_msg (smu, SMU_MSG_AllowGfxOff,NULL ); +else + ret =smu_cmn_send_smc_msg (smu, SMU_MSG_DisallowGfxOff,NULL ); +break ; +default : +break ; + } + +return ret; +} +int smu_v13_0_system_features_control (struct smu_context *smu,bool en) {
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c deleted +0 -311
311 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +31 -8
@@ -25,7 +25,7 @@#include "amdgpu.h" #include "amdgpu_smu.h" -#include "smu_v13_0_1.h" +#include "smu_v13_0.h" #include "smu13_driver_if_yellow_carp.h" #include "yellow_carp_ppt.h" #include "smu_v13_0_1_ppsmc.h"
@@ -186,6 +186,22 @@ static int yellow_carp_init_smc_tables(struct smu_context *smu)return -ENOMEM ; } +static int yellow_carp_fini_smc_tables (struct smu_context *smu) +{ +struct smu_table_context *smu_table = &smu->smu_table; + +kfree (smu_table->clocks_table); + smu_table->clocks_table =NULL ; + +kfree (smu_table->metrics_table); + smu_table->metrics_table =NULL ; + +kfree (smu_table->watermarks_table); + smu_table->watermarks_table =NULL ; + +return 0 ; +} +static int yellow_carp_system_features_control (struct smu_context *smu,bool en) {struct smu_feature *feature = &smu->smu_feature;
@@ -658,6 +674,13 @@ static ssize_t yellow_carp_get_gpu_metrics(struct smu_context *smu,return sizeof (struct gpu_metrics_v2_1 ); } +static int yellow_carp_set_default_dpm_tables (struct smu_context *smu) +{ +struct smu_table_context *smu_table = &smu->smu_table; + +return smu_cmn_update_table (smu,SMU_TABLE_DPMCLOCKS ,0 , smu_table->clocks_table, false); +} +static int yellow_carp_od_edit_dpm_table (struct smu_context *smu,enum PP_OD_DPM_TABLE_COMMAND type,long input[],uint32_t size) {
@@ -1202,17 +1225,17 @@ static int yellow_carp_set_fine_grain_gfx_freq_parameters(struct smu_context *sm }static const struct pptable_funcs yellow_carp_ppt_funcs = { - .check_fw_status = smu_v13_0_1_check_fw_status, - .check_fw_version = smu_v13_0_1_check_fw_version, + .check_fw_status = smu_v13_0_check_fw_status, + .check_fw_version = smu_v13_0_check_fw_version, .init_smc_tables = yellow_carp_init_smc_tables, - .fini_smc_tables = smu_v13_0_1_fini_smc_tables, - .get_vbios_bootup_values = smu_v13_0_1_get_vbios_bootup_values, + .fini_smc_tables = yellow_carp_fini_smc_tables, + .get_vbios_bootup_values = smu_v13_0_get_vbios_bootup_values, .system_features_control = yellow_carp_system_features_control, .send_smc_msg_with_param = smu_cmn_send_smc_msg_with_param, .send_smc_msg = smu_cmn_send_smc_msg, .dpm_set_vcn_enable = yellow_carp_dpm_set_vcn_enable, .dpm_set_jpeg_enable = yellow_carp_dpm_set_jpeg_enable, - .set_default_dpm_table = smu_v13_0_1_set_default_dpm_tables, + .set_default_dpm_table = yellow_carp_set_default_dpm_tables, .read_sensor = yellow_carp_read_sensor, .is_dpm_running = yellow_carp_is_dpm_running, .set_watermarks_table = yellow_carp_set_watermarks_table,
@@ -1221,8 +1244,8 @@ static const struct pptable_funcs yellow_carp_ppt_funcs = { .get_gpu_metrics = yellow_carp_get_gpu_metrics, .get_enabled_mask = smu_cmn_get_enabled_32_bits_mask, .get_pp_feature_mask = smu_cmn_get_pp_feature_mask, - .set_driver_table_location = smu_v13_0_1_set_driver_table_location, - .gfx_off_control = smu_v13_0_1_gfx_off_control, + .set_driver_table_location = smu_v13_0_set_driver_table_location, + .gfx_off_control = smu_v13_0_gfx_off_control, .post_init = yellow_carp_post_smu_init, .mode2_reset = yellow_carp_mode2_reset, .get_dpm_ultimate_freq = yellow_carp_get_dpm_ultimate_freq,
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Best Regards,
Kevin
________________________________
From: Hou, Xiaomeng (Matthew) <[email protected]>
Sent: Thursday, July 1, 2021 4:31 PM
To: [email protected] <[email protected]>
Cc: Wang, Kevin(Yang) <[email protected]>; Lazar, Lijo <[email protected]>; Liu, Aaron <[email protected]>; Hou, Xiaomeng (Matthew) <[email protected]>
Subject: [PATCH] drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carp
Since there's nothing special in smu implementation for yellow carp, it's better to reuse the common smu_v13_0 interfaces and drop the specific smu_v13_0_1.c|h files.
--- drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h | 57 ---- drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile | 2 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 26 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c | 311 ------------------ .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 39 ++- 6 files changed, 59 insertions(+), 377 deletions(-) delete mode 100644 drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h delete mode 100644 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c
drivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1 -0
@@ -26,6 +26,7 @@#include "amdgpu_smu.h" #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF +#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x03#define SMU13_DRIVER_IF_VERSION_ALDE 0x07/* MP Apertures */
drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0 -57
57 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile +1 -1
@@ -23,7 +23,7 @@ # Makefile for the 'smu manager' sub-component of powerplay. # It provides the smu management services for the driver. -SMU13_MGR = smu_v13_0.o aldebaran_ppt.o smu_v13_0_1.o yellow_carp_ppt.o +SMU13_MGR = smu_v13_0.o aldebaran_ppt.o yellow_carp_ppt.o AMD_SWSMU_SMU13MGR = $(addprefix $(AMD_SWSMU_PATH)/smu13/,$(SMU13_MGR))
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +26 -0
@@ -41,6 +41,8 @@#include "asic_reg/thm/thm_13_0_2_offset.h" #include "asic_reg/thm/thm_13_0_2_sh_mask.h" +#include "asic_reg/mp/mp_13_0_1_offset.h" +#include "asic_reg/mp/mp_13_0_1_sh_mask.h" #include "asic_reg/mp/mp_13_0_2_offset.h" #include "asic_reg/mp/mp_13_0_2_sh_mask.h" #include "asic_reg/smuio/smuio_13_0_2_offset.h"
@@ -210,6 +212,9 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)case CHIP_ALDEBARAN : smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_ALDE ;break ; +case CHIP_YELLOW_CARP : + smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_YELLOW_CARP ; +break ;default :dev_err (smu->adev->dev,"smu unsupported asic type:%d.\n" , smu->adev->asic_type); smu->smc_driver_if_version =SMU13_DRIVER_IF_VERSION_INV ;
@@ -694,6 +699,27 @@ int smu_v13_0_set_allowed_mask(struct smu_context *smu)return ret; } +int smu_v13_0_gfx_off_control (struct smu_context *smu,bool enable) +{ +int ret =0 ; +struct amdgpu_device *adev = smu->adev; + +switch (adev->asic_type) { +case CHIP_YELLOW_CARP : +if (!(adev->pm.pp_feature &PP_GFXOFF_MASK )) +return 0 ; +if (enable) + ret =smu_cmn_send_smc_msg (smu, SMU_MSG_AllowGfxOff,NULL ); +else + ret =smu_cmn_send_smc_msg (smu, SMU_MSG_DisallowGfxOff,NULL ); +break ; +default : +break ; + } + +return ret; +} +int smu_v13_0_system_features_control (struct smu_context *smu,bool en) {
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c deleted +0 -311
311 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c +31 -8
@@ -25,7 +25,7 @@#include "amdgpu.h" #include "amdgpu_smu.h" -#include "smu_v13_0_1.h" +#include "smu_v13_0.h" #include "smu13_driver_if_yellow_carp.h" #include "yellow_carp_ppt.h" #include "smu_v13_0_1_ppsmc.h"
@@ -186,6 +186,22 @@ static int yellow_carp_init_smc_tables(struct smu_context *smu)return -ENOMEM ; } +static int yellow_carp_fini_smc_tables (struct smu_context *smu) +{ +struct smu_table_context *smu_table = &smu->smu_table; + +kfree (smu_table->clocks_table); + smu_table->clocks_table =NULL ; + +kfree (smu_table->metrics_table); + smu_table->metrics_table =NULL ; + +kfree (smu_table->watermarks_table); + smu_table->watermarks_table =NULL ; + +return 0 ; +} +static int yellow_carp_system_features_control (struct smu_context *smu,bool en) {struct smu_feature *feature = &smu->smu_feature;
@@ -658,6 +674,13 @@ static ssize_t yellow_carp_get_gpu_metrics(struct smu_context *smu,return sizeof (struct gpu_metrics_v2_1 ); } +static int yellow_carp_set_default_dpm_tables (struct smu_context *smu) +{ +struct smu_table_context *smu_table = &smu->smu_table; + +return smu_cmn_update_table (smu,SMU_TABLE_DPMCLOCKS ,0 , smu_table->clocks_table, false); +} +static int yellow_carp_od_edit_dpm_table (struct smu_context *smu,enum PP_OD_DPM_TABLE_COMMAND type,long input[],uint32_t size) {
@@ -1202,17 +1225,17 @@ static int yellow_carp_set_fine_grain_gfx_freq_parameters(struct smu_context *sm }static const struct pptable_funcs yellow_carp_ppt_funcs = { - .check_fw_status = smu_v13_0_1_check_fw_status, - .check_fw_version = smu_v13_0_1_check_fw_version, + .check_fw_status = smu_v13_0_check_fw_status, + .check_fw_version = smu_v13_0_check_fw_version, .init_smc_tables = yellow_carp_init_smc_tables, - .fini_smc_tables = smu_v13_0_1_fini_smc_tables, - .get_vbios_bootup_values = smu_v13_0_1_get_vbios_bootup_values, + .fini_smc_tables = yellow_carp_fini_smc_tables, + .get_vbios_bootup_values = smu_v13_0_get_vbios_bootup_values, .system_features_control = yellow_carp_system_features_control, .send_smc_msg_with_param = smu_cmn_send_smc_msg_with_param, .send_smc_msg = smu_cmn_send_smc_msg, .dpm_set_vcn_enable = yellow_carp_dpm_set_vcn_enable, .dpm_set_jpeg_enable = yellow_carp_dpm_set_jpeg_enable, - .set_default_dpm_table = smu_v13_0_1_set_default_dpm_tables, + .set_default_dpm_table = yellow_carp_set_default_dpm_tables, .read_sensor = yellow_carp_read_sensor, .is_dpm_running = yellow_carp_is_dpm_running, .set_watermarks_table = yellow_carp_set_watermarks_table,
@@ -1221,8 +1244,8 @@ static const struct pptable_funcs yellow_carp_ppt_funcs = { .get_gpu_metrics = yellow_carp_get_gpu_metrics, .get_enabled_mask = smu_cmn_get_enabled_32_bits_mask, .get_pp_feature_mask = smu_cmn_get_pp_feature_mask, - .set_driver_table_location = smu_v13_0_1_set_driver_table_location, - .gfx_off_control = smu_v13_0_1_gfx_off_control, + .set_driver_table_location = smu_v13_0_set_driver_table_location, + .gfx_off_control = smu_v13_0_gfx_off_control, .post_init = yellow_carp_post_smu_init, .mode2_reset = yellow_carp_mode2_reset, .get_dpm_ultimate_freq = yellow_carp_get_dpm_ultimate_freq,
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
One minor comment below.
Quoted 109 lines · Xiaomeng Hou
Since there's nothing special in smu implementation for yellow carp, it's better to reuse the common
smu_v13_0interfaces and drop the specific smu_v13_0_1.c|h files.Signed-off-by Xiaomeng Hou <[email protected]>--- drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h | 57 ---- drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile | 2 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 26 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c | 311 ------------------ .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 39 ++- 6 files changed, 59 insertions(+), 377 deletions(-)delete mode 100644
drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.hdelete mode 100644drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.cdrivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1
-0@@ -26,6 +26,7 @@#include "amdgpu_smu.h" #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF +#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x03#define SMU13_DRIVER_IF_VERSION_ALDE 0x07/* MP Apertures */ drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0
-57@@ -1,57 +0,0 @@ -/* -* Copyright 2020 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 __SMU_V13_0_1_H__ -#define __SMU_V13_0_1_H__ - -#include "amdgpu_smu.h" - -#define SMU13_0_1_DRIVER_IF_VERSION_INV 0xFFFFFFFF -#define SMU13_0_1_DRIVER_IF_VERSION_YELLOW_CARP 0x3 - -/* MP Apertures */ -#define MP0_Public 0x03800000 -#define MP0_SRAM 0x03900000 -#define MP1_Public 0x03b00000 -#define MP1_SRAM 0x03c00004 - -/* address block */ -#define smnMP1_FIRMWARE_FLAGS 0x3010024 - - -#if defined(SWSMU_CODE_LAYER_L2 ) || defined(SWSMU_CODE_LAYER_L3 ) - -int smu_v13_0_1_check_fw_status (struct smu_context *smu); - -int smu_v13_0_1_check_fw_version (struct smu_context *smu); - -int smu_v13_0_1_fini_smc_tables (struct smu_context *smu); - -int smu_v13_0_1_get_vbios_bootup_values (struct smu_context *smu); - -int smu_v13_0_1_set_default_dpm_tables (struct smu_context *smu); - -int smu_v13_0_1_set_driver_table_location (struct smu_context *smu); - -int smu_v13_0_1_gfx_off_control (struct smu_context *smu,bool enable); -#endif -#endif drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile +1
-1@@ -23,7 +23,7 @@ # Makefile for the 'smu manager' sub-component of powerplay. # It provides the smu management services for the driver. -SMU13_MGR = smu_v13_0.o aldebaran_ppt.o smu_v13_0_1.o yellow_carp_ppt.o +SMU13_MGR = smu_v13_0.o aldebaran_ppt.o yellow_carp_ppt.o AMD_SWSMU_SMU13MGR = $(addprefix $(AMD_SWSMU_PATH)/smu13/,$(SMU13_MGR))drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c line 45
Quoted 5 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-0@@ -41,6 +41,8 @@#include "asic_reg/thm/thm_13_0_2_offset.h" #include "asic_reg/thm/thm_13_0_2_sh_mask.h" +#include "asic_reg/mp/mp_13_0_1_offset.h" +#include "asic_reg/mp/mp_13_0_1_sh_mask.h"
If the offsets are same, are these files still needed or can they be not included/dropped completely?
Thanks,
Lijo
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Quoted 141 lines
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Thursday, July 1, 2021 4:51 PM
To: Hou, Xiaomeng (Matthew) <[email protected]>; [email protected]
Cc: Wang, Kevin(Yang) <[email protected]>; Liu, Aaron <[email protected]>
Subject: Re: [PATCH] drm/amd/pm: drop smu_v13_0_1.c|h files for yellow carpOne minor comment below.
Reviewed-by Lijo Lazar <[email protected]>Quoted 127 lines · Xiaomeng Hou
Since there's nothing special in smu implementation for yellow carp, it's better to reuse the common
smu_v13_0interfaces and drop the specific smu_v13_0_1.c|h files.Signed-off-by Xiaomeng Hou <[email protected]>--- drivers/gpu/drm/amd/pm/inc/smu_v13_0.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h | 57 ---- drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile | 2 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 26 ++ .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.c | 311 ------------------ .../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 39 ++- 6 files changed, 59 insertions(+), 377 deletions(-)delete mode 100644
drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.hdelete mode 100644drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_1.cdrivers/gpu/drm/amd/pm/inc/smu_v13_0.h +1
-0@@ -26,6 +26,7 @@#include "amdgpu_smu.h" #define SMU13_DRIVER_IF_VERSION_INV 0xFFFFFFFF +#define SMU13_DRIVER_IF_VERSION_YELLOW_CARP 0x03#define SMU13_DRIVER_IF_VERSION_ALDE 0x07/* MP Apertures */ drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0
-4@@ -1,57 +0,0 @@ -/* -* Copyright 2020 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.
- *
- */drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0
-6-#ifndef __SMU_V13_0_1_H__ -#define __SMU_V13_0_1_H__ - -#include "amdgpu_smu.h" - -#define SMU13_0_1_DRIVER_IF_VERSION_INV 0xFFFFFFFF -#define
SMU13_0_1_DRIVER_IF_VERSION_YELLOW_CARP0x3drivers/gpu/drm/amd/pm/inc/smu_v13_0_1.h deleted +0
-26- -/* MP Apertures */ -#define MP0_Public 0x03800000 -#define MP0_SRAM 0x03900000 -#define MP1_Public 0x03b00000 -#define MP1_SRAM 0x03c00004 - -/* address block */ -#define smnMP1_FIRMWARE_FLAGS 0x3010024 - - -#if defined(SWSMU_CODE_LAYER_L2 ) || defined(SWSMU_CODE_LAYER_L3 ) - -int smu_v13_0_1_check_fw_status (struct smu_context *smu); - -int smu_v13_0_1_check_fw_version (struct smu_context *smu); - -int smu_v13_0_1_fini_smc_tables (struct smu_context *smu); - -int smu_v13_0_1_get_vbios_bootup_values (struct smu_context *smu); - -int smu_v13_0_1_set_default_dpm_tables (struct smu_context *smu); - -int smu_v13_0_1_set_driver_table_location (struct smu_context *smu); - -int smu_v13_0_1_gfx_off_control(struct smu_context *smu, boolenable); -#endif -#endif diff --git
a/drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile
b/drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile
index9b3a8503f5cd..d4c4c495762c100644drivers/gpu/drm/amd/pm/swsmu/smu13/Makefile +0
-1@@ -23,7 +23,7 @@ # Makefile for the 'smu manager' sub-component of powerplay. # It provides the smu management services for the driver. -SMU13_MGR = smu_v13_0.o aldebaran_ppt.o smu_v13_0_1.oyellow_carp_ppt.o
+SMU13_MGR = smu_v13_0.o aldebaran_ppt.o yellow_carp_ppt.o
AMD_SWSMU_SMU13MGR= $(addprefix
$(AMD_SWSMU_PATH)/smu13/,$(SMU13_MGR))drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +0
-0@@ -41,6 +41,8 @@
Quoted 6 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c line 45
Quoted 4 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2
-0#include "asic_reg/thm/thm_13_0_2_offset.h" #include "asic_reg/thm/thm_13_0_2_sh_mask.h" +#include "asic_reg/mp/mp_13_0_1_offset.h" +#include "asic_reg/mp/mp_13_0_1_sh_mask.h" If the offsets are same, are these files still needed or can they be not included/dropped completely?
Yes, I noticed the offsets/masks are actually same between mp_13_0_1/2, I am not sure if we could drop the header files completely, or I just not include them in this patch? @Liu, Aaron, do you have any comment? Are these header files there for future possible distinction?
Regards,
Matthew
Quoted 4 lines
Thanks,
Lijo
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx