]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display/dc: Refactor remove duplications
authorLuan Arcanjo <luanicaro@usp.br>
Tue, 25 Feb 2025 01:55:29 +0000 (22:55 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Feb 2025 20:52:32 +0000 (15:52 -0500)
commitb5838d1517e229111453ef9177bacafa39f3f1c2
treebbcf06325e9f4759cad4dfc45d3d50e23986868b
parent4d1b653571c09f63a5970aea5efdbdee7a1520dc
drm/amd/display/dc: Refactor remove duplications

All dce command_table_helper's shares a copy-pasted collection
of copy-pasted functions, which are: phy_id_to_atom,
clock_source_id_to_atom_phy_clk_src_id, and engine_bp_to_atom.

This patch removes the multiple copy-pasted by moving them to
the command_table_helper.c and make the command_table_helper's
calls the functions implemented by the command_table_helper.c
instead.

The changes were not tested on actual hardware. I am only able
to verify that the changes keep the code compileable and do my
best to to look repeatedly if I am not actually changing any code.

This is the version 4 of the PATCH, fixed comments about
licence in the new files and the matches From email to
Signed-off-by email. Fixed comments about using
command_table_helper instead of creating a dce_common

Signed-off-by: Luan Icaro Pinto Arcanjo <luanicaro@usp.br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c
drivers/gpu/drm/amd/display/dc/bios/command_table_helper.h
drivers/gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c
drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper2_dce112.c
drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c
drivers/gpu/drm/amd/display/dc/bios/dce60/command_table_helper_dce60.c
drivers/gpu/drm/amd/display/dc/bios/dce80/command_table_helper_dce80.c