mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Route DCN6 mode programming calcs through function pointer table
[Why] dml2_core_dcn6_funcs_mode_programming.c called DCN5 and DCN6 calcs functions directly by name, coupling the mode programming flow to specific generations. Routing through the calcs table lets a future core generation reuse this flow without editing it. [How] Add a static get_calcs(ctx) helper returning ctx->calcs->dcn6. Replace every direct dcn5_*/dcn6_* calcs call with get_calcs(ctx)->slot(...). dcn6_populate_mode_programming() did not previously receive the mp context, so thread calc_mp_ctx through it to reach get_calcs() for its three calcs calls. Assign ctx->calcs from core->calcs in dcn6_mp_build_calculate_mp_context(). Drop the now-unused dml2_core_dcn5_calcs_dchub.h, dml2_core_dcn5_calcs_display_pipe.h, and dml2_core_dcn6_calcs_dchub.h includes in favor of dml2_core_dcn6_calcs.h. Reviewed-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Ray Wu <ray.wu@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
67b4276313
commit
9e82ad24da
1 changed files with 23 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue