Skip to content

drm/amd: Delete defunct DAL power level code

Timur Kristóf amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14drm/amd/display: Delete unimplemented dm_pp_apply_power_level_change_request()drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +2 more+0 -393 replies
2/14drm/amd/display: Delete dce_get_required_clocks_state()drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.h+0 -371 reply
3/14drm/amd/display: Remove min/max clock levels from clk_mgrdrivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h+0 -313 replies
4/14drm/amd/display: Delete max_clocks_state from dm_pp_static_clock_infodrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c drivers/gpu/drm/amd/display/dc/dm_services_types.h+0 -311 reply
5/14drm/amd/display: Set max supported display clock without max_clks_by_statedrivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c+11 -53 replies
6/14drm/amd/display: Delete max_clks_by_state from DCE clock managerdrivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c drivers/gpu/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c +2 more+0 -1221 reply
7/14drm/amd/display: Delete disp_clk_voltage from integrated infodrivers/gpu/drm/amd/display/dc/bios/bios_parser.c drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h+0 -542 replies
8/14drm/amd/display: Delete dm_pp_clocks_statedrivers/gpu/drm/amd/display/dc/dm_services_types.h+0 -272 replies
9/14drm/amd/pm: Delete unused get_display_power_level() functiondrivers/gpu/drm/amd/include/kgd_pp_interface.h drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c+0 -141 reply
10/14drm/amd/pm: Delete dummy get_dal_power_level implementationsdrivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c +1 more+0 -551 reply
11/14drm/amd/pm: Delete non-functional SMU8 get_dal_power_level implementationdrivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c+0 -221 reply
12/14drm/amd/pm: Delete vddc_dep_on_dal_pwrldrivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c +2 more+0 -891 reply
13/14drm/amd/pm: Delete get_dal_power_leveldrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c drivers/gpu/drm/amd/include/dm_pp_interface.h drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +3 more+0 -291 reply
14/14drm/amd/pm: Delete PP_DAL_POWERLEVELdrivers/gpu/drm/amd/include/dm_pp_interface.h+0 -181 reply

Reviews trailers per patch

12 of 14 patches have a Reviewed-by or Acked-by.

PatchMelissa Wen
1/14R-b
2/14R-b
3/14R-b
4/14R-b
5/14R-b
6/14
7/14
8/14R-b
9/14R-b
10/14R-b
11/14R-b
12/14R-b
13/14R-b
14/14R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/14] drm/amd: Delete defunct DAL power level code

Delete unused code related to DAL power levels. It seems that the DAL power level concept has been never fully implemented and was thus non-functional in amdgpu.

DCE 11.0 and 11.2 never actually relied on the power level because they calculate all necessary power requirements in dce_calcs and communicate that using dm_pp_apply_display_requirements() to the power management code.

DCE 6, 8 and 10 also didn't rely on power levels because they always just set the maximum possible display clock and the power management code already takes that into account when setting the power state. This was somewhat improved recently by also using dm_pp_apply_display_requirements() on these DCE versions.

The code base for newer GPUs doesn't use the concept of power levels anymore either, so this change reduces the maintenance burden of the old DCE code.

On the DC side:

dm_pp_apply_power_level_change_request() was never implemented in amdgpu_dm, and DC has been working fine for years without it. Let's delete the dummy function and the code that calls it.

With that, we can also delete the power levels and the static arrays containing hardcoded power level values. These were never used for anything, only for finding the maximum supported display clock.

On the AMDGPU PM side:

The get_dal_power_level() implementations were dummy on SMU10, Vega10, Vega12 and Vega20 meaning that they didn't return an actual DAL power level, and were non-functional on SMU8 which always returned the highest possible power level. Nothing actually relied on the power level returned by these functions. Let's delete them.

What's next:

After this code cleanup lands, I have plans to further improve display power management on old DCE.

Timur Kristóf (14):
drm/amd/display: Delete unimplemented
dm_pp_apply_power_level_change_request()
drm/amd/display: Delete dce_get_required_clocks_state() drm/amd/display: Remove min/max clock levels from clk_mgr drm/amd/display: Delete max_clocks_state from dm_pp_static_clock_info drm/amd/display: Set max supported display clock without
max_clks_by_state
drm/amd/display: Delete max_clks_by_state from DCE clock manager drm/amd/display: Delete disp_clk_voltage from integrated info drm/amd/display: Delete dm_pp_clocks_state
drm/amd/pm: Delete unused get_display_power_level() function drm/amd/pm: Delete dummy get_dal_power_level implementations drm/amd/pm: Delete non-functional SMU8 get_dal_power_level
implementation
drm/amd/pm: Delete vddc_dep_on_dal_pwrl
drm/amd/pm: Delete get_dal_power_level
drm/amd/pm: Delete PP_DAL_POWERLEVEL

 .../amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c  |  39 -----
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  36 -----
 .../drm/amd/display/dc/bios/bios_parser2.c    |   9 --
 .../display/dc/clk_mgr/dce100/dce_clk_mgr.c   | 144 ++----------------
 .../display/dc/clk_mgr/dce100/dce_clk_mgr.h   |   3 -
 .../dc/clk_mgr/dce110/dce110_clk_mgr.c        |  25 ---
 .../dc/clk_mgr/dce112/dce112_clk_mgr.c        |  41 -----
 .../dc/clk_mgr/dce120/dce120_clk_mgr.c        |  16 --
 drivers/gpu/drm/amd/display/dc/dm_services.h  |   4 -
 .../drm/amd/display/dc/dm_services_types.h    |  30 ----
 .../amd/display/dc/inc/hw/clk_mgr_internal.h  |   4 -
 .../display/include/grph_object_ctrl_defs.h   |   9 --
 drivers/gpu/drm/amd/include/dm_pp_interface.h |  19 ---
 .../gpu/drm/amd/include/kgd_pp_interface.h    |   2 -
 .../gpu/drm/amd/pm/powerplay/amd_powerplay.c  |  22 ---
 .../amd/pm/powerplay/hwmgr/hardwaremanager.c  |  10 --
 .../amd/pm/powerplay/hwmgr/processpptables.c  |   1 -
 .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c  |  48 ------
 .../drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c   |  64 --------
 .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c |  18 ---
 .../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c |  16 --
 .../drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c |  17 ---
 .../amd/pm/powerplay/inc/hardwaremanager.h    |   3 -
 drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h  |   4 -
 24 files changed, 11 insertions(+), 573 deletions(-)
Signature · 1 line
2.53.0