amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 2
authorDarren Powell <darren.powell@amd.com>
Tue, 4 Apr 2023 03:37:50 +0000 (23:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Sep 2023 18:34:00 +0000 (14:34 -0400)
commitd62846f778f5dc4c521c4b1532ecf3f2d7fd78d9
tree5f706dbcaa661d98970d439d8ff4b8a5ccaaa7db
parent2ecf214b45a5969f6bf9c69b97d1bb9a721e0093
amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 2

 Use variables to remove ternary expression in print statement
 and improve readability. This will help to optimize the code
 duplication in the switch statement
 Also Changed:
  replaced single_dpm_table->count as iterator in for loops
    with safer clocks_num_levels value
  replaced dpm_table.value usage with local var clocks_mhz

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>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c