]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd/display: eliminate clock manager code duplication
authorGabe Teeger <gabe.teeger@amd.com>
Wed, 11 Mar 2026 18:34:30 +0000 (14:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Mar 2026 18:55:08 +0000 (14:55 -0400)
commit8424ee7d524965c2ce245d30f7c778763e8c6f54
treeaf3d2cdcd409342edc9faf827f4b5999890edec0
parentd77ff7331fc34ba84a70914b316a55056d94827d
drm/amd/display: eliminate clock manager code duplication

[Why]
Clock manager contained significant duplicate code between
variants with identical logic for functions using only SMU
calls or shared registers. This increases maintenance overhead
and potential for bugs.

[How]
Expose clock constants and internal functions in header for
sharing. Remove duplicate implementations and update function
pointers to use shared functions. Refactor remaining
variant-specific functions to use shared constants and helper
functions. Add compatibility comments for hardware differences.

Reviewed-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h