DC Patches Apr 27 2026
Subsystems (3)
cover DC Patches Apr 27 2026
This DC patchset brings improvements in multiple areas. In summary, we have:
-Fix root clock disabled when DSC power gate disabled for DCN314 -Enable RCG on DCN42
-Enable/Disable some power gating
-Remove Mall, SubVP and MCLK from DCN42
-Unify fast update classification paths
-Fix narrowing boundaries in dml
-Update MCIF_ADDR macro to address IGT DWB regression -Fix dual cursor shows on extend desktop
-Fix hubp tmz field define mismatch
Charlene Liu (2):
drm/amd/display: fix hubp tmz field define mismatch drm/amd/display: fix dual cursor shows on extend desktop
Gaghik Khachatrian (3):
drm/amd/display: Update MCIF_ADDR macro to address IGT DWB regression drm/amd/display: Fix implicit conversion warning drm/amd/display: Fix narrowing boundaries in dml
Ivan Lipski (2):
drm/amd/display: Remove Mall, SubVP and MCLK from DCN42 drm/amd/display: Enable RCG on DCN42
Jing Zhou (1):
drm/amd/display: fix root clock disabled when DSC power gate disabled
for DCN314
Leo Chen (3):
drm/amd/display: Enable driver power gating drm/amd/display: Enable HUBP/OPTC/DPP power gating drm/amd/display: Disable hpo power gate
Rafal Ostrowski (1):
drm/amd/display: Unify fast update classification paths
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.57.0 drm/amd/display: Promote DC to 3.2.380
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 252 +-- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 14 +- drivers/gpu/drm/amd/display/dc/dc.h | 38 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 + .../drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 20 +- .../amd/display/dc/dml/calcs/dcn_calc_auto.c | 1854 ++++++++--------- .../amd/display/dc/dml/calcs/dcn_calc_math.c | 6 +- .../drm/amd/display/dc/dml/calcs/dcn_calcs.c | 280 +-- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 112 +- .../dc/dml/dcn20/display_mode_vba_20.c | 292 ++- .../dc/dml/dcn20/display_mode_vba_20v2.c | 290 ++- .../dc/dml/dcn20/display_rq_dlg_calc_20.c | 164 +- .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 164 +- .../dc/dml/dcn21/display_mode_vba_21.c | 296 ++- .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 80 +- .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 74 +- .../dc/dml/dcn30/display_mode_vba_30.c | 328 +-- .../dc/dml/dcn30/display_rq_dlg_calc_30.c | 82 +- .../amd/display/dc/dml/dcn301/dcn301_fpu.c | 20 +- .../amd/display/dc/dml/dcn302/dcn302_fpu.c | 16 +- .../amd/display/dc/dml/dcn303/dcn303_fpu.c | 16 +- .../drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 26 +- .../dc/dml/dcn31/display_mode_vba_31.c | 354 ++-- .../dc/dml/dcn31/display_rq_dlg_calc_31.c | 76 +- .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 8 +- .../dc/dml/dcn314/display_mode_vba_314.c | 358 ++-- .../dc/dml/dcn314/display_rq_dlg_calc_314.c | 80 +- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 291 +-- .../dc/dml/dcn32/display_mode_vba_32.c | 174 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 324 +-- .../dc/dml/dcn32/display_rq_dlg_calc_32.c | 138 +- .../amd/display/dc/dml/dcn321/dcn321_fpu.c | 49 +- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 22 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 22 +- .../drm/amd/display/dc/dml/display_mode_vba.c | 4 +- .../display/dc/dml/dml1_display_rq_dlg_calc.c | 32 +- .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 82 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 9 + .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 90 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- .../dc/resource/dcn42/dcn42_resource.c | 53 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 +- 44 files changed, 3092 insertions(+), 3540 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/14 drm/amd/display: Enable driver power gating
From: Leo Chen <[email protected]>
[Why & How]
Enable driver power gating. Temporarily disable DIO power gating.
--- drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +2 -1
@@ -758,11 +758,12 @@ static const struct dc_debug_options debug_defaults_drv = { .min_disp_clk_khz = 50000, .static_screen_wait_frames = 2, .disable_z10 = false, - .ignore_pg = true, + .ignore_pg = false, .disable_stutter_for_wm_program = true, .min_deep_sleep_dcfclk_khz = 8000, .replay_skip_crtc_disabled = true, .psr_skip_crtc_disable = true, + .disable_dio_power_gate = true, };static const struct dc_check_config config_defaults = {
Signature · 1 line
2.43.0
PATCH 2/14 drm/amd/display: fix hubp tmz field define mismatch
In reply to Tom ChungFrom: Charlene Liu <[email protected]>
[why & how]
to make hubp surface_flip_registers field define mismatch with dc_plane_address
--- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +1 -1
@@ -133,7 +133,7 @@ struct surface_flip_registers {uint32_t DCSURF_SECONDARY_META_SURFACE_ADDRESS ;uint32_t DCSURF_SECONDARY_SURFACE_ADDRESS_HIGH ;uint32_t DCSURF_SECONDARY_SURFACE_ADDRESS ; -bool tmz_surface; +uint8_t tmz_surface;bool immediate;uint8_t vmid;bool grph_stereo;
Signature · 1 line
2.43.0
PATCH 3/14 drm/amd/display: fix dual cursor shows on extend desktop
In reply to Tom ChungFrom: Charlene Liu <[email protected]>
[why & how]
when dpp pipe power gating disabled in driver, disable_pipe did not disable cursor so next time as long as this pipe powers up, it will be visible.
port dcn314 logic: disable cursor when it should be pipe pg.
--- drivers/gpu/drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 9 +++++++++ drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 7 +++++++ 2 files changed, 16 insertions(+)
drivers/gpu/drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c +9 -0
@@ -280,6 +280,14 @@ static void dpp42_dpp_setup(dpp3_program_post_csc (dpp_base, color_space, select,NULL ); } } +static void dcn42_dpp_force_disable_cursor (struct dpp *dpp_base) +{ +struct dcn401_dpp *dpp =TO_DCN401_DPP (dpp_base); + +/* Force disable cursor */ +REG_UPDATE (CURSOR0_CONTROL ,CUR0_ENABLE ,0 ); + dpp_base->pos.cur0_ctl.bits.cur0_enable =0 ; +}static struct dpp_funcs dcn42_dpp_funcs = { .dpp_program_gamcor_lut = dpp3_program_gamcor_lut,
@@ -302,6 +310,7 @@ static struct dpp_funcs dcn42_dpp_funcs = { .dpp_cm_hist_control = dpp42_dpp_cm_hist_control, .dpp_cm_hist_read = dpp42_dpp_cm_hist_read, .dpp_read_reg_state = dpp30_read_reg_state, + .dpp_force_disable_cursor = dcn42_dpp_force_disable_cursor, };
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +7 -0
@@ -904,6 +904,13 @@ void dcn35_disable_plane(struct dc *dc, struct dc_state *state, struct pipe_ctxif (!pipe_ctx->plane_res.hubp || pipe_ctx->plane_res.hubp->power_gated)return ; +if (dc->debug.disable_dpp_power_gate) { +/* Workaround for use case when disabled power gating set to 1 */ +/* Force disable cursor if power gating is disabled */ +struct dpp *dpp = pipe_ctx->plane_res.dpp; +if (dpp && dpp->funcs->dpp_force_disable_cursor) + dpp->funcs->dpp_force_disable_cursor (dpp); + }if (hws->funcs.plane_atomic_disable) hws->funcs.plane_atomic_disable (dc, pipe_ctx);
Signature · 1 line
2.43.0
PATCH 4/14 drm/amd/display: Update MCIF_ADDR macro to address IGT DWB regression
In reply to Tom ChungFrom: Gaghik Khachatrian <[email protected]>
[Why]
A previous warning-fix commit updated type casts in the DCN3 mmhubbub code but missed updating the MCIF_ADDR macro to the correct, fully parenthesized and casted version. This caused a regression during DWB tests, where address values could be misinterpreted, potentially leading to incorrect hardware programming.
[How]
Updated the MCIF_ADDR macro in dcn30_mmhubbub.c to use the proper parenthesization and type casting, ensuring correct address handling. Removed redundant casts from REG_UPDATE calls for improved clarity and consistency with current coding standards.
--- .../drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c +10 -10
@@ -40,8 +40,8 @@#define FN (reg_name, field_name) \ mcif_wb30->mcif_wb_shift->field_name, mcif_wb30->mcif_wb_mask->field_name -#define MCIF_ADDR (addr) (((unsigned long long)addr & 0xffffffffff) + 0xFE) >> 8 -#define MCIF_ADDR_HIGH (addr) (unsigned long long)addr >> 40 +#define MCIF_ADDR (addr) ((uint32_t)((((unsigned long long)(addr) & 0xffffffffffULL) + 0xFEULL) >> 8)) +#define MCIF_ADDR_HIGH (addr) ((uint32_t)(((unsigned long long)(addr)) >> 40))/* wbif programming guide: * 1. set up wbif parameter:
@@ -107,35 +107,35 @@ static void mmhubbub3_config_mcif_buf(struct mcif_wb *mcif_wb,struct dcn30_mmhubbub *mcif_wb30 =TO_DCN30_MMHUBBUB (mcif_wb);/* buffer address for packing mode or Luma in planar mode */ -REG_UPDATE (MCIF_WB_BUF_1_ADDR_Y ,MCIF_WB_BUF_1_ADDR_Y , (uint32_t )MCIF_ADDR (params->luma_address[0 ])); +REG_UPDATE (MCIF_WB_BUF_1_ADDR_Y ,MCIF_WB_BUF_1_ADDR_Y ,MCIF_ADDR (params->luma_address[0 ]));REG_UPDATE (MCIF_WB_BUF_1_ADDR_Y_HIGH ,MCIF_WB_BUF_1_ADDR_Y_HIGH ,MCIF_ADDR_HIGH (params->luma_address[0 ]));/* buffer address for Chroma in planar mode (unused in packing mode) */ -REG_UPDATE (MCIF_WB_BUF_1_ADDR_C ,MCIF_WB_BUF_1_ADDR_C , (uint32_t )MCIF_ADDR (params->chroma_address[0 ])); +REG_UPDATE (MCIF_WB_BUF_1_ADDR_C ,MCIF_WB_BUF_1_ADDR_C ,MCIF_ADDR (params->chroma_address[0 ]));REG_UPDATE (MCIF_WB_BUF_1_ADDR_C_HIGH ,MCIF_WB_BUF_1_ADDR_C_HIGH ,MCIF_ADDR_HIGH (params->chroma_address[0 ]));/* buffer address for packing mode or Luma in planar mode */ -REG_UPDATE (MCIF_WB_BUF_2_ADDR_Y ,MCIF_WB_BUF_2_ADDR_Y , (uint32_t )MCIF_ADDR (params->luma_address[1 ])); +REG_UPDATE (MCIF_WB_BUF_2_ADDR_Y ,MCIF_WB_BUF_2_ADDR_Y ,MCIF_ADDR (params->luma_address[1 ]));REG_UPDATE (MCIF_WB_BUF_2_ADDR_Y_HIGH ,MCIF_WB_BUF_2_ADDR_Y_HIGH ,MCIF_ADDR_HIGH (params->luma_address[1 ]));/* buffer address for Chroma in planar mode (unused in packing mode) */ -REG_UPDATE (MCIF_WB_BUF_2_ADDR_C ,MCIF_WB_BUF_2_ADDR_C , (uint32_t )MCIF_ADDR (params->chroma_address[1 ])); +REG_UPDATE (MCIF_WB_BUF_2_ADDR_C ,MCIF_WB_BUF_2_ADDR_C ,MCIF_ADDR (params->chroma_address[1 ]));REG_UPDATE (MCIF_WB_BUF_2_ADDR_C_HIGH ,MCIF_WB_BUF_2_ADDR_C_HIGH ,MCIF_ADDR_HIGH (params->chroma_address[1 ]));/* buffer address for packing mode or Luma in planar mode */ -REG_UPDATE (MCIF_WB_BUF_3_ADDR_Y ,MCIF_WB_BUF_3_ADDR_Y , (uint32_t )MCIF_ADDR (params->luma_address[2 ])); +REG_UPDATE (MCIF_WB_BUF_3_ADDR_Y ,MCIF_WB_BUF_3_ADDR_Y ,MCIF_ADDR (params->luma_address[2 ]));REG_UPDATE (MCIF_WB_BUF_3_ADDR_Y_HIGH ,MCIF_WB_BUF_3_ADDR_Y_HIGH ,MCIF_ADDR_HIGH (params->luma_address[2 ]));/* buffer address for Chroma in planar mode (unused in packing mode) */ -REG_UPDATE (MCIF_WB_BUF_3_ADDR_C ,MCIF_WB_BUF_3_ADDR_C , (uint32_t )MCIF_ADDR (params->chroma_address[2 ])); +REG_UPDATE (MCIF_WB_BUF_3_ADDR_C ,MCIF_WB_BUF_3_ADDR_C ,MCIF_ADDR (params->chroma_address[2 ]));REG_UPDATE (MCIF_WB_BUF_3_ADDR_C_HIGH ,MCIF_WB_BUF_3_ADDR_C_HIGH ,MCIF_ADDR_HIGH (params->chroma_address[2 ]));/* buffer address for packing mode or Luma in planar mode */ -REG_UPDATE (MCIF_WB_BUF_4_ADDR_Y ,MCIF_WB_BUF_4_ADDR_Y , (uint32_t )MCIF_ADDR (params->luma_address[3 ])); +REG_UPDATE (MCIF_WB_BUF_4_ADDR_Y ,MCIF_WB_BUF_4_ADDR_Y ,MCIF_ADDR (params->luma_address[3 ]));REG_UPDATE (MCIF_WB_BUF_4_ADDR_Y_HIGH ,MCIF_WB_BUF_4_ADDR_Y_HIGH ,MCIF_ADDR_HIGH (params->luma_address[3 ]));/* buffer address for Chroma in planar mode (unused in packing mode) */ -REG_UPDATE (MCIF_WB_BUF_4_ADDR_C ,MCIF_WB_BUF_4_ADDR_C , (uint32_t )MCIF_ADDR (params->chroma_address[3 ])); +REG_UPDATE (MCIF_WB_BUF_4_ADDR_C ,MCIF_WB_BUF_4_ADDR_C ,MCIF_ADDR (params->chroma_address[3 ]));REG_UPDATE (MCIF_WB_BUF_4_ADDR_C_HIGH ,MCIF_WB_BUF_4_ADDR_C_HIGH ,MCIF_ADDR_HIGH (params->chroma_address[3 ]));/* setup luma & chroma size
Signature · 1 line
2.43.0
PATCH 5/14 drm/amd/display: Fix implicit conversion warning
In reply to Tom ChungFrom: Gaghik Khachatrian <[email protected]>
[Why & How]
Fix implicit narrowing conversion warnings.
--- drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +1 -1
@@ -3531,7 +3531,7 @@ void hwss_send_cursor_info_to_dmu(union block_sequence_params *params)struct pipe_ctx *pipe_ctx = params->send_cursor_info_to_dmu_params.pipe_ctx;int pipe_idx = params->send_cursor_info_to_dmu_params.pipe_idx; -dc_send_update_cursor_info_to_dmu (pipe_ctx, pipe_idx); +dc_send_update_cursor_info_to_dmu (pipe_ctx, (uint8_t )pipe_idx); }void hwss_set_cursor_attribute (union block_sequence_params *params)
Signature · 1 line
2.43.0
PATCH 6/14 drm/amd/display: Enable HUBP/OPTC/DPP power gating
In reply to Tom ChungFrom: Leo Chen <[email protected]>
[Why & How]
Enable HUBP/OPTC/DPP power gating.
--- .../amd/display/dc/resource/dcn42/dcn42_resource.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +6 -5
@@ -694,9 +694,12 @@ static const struct dc_debug_options debug_defaults_drv = { .force_abm_enable = false, .clock_trace = true, .disable_pplib_clock_request = false, - .disable_dpp_power_gate = true, - .disable_hubp_power_gate = true, - .disable_optc_power_gate = true, + .ignore_pg = false, + .disable_dpp_power_gate = false, + .disable_hubp_power_gate = false, + .disable_optc_power_gate = false, + .disable_dsc_power_gate = false, + .disable_dio_power_gate = true, .pipe_split_policy = MPC_SPLIT_AVOID, .force_single_disp_pipe_split = false, .disable_dcc = DCC_ENABLE,
@@ -758,12 +761,10 @@ static const struct dc_debug_options debug_defaults_drv = { .min_disp_clk_khz = 50000, .static_screen_wait_frames = 2, .disable_z10 = false, - .ignore_pg = false, .disable_stutter_for_wm_program = true, .min_deep_sleep_dcfclk_khz = 8000, .replay_skip_crtc_disabled = true, .psr_skip_crtc_disable = true, - .disable_dio_power_gate = true, };static const struct dc_check_config config_defaults = {
Signature · 1 line
2.43.0
PATCH 8/14 drm/amd/display: Unify fast update classification paths
In reply to Tom ChungFrom: Rafal Ostrowski <[email protected]>
[Why]
The dc_fast_update intermediate struct created code duplication and complexity with multiple classification paths (populate_fast_updates, fast_nonaddr_updates_exist, full_update_required). This refactoring simplifies the update classification system by consolidating to a single path while maintaining compatibility and adding comprehensive test coverage for fast sequence functionality.
[How]
Remove entire dc_fast_update struct and associated helper functions:
- populate_fast_updates
- fast_nonaddr_updates_exist
- full_update_required
and
- Refactor check_update_surfaces_for_stream as the single classification path with explicit handling for func_shaper, lut3d_func, cursor_csc_color_matrix_change and scaler_sharpener_update.
- Add reserved bitfields to surface_update_flags and stream_update_flags unions for completeness guards.
- Extract dc_check_address_only_update and dc_check_update_surfaces_for_stream as public.
- Add comprehensive test coverage with parameterized tests for all FAST flags, update classification tests for MED/FULL paths, and completeness guard tests.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 252 ++---------------- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 12 + drivers/gpu/drm/amd/display/dc/dc.h | 36 +-- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 + 4 files changed, 39 insertions(+), 264 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +21 -231
@@ -3006,7 +3006,8 @@ static struct surface_update_descriptor det_surface_update( update_flags->bits.gamut_remap_change || update_flags->bits.input_csc_change || update_flags->bits.cm_hist_change || - update_flags->bits.coeff_reduction_change)) { + update_flags->bits.coeff_reduction_change || + update_flags->bits.cursor_csc_color_matrix_change)) {elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); }return overall_type;
@@ -3096,8 +3097,10 @@ static struct surface_update_descriptor check_update_surfaces_for_stream( stream_update->vrr_active_variable || stream_update->vrr_active_fixed)) su_flags->bits.fams_changed = 1; -if (stream_update->scaler_sharpener_update) +if (stream_update->scaler_sharpener_update) { su_flags->bits.scaler_sharpener =1 ; +elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_STREAM ); + }if (stream_update->sharpening_required) su_flags->bits.sharpening_required =1 ;
@@ -3162,6 +3165,16 @@ static struct surface_update_descriptor check_update_surfaces_for_stream( su_flags->bits.cursor_pos =1 ;elevate_update_type (&overall_type,UPDATE_TYPE_FAST ,LOCK_DESCRIPTOR_STREAM ); } + +if (stream_update->func_shaper) { + su_flags->bits.func_shaper =1 ; +elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_STREAM ); + } + +if (stream_update->lut3d_func) { + su_flags->bits.lut3d_func =1 ; +elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_STREAM ); + } }for (int i =0 ; i < surface_count; i++) {
@@ -4086,7 +4099,7 @@ static void build_dmub_update_dirty_rect( } } -static bool check_address_only_update (union surface_update_flags update_flags) +bool dc_check_address_only_update (union surface_update_flags update_flags) {union surface_update_flags addr_only_update_flags; addr_only_update_flags.raw =0 ;
@@ -4190,7 +4203,7 @@ static void commit_planes_for_stream_fast(struct dc *dc,for (i =0 ; i < surface_count; i++) {if (srf_updates[i].surface && srf_updates[i].surface->update_flags.raw && - !check_address_only_update (srf_updates[i].surface->update_flags)) { + !dc_check_address_only_update (srf_updates[i].surface->update_flags)) {/* more than address update, need to acquire FAMS2 lock */ should_offload_fams2_flip = false;break ;
@@ -5155,133 +5168,6 @@ static bool commit_minimal_transition_state(struct dc *dc,return true; } -void populate_fast_updates (struct dc_fast_update *fast_update, -struct dc_surface_update *srf_updates, -int surface_count, -struct dc_stream_update *stream_update) -{ -int i =0 ; - -if (stream_update) { - fast_update[0 ].out_transfer_func = stream_update->out_transfer_func; - fast_update[0 ].output_csc_transform = stream_update->output_csc_transform; - fast_update[0 ].cursor_attributes = stream_update->cursor_attributes; - fast_update[0 ].cursor_position = stream_update->cursor_position; - fast_update[0 ].periodic_interrupt = stream_update->periodic_interrupt; - fast_update[0 ].dither_option = stream_update->dither_option; - fast_update[0 ].gamut_remap = stream_update->gamut_remap; - fast_update[0 ].vrr_infopacket = stream_update->vrr_infopacket; - fast_update[0 ].vsc_infopacket = stream_update->vsc_infopacket; - fast_update[0 ].vsp_infopacket = stream_update->vsp_infopacket; - fast_update[0 ].hfvsif_infopacket = stream_update->hfvsif_infopacket; - fast_update[0 ].vtem_infopacket = stream_update->vtem_infopacket; - fast_update[0 ].adaptive_sync_infopacket = stream_update->adaptive_sync_infopacket; - fast_update[0 ].avi_infopacket = stream_update->avi_infopacket; - fast_update[0 ].hdr_static_metadata = stream_update->hdr_static_metadata; - }else { - fast_update[0 ].out_transfer_func =NULL ; - fast_update[0 ].output_csc_transform =NULL ; - fast_update[0 ].cursor_attributes =NULL ; - fast_update[0 ].cursor_position =NULL ; - fast_update[0 ].periodic_interrupt =NULL ; - fast_update[0 ].dither_option =NULL ; - fast_update[0 ].gamut_remap =NULL ; - fast_update[0 ].vrr_infopacket =NULL ; - fast_update[0 ].vsc_infopacket =NULL ; - fast_update[0 ].vsp_infopacket =NULL ; - fast_update[0 ].hfvsif_infopacket =NULL ; - fast_update[0 ].vtem_infopacket =NULL ; - fast_update[0 ].adaptive_sync_infopacket =NULL ; - fast_update[0 ].avi_infopacket =NULL ; - fast_update[0 ].hdr_static_metadata =NULL ; - } - -for (i =0 ; i < surface_count; i++) { - fast_update[i].flip_addr = srf_updates[i].flip_addr; - fast_update[i].gamma = srf_updates[i].gamma; - fast_update[i].gamut_remap_matrix = srf_updates[i].gamut_remap_matrix; - fast_update[i].input_csc_color_matrix = srf_updates[i].input_csc_color_matrix; - fast_update[i].coeff_reduction_factor = srf_updates[i].coeff_reduction_factor; - fast_update[i].cursor_csc_color_matrix = srf_updates[i].cursor_csc_color_matrix; -#if defined(CONFIG_DRM_AMD_DC_DCN4_2 ) - fast_update[i].cm_hist_control = srf_updates[i].cm_hist_control; -#endif - } -} - -static bool fast_updates_exist (const struct dc_fast_update *fast_update,int surface_count) -{ -int i; - -if (fast_update[0 ].out_transfer_func || - fast_update[0 ].output_csc_transform || - fast_update[0 ].gamut_remap || - fast_update[0 ].cursor_attributes || - fast_update[0 ].cursor_position || - fast_update[0 ].periodic_interrupt || - fast_update[0 ].dither_option || - fast_update[0 ].vrr_infopacket || - fast_update[0 ].vsc_infopacket || - fast_update[0 ].vsp_infopacket || - fast_update[0 ].hfvsif_infopacket || - fast_update[0 ].vtem_infopacket || - fast_update[0 ].adaptive_sync_infopacket || - fast_update[0 ].avi_infopacket || - fast_update[0 ].hdr_static_metadata) -return true; - -for (i =0 ; i < surface_count; i++) { -if (fast_update[i].flip_addr || - fast_update[i].gamma || - fast_update[i].gamut_remap_matrix || - fast_update[i].input_csc_color_matrix || - fast_update[i].cursor_csc_color_matrix || -#if defined(CONFIG_DRM_AMD_DC_DCN4_2) - fast_update[i].cm_hist_control || -#endif - fast_update[i].coeff_reduction_factor) -return true; - } - -return false; -} - -bool fast_nonaddr_updates_exist (struct dc_fast_update *fast_update,int surface_count) -{ -int i; - -if (fast_update[0 ].out_transfer_func || - fast_update[0 ].output_csc_transform || - fast_update[0 ].cursor_attributes || - fast_update[0 ].cursor_position || - fast_update[0 ].periodic_interrupt || - fast_update[0 ].dither_option || - fast_update[0 ].gamut_remap || - fast_update[0 ].vrr_infopacket || - fast_update[0 ].vsc_infopacket || - fast_update[0 ].vsp_infopacket || - fast_update[0 ].hfvsif_infopacket || - fast_update[0 ].vtem_infopacket || - fast_update[0 ].adaptive_sync_infopacket || - fast_update[0 ].avi_infopacket || - fast_update[0 ].hdr_static_metadata) -return true; - -for (i =0 ; i < surface_count; i++) { -if (fast_update[i].input_csc_color_matrix || - fast_update[i].gamma || - fast_update[i].gamut_remap_matrix || - fast_update[i].coeff_reduction_factor || -#if defined(CONFIG_DRM_AMD_DC_DCN4_2) - fast_update[i].cm_hist_control || -#endif - fast_update[i].cursor_csc_color_matrix) -return true; - } - -return false; -} - static bool full_update_required_weak( const struct dc *dc, const struct dc_surface_update *srf_updates,
@@ -5310,76 +5196,6 @@ static bool full_update_required_weak(return false; } -static bool full_update_required ( -const struct dc *dc, -const struct dc_surface_update *srf_updates, -int surface_count, -const struct dc_stream_update *stream_update, -const struct dc_stream_state *stream) -{ -const union dc_plane_cm_flags blend_only_flags = { - .bits = { - .blend_enable =1 , - } - }; - -if (full_update_required_weak (dc, srf_updates, surface_count, stream_update, stream)) -return true; - -for (int i =0 ; i < surface_count; i++) { -if (srf_updates && - (srf_updates[i].plane_info || - srf_updates[i].scaling_info || - (srf_updates[i].hdr_mult.value && - srf_updates[i].hdr_mult.value != srf_updates->surface->hdr_mult.value) || - (srf_updates[i].sdr_white_level_nits && - srf_updates[i].sdr_white_level_nits != srf_updates->surface->sdr_white_level_nits) || - srf_updates[i].in_transfer_func || - srf_updates[i].surface->force_full_update || - (srf_updates[i].flip_addr && - srf_updates[i].flip_addr->address.tmz_surface != srf_updates[i].surface->address.tmz_surface) || - (srf_updates[i].cm && - ((srf_updates[i].cm->flags.all != blend_only_flags.all && srf_updates[i].cm->flags.all !=0 ) || - (srf_updates[i].surface->cm.flags.all != blend_only_flags.all && srf_updates[i].surface->cm.flags.all !=0 ))))) -return true; - } - -if (stream_update && - (((stream_update->src.height !=0 && stream_update->src.width !=0 ) || - (stream_update->dst.height !=0 && stream_update->dst.width !=0 ) || - stream_update->integer_scaling_update) || - stream_update->abm_level || - stream_update->dpms_off || - stream_update->allow_freesync || - stream_update->vrr_active_variable || - stream_update->vrr_active_fixed || - stream_update->output_color_space || - stream_update->wb_update || - stream_update->dsc_config || - stream_update->mst_bw_update || - stream_update->func_shaper || - stream_update->lut3d_func || - stream_update->pending_test_pattern || - stream_update->crtc_timing_adjust || - stream_update->scaler_sharpener_update || - stream_update->hw_cursor_req)) -return true; - -return false; -} - -static bool fast_update_only ( -const struct dc *dc, -const struct dc_fast_update *fast_update, -const struct dc_surface_update *srf_updates, -int surface_count, -const struct dc_stream_update *stream_update, -const struct dc_stream_state *stream) -{ -return fast_updates_exist (fast_update, surface_count) - && !full_update_required (dc, srf_updates, surface_count, stream_update, stream); -} - static bool update_planes_and_stream_v2(struct dc *dc, struct dc_surface_update *srf_updates, int surface_count, struct dc_stream_state *stream,
@@ -5387,7 +5203,6 @@ static bool update_planes_and_stream_v2(struct dc *dc, {struct dc_state *context;enum surface_update_type update_type; -struct dc_fast_update fast_update[MAX_SURFACES ] = {0 };/* In cases where MPO and split or ODM are used transitions can * cause underflow. Apply stream configuration with minimal pipe
@@ -5395,11 +5210,7 @@ static bool update_planes_and_stream_v2(struct dc *dc,*/ bool force_minimal_pipe_splitting =0 ;bool is_plane_addition =0 ; -bool is_fast_update_only; -populate_fast_updates (fast_update, srf_updates, surface_count, stream_update); - is_fast_update_only =fast_update_only (dc, fast_update, srf_updates, - surface_count, stream_update, stream); force_minimal_pipe_splitting = could_mpcc_tree_change_for_active_pipes( dc, stream,
@@ -5437,7 +5248,7 @@ static bool update_planes_and_stream_v2(struct dc *dc,commit_minimal_transition_state_in_dc_update (dc, context, stream, srf_updates, surface_count); -if (is_fast_update_only && !dc->check_config.enable_legacy_fast_update) { +if (update_type ==UPDATE_TYPE_FAST && !dc->check_config.enable_legacy_fast_update) { commit_planes_for_stream_fast(dc, srf_updates, surface_count,
@@ -5473,13 +5284,8 @@ static void commit_planes_and_stream_update_on_current_context(struct dc *dc,struct dc_stream_update *stream_update, enum surface_update_type update_type) { - struct dc_fast_update fast_update[MAX_SURFACES] = {0}; - ASSERT(update_type < UPDATE_TYPE_FULL); -populate_fast_updates (fast_update, srf_updates, surface_count, - stream_update); - if (fast_update_only(dc, fast_update, srf_updates, surface_count, - stream_update, stream) && + if (update_type == UPDATE_TYPE_FAST && !dc->check_config.enable_legacy_fast_update) commit_planes_for_stream_fast(dc, srf_updates,
@@ -7457,23 +7263,6 @@ 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,
@@ -7489,7 +7278,8 @@ static bool update_planes_and_stream_prepare_v3(if (scratch->new_context == scratch->dc->current_state) {ASSERT (scratch->update_type <UPDATE_TYPE_FULL ); - scratch->flow = is_hwss_fast_path_only + scratch->flow = (scratch->update_type ==UPDATE_TYPE_FAST && + !scratch->dc->check_config.enable_legacy_fast_update) ?UPDATE_V3_FLOW_NO_NEW_CONTEXT_CONTEXT_FAST :UPDATE_V3_FLOW_NO_NEW_CONTEXT_CONTEXT_FULL ;return true;
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +12 -0
@@ -1059,6 +1059,18 @@ void hwss_build_fast_sequence(struct dc *dc, (*num_steps)++; } +if (current_mpc_pipe->plane_state->update_flags.bits.lut_3d && + current_mpc_pipe->plane_state->mcm_luts.lut3d_data.lut3d_src == +DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM && + current_mpc_pipe->plane_state->mcm_shaper_3dlut_setting == +DC_CM2_SHAPER_3DLUT_SETTING_ENABLE_SHAPER_3DLUT && + current_mpc_pipe->plane_res.hubp->funcs->hubp_enable_3dlut_fl) { + block_sequence[*num_steps].params.hubp_enable_3dlut_fl_params.hubp = + current_mpc_pipe->plane_res.hubp; + block_sequence[*num_steps].func =HUBP_ENABLE_3DLUT_FL ; + (*num_steps)++; + } +if (hws->funcs.set_input_transfer_func && current_mpc_pipe->plane_state->update_flags.bits.gamma_change) { block_sequence[*num_steps].params.set_input_transfer_func_params.dc = dc; block_sequence[*num_steps].params.set_input_transfer_func_params.pipe_ctx = current_mpc_pipe;
drivers/gpu/drm/amd/display/dc/dc.h +3 -33
@@ -1500,11 +1500,14 @@ union surface_update_flags { uint32_t full_update:1; uint32_t sdr_white_level_nits:1; uint32_t cm_hist_change:1; + uint32_t reserved:2; /* adjust when adding new flags */ } bits;uint32_t raw; }; +bool dc_check_address_only_update (union surface_update_flags update_flags); +#define DC_REMOVE_PLANE_POINTERS 1struct dc_plane_state {
@@ -1883,34 +1886,6 @@ struct dc_scaling_info {struct scaling_taps scaling_quality; }; -struct dc_fast_update { -const struct dc_flip_addrs *flip_addr; -const struct dc_gamma *gamma; -const struct colorspace_transform *gamut_remap_matrix; -const struct dc_csc_transform *input_csc_color_matrix; -const struct fixed31_32 *coeff_reduction_factor; -struct dc_transfer_func *out_transfer_func; -struct dc_csc_transform *output_csc_transform; -const struct dc_csc_transform *cursor_csc_color_matrix; -#if defined(CONFIG_DRM_AMD_DC_DCN4_2 ) -struct cm_hist_control *cm_hist_control; -#endif -/* stream-level fast updates */ -const struct colorspace_transform *gamut_remap; -const struct dc_cursor_attributes *cursor_attributes; -const struct dc_cursor_position *cursor_position; -const struct periodic_interrupt_config *periodic_interrupt; -const enum dc_dither_option *dither_option; -struct dc_info_packet *vrr_infopacket; -struct dc_info_packet *vsc_infopacket; -struct dc_info_packet *vsp_infopacket; -struct dc_info_packet *hfvsif_infopacket; -struct dc_info_packet *vtem_infopacket; -struct dc_info_packet *adaptive_sync_infopacket; -struct dc_info_packet *avi_infopacket; -struct dc_info_packet *hdr_static_metadata; -}; -struct dc_surface_update {struct dc_plane_state *surface;
@@ -2049,11 +2024,6 @@ bool dc_resource_is_dsc_encoding_supported(const struct dc *dc);void get_audio_check (struct audio_info *aud_modes,struct audio_check *aud_chk); -bool fast_nonaddr_updates_exist (struct dc_fast_update *fast_update,int surface_count); -void populate_fast_updates (struct dc_fast_update *fast_update, -struct dc_surface_update *srf_updates, -int surface_count, -struct dc_stream_update *stream_update);/* * Set up streams and links associated to drive sinks * The streams parameter is an absolute set of all active streams.
drivers/gpu/drm/amd/display/dc/dc_stream.h +3 -0
@@ -123,6 +123,9 @@ union stream_update_flags { uint32_t info_frame : 1; uint32_t dmdata : 1; uint32_t dither : 1; + uint32_t func_shaper : 1; + uint32_t lut3d_func : 1; + uint32_t reserved : 11; /* adjust when adding new flags */ } bits;uint32_t raw;
Signature · 1 line
2.43.0
PATCH 9/14 drm/amd/display: Remove Mall, SubVP and MCLK from DCN42
In reply to Tom ChungFrom: Ivan Lipski <[email protected]>
[Why&How]
Remove MALL, SubVP and MCLK features from DCN42 resource file since it is an APU and does not support them.
--- .../dc/resource/dcn42/dcn42_resource.c | 42 ------------------- 1 file changed, 42 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +0 -42
@@ -1807,8 +1807,6 @@ static struct resource_funcs dcn42_res_pool_funcs = { .get_panel_config_defaults = dcn42_get_panel_config_defaults, .get_preferred_eng_id_dpia = dcn42_get_preferred_eng_id_dpia, .update_soc_for_wm_a = dcn30_update_soc_for_wm_a, - .add_phantom_pipes = dcn32_add_phantom_pipes, - .calculate_mall_ways_from_bytes = dcn32_calculate_mall_ways_from_bytes, .prepare_mcache_programming = dcn42_prepare_mcache_programming, .build_pipe_pix_clk_params = dcn42_build_pipe_pix_clk_params, .get_power_profile = dcn401_get_power_profile,
@@ -1898,27 +1896,7 @@ static bool dcn42_resource_construct( dc->caps.cursor_not_scaled = true; dc->caps.min_horizontal_blanking_period =80 ; dc->caps.dmdata_alloc_size =2048 ; - dc->caps.mall_size_per_mem_channel =4 ; -/* total size = mall per channel * num channels * 1024 * 1024 */ - dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * - dc->ctx->dc_bios->vram_info.num_chans *1048576 ; dc->caps.cursor_cache_size = dc->caps.max_cursor_size * dc->caps.max_cursor_size *8 ; - dc->caps.cache_line_size =64 ; - dc->caps.cache_num_ways =16 ; - -/* Calculate the available MALL space */ - dc->caps.max_cab_allocation_bytes = -dcn32_calc_num_avail_chans_for_mall (dc, dc->ctx->dc_bios->vram_info.num_chans) * - dc->caps.mall_size_per_mem_channel *1024 *1024 ; - dc->caps.mall_size_total = dc->caps.max_cab_allocation_bytes; - - dc->caps.subvp_fw_processing_delay_us =15 ; - dc->caps.subvp_drr_max_vblank_margin_us =40 ; - dc->caps.subvp_prefetch_end_to_mall_start_us =15 ; - dc->caps.subvp_swath_height_margin_lines =16 ; - dc->caps.subvp_pstate_allow_width_us =20 ; - dc->caps.subvp_vertical_int_margin_us =30 ; - dc->caps.subvp_drr_vblank_start_margin_us =100 ;// 100us margin dc->caps.max_slave_planes =2 ; dc->caps.max_slave_yuv_planes =2 ;
@@ -2304,26 +2282,6 @@ static bool dcn42_resource_construct(resource_init_common_dml2_callbacks (dc, &dc->dml2_options); dc->dml2_options.callbacks.can_support_mclk_switch_using_fw_based_vblank_stretch = &dcn30_can_support_mclk_switch_using_fw_based_vblank_stretch; - dc->dml2_options.svp_pstate.callbacks.release_dsc = &dcn20_release_dsc; - dc->dml2_options.svp_pstate.callbacks.calculate_mall_ways_from_bytes = - pool->base.funcs->calculate_mall_ways_from_bytes; - - dc->dml2_options.svp_pstate.subvp_fw_processing_delay_us = dc->caps.subvp_fw_processing_delay_us; - dc->dml2_options.svp_pstate.subvp_prefetch_end_to_mall_start_us = dc->caps.subvp_prefetch_end_to_mall_start_us; - dc->dml2_options.svp_pstate.subvp_pstate_allow_width_us = dc->caps.subvp_pstate_allow_width_us; - dc->dml2_options.svp_pstate.subvp_swath_height_margin_lines = dc->caps.subvp_swath_height_margin_lines; - - dc->dml2_options.svp_pstate.force_disable_subvp = dc->debug.force_disable_subvp; - dc->dml2_options.svp_pstate.force_enable_subvp = dc->debug.force_subvp_mclk_switch; - - dc->dml2_options.mall_cfg.cache_line_size_bytes = dc->caps.cache_line_size; - dc->dml2_options.mall_cfg.cache_num_ways = dc->caps.cache_num_ways; - dc->dml2_options.mall_cfg.max_cab_allocation_bytes = - dc->caps.max_cab_allocation_bytes; - dc->dml2_options.mall_cfg.mblk_height_4bpe_pixels =DCN3_2_MBLK_HEIGHT_4BPE ; - dc->dml2_options.mall_cfg.mblk_height_8bpe_pixels =DCN3_2_MBLK_HEIGHT_8BPE ; - dc->dml2_options.mall_cfg.mblk_size_bytes =DCN3_2_MALL_MBLK_SIZE_BYTES ; - dc->dml2_options.mall_cfg.mblk_width_pixels =DCN3_2_MBLK_WIDTH ; dc->dml2_options.max_segments_per_hubp =24 ; dc->dml2_options.det_segment_size =DCN42_CRB_SEGMENT_SIZE_KB ;
Signature · 1 line
2.43.0
PATCH 10/14 drm/amd/display: Enable RCG on DCN42
In reply to Tom ChungFrom: Ivan Lipski <[email protected]>
[Why&How]
Align DCN42 IPS state to DCN35, DCN351 and DCN36
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -3
@@ -1864,10 +1864,8 @@ static enum dmub_ips_disable_type dm_get_default_ips_mode(case IP_VERSION (3 ,5 ,0 ):case IP_VERSION (3 ,6 ,0 ):case IP_VERSION (3 ,5 ,1 ): - ret =DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF ; -break ;case IP_VERSION (4 ,2 ,0 ): - ret =DMUB_IPS_DISABLE_ALL ; + ret =DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF ;break ;default :/* ASICs older than DCN35 do not have IPSs */
Signature · 1 line
2.43.0
PATCH 11/14 drm/amd/display: Disable hpo power gate
In reply to Tom ChungFrom: Leo Chen <[email protected]>
[Why & How]
Disable HPO power gate temporarily.
--- drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -0
@@ -700,6 +700,7 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_optc_power_gate = false, .disable_dsc_power_gate = false, .disable_dio_power_gate = true, + .disable_hpo_power_gate = true, .pipe_split_policy = MPC_SPLIT_AVOID, .force_single_disp_pipe_split = false, .disable_dcc = DCC_ENABLE,
Signature · 1 line
2.43.0
PATCH 12/14 drm/amd/display: fix root clock disabled when DSC power gate disabled for DCN314
In reply to Tom ChungFrom: Jing Zhou <[email protected]>
[Why]
When set debug.disable_dsc_power_gate = true, the original code uses an early return to skip the power gate sequence and root clock enable and disable.
For this case, install new driver without uninstall old driver. The sequence like below:
1. On the power-off path, the old driver will power gate dsc and disable_dsc() (root clock disable) due to debug.disable_dsc_power_gate = false.
2. On the power-on path, the new driver will force power on dsc but skip enable_dsc() (root clock enable) due to debug.disable_dsc_power_gate = true.
Finally, when mode needs DSC but the root clock is disabled, underflow happened.
[How]
- Moving enable_dsc() before the disable_dsc_power_gate check so the root clock is always enabled on the power-on path.
- Replacing the early return with a goto that skips only the power gate register writes, allowing disable_dsc() to still execute on the power-off path.
--- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +45 -45
@@ -232,60 +232,60 @@ void dcn314_dsc_pg_control(uint32_t pwr_status = power_on ?0 :2 ;uint32_t org_ip_request_cntl =0 ; -if (hws->ctx->dc->debug.disable_dsc_power_gate) -return ; -if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc && hws->ctx->dc->res_pool->dccg->funcs->enable_dsc && power_on) hws->ctx->dc->res_pool->dccg->funcs->enable_dsc ( hws->ctx->dc->res_pool->dccg, dsc_inst); -REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl); -if (org_ip_request_cntl ==0 ) -REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 ); - -switch (dsc_inst) { -case 0 :/* DSC0 */ -REG_UPDATE (DOMAIN16_PG_CONFIG , -DOMAIN_POWER_GATE , power_gate); - -REG_WAIT (DOMAIN16_PG_STATUS , -DOMAIN_PGFSM_PWR_STATUS , pwr_status, -1 ,1000 ); -break ; -case 1 :/* DSC1 */ -REG_UPDATE (DOMAIN17_PG_CONFIG , -DOMAIN_POWER_GATE , power_gate); - -REG_WAIT (DOMAIN17_PG_STATUS , -DOMAIN_PGFSM_PWR_STATUS , pwr_status, -1 ,1000 ); -break ; -case 2 :/* DSC2 */ -REG_UPDATE (DOMAIN18_PG_CONFIG , -DOMAIN_POWER_GATE , power_gate); - -REG_WAIT (DOMAIN18_PG_STATUS , -DOMAIN_PGFSM_PWR_STATUS , pwr_status, -1 ,1000 ); -break ; -case 3 :/* DSC3 */ -REG_UPDATE (DOMAIN19_PG_CONFIG , -DOMAIN_POWER_GATE , power_gate); +if (!hws->ctx->dc->debug.disable_dsc_power_gate) { + +REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl); +if (org_ip_request_cntl ==0 ) +REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 ); + +switch (dsc_inst) { +case 0 :/* DSC0 */ +REG_UPDATE (DOMAIN16_PG_CONFIG , +DOMAIN_POWER_GATE , power_gate); + +REG_WAIT (DOMAIN16_PG_STATUS , +DOMAIN_PGFSM_PWR_STATUS , pwr_status, +1 ,1000 ); +break ; +case 1 :/* DSC1 */ +REG_UPDATE (DOMAIN17_PG_CONFIG , +DOMAIN_POWER_GATE , power_gate); + +REG_WAIT (DOMAIN17_PG_STATUS , +DOMAIN_PGFSM_PWR_STATUS , pwr_status, +1 ,1000 ); +break ; +case 2 :/* DSC2 */ +REG_UPDATE (DOMAIN18_PG_CONFIG , +DOMAIN_POWER_GATE , power_gate); + +REG_WAIT (DOMAIN18_PG_STATUS , +DOMAIN_PGFSM_PWR_STATUS , pwr_status, +1 ,1000 ); +break ; +case 3 :/* DSC3 */ +REG_UPDATE (DOMAIN19_PG_CONFIG , +DOMAIN_POWER_GATE , power_gate); + +REG_WAIT (DOMAIN19_PG_STATUS , +DOMAIN_PGFSM_PWR_STATUS , pwr_status, +1 ,1000 ); +break ; +default : +BREAK_TO_DEBUGGER (); +break ; + } -REG_WAIT (DOMAIN19_PG_STATUS , -DOMAIN_PGFSM_PWR_STATUS , pwr_status, -1 ,1000 ); -break ; -default : -BREAK_TO_DEBUGGER (); -break ; +if (org_ip_request_cntl ==0 ) +REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); } -if (org_ip_request_cntl ==0 ) -REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,0 ); -if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc) {if (hws->ctx->dc->res_pool->dccg->funcs->disable_dsc && !power_on) hws->ctx->dc->res_pool->dccg->funcs->disable_dsc(
Signature · 1 line
2.43.0
PATCH 13/14 drm/amd/display: [FW Promotion] Release 0.1.57.0
In reply to Tom ChungFrom: Taimur Hassan <[email protected]>
[Why & How]
Modify some IPS related commands.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +16 -10
@@ -1546,8 +1546,9 @@ enum dmub_gpint_command {* DESC: Gets IPS residency in microseconds * ARGS: 0 - Return IPS1 residency * 1 - Return IPS2 residency -* 2 - Return IPS1_RCG residency +* 2 - Return IPS0_RCG residency * 3 - Return IPS1_ONO2_ON residency +* 4 - Return IPS1_Z8_RETENTION residency * RETURN: Total residency in microseconds - lower 32 bits */ DMUB_GPINT__GET_IPS_RESIDENCY_DURATION_US_LO = 124,
@@ -1567,17 +1568,18 @@ enum dmub_gpint_command {* DESC: Gets IPS residency * ARGS: 0 - Return IPS1 residency * 1 - Return IPS2 residency -* 2 - Return IPS1_RCG residency +* 2 - Return IPS0_RCG residency * 3 - Return IPS1_ONO2_ON residency +* 4 - Return IPS1_Z8_RETENTION residency * RETURN: Total residency in milli-percent. */ DMUB_GPINT__GET_IPS_RESIDENCY_PERCENT =127 ,/** -* DESC: Gets IPS1_RCG histogram counts +* DESC: Gets IPS0_RCG histogram counts * ARGS: Bucket index * RETURN: Total count for the bucket */ - DMUB_GPINT__GET_IPS1_RCG_HISTOGRAM_COUNTER = 128, + DMUB_GPINT__GET_IPS0_RCG_HISTOGRAM_COUNTER = 128,/** * DESC: Gets IPS1_ONO2_ON histogram counts * ARGS: Bucket index
@@ -1588,8 +1590,9 @@ enum dmub_gpint_command {* DESC: Gets IPS entry counter during residency measurement * ARGS: 0 - Return IPS1 entry counts * 1 - Return IPS2 entry counts -* 2 - Return IPS1_RCG entry counts -* 3 - Return IPS2_ONO2_ON entry counts +* 2 - Return IPS0_RCG entry counts +* 3 - Return IPS1_ONO2_ON entry counts +* 4 - Return IPS1_Z8_RETENTION entry counts * RETURN: Entry counter for selected IPS mode */ DMUB_GPINT__GET_IPS_RESIDENCY_ENTRY_COUNTER = 130,
@@ -1597,8 +1600,9 @@ enum dmub_gpint_command {* DESC: Gets IPS inactive residency in microseconds * ARGS: 0 - Return IPS1_MAX residency * 1 - Return IPS2 residency -* 2 - Return IPS1_RCG residency +* 2 - Return IPS0_RCG residency * 3 - Return IPS1_ONO2_ON residency +* 4 - Return IPS1_Z8_RETENTION residency * RETURN: Total inactive residency in microseconds - lower 32 bits */ DMUB_GPINT__GET_IPS_INACTIVE_RESIDENCY_DURATION_US_LO = 131,
@@ -1606,8 +1610,9 @@ enum dmub_gpint_command {* DESC: Gets IPS inactive residency in microseconds * ARGS: 0 - Return IPS1_MAX residency * 1 - Return IPS2 residency -* 2 - Return IPS1_RCG residency +* 2 - Return IPS0_RCG residency * 3 - Return IPS1_ONO2_ON residency +* 4 - Return IPS1_Z8_RETENTION residency * RETURN: Total inactive residency in microseconds - upper 32 bits */ DMUB_GPINT__GET_IPS_INACTIVE_RESIDENCY_DURATION_US_HI = 132,
@@ -1615,8 +1620,9 @@ enum dmub_gpint_command {* DESC: Gets IPS residency in microseconds * ARGS: 0 - Return IPS1 residency * 1 - Return IPS2 residency -* 2 - Return IPS1_RCG residency +* 2 - Return IPS0_RCG residency * 3 - Return IPS1_ONO2_ON residency +* 4 - Return IPS1_Z8_RETENTION residency * RETURN: Total residency in microseconds - upper 32 bits */ DMUB_GPINT__GET_IPS_RESIDENCY_DURATION_US_HI = 133,
@@ -6513,7 +6519,7 @@ struct dmub_rb_cmd_assr_enable {enum ips_residency_mode {IPS_RESIDENCY__IPS1_MAX ,IPS_RESIDENCY__IPS2 , -IPS_RESIDENCY__IPS1_RCG , +IPS_RESIDENCY__IPS1_RCG ,// refers to IPS0 + RCG IPS_RESIDENCY__IPS1_ONO2_ON ,IPS_RESIDENCY__IPS1_Z8_RETENTION ,IPS_RESIDENCY__PG_ONO_LAST_SEEN_IN_IPS ,
Signature · 1 line
2.43.0
PATCH 14/14 drm/amd/display: Promote DC to 3.2.380
In reply to Tom ChungFrom: Taimur Hassan <[email protected]>
This version brings along following update:
-Fix root clock disabled when DSC power gate disabled for DCN314 -Enable RCG on DCN42
-Enable/Disable some power gating
-Remove Mall, SubVP and MCLK from DCN42
-Unify fast update classification paths
-Fix narrowing boundaries in dml
-Update MCIF_ADDR macro to address IGT DWB regression -Fix dual cursor shows on extend desktop
-Fix hubp tmz field define mismatch
--- 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.379" +#define DC_VER "3.2.380"/** * 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 -> 48b6b371b42d57513a5aaeef0c5a9a65364041cf -> drm/amd/display: Undo accidental fix revert in amdgpu_dm_ism.c) 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, April 21, 2026 11:53 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]>; Lin, Ping Lei <[email protected]>
Subject: [PATCH 00/14] DC Patches Apr 27 2026
This DC patchset brings improvements in multiple areas. In summary, we have:
-Fix root clock disabled when DSC power gate disabled for DCN314 -Enable RCG on DCN42 -Enable/Disable some power gating -Remove Mall, SubVP and MCLK from DCN42 -Unify fast update classification paths -Fix narrowing boundaries in dml -Update MCIF_ADDR macro to address IGT DWB regression -Fix dual cursor shows on extend desktop -Fix hubp tmz field define mismatch
Charlene Liu (2):
drm/amd/display: fix hubp tmz field define mismatch drm/amd/display: fix dual cursor shows on extend desktop
Gaghik Khachatrian (3):
drm/amd/display: Update MCIF_ADDR macro to address IGT DWB regression drm/amd/display: Fix implicit conversion warning drm/amd/display: Fix narrowing boundaries in dml
Ivan Lipski (2):
drm/amd/display: Remove Mall, SubVP and MCLK from DCN42 drm/amd/display: Enable RCG on DCN42
Jing Zhou (1):
drm/amd/display: fix root clock disabled when DSC power gate disabled
for DCN314
Leo Chen (3):
drm/amd/display: Enable driver power gating drm/amd/display: Enable HUBP/OPTC/DPP power gating drm/amd/display: Disable hpo power gate
Rafal Ostrowski (1):
drm/amd/display: Unify fast update classification paths
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.57.0 drm/amd/display: Promote DC to 3.2.380
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 252 +-- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 14 +- drivers/gpu/drm/amd/display/dc/dc.h | 38 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 + .../drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 20 +- .../amd/display/dc/dml/calcs/dcn_calc_auto.c | 1854 ++++++++--------- .../amd/display/dc/dml/calcs/dcn_calc_math.c | 6 +- .../drm/amd/display/dc/dml/calcs/dcn_calcs.c | 280 +-- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 112 +- .../dc/dml/dcn20/display_mode_vba_20.c | 292 ++- .../dc/dml/dcn20/display_mode_vba_20v2.c | 290 ++- .../dc/dml/dcn20/display_rq_dlg_calc_20.c | 164 +- .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c | 164 +- .../dc/dml/dcn21/display_mode_vba_21.c | 296 ++- .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 80 +- .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 74 +- .../dc/dml/dcn30/display_mode_vba_30.c | 328 +-- .../dc/dml/dcn30/display_rq_dlg_calc_30.c | 82 +- .../amd/display/dc/dml/dcn301/dcn301_fpu.c | 20 +- .../amd/display/dc/dml/dcn302/dcn302_fpu.c | 16 +- .../amd/display/dc/dml/dcn303/dcn303_fpu.c | 16 +- .../drm/amd/display/dc/dml/dcn31/dcn31_fpu.c | 26 +- .../dc/dml/dcn31/display_mode_vba_31.c | 354 ++-- .../dc/dml/dcn31/display_rq_dlg_calc_31.c | 76 +- .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 8 +- .../dc/dml/dcn314/display_mode_vba_314.c | 358 ++-- .../dc/dml/dcn314/display_rq_dlg_calc_314.c | 80 +- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 291 +-- .../dc/dml/dcn32/display_mode_vba_32.c | 174 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 324 +-- .../dc/dml/dcn32/display_rq_dlg_calc_32.c | 138 +- .../amd/display/dc/dml/dcn321/dcn321_fpu.c | 49 +- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 22 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 22 +- .../drm/amd/display/dc/dml/display_mode_vba.c | 4 +- .../display/dc/dml/dml1_display_rq_dlg_calc.c | 32 +- .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 82 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 9 + .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 90 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- .../dc/resource/dcn42/dcn42_resource.c | 53 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 +- 44 files changed, 3092 insertions(+), 3540 deletions(-)
--
2.43.0