DC Patches March 05, 2026
Subsystems (5)
cover DC Patches March 05, 2026
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fixes on compiler warnings
* Introduction of NV12/P010 formats to color pipeline
* Improvements on reply and DML2
* Enablment on DCN42
Charlene Liu (1):
drm/amd/display: Update underflow detection
ChunTao Tso (1):
drm/amd/display: Add new types to replay config
Clay King (1):
drm/amd/display: Clean up unused code
Gaghik Khachatrian (2):
drm/amd/display: Clean up NULL pointer warnings in dml2 drm/amd/display: Fix compile warnings in dml2_0
Harry Wentland (3):
drm/amd/display: Set chroma taps to 1 if luma taps are 1 drm/amd/display: Add NV12/P010 formats to primary plane drm/amd/display: Add COLOR_ENCODING/COLOR_RANGE to overlay planes
Ivan Lipski (2):
drm/amd/display: Add missing DCCG register entries for DCN20-DCN316 drm/amd/display: Check for S0i3 to be done before DCCG init on DCN21
Nicholas Kazlauskas (2):
drm/amd/display: Fix HWSS v3 fast path determination drm/amd/display: Add documentation and cleanup DMUB HW lock manager
Ovidiu Bunea (1):
drm/amd/display: Add min clock init for DML21 mode programming
Peichen Huang (1):
drm/amd/display: Return early from vesa replay enable function
Roman Li (3):
drm/amd/display: Enable dcn42 DC clk_mgr
drm/amd/display: Add DML support for dcn42
drm/amd/display: Sync dcn42 with DC 3.2.373
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.50.0 drm/amd/display: Promote DC to 3.2.373
Tom Chung (1):
drm/amd/display: Add back missing memory type in array
Weiguang Li (1):
drm/amd/display: Add ESD detection for replay recovery
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 6 +- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 16 + .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 1 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 301 +++++----- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 134 ++--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 1 - .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 61 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + .../gpu/drm/amd/display/dc/dc_spl_translate.c | 1 + drivers/gpu/drm/amd/display/dc/dc_trace.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 26 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 9 +- .../amd/display/dc/dccg/dcn21/dcn21_dccg.c | 21 +- .../amd/display/dc/dccg/dcn301/dcn301_dccg.h | 8 +- .../amd/display/dc/dccg/dcn31/dcn31_dccg.h | 5 +- .../amd/display/dc/dccg/dcn314/dcn314_dccg.h | 5 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../amd/display/dc/dccg/dcn42/dcn42_dccg.c | 59 +- .../amd/display/dc/dccg/dcn42/dcn42_dccg.h | 11 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 31 + .../gpu/drm/amd/display/dc/dml2_0/Makefile | 3 + .../amd/display/dc/dml2_0/display_mode_core.c | 4 +- .../dml2_0/dml21/dml21_translation_helper.c | 56 +- .../dml2_0/dml21/dml21_translation_helper.h | 1 + .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 15 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 263 +++++++++ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 3 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 111 ++++ .../dml21/src/dml2_core/dml2_core_dcn4.h | 1 + .../dml21/src/dml2_core/dml2_core_factory.c | 9 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 33 ++ .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 6 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.c | 76 +++ .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 2 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../amd/display/dc/dml2_0/dml2_mall_phantom.c | 41 +- .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 8 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 8 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../display/dc/hubbub/dcn401/dcn401_hubbub.c | 4 - .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 158 ++--- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 32 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 1 - .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 12 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 421 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 +- .../amd/display/dc/inc/hw/clk_mgr_internal.h | 73 ++- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../drm/amd/display/dc/link/link_detection.c | 12 +- .../dc/link/protocols/link_dp_irq_handler.c | 36 +- .../dc/link/protocols/link_dp_panel_replay.c | 23 +- .../link/protocols/link_edp_panel_control.c | 3 +- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 4 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 8 +- .../amd/display/dc/optc/dcn31/dcn31_optc.c | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn20/dcn20_resource.c | 2 - .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 163 +++++- .../dcn42/dcn42_soc_and_ip_translator.h | 1 + .../soc_and_ip_translator.c | 4 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 71 ++- .../gpu/drm/amd/display/include/dpcd_defs.h | 3 + .../include/asic_reg/clk/clk_15_0_0_offset.h | 44 ++ .../include/asic_reg/clk/clk_15_0_0_sh_mask.h | 52 ++ .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 108 files changed, 2675 insertions(+), 1902 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_sh_mask.h
--
2.43.0
PATCH 1/21 drm/amd/display: Clean up NULL pointer warnings in dml2
From: Gaghik Khachatrian <[email protected]>
This commit addresses multiple warnings by adding defensive checks for NULL pointers before dereferencing them. The changes ensure that pointers such as are validated, preventing potential undefined behavior.
--- .../amd/display/dc/dml2_0/dml2_mall_phantom.c | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c +38 -3
@@ -357,7 +357,7 @@ static bool enough_pipes_for_subvp(struct dml2_context *ctx, struct dc_state *st*/ static bool subvp_subvp_schedulable (struct dml2_context *ctx,struct dc_state *context) { -struct pipe_ctx *subvp_pipes[2 ]; +struct pipe_ctx *subvp_pipes[2 ] = {NULL ,NULL };struct dc_stream_state *phantom =NULL ;uint32_t microschedule_lines =0 ;uint32_t index =0 ;
@@ -369,6 +369,9 @@ static bool subvp_subvp_schedulable(struct dml2_context *ctx, struct dc_state *cstruct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];uint32_t time_us =0 ; +if (pipe ==NULL || pipe->stream ==NULL ) +continue ; +/* Loop to calculate the maximum microschedule time between the two SubVP pipes, * and also to store the two main SubVP pipe pointers in subvp_pipes[2]. */
@@ -386,14 +389,19 @@ static bool subvp_subvp_schedulable(struct dml2_context *ctx, struct dc_state *cif (time_us > max_microschedule_us) max_microschedule_us = time_us; - subvp_pipes[index] = pipe; - index++; +if (index <2 ) + subvp_pipes[index++] = pipe;// Maximum 2 SubVP pipes if (index ==2 )break ; } } + +/* Minimal guard to avoid C6001 before subvp_pipes[0]/[1] dereference */ +if (index <2 || !subvp_pipes[0 ] || !subvp_pipes[1 ]) +return false; + vactive1_us = ((subvp_pipes[0 ]->stream->timing.v_addressable * subvp_pipes[0 ]->stream->timing.h_total) / (double )(subvp_pipes[0 ]->stream->timing.pix_clk_100hz *100 )) *1000000 ; vactive2_us = ((subvp_pipes[1]->stream->timing.v_addressable * subvp_pipes[1]->stream->timing.h_total) /
@@ -459,6 +467,11 @@ bool dml2_svp_drr_schedulable(struct dml2_context *ctx, struct dc_state *contextbreak ; } +if (pipe ==NULL || pipe->stream ==NULL ) { +// Defensive: should never happen, try to catch in debug +ASSERT (0 ); +return false; + } phantom_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream (context, pipe->stream); main_timing = &pipe->stream->timing; phantom_timing = &phantom_stream->timing;
@@ -549,6 +562,13 @@ static bool subvp_vblank_schedulable(struct dml2_context *ctx, struct dc_state *if (!subvp_pipe && pipe_mall_type ==SUBVP_MAIN ) subvp_pipe = pipe; } + +if (subvp_pipe ==NULL ) { +// Defensive: should never happen, catch in debug +ASSERT (0 ); +return false; + } +// Use ignore_msa_timing_param flag to identify as DRR if (found && context->res_ctx.pipe_ctx[vblank_index].stream->ignore_msa_timing_param) {// SUBVP + DRR case
@@ -753,6 +773,12 @@ static void enable_phantom_plane(struct dml2_context *ctx,return ; } +/* Minimal NULL guard for C6011 */ +if (!phantom_plane) { +ASSERT (0 ); +continue ; + } +memcpy (&phantom_plane->address, &curr_pipe->plane_state->address,sizeof (phantom_plane->address));memcpy (&phantom_plane->scaling_quality, &curr_pipe->plane_state->scaling_quality,sizeof (phantom_plane->scaling_quality));
@@ -880,6 +906,11 @@ bool dml2_svp_add_phantom_pipe_to_dc_state(struct dml2_context *ctx, struct dc_sif (ctx->config.svp_pstate.force_disable_subvp)return false; +if (!state) { +ASSERT (0 ); +return false; + } +if (!all_pipes_have_stream_and_plane (ctx, state))return false;
@@ -898,6 +929,10 @@ bool dml2_svp_add_phantom_pipe_to_dc_state(struct dml2_context *ctx, struct dc_s }if (enough_pipes_for_subvp (ctx, state) &&assign_subvp_pipe (ctx, state, &dc_pipe_idx)) { +if (state->res_ctx.pipe_ctx[dc_pipe_idx].stream ==NULL ) { +ASSERT (0 ); +return false; + } dml_pipe_idx =dml2_helper_find_dml_pipe_idx_by_stream_id (ctx, state->res_ctx.pipe_ctx[dc_pipe_idx].stream->stream_id); svp_height = mode_support_info->SubViewportLinesNeededInMALL[dml_pipe_idx]; vstartup =dml_get_vstartup_calculated (&ctx->v20.dml_core_ctx, dml_pipe_idx);
Signature · 1 line
2.43.0
PATCH 2/21 drm/amd/display: Return early from vesa replay enable function
In reply to Alex HungFrom: Peichen Huang <[email protected]>
[WHY & HOW]
If the enable state is already as expect then just return.
--- .../dc/link/protocols/link_dp_panel_replay.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c +12 -11
@@ -252,23 +252,24 @@ bool dp_pr_enable(struct dc_link *link, bool enable)if (!dp_pr_get_panel_inst (dc, link, &panel_inst))return false; +if (link->replay_settings.replay_allow_active == enable) +return true; +if (enable && !dc_is_embedded_signal (link->connector_signal))dp_pr_set_static_screen_param (link); -if (link->replay_settings.replay_allow_active != enable) { -//for sending PR enable commands to DMUB -memset (&cmd,0 ,sizeof (cmd)); +// for sending PR enable commands to DMUB +memset (&cmd,0 ,sizeof (cmd)); - cmd.pr_enable.header.type =DMUB_CMD__PR ; - cmd.pr_enable.header.sub_type =DMUB_CMD__PR_ENABLE ; - cmd.pr_enable.header.payload_bytes =sizeof (struct dmub_cmd_pr_enable_data ); - cmd.pr_enable.data.panel_inst = panel_inst; - cmd.pr_enable.data.enable = enable ?1 :0 ; + cmd.pr_enable.header.type =DMUB_CMD__PR ; + cmd.pr_enable.header.sub_type =DMUB_CMD__PR_ENABLE ; + cmd.pr_enable.header.payload_bytes =sizeof (struct dmub_cmd_pr_enable_data ); + cmd.pr_enable.data.panel_inst = panel_inst; + cmd.pr_enable.data.enable = enable ?1 :0 ; +dc_wake_and_execute_dmub_cmd (dc->ctx, &cmd,DM_DMUB_WAIT_TYPE_WAIT ); -dc_wake_and_execute_dmub_cmd (dc->ctx, &cmd,DM_DMUB_WAIT_TYPE_WAIT ); + link->replay_settings.replay_allow_active = enable; - link->replay_settings.replay_allow_active = enable; - }return true; }
Signature · 1 line
2.43.0
PATCH 3/21 drm/amd/display: Add min clock init for DML21 mode programming
In reply to Alex HungFrom: Ovidiu Bunea <[email protected]>
[WHY & HOW]
0 stream cases do not go through any DML validation which leaves DCN clocks in unoptimized states.
If requesting DML validation or programming with 0 streams, program DCN clocks to lowest DPM state.
--- .../dml2_0/dml21/dml21_translation_helper.c | 25 +++++++++++++++++++ .../dml2_0/dml21/dml21_translation_helper.h | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 1 + 3 files changed, 27 insertions(+)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +25 -0
@@ -931,3 +931,28 @@ void dml21_set_dc_p_state_type( } } +void dml21_init_min_clocks_for_dc_state (struct dml2_context *in_ctx,struct dc_state *context) +{ +unsigned int lowest_dpm_state_index =0 ; +struct dc_clocks *min_clocks = &context->bw_ctx.bw.dcn.clk; + + min_clocks->dispclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.dispclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->dppclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.dppclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->dcfclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.dcfclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->dramclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.uclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->fclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.fclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->idle_dramclk_khz =0 ; + min_clocks->idle_fclk_khz =0 ; + min_clocks->dcfclk_deep_sleep_khz =0 ; + min_clocks->fclk_p_state_change_support = true; + min_clocks->p_state_change_support = true; + min_clocks->dtbclk_en = false; + min_clocks->ref_dtbclk_khz =0 ; + min_clocks->socclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.socclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->subvp_prefetch_dramclk_khz =0 ; + min_clocks->subvp_prefetch_fclk_khz =0 ; + min_clocks->phyclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.phyclk.clk_values_khz[lowest_dpm_state_index]; + min_clocks->stutter_efficiency.base_efficiency =1 ; + min_clocks->stutter_efficiency.low_power_efficiency =1 ; +} +
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.h +1 -0
@@ -25,4 +25,5 @@ void dml21_map_hw_resources(struct dml2_context *dml_ctx);void dml21_get_pipe_mcache_config (struct dc_state *context,struct pipe_ctx *pipe_ctx,struct dml2_per_plane_programming *pln_prog,struct dml2_pipe_configuration_descriptor *mcache_pipe_config);void dml21_set_dc_p_state_type (struct pipe_ctx *pipe_ctx,struct dml2_per_stream_programming *stream_programming,bool sub_vp_enabled);unsigned int map_plane_to_dml21_display_cfg (const struct dml2_context *dml_ctx,unsigned int stream_id,const struct dc_plane_state *plane,const struct dc_state *context); +void dml21_init_min_clocks_for_dc_state (struct dml2_context *in_ctx,struct dc_state *context);#endif
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c +1 -0
@@ -215,6 +215,7 @@ static bool dml21_mode_check_and_programming(const struct dc *in_dc, struct dc_sreturn true;if (context->stream_count ==0 ) { +dml21_init_min_clocks_for_dc_state (dml_ctx, context);dml21_build_fams2_programming (in_dc, context, dml_ctx);return true; }
Signature · 1 line
2.43.0
PATCH 4/21 drm/amd/display: Set chroma taps to 1 if luma taps are 1
In reply to Alex HungFrom: Harry Wentland <[email protected]>
When luma is unscaled we also want chroma to be pixel-perfect. When luma taps are > 1 the result will be a blurred luma plane, even when the image isn't scaled.
This makes WIP IGT tests for CSC colorop pass.
Co-developed by Claude Sonnet 4.5.
--- drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +6 -2
@@ -172,10 +172,14 @@ bool dpp1_get_optimal_number_of_taps( scl_data->taps.h_taps_c = in_taps->h_taps_c;if (!dpp->ctx->dc->debug.always_scale) { -if (IDENTITY_RATIO (scl_data->ratios.horz)) +if (IDENTITY_RATIO (scl_data->ratios.horz)) { scl_data->taps.h_taps =1 ; -if (IDENTITY_RATIO (scl_data->ratios.vert)) + scl_data->taps.h_taps_c =1 ; + } +if (IDENTITY_RATIO (scl_data->ratios.vert)) { scl_data->taps.v_taps =1 ; + scl_data->taps.v_taps_c =1 ; + }if (IDENTITY_RATIO (scl_data->ratios.horz_c)) scl_data->taps.h_taps_c =1 ;if (IDENTITY_RATIO (scl_data->ratios.vert_c))
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +6 -2
@@ -524,10 +524,14 @@ bool dpp3_get_optimal_number_of_taps( scl_data->taps.v_taps_c = max_taps_c;if (!dpp->ctx->dc->debug.always_scale) { -if (IDENTITY_RATIO (scl_data->ratios.horz)) +if (IDENTITY_RATIO (scl_data->ratios.horz)) { scl_data->taps.h_taps =1 ; -if (IDENTITY_RATIO (scl_data->ratios.vert)) + scl_data->taps.h_taps_c =1 ; + } +if (IDENTITY_RATIO (scl_data->ratios.vert)) { scl_data->taps.v_taps =1 ; + scl_data->taps.v_taps_c =1 ; + }if (IDENTITY_RATIO (scl_data->ratios.horz_c)) scl_data->taps.h_taps_c =1 ;if (IDENTITY_RATIO (scl_data->ratios.vert_c))
Signature · 1 line
2.43.0
Re: [PATCH 04/21] drm/amd/display: Set chroma taps to 1 if luma taps are 1
Quoted 9 lines · Alex Hung
From: Harry Wentland <[email protected]>
When luma is unscaled we also want chroma to be pixel-perfect. When luma taps are > 1 the result will be a blurred luma plane, even when the image isn't scaled.
This makes WIP IGT tests for CSC colorop pass.
Co-developed by Claude Sonnet 4.5.
Nitpick: I understand this should be an Assisted-by: tag [1]
Same for other patches in this series with similar sentence.
[1] https://docs.kernel.org/process/coding-assistants.html
Quoted 51 lines
Reviewed-by Alex Hung <[email protected]>Signed-off-by Harry Wentland <[email protected]>Signed-off-by Alex Hung <[email protected]>--- drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 8 ++++++-- drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +6
-2@@ -172,10 +172,14 @@ bool dpp1_get_optimal_number_of_taps( scl_data->taps.h_taps_c = in_taps->h_taps_c;if (!dpp->ctx->dc->debug.always_scale) { -if (IDENTITY_RATIO (scl_data->ratios.horz)) +if (IDENTITY_RATIO (scl_data->ratios.horz)) { scl_data->taps.h_taps =1 ; -if (IDENTITY_RATIO (scl_data->ratios.vert)) + scl_data->taps.h_taps_c =1 ; + } +if (IDENTITY_RATIO (scl_data->ratios.vert)) { scl_data->taps.v_taps =1 ; + scl_data->taps.v_taps_c =1 ; + }if (IDENTITY_RATIO (scl_data->ratios.horz_c)) scl_data->taps.h_taps_c =1 ;if (IDENTITY_RATIO (scl_data->ratios.vert_c))drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +6
-2@@ -524,10 +524,14 @@ bool dpp3_get_optimal_number_of_taps( scl_data->taps.v_taps_c = max_taps_c;if (!dpp->ctx->dc->debug.always_scale) { -if (IDENTITY_RATIO (scl_data->ratios.horz)) +if (IDENTITY_RATIO (scl_data->ratios.horz)) { scl_data->taps.h_taps =1 ; -if (IDENTITY_RATIO (scl_data->ratios.vert)) + scl_data->taps.h_taps_c =1 ; + } +if (IDENTITY_RATIO (scl_data->ratios.vert)) { scl_data->taps.v_taps =1 ; + scl_data->taps.v_taps_c =1 ; + }if (IDENTITY_RATIO (scl_data->ratios.horz_c)) scl_data->taps.h_taps_c =1 ;if (IDENTITY_RATIO (scl_data->ratios.vert_c))
PATCH 5/21 drm/amd/display: Add NV12/P010 formats to primary plane
In reply to Alex HungFrom: Harry Wentland <[email protected]>
Add NV12, NV21, and P010 YUV formats to the primary plane's supported format list, enabling YUV content to be scanned out directly from the primary plane.
Co-developed by Claude Sonnet 4.5.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +3 -0
@@ -61,6 +61,9 @@ static const uint32_t rgb_formats[] = {DRM_FORMAT_XBGR8888 ,DRM_FORMAT_ABGR8888 ,DRM_FORMAT_RGB565 , +DRM_FORMAT_NV21 , +DRM_FORMAT_NV12 , +DRM_FORMAT_P010 }; static const uint32_t overlay_formats[] = {
Signature · 1 line
2.43.0
PATCH 6/21 drm/amd/display: Add COLOR_ENCODING/COLOR_RANGE to overlay planes
In reply to Alex HungFrom: Harry Wentland <[email protected]>
Extend COLOR_ENCODING and COLOR_RANGE property creation to overlay planes in addition to primary planes. This allows overlay planes to use YUV formats with proper color space configuration when the hardware supports NV12/P010 formats.
These properties control the YUV-to-RGB conversion matrix selection (BT.601/BT.709/BT.2020) and range handling (limited/full range).
Co-developed by Claude Sonnet 4.5.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +2 -1
@@ -1864,7 +1864,8 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,drm_plane_create_zpos_immutable_property (plane,255 ); } -if (plane->type ==DRM_PLANE_TYPE_PRIMARY && +if ((plane->type ==DRM_PLANE_TYPE_PRIMARY || + plane->type ==DRM_PLANE_TYPE_OVERLAY ) && plane_cap && (plane_cap->pixel_format_support.nv12 || plane_cap->pixel_format_support.p010)) {
Signature · 1 line
2.43.0
PATCH 7/21 drm/amd/display: Update underflow detection
In reply to Alex HungFrom: Charlene Liu <[email protected]>
[WHY]
Add underflow detection for later ASICs.
--- drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h | 6 +++++- drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h +5 -1
@@ -218,7 +218,7 @@uint32_t OTG_CRC_SIG_BLUE_CONTROL_MASK ; \uint32_t OTG_CRC_SIG_RED_GREEN_MASK ; \uint32_t OTG_DLPC_CONTROL ; \ -uint32_t OTG_DRR_CONTROL2 ; \ +uint32_t OTG_DRR_CONTOL2 ; \uint32_t OTG_DRR_TIMING_INT_STATUS ; \uint32_t OTG_GLOBAL_CONTROL3 ; \uint32_t OTG_GLOBAL_SYNC_STATUS ; \
@@ -676,6 +676,10 @@ struct dcn_optc_registers {type OTG_V_COUNT_STOP_TIMER ;#define TG_REG_FIELD_LIST_DCN3_6 (type) \ + type OPTC_RSMU_UNDERFLOW_CLEAR;\ + type OPTC_RSMU_UNDERFLOW_OCCURRED_STATUS;\ + type OPTC_RSMU_UNDERFLOW_INT_EN;\ + type OPTC_RSMU_UNDERFLOW_INT_STATUS;\ type OTG_CRC_POLY_SEL; \ type CRC0_R_CR32; \ type CRC0_G_Y32; \
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c +1 -1
@@ -363,7 +363,7 @@ void optc31_read_reg_state(struct timing_generator *optc, struct dcn_optc_reg_st optc_reg_state->otg_crc3_data_rg =REG_READ (OTG_CRC3_DATA_RG ); optc_reg_state->otg_dlpc_control =REG_READ (OTG_DLPC_CONTROL ); optc_reg_state->otg_double_buffer_control =REG_READ (OTG_DOUBLE_BUFFER_CONTROL ); - optc_reg_state->otg_drr_control2 =REG_READ (OTG_DRR_CONTROL2 ); + optc_reg_state->otg_drr_control2 =REG_READ (OTG_DRR_CONTOL2 ); optc_reg_state->otg_drr_control =REG_READ (OTG_DRR_CONTROL ); optc_reg_state->otg_drr_timing_int_status =REG_READ (OTG_DRR_TIMING_INT_STATUS ); optc_reg_state->otg_drr_trigger_window =REG_READ (OTG_DRR_TRIGGER_WINDOW );
Signature · 1 line
2.43.0
PATCH 8/21 drm/amd/display: Add ESD detection for replay recovery
In reply to Alex HungFrom: Weiguang Li <[email protected]>
[HOW]
Add Replay recovery flow so that when HPD occurs and ESD is detected, Replay can restore the system back to normal.
--- .../dc/link/protocols/link_dp_irq_handler.c | 36 +++++++++++++------ .../gpu/drm/amd/display/include/dpcd_defs.h | 3 ++ 2 files changed, 28 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c +25 -11
@@ -223,9 +223,10 @@ static void handle_hpd_irq_vesa_replay_sink(struct dc_link *link) } } -static void handle_hpd_irq_replay_sink (struct dc_link *link) +static void handle_hpd_irq_replay_sink (struct dc_link *link,bool *need_re_enable) {union dpcd_replay_configuration replay_configuration = {0 }; +union dpcd_replay_configuration replay_sink_status = {0 };/*AMD Replay version reuse DP_PSR_ERROR_STATUS for REPLAY_ERROR status.*/ union psr_error_status replay_error_status = {0 };bool ret = false;
@@ -265,9 +266,17 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link) &replay_error_status.raw, sizeof(replay_error_status.raw)); +dm_helpers_dp_read_dpcd ( + link->ctx, + link, +DP_PR_REPLAY_SINK_STATUS , + &replay_sink_status.raw, +1 ); +if (replay_error_status.bits.LINK_CRC_ERROR || replay_configuration.bits.DESYNC_ERROR_STATUS || - replay_configuration.bits.STATE_TRANSITION_ERROR_STATUS) { + replay_configuration.bits.STATE_TRANSITION_ERROR_STATUS || + replay_sink_status.bits.SINK_DEVICE_REPLAY_STATUS ==0x7 ) {bool allow_active; link->replay_settings.config.replay_error_status.raw |= replay_error_status.raw;
@@ -299,8 +308,7 @@ static void handle_hpd_irq_replay_sink(struct dc_link *link)if (link->replay_settings.replay_allow_active) { allow_active = false;edp_set_replay_allow_active (link, &allow_active, true, false,NULL ); - allow_active = true; -edp_set_replay_allow_active (link, &allow_active, true, false,NULL ); + *need_re_enable = true; } } }
@@ -460,6 +468,7 @@ bool dp_handle_hpd_rx_irq(struct dc_link *link,union device_service_irq device_service_clear = {0 };enum dc_status result;bool status = false; +bool replay_re_enable_needed = false;if (out_link_loss) *out_link_loss = false;
@@ -519,7 +528,7 @@ bool dp_handle_hpd_rx_irq(struct dc_link *link,/* PSR-related error was detected and handled */ return true; -handle_hpd_irq_replay_sink (link); +handle_hpd_irq_replay_sink (link, &replay_re_enable_needed);/* If PSR-related error handled, Main link may be off, * so do not handle as a normal sink status change interrupt.
@@ -538,16 +547,16 @@ bool dp_handle_hpd_rx_irq(struct dc_link *link,return false; } -/* For now we only handle 'Downstream port status' case. +/* Handle 'Downstream port status' case for all DP link types. * If we got sink count changed it means * Downstream port status changed, * then DM should call DC to do the detection. -* NOTE: Do not handle link loss on eDP since it is internal link +* NOTE: Now includes eDP link loss detection and retraining */ -if ((link->connector_signal !=SIGNAL_TYPE_EDP ) && -dp_parse_link_loss_status ( - link, - &hpd_irq_dpcd_data)) { + +if (dp_parse_link_loss_status ( + link, + &hpd_irq_dpcd_data)) {/* Connectivity log: link loss */ CONN_DATA_LINK_LOSS(link, hpd_irq_dpcd_data.raw,
@@ -576,6 +585,11 @@ bool dp_handle_hpd_rx_irq(struct dc_link *link, != link->dpcd_sink_count) status = true; +if (replay_re_enable_needed) { +bool allow_active = true; + +edp_set_replay_allow_active (link, &allow_active, true, false,NULL ); + }/* reasons for HPD RX: * 1. Link Loss - ie Re-train the Link * 2. MST sideband message
drivers/gpu/drm/amd/display/include/dpcd_defs.h +3 -0
@@ -64,6 +64,9 @@#ifndef DP_PR_ERROR_STATUS // can remove this once the define gets into linux drm_dp_helper.h #define DP_PR_ERROR_STATUS 0x2020/* DP 2.0 */ #endif /* DP_PR_ERROR_STATUS */ +#ifndef DP_PR_REPLAY_SINK_STATUS // can remove this once the define gets into linux drm_dp_helper.h +#define DP_PR_REPLAY_SINK_STATUS 0x2022 +#endif /* DP_PR_REPLAY_SINK_STATUS */ #ifndef DP_PR_LINK_CRC_ERROR // can remove this once the define gets into linux drm_dp_helper.h #define DP_PR_LINK_CRC_ERROR (1 << 0)#endif /* DP_PR_LINK_CRC_ERROR */
Signature · 1 line
2.43.0
PATCH 9/21 drm/amd/display: Add missing DCCG register entries for DCN20-DCN316
In reply to Alex HungFrom: Ivan Lipski <[email protected]>
Commit f5472343f468 ("drm/amd/display: Migrate DCCG registers access from hwseq to dccg component.") moved register writes from hwseq to dccg2_*() functions but did not add the registers to the DCCG register list macros. The struct fields default to 0, so REG_WRITE() targets MMIO offset 0, causing a GPU hang on resume (seen on DCN21/DCN30 during IGT kms_cursor_crc@cursor-suspend).
Add
- MICROSECOND_TIME_BASE_DIV
- MILLISECOND_TIME_BASE_DIV
- DCCG_GATE_DISABLE_CNTL
- DCCG_GATE_DISABLE_CNTL2
- DC_MEM_GLOBAL_PWR_REQ_CNTL
to macros in dcn20_dccg.h, dcn301_dccg.h, dcn31_dccg.h, and dcn314_dccg.h.
--- drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h | 6 +++++- drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.h | 8 +++++++- drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.h | 5 ++++- drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.h | 5 ++++- 4 files changed, 20 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h +5 -1
@@ -38,7 +38,11 @@ DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\ DCCG_SRII(PIXEL_RATE_CNTL, OTG, 1),\SR (DISPCLK_FREQ_CHANGE_CNTL ),\ - SR(DC_MEM_GLOBAL_PWR_REQ_CNTL) +SR (DC_MEM_GLOBAL_PWR_REQ_CNTL ),\ +SR (MICROSECOND_TIME_BASE_DIV ),\ +SR (MILLISECOND_TIME_BASE_DIV ),\ +SR (DCCG_GATE_DISABLE_CNTL ),\ + SR(DCCG_GATE_DISABLE_CNTL2)#define DCCG_REG_LIST_DCN2 () \ DCCG_COMMON_REG_LIST_DCN_BASE(),\
drivers/gpu/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.h +7 -1
@@ -34,7 +34,13 @@DCCG_SRII (DTO_PARAM ,DPPCLK ,1 ),\DCCG_SRII (DTO_PARAM ,DPPCLK ,2 ),\DCCG_SRII (DTO_PARAM ,DPPCLK ,3 ),\ - SR(REFCLK_CNTL) +SR (REFCLK_CNTL ),\ +SR (DISPCLK_FREQ_CHANGE_CNTL ),\ +SR (DC_MEM_GLOBAL_PWR_REQ_CNTL ),\ +SR (MICROSECOND_TIME_BASE_DIV ),\ +SR (MILLISECOND_TIME_BASE_DIV ),\ +SR (DCCG_GATE_DISABLE_CNTL ),\ + SR(DCCG_GATE_DISABLE_CNTL2) #define DCCG_MASK_SH_LIST_DCN301(mask_sh) \ DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 0, mask_sh),\
drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.h +4 -1
@@ -64,9 +64,12 @@SR (DSCCLK1_DTO_PARAM ),\SR (DSCCLK2_DTO_PARAM ),\SR (DSCCLK_DTO_CTRL ),\ +SR (DCCG_GATE_DISABLE_CNTL ),\SR (DCCG_GATE_DISABLE_CNTL2 ),\SR (DCCG_GATE_DISABLE_CNTL3 ),\ - SR(HDMISTREAMCLK0_DTO_PARAM) +SR (HDMISTREAMCLK0_DTO_PARAM ),\ +SR (DC_MEM_GLOBAL_PWR_REQ_CNTL ),\ + SR(MICROSECOND_TIME_BASE_DIV)#define DCCG_MASK_SH_LIST_DCN31 (mask_sh) \
drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.h +4 -1
@@ -70,11 +70,14 @@SR (DSCCLK2_DTO_PARAM ),\SR (DSCCLK3_DTO_PARAM ),\SR (DSCCLK_DTO_CTRL ),\ +SR (DCCG_GATE_DISABLE_CNTL ),\SR (DCCG_GATE_DISABLE_CNTL2 ),\SR (DCCG_GATE_DISABLE_CNTL3 ),\SR (HDMISTREAMCLK0_DTO_PARAM ),\SR (OTG_PIXEL_RATE_DIV ),\ - SR(DTBCLK_P_CNTL) +SR (DTBCLK_P_CNTL ),\ +SR (DC_MEM_GLOBAL_PWR_REQ_CNTL ),\ + SR(MICROSECOND_TIME_BASE_DIV)#define DCCG_MASK_SH_LIST_DCN314_COMMON (mask_sh) \ DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 0, mask_sh),\
Signature · 1 line
2.43.0
PATCH 10/21 drm/amd/display: Fix HWSS v3 fast path determination
In reply to Alex HungFrom: Nicholas Kazlauskas <[email protected]>
[WHY]
We're checking surface and stream updates after they've been applied to their respective states within update_planes_and_stream_state.
Medium updates under the HWSS V3 fast path that are not supported or tested are getting implicitly if they don't trigger a DML validation and getting updated in place on the dc->current_state context.
[HOW]
Fix this issue by moving up the fast path determination check prior to update_planes_and_stream_state. This is how the V2 path works and how the V3 path used to work prior to the refactors in this area.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 38 +++++++++++------------- 1 file changed, 18 insertions(+), 20 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +18 -20
@@ -7296,6 +7296,23 @@ static bool update_planes_and_stream_prepare_v3(ASSERT (scratch->flow ==UPDATE_V3_FLOW_INVALID );dc_exit_ips_for_hw_access (scratch->dc); +/* HWSS path determination needs to be done prior to updating the surface and stream states. */ +struct dc_fast_update fast_update[MAX_SURFACES ] = {0 }; + +populate_fast_updates (fast_update, + scratch->surface_updates, + scratch->surface_count, + scratch->stream_update); + +const bool is_hwss_fast_path_only = +fast_update_only (scratch->dc, + fast_update, + scratch->surface_updates, + scratch->surface_count, + scratch->stream_update, + scratch->stream) && + !scratch->dc->check_config.enable_legacy_fast_update; + if (!update_planes_and_stream_state( scratch->dc, scratch->surface_updates,
@@ -7311,26 +7328,7 @@ static bool update_planes_and_stream_prepare_v3(if (scratch->new_context == scratch->dc->current_state) {ASSERT (scratch->update_type <UPDATE_TYPE_FULL ); -// TODO: Do we need this to be alive in execute? -struct dc_fast_update fast_update[MAX_SURFACES ] = {0 }; - -populate_fast_updates ( - fast_update, - scratch->surface_updates, - scratch->surface_count, - scratch->stream_update - ); -const bool fast =fast_update_only ( - scratch->dc, - fast_update, - scratch->surface_updates, - scratch->surface_count, - scratch->stream_update, - scratch->stream - ) -// TODO: Can this be used to skip `populate_fast_updates`? - && !scratch->dc->check_config.enable_legacy_fast_update; - scratch->flow = fast + scratch->flow = is_hwss_fast_path_only ?UPDATE_V3_FLOW_NO_NEW_CONTEXT_CONTEXT_FAST :UPDATE_V3_FLOW_NO_NEW_CONTEXT_CONTEXT_FULL ;return true;
Signature · 1 line
2.43.0
PATCH 11/21 drm/amd/display: Add new types to replay config
In reply to Alex HungFrom: ChunTao Tso <[email protected]>
[WHAT]
Add FRAME_SKIPPING_ERROR_STATUS to dpcd_replay_configuration. Add received_frame_skipping_error_hpd to replay_config. Add REPLAY_GENERAL_CMD_SET_COASTING_VTOTAL_WITHOUT_FRAME_UPDATE to dmub_cmd_replay_general_subtype.
--- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc_dp_types.h +1 -1
@@ -1374,7 +1374,7 @@ union dpcd_replay_configuration { unsigned char DESYNC_ERROR_STATUS : 1; unsigned char SINK_DEVICE_REPLAY_STATUS : 3; unsigned char SINK_FRAME_LOCKED : 2; - unsigned char RESERVED : 1; + unsigned char FRAME_SKIPPING_ERROR_STATUS : 1; } bits;unsigned char raw; };
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -0
@@ -1194,6 +1194,8 @@ struct replay_config {union replay_optimization replay_optimization;/* Replay sub feature Frame Skipping is supported */ bool frame_skip_supported; +/* Replay Received Frame Skipping Error HPD. */ +bool received_frame_skipping_error_hpd; };/* Replay feature flags*/
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +1 -0
@@ -4441,6 +4441,7 @@ enum dmub_cmd_replay_general_subtype {REPLAY_GENERAL_CMD_SET_LOW_RR_ACTIVATE ,REPLAY_GENERAL_CMD_VIDEO_CONFERENCING ,REPLAY_GENERAL_CMD_SET_CONTINUOUSLY_RESYNC , + REPLAY_GENERAL_CMD_SET_COASTING_VTOTAL_WITHOUT_FRAME_UPDATE, }; struct dmub_alpm_auxless_data {
Signature · 1 line
2.43.0
PATCH 12/21 drm/amd/display: Add documentation and cleanup DMUB HW lock manager
In reply to Alex HungFrom: Nicholas Kazlauskas <[email protected]>
To document how the helpers should be used before a subsequent change adds new locations that these helpers will be used.
--- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h +18 -0
@@ -46,7 +46,25 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,* Return: true if the inbox1 lock should be used, false otherwise */ bool should_use_dmub_inbox1_lock (const struct dc *dc,const struct dc_link *link); + +/** +* dmub_hw_lock_mgr_does_link_require_lock() - Returns true if the link has a feature that needs the HW lock. +* +* @dc: Pointer to DC object +* @link: The link to check +* +* Return: true if the link has a feature that needs the HW lock, false otherwise +*/ bool dmub_hw_lock_mgr_does_link_require_lock (const struct dc *dc,const struct dc_link *link); + +/** +* dmub_hw_lock_mgr_does_context_require_lock() - Returns true if the context has any stream that needs the HW lock. +* +* @dc: Pointer to DC object +* @context: The context to check +* +* Return: true if the context has any stream that needs the HW lock, false otherwise +*/ bool dmub_hw_lock_mgr_does_context_require_lock (const struct dc *dc,const struct dc_state *context);#endif /*_DMUB_HW_LOCK_MGR_H_ */
Signature · 1 line
2.43.0
PATCH 13/21 drm/amd/display: Check for S0i3 to be done before DCCG init on DCN21
In reply to Alex HungFrom: Ivan Lipski <[email protected]>
[WHY]
On DCN21, dccg2_init() is called in dcn10_init_hw() before bios_golden_init(). During S0i3 resume, BIOS sets MICROSECOND_TIME_BASE_DIV to 0x00120464 as a marker. dccg2_init() overwrites this to 0x00120264, causing dcn21_s0i3_golden_init_wa() to misdetect the state and skip golden init.
Eventually during the resume sequence, a flip timeout occurs.
[HOW]
Skip DCCG on dccg2_is_s0i3_golden_init_wa_done() on DCN21.
--- .../amd/display/dc/dccg/dcn21/dcn21_dccg.c | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c +20 -1
@@ -96,6 +96,25 @@ static void dccg21_update_dpp_dto(struct dccg *dccg, int dpp_inst, int req_dppcl dccg->pipe_dppclk_khz[dpp_inst] = req_dppclk; } +/* +* On DCN21 S0i3 resume, BIOS programs MICROSECOND_TIME_BASE_DIV to +* 0x00120464 as a marker that golden init has already been done. +* dcn21_s0i3_golden_init_wa() reads this marker later in bios_golden_init() +* to decide whether to skip golden init. +* +* dccg2_init() unconditionally overwrites MICROSECOND_TIME_BASE_DIV to +* 0x00120264, destroying the marker before it can be read. +* +* Guard the call: if the S0i3 marker is present, skip dccg2_init() so the +* WA can function correctly. bios_golden_init() will handle init in that case. +*/ +static void dccg21_init (struct dccg *dccg) +{ +if (dccg2_is_s0i3_golden_init_wa_done (dccg)) +return ; + +dccg2_init (dccg); +}static const struct dccg_funcs dccg21_funcs = { .update_dpp_dto = dccg21_update_dpp_dto,
@@ -103,7 +122,7 @@ static const struct dccg_funcs dccg21_funcs = { .set_fifo_errdet_ovr_en = dccg2_set_fifo_errdet_ovr_en, .otg_add_pixel = dccg2_otg_add_pixel, .otg_drop_pixel = dccg2_otg_drop_pixel, - .dccg_init = dccg2_init, + .dccg_init = dccg21_init, .refclk_setup = dccg2_refclk_setup, /* Deprecated - for backward compatibility only */ .allow_clock_gating = dccg2_allow_clock_gating, .enable_memory_low_power = dccg2_enable_memory_low_power,
Signature · 1 line
2.43.0
PATCH 14/21 drm/amd/display: Fix compile warnings in dml2_0
In reply to Alex HungFrom: Gaghik Khachatrian <[email protected]>
Fix static analysis warnings by ensuring swath size temporaries are initialized before use. No functional change intended.
--- drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c +2 -2
@@ -4089,8 +4089,8 @@ static void CalculateSwathAndDETConfiguration(struct display_mode_lib_scratch_stdml_uint_t MaximumSwathHeightC[__DML_NUM_PLANES__];dml_uint_t RoundedUpMaxSwathSizeBytesY[__DML_NUM_PLANES__];dml_uint_t RoundedUpMaxSwathSizeBytesC[__DML_NUM_PLANES__]; -dml_uint_t RoundedUpSwathSizeBytesY[__DML_NUM_PLANES__]; -dml_uint_t RoundedUpSwathSizeBytesC[__DML_NUM_PLANES__]; +dml_uint_t RoundedUpSwathSizeBytesY[__DML_NUM_PLANES__] = {0 }; +dml_uint_t RoundedUpSwathSizeBytesC[__DML_NUM_PLANES__] = {0 };dml_uint_t SwathWidthSingleDPP[__DML_NUM_PLANES__];dml_uint_t SwathWidthSingleDPPChroma[__DML_NUM_PLANES__];
Signature · 1 line
2.43.0
PATCH 15/21 drm/amd/display: Add back missing memory type in array
In reply to Alex HungFrom: Tom Chung <[email protected]>
[WHY & HOW]
Add back some missing memory type in window_memory_type. It should be aligned with enum dmub_window_id.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -0
@@ -2469,6 +2469,8 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)DMUB_WINDOW_MEMORY_TYPE_FB ,//DMUB_WINDOW_7_SCRATCH_MEM DMUB_WINDOW_MEMORY_TYPE_FB ,//DMUB_WINDOW_IB_MEM DMUB_WINDOW_MEMORY_TYPE_FB ,//DMUB_WINDOW_SHARED_STATE +DMUB_WINDOW_MEMORY_TYPE_FB ,//DMUB_WINDOW_LSDMA_BUFFER + DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_CURSOR_OFFLOAD };int r;
Signature · 1 line
2.43.0
PATCH 16/21 drm/amd/display: Clean up unused code
In reply to Alex HungFrom: Clay King <[email protected]>
[WHAT]
Silence warning by cleaning up unused code.
--- .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 1 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 1 - drivers/gpu/drm/amd/display/dc/dc_trace.h | 4 +-- .../display/dc/hubbub/dcn401/dcn401_hubbub.c | 4 --- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 24 +++++++------- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 32 +++++++------------ .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 1 - .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 12 +++---- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 9 ------ .../drm/amd/display/dc/link/link_detection.c | 12 +------ .../link/protocols/link_edp_panel_control.c | 2 -- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 4 +-- .../dc/resource/dcn20/dcn20_resource.c | 2 -- 13 files changed, 35 insertions(+), 73 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +1 -0
@@ -547,6 +547,7 @@ void dcn3_clk_mgr_construct(/* in case we don't get a value from the register, use default */ if (clk_mgr->base.dentist_vco_freq_khz ==0 ) clk_mgr->base.dentist_vco_freq_khz =3650000 ; +/* Convert dprefclk units from MHz to KHz */ /* Value already divided by 10, some resolution lost */
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -1
@@ -2431,7 +2431,6 @@ static void resource_log_pipe_for_stream(struct dc *dc, struct dc_state *state,int slice_idx, dpp_idx, plane_idx, slice_count, dpp_count;bool is_primary; -DC_LOGGER_INIT (dc->ctx->logger); slice_count =resource_get_opp_heads_for_otg_master (otg_master, &state->res_ctx, opp_heads);
drivers/gpu/drm/amd/display/dc/dc_trace.h +2 -2
@@ -23,8 +23,8 @@#include "amdgpu_dm_trace.h" -#define TRACE_DC_PIPE_STATE (pipe_ctx, index, max_pipes) \ - for (index = 0; index < max_pipes; ++index) { \ +#define TRACE_DC_PIPE_STATE (pipe_ctx, max_pipes) \ + for (int index = 0; index < max_pipes; ++index) { \ struct pipe_ctx *pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[index]; \ if (pipe_ctx->plane_state) \ trace_amdgpu_dm_dc_pipe_state(pipe_ctx->pipe_idx, pipe_ctx->plane_state, \
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c +0 -4
@@ -1151,8 +1151,6 @@ void dcn401_program_compbuf_segments(struct hubbub *hubbub, unsigned compbuf_siz {struct dcn20_hubbub *hubbub2 =TO_DCN20_HUBBUB (hubbub); -unsigned int cur_compbuf_size_seg =0 ; -if (safe_to_increase || compbuf_size_seg <= hubbub2->compbuf_size_segments) {if (compbuf_size_seg > hubbub2->compbuf_size_segments) {REG_WAIT (DCHUBBUB_DET0_CTRL ,DET0_SIZE_CURRENT , hubbub2->det0_size,1 ,100 );
@@ -1165,8 +1163,6 @@ void dcn401_program_compbuf_segments(struct hubbub *hubbub, unsigned compbuf_siz + hubbub2->det3_size + compbuf_size_seg <= hubbub2->crb_size_segs);REG_UPDATE (DCHUBBUB_COMPBUF_CTRL ,COMPBUF_SIZE , compbuf_size_seg); hubbub2->compbuf_size_segments = compbuf_size_seg; - -ASSERT (REG_GET (DCHUBBUB_COMPBUF_CTRL ,CONFIG_ERROR , &cur_compbuf_size_seg) && !cur_compbuf_size_seg); } }
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +12 -12
@@ -86,9 +86,9 @@ hws->ctx#define DC_LOGGER \ - ctx->logger -#define DC_LOGGER_INIT () \ - struct dc_context *ctx = dc->ctx + dc_ctx->logger +#define DC_LOGGER_INIT (ctx) \ + struct dc_context *dc_ctx = ctx#define REG (reg)\ hws->regs->reg
@@ -687,7 +687,7 @@ dce110_external_encoder_control(enum bp_external_encoder_control_action action, .pixel_clock = timing ? timing->pix_clk_100hz / 10 : 300000, .color_depth = timing ? timing->display_color_depth : COLOR_DEPTH_888, }; -DC_LOGGER_INIT (); +DC_LOGGER_INIT (dc->ctx); bp_result = bios->funcs->external_encoder_control (bios, &ext_cntl);
@@ -767,13 +767,14 @@ void dce110_edp_wait_for_hpd_ready( struct dc_link *link, bool power_up) { -struct dc_context *ctx = link->ctx;struct graphics_object_id connector = link->link_enc->connector;bool edp_hpd_high = false;uint32_t time_elapsed =0 ;uint32_t timeout = power_up ?PANEL_POWER_UP_TIMEOUT :PANEL_POWER_DOWN_TIMEOUT ; +DC_LOGGER_INIT (link->ctx); +if (dal_graphics_object_id_get_connector_id (connector) !=CONNECTOR_ID_EDP ) {BREAK_TO_DEBUGGER ();
@@ -825,6 +826,7 @@ void dce110_edp_power_control(enum bp_result bp_result;uint8_t pwrseq_instance; +DC_LOGGER_INIT (ctx);if (dal_graphics_object_id_get_connector_id (link->link_enc->connector) !=CONNECTOR_ID_EDP ) {
@@ -993,6 +995,8 @@ void dce110_edp_backlight_control(unsigned int pre_T11_delay = (link->dpcd_sink_ext_caps.bits.oled ?OLED_PRE_T11_DELAY :0 );unsigned int post_T7_delay = (link->dpcd_sink_ext_caps.bits.oled ?OLED_POST_T7_DELAY :0 ); +DC_LOGGER_INIT (ctx); +if (dal_graphics_object_id_get_connector_id (link->link_enc->connector) !=CONNECTOR_ID_EDP ) {BREAK_TO_DEBUGGER ();
@@ -1969,8 +1973,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)bool keep_edp_vdd_on = false;bool should_clean_dsc_block = true;struct dc_bios *dcb = dc->ctx->dc_bios; -DC_LOGGER_INIT (); - +DC_LOGGER_INIT (dc->ctx);get_edp_links_with_sink (dc, edp_links_with_sink, &edp_with_sink_num);dc_get_edp_links (dc, edp_links, &edp_num);
@@ -2736,7 +2739,6 @@ static bool wait_for_reset_trigger_to_occur(struct dc_context *dc_ctx, struct timing_generator *tg) { - struct dc_context *ctx = dc_ctx; bool rc = false;/* To avoid endless loop we wait at most
@@ -2778,10 +2780,9 @@ static void dce110_enable_timing_synchronization(int group_size, struct pipe_ctx *grouped_pipes[]) { - struct dc_context *dc_ctx = dc->ctx; struct dcp_gsl_params gsl_params = { 0 };int i; -DC_LOGGER_INIT (); +DC_LOGGER_INIT (dc->ctx);DC_SYNC_INFO ("GSL: Setting-up...\n" );
@@ -2824,10 +2825,9 @@ static void dce110_enable_per_frame_crtc_position_reset(int group_size, struct pipe_ctx *grouped_pipes[]) { - struct dc_context *dc_ctx = dc->ctx; struct dcp_gsl_params gsl_params = { 0 };int i; -DC_LOGGER_INIT (); +DC_LOGGER_INIT (dc->ctx); gsl_params.gsl_group =0 ; gsl_params.gsl_master =0 ;
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +12 -20
@@ -60,9 +60,9 @@#include "dc_state_priv.h" #define DC_LOGGER \ - dc_logger -#define DC_LOGGER_INIT (logger) \ - struct dal_logger *dc_logger = logger + dc_ctx->logger +#define DC_LOGGER_INIT (ctx) \ + struct dc_context *dc_ctx = ctx#define CTX \ hws->ctx
@@ -1009,7 +1009,7 @@ static void power_on_plane_resources( struct dce_hwseq *hws, int plane_id) { -DC_LOGGER_INIT (hws->ctx->logger); +DC_LOGGER_INIT (hws->ctx);if (hws->funcs.dpp_root_clock_control) hws->funcs.dpp_root_clock_control (hws, plane_id, true);
@@ -1286,7 +1286,7 @@ static void dcn10_reset_back_end_for_pipe( {int i;struct dc_link *link; -DC_LOGGER_INIT (dc->ctx->logger); +DC_LOGGER_INIT (dc->ctx);if (pipe_ctx->stream_res.stream_enc ==NULL ) { pipe_ctx->stream =NULL ;return ;
@@ -1422,12 +1422,10 @@ void dcn10_verify_allow_pstate_change_high(struct dc *dc)return ;if (!hubbub->funcs->verify_allow_pstate_change_high (hubbub)) { -int i =0 ; -if (should_log_hw_state)dcn10_log_hw_state (dc,NULL ); -TRACE_DC_PIPE_STATE (pipe_ctx, i,MAX_PIPES ); +TRACE_DC_PIPE_STATE (pipe_ctx,MAX_PIPES );BREAK_TO_DEBUGGER ();if (dcn10_hw_wa_force_recovery (dc)) {/*check again*/
@@ -1490,7 +1488,7 @@ void dcn10_plane_atomic_power_down(struct dc *dc, struct hubp *hubp) {struct dce_hwseq *hws = dc->hwseq; -DC_LOGGER_INIT (dc->ctx->logger); +DC_LOGGER_INIT (dc->ctx);if (REG (DC_IP_REQUEST_CNTL )) { REG_SET(DC_IP_REQUEST_CNTL, 0,
@@ -1554,7 +1552,7 @@ void dcn10_plane_atomic_disable(struct dc *dc, struct pipe_ctx *pipe_ctx)void dcn10_disable_plane (struct dc *dc,struct dc_state *state,struct pipe_ctx *pipe_ctx) {struct dce_hwseq *hws = dc->hwseq; -DC_LOGGER_INIT (dc->ctx->logger); +DC_LOGGER_INIT (dc->ctx);if (!pipe_ctx->plane_res.hubp || pipe_ctx->plane_res.hubp->power_gated)return ;
@@ -2268,8 +2266,6 @@ static bool wait_for_reset_trigger_to_occur( {bool rc = false; -DC_LOGGER_INIT (dc_ctx->logger); -/* To avoid endless loop we wait at most * frames_to_wait_on_triggered_reset frames for the reset to occur. */ const uint32_t frames_to_wait_on_triggered_reset =10 ;
@@ -2384,7 +2380,6 @@ static uint8_t get_clock_divider(struct pipe_ctx *pipe,static int dcn10_align_pixel_clocks (struct dc *dc,int group_size,struct pipe_ctx *grouped_pipes[]) { -struct dc_context *dc_ctx = dc->ctx;int i, master =-1 , embedded =-1 ;struct dc_crtc_timing *hw_crtc_timing;uint64_t phase[MAX_PIPES ];
@@ -2397,7 +2392,7 @@ static int dcn10_align_pixel_clocks(struct dc *dc, int group_size,uint32_t dp_ref_clk_100hz = dc->res_pool->dp_clock_source->ctx->dc->clk_mgr->dprefclk_khz*10 ; -DC_LOGGER_INIT (dc_ctx->logger); +DC_LOGGER_INIT (dc->ctx); hw_crtc_timing =kcalloc (MAX_PIPES ,sizeof (*hw_crtc_timing),GFP_KERNEL );if (!hw_crtc_timing)
@@ -2477,12 +2472,11 @@ void dcn10_enable_vblanks_synchronization(int group_size, struct pipe_ctx *grouped_pipes[]) { - struct dc_context *dc_ctx = dc->ctx; struct output_pixel_processor *opp;struct timing_generator *tg;int i, width =0 , height =0 , master; -DC_LOGGER_INIT (dc_ctx->logger); +DC_LOGGER_INIT (dc->ctx);for (i =1 ; i < group_size; i++) { opp = grouped_pipes[i]->stream_res.opp;
@@ -2543,12 +2537,11 @@ void dcn10_enable_timing_synchronization(int group_size, struct pipe_ctx *grouped_pipes[]) { - struct dc_context *dc_ctx = dc->ctx; struct output_pixel_processor *opp;struct timing_generator *tg;int i, width =0 , height =0 ; -DC_LOGGER_INIT (dc_ctx->logger); +DC_LOGGER_INIT (dc->ctx);DC_SYNC_INFO ("Setting up OTG reset trigger\n" );
@@ -2624,10 +2617,9 @@ void dcn10_enable_per_frame_crtc_position_reset(int group_size, struct pipe_ctx *grouped_pipes[]) { - struct dc_context *dc_ctx = dc->ctx; int i; -DC_LOGGER_INIT (dc_ctx->logger); +DC_LOGGER_INIT (dc->ctx);DC_SYNC_INFO ("Setting up\n" );for (i =0 ; i < group_size; i++)
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +0 -1
@@ -513,7 +513,6 @@ static void dcn31_reset_back_end_for_pipe( {struct dc_link *link; -DC_LOGGER_INIT (dc->ctx->logger);if (pipe_ctx->stream_res.stream_enc ==NULL ) { pipe_ctx->stream =NULL ;return ;
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +6 -6
@@ -60,15 +60,15 @@#include "dcn20/dcn20_hwseq.h" #include "dc_state_priv.h" -#define DC_LOGGER_INIT (logger) \ - struct dal_logger *dc_logger = logger +#define DC_LOGGER \ + dc_ctx->logger +#define DC_LOGGER_INIT (ctx) \ + struct dc_context *dc_ctx = ctx#define CTX \ hws->ctx#define REG (reg)\ hws->regs->reg -#define DC_LOGGER \ - dc_logger#undef FN
@@ -331,7 +331,7 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)struct pipe_ctx *odm_pipe;int opp_cnt =1 ; -DC_LOGGER_INIT (stream->ctx->logger); +DC_LOGGER_INIT (stream->ctx);ASSERT (dsc);for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe)
@@ -897,7 +897,7 @@ void dcn35_disable_plane(struct dc *dc, struct dc_state *state, struct pipe_ctxbool is_phantom =dc_state_get_pipe_subvp_type (state, pipe_ctx) ==SUBVP_PHANTOM ;struct timing_generator *tg = is_phantom ? pipe_ctx->stream_res.tg :NULL ; -DC_LOGGER_INIT (dc->ctx->logger); +DC_LOGGER_INIT (dc->ctx);if (!pipe_ctx->plane_res.hubp || pipe_ctx->plane_res.hubp->power_gated)return ;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +0 -9
@@ -1982,7 +1982,6 @@ void dcn401_reset_back_end_for_pipe(struct dc_link *link = pipe_ctx->stream->link;const struct link_hwss *link_hwss =get_link_hwss (link, &pipe_ctx->link_res); -DC_LOGGER_INIT (dc->ctx->logger);if (pipe_ctx->stream_res.stream_enc ==NULL ) { pipe_ctx->stream =NULL ;return ;
@@ -2422,8 +2421,6 @@ void dcn401_program_front_end_for_ctx(struct dce_hwseq *hws = dc->hwseq;struct pipe_ctx *pipe =NULL ; -DC_LOGGER_INIT (dc->ctx->logger); -if (resource_is_pipe_topology_changed (dc->current_state, context))resource_log_pipe_topology_update (dc, context);
@@ -2587,8 +2584,6 @@ void dcn401_post_unlock_program_front_end(struct dce_hwseq *hwseq = dc->hwseq;int i; -DC_LOGGER_INIT (dc->ctx->logger); -for (i =0 ; i < dc->res_pool->pipe_count; i++)if (resource_is_pipe_type (&dc->current_state->res_ctx.pipe_ctx[i],OPP_HEAD ) && !resource_is_pipe_type (&context->res_ctx.pipe_ctx[i],OPP_HEAD ))
@@ -2968,8 +2963,6 @@ void dcn401_plane_atomic_power_down(struct dc *dc,struct dce_hwseq *hws = dc->hwseq;uint32_t org_ip_request_cntl =0 ; -DC_LOGGER_INIT (dc->ctx->logger); -if (REG (DC_IP_REQUEST_CNTL )) {REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl);if (org_ip_request_cntl ==0 )
@@ -3061,8 +3054,6 @@ void dcn401_plane_atomic_power_down_sequence(struct dc *dc,struct dce_hwseq *hws = dc->hwseq;uint32_t org_ip_request_cntl =0 ; -DC_LOGGER_INIT (dc->ctx->logger); -/* Check and set DC_IP_REQUEST_CNTL if needed */ if (REG (DC_IP_REQUEST_CNTL )) {REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl);
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -11
@@ -352,7 +352,7 @@ static void query_dp_dual_mode_adaptor( *dongle =DISPLAY_DONGLE_DP_DVI_DONGLE ; sink_cap->max_hdmi_pixel_clock =DP_ADAPTOR_DVI_MAX_TMDS_CLK ; -CONN_DATA_DETECT (ddc->link, type2_dongle_buf,sizeof (type2_dongle_buf), +CONN_DATA_DETECT (link, type2_dongle_buf,sizeof (type2_dongle_buf),"DP-DVI passive dongle %dMhz: " ,DP_ADAPTOR_DVI_MAX_TMDS_CLK /1000 );return ;
@@ -657,8 +657,6 @@ static bool wait_for_entering_dp_alt_mode(struct dc_link *link)unsigned long long time_taken_in_ns;int tries_taken; -DC_LOGGER_INIT (link->ctx->logger); -/** * this function will only exist if we are on dcn21 (is_in_alt_mode is a * function pointer, so checking to see if it is equal to 0 is the same
@@ -729,8 +727,6 @@ static void revert_dpia_mst_dsc_always_on_wa(struct dc_link *link)static bool discover_dp_mst_topology (struct dc_link *link,enum dc_detect_reason reason) { -DC_LOGGER_INIT (link->ctx->logger); -LINK_INFO ("link=%d, mst branch is now Connected\n" , link->link_index);
@@ -750,8 +746,6 @@ static bool discover_dp_mst_topology(struct dc_link *link, enum dc_detect_reasonbool link_reset_cur_dp_mst_topology (struct dc_link *link) { -DC_LOGGER_INIT (link->ctx->logger); -LINK_INFO ("link=%d, mst branch is now Disconnected\n" , link->link_index);
@@ -977,8 +971,6 @@ static bool detect_link_and_local_sink(struct dc_link *link,enum dc_connection_type new_connection_type = dc_connection_none;const uint32_t post_oui_delay =30 ;// 30ms -DC_LOGGER_INIT (link->ctx->logger); -if (dc_is_virtual_signal (link->connector_signal))return false;
@@ -1459,8 +1451,6 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason)bool is_delegated_to_mst_top_mgr = false;enum dc_connection_type pre_link_type = link->type; -DC_LOGGER_INIT (link->ctx->logger); - is_local_sink_detect_success =detect_link_and_local_sink (link, reason);if (is_local_sink_detect_success && link->local_sink)
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +0 -2
@@ -1094,8 +1094,6 @@ bool edp_send_replay_cmd(struct dc_link *link,if (!replay)return false; -DC_LOGGER_INIT (link->ctx->logger); -if (dp_pr_get_panel_inst (dc, link, &panel_inst)) cmd_data->panel_inst = panel_inst;else {
drivers/gpu/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c +1 -3
@@ -118,9 +118,7 @@ void mpc1_assert_idle_mpcc(struct mpc *mpc, int id)struct mpcc *mpc1_get_mpcc (struct mpc *mpc,int mpcc_id) { -struct dcn10_mpc *mpc10 =TO_DCN10_MPC (mpc); - -ASSERT (mpcc_id < mpc10->num_mpcc); +ASSERT (mpcc_id <TO_DCN10_MPC (mpc)->num_mpcc);return &(mpc->mpcc_array[mpcc_id]); }
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +0 -2
@@ -2342,8 +2342,6 @@ static bool init_soc_bounding_box(struct dc *dc,struct _vcs_dpi_ip_params_st *loaded_ip =get_asic_rev_ip_params (dc->ctx->asic_id.hw_internal_rev); -DC_LOGGER_INIT (dc->ctx->logger); -if (pool->base.pp_smu) {struct pp_smu_nv_clock_table max_clocks = {0 };unsigned int uclk_states[8 ] = {0 };
Signature · 1 line
2.43.0
PATCH 17/21 drm/amd/display: Enable dcn42 DC clk_mgr
In reply to Alex HungFrom: Roman Li <[email protected]>
Add support for DCN 4.2 clock manager.
--- .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 16 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 236 ++++++------ drivers/gpu/drm/amd/display/dc/core/dc.c | 1 + .../gpu/drm/amd/display/dc/dc_spl_translate.c | 1 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 3 +- .../amd/display/dc/dccg/dcn42/dcn42_dccg.c | 59 ++- .../amd/display/dc/dccg/dcn42/dcn42_dccg.h | 11 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 359 ++++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 +- .../amd/display/dc/inc/hw/clk_mgr_internal.h | 73 +++- .../link/protocols/link_edp_panel_control.c | 1 + .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 159 +++++++- .../dcn42/dcn42_soc_and_ip_translator.h | 1 + .../soc_and_ip_translator.c | 4 + .../include/asic_reg/clk/clk_15_0_0_offset.h | 44 +++ .../include/asic_reg/clk/clk_15_0_0_sh_mask.h | 52 +++ 17 files changed, 885 insertions(+), 140 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_sh_mask.h
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +16 -0
@@ -48,6 +48,7 @@#include "dcn32/dcn32_clk_mgr.h" #include "dcn35/dcn35_clk_mgr.h" #include "dcn401/dcn401_clk_mgr.h" +#include "dcn42/dcn42_clk_mgr.h" int clk_mgr_helper_get_active_display_cnt( struct dc *dc,
@@ -362,6 +363,18 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p return &clk_mgr->base; }break ; +case AMDGPU_FAMILY_GC_11_5_4 : { +struct clk_mgr_dcn42 *clk_mgr =kzalloc (sizeof (*clk_mgr),GFP_KERNEL ); + +if (clk_mgr ==NULL ) { +BREAK_TO_DEBUGGER (); +return NULL ; + } + +dcn42_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); +return &clk_mgr->base.base; + } +break ;#endif /* CONFIG_DRM_AMD_DC_FP */ default :ASSERT (0 );/* Unknown Asic */
@@ -419,6 +432,9 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)case AMDGPU_FAMILY_GC_12_0_0 :dcn401_clk_mgr_destroy (clk_mgr);break ; +case AMDGPU_FAMILY_GC_11_5_4 : +dcn42_clk_mgr_destroy (clk_mgr); +break ;default :break ;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +119 -117
316 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
@@ -5946,6 +5946,7 @@ bool dc_is_dmub_outbox_supported(struct dc *dc)case AMDGPU_FAMILY_GC_11_0_1 :case AMDGPU_FAMILY_GC_11_5_0 : +case AMDGPU_FAMILY_GC_11_5_4 :if (!dc->debug.dpia_debug.bits.disable_dpia)return true;break ;
drivers/gpu/drm/amd/display/dc/dc_spl_translate.c +1 -0
@@ -89,6 +89,7 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl spl_in->callbacks = dcn32_spl_callbacks;break ;case DCN_VERSION_4_01 : +case DCN_VERSION_4_2 : spl_in->callbacks = dcn401_spl_callbacks;break ;default :
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h +2 -1
@@ -374,7 +374,8 @@type OTG1_DROP_PIXEL ;\type OTG2_DROP_PIXEL ;\type OTG3_ADD_PIXEL ;\ -type OTG3_DROP_PIXEL ; +type OTG3_DROP_PIXEL ;\ +type RESYNC_FIFO_LEVEL_ADJUST_EN ;struct dccg_shift {DCCG_REG_FIELD_LIST (uint8_t )
drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c +57 -2
72 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.h +10 -1
@@ -238,7 +238,8 @@DCCG_SF (SYMCLKE_CLOCK_ENABLE ,SYMCLKE_SRC_SEL , mask_sh),\DCCG_SF (SYMCLKE_CLOCK_ENABLE ,SYMCLKE_CLOCK_ENABLE , mask_sh),\DCCG_SF (SYMCLKE_CLOCK_ENABLE ,SYMCLKE_FE_EN , mask_sh),\ - DCCG_SF(SYMCLKE_CLOCK_ENABLE, SYMCLKE_FE_SRC_SEL, mask_sh) +DCCG_SF (SYMCLKE_CLOCK_ENABLE ,SYMCLKE_FE_SRC_SEL , mask_sh),\ + DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, RESYNC_FIFO_LEVEL_ADJUST_EN, mask_sh) void dccg42_otg_add_pixel(struct dccg *dccg,
@@ -254,6 +255,14 @@ void dccg42_set_physymclk(enum physymclk_clock_source clk_src, bool force_enable); +void dccg42_set_pixel_rate_div ( +struct dccg *dccg, +uint32_t otg_inst, +enum pixel_rate_div tmds_div, +enum pixel_rate_div unused); + +void dccg42_trigger_dio_fifo_resync (struct dccg *dccg); + struct dccg *dccg42_create( struct dc_context *ctx, const struct dccg_registers *regs,
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h new file +359 -0
359 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h +1 -1
@@ -215,7 +215,7 @@ struct clk_state_registers_and_bypass {uint32_t dcfclk_bypass;uint32_t dprefclk_bypass;uint32_t dispclk_bypass; -uint32_t timer_threhold; +uint32_t timer_threshold; };struct rv1_clk_internal {
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h +56 -17
101 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +1 -0
@@ -847,6 +847,7 @@ bool edp_setup_psr(struct dc_link *link,case FAMILY_YELLOW_CARP :case AMDGPU_FAMILY_GC_10_3_6 :case AMDGPU_FAMILY_GC_11_0_1 : +case AMDGPU_FAMILY_GC_11_5_4 :if (dc->debug.disable_z10 || dc->debug.psr_skip_crtc_disable) psr_context->psr_level.bits.SKIP_CRTC_DISABLE = true;break ;
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile +3 -0
@@ -8,11 +8,14 @@ soc_and_ip_translator_ccflags := $(CC_FLAGS_FPU) soc_and_ip_translator_rcflags := $(CC_FLAGS_NO_FPU) CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) +CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) +CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) soc_and_ip_translator := soc_and_ip_translator.o soc_and_ip_translator += dcn401/dcn401_soc_and_ip_translator.o +soc_and_ip_translator += dcn42/dcn42_soc_and_ip_translator.o AMD_DAL_soc_and_ip_translator := $(addprefix $(AMDDALPATH)/dc/soc_and_ip_translator/, $(soc_and_ip_translator))
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c +158 -1
174 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h +1 -0
@@ -12,5 +12,6 @@#include "soc_and_ip_translator.h" void dcn42_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator); +void dcn42_get_soc_bb (struct dml2_soc_bb *soc_bb,const struct dc *dc,const struct dml2_configuration_options *config);#endif /* _DCN42_SOC_AND_IP_TRANSLATOR_H_ */
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c +4 -0
@@ -4,6 +4,7 @@#include "soc_and_ip_translator.h" #include "soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h" +#include "soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h" static void dc_construct_soc_and_ip_translator (struct soc_and_ip_translator *soc_and_ip_translator,enum dce_version dc_version)
@@ -12,6 +13,9 @@ static void dc_construct_soc_and_ip_translator(struct soc_and_ip_translator *soccase DCN_VERSION_4_01 :dcn401_construct_soc_and_ip_translator (soc_and_ip_translator);break ; +case DCN_VERSION_4_2 : +dcn42_construct_soc_and_ip_translator (soc_and_ip_translator); +break ;default :break ; }
drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_offset.h new file +44 -0
44 lines not on this page · raw message
drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_sh_mask.h new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 18/21 drm/amd/display: Add DML support for dcn42
In reply to Alex HungFrom: Roman Li <[email protected]>
DML support for DCN 4.2
--- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 3 + .../dml2_0/dml21/dml21_translation_helper.c | 13 ++ .../dc/dml2_0/dml21/inc/dml_top_types.h | 1 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 111 ++++++++++++++++++ .../dml21/src/dml2_core/dml2_core_dcn4.h | 1 + .../dml21/src/dml2_core/dml2_core_factory.c | 8 ++ .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 34 ++++++ .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 5 + .../dml21/src/dml2_mcg/dml2_mcg_dcn42.c | 76 ++++++++++++ .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 11 ++ .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + 13 files changed, 270 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.h
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +3 -0
@@ -90,6 +90,7 @@ CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.o := $(dml2 CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags) +CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_ccflags)
@@ -107,6 +108,7 @@ CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.o := $(d CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_rcflags) +CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.o := $(dml2_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_rcflags)
@@ -124,6 +126,7 @@ DML21 += src/dml2_core/dml2_core_dcn4_calcs.o DML21 += src/dml2_dpmm/dml2_dpmm_dcn4.o DML21 += src/dml2_dpmm/dml2_dpmm_factory.o DML21 += src/dml2_mcg/dml2_mcg_dcn4.o +DML21 += src/dml2_mcg/dml2_mcg_dcn42.o DML21 += src/dml2_mcg/dml2_mcg_factory.o DML21 += src/dml2_pmo/dml2_pmo_dcn3.o DML21 += src/dml2_pmo/dml2_pmo_factory.o
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +13 -0
@@ -45,6 +45,9 @@ static enum dml2_project_id dml21_dcn_revision_to_dml2_project_id(enum dce_versicase DCN_VERSION_4_01 : project_id = dml2_project_dcn4x_stage2_auto_drr_svp;break ; +case DCN_VERSION_4_2 : + project_id = dml2_project_dcn42; +break ;default : project_id = dml2_project_invalid;DC_ERR ("unsupported dcn version for DML21!" );
@@ -615,6 +618,13 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dmcase DC_CM2_GPU_MEM_SIZE_171717 : plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;break ; +case DC_CM2_GPU_MEM_SIZE_333333 : + plane->tdlut.tdlut_width_mode = dml2_tdlut_width_33_cube; +break ; +// handling when use case and HW support available +case DC_CM2_GPU_MEM_SIZE_454545 : +case DC_CM2_GPU_MEM_SIZE_656565 : +break ;case DC_CM2_GPU_MEM_SIZE_TRANSFORMED :default ://plane->tdlut.tdlut_width_mode = dml2_tdlut_width_flatten; // dml2_tdlut_width_flatten undefined
@@ -824,6 +834,9 @@ void dml21_copy_clocks_to_dc_state(struct dml2_context *in_ctx, struct dc_state context->bw_ctx.bw.dcn.clk.subvp_prefetch_fclk_khz = in_ctx->v21.mode_programming.programming->min_clocks.dcn4x.svp_prefetch_no_throttle.fclk_khz; context->bw_ctx.bw.dcn.clk.stutter_efficiency.base_efficiency = in_ctx->v21.mode_programming.programming->stutter.base_percent_efficiency; context->bw_ctx.bw.dcn.clk.stutter_efficiency.low_power_efficiency = in_ctx->v21.mode_programming.programming->stutter.low_power_percent_efficiency; + context->bw_ctx.bw.dcn.clk.stutter_efficiency.z8_stutter_efficiency = in_ctx->v21.mode_programming.programming->informative.power_management.z8.stutter_efficiency; + context->bw_ctx.bw.dcn.clk.stutter_efficiency.z8_stutter_period = in_ctx->v21.mode_programming.programming->informative.power_management.z8.stutter_period; + context->bw_ctx.bw.dcn.clk.zstate_support = in_ctx->v21.mode_programming.programming->z8_stutter.supported_in_blank;/*ignore meets_eco since it is not used*/ }static struct dml2_dchub_watermark_regs *wm_set_index_to_dc_wm_set (union dcn_watermark_set *watermarks,const enum dml2_dchub_watermark_reg_set_index wm_index)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_types.h +1 -0
@@ -19,6 +19,7 @@ enum dml2_project_id { dml2_project_dcn4x_stage1, dml2_project_dcn4x_stage2, dml2_project_dcn4x_stage2_auto_drr_svp, + dml2_project_dcn42, }; enum dml2_pstate_change_support {
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +111 -0
123 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.h +1 -0
@@ -5,6 +5,7 @@#ifndef __DML2_CORE_DCN4_H__#define __DML2_CORE_DCN4_H__bool core_dcn4_initialize (struct dml2_core_initialize_in_out *in_out); +bool core_dcn42_initialize (struct dml2_core_initialize_in_out *in_out);bool core_dcn4_mode_support (struct dml2_core_mode_support_in_out *in_out);bool core_dcn4_mode_programming (struct dml2_core_mode_programming_in_out *in_out);bool core_dcn4_populate_informative (struct dml2_core_populate_informative_in_out *in_out);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c +8 -0
@@ -30,6 +30,14 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation; result = true;break ; +case dml2_project_dcn42: + out->initialize = &core_dcn42_initialize; + out->mode_support = &core_dcn4_mode_support; + out->mode_programming = &core_dcn4_mode_programming; + out->populate_informative = &core_dcn4_populate_informative; + out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation; + result = true; +break ;case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +34 -0
@@ -802,3 +802,37 @@ bool dpmm_dcn4_map_watermarks(struct dml2_dpmm_map_watermarks_params_in_out *in_return true; } + +bool dpmm_dcn42_map_watermarks (struct dml2_dpmm_map_watermarks_params_in_out *in_out) +{ +const struct dml2_display_cfg *display_cfg = &in_out->display_cfg->display_config; +const struct dml2_core_internal_display_mode_lib *mode_lib = &in_out->core->clean_me_up.mode_lib; +struct dml2_dchub_global_register_set *dchubbub_regs = &in_out->programming->global_regs; + +double refclk_freq_in_mhz = (display_cfg->overrides.hw.dlg_ref_clk_mhz >0 ) ? (double )display_cfg->overrides.hw.dlg_ref_clk_mhz : mode_lib->soc.dchub_refclk_mhz; + +/* set A */ + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].fclk_pstate = (int unsigned )(mode_lib->mp.Watermark.FCLKChangeWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].sr_enter = (int unsigned )(mode_lib->mp.Watermark.StutterEnterPlusExitWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].sr_exit = (int unsigned )(mode_lib->mp.Watermark.StutterExitWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].sr_enter_z8 = (int unsigned )(mode_lib->mp.Watermark.Z8StutterEnterPlusExitWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].sr_exit_z8 = (int unsigned )(mode_lib->mp.Watermark.Z8StutterExitWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].temp_read_or_ppt = (int unsigned )(mode_lib->mp.Watermark.temp_read_or_ppt_watermark_us * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].uclk_pstate = (int unsigned )(mode_lib->mp.Watermark.DRAMClockChangeWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].urgent = (int unsigned )(mode_lib->mp.Watermark.UrgentWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].usr = (int unsigned )(mode_lib->mp.Watermark.USRRetrainingWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].refcyc_per_trip_to_mem = (unsigned int )(mode_lib->mp.Watermark.UrgentWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].refcyc_per_meta_trip_to_mem = (unsigned int )(mode_lib->mp.Watermark.UrgentWatermark * refclk_freq_in_mhz); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].frac_urg_bw_flip = (unsigned int )(mode_lib->mp.FractionOfUrgentBandwidthImmediateFlip *1000 ); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].frac_urg_bw_nom = (unsigned int )(mode_lib->mp.FractionOfUrgentBandwidth *1000 ); + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ].frac_urg_bw_mall = (unsigned int )(mode_lib->mp.FractionOfUrgentBandwidthMALL *1000 ); + +/* set B */ + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_B ] = dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ]; + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_C ] = dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ]; + dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_D ] = dchubbub_regs->wm_regs[DML2_DCHUB_WATERMARK_SET_A ]; + + dchubbub_regs->num_watermark_sets =4 ; + +return true; +}
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h +1 -0
@@ -10,5 +10,6 @@bool dpmm_dcn3_map_mode_to_soc_dpm (struct dml2_dpmm_map_mode_to_soc_dpm_params_in_out *in_out);bool dpmm_dcn4_map_mode_to_soc_dpm (struct dml2_dpmm_map_mode_to_soc_dpm_params_in_out *in_out);bool dpmm_dcn4_map_watermarks (struct dml2_dpmm_map_watermarks_params_in_out *in_out); +bool dpmm_dcn42_map_watermarks (struct dml2_dpmm_map_watermarks_params_in_out *in_out);#endif
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c +5 -0
@@ -41,6 +41,11 @@ bool dml2_dpmm_create(enum dml2_project_id project_id, struct dml2_dpmm_instance out->map_watermarks = &dpmm_dcn4_map_watermarks; result = true;break ; +case dml2_project_dcn42: + out->map_mode_to_soc_dpm = &dpmm_dcn4_map_mode_to_soc_dpm; + out->map_watermarks = &dpmm_dcn42_map_watermarks; + result = true; +break ;case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c new file +76 -0
76 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright 2026 Advanced Micro Devices, Inc. */ + +#ifndef __DML2_MCG_DCN42_H__ +#define __DML2_MCG_DCN42_H__ + +#include "dml2_internal_shared_types.h" + +bool mcg_dcn42_build_min_clock_table (struct dml2_mcg_build_min_clock_table_params_in_out *in_out); + +#endif
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c +5 -0
@@ -4,6 +4,7 @@#include "dml2_mcg_factory.h" #include "dml2_mcg_dcn4.h" +#include "dml2_mcg_dcn42.h" #include "dml2_external_lib_deps.h" static bool dummy_build_min_clock_table (struct dml2_mcg_build_min_clock_table_params_in_out *in_out)
@@ -30,6 +31,10 @@ bool dml2_mcg_create(enum dml2_project_id project_id, struct dml2_mcg_instance * out->build_min_clock_table = &mcg_dcn4_build_min_clock_table; result = true;break ; +case dml2_project_dcn42: + out->build_min_clock_table = &mcg_dcn42_build_min_clock_table; + result = true; +break ;case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c +1 -0
@@ -17,6 +17,7 @@ bool dml2_initialize_instance(struct dml2_initialize_instance_in_out *in_out)case dml2_project_dcn4x_stage1:case dml2_project_dcn4x_stage2:case dml2_project_dcn4x_stage2_auto_drr_svp: +case dml2_project_dcn42:return dml2_top_soc15_initialize_instance (in_out);case dml2_project_invalid:default :
Signature · 1 line
2.43.0
PATCH 19/21 drm/amd/display: Sync dcn42 with DC 3.2.373
In reply to Alex HungFrom: Roman Li <[email protected]>
This patch provides a bulk merge to align driver support for DCN42 with Display Core version 3.2.373.
It includes upgrade for:
- clk_mgr
- dml2/dml21
- optc
- hubp
- mpc
- optc
- hwseq
--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 141 +++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 95 ++- .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 59 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 24 + .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 13 + .../dml2_0/dml21/dml21_translation_helper.c | 30 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 14 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 308 ++++------ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 2 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 204 +++---- .../dml21/src/dml2_core/dml2_core_factory.c | 1 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 1 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 5 +- .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 136 +++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 412 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 12 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 38 +- .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 65 files changed, 1596 insertions(+), 1984 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +1 -10
@@ -794,13 +794,11 @@ static enum bp_result bios_parser_external_encoder_control(static enum bp_result bios_parser_dac_load_detection (struct dc_bios *dcb, -enum engine_id engine_id, -struct graphics_object_id ext_enc_id) +enum engine_id engine_id) {struct bios_parser *bp =BP_FROM_DCB (dcb);struct dc_context *ctx = dcb->ctx;struct bp_load_detection_parameters bp_params = {0 }; -struct bp_external_encoder_control ext_cntl = {0 };enum bp_result bp_result =BP_RESULT_UNSUPPORTED ;uint32_t bios_0_scratch;uint32_t device_id_mask =0 ;
@@ -826,13 +824,6 @@ static enum bp_result bios_parser_dac_load_detection( bp_params.engine_id = engine_id; bp_result = bp->cmd_tbl.dac_load_detection (bp, &bp_params); - }else if (ext_enc_id.id) { -if (!bp->cmd_tbl.external_encoder_control) -return BP_RESULT_UNSUPPORTED ; - - ext_cntl.action =EXTERNAL_ENCODER_CONTROL_DAC_LOAD_DETECT ; - ext_cntl.encoder_id = ext_enc_id; - bp_result = bp->cmd_tbl.external_encoder_control (bp, &ext_cntl); }if (bp_result !=BP_RESULT_OK )
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +76 -65
266 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h +1 -1
@@ -59,7 +59,6 @@ void dcn42_clk_mgr_construct(struct dc_context *ctx,void dcn42_clk_mgr_destroy (struct clk_mgr_internal *clk_mgr_int); -/* Exposed for dcn42b reuse */ void dcn42_init_single_clock (unsigned int *entry_0,uint32_t *smu_entry_0,uint8_t num_levels);
@@ -76,4 +75,5 @@ int dcn42_get_active_display_cnt_wa(struct dc *dc, struct dc_state *context, intvoid dcn42_update_clocks_update_dpp_dto (struct clk_mgr_internal *clk_mgr,struct dc_state *context,bool safe_to_lower);void dcn42_update_clocks_update_dtb_dto (struct clk_mgr_internal *clk_mgr,struct dc_state *context,int ref_dtbclk_khz);bool dcn42_is_spll_ssc_enabled (struct clk_mgr *clk_mgr_base); +bool dcn42_has_active_display (struct dc *dc,const struct dc_state *context);#endif //__DCN42_CLK_MGR_H__
drivers/gpu/drm/amd/display/dc/core/dc.c +42 -53
185 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +32 -9
121 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +9 -0
@@ -139,6 +139,9 @@ const struct dc_plane_status *dc_plane_get_status(if (pipe_ctx->plane_state && flags.bits.address) pipe_ctx->plane_state->status.is_flip_pending = false; +if (pipe_ctx->plane_state && flags.bits.histogram) +memset (&pipe_ctx->plane_state->status.cm_hist,0 , +sizeof (pipe_ctx->plane_state->status.cm_hist));break ; }
@@ -154,6 +157,12 @@ const struct dc_plane_status *dc_plane_get_status(if (flags.bits.address) dc->hwss.update_pending_status (pipe_ctx); +if (flags.bits.histogram) { +struct dpp *dpp = pipe_ctx->plane_res.dpp; + +if (dpp && dpp->funcs->dpp_cm_hist_read) + dpp->funcs->dpp_cm_hist_read (dpp, &pipe_ctx->plane_state->status.cm_hist); + } }return plane_status;
drivers/gpu/drm/amd/display/dc/dc.h +49 -10
101 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc_bios_types.h +1 -2
@@ -102,8 +102,7 @@ struct dc_vbios_funcs { struct bp_external_encoder_control *cntl);enum bp_result (*dac_load_detection)(struct dc_bios *bios, -enum engine_id engine_id, -struct graphics_object_id ext_enc_id); +enum engine_id engine_id);enum bp_result (*transmitter_control)(struct dc_bios *bios,struct bp_transmitter_control *cntl);
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +1 -1
@@ -276,7 +276,7 @@ enum otg_pwa_sync_mode { DC_OTG_PWA_FRAME_SYNC_MODE_VSTARTUP = 0x1, };struct otc_pwa_frame_sync { -enum otg_pwa_sync_mode pwa_sync_mode; +enum otg_pwa_sync_mode pwa_sync_mode;uint32_t pwa_frame_sync_line_offset; };
drivers/gpu/drm/amd/display/dc/dc_plane.h +1 -0
@@ -31,6 +31,7 @@union dc_plane_status_update_flags {struct {uint32_t address :1 ; +uint32_t histogram :1 ; } bits;uint32_t raw; };
drivers/gpu/drm/amd/display/dc/dc_types.h +24 -0
@@ -1483,4 +1483,28 @@ struct dc_validation_dpia_set { uint32_t required_bw; }; +enum dc_cm_lut_swizzle { +CM_LUT_3D_SWIZZLE_LINEAR_RGB , +CM_LUT_3D_SWIZZLE_LINEAR_BGR , +CM_LUT_1D_PACKED_LINEAR +}; + +enum dc_cm_lut_pixel_format { +CM_LUT_PIXEL_FORMAT_RGBA16161616_UNORM_12MSB , +CM_LUT_PIXEL_FORMAT_BGRA16161616_UNORM_12MSB , +CM_LUT_PIXEL_FORMAT_RGBA16161616_UNORM_12LSB , +CM_LUT_PIXEL_FORMAT_BGRA16161616_UNORM_12LSB , +CM_LUT_PIXEL_FORMAT_RGBA16161616_FLOAT_FP1_5_10 , +CM_LUT_PIXEL_FORMAT_BGRA16161616_FLOAT_FP1_5_10 +}; + +enum dc_cm_lut_size { +CM_LUT_SIZE_NONE , +CM_LUT_SIZE_999 , +CM_LUT_SIZE_171717 , +CM_LUT_SIZE_333333 , +CM_LUT_SIZE_454545 , +CM_LUT_SIZE_656565 , +}; +#endif /* DC_TYPES_H_ */
drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +20 -0
@@ -827,6 +827,16 @@ void dccg401_enable_symclk_se(struct dccg *dccg, uint32_t stream_enc_inst, uint3if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,SYMCLKD_FE_ROOT_GATE_DISABLE ,1 );break ; +case 4 : +if (dccg_dcn->dccg_mask->SYMCLKE_FE_ROOT_GATE_DISABLE) { +REG_UPDATE_2 (SYMCLKE_CLOCK_ENABLE , +SYMCLKE_FE_EN ,1 , +SYMCLKE_FE_SRC_SEL , link_enc_inst); +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,SYMCLKE_FE_ROOT_GATE_DISABLE ,1 ); + } +break ; +default : +return ; } }
@@ -855,6 +865,16 @@ void dccg401_disable_symclk_se(struct dccg *dccg, uint32_t stream_enc_inst, uintSYMCLKD_FE_EN ,0 , SYMCLKD_FE_SRC_SEL, 0);break ; +case 4 : +if (dccg_dcn->dccg_mask->SYMCLKE_FE_ROOT_GATE_DISABLE) { +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,SYMCLKE_FE_ROOT_GATE_DISABLE ,0 ); +REG_UPDATE_2 (SYMCLKE_CLOCK_ENABLE , +SYMCLKE_FE_EN ,0 , +SYMCLKE_FE_SRC_SEL ,0 ); + } +break ; +default : +return ; } }
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +16 -0
@@ -28,6 +28,14 @@#include "dc_types.h" #include "core_types.h" +static bool dmub_hw_lock_has_inbox0_lock (const struct dc *dc) +{ +return dc->ctx && dc->ctx->dmub_srv && + dc->hwss.dmub_hw_control_lock && + dc->hwss.dmub_hw_control_lock_fast && + dc->ctx->dmub_srv->dmub->meta_info.feature_bits.bits.inbox0_lock_support; +} + void dmub_hw_lock_mgr_cmd(struct dc_dmub_srv *dmub_srv, bool lock, union dmub_hw_lock_flags *hw_locks,
@@ -105,5 +113,13 @@ bool should_use_dmub_inbox1_lock(const struct dc *dc, const struct dc_link *linkif (dc->ctx->dce_version >=DCN_VERSION_4_01 )return false; +if (dmub_hw_lock_has_inbox0_lock (dc)) +return false; +return dmub_hw_lock_mgr_does_link_require_lock (dc, link); } + +bool should_use_dmub_inbox0_lock_for_link (const struct dc *dc,const struct dc_link *link) +{ +return dmub_hw_lock_has_inbox0_lock (dc) &&dmub_hw_lock_mgr_does_link_require_lock (dc, link); +}
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.h +13 -0
@@ -67,4 +67,17 @@ bool dmub_hw_lock_mgr_does_link_require_lock(const struct dc *dc, const struct d*/ bool dmub_hw_lock_mgr_does_context_require_lock (const struct dc *dc,const struct dc_state *context); +/** +* should_use_dmub_inbox0_lock_for_link() - Checks if the inbox0 interlock with DMU should be used. +* +* Is not functionally equivalent to inbox1 as DMUB will not own programming of the relevant locking +* registers. +* +* @dc: pointer to DC object +* @link: optional pointer to the link object to check for enabled link features +* +* Return: true if the inbox0 lock should be used, false otherwise +*/ +bool should_use_dmub_inbox0_lock_for_link (const struct dc *dc,const struct dc_link *link); +#endif /*_DMUB_HW_LOCK_MGR_H_ */
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +14 -16
@@ -601,36 +601,31 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm plane->composition.viewport.stationary = false; -if (plane_state->mcm_luts.lut3d_data.lut3d_src ==DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM ) { +if (plane_state->cm.flags.bits.lut3d_dma_enable) { plane->tdlut.setup_for_tdlut = true; -switch (plane_state->mcm_luts.lut3d_data.gpu_mem_params.layout) { -case DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_RGB : -case DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_BGR : +switch (plane_state->cm.lut3d_dma.swizzle) { +case CM_LUT_3D_SWIZZLE_LINEAR_RGB : +case CM_LUT_3D_SWIZZLE_LINEAR_BGR : plane->tdlut.tdlut_addressing_mode = dml2_tdlut_sw_linear;break ; -case DC_CM2_GPU_MEM_LAYOUT_1D_PACKED_LINEAR : +case CM_LUT_1D_PACKED_LINEAR : +default : plane->tdlut.tdlut_addressing_mode = dml2_tdlut_simple_linear;break ; } -switch (plane_state->mcm_luts.lut3d_data.gpu_mem_params.size) { -case DC_CM2_GPU_MEM_SIZE_171717 : - plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube; -break ; -case DC_CM2_GPU_MEM_SIZE_333333 : +switch (plane_state->cm.lut3d_dma.size) { +case CM_LUT_SIZE_333333 : plane->tdlut.tdlut_width_mode = dml2_tdlut_width_33_cube;break ; -// handling when use case and HW support available -case DC_CM2_GPU_MEM_SIZE_454545 : -case DC_CM2_GPU_MEM_SIZE_656565 : -break ; -case DC_CM2_GPU_MEM_SIZE_TRANSFORMED : +case CM_LUT_SIZE_171717 :default : -//plane->tdlut.tdlut_width_mode = dml2_tdlut_width_flatten; // dml2_tdlut_width_flatten undefined + plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;break ; } } + plane->tdlut.setup_for_tdlut |= dml_ctx->config.force_tdlut_enable; plane->dynamic_meta_data.enable = false;
@@ -967,5 +962,8 @@ void dml21_init_min_clocks_for_dc_state(struct dml2_context *in_ctx, struct dc_s min_clocks->phyclk_khz = in_ctx->v21.dml_init.soc_bb.clk_table.phyclk.clk_values_khz[lowest_dpm_state_index]; min_clocks->stutter_efficiency.base_efficiency =1 ; min_clocks->stutter_efficiency.low_power_efficiency =1 ; + min_clocks->stutter_efficiency.z8_stutter_efficiency =1 ; + min_clocks->stutter_efficiency.z8_stutter_period =100000 ; + min_clocks->zstate_support =DCN_ZSTATE_SUPPORT_ALLOW ; }
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +1 -0
@@ -374,6 +374,7 @@ void dml21_handle_phantom_streams_planes(const struct dc *dc, struct dc_state *cdml2_map_dc_pipes (dml_ctx, context,NULL , &dml_ctx->v21.dml_to_dc_pipe_mapping, dc->current_state); } +static unsigned int dml21_build_fams2_stream_programming_v2 (const struct dc *dc,struct dc_state *context,struct dml2_context *dml_ctx)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c +10 -4
@@ -9,16 +9,21 @@#include "dml21_utils.h" #include "dml21_translation_helper.h" #include "dml2_dc_resource_mgmt.h" +#include "dc_fpu.h" + +#if !defined(DC_RUN_WITH_PREEMPTION_ENABLED ) +#define DC_RUN_WITH_PREEMPTION_ENABLED (code) code +#endif // !DC_RUN_WITH_PREEMPTION_ENABLED #define INVALID -1static bool dml21_allocate_memory (struct dml2_context **dml_ctx) { - *dml_ctx =vzalloc (sizeof (struct dml2_context )); +DC_RUN_WITH_PREEMPTION_ENABLED (*dml_ctx =vzalloc (sizeof (struct dml2_context )));if (!(*dml_ctx))return false; - (*dml_ctx)->v21.dml_init.dml2_instance =vzalloc (sizeof (struct dml2_instance )); +DC_RUN_WITH_PREEMPTION_ENABLED ((*dml_ctx)->v21.dml_init.dml2_instance =vzalloc (sizeof (struct dml2_instance )));if (!((*dml_ctx)->v21.dml_init.dml2_instance))return false;
@@ -28,7 +33,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx) (*dml_ctx)->v21.mode_support.display_config = &(*dml_ctx)->v21.display_config; (*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config; - (*dml_ctx)->v21.mode_programming.programming =vzalloc (sizeof (struct dml2_display_cfg_programming )); +DC_RUN_WITH_PREEMPTION_ENABLED ((*dml_ctx)->v21.mode_programming.programming =vzalloc (sizeof (struct dml2_display_cfg_programming )));if (!((*dml_ctx)->v21.mode_programming.programming))return false;
@@ -70,8 +75,9 @@ static void dml21_init(const struct dc *in_dc, struct dml2_context *dml_ctx, conbool dml21_create (const struct dc *in_dc,struct dml2_context **dml_ctx,const struct dml2_configuration_options *config) {/* Allocate memory for initializing DML21 instance */ -if (!dml21_allocate_memory (dml_ctx)) +if (!dml21_allocate_memory (dml_ctx)) {return false; + }dml21_init (in_dc, *dml_ctx, config);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h +106 -202
399 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h +13 -0
@@ -27,6 +27,19 @@ enum dml2_swizzle_mode { dml2_gfx11_sw_256kb_d_x, dml2_gfx11_sw_256kb_r_x, + dml2_sw_linear_256b,// GFX10 SW_LINEAR only accepts 256 byte aligned pitch + dml2_gfx10_sw_64kb_r_x, + dml2_gfx102_sw_64kb_s, + dml2_gfx102_sw_64kb_s_t, + dml2_gfx102_sw_64kb_s_x, + dml2_gfx102_sw_64kb_r_x, + + dml2_linear_64elements,// GFX7 LINEAR_ALIGNED accepts pitch alignment of the maximum of 64 elements or 256 bytes + dml2_gfx7_1d_thin, + dml2_gfx7_2d_thin_gen_zero, + dml2_gfx7_2d_thin_gen_one, + dml2_gfx7_2d_thin_arlene, + dml2_gfx7_2d_thin_anubis }; enum dml2_source_format_class {
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_types.h +2 -0
@@ -19,6 +19,7 @@ enum dml2_project_id { dml2_project_dcn4x_stage1, dml2_project_dcn4x_stage2, dml2_project_dcn4x_stage2_auto_drr_svp, + dml2_project_dcn40, dml2_project_dcn42, };
@@ -80,6 +81,7 @@ struct dml2_options {struct dml2_pmo_options pmo_options; }; +struct dml2_initialize_instance_in_out {struct dml2_instance *dml2_instance;struct dml2_options options;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +102 -102
218 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c +1 -0
@@ -21,6 +21,7 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instancecase dml2_project_dcn4x_stage1: result = false;break ; +case dml2_project_dcn40:case dml2_project_dcn4x_stage2:case dml2_project_dcn4x_stage2_auto_drr_svp: out->initialize = &core_dcn4_initialize;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +61 -2
87 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h +2 -0
@@ -22,6 +22,8 @@ void dml2_core_utils_pipe_plane_mapping(const struct core_display_cfg_support_inbool dml2_core_utils_is_phantom_pipe (const struct dml2_plane_parameters *plane_cfg);unsigned int dml2_core_utils_get_tile_block_size_bytes (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_get_segment_horizontal_contiguous (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel); +unsigned int dml2_core_utils_get_tile_block_size_bytes_backcompat (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel); +bool dml2_core_utils_get_segment_horizontal_contiguous_backcompat (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_is_vertical_rotation (enum dml2_rotation_angle Scan);bool dml2_core_utils_is_linear (enum dml2_swizzle_mode sw_mode);int unsigned dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +0 -1
@@ -802,7 +802,6 @@ bool dpmm_dcn4_map_watermarks(struct dml2_dpmm_map_watermarks_params_in_out *in_return true; } -bool dpmm_dcn42_map_watermarks (struct dml2_dpmm_map_watermarks_params_in_out *in_out) {const struct dml2_display_cfg *display_cfg = &in_out->display_cfg->display_config;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c +1 -0
@@ -31,6 +31,7 @@ bool dml2_dpmm_create(enum dml2_project_id project_id, struct dml2_dpmm_instance out->map_watermarks = &dummy_map_watermarks; result = true;break ; +case dml2_project_dcn40:case dml2_project_dcn4x_stage2: out->map_mode_to_soc_dpm = &dpmm_dcn3_map_mode_to_soc_dpm; out->map_watermarks = &dummy_map_watermarks;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h +1 -1
@@ -10,4 +10,4 @@bool mcg_dcn4_build_min_clock_table (struct dml2_mcg_build_min_clock_table_params_in_out *in_out);bool mcg_dcn4_unit_test (void ); -#endif +#endif
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.h +3 -2
@@ -1,5 +1,6 @@ -/* SPDX-License-Identifier: MIT */ -/* Copyright 2026 Advanced Micro Devices, Inc. */ +// SPDX-License-Identifier: MIT +// +// Copyright 2026 Advanced Micro Devices, Inc. #ifndef __DML2_MCG_DCN42_H__#define __DML2_MCG_DCN42_H__
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c +1 -0
@@ -26,6 +26,7 @@ bool dml2_mcg_create(enum dml2_project_id project_id, struct dml2_mcg_instance * out->build_min_clock_table = &dummy_build_min_clock_table; result = true;break ; +case dml2_project_dcn40:case dml2_project_dcn4x_stage2:case dml2_project_dcn4x_stage2_auto_drr_svp: out->build_min_clock_table = &mcg_dcn4_build_min_clock_table;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +6 -0
@@ -23,6 +23,7 @@ static const struct dml2_pmo_pstate_strategy base_strategy_list_1_display[] = { .allow_state_increase = true, }, +// Then VBlank { .per_stream_pstate_method = { dml2_pstate_method_vblank, dml2_pstate_method_na, dml2_pstate_method_na, dml2_pstate_method_na },
@@ -53,6 +54,7 @@ static const struct dml2_pmo_pstate_strategy base_strategy_list_2_display[] = { .allow_state_increase = true, }, +// Then VActive + VBlank { .per_stream_pstate_method = { dml2_pstate_method_vactive, dml2_pstate_method_vblank, dml2_pstate_method_na, dml2_pstate_method_na },
@@ -113,6 +115,7 @@ static const struct dml2_pmo_pstate_strategy base_strategy_list_3_display[] = { .allow_state_increase = true, }, +// VActive + 1 VBlank { .per_stream_pstate_method = { dml2_pstate_method_vactive, dml2_pstate_method_vactive, dml2_pstate_method_vblank, dml2_pstate_method_na },
@@ -149,6 +152,7 @@ static const struct dml2_pmo_pstate_strategy base_strategy_list_4_display[] = { .allow_state_increase = true, }, +// VActive + 1 VBlank { .per_stream_pstate_method = { dml2_pstate_method_vactive, dml2_pstate_method_vactive, dml2_pstate_method_vactive, dml2_pstate_method_vblank },
@@ -1651,6 +1655,7 @@ static bool validate_pstate_support_strategy_cofunctionality(struct dml2_pmo_insif (svp_count >0 && (pmo->options->disable_svp || !all_timings_support_svp (pmo, display_cfg, svp_stream_mask)))return false; +return is_config_schedulable (pmo, display_cfg, pstate_strategy); }
@@ -1980,6 +1985,7 @@ static void reset_display_configuration(struct display_configuation_with_meta *d } } +static void setup_planes_for_drr_by_mask (struct display_configuation_with_meta *display_config,struct dml2_pmo_instance *pmo,int plane_mask)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.c +3 -1
@@ -3,8 +3,8 @@// Copyright 2024 Advanced Micro Devices, Inc. #include "dml2_pmo_factory.h" -#include "dml2_pmo_dcn4_fams2.h" #include "dml2_pmo_dcn3.h" +#include "dml2_pmo_dcn4_fams2.h" #include "dml2_external_lib_deps.h" static bool dummy_init_for_stutter (struct dml2_pmo_init_for_stutter_in_out *in_out)
@@ -37,6 +37,7 @@ bool dml2_pmo_create(enum dml2_project_id project_id, struct dml2_pmo_instance * out->optimize_dcc_mcache = pmo_dcn4_fams2_optimize_dcc_mcache; result = true;break ; +case dml2_project_dcn40:case dml2_project_dcn4x_stage2: out->initialize = pmo_dcn3_initialize;
@@ -56,6 +57,7 @@ bool dml2_pmo_create(enum dml2_project_id project_id, struct dml2_pmo_instance * result = true;break ; +case dml2_project_dcn42:case dml2_project_dcn4x_stage2_auto_drr_svp: out->initialize = pmo_dcn4_fams2_initialize;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.h +1 -1
@@ -10,4 +10,4 @@bool dml2_pmo_create (enum dml2_project_id project_id,struct dml2_pmo_instance *out); -#endif +#endif
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c +1 -0
@@ -17,6 +17,7 @@ bool dml2_initialize_instance(struct dml2_initialize_instance_in_out *in_out)case dml2_project_dcn4x_stage1:case dml2_project_dcn4x_stage2:case dml2_project_dcn4x_stage2_auto_drr_svp: +case dml2_project_dcn40:case dml2_project_dcn42:return dml2_top_soc15_initialize_instance (in_out);case dml2_project_invalid:
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_legacy.c +0 -1
@@ -3,7 +3,6 @@// Copyright 2024 Advanced Micro Devices, Inc. #include "dml2_top_legacy.h" -#include "dml2_top_soc15.h" #include "dml2_core_factory.h" #include "dml2_pmo_factory.h" #include "display_mode_core_structs.h"
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_internal_shared_types.h +3 -0
@@ -410,6 +410,7 @@ struct dml2_core_mode_support_in_out { } legacy; }; +struct dml2_core_mode_programming_in_out {/* * Inputs
@@ -501,6 +502,7 @@ struct dml2_core_instance {bool (*populate_informative)(struct dml2_core_populate_informative_in_out *in_out);bool (*calculate_mcache_allocation)(struct dml2_calculate_mcache_allocation_in_out *in_out); +struct {struct dml2_core_internal_display_mode_lib mode_lib; } clean_me_up;
@@ -753,6 +755,7 @@ struct dml2_pmo_instance {bool (*test_for_stutter)(struct dml2_pmo_test_for_stutter_in_out *in_out);bool (*optimize_for_stutter)(struct dml2_pmo_optimize_for_stutter_in_out *in_out); +struct dml2_pmo_init_data init_data;struct dml2_pmo_scratch scratch; };
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +2 -1
@@ -84,8 +84,9 @@ static void dml2_init(const struct dc *in_dc, const struct dml2_configuration_opbool dml2_create (const struct dc *in_dc,const struct dml2_configuration_options *config,struct dml2_context **dml2) {// TODO : Temporarily add DCN_VERSION_3_2 for N-1 validation. Remove DCN_VERSION_3_2 after N-1 validation phase is complete. -if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version >=DCN_VERSION_4_01 )) +if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version >=DCN_VERSION_4_01 )) {return dml21_create (in_dc, dml2, config); + }// Allocate Mode Lib Ctx *dml2 =dml2_allocate_memory ();
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c +2 -0
@@ -132,6 +132,8 @@ static void dpp3_power_on_gamcor_lut(if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) {if (power_on) {REG_UPDATE (CM_MEM_PWR_CTRL ,GAMCOR_MEM_PWR_FORCE ,0 ); +if (dpp_base->ctx->dc->caps.ips_v2_support) +REG_UPDATE (CM_MEM_PWR_CTRL ,GAMCOR_MEM_PWR_DIS ,1 );REG_WAIT (CM_MEM_PWR_STATUS ,GAMCOR_MEM_PWR_STATE ,0 ,1 ,5 ); }else { dpp_base->ctx->dc->optimized_required = true;
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c +21 -0
@@ -155,6 +155,11 @@ static void dpp401_power_on_dscl(if (dpp->tf_regs->DSCL_MEM_PWR_CTRL) {if (power_on) {REG_UPDATE (DSCL_MEM_PWR_CTRL ,LUT_MEM_PWR_FORCE ,0 ); +if (dpp->base.ctx->dc->caps.ips_v2_support) { +/*hw default changes to LS*/ +REG_UPDATE (DSCL_MEM_PWR_CTRL ,LUT_MEM_PWR_DIS ,1 ); +REG_WAIT (DSCL_MEM_PWR_STATUS ,LUT_MEM_PWR_STATE ,0 ,1 ,100 ); + }else REG_WAIT (DSCL_MEM_PWR_STATUS ,LUT_MEM_PWR_STATE ,0 ,1 ,5 ); }else {if (dpp->base.ctx->dc->debug.enable_mem_low_power.bits.dscl) {
@@ -956,6 +961,15 @@ static void dpp401_dscl_program_isharp(struct dpp *dpp_base, *bs_coeffs_updated = false;PERF_TRACE (); +/*power on isharp_delta_mem first*/ +if (dpp_base->ctx->dc->caps.ips_v2_support) { +/*HW default is LS, need to wake up*/ +REG_UPDATE_2 (ISHARP_DELTA_LUT_MEM_PWR_CTRL , +ISHARP_DELTA_LUT_MEM_PWR_FORCE ,0 , +ISHARP_DELTA_LUT_MEM_PWR_DIS ,1 ); +REG_WAIT (ISHARP_DELTA_LUT_MEM_PWR_CTRL , +ISHARP_DELTA_LUT_MEM_PWR_STATE ,0 ,1 ,100 ); + }/* ISHARP_MODE */ REG_SET_6(ISHARP_MODE, 0, ISHARP_EN, scl_data->dscl_prog_data.isharp_en,
@@ -1033,6 +1047,13 @@ static void dpp401_dscl_program_isharp(struct dpp *dpp_base, } } +/*power on isharp_delta_mem first*/ +if (dpp_base->ctx->dc->caps.ips_v2_support) { +/*HW default is LS, need to wake up*/ +REG_UPDATE_SEQ_2 (ISHARP_DELTA_LUT_MEM_PWR_CTRL , +ISHARP_DELTA_LUT_MEM_PWR_FORCE ,0 , +ISHARP_DELTA_LUT_MEM_PWR_DIS ,0 ); + }PERF_TRACE (); }// dpp401_dscl_program_isharp /**
drivers/gpu/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c +5 -0
@@ -640,6 +640,11 @@ static void dcn31_hpo_dp_stream_enc_audio_setup(REG_UPDATE (DP_STREAM_ENC_AUDIO_CONTROL ,DP_STREAM_ENC_INPUT_MUX_AUDIO_STREAM_SOURCE_SEL , az_inst); +if (enc3->hpo_se_mask->DP_STREAM_ENC_APG_CLOCK_EN) { +/*enable apg clk*/ +REG_UPDATE (DP_STREAM_ENC_AUDIO_CONTROL , +DP_STREAM_ENC_APG_CLOCK_EN ,1 ); + }ASSERT (enc->apg); enc->apg->funcs->se_audio_setup (enc->apg, az_inst, info); }
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +134 -67
260 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h +4 -19
@@ -328,32 +328,17 @@ int hubp401_get_3dlut_fl_done(struct hubp *hubp);void hubp401_set_unbounded_requesting (struct hubp *hubp,bool enable); -void hubp401_update_3dlut_fl_bias_scale (struct hubp *hubp,uint16_t bias,uint16_t scale); -void hubp401_program_3dlut_fl_crossbar (struct hubp *hubp, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_y_g, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cb_b, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cr_r); - -void hubp401_program_3dlut_fl_tmz_protected (struct hubp *hubp,uint8_t protection_bits); - -void hubp401_program_3dlut_fl_width (struct hubp *hubp,enum hubp_3dlut_fl_width width); - -void hubp401_program_3dlut_fl_addressing_mode (struct hubp *hubp,enum hubp_3dlut_fl_addressing_mode addr_mode); +const enum dc_cm_lut_pixel_format format);void hubp401_enable_3dlut_fl (struct hubp *hubp,bool enable);void hubp401_program_3dlut_fl_dlg_param (struct hubp *hubp,int refcyc_per_3dlut_group); -void hubp401_program_3dlut_fl_addr (struct hubp *hubp,const struct dc_plane_address address); +void hubp401_program_3dlut_fl_addr (struct hubp *hubp,const struct dc_plane_address *address); -void hubp401_program_3dlut_fl_format (struct hubp *hubp,enum hubp_3dlut_fl_format format); - -void hubp401_program_3dlut_fl_mode (struct hubp *hubp,enum hubp_3dlut_fl_mode mode); - -void hubp401_program_3dlut_fl_config ( -struct hubp *hubp, -struct hubp_fl_3dlut_config *cfg); +void hubp401_program_3dlut_fl_config (struct hubp *hubp, +const struct dc_3dlut_dma *config);void hubp401_clear_tiling (struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.c +75 -10
130 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.h +5 -11
@@ -56,11 +56,11 @@ bool hubp42_construct(const struct dcn_hubp2_shift *hubp_shift, const struct dcn_hubp2_mask *hubp_mask); -void hubp42_program_3dlut_fl_crossbar ( -struct hubp *hubp, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_r, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_g, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_b); +void hubp42_program_3dlut_fl_crossbar (struct hubp *hubp, +const enum dc_cm_lut_pixel_format format); + +void hubp42_program_3dlut_fl_config (struct hubp *hubp, +const struct dc_3dlut_dma *config);void hubp42_read_state (struct hubp *hubp);
@@ -70,10 +70,4 @@ void hubp42_setup(union dml2_global_sync_programming *pipe_global_sync, struct dc_crtc_timing *timing); -void hubp42_program_deadline ( -struct hubp *hubp, -struct dml2_display_dlg_regs *dlg_attr, -struct dml2_display_ttu_regs *ttu_attr); - -#endif /* __DC_HUBP_DCN42_H__ */
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +76 -60
224 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +162 -250
399 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +86 -467
553 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.h +2 -8
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_init.c +7 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +5 -31
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +17 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +63 -49
112 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/resource.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c +100 -77
177 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.h +18 -7
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c +33 -357
390 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h +3 -47
50 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.c +99 -6
105 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.h +11 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +5 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c +3 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c +7 -5
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +20 -18
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_offset.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_4_2_0_sh_mask.h +9 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.43.0
Part of the diff is not shown here. View the raw message.
DC analog support regressed by "drm/amd/display: Sync dcn42 with DC 3.2.373"
Hi,
This patch breaks analog connector support in DCE, both for analog encoders and DP bridge encoders, because it deletes key functions such as dce110_enable_analog_link_output, dce110_prepare_ddc, dce110_external_encoder_control, and more.
With this patch applied, when you connect an analog monitor you just get a crash in DC from trying to call link->dc->hwss.enable_analog_link_output() which is now NULL.
This is basically undoing all the work I did for supporting old GPUs with DC. I think either this commit should be reverted or someone should add back the analog support bits that were removed. I'm happy to help with that if needed. What do you guys think?
As a side question, why was this commit merged without any review or ack?
Thanks & best regards,
Timur
Quoted 83 lines · On 2026. március 6., péntek 4:13:45 közép-európai nyári idő Alex Hung wrote:
From: Roman Li <[email protected]>
This patch provides a bulk merge to align driver support for DCN42 with Display Core version 3.2.373.
It includes upgrade for:
-clk_mgr
- dml2/dml21
- optc
- hubp
- mpc
- optc
- hwseqSigned-off-by Roman Li <[email protected]>Signed-off-by Alex Hung <[email protected]>--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 141 +++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 95 ++- .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 59 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 24 + .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 13 + .../dml2_0/dml21/dml21_translation_helper.c | 30 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 14 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 308 ++++------ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 2 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 204 +++---- .../dml21/src/dml2_core/dml2_core_factory.c | 1 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 1 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 5 +- .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 136 +++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 412 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 12 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 38 +- .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 65 files changed, 1596 insertions(+), 1984 deletions(-)
RE: DC analog support regressed by "drm/amd/display: Sync dcn42 with DC 3.2.373"
[Public]
Hi Timur,
Sorry for the regression. The analog connector patches weren't properly backported to DC. I'm working on restoring this functionality and will keep you in a loop.
Thanks,
Roman
P/S inline:
Quoted 28 lines
-----Original Message-----
From: Timur Kristóf <[email protected]>
Sent: Monday, April 13, 2026 9:10 AM
To: [email protected]; Deucher, Alexander <[email protected]>
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Li, Roman <[email protected]>; Hung, Alex <[email protected]>; David Airlie <[email protected]>; Koenig, Christian <[email protected]>
Subject: DC analog support regressed by "drm/amd/display: Sync dcn42 with DC 3.2.373"Hi,
This patch breaks analog connector support in DCE, both for analog encoders and DP bridge encoders, because it deletes key functions such as
dce110_enable_analog_link_output,dce110_prepare_ddc,dce110_external_encoder_control, and more.With this patch applied, when you connect an analog monitor you just get a crash in DC from trying to call
link->dc->hwss.enable_analog_link_output()which is now NULL.
Quoted 6 lines
This is basically undoing all the work I did for supporting old GPUs with DC. I think either this commit should be reverted or someone should add back the analog support bits that were removed. I'm happy to help with that if needed. What do you guys think?
As a side question, why was this commit merged without any review or ack?
It had ack:
https://gitlab.freedesktop.org/agd5f/linux/-/commit/66715fc0ecfd4e0e950a9355ac3e063af3dd49a6
Quoted 91 lines
Thanks & best regards,
TimurQuoted 83 lines · On 2026. március 6., péntek 4:13:45 közép-európai nyári idő Alex Hung wrote:
From: Roman Li <[email protected]>
This patch provides a bulk merge to align driver support for DCN42 with Display Core version 3.2.373.
It includes upgrade for:
-clk_mgr
- dml2/dml21
- optc
- hubp
- mpc
- optc
- hwseqSigned-off-by Roman Li <[email protected]>Signed-off-by Alex Hung <[email protected]>--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 141 +++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 95 ++- .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 59 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 24 + .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 13 + .../dml2_0/dml21/dml21_translation_helper.c | 30 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 14 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 308 ++++------ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 2 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 204 +++---- .../dml21/src/dml2_core/dml2_core_factory.c | 1 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 1 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 5 +- .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 136 +++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 412 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 12 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 38 +- .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 65 files changed, 1596 insertions(+), 1984 deletions(-)
Re: DC analog support regressed by "drm/amd/display: Sync dcn42 with DC 3.2.373"
In reply to Timur KristófQuoted 5 lines · Timur Kristóf
This patch breaks analog connector support in DCE, both for analog encoders and DP bridge encoders, because it deletes key functions such as
dce110_enable_analog_link_output,dce110_prepare_ddc,dce110_external_encoder_control, and more.
Quoted 8 lines
With this patch applied, when you connect an analog monitor you just get a crash in DC from trying to call
link->dc->hwss.enable_analog_link_output()which is now NULL.This is basically undoing all the work I did for supporting old GPUs with DC. I think either this commit should be reverted or someone should add back the analog support bits that were removed. I'm happy to help with that if needed. What do you guys think?
I noticed that a patch to fix this mistake is ready by now:
drm/amd/display: Restore analog connector support --
https://lore.kernel.org/all/[email protected]/
And from that thread the fix was even "merged" somewhere. But I can't see this in -next or Alex' drm-fixes-7.1 pull, so I assume it will miss -rc1 (please corrent me if I'm wrong). Is that something to be concerned about?
Ciao, Thorsten
Quoted 94 lines
As a side question, why was this commit merged without any review or ack?
Thanks & best regards,
TimurQuoted 83 lines · On 2026. március 6., péntek 4:13:45 közép-európai nyári idő Alex Hung wrote:
From: Roman Li <[email protected]>
This patch provides a bulk merge to align driver support for DCN42 with Display Core version 3.2.373.
It includes upgrade for:
-clk_mgr
- dml2/dml21
- optc
- hubp
- mpc
- optc
- hwseqSigned-off-by Roman Li <[email protected]>Signed-off-by Alex Hung <[email protected]>--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 141 +++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 95 ++- .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 59 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 24 + .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 13 + .../dml2_0/dml21/dml21_translation_helper.c | 30 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 14 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 308 ++++------ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 2 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 204 +++---- .../dml21/src/dml2_core/dml2_core_factory.c | 1 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 1 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 5 +- .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 136 +++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 412 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 12 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 38 +- .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 65 files changed, 1596 insertions(+), 1984 deletions(-)
Re: DC analog support regressed by "drm/amd/display: Sync dcn42 with DC 3.2.373"
Quoted 16 lines · Thorsten Leemhuis
Quoted 5 lines · Timur Kristóf
This patch breaks analog connector support in DCE, both for analog encoders and DP bridge encoders, because it deletes key functions such as
dce110_enable_analog_link_output,dce110_prepare_ddc,dce110_external_encoder_control, and more.Quoted 8 lines
With this patch applied, when you connect an analog monitor you just get a crash in DC from trying to call
link->dc->hwss.enable_analog_link_output()which is now NULL.This is basically undoing all the work I did for supporting old GPUs with DC. I think either this commit should be reverted or someone should add back the analog support bits that were removed. I'm happy to help with that if needed. What do you guys think?
Quoted 8 lines
I noticed that a patch to fix this mistake is ready by now:
drm/amd/display: Restore analog connector support --
https://lore.kernel.org/all/[email protected]/And from that thread the fix was even "merged" somewhere. But I can't see this in -next or Alex' drm-fixes-7.1 pull, so I assume it will miss -rc1 (please corrent me if I'm wrong). Is that something to be concerned about?
It will be in -rc2.
Alex
Quoted 98 lines
Ciao, Thorsten
Quoted 94 lines
As a side question, why was this commit merged without any review or ack?
Thanks & best regards,
TimurQuoted 83 lines · On 2026. március 6., péntek 4:13:45 közép-európai nyári idő Alex Hung wrote:
From: Roman Li <[email protected]>
This patch provides a bulk merge to align driver support for DCN42 with Display Core version 3.2.373.
It includes upgrade for:
-clk_mgr
- dml2/dml21
- optc
- hubp
- mpc
- optc
- hwseqSigned-off-by Roman Li <[email protected]>Signed-off-by Alex Hung <[email protected]>--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 141 +++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 95 ++- .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 59 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + drivers/gpu/drm/amd/display/dc/dc_types.h | 24 + .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 13 + .../dml2_0/dml21/dml21_translation_helper.c | 30 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 14 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 308 ++++------ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 2 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 204 +++---- .../dml21/src/dml2_core/dml2_core_factory.c | 1 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 1 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 5 +- .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 1 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 1 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 136 +++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 412 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 12 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 38 +- .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 65 files changed, 1596 insertions(+), 1984 deletions(-)
PATCH 20/21 drm/amd/display: [FW Promotion] Release 0.1.50.0
In reply to Alex HungFrom: Taimur Hassan <[email protected]>
[WHAT]
Introduce DMUB BOOT_TIME_CRC_INIT command.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +32 -0
@@ -1892,6 +1892,11 @@ enum dmub_cmd_type {*/ DMUB_CMD__IHC =95 , +/** +* Command type use for boot time crc commands. +*/ + DMUB_CMD__BOOT_TIME_CRC = 96, +/** * Command type use for VBIOS shared commands. */
@@ -6838,6 +6843,29 @@ struct dmub_rb_cmd_pr_general_cmd {struct dmub_cmd_pr_general_cmd_data data; }; +/** +* Command type of a DMUB_CMD__BOOT_TIME_CRC command +*/ +enum dmub_cmd_boot_time_crc_type { +DMUB_CMD__BOOT_TIME_CRC_INIT_MEM =0 +}; + +/** +* Data passed from driver to FW in a DMUB_CMD__BOOT_TIME_CRC_INIT command. +*/ +struct dmub_cmd_boot_time_crc_init_data { +union dmub_addr buffer_addr; +uint32_t buffer_size; +}; + +/** +* Definition of a DMUB_CMD__BOOT_TIME_CRC_INIT command. +*/ +struct dmub_rb_cmd_boot_time_crc_init { +struct dmub_cmd_header header; +struct dmub_cmd_boot_time_crc_init_data data; +}; +/** * union dmub_rb_cmd - DMUB inbox command. */
@@ -7199,6 +7227,10 @@ union dmub_rb_cmd {* Definition of a DMUB_CMD__IHC command. */ struct dmub_rb_cmd_ihc ihc; +/** +* Definition of a DMUB_CMD__BOOT_TIME_CRC_INIT command. +*/ +struct dmub_rb_cmd_boot_time_crc_init boot_time_crc_init; };/**
Signature · 1 line
2.43.0
PATCH 21/21 drm/amd/display: Promote DC to 3.2.373
In reply to Alex HungFrom: Taimur Hassan <[email protected]>
This version brings along the following updates:
- [FW Promotion] Release 0.1.50.0
- Sync DCN42 with DC 3.2.373
- Add DML support for dcn42
- Enable dcn42 DC clk_mgr
- Clean up unused code
- Add back missing memory type in array
- Fix compile warnings in dml2_0
- Check for S0i3 to be done before DCCG init on DCN21
- Add documentation and cleanup DMUB HW lock manager
- Add new types to replay config
- Fix HWSS v3 fast path determination
- Add missing DCCG register entries for DCN20-DCN316
- Add ESD detection for replay recovery
- Update underflow detection
- Add COLOR_ENCODING/COLOR_RANGE to overlay planes
- Add NV12/P010 formats to primary plane
- Set chroma taps to 1 if luma taps are 1
- Add min clock init for DML21 mode programming
- Return early from vesa replay enable function
- Clean up NULL pointer warnings in dml2
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;struct dcn_optc_reg_state ;struct dcn_dccg_reg_state ; -#define DC_VER "3.2.372" +#define DC_VER "3.2.373"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0
[Public]
Hi all,
This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.
APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.
DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)
Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing
The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP
The patchset consists of the amd-staging-drm-next branch (Head commit - b05ecb320513b66225eb7679871a7f2233b16e78 -> drm/amdgpu/userq: refcount userqueues to avoid any race conditions) with new patches added on top of it.
Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: Hung, Alex <[email protected]>
Sent: Thursday, March 5, 2026 10:13 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>
Subject: [PATCH 00/21] DC Patches March 05, 2026
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fixes on compiler warnings
* Introduction of NV12/P010 formats to color pipeline
* Improvements on reply and DML2
* Enablment on DCN42
Charlene Liu (1):
drm/amd/display: Update underflow detection
ChunTao Tso (1):
drm/amd/display: Add new types to replay config
Clay King (1):
drm/amd/display: Clean up unused code
Gaghik Khachatrian (2):
drm/amd/display: Clean up NULL pointer warnings in dml2 drm/amd/display: Fix compile warnings in dml2_0
Harry Wentland (3):
drm/amd/display: Set chroma taps to 1 if luma taps are 1 drm/amd/display: Add NV12/P010 formats to primary plane drm/amd/display: Add COLOR_ENCODING/COLOR_RANGE to overlay planes
Ivan Lipski (2):
drm/amd/display: Add missing DCCG register entries for DCN20-DCN316 drm/amd/display: Check for S0i3 to be done before DCCG init on DCN21
Nicholas Kazlauskas (2):
drm/amd/display: Fix HWSS v3 fast path determination drm/amd/display: Add documentation and cleanup DMUB HW lock manager
Ovidiu Bunea (1):
drm/amd/display: Add min clock init for DML21 mode programming
Peichen Huang (1):
drm/amd/display: Return early from vesa replay enable function
Roman Li (3):
drm/amd/display: Enable dcn42 DC clk_mgr
drm/amd/display: Add DML support for dcn42
drm/amd/display: Sync dcn42 with DC 3.2.373
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.50.0 drm/amd/display: Promote DC to 3.2.373
Tom Chung (1):
drm/amd/display: Add back missing memory type in array
Weiguang Li (1):
drm/amd/display: Add ESD detection for replay recovery
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 6 +- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 11 +- .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 16 + .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 1 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 301 +++++----- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 134 ++--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 1 - .../gpu/drm/amd/display/dc/core/dc_stream.c | 41 +- .../gpu/drm/amd/display/dc/core/dc_surface.c | 9 + drivers/gpu/drm/amd/display/dc/dc.h | 61 +- .../gpu/drm/amd/display/dc/dc_bios_types.h | 3 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_plane.h | 1 + .../gpu/drm/amd/display/dc/dc_spl_translate.c | 1 + drivers/gpu/drm/amd/display/dc/dc_trace.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 26 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 9 +- .../amd/display/dc/dccg/dcn21/dcn21_dccg.c | 21 +- .../amd/display/dc/dccg/dcn301/dcn301_dccg.h | 8 +- .../amd/display/dc/dccg/dcn31/dcn31_dccg.h | 5 +- .../amd/display/dc/dccg/dcn314/dcn314_dccg.h | 5 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 20 + .../amd/display/dc/dccg/dcn42/dcn42_dccg.c | 59 +- .../amd/display/dc/dccg/dcn42/dcn42_dccg.h | 11 +- .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 16 + .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.h | 31 + .../gpu/drm/amd/display/dc/dml2_0/Makefile | 3 + .../amd/display/dc/dml2_0/display_mode_core.c | 4 +- .../dml2_0/dml21/dml21_translation_helper.c | 56 +- .../dml2_0/dml21/dml21_translation_helper.h | 1 + .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 1 + .../display/dc/dml2_0/dml21/dml21_wrapper.c | 15 +- .../dml21/inc/bounding_boxes/dcn42_soc_bb.h | 263 +++++++++ .../dml21/inc/dml_top_display_cfg_types.h | 13 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 3 + .../dml21/src/dml2_core/dml2_core_dcn4.c | 111 ++++ .../dml21/src/dml2_core/dml2_core_dcn4.h | 1 + .../dml21/src/dml2_core/dml2_core_factory.c | 9 + .../dml21/src/dml2_core/dml2_core_utils.c | 63 +- .../dml21/src/dml2_core/dml2_core_utils.h | 2 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 33 ++ .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h | 1 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 6 + .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h | 2 +- .../dml21/src/dml2_mcg/dml2_mcg_dcn42.c | 76 +++ .../dml21/src/dml2_mcg/dml2_mcg_dcn42.h | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 6 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 4 +- .../dml21/src/dml2_pmo/dml2_pmo_factory.h | 2 +- .../dml21/src/dml2_top/dml2_top_interfaces.c | 2 + .../dml21/src/dml2_top/dml2_top_legacy.c | 1 - .../src/inc/dml2_internal_shared_types.h | 3 + .../amd/display/dc/dml2_0/dml2_mall_phantom.c | 41 +- .../drm/amd/display/dc/dml2_0/dml2_wrapper.c | 3 +- .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 8 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 8 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 2 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 21 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.c | 5 + .../display/dc/hubbub/dcn401/dcn401_hubbub.c | 4 - .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 ++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 85 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 16 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 158 ++--- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 32 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 1 - .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 12 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 421 +++++-------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 553 +++--------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 10 +- .../amd/display/dc/hwss/dcn42/dcn42_init.c | 8 +- .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 2 +- .../amd/display/dc/inc/hw/clk_mgr_internal.h | 73 ++- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 36 +- .../gpu/drm/amd/display/dc/inc/hw/hw_shared.h | 18 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 112 ++-- drivers/gpu/drm/amd/display/dc/inc/resource.h | 1 + .../drm/amd/display/dc/link/link_detection.c | 12 +- .../dc/link/protocols/link_dp_irq_handler.c | 36 +- .../dc/link/protocols/link_dp_panel_replay.c | 23 +- .../link/protocols/link_edp_panel_control.c | 3 +- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 4 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 390 ++---------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 50 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 8 +- .../amd/display/dc/optc/dcn31/dcn31_optc.c | 2 +- .../amd/display/dc/optc/dcn42/dcn42_optc.c | 105 +++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 13 +- .../dc/resource/dcn20/dcn20_resource.c | 2 - .../dc/resource/dcn42/dcn42_resource.c | 10 +- .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn401/dcn401_soc_and_ip_translator.c | 3 + .../dcn42/dcn42_soc_and_ip_translator.c | 163 +++++- .../dcn42/dcn42_soc_and_ip_translator.h | 1 + .../soc_and_ip_translator.c | 4 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 71 ++- .../gpu/drm/amd/display/include/dpcd_defs.h | 3 + .../include/asic_reg/clk/clk_15_0_0_offset.h | 44 ++ .../include/asic_reg/clk/clk_15_0_0_sh_mask.h | 52 ++ .../include/asic_reg/dcn/dcn_4_2_0_offset.h | 2 + .../include/asic_reg/dcn/dcn_4_2_0_sh_mask.h | 9 + 108 files changed, 2675 insertions(+), 1902 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn42_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_15_0_0_sh_mask.h
--
2.43.0