A new set of Linux OD interfaces
Subsystems (5)
v3 cover A new set of Linux OD interfaces
The existing OD interface pp_od_clk_voltage is unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon.
To better meet the growing demainds, a new set of OD interfaces are designed. With this new design, there will be multiple interfaces exposed with each representing a single OD functionality. And all those interfaces will be arranged in a tree liked hierarchy as below. Meanwhile all functionalities for the same component will be arranged under the same directory.
gpu_od/
├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperature
Evan Quan (7):
drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization sequences drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13 drm/amd/pm: add fan acoustic limit OD setting support for SMU13 drm/amd/pm: add fan acoustic target OD setting support for SMU13 drm/amd/pm: add fan target temperature OD setting support for SMU13 drm/amd/pm: add fan minimum pwm OD setting support for SMU13
Documentation/gpu/amdgpu/thermal.rst | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +- .../gpu/drm/amd/include/kgd_pp_interface.h | 12 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 730 +++++++++++++++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 298 ++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 298 ++++++- 9 files changed, 1411 insertions(+), 25 deletions(-)
Signature · 1 line
2.34.1
PATCH v3 1/7 drm/amd/pm: introduce a new set of OD interfaces
There will be multiple interfaces(sysfs files) exposed with each representing a single OD functionality. And all those interface will be arranged in a tree liked hierarchy with the top dir as "gpu_od". Meanwhile all functionalities for the same component will be arranged under the same directory.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 264 ++++++++++++++++++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + 3 files changed, 266 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -3624,6 +3624,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,INIT_LIST_HEAD (&adev->ras_list); +INIT_LIST_HEAD (&adev->pm.od_kobj_list); +INIT_DELAYED_WORK (&adev->delayed_init_work, amdgpu_device_delayed_init_work_handler); INIT_DELAYED_WORK(&adev->gfx.gfx_off_delay_work,
drivers/gpu/drm/amd/pm/amdgpu_pm.c +262 -2
293 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 -0
@@ -366,6 +366,8 @@ struct amdgpu_pm {struct config_table_setting config_table;/* runtime mode */ enum amdgpu_runpm_mode rpm_mode; + +struct list_head od_kobj_list; }; int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum amd_pp_sensors sensor,
Signature · 1 line
2.34.1
PATCH v3 2/7 drm/amdgpu: revise the device initialization sequences
In reply to Evan QuanBy placing the sysfs interfaces creation after .late_int. Since some operations performed during .late_init may affect how the sysfs interfaces should be created.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 ++++++++++++---------- 1 file changed, 21 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +21 -16
@@ -3862,22 +3862,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* Get a log2 for easy divisions. */ adev->mm_stats.log2_max_MBps =ilog2 (max (1u , max_MBps)); - r =amdgpu_atombios_sysfs_init (adev); -if (r) -drm_err (&adev->ddev, -"registering atombios sysfs failed (%d).\n" , r); - - r =amdgpu_pm_sysfs_init (adev); -if (r) -DRM_ERROR ("registering pm sysfs failed (%d).\n" , r); - - r =amdgpu_ucode_sysfs_init (adev); -if (r) { - adev->ucode_sysfs_en = false; -DRM_ERROR ("Creating firmware sysfs failed (%d).\n" , r); - }else - adev->ucode_sysfs_en = true; -/* * Register gpu instance before amdgpu_device_enable_mgpu_fan_boost. * Otherwise the mgpu fan boost feature will be skipped due to the
@@ -3906,6 +3890,27 @@ int amdgpu_device_init(struct amdgpu_device *adev,flush_delayed_work (&adev->delayed_init_work); } +/* +* Place those sysfs registering after `late_init`. As some of those +* operations performed in `late_init` might affect the sysfs +* interfaces creating. +*/ + r =amdgpu_atombios_sysfs_init (adev); +if (r) +drm_err (&adev->ddev, +"registering atombios sysfs failed (%d).\n" , r); + + r =amdgpu_pm_sysfs_init (adev); +if (r) +DRM_ERROR ("registering pm sysfs failed (%d).\n" , r); + + r =amdgpu_ucode_sysfs_init (adev); +if (r) { + adev->ucode_sysfs_en = false; +DRM_ERROR ("Creating firmware sysfs failed (%d).\n" , r); + }else + adev->ucode_sysfs_en = true; + r =sysfs_create_files (&adev->dev->kobj, amdgpu_dev_attributes);if (r)dev_err (adev->dev,"Could not create amdgpu device attr\n" );
Signature · 1 line
2.34.1
PATCH v3 3/7 drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13
In reply to Evan QuanAdd SMU13 fan temperature/pwm curve OD setting support.
--v1->v2:
- add missing kerneldoc for the new interface(Alex)v2->v3:
- rich the document for the new interface(Alex)
--- Documentation/gpu/amdgpu/thermal.rst | 6 + .../gpu/drm/amd/include/kgd_pp_interface.h | 4 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 210 +++++++++++++++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 102 ++++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 102 ++++++++- 8 files changed, 423 insertions(+), 8 deletions(-)
Documentation/gpu/amdgpu/thermal.rst +6 -0
@@ -64,6 +64,12 @@ gpu_metrics .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c :doc: gpu_metrics +fan_curve +--------- + +.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c + :doc: fan_curve + GFXOFF ======
drivers/gpu/drm/amd/include/kgd_pp_interface.h +3 -1
@@ -113,6 +113,7 @@ enum pp_clock_type {OD_RANGE ,OD_VDDGFX_OFFSET ,OD_CCLK , + OD_FAN_CURVE, }; enum amd_pp_sensors {
@@ -186,7 +187,8 @@ enum PP_OD_DPM_TABLE_COMMAND {PP_OD_EDIT_VDDC_CURVE ,PP_OD_RESTORE_DEFAULT_TABLE ,PP_OD_COMMIT_DPM_TABLE , -PP_OD_EDIT_VDDGFX_OFFSET +PP_OD_EDIT_VDDGFX_OFFSET , + PP_OD_EDIT_FAN_CURVE, }; struct pp_states_info {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +209 -1
216 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +4 -0
@@ -314,6 +314,9 @@ struct config_table_settinguint16_t fclk_average_tau; }; +#define OD_OPS_SUPPORT_FAN_CURVE_RETRIEVE BIT(0) +#define OD_OPS_SUPPORT_FAN_CURVE_SET BIT(1) +struct amdgpu_pm {struct mutex mutex;u32 current_sclk;
@@ -368,6 +371,7 @@ struct amdgpu_pm {enum amdgpu_runpm_mode rpm_mode;struct list_head od_kobj_list; +uint32_t od_feature_mask; }; int amdgpu_dpm_read_sensor(struct amdgpu_device *adev, enum amd_pp_sensors sensor,
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
@@ -2481,6 +2481,8 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type) clk_type =SMU_OD_VDDGFX_OFFSET ;break ;case OD_CCLK : clk_type =SMU_OD_CCLK ;break ; +case OD_FAN_CURVE : + clk_type =SMU_OD_FAN_CURVE ;break ;default : clk_type =SMU_CLK_COUNT ;break ; }
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -0
@@ -280,6 +280,7 @@ enum smu_clk_type {SMU_OD_VDDC_CURVE ,SMU_OD_RANGE ,SMU_OD_VDDGFX_OFFSET , +SMU_OD_FAN_CURVE , SMU_CLK_COUNT, };
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +99 -3
146 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +99 -3
146 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 4/7 drm/amd/pm: add fan acoustic limit OD setting support for SMU13
In reply to Evan QuanAdd SMU13 fan acoustic limit OD setting support.
--v1->v2:
- add missing kerneldoc for the new interface(Alex)v2->v3:
- rich the document for the new interface(Alex)
--- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 63 +++++++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 51 ++++++++++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 51 ++++++++++++++- 8 files changed, 176 insertions(+), 2 deletions(-)
Documentation/gpu/amdgpu/thermal.rst +6 -0
@@ -70,6 +70,12 @@ fan_curve .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c :doc: fan_curve +acoustic_limit_rpm_threshold +---------------------------- + +.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c + :doc: acoustic_limit_rpm_threshold + GFXOFF ======
drivers/gpu/drm/amd/include/kgd_pp_interface.h +2 -0
@@ -114,6 +114,7 @@ enum pp_clock_type {OD_VDDGFX_OFFSET ,OD_CCLK ,OD_FAN_CURVE , + OD_ACOUSTIC_LIMIT, }; enum amd_pp_sensors {
@@ -189,6 +190,7 @@ enum PP_OD_DPM_TABLE_COMMAND {PP_OD_COMMIT_DPM_TABLE ,PP_OD_EDIT_VDDGFX_OFFSET ,PP_OD_EDIT_FAN_CURVE , + PP_OD_EDIT_ACOUSTIC_LIMIT, }; struct pp_states_info {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +63 -0
75 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 -0
@@ -316,6 +316,8 @@ struct config_table_setting#define OD_OPS_SUPPORT_FAN_CURVE_RETRIEVE BIT(0)#define OD_OPS_SUPPORT_FAN_CURVE_SET BIT(1) +#define OD_OPS_SUPPORT_ACOUSTIC_LIMIT_THRESHOLD_RETRIEVE BIT(2) +#define OD_OPS_SUPPORT_ACOUSTIC_LIMIT_THRESHOLD_SET BIT(3)struct amdgpu_pm {struct mutex mutex;
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
@@ -2483,6 +2483,8 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type) clk_type =SMU_OD_CCLK ;break ;case OD_FAN_CURVE : clk_type =SMU_OD_FAN_CURVE ;break ; +case OD_ACOUSTIC_LIMIT : + clk_type =SMU_OD_ACOUSTIC_LIMIT ;break ;default : clk_type =SMU_CLK_COUNT ;break ; }
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -0
@@ -281,6 +281,7 @@ enum smu_clk_type {SMU_OD_RANGE ,SMU_OD_VDDGFX_OFFSET ,SMU_OD_FAN_CURVE , +SMU_OD_ACOUSTIC_LIMIT , SMU_CLK_COUNT, };
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +50 -1
87 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +50 -1
87 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 5/7 drm/amd/pm: add fan acoustic target OD setting support for SMU13
In reply to Evan QuanAdd SMU13 fan acoustic target OD setting support.
--v1->v2:
- add missing kerneldoc for the new interface(Alex)v2->v3:
- rich the document for the new interface(Alex)
--- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 65 +++++++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 51 ++++++++++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 51 ++++++++++++++- 8 files changed, 178 insertions(+), 2 deletions(-)
Documentation/gpu/amdgpu/thermal.rst +6 -0
@@ -76,6 +76,12 @@ acoustic_limit_rpm_threshold .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c :doc: acoustic_limit_rpm_threshold +acoustic_target_rpm_threshold +----------------------------- + +.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c + :doc: acoustic_target_rpm_threshold + GFXOFF ======
drivers/gpu/drm/amd/include/kgd_pp_interface.h +2 -0
@@ -115,6 +115,7 @@ enum pp_clock_type {OD_CCLK ,OD_FAN_CURVE ,OD_ACOUSTIC_LIMIT , + OD_ACOUSTIC_TARGET, }; enum amd_pp_sensors {
@@ -191,6 +192,7 @@ enum PP_OD_DPM_TABLE_COMMAND {PP_OD_EDIT_VDDGFX_OFFSET ,PP_OD_EDIT_FAN_CURVE ,PP_OD_EDIT_ACOUSTIC_LIMIT , + PP_OD_EDIT_ACOUSTIC_TARGET, }; struct pp_states_info {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +65 -0
77 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 -0
@@ -318,6 +318,8 @@ struct config_table_setting#define OD_OPS_SUPPORT_FAN_CURVE_SET BIT(1)#define OD_OPS_SUPPORT_ACOUSTIC_LIMIT_THRESHOLD_RETRIEVE BIT(2)#define OD_OPS_SUPPORT_ACOUSTIC_LIMIT_THRESHOLD_SET BIT(3) +#define OD_OPS_SUPPORT_ACOUSTIC_TARGET_THRESHOLD_RETRIEVE BIT(4) +#define OD_OPS_SUPPORT_ACOUSTIC_TARGET_THRESHOLD_SET BIT(5)struct amdgpu_pm {struct mutex mutex;
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
@@ -2485,6 +2485,8 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type) clk_type =SMU_OD_FAN_CURVE ;break ;case OD_ACOUSTIC_LIMIT : clk_type =SMU_OD_ACOUSTIC_LIMIT ;break ; +case OD_ACOUSTIC_TARGET : + clk_type =SMU_OD_ACOUSTIC_TARGET ;break ;default : clk_type =SMU_CLK_COUNT ;break ; }
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -0
@@ -282,6 +282,7 @@ enum smu_clk_type {SMU_OD_VDDGFX_OFFSET ,SMU_OD_FAN_CURVE ,SMU_OD_ACOUSTIC_LIMIT , +SMU_OD_ACOUSTIC_TARGET , SMU_CLK_COUNT, };
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +50 -1
87 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +50 -1
87 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 6/7 drm/amd/pm: add fan target temperature OD setting support for SMU13
In reply to Evan QuanAdd SMU13 fan target temperature OD setting support.
--v1->v2:
- add missing kerneldoc for the new interface(Alex)v2->v3:
- rich the document for the new interface(Alex)
--- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 66 +++++++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 51 +++++++++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 51 +++++++++++++- 8 files changed, 179 insertions(+), 2 deletions(-)
Documentation/gpu/amdgpu/thermal.rst +6 -0
@@ -82,6 +82,12 @@ acoustic_target_rpm_threshold .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c :doc: acoustic_target_rpm_threshold +fan_target_temperature +---------------------- + +.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c + :doc: fan_target_temperature + GFXOFF ======
drivers/gpu/drm/amd/include/kgd_pp_interface.h +2 -0
@@ -116,6 +116,7 @@ enum pp_clock_type {OD_FAN_CURVE ,OD_ACOUSTIC_LIMIT ,OD_ACOUSTIC_TARGET , + OD_FAN_TARGET_TEMPERATURE, }; enum amd_pp_sensors {
@@ -193,6 +194,7 @@ enum PP_OD_DPM_TABLE_COMMAND {PP_OD_EDIT_FAN_CURVE ,PP_OD_EDIT_ACOUSTIC_LIMIT ,PP_OD_EDIT_ACOUSTIC_TARGET , + PP_OD_EDIT_FAN_TARGET_TEMPERATURE, }; struct pp_states_info {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +66 -0
78 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 -0
@@ -320,6 +320,8 @@ struct config_table_setting#define OD_OPS_SUPPORT_ACOUSTIC_LIMIT_THRESHOLD_SET BIT(3)#define OD_OPS_SUPPORT_ACOUSTIC_TARGET_THRESHOLD_RETRIEVE BIT(4)#define OD_OPS_SUPPORT_ACOUSTIC_TARGET_THRESHOLD_SET BIT(5) +#define OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_RETRIEVE BIT(6) +#define OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_SET BIT(7)struct amdgpu_pm {struct mutex mutex;
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
@@ -2487,6 +2487,8 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type) clk_type =SMU_OD_ACOUSTIC_LIMIT ;break ;case OD_ACOUSTIC_TARGET : clk_type =SMU_OD_ACOUSTIC_TARGET ;break ; +case OD_FAN_TARGET_TEMPERATURE : + clk_type =SMU_OD_FAN_TARGET_TEMPERATURE ;break ;default : clk_type =SMU_CLK_COUNT ;break ; }
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -0
@@ -283,6 +283,7 @@ enum smu_clk_type {SMU_OD_FAN_CURVE ,SMU_OD_ACOUSTIC_LIMIT ,SMU_OD_ACOUSTIC_TARGET , +SMU_OD_FAN_TARGET_TEMPERATURE , SMU_CLK_COUNT, };
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +50 -1
87 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +50 -1
87 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 7/7 drm/amd/pm: add fan minimum pwm OD setting support for SMU13
In reply to Evan QuanAdd SMU13 fan minimum pwm OD setting support.
--v1->v2:
- add missing kerneldoc for the new interface(Alex)v2->v3:
- rich the document for the new interface(Alex)
--- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 64 +++++++++++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 1 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 51 ++++++++++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 51 ++++++++++++++- 8 files changed, 177 insertions(+), 2 deletions(-)
Documentation/gpu/amdgpu/thermal.rst +6 -0
@@ -88,6 +88,12 @@ fan_target_temperature .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c :doc: fan_target_temperature +fan_minimum_pwm +--------------- + +.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c + :doc: fan_minimum_pwm + GFXOFF ======
drivers/gpu/drm/amd/include/kgd_pp_interface.h +2 -0
@@ -117,6 +117,7 @@ enum pp_clock_type {OD_ACOUSTIC_LIMIT ,OD_ACOUSTIC_TARGET ,OD_FAN_TARGET_TEMPERATURE , + OD_FAN_MINIMUM_PWM, }; enum amd_pp_sensors {
@@ -195,6 +196,7 @@ enum PP_OD_DPM_TABLE_COMMAND {PP_OD_EDIT_ACOUSTIC_LIMIT ,PP_OD_EDIT_ACOUSTIC_TARGET ,PP_OD_EDIT_FAN_TARGET_TEMPERATURE , + PP_OD_EDIT_FAN_MINIMUM_PWM, }; struct pp_states_info {
drivers/gpu/drm/amd/pm/amdgpu_pm.c +64 -0
76 lines not on this page · raw message
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h +2 -0
@@ -322,6 +322,8 @@ struct config_table_setting#define OD_OPS_SUPPORT_ACOUSTIC_TARGET_THRESHOLD_SET BIT(5)#define OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_RETRIEVE BIT(6)#define OD_OPS_SUPPORT_FAN_TARGET_TEMPERATURE_SET BIT(7) +#define OD_OPS_SUPPORT_FAN_MINIMUM_PWM_RETRIEVE BIT(8) +#define OD_OPS_SUPPORT_FAN_MINIMUM_PWM_SET BIT(9)struct amdgpu_pm {struct mutex mutex;
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +2 -0
@@ -2489,6 +2489,8 @@ static enum smu_clk_type smu_convert_to_smuclk(enum pp_clock_type type) clk_type =SMU_OD_ACOUSTIC_TARGET ;break ;case OD_FAN_TARGET_TEMPERATURE : clk_type =SMU_OD_FAN_TARGET_TEMPERATURE ;break ; +case OD_FAN_MINIMUM_PWM : + clk_type =SMU_OD_FAN_MINIMUM_PWM ;break ;default : clk_type =SMU_CLK_COUNT ;break ; }
drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h +1 -0
@@ -284,6 +284,7 @@ enum smu_clk_type {SMU_OD_ACOUSTIC_LIMIT ,SMU_OD_ACOUSTIC_TARGET ,SMU_OD_FAN_TARGET_TEMPERATURE , +SMU_OD_FAN_MINIMUM_PWM , SMU_CLK_COUNT, };
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +50 -1
87 lines not on this page · raw message
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +50 -1
87 lines not on this page · raw message
Signature · 1 line
2.34.1
Series is:
Quoted 43 lines · Evan Quan
The existing OD interface
pp_od_clk_voltageis unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon.To better meet the growing demainds, a new set of OD interfaces are designed. With this new design, there will be multiple interfaces exposed with each representing a single OD functionality. And all those interfaces will be arranged in a tree liked hierarchy as below. Meanwhile all functionalities for the same component will be arranged under the same directory.
gpu_od/
├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperatureEvan Quan (7):
drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization sequences drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13 drm/amd/pm: add fan acoustic limit OD setting support for SMU13 drm/amd/pm: add fan acoustic target OD setting support for SMU13 drm/amd/pm: add fan target temperature OD setting support for SMU13 drm/amd/pm: add fan minimum pwm OD setting support for SMU13Documentation/gpu/amdgpu/thermal.rst | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +- .../gpu/drm/amd/include/kgd_pp_interface.h | 12 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 730 +++++++++++++++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 298 ++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 298 ++++++- 9 files changed, 1411 insertions(+), 25 deletions(-)--
2.34.1
For consistency with the other OD interface, we'd probably want an "r" option to reset each attribute to the default state again.
Alex
Quoted 48 lines · Alex Deucher
Series is:
Reviewed-by Alex Deucher <[email protected]>Quoted 43 lines · Evan Quan
The existing OD interface
pp_od_clk_voltageis unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon.To better meet the growing demainds, a new set of OD interfaces are designed. With this new design, there will be multiple interfaces exposed with each representing a single OD functionality. And all those interfaces will be arranged in a tree liked hierarchy as below. Meanwhile all functionalities for the same component will be arranged under the same directory.
gpu_od/
├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperatureEvan Quan (7):
drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization sequences drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13 drm/amd/pm: add fan acoustic limit OD setting support for SMU13 drm/amd/pm: add fan acoustic target OD setting support for SMU13 drm/amd/pm: add fan target temperature OD setting support for SMU13 drm/amd/pm: add fan minimum pwm OD setting support for SMU13Documentation/gpu/amdgpu/thermal.rst | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +- .../gpu/drm/amd/include/kgd_pp_interface.h | 12 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 730 +++++++++++++++++- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 298 ++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 298 ++++++- 9 files changed, 1411 insertions(+), 25 deletions(-)--
2.34.1
[AMD Official Use Only - General]
Actually, with my original design, there indeed came with an 'r' option support. But I found that brings some confusion. Since per current 'r' option design, it will reset all attributes back to original states. Thus I dropped it.
If to support 'r' option per attribute, some redesigns to current logics will be needed to support both legacy and the new OD interfaces. That will need some extra efforts. Maybe we can put that on our TODO list?
Evan
Quoted 68 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, September 1, 2023 1:26 AM
To: Quan, Evan <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>
Subject: Re: [V3 0/7] A new set of Linux OD interfacesFor consistency with the other OD interface, we'd probably want an "r" option to reset each attribute to the default state again.
Alex
Quoted 5 lines · Alex Deucher
Series is:
Reviewed-by Alex Deucher <[email protected]>On Wed, Aug 30, 2023 at 2:35 AM Evan Quan <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
The existing OD interface
pp_od_clk_voltageis unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon.To better meet the growing demainds, a new set of OD interfaces are
designed.
Quoted 4 lines
Quoted 4 lines
With this new design, there will be multiple interfaces exposed with each representing a single OD functionality. And all those interfaces will be arranged in a tree liked hierarchy as below. Meanwhile all functionalities for the same component will be arranged
under the same directory.
Quoted 9 lines
Quoted 9 lines
gpu_od/
├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperatureQuoted 4 lines
Quoted 4 lines
Evan Quan (7):
drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization sequences drm/amd/pm: add fan temperature/pwm curve OD setting support forSMU13
Quoted 9 lines
Quoted 9 lines
drm/amd/pm: add fan acoustic limit OD setting support for SMU13 drm/amd/pm: add fan acoustic target OD setting support for SMU13 drm/amd/pm: add fan target temperature OD setting support for SMU13 drm/amd/pm: add fan minimum pwm OD setting support for SMU13
Documentation/gpu/amdgpu/thermal.rst | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +- .../gpu/drm/amd/include/kgd_pp_interface.h | 12 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 730+++++++++++++++++-
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 298 ++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 298 ++++++- 9 files changed, 1411 insertions(+), 25 deletions(-)--
2.34.1
Quoted 10 lines · Evan
[AMD Official Use Only - General]
Actually, with my original design, there indeed came with an 'r' option support. But I found that brings some confusion. Since per current 'r' option design, it will reset all attributes back to original states. Thus I dropped it.
If to support 'r' option per attribute, some redesigns to current logics will be needed to support both legacy and the new OD interfaces. That will need some extra efforts. Maybe we can put that on our TODO list?
Wouldn't it just reset the values of the attributes to the initial value? E.g., for the curve, it would be useful to have a way to set the curve back to the initial settings after messing with it.
Alex
Quoted 70 lines
Evan
Quoted 68 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, September 1, 2023 1:26 AM
To: Quan, Evan <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>
Subject: Re: [V3 0/7] A new set of Linux OD interfacesFor consistency with the other OD interface, we'd probably want an "r" option to reset each attribute to the default state again.
Alex
Quoted 5 lines · Alex Deucher
Series is:
Reviewed-by Alex Deucher <[email protected]>On Wed, Aug 30, 2023 at 2:35 AM Evan Quan <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
The existing OD interface
pp_od_clk_voltageis unable to meet the growing demands for more OD functionalities. Since the buf used within it comes with size limit as one page. With more OD functionalities added, we will hit that limit soon.To better meet the growing demainds, a new set of OD interfaces are
designed.
Quoted 4 lines
Quoted 4 lines
With this new design, there will be multiple interfaces exposed with each representing a single OD functionality. And all those interfaces will be arranged in a tree liked hierarchy as below. Meanwhile all functionalities for the same component will be arranged
under the same directory.
Quoted 9 lines
Quoted 9 lines
gpu_od/
├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperatureQuoted 4 lines
Quoted 4 lines
Evan Quan (7):
drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization sequences drm/amd/pm: add fan temperature/pwm curve OD setting support forSMU13
Quoted 9 lines
Quoted 9 lines
drm/amd/pm: add fan acoustic limit OD setting support for SMU13 drm/amd/pm: add fan acoustic target OD setting support for SMU13 drm/amd/pm: add fan target temperature OD setting support for SMU13 drm/amd/pm: add fan minimum pwm OD setting support for SMU13
Documentation/gpu/amdgpu/thermal.rst | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 39 +- .../gpu/drm/amd/include/kgd_pp_interface.h | 12 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 730+++++++++++++++++-
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 14 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 5 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 298 ++++++- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 298 ++++++- 9 files changed, 1411 insertions(+), 25 deletions(-)--
2.34.1