DC Patches Oct 20 2025
Subsystems (3)
cover DC Patches Oct 20 2025
This DC patchset brings improvements in multiple areas. In summary, we have:
* Fix GFP_ATOMIC abuse
* Fix several checkpatch issues
* Set DCN32 to use update planes and stream version 3
* Write segment pointer with mot enabled for MST
* Control BW allocation in FW side
* Change clean dsc blocks condition in accelerated mode
* Check disable_fec flag before enabling FEC
Aurabindo Pillai (1):
drm/amd/display: Fix GFP_ATOMIC abuse
Cruise Hung (1):
drm/amd/display: Control BW allocation in FW side
Ilya Bakoulin (1):
drm/amd/display: Fix misc. checkpatch issues
Lewis Huang (1):
drm/amd/display: Change clean dsc blocks condition in accelerated mode
Meenakshikumar Somasundaram (2):
drm/amd/display: Check disable_fec flag before enabling fec. drm/amd/display: write segment pointer with mot enabled for mst
Nicholas Carbones (1):
drm/amd/display: Set DCN32 to use update planes and stream version 3
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.355
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 57 +++---- drivers/gpu/drm/amd/display/dc/dc.h | 5 +- .../amd/display/dc/dccg/dcn20/dcn20_dccg.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 11 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 160 ++++++++---------- .../drm/amd/display/dc/link/link_factory.c | 3 - .../dc/link/protocols/link_dp_capability.c | 10 +- .../dc/link/protocols/link_dp_dpia_bw.c | 5 - .../dc/resource/dcn20/dcn20_resource.c | 28 ++- .../dc/resource/dcn201/dcn201_resource.c | 30 ++-- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 1 + 17 files changed, 144 insertions(+), 183 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/8 drm/amd/display: Fix GFP_ATOMIC abuse
From: Aurabindo Pillai <[email protected]>
There is a lot GFP_ATOMIC allocations which are not in interrupt context. Change them to use GFP_KERNEL instead.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../amd/display/dc/dccg/dcn20/dcn20_dccg.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 ++-- .../dc/resource/dcn20/dcn20_resource.c | 28 ++++++++--------- .../dc/resource/dcn201/dcn201_resource.c | 30 +++++++++---------- 6 files changed, 33 insertions(+), 37 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -10571,7 +10571,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)* Here we create an empty update on each plane. * To fix this, DC should permit updating only stream properties. */ - dummy_updates =kzalloc (sizeof (struct dc_surface_update ) *MAX_SURFACES ,GFP_ATOMIC ); + dummy_updates =kzalloc (sizeof (struct dc_surface_update ) *MAX_SURFACES ,GFP_KERNEL );if (!dummy_updates) {drm_err (adev_to_drm (adev),"Failed to allocate memory for dummy_updates.\n" );continue ;
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c +1 -1
@@ -148,7 +148,7 @@ struct dccg *dccg2_create(const struct dccg_shift *dccg_shift, const struct dccg_mask *dccg_mask) { - struct dcn_dccg *dccg_dcn = kzalloc(sizeof(*dccg_dcn), GFP_ATOMIC); + struct dcn_dccg *dccg_dcn = kzalloc(sizeof(*dccg_dcn), GFP_KERNEL);struct dccg *base;if (dccg_dcn ==NULL ) {
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +1 -1
@@ -283,7 +283,7 @@ struct abm *dce_abm_create(const struct dce_abm_shift *abm_shift, const struct dce_abm_mask *abm_mask) { - struct dce_abm *abm_dce = kzalloc(sizeof(*abm_dce), GFP_ATOMIC); + struct dce_abm *abm_dce = kzalloc(sizeof(*abm_dce), GFP_KERNEL);if (abm_dce ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +3 -3
@@ -1126,7 +1126,7 @@ struct dmcu *dcn10_dmcu_create(const struct dce_dmcu_shift *dmcu_shift, const struct dce_dmcu_mask *dmcu_mask) { - struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_ATOMIC); + struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_KERNEL);if (dmcu_dce ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1147,7 +1147,7 @@ struct dmcu *dcn20_dmcu_create(const struct dce_dmcu_shift *dmcu_shift, const struct dce_dmcu_mask *dmcu_mask) { - struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_ATOMIC); + struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_KERNEL);if (dmcu_dce ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1168,7 +1168,7 @@ struct dmcu *dcn21_dmcu_create(const struct dce_dmcu_shift *dmcu_shift, const struct dce_dmcu_mask *dmcu_mask) { - struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_ATOMIC); + struct dce_dmcu *dmcu_dce = kzalloc(sizeof(*dmcu_dce), GFP_KERNEL);if (dmcu_dce ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +13 -15
@@ -733,7 +733,7 @@ struct dpp *dcn20_dpp_create( uint32_t inst) {struct dcn20_dpp *dpp = -kzalloc (sizeof (struct dcn20_dpp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_dpp ),GFP_KERNEL );if (!dpp)return NULL ;
@@ -751,7 +751,7 @@ struct input_pixel_processor *dcn20_ipp_create( struct dc_context *ctx, uint32_t inst) {struct dcn10_ipp *ipp = -kzalloc (sizeof (struct dcn10_ipp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn10_ipp ),GFP_KERNEL );if (!ipp) {BREAK_TO_DEBUGGER ();
@@ -768,7 +768,7 @@ struct output_pixel_processor *dcn20_opp_create( struct dc_context *ctx, uint32_t inst) {struct dcn20_opp *opp = -kzalloc (sizeof (struct dcn20_opp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_opp ),GFP_KERNEL );if (!opp) {BREAK_TO_DEBUGGER ();
@@ -785,7 +785,7 @@ struct dce_aux *dcn20_aux_engine_create( uint32_t inst) {struct aux_engine_dce110 *aux_engine = -kzalloc (sizeof (struct aux_engine_dce110 ),GFP_ATOMIC ); +kzalloc (sizeof (struct aux_engine_dce110 ),GFP_KERNEL );if (!aux_engine)return NULL ;
@@ -823,7 +823,7 @@ struct dce_i2c_hw *dcn20_i2c_hw_create( uint32_t inst) {struct dce_i2c_hw *dce_i2c_hw = -kzalloc (sizeof (struct dce_i2c_hw ),GFP_ATOMIC ); +kzalloc (sizeof (struct dce_i2c_hw ),GFP_KERNEL );if (!dce_i2c_hw)return NULL ;
@@ -835,8 +835,7 @@ struct dce_i2c_hw *dcn20_i2c_hw_create( }struct mpc *dcn20_mpc_create (struct dc_context *ctx) { -struct dcn20_mpc *mpc20 =kzalloc (sizeof (struct dcn20_mpc ), -GFP_ATOMIC ); +struct dcn20_mpc *mpc20 =kzalloc (sizeof (struct dcn20_mpc ),GFP_KERNEL );if (!mpc20)return NULL ;
@@ -853,8 +852,7 @@ struct mpc *dcn20_mpc_create(struct dc_context *ctx)struct hubbub *dcn20_hubbub_create (struct dc_context *ctx) {int i; -struct dcn20_hubbub *hubbub =kzalloc (sizeof (struct dcn20_hubbub ), -GFP_ATOMIC ); +struct dcn20_hubbub *hubbub =kzalloc (sizeof (struct dcn20_hubbub ),GFP_KERNEL );if (!hubbub)return NULL ;
@@ -882,7 +880,7 @@ struct timing_generator *dcn20_timing_generator_create( uint32_t instance) {struct optc *tgn10 = -kzalloc (sizeof (struct optc ),GFP_ATOMIC ); +kzalloc (sizeof (struct optc ),GFP_KERNEL );if (!tgn10)return NULL ;
@@ -962,7 +960,7 @@ static struct clock_source *dcn20_clock_source_create( bool dp_clk_src) {struct dce110_clk_src *clk_src = -kzalloc (sizeof (struct dce110_clk_src ),GFP_ATOMIC ); +kzalloc (sizeof (struct dce110_clk_src ),GFP_KERNEL );if (!clk_src)return NULL ;
@@ -1061,7 +1059,7 @@ struct display_stream_compressor *dcn20_dsc_create( struct dc_context *ctx, uint32_t inst) {struct dcn20_dsc *dsc = -kzalloc (sizeof (struct dcn20_dsc ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_dsc ),GFP_KERNEL );if (!dsc) {BREAK_TO_DEBUGGER ();
@@ -1198,7 +1196,7 @@ struct hubp *dcn20_hubp_create( uint32_t inst) {struct dcn20_hubp *hubp2 = -kzalloc (sizeof (struct dcn20_hubp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_hubp ),GFP_KERNEL );if (!hubp2)return NULL ;
@@ -2287,7 +2285,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)static struct pp_smu_funcs *dcn20_pp_smu_create (struct dc_context *ctx) { -struct pp_smu_funcs *pp_smu =kzalloc (sizeof (*pp_smu),GFP_ATOMIC ); +struct pp_smu_funcs *pp_smu =kzalloc (sizeof (*pp_smu),GFP_KERNEL );if (!pp_smu)return pp_smu;
@@ -2766,7 +2764,7 @@ struct resource_pool *dcn20_create_resource_pool( struct dc *dc) {struct dcn20_resource_pool *pool = -kzalloc (sizeof (struct dcn20_resource_pool ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_resource_pool ),GFP_KERNEL );if (!pool)return NULL ;
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c +14 -16
@@ -629,7 +629,7 @@ static struct dpp *dcn201_dpp_create( uint32_t inst) {struct dcn201_dpp *dpp = -kzalloc (sizeof (struct dcn201_dpp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn201_dpp ),GFP_KERNEL );if (!dpp)return NULL ;
@@ -646,7 +646,7 @@ static struct input_pixel_processor *dcn201_ipp_create( struct dc_context *ctx, uint32_t inst) {struct dcn10_ipp *ipp = -kzalloc (sizeof (struct dcn10_ipp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn10_ipp ),GFP_KERNEL );if (!ipp) {return NULL ;
@@ -662,7 +662,7 @@ static struct output_pixel_processor *dcn201_opp_create( struct dc_context *ctx, uint32_t inst) {struct dcn201_opp *opp = -kzalloc (sizeof (struct dcn201_opp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn201_opp ),GFP_KERNEL );if (!opp) {return NULL ;
@@ -677,7 +677,7 @@ static struct dce_aux *dcn201_aux_engine_create(struct dc_context *ctx, uint32_t inst) {struct aux_engine_dce110 *aux_engine = -kzalloc (sizeof (struct aux_engine_dce110 ),GFP_ATOMIC ); +kzalloc (sizeof (struct aux_engine_dce110 ),GFP_KERNEL );if (!aux_engine)return NULL ;
@@ -710,7 +710,7 @@ static struct dce_i2c_hw *dcn201_i2c_hw_create(struct dc_context *ctx, uint32_t inst) {struct dce_i2c_hw *dce_i2c_hw = -kzalloc (sizeof (struct dce_i2c_hw ),GFP_ATOMIC ); +kzalloc (sizeof (struct dce_i2c_hw ),GFP_KERNEL );if (!dce_i2c_hw)return NULL ;
@@ -723,8 +723,7 @@ static struct dce_i2c_hw *dcn201_i2c_hw_create(struct dc_context *ctx,static struct mpc *dcn201_mpc_create (struct dc_context *ctx,uint32_t num_mpcc) { -struct dcn201_mpc *mpc201 =kzalloc (sizeof (struct dcn201_mpc ), -GFP_ATOMIC ); +struct dcn201_mpc *mpc201 =kzalloc (sizeof (struct dcn201_mpc ),GFP_KERNEL );if (!mpc201)return NULL ;
@@ -740,8 +739,7 @@ static struct mpc *dcn201_mpc_create(struct dc_context *ctx, uint32_t num_mpcc)static struct hubbub *dcn201_hubbub_create (struct dc_context *ctx) { -struct dcn20_hubbub *hubbub =kzalloc (sizeof (struct dcn20_hubbub ), -GFP_ATOMIC ); +struct dcn20_hubbub *hubbub =kzalloc (sizeof (struct dcn20_hubbub ),GFP_KERNEL );if (!hubbub)return NULL ;
@@ -759,7 +757,7 @@ static struct timing_generator *dcn201_timing_generator_create( uint32_t instance) {struct optc *tgn10 = -kzalloc (sizeof (struct optc ),GFP_ATOMIC ); +kzalloc (sizeof (struct optc ),GFP_KERNEL );if (!tgn10)return NULL ;
@@ -793,7 +791,7 @@ static struct link_encoder *dcn201_link_encoder_create( const struct encoder_init_data *enc_init_data) {struct dcn20_link_encoder *enc20 = -kzalloc (sizeof (struct dcn20_link_encoder ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );struct dcn10_link_encoder *enc10;if (!enc20 || enc_init_data->hpd_source >=ARRAY_SIZE (link_enc_hpd_regs))
@@ -821,7 +819,7 @@ static struct clock_source *dcn201_clock_source_create( bool dp_clk_src) {struct dce110_clk_src *clk_src = -kzalloc (sizeof (struct dce110_clk_src ),GFP_ATOMIC ); +kzalloc (sizeof (struct dce110_clk_src ),GFP_KERNEL );if (!clk_src)return NULL ;
@@ -856,7 +854,7 @@ static struct stream_encoder *dcn201_stream_encoder_create( struct dc_context *ctx) {struct dcn10_stream_encoder *enc1 = -kzalloc (sizeof (struct dcn10_stream_encoder ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn10_stream_encoder ),GFP_KERNEL );if (!enc1)return NULL ;
@@ -883,7 +881,7 @@ static const struct dce_hwseq_mask hwseq_mask = {static struct dce_hwseq *dcn201_hwseq_create (struct dc_context *ctx) { -struct dce_hwseq *hws =kzalloc (sizeof (struct dce_hwseq ),GFP_ATOMIC ); +struct dce_hwseq *hws =kzalloc (sizeof (struct dce_hwseq ),GFP_KERNEL );if (hws) { hws->ctx = ctx;
@@ -983,7 +981,7 @@ static struct hubp *dcn201_hubp_create( uint32_t inst) {struct dcn201_hubp *hubp201 = -kzalloc (sizeof (struct dcn201_hubp ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn201_hubp ),GFP_KERNEL );if (!hubp201)return NULL ;
@@ -1303,7 +1301,7 @@ struct resource_pool *dcn201_create_resource_pool( struct dc *dc) {struct dcn201_resource_pool *pool = -kzalloc (sizeof (struct dcn201_resource_pool ),GFP_ATOMIC ); +kzalloc (sizeof (struct dcn201_resource_pool ),GFP_KERNEL );if (!pool)return NULL ;
Signature · 1 line
2.43.0
PATCH 2/8 drm/amd/display: Check disable_fec flag before enabling fec.
In reply to Tom ChungFrom: Meenakshikumar Somasundaram <[email protected]>
[Why]
dc debug option disable_fec was not working.
[How]
Check dc debug option disable_fec flag before
enabling fec in dp_should_enable_fec().
--- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +3 -1
@@ -357,7 +357,9 @@ bool dp_should_enable_fec(const struct dc_link *link) {bool force_disable = false; -if (link->fec_state == dc_link_fec_enabled) +if (link->dc->debug.disable_fec) + force_disable = true; +else if (link->fec_state == dc_link_fec_enabled) force_disable = false; else if (link->connector_signal != SIGNAL_TYPE_DISPLAY_PORT_MST && link->local_sink &&
Signature · 1 line
2.43.0
PATCH 3/8 drm/amd/display: Set DCN32 to use update planes and stream version 3
In reply to Tom ChungFrom: Nicholas Carbones <[email protected]>
[Why]
Old minimal transition does not always wait for updates to complete before proceeding, which can lead to corruption in multi display scenarios for DCN32.
[How]
Set DCN32 to use update_planes_and_stream_v3 for better pipe transition handling.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
@@ -5376,7 +5376,8 @@ bool dc_update_planes_and_stream(struct dc *dc,* specially handle compatibility problems with transitions among those * features as they are now transparent to the new sequence. */ -if (dc->ctx->dce_version >=DCN_VERSION_4_01 ) +if (dc->ctx->dce_version >=DCN_VERSION_4_01 || dc->ctx->dce_version ==DCN_VERSION_3_2 || + dc->ctx->dce_version ==DCN_VERSION_3_21 ) ret =update_planes_and_stream_v3 (dc, srf_updates, surface_count, stream, stream_update);else
Signature · 1 line
2.43.0
PATCH 4/8 drm/amd/display: Change clean dsc blocks condition in accelerated mode
In reply to Tom ChungFrom: Lewis Huang <[email protected]>
[Why]
On system resume from S4 with the lid closed,
DSC was not cleared because DPMS was already off.
[How]
In accelerated mode, to clean up DSC blocks if eDP dpms off is true to align the DSC and dpms state when we are not in fast boot and seamless boot.
--- .../gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +9 -2
@@ -1913,6 +1913,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)bool can_apply_edp_fast_boot = false;bool can_apply_seamless_boot = false;bool keep_edp_vdd_on = false; +bool should_clean_dsc_block = true;struct dc_bios *dcb = dc->ctx->dc_bios;DC_LOGGER_INIT ();
@@ -2005,9 +2006,15 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)power_down_all_hw_blocks (dc);/* DSC could be enabled on eDP during VBIOS post. -* To clean up dsc blocks if eDP is in link but not active. +* To clean up dsc blocks if all eDP dpms_off is true. */ -if (edp_link_with_sink && (edp_stream_num ==0 )) +for (i =0 ; i < edp_stream_num; i++) { +if (!edp_streams[i]->dpms_off) { + should_clean_dsc_block = false; + } + } + +if (should_clean_dsc_block)clean_up_dsc_blocks (dc);disable_vga_and_power_gate_all_controllers (dc);
Signature · 1 line
2.43.0
PATCH 5/8 drm/amd/display: Fix misc. checkpatch issues
In reply to Tom ChungFrom: Ilya Bakoulin <[email protected]>
[Why/How]
Addresses various checkpatch issues related to the HWSS block sequence function change.
--- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 57 +++---- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 160 ++++++++---------- 2 files changed, 86 insertions(+), 131 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +19 -38
@@ -1962,9 +1962,8 @@ void hwss_program_bias_and_scale(union block_sequence_params *params)struct dc_bias_and_scale bns_params = plane_state->bias_and_scale;//TODO :for CNVC set scale and bias registers if necessary -if (dpp->funcs->dpp_program_bias_and_scale) { +if (dpp->funcs->dpp_program_bias_and_scale) dpp->funcs->dpp_program_bias_and_scale (dpp, &bns_params); - } }void hwss_power_on_mpc_mem_pwr (union block_sequence_params *params)
@@ -2121,6 +2120,7 @@ void hwss_wait_for_odm_update_pending_complete(struct dc *dc, struct dc_state *cvoid hwss_wait_for_no_pipes_pending (struct dc *dc,struct dc_state *context) {int i; +for (i =0 ; i <MAX_PIPES ; i++) {int count =0 ;struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
@@ -2277,6 +2277,7 @@ void hwss_tg_set_dsc_config(union block_sequence_params *params)if (params->tg_set_dsc_config_params.enable) {struct dsc_optc_config *dsc_optc_cfg = params->tg_set_dsc_config_params.dsc_optc_cfg; +if (dsc_optc_cfg) { bytes_per_pixel = dsc_optc_cfg->bytes_per_pixel; slice_width = dsc_optc_cfg->slice_width;
@@ -2370,9 +2371,8 @@ void hwss_tg_wait_for_state(union block_sequence_params *params)struct timing_generator *tg = params->tg_wait_for_state_params.tg;enum crtc_state state = params->tg_wait_for_state_params.state; -if (tg->funcs->wait_for_state) { +if (tg->funcs->wait_for_state) tg->funcs->wait_for_state (tg, state); - } }void hwss_tg_set_vtg_params (union block_sequence_params *params)
@@ -2381,9 +2381,8 @@ void hwss_tg_set_vtg_params(union block_sequence_params *params)struct dc_crtc_timing *timing = params->tg_set_vtg_params_params.timing;bool program_fp2 = params->tg_set_vtg_params_params.program_fp2; -if (tg->funcs->set_vtg_params) { +if (tg->funcs->set_vtg_params) tg->funcs->set_vtg_params (tg, timing, program_fp2); - } }void hwss_tg_setup_vertical_interrupt2 (union block_sequence_params *params)
@@ -2391,9 +2390,8 @@ void hwss_tg_setup_vertical_interrupt2(union block_sequence_params *params)struct timing_generator *tg = params->tg_setup_vertical_interrupt2_params.tg;int start_line = params->tg_setup_vertical_interrupt2_params.start_line; -if (tg->funcs->setup_vertical_interrupt2) { +if (tg->funcs->setup_vertical_interrupt2) tg->funcs->setup_vertical_interrupt2 (tg, start_line); - } }void hwss_dpp_set_hdr_multiplier (union block_sequence_params *params)
@@ -2401,9 +2399,8 @@ void hwss_dpp_set_hdr_multiplier(union block_sequence_params *params)struct dpp *dpp = params->dpp_set_hdr_multiplier_params.dpp;uint32_t hw_mult = params->dpp_set_hdr_multiplier_params.hw_mult; -if (dpp->funcs->dpp_set_hdr_multiplier) { +if (dpp->funcs->dpp_set_hdr_multiplier) dpp->funcs->dpp_set_hdr_multiplier (dpp, hw_mult); - } }void hwss_program_det_size (union block_sequence_params *params)
@@ -2412,9 +2409,8 @@ void hwss_program_det_size(union block_sequence_params *params)unsigned int hubp_inst = params->program_det_size_params.hubp_inst;unsigned int det_buffer_size_kb = params->program_det_size_params.det_buffer_size_kb; -if (hubbub->funcs->program_det_size) { +if (hubbub->funcs->program_det_size) hubbub->funcs->program_det_size (hubbub, hubp_inst, det_buffer_size_kb); - } }void hwss_program_det_segments (union block_sequence_params *params)
@@ -2423,9 +2419,8 @@ void hwss_program_det_segments(union block_sequence_params *params)unsigned int hubp_inst = params->program_det_segments_params.hubp_inst;unsigned int det_size = params->program_det_segments_params.det_size; -if (hubbub->funcs->program_det_segments) { +if (hubbub->funcs->program_det_segments) hubbub->funcs->program_det_segments (hubbub, hubp_inst, det_size); - } }void hwss_opp_set_dyn_expansion (union block_sequence_params *params)
@@ -2435,9 +2430,8 @@ void hwss_opp_set_dyn_expansion(union block_sequence_params *params)enum dc_color_depth color_depth = params->opp_set_dyn_expansion_params.color_depth;enum signal_type signal = params->opp_set_dyn_expansion_params.signal; -if (opp->funcs->opp_set_dyn_expansion) { +if (opp->funcs->opp_set_dyn_expansion) opp->funcs->opp_set_dyn_expansion (opp, color_space, color_depth, signal); - } }void hwss_opp_program_fmt (union block_sequence_params *params)
@@ -2446,9 +2440,8 @@ void hwss_opp_program_fmt(union block_sequence_params *params)struct bit_depth_reduction_params *fmt_bit_depth = params->opp_program_fmt_params.fmt_bit_depth;struct clamping_and_pixel_encoding_params *clamping = params->opp_program_fmt_params.clamping; -if (opp->funcs->opp_program_fmt) { +if (opp->funcs->opp_program_fmt) opp->funcs->opp_program_fmt (opp, fmt_bit_depth, clamping); - } }void hwss_opp_program_bit_depth_reduction (union block_sequence_params *params)
@@ -2458,15 +2451,13 @@ void hwss_opp_program_bit_depth_reduction(union block_sequence_params *params)struct pipe_ctx *pipe_ctx = params->opp_program_bit_depth_reduction_params.pipe_ctx;struct bit_depth_reduction_params bit_depth_params; -if (use_default_params) { +if (use_default_params)memset (&bit_depth_params,0 ,sizeof (bit_depth_params)); - }else { +else resource_build_bit_depth_reduction_params (pipe_ctx->stream, &bit_depth_params); - } -if (opp->funcs->opp_program_bit_depth_reduction) { +if (opp->funcs->opp_program_bit_depth_reduction) opp->funcs->opp_program_bit_depth_reduction (opp, &bit_depth_params); - } }void hwss_opp_set_disp_pattern_generator (union block_sequence_params *params)
@@ -2500,9 +2491,8 @@ void hwss_set_abm_level(union block_sequence_params *params)struct abm *abm = params->set_abm_level_params.abm;unsigned int abm_level = params->set_abm_level_params.abm_level; -if (abm->funcs->set_abm_level) { +if (abm->funcs->set_abm_level) abm->funcs->set_abm_level (abm, abm_level); - } }void hwss_set_abm_immediate_disable (union block_sequence_params *params)
@@ -2510,9 +2500,8 @@ void hwss_set_abm_immediate_disable(union block_sequence_params *params)struct dc *dc = params->set_abm_immediate_disable_params.dc;struct pipe_ctx *pipe_ctx = params->set_abm_immediate_disable_params.pipe_ctx; -if (dc && dc->hwss.set_abm_immediate_disable) { +if (dc && dc->hwss.set_abm_immediate_disable) dc->hwss.set_abm_immediate_disable (pipe_ctx); - } }void hwss_mpc_remove_mpcc (union block_sequence_params *params)
@@ -2793,34 +2782,29 @@ void hwss_hubp_init(union block_sequence_params *params) {struct hubp *hubp = params->hubp_init_params.hubp; -if (hubp && hubp->funcs->hubp_init) { +if (hubp && hubp->funcs->hubp_init) hubp->funcs->hubp_init (hubp); - } }void hwss_hubp_set_vm_system_aperture_settings (union block_sequence_params *params) {struct hubp *hubp = params->hubp_set_vm_system_aperture_settings_params.hubp; -//struct vm_system_aperture_param *apt = ¶ms->hubp_set_vm_system_aperture_settings_params.apt; struct vm_system_aperture_param apt; apt.sys_default = params->hubp_set_vm_system_aperture_settings_params.sys_default; apt.sys_high = params->hubp_set_vm_system_aperture_settings_params.sys_high; apt.sys_low = params->hubp_set_vm_system_aperture_settings_params.sys_low; -if (hubp && hubp->funcs->hubp_set_vm_system_aperture_settings) { -//hubp->funcs->hubp_set_vm_system_aperture_settings(hubp, apt); +if (hubp && hubp->funcs->hubp_set_vm_system_aperture_settings) hubp->funcs->hubp_set_vm_system_aperture_settings (hubp, &apt); - } }void hwss_hubp_set_flip_int (union block_sequence_params *params) {struct hubp *hubp = params->hubp_set_flip_int_params.hubp; -if (hubp && hubp->funcs->hubp_set_flip_int) { +if (hubp && hubp->funcs->hubp_set_flip_int) hubp->funcs->hubp_set_flip_int (hubp); - } }void hwss_dpp_dppclk_control (union block_sequence_params *params)
@@ -3049,13 +3033,10 @@ void hwss_mpc_update_blending(union block_sequence_params *params)void hwss_mpc_assert_idle_mpcc (union block_sequence_params *params) {struct mpc *mpc = params->mpc_assert_idle_mpcc_params.mpc; -//struct pipe_ctx *pipe_ctx = params->mpc_assert_idle_mpcc_params.pipe_ctx; int mpcc_id = params->mpc_assert_idle_mpcc_params.mpcc_id;if (mpc && mpc->funcs->wait_for_idle) mpc->funcs->wait_for_idle (mpc, mpcc_id); - -//pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_id] = false; }void hwss_mpc_insert_plane (union block_sequence_params *params)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +67 -93
428 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 6/8 drm/amd/display: Control BW allocation in FW side
In reply to Tom ChungFrom: Cruise Hung <[email protected]>
[Why]
The BW allocation feature should be controlled in FW side.
[How]
Pass the control bit to FW boot option.
--- drivers/gpu/drm/amd/display/dc/dc.h | 3 +-- .../gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 5 ----- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 1 + drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 1 + 5 files changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -2
@@ -850,8 +850,7 @@ union dpia_debug_options { uint32_t enable_force_tbt3_work_around:1; /* bit 4 */ uint32_t disable_usb4_pm_support:1; /* bit 5 */ uint32_t enable_usb4_bw_zero_alloc_patch:1; /* bit 6 */ - uint32_t enable_bw_allocation_mode:1; /* bit 7 */ - uint32_t reserved:24; + uint32_t reserved:25; } bits;uint32_t raw; };
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c +0 -5
@@ -225,11 +225,6 @@ bool link_dpia_enable_usb4_dp_bw_alloc_mode(struct dc_link *link)bool ret = false;uint8_t val; -if (link->dc->debug.dpia_debug.bits.enable_bw_allocation_mode == false) { -DC_LOG_DEBUG ("%s: link[%d] DPTX BW allocation mode disabled" , __func__, link->link_index); -return false; - } - val =DPTX_BW_ALLOC_MODE_ENABLE |DPTX_BW_ALLOC_UNMASK_IRQ ;if (core_link_write_dpcd (link,DPTX_BW_ALLOCATION_MODE_CONTROL , &val,sizeof (uint8_t )) ==DC_OK ) {
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -0
@@ -318,6 +318,7 @@ struct dmub_srv_hw_params {bool enable_non_transparent_setconfig;bool lower_hbr3_phy_ssc;bool override_hbr3_pll_vco; +bool disable_dpia_bw_allocation; };/**
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +1 -0
@@ -380,6 +380,7 @@ void dmub_dcn31_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu boot_options.bits.override_hbr3_pll_vco = params->override_hbr3_pll_vco; boot_options.bits.sel_mux_phy_c_d_phy_f_g = (dmub->asic ==DMUB_ASIC_DCN31B ) ?1 :0 ; + boot_options.bits.disable_dpia_bw_allocation = params->disable_dpia_bw_allocation;REG_WRITE (DMCUB_SCRATCH14 , boot_options.all); }
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +1 -0
@@ -418,6 +418,7 @@ void dmub_dcn35_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu boot_options.bits.disable_sldo_opt = params->disable_sldo_opt; boot_options.bits.enable_non_transparent_setconfig = params->enable_non_transparent_setconfig; boot_options.bits.lower_hbr3_phy_ssc = params->lower_hbr3_phy_ssc; + boot_options.bits.disable_dpia_bw_allocation = params->disable_dpia_bw_allocation;REG_WRITE (DMCUB_SCRATCH14 , boot_options.all); }
Signature · 1 line
2.43.0
PATCH 7/8 drm/amd/display: write segment pointer with mot enabled for mst
In reply to Tom ChungFrom: Meenakshikumar Somasundaram <[email protected]>
[Why]
Some mst branches NAK's segment pointer writes with mot disabled. So reset of segment pointer to 0 should be performed with mot enabled.
[How]
Write segment pointer of mst branch devices with mot enabled.
--- drivers/gpu/drm/amd/display/dc/link/link_factory.c | 3 --- .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 6 ++++++ 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +0 -3
@@ -817,9 +817,6 @@ static bool construct_dpia(struct dc_link *link, link->psr_settings.psr_version =DC_PSR_VERSION_UNSUPPORTED ; -/* Some docks seem to NAK I2C writes to segment pointer with mot=0. */ - link->wa_flags.dp_mot_reset_segment = true; -return true; ddc_create_fail:
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +6 -0
@@ -1867,6 +1867,12 @@ static bool retrieve_link_cap(struct dc_link *link) link->dpcd_caps.is_mst_capable =read_is_mst_supported (link);DC_LOG_DC ("%s: MST_Support: %s\n" , __func__,str_yes_no (link->dpcd_caps.is_mst_capable)); +/* Some MST docks seem to NAK I2C writes to segment pointer with mot=0. */ +if (link->dpcd_caps.is_mst_capable) + link->wa_flags.dp_mot_reset_segment = true; +else + link->wa_flags.dp_mot_reset_segment = false; +get_active_converter_info (ds_port.byte, link);dp_wa_power_up_0010FA (link, dpcd_data,sizeof (dpcd_data));
Signature · 1 line
2.43.0
PATCH 8/8 drm/amd/display: Promote DC to 3.2.355
In reply to Tom ChungFrom: Taimur Hassan <[email protected]>
This version brings along following update:
-Fix GFP_ATOMIC abuse
-Fix several checkpatch issues
-Set DCN32 to use update planes and stream version 3 -Write segment pointer with mot enabled for MST -Control BW allocation in FW side
-Change clean dsc blocks condition in accelerated mode -Check disable_fec flag before enabling FEC
--- 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
@@ -55,7 +55,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.354" +#define DC_VER "3.2.355"/** * 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 - a31e5a23e933b2087601d9f3debce21aea9205e8 -> drm/amd/display: Promote DC to 3.2.354) 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: Tom Chung <[email protected]>
Sent: Tuesday, October 14, 2025 10:57 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 0/8] DC Patches Oct 20 2025
This DC patchset brings improvements in multiple areas. In summary, we have:
* Fix GFP_ATOMIC abuse
* Fix several checkpatch issues
* Set DCN32 to use update planes and stream version 3
* Write segment pointer with mot enabled for MST
* Control BW allocation in FW side
* Change clean dsc blocks condition in accelerated mode
* Check disable_fec flag before enabling FEC
Aurabindo Pillai (1):
drm/amd/display: Fix GFP_ATOMIC abuse
Cruise Hung (1):
drm/amd/display: Control BW allocation in FW side
Ilya Bakoulin (1):
drm/amd/display: Fix misc. checkpatch issues
Lewis Huang (1):
drm/amd/display: Change clean dsc blocks condition in accelerated mode
Meenakshikumar Somasundaram (2):
drm/amd/display: Check disable_fec flag before enabling fec. drm/amd/display: write segment pointer with mot enabled for mst
Nicholas Carbones (1):
drm/amd/display: Set DCN32 to use update planes and stream version 3
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.355
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 57 +++---- drivers/gpu/drm/amd/display/dc/dc.h | 5 +- .../amd/display/dc/dccg/dcn20/dcn20_dccg.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 6 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 11 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 160 ++++++++---------- .../drm/amd/display/dc/link/link_factory.c | 3 - .../dc/link/protocols/link_dp_capability.c | 10 +- .../dc/link/protocols/link_dp_dpia_bw.c | 5 - .../dc/resource/dcn20/dcn20_resource.c | 28 ++- .../dc/resource/dcn201/dcn201_resource.c | 30 ++-- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 1 + 17 files changed, 144 insertions(+), 183 deletions(-)
--
2.43.0