]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: wire DCN42B mcache programming callback
authorPengpeng Hou <pengpeng@iscas.ac.cn>
Thu, 25 Jun 2026 06:06:47 +0000 (14:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Jul 2026 21:41:33 +0000 (17:41 -0400)
DCN42B enables DML2 and DML21 by default and defines
dcn42b_prepare_mcache_programming(), but the resource function table only
wires the callback when CONFIG_DRM_AMD_DC_DML21 is defined.

There is no in-tree Kconfig symbol named DRM_AMD_DC_DML21, so the
preprocessor always removes the callback entry.  Sibling DCN42 and DCN401
resource tables wire their prepare_mcache_programming callbacks
unconditionally, and the core DC code already checks whether the callback
pointer is present before calling it.

Remove the stale guard so DCN42B exposes the callback relation that its
source and DML21 build world already provide.

This is an RFC patch draft from static conditional callback legality
auditing.  It needs AMD display maintainer review before submission as a
final fix.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: George Zhang <george.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 85453fb4ff726e1ddb9984ee83dca260903c5353)

drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c

index e9c33e3466ea3a45a454026bfa4eb8522b1a0d92..94e166c0a9b0b81c0e2ea4f27c55d36c359c751c 100644 (file)
@@ -1900,9 +1900,7 @@ static struct resource_funcs dcn42b_res_pool_funcs = {
        .update_soc_for_wm_a = dcn30_update_soc_for_wm_a,
        .add_phantom_pipes = dcn32_add_phantom_pipes,
        .calculate_mall_ways_from_bytes = dcn32_calculate_mall_ways_from_bytes,
-#ifdef CONFIG_DRM_AMD_DC_DML21
        .prepare_mcache_programming = dcn42b_prepare_mcache_programming,
-#endif
        .build_pipe_pix_clk_params = dcn42b_build_pipe_pix_clk_params,
        .get_power_profile = dcn401_get_power_profile,
        .get_vstartup_for_pipe = dcn401_get_vstartup_for_pipe,