]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm: Deprecate print_clk_levels callback
authorLijo Lazar <lijo.lazar@amd.com>
Mon, 12 Jan 2026 12:52:58 +0000 (18:22 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Jan 2026 19:28:59 +0000 (14:28 -0500)
Use emit_clk_levels instead. Also, remove the unused helper function for
getting sysfs buffer offset.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h

index 3efd5cca3d097c04205f43ce9bd161e5bc56317a..1def04826f1064421eca7ffa57ab44ca26f6614b 100644 (file)
@@ -829,15 +829,6 @@ struct pptable_funcs {
         */
        int (*populate_umd_state_clk)(struct smu_context *smu);
 
-       /**
-        * @print_clk_levels: Print DPM clock levels for a clock domain
-        *                    to buffer. Star current level.
-        *
-        * Used for sysfs interfaces.
-        * Return: Number of characters written to the buffer
-        */
-       int (*print_clk_levels)(struct smu_context *smu, enum smu_clk_type clk_type, char *buf);
-
        /**
         * @emit_clk_levels: Print DPM clock levels for a clock domain
         *                    to buffer using sysfs_emit_at. Star current level.
index 4af587b42ddad6693ec163f0fc84621961a0953f..92ad2ece7a3630a53dceac2ce18446af7ca11c50 100644 (file)
@@ -187,19 +187,6 @@ int smu_cmn_get_combo_pptable(struct smu_context *smu);
 int smu_cmn_set_mp1_state(struct smu_context *smu,
                          enum pp_mp1_state mp1_state);
 
-/*
- * Helper function to make sysfs_emit_at() happy. Align buf to
- * the current page boundary and record the offset.
- */
-static inline void smu_cmn_get_sysfs_buf(char **buf, int *offset)
-{
-       if (!*buf || !offset)
-               return;
-
-       *offset = offset_in_page(*buf);
-       *buf -= *offset;
-}
-
 bool smu_cmn_is_audio_func_enabled(struct amdgpu_device *adev);
 void smu_cmn_generic_soc_policy_desc(struct smu_dpm_policy *policy);
 void smu_cmn_generic_plpd_policy_desc(struct smu_dpm_policy *policy);