DC Patches May 11 2026
cover DC Patches May 11 2026
Start from:6ee9f5160ad6e0bf672329f7680398e718fc56f5
SWDEV-114487 - modules: [BACKPORT] drm/amd/display: Fix divide by zero in calc_psr_num_static_frames
Stopped at:5e7f507891f430f50c71004b73c5ef4c13224f1a
SWDEV-2 - dc: Promote DC to 3.2.382
This version brings along following update:
-Revert "Enable HUBP/OPTC/DPP power gating" -Revert "Unify fast update classification paths" -enable ODM 2:1 on single eDP based on pixel clock -Enable IPS on DCN42 -Add additional IPS entry/exit for PSR/Replay -Separate ABM functions into dedicated power_abm.c file -Fix always-true lower-bound assert -Refactor dc_link_aux_transfer_raw -only call pmfw if smu present flags true -Fix multiple compiler warnings -Fix CRC open failure during active rendering -Fix white screen on boot with OLED panel -Fix refresh rate round up case
Charlene Liu (2):
drm/amd/display: only call pmfw if smu present flags true drm/amd/display: enable ODM 2:1 on single eDP based on pixel clock
ChunTao Tso (1):
drm/amd/display: Fix refresh rate round up case
Clay King (1):
drm/amd/display: Fix warnings
Gaghik Khachatrian (5):
drm/amd/display: Fix signed/unsigned comparison mismatches drm/amd/display: Fix compiler warnings in dml2 drm/amd/display: Fix multiple compiler warnings drm/amd/display: always-true lower-bound assert drm/amd/display: Fix enum decl warnings
Ivan Lipski (2):
drm/amd/display: Add additional IPS entry/exit for PSR/Replay drm/amd/display: Enable IPS on DCN42
Leo Chen (1):
drm/amd/display: Revert "Enable HUBP/OPTC/DPP power gating"
Lohita Mudimela (1):
drm/amd/display: Separate ABM functions into dedicated power_abm.c
file
Matthew Stewart (1):
drm/amd/display: Refactor dc_link_aux_transfer_raw
Mikhail Gavrilov (1):
drm/amd/display: Wrap DCN32 phantom-plane allocation in
DC_RUN_WITH_PREEMPTION_ENABLED
Ovidiu Bunea (1):
drm/amd/display: Revert "Unify fast update classification paths"
Ray Wu (1):
drm/amd/display: Fix white screen on boot with OLED panel
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.59.0 drm/amd/display: Promote DC to 3.2.382
Tom Chung (1):
drm/amd/display: Fix CRC open failure during active rendering
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 7 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 77 + .../display/dc/clk_mgr/dce100/dce_clk_mgr.c | 6 +- .../display/dc/clk_mgr/dce100/dce_clk_mgr.h | 2 +- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 8 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c | 4 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.h | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 11 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 260 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 12 - .../drm/amd/display/dc/core/dc_link_exports.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 18 +- .../gpu/drm/amd/display/dc/core/dc_state.c | 6 +- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- .../drm/amd/display/dc/core/dc_vm_helper.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 105 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 3 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 7 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 20 +- drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 4 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 2 +- .../display/dc/dio/dcn10/dcn10_link_encoder.c | 2 +- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 1 + .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 6 +- .../dc/dml/dcn21/display_mode_vba_21.c | 36 +- .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 4 +- .../dc/dml/dcn30/display_mode_vba_30.c | 342 +-- .../amd/display/dc/dml/dcn301/dcn301_fpu.c | 2 +- .../dc/dml/dcn31/display_mode_vba_31.c | 408 ++-- .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 10 +- .../dc/dml/dcn314/display_mode_vba_314.c | 400 +-- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 15 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 8 +- .../dc/dml/dcn32/display_mode_vba_util_32.h | 8 +- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 10 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 10 +- .../drm/amd/display/dc/dml/display_mode_vba.h | 12 +- .../amd/display/dc/dml2_0/display_mode_core.c | 6 +- .../drm/amd/display/dc/dml2_0/dml2_utils.c | 2 +- .../amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 2 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 2 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 4 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 8 +- .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 8 +- .../amd/display/dc/dsc/dcn401/dcn401_dsc.c | 10 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 4 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 2 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 10 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 5 +- drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 4 +- .../amd/display/dc/inc/hw/timing_generator.h | 8 +- .../gpu/drm/amd/display/dc/inc/link_service.h | 2 +- .../gpu/drm/amd/display/dc/inc/reg_helper.h | 72 +- .../drm/amd/display/dc/link/link_detection.c | 2 +- .../drm/amd/display/dc/link/link_detection.h | 2 +- .../amd/display/dc/link/protocols/link_ddc.c | 7 +- .../link/protocols/link_edp_panel_control.c | 8 +- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 2 +- .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c | 6 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c | 2 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h | 2 +- .../amd/display/dc/optc/dcn32/dcn32_optc.c | 2 +- .../dc/resource/dce100/dce100_resource.c | 10 +- .../dc/resource/dce110/dce110_resource.c | 8 +- .../dc/resource/dce112/dce112_resource.c | 4 +- .../dc/resource/dce120/dce120_resource.c | 6 +- .../dc/resource/dce80/dce80_resource.c | 8 +- .../dc/resource/dcn10/dcn10_resource.c | 15 +- .../dc/resource/dcn20/dcn20_resource.c | 60 +- .../dc/resource/dcn21/dcn21_resource.c | 26 +- .../dc/resource/dcn30/dcn30_resource.c | 63 +- .../dc/resource/dcn301/dcn301_resource.c | 31 +- .../dc/resource/dcn302/dcn302_resource.c | 22 +- .../dc/resource/dcn303/dcn303_resource.c | 22 +- .../dc/resource/dcn31/dcn31_resource.c | 30 +- .../dc/resource/dcn314/dcn314_resource.c | 26 +- .../dc/resource/dcn315/dcn315_resource.c | 37 +- .../dc/resource/dcn316/dcn316_resource.c | 29 +- .../dc/resource/dcn32/dcn32_resource.c | 33 +- .../resource/dcn32/dcn32_resource_helpers.c | 6 +- .../dc/resource/dcn321/dcn321_resource.c | 22 +- .../dc/resource/dcn35/dcn35_resource.c | 26 +- .../dc/resource/dcn351/dcn351_resource.c | 26 +- .../dc/resource/dcn36/dcn36_resource.c | 26 +- .../dc/resource/dcn401/dcn401_resource.c | 32 +- .../dc/resource/dcn42/dcn42_resource.c | 50 +- .../dc/resource/dcn42/dcn42_resource_fpu.c | 22 + .../dc/resource/dcn42/dcn42_resource_fpu.h | 2 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 32 +- .../gpu/drm/amd/display/include/fixed31_32.h | 6 +- .../amd/display/modules/color/color_gamma.c | 28 +- .../drm/amd/display/modules/hdcp/hdcp_log.c | 2 +- .../amd/display/modules/inc/mod_color_types.h | 47 + .../amd/display/modules/inc/mod_info_packet.h | 9 +- .../modules/inc/mod_info_packet_types.h | 37 + .../drm/amd/display/modules/inc/mod_power.h | 25 + .../drm/amd/display/modules/power/Makefile | 2 +- .../gpu/drm/amd/display/modules/power/power.c | 1323 +--------- .../drm/amd/display/modules/power/power_abm.c | 2160 +++++++++++++++++ .../amd/display/modules/power/power_helpers.c | 823 +------ .../amd/display/modules/power/power_helpers.h | 1 + 116 files changed, 3922 insertions(+), 3295 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_color_types.h create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_info_packet_types.h create mode 100644 drivers/gpu/drm/amd/display/modules/power/power_abm.c
Signature · 1 line
2.43.0
PATCH 1/20 drm/amd/display: Fix refresh rate round up case
From: ChunTao Tso <[email protected]>
[Why & How]
fix refresh rate round up case
--- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +4 -4
@@ -993,8 +993,8 @@ bool psr_su_set_dsc_slice_height(struct dc *dc, struct dc_link *link,void set_replay_frame_skip_number (struct dc_link *link,enum replay_coasting_vtotal_type type, -uint32_t coasting_vtotal_refresh_rate_mhz, -uint32_t flicker_free_refresh_rate_mhz, +uint32_t coasting_vtotal_refresh_rate_uhz, +uint32_t flicker_free_refresh_rate_uhz,bool is_defer) {uint32_t *frame_skip_number_array =NULL ;
@@ -1006,7 +1006,7 @@ void set_replay_frame_skip_number(struct dc_link *link,if (false == link->replay_settings.config.frame_skip_supported)return ; -if (flicker_free_refresh_rate_mhz ==0 || coasting_vtotal_refresh_rate_mhz ==0 ) +if (flicker_free_refresh_rate_uhz ==0 || coasting_vtotal_refresh_rate_uhz ==0 )return ;if (is_defer)
@@ -1017,7 +1017,7 @@ void set_replay_frame_skip_number(struct dc_link *link,if (frame_skip_number_array ==NULL )return ; - frame_skip_number = coasting_vtotal_refresh_rate_mhz / flicker_free_refresh_rate_mhz; + frame_skip_number = (coasting_vtotal_refresh_rate_uhz +500000 ) / flicker_free_refresh_rate_uhz;if (frame_skip_number >=1 ) frame_skip_number_array[type] = frame_skip_number -1 ;
Signature · 1 line
2.43.0
PATCH 2/20 drm/amd/display: Fix white screen on boot with OLED panel
In reply to James LinFrom: Ray Wu <[email protected]>
[Why]
During mode change, replay_event_general_ui may remain set on the old stream while replay_event_hw_programming is set. This can re-enable Replay too early before hardware programming is complete.
[How]
Clear replay_event_general_ui in the mode-change path when setting replay_event_hw_programming to keep Replay blocked until programming finishes, avoiding white screen on OLED panels after boot.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +14 -2
@@ -10086,8 +10086,6 @@ static void amdgpu_dm_enable_self_refresh(struct amdgpu_display_manager *dm,amdgpu_dm_psr_set_event (dm, acrtc_state->stream, false, psr_event_hw_programming, false); -amdgpu_dm_replay_set_event (dm, acrtc_state->stream, true, - replay_event_general_ui, true);amdgpu_dm_replay_set_event (dm, acrtc_state->stream, false, replay_event_hw_programming, false); }
@@ -10616,6 +10614,8 @@ static void amdgpu_dm_mod_power_update_streams(struct drm_atomic_state *state, psr_event_hw_programming, true);amdgpu_dm_replay_set_event (dm, dm_old_crtc_state->stream, true, replay_event_hw_programming, true); +amdgpu_dm_replay_set_event (dm, dm_old_crtc_state->stream, false, + replay_event_general_ui, false); } }
@@ -10669,6 +10669,18 @@ static void amdgpu_dm_mod_power_setup_streams(struct drm_atomic_state *state,mod_power_notify_mode_change (dm->power_module, dm_new_crtc_state->stream, false); + +/* +* Block PSR / Replay on the new stream until display settles post-modeset. +* These events will be cleared by amdgpu_dm_enable_self_refresh() once +* allow_sr_entry becomes true. +*/ +amdgpu_dm_psr_set_event (dm, dm_new_crtc_state->stream, true, + psr_event_hw_programming, true); + +amdgpu_dm_replay_set_event (dm, dm_new_crtc_state->stream, true, + replay_event_hw_programming | replay_event_general_ui, + true); } }
Signature · 1 line
2.43.0
PATCH 3/20 drm/amd/display: Fix CRC open failure during active rendering
In reply to James LinFrom: Tom Chung <[email protected]>
[Why]
Opening the CRC data file during active rendering can fail with -EINVAL. The wait for commit->hw_done returns remaining jiffies on success, but the CRC path was treating that as an error.
[How]
Handle wait_for_completion_interruptible_timeout() correctly:
positive return as success, 0 as timeout, and negative as error.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +6 -1
@@ -613,8 +613,13 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)*/ ret =wait_for_completion_interruptible_timeout ( &commit->hw_done,10 *HZ ); -if (ret) +if (ret <0 ) + goto cleanup; + +if (ret ==0 ) { + ret = -ETIMEDOUT ; goto cleanup; + } } enable =amdgpu_dm_is_valid_crc_source (source);
Signature · 1 line
2.43.0
PATCH 4/20 drm/amd/display: Fix signed/unsigned comparison mismatches
In reply to James LinFrom: Gaghik Khachatrian <[email protected]>
[Why]
Address signed/unsigned comparison warnings in DC paths
to keep builds warning-clean and improve type safety at comparison boundaries. Most warnings came from signed loop/index temporaries compared against unsigned counters (for example pipe_count, num_states, and resource-cap counters), plus a small number of mixed signed/unsigned checks in writeback and clock-related assertions.
[How]
Aligned iterator and temporary variable types with the semantic type of the compared bounds. Used unsigned indices for loops bounded by unsigned counters, and retained signed types where values are semantically signed (for example arithmetic with sentinel or signed intermediate values). Where mixed signed/unsigned comparisons are intentional, applied explicit boundary casts or split assertions (for example non-negative signed-cap checks before unsigned comparisons) instead of broad type changes.
No functional behavior changes are intended; this is a warning-resolution and type-alignment cleanup.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 2 +- .../amd/display/dc/dml/dcn301/dcn301_fpu.c | 2 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 8 ++- .../dc/resource/dce100/dce100_resource.c | 10 +-- .../dc/resource/dce110/dce110_resource.c | 8 +-- .../dc/resource/dce112/dce112_resource.c | 4 +- .../dc/resource/dce120/dce120_resource.c | 6 +- .../dc/resource/dce80/dce80_resource.c | 8 +-- .../dc/resource/dcn10/dcn10_resource.c | 15 ++--- .../dc/resource/dcn20/dcn20_resource.c | 60 +++++++++--------- .../dc/resource/dcn21/dcn21_resource.c | 26 ++++---- .../dc/resource/dcn30/dcn30_resource.c | 63 ++++++++++--------- .../dc/resource/dcn301/dcn301_resource.c | 31 ++++----- .../dc/resource/dcn302/dcn302_resource.c | 22 +++---- .../dc/resource/dcn303/dcn303_resource.c | 22 +++---- .../dc/resource/dcn31/dcn31_resource.c | 30 ++++----- .../dc/resource/dcn314/dcn314_resource.c | 26 ++++---- .../dc/resource/dcn315/dcn315_resource.c | 37 +++++------ .../dc/resource/dcn316/dcn316_resource.c | 29 ++++----- .../dc/resource/dcn32/dcn32_resource.c | 25 ++++---- .../resource/dcn32/dcn32_resource_helpers.c | 6 +- .../dc/resource/dcn321/dcn321_resource.c | 22 +++---- .../dc/resource/dcn35/dcn35_resource.c | 26 ++++---- .../dc/resource/dcn351/dcn351_resource.c | 26 ++++---- .../dc/resource/dcn36/dcn36_resource.c | 26 ++++---- .../dc/resource/dcn401/dcn401_resource.c | 32 +++++----- .../dc/resource/dcn42/dcn42_resource.c | 40 ++++++------ 28 files changed, 317 insertions(+), 301 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -3
@@ -3845,7 +3845,7 @@ static void program_cursor_attributes_sequence(struct pipe_ctx *pipe_to_program =NULL ;bool enable_cursor_offload =dc_dmub_srv_is_cursor_offload_enabled (dc); -for (k =0 ; k < dc->res_pool->pipe_count; k++) { +for (k =0 ; k < (int )dc->res_pool->pipe_count; k++) {struct pipe_ctx *tmp_pipe = &context->res_ctx.pipe_ctx[k];if (tmp_pipe->stream != stream)
@@ -3893,7 +3893,7 @@ static void program_cursor_position_sequence(struct pipe_ctx *pipe_to_program =NULL ;bool enable_cursor_offload =dc_dmub_srv_is_cursor_offload_enabled (dc); -for (k =0 ; k < dc->res_pool->pipe_count; k++) { +for (k =0 ; k < (int )dc->res_pool->pipe_count; k++) {struct pipe_ctx *tmp_pipe = &context->res_ctx.pipe_ctx[k]; if (tmp_pipe->stream != stream ||
@@ -4083,7 +4083,7 @@ static void commit_planes_do_stream_update_sequence(struct dc *dc, *num_steps =0 ;// Initialize to 0 // Stream updates -for (j =0 ; j < dc->res_pool->pipe_count; j++) { +for (j =0 ; j < (int )dc->res_pool->pipe_count; j++) {struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];if (resource_is_pipe_type (pipe_ctx,OTG_MASTER ) && pipe_ctx->stream == stream) {
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +1 -1
@@ -2217,7 +2217,7 @@ static void calculate_wm_set_for_vlevel(int vlevel, {double dram_clock_change_latency_cached = dml->soc.dram_clock_change_latency_us; -ASSERT (vlevel < dml->soc.num_states); +ASSERT (vlevel < (int )dml->soc.num_states);/* only pipe 0 is read for voltage and dcf/soc clocks */ pipes[0 ].clks_cfg.voltage = vlevel; pipes[0 ].clks_cfg.dcfclk_mhz = dml->soc.clock_limits[vlevel].dcfclk_mhz;
drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c +1 -1
@@ -298,7 +298,7 @@ static void calculate_wm_set_for_vlevel(int vlevel, {double dram_clock_change_latency_cached = dml->soc.dram_clock_change_latency_us; -ASSERT (vlevel < dml->soc.num_states); +ASSERT (vlevel < (int )dml->soc.num_states);/* only pipe 0 is read for voltage and dcf/soc clocks */ pipes[0 ].clks_cfg.voltage = vlevel; pipes[0 ].clks_cfg.dcfclk_mhz = dml->soc.clock_limits[vlevel].dcfclk_mhz;
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +5 -3
@@ -262,7 +262,7 @@ static bool dcn30_set_mpc_shaper_3dlut(struct pipe_ctx *pipe_ctx,struct dc *dc = pipe_ctx->stream->ctx->dc;struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;bool result = false; -int acquired_rmu =0 ; +uint32_t acquired_rmu =0 ;int mpcc_id_projected =0 ;const struct pwl_params *shaper_lut =NULL ;
@@ -439,7 +439,7 @@ static void dcn30_set_writeback(ASSERT (wb_info->dwb_pipe_inst <MAX_DWB_PIPES );ASSERT (wb_info->wb_enabled);ASSERT (wb_info->mpcc_inst >=0 ); -ASSERT (wb_info->mpcc_inst < dc->res_pool->mpcc_count); +ASSERT (wb_info->mpcc_inst < (int )dc->res_pool->mpcc_count); mcif_wb = dc->res_pool->mcif_wb[wb_info->dwb_pipe_inst]; mcif_buf_params = &wb_info->mcif_buf_params;
@@ -593,7 +593,9 @@ void dcn30_program_all_writeback_pipes_in_tree( }ASSERT (stream_status); -ASSERT (stream->num_wb_info <= dc->res_pool->res_cap->num_dwb); +// Assert non-negative signed capacity first. +ASSERT (dc->res_pool->res_cap->num_dwb >=0 ); +ASSERT (stream->num_wb_info <= (unsigned int )dc->res_pool->res_cap->num_dwb);/* For each writeback pipe */ for (i_wb =0 ; i_wb < stream->num_wb_info; i_wb++) {
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +5 -5
@@ -805,7 +805,7 @@ static void dce100_resource_destruct(struct dce110_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -870,7 +870,7 @@ enum dc_status dce100_validate_bandwidth( enum dc_validate_mode validate_mode) { (void )validate_mode; -int i; +unsigned int i;bool at_least_one_pipe = false;struct dc_stream_state *stream =NULL ;const uint32_t max_pix_clk_khz =max (dc->clk_mgr->clks.max_supported_dispclk_khz,400000 );
@@ -979,7 +979,7 @@ struct stream_encoder *dce100_find_first_free_match_stream_enc_for_link(const struct resource_pool *pool, struct dc_stream_state *stream) { - int i; + unsigned int i;int j =-1 ;struct dc_link *link = stream->link;enum engine_id preferred_engine = link->link_enc->preferred_engine;
@@ -996,7 +996,7 @@ struct stream_encoder *dce100_find_first_free_match_stream_enc_for_link(/* Store first available for MST second display * in daisy chain use case */ - j = i; + j = (int )i;if (pool->stream_enc[i]->id == preferred_engine)return pool->stream_enc[i]; }
@@ -1176,7 +1176,7 @@ static bool dce100_resource_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce100_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +4 -4
@@ -840,7 +840,7 @@ static void dce110_resource_destruct(struct dce110_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1214,7 +1214,7 @@ struct stream_encoder *dce110_find_first_free_match_stream_enc_for_link(const struct resource_pool *pool, struct dc_stream_state *stream) { - int i; + unsigned int i;int j =-1 ;struct dc_link *link = stream->link;
@@ -1224,7 +1224,7 @@ struct stream_encoder *dce110_find_first_free_match_stream_enc_for_link(/* Store first available for MST second display * in daisy chain use case */ - j = i; + j = (int )i;if (pool->stream_enc[i]->id == link->link_enc->preferred_engine)return pool->stream_enc[i];
@@ -1497,7 +1497,7 @@ static bool dce110_resource_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce110_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +2 -2
@@ -805,7 +805,7 @@ static void dce112_resource_destruct(struct dce110_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1383,7 +1383,7 @@ static bool dce112_resource_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce112_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +3 -3
@@ -627,7 +627,7 @@ static void dce120_resource_destruct(struct dce110_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -929,7 +929,7 @@ static void bw_calcs_data_update_from_pplib(struct dc *dc)struct dm_pp_clock_levels_with_latency eng_clks = {0 };struct dm_pp_clock_levels_with_latency mem_clks = {0 };struct dm_pp_wm_sets_with_clock_ranges clk_ranges = {0 }; -int i; +unsigned int i;unsigned int clk;unsigned int latency;/*original logic in dal3*/
@@ -1229,7 +1229,7 @@ static bool dce120_resource_construct( j++; } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce120_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +4 -4
@@ -855,7 +855,7 @@ static void dce80_resource_destruct(struct dce110_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1059,7 +1059,7 @@ static bool dce80_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce80_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1259,7 +1259,7 @@ static bool dce81_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce80_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1457,7 +1457,7 @@ static bool dce83_construct( } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dce80_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +8 -7
@@ -978,7 +978,7 @@ static void dcn10_resource_destruct(struct dcn10_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);kfree (pool->base.hw_i2cs[i]);
@@ -1183,7 +1183,8 @@ static enum dc_status dcn10_validate_plane(const struct dc_plane_state *plane_st {if (plane_state->format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN && caps->max_video_width !=0 - && plane_state->src_rect.width > caps->max_video_width) + && plane_state->src_rect.width >0 + && (unsigned int )plane_state->src_rect.width > caps->max_video_width)return DC_FAIL_SURFACE_VALIDATE ;return DC_OK ;
@@ -1268,7 +1269,7 @@ struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(const struct resource_pool *pool, struct dc_stream_state *stream) { - int i; + unsigned int i;int j =-1 ;struct dc_link *link = stream->link;
@@ -1280,7 +1281,7 @@ struct stream_encoder *dcn10_find_first_free_match_stream_enc_for_link(*/ if (pool->stream_enc[i]->id !=ENGINE_ID_VIRTUAL ) - j = i; + j = (int )i;if (link->ep_type ==DISPLAY_ENDPOINT_PHY && pool->stream_enc[i]->id == link->link_enc->preferred_engine)
@@ -1342,7 +1343,7 @@ static uint32_t read_pipe_fuses(struct dc_context *ctx)static bool verify_clock_values (struct dm_pp_clock_levels_with_voltage *clks) { -int i; +unsigned int i;if (clks->num_levels ==0 )return false;
@@ -1360,7 +1361,7 @@ static bool dcn10_resource_construct(struct dc *dc, struct dcn10_resource_pool *pool) { - int i; + unsigned int i;int j;struct dc_context *ctx = dc->ctx;uint32_t pipe_fuses =read_pipe_fuses (ctx);
@@ -1655,7 +1656,7 @@ static bool dcn10_resource_construct( j++; } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dcn10_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +31 -29
194 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +14 -12
@@ -684,7 +684,7 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -719,7 +719,7 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool)dal_irq_service_destroy (&pool->base.irqs); } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -732,19 +732,19 @@ static void dcn21_resource_destruct(struct dcn21_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN20_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -804,7 +804,8 @@ bool dcn21_fast_validate_bw(struct dc *dc,bool out = false;int split[MAX_PIPES ] = {0 };bool merge[MAX_PIPES ] = { false }; -int pipe_cnt, i, pipe_idx, vlevel; +int pipe_cnt, pipe_idx, vlevel; +unsigned int i;ASSERT (pipes);if (!pipes)
@@ -829,7 +830,7 @@ bool dcn21_fast_validate_bw(struct dc *dc, dm_allow_self_refresh_and_mclk_switch; vlevel =dml_get_voltage_level (&context->bw_ctx.dml, pipes, pipe_cnt); -if (vlevel > context->bw_ctx.dml.soc.num_states) { +if ((unsigned int )vlevel > context->bw_ctx.dml.soc.num_states) {if (allow_self_refresh_only) {/*
@@ -842,7 +843,7 @@ bool dcn21_fast_validate_bw(struct dc *dc, context->bw_ctx.dml.soc.allow_dram_self_refresh_or_dram_clock_change_in_vblank = dm_allow_self_refresh; vlevel =dml_get_voltage_level (&context->bw_ctx.dml, pipes, pipe_cnt); -if (vlevel > context->bw_ctx.dml.soc.num_states) +if ((unsigned int )vlevel > context->bw_ctx.dml.soc.num_states) goto validate_fail; }else { goto validate_fail;
@@ -1428,7 +1429,8 @@ static bool dcn21_resource_construct(struct dc *dc, struct dcn21_resource_pool *pool) { - int i, j; + unsigned int i; +int j;struct dc_context *ctx = dc->ctx;struct irq_service_init_data init_data;uint32_t pipe_fuses =read_pipe_fuses (ctx);
@@ -1660,7 +1662,7 @@ static bool dcn21_resource_construct( j++; } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dcn21_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1704,11 +1706,11 @@ static bool dcn21_resource_construct( goto create_fail; } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) { pool->base.dscs[i] =dcn21_dsc_create (ctx, i);if (pool->base.dscs[i] ==NULL ) {BREAK_TO_DEBUGGER (); -dm_error ("DC: failed to create display stream compressor %d!\n" , i); +dm_error ("DC: failed to create display stream compressor %u!\n" , i); goto create_fail; } }
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +33 -30
215 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +16 -15
@@ -1084,7 +1084,7 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1120,7 +1120,7 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1133,19 +1133,19 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1168,7 +1168,7 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1184,7 +1184,7 @@ static void dcn301_destruct(struct dcn301_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1212,7 +1212,7 @@ static struct hubp *dcn301_hubp_create(struct dc_context *ctx, uint32_t inst)static bool dcn301_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1237,7 +1237,7 @@ static bool dcn301_dwbc_create(struct dc_context *ctx, struct resource_pool *poostatic bool dcn301_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1448,7 +1448,8 @@ static bool dcn301_resource_construct(struct dc *dc, struct dcn301_resource_pool *pool) { - int i, j; + int j; +unsigned int i;struct dc_context *ctx = dc->ctx;struct irq_service_init_data init_data;uint32_t pipe_fuses =read_pipe_fuses (ctx);
@@ -1680,13 +1681,13 @@ static bool dcn301_resource_construct(/* ABM (or ABMs for NV2x) */ /* TODO: */ -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) { pool->base.multiple_abms[i] =dmub_abm_create (ctx, &abm_regs[i], &abm_shift, &abm_mask);if (pool->base.multiple_abms[i] ==NULL ) { -dm_error ("DC: failed to create abm for pipe %d!\n" , i); +dm_error ("DC: failed to create abm for pipe %u!\n" , i);BREAK_TO_DEBUGGER (); goto create_fail; }
@@ -1700,11 +1701,11 @@ static bool dcn301_resource_construct( goto create_fail; } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) { pool->base.dscs[i] =dcn301_dsc_create (ctx, i);if (pool->base.dscs[i] ==NULL ) {BREAK_TO_DEBUGGER (); -dm_error ("DC: failed to create display stream compressor %d!\n" , i); +dm_error ("DC: failed to create display stream compressor %u!\n" , i); goto create_fail; } }
@@ -1723,7 +1724,7 @@ static bool dcn301_resource_construct( }/* AUX and I2C */ -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dcn301_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {BREAK_TO_DEBUGGER ();
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +11 -11
@@ -738,7 +738,7 @@ static const struct dcn30_dwbc_mask dwbc30_mask = {static bool dcn302_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -773,7 +773,7 @@ static const struct dcn30_mmhubbub_mask mcif_wb30_mask = {static bool dcn302_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1036,7 +1036,7 @@ static void dcn302_resource_destruct(struct resource_pool *pool) } } -for (i =0 ; i < pool->res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_dsc; i++) {if (pool->dscs[i] !=NULL )dcn20_dsc_destroy (&pool->dscs[i]); }
@@ -1071,7 +1071,7 @@ static void dcn302_resource_destruct(struct resource_pool *pool)dal_irq_service_destroy (&pool->irqs); } -for (i =0 ; i < pool->res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_ddc; i++) {if (pool->engines[i] !=NULL )dce110_engine_destroy (&pool->engines[i]);if (pool->hw_i2cs[i] !=NULL ) {
@@ -1084,19 +1084,19 @@ static void dcn302_resource_destruct(struct resource_pool *pool) } } -for (i =0 ; i < pool->res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_opp; i++) {if (pool->opps[i] !=NULL ) pool->opps[i]->funcs->opp_destroy (&pool->opps[i]); } -for (i =0 ; i < pool->res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_timing_generator; i++) {if (pool->timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->timing_generators[i])); pool->timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_dwb; i++) {if (pool->dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->dwbc[i])); pool->dwbc[i] =NULL ;
@@ -1120,7 +1120,7 @@ static void dcn302_resource_destruct(struct resource_pool *pool)if (pool->dp_clock_source !=NULL )dcn20_clock_source_destroy (&pool->dp_clock_source); -for (i =0 ; i < pool->res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_mpc_3dlut; i++) {if (pool->mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->mpc_lut[i]); pool->mpc_lut[i] =NULL ;
@@ -1371,7 +1371,7 @@ static bool dcn302_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->clk_src_count; i++) { +for (i =0 ; i < (int )pool->clk_src_count; i++) {if (pool->clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -1416,7 +1416,7 @@ static bool dcn302_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < (int )pool->pipe_count; i++) { pool->hubps[i] =dcn302_hubp_create (ctx, i);if (pool->hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1526,7 +1526,7 @@ static bool dcn302_resource_construct( dc->caps.max_planes = pool->pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +11 -11
@@ -699,7 +699,7 @@ static const struct dcn30_dwbc_mask dwbc30_mask = {static bool dcn303_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -734,7 +734,7 @@ static const struct dcn30_mmhubbub_mask mcif_wb30_mask = {static bool dcn303_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -980,7 +980,7 @@ static void dcn303_resource_destruct(struct resource_pool *pool) } } -for (i =0 ; i < pool->res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_dsc; i++) {if (pool->dscs[i] !=NULL )dcn20_dsc_destroy (&pool->dscs[i]); }
@@ -1015,7 +1015,7 @@ static void dcn303_resource_destruct(struct resource_pool *pool)dal_irq_service_destroy (&pool->irqs); } -for (i =0 ; i < pool->res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_ddc; i++) {if (pool->engines[i] !=NULL )dce110_engine_destroy (&pool->engines[i]);if (pool->hw_i2cs[i] !=NULL ) {
@@ -1028,19 +1028,19 @@ static void dcn303_resource_destruct(struct resource_pool *pool) } } -for (i =0 ; i < pool->res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_opp; i++) {if (pool->opps[i] !=NULL ) pool->opps[i]->funcs->opp_destroy (&pool->opps[i]); } -for (i =0 ; i < pool->res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_timing_generator; i++) {if (pool->timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->timing_generators[i])); pool->timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_dwb; i++) {if (pool->dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->dwbc[i])); pool->dwbc[i] =NULL ;
@@ -1064,7 +1064,7 @@ static void dcn303_resource_destruct(struct resource_pool *pool)if (pool->dp_clock_source !=NULL )dcn20_clock_source_destroy (&pool->dp_clock_source); -for (i =0 ; i < pool->res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->res_cap->num_mpc_3dlut; i++) {if (pool->mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->mpc_lut[i]); pool->mpc_lut[i] =NULL ;
@@ -1303,7 +1303,7 @@ static bool dcn303_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->clk_src_count; i++) { +for (i =0 ; i < (int )pool->clk_src_count; i++) {if (pool->clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -1348,7 +1348,7 @@ static bool dcn303_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->pipe_count; i++) { +for (i =0 ; i < (int )pool->pipe_count; i++) { pool->hubps[i] =dcn303_hubp_create (ctx, i);if (pool->hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -1458,7 +1458,7 @@ static bool dcn303_resource_construct( dc->caps.max_planes = pool->pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +15 -15
@@ -1148,7 +1148,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1414,7 +1414,7 @@ static void dcn31_resource_destruct(struct dcn31_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1448,7 +1448,7 @@ static void dcn31_resource_destruct(struct dcn31_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1461,19 +1461,19 @@ static void dcn31_resource_destruct(struct dcn31_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1496,7 +1496,7 @@ static void dcn31_resource_destruct(struct dcn31_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1512,7 +1512,7 @@ static void dcn31_resource_destruct(struct dcn31_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1548,7 +1548,7 @@ static struct hubp *dcn31_hubp_create(static bool dcn31_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1573,7 +1573,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *poolstatic bool dcn31_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1655,7 +1655,7 @@ int dcn31x_populate_dml_pipes_from_context(struct dc *dc, enum dc_validate_mode validate_mode) {uint32_t pipe_cnt; -int i; +unsigned int i;dc_assert_fp_enabled ();
@@ -1679,7 +1679,7 @@ int dcn31_populate_dml_pipes_from_context(display_e2e_pipe_params_st *pipes, enum dc_validate_mode validate_mode) { - int i, pipe_cnt; + unsigned int i, pipe_cnt;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =0 ;bool upscaled = false;
@@ -2080,7 +2080,7 @@ static bool dcn31_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2119,7 +2119,7 @@ static bool dcn31_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn31_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2256,7 +2256,7 @@ static bool dcn31_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +13 -13
@@ -1206,7 +1206,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1473,7 +1473,7 @@ static void dcn314_resource_destruct(struct dcn314_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1506,7 +1506,7 @@ static void dcn314_resource_destruct(struct dcn314_resource_pool *pool)dal_irq_service_destroy (&pool->base.irqs); } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1519,19 +1519,19 @@ static void dcn314_resource_destruct(struct dcn314_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1554,7 +1554,7 @@ static void dcn314_resource_destruct(struct dcn314_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1570,7 +1570,7 @@ static void dcn314_resource_destruct(struct dcn314_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1606,7 +1606,7 @@ static struct hubp *dcn31_hubp_create(static bool dcn31_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1631,7 +1631,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *poolstatic bool dcn31_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -2000,7 +2000,7 @@ static bool dcn314_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2037,7 +2037,7 @@ static bool dcn314_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn31_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2167,7 +2167,7 @@ static bool dcn314_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +19 -18
@@ -1147,7 +1147,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1415,7 +1415,7 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1449,7 +1449,7 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1462,19 +1462,19 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1497,7 +1497,7 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1513,7 +1513,7 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1549,7 +1549,7 @@ static struct hubp *dcn31_hubp_create(static bool dcn31_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1574,7 +1574,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *poolstatic bool dcn31_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1670,7 +1670,7 @@ static int source_format_to_bpp (enum source_format_class SourcePixelFormat)static bool allow_pixel_rate_crb (struct dc *dc,struct dc_state *context) { -int i; +unsigned int i;struct resource_context *res_ctx = &context->res_ctx;/* Only apply for dual stream scenarios with edp*/
@@ -1703,7 +1703,8 @@ static int dcn315_populate_dml_pipes_from_context(display_e2e_pipe_params_st *pipes, enum dc_validate_mode validate_mode) { - int i, pipe_cnt, crb_idx, crb_pipes; + unsigned int i; +int pipe_cnt, crb_idx, crb_pipes;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =NULL ;const int max_usable_det = context->bw_ctx.dml.ip.config_return_buffer_size_in_kbytes -DCN3_15_MIN_COMPBUF_SIZE_KB ;
@@ -1743,7 +1744,7 @@ static int dcn315_populate_dml_pipes_from_context(if (approx_det_segs_required_for_pstate <=2 *DCN3_15_MAX_DET_SEGS ) {bool split_required = approx_det_segs_required_for_pstate >DCN3_15_MAX_DET_SEGS ; - split_required = split_required || timing->pix_clk_100hz >=dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc); + split_required = split_required || (unsigned int )timing->pix_clk_100hz >= (unsigned int )dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc); split_required = split_required || (pipe->plane_state && pipe->plane_state->src_rect.width >5120 );/* Minimum 2 segments to allow mpc/odm combine if its used later */
@@ -1792,7 +1793,7 @@ static int dcn315_populate_dml_pipes_from_context(continue ; } -bool split_required = pipe->stream->timing.pix_clk_100hz >=dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc) +bool split_required = (unsigned int )pipe->stream->timing.pix_clk_100hz >= (unsigned int )dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc) || (pipe->plane_state && pipe->plane_state->src_rect.width >5120 );if (remaining_det_segs >MIN_RESERVED_DET_SEGS && crb_pipes !=0 )
@@ -1829,7 +1830,7 @@ static int dcn315_populate_dml_pipes_from_context( (max_usable_det /DCN3_15_CRB_SEGMENT_SIZE_KB /4 ) *DCN3_15_CRB_SEGMENT_SIZE_KB ; }else if (!is_dual_plane (pipe->plane_state->format) && pipe->plane_state->src_rect.width <=5120 - && pipe->stream->timing.pix_clk_100hz <dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc)) { + && (unsigned int )pipe->stream->timing.pix_clk_100hz < (unsigned int )dcn_get_max_non_odm_pix_rate_100hz (&dc->dml.soc)) {/* Limit to 5k max to avoid forced pipe split when there is not enough detile for swath */ context->bw_ctx.dml.ip.det_buffer_size_kbytes =192 ; pipes[0 ].pipe.src.unbounded_req_mode = true;
@@ -2030,7 +2031,7 @@ static bool dcn315_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2069,7 +2070,7 @@ static bool dcn315_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn31_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2196,7 +2197,7 @@ static bool dcn315_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +15 -14
@@ -1140,7 +1140,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1410,7 +1410,7 @@ static void dcn316_resource_destruct(struct dcn316_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1444,7 +1444,7 @@ static void dcn316_resource_destruct(struct dcn316_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1457,19 +1457,19 @@ static void dcn316_resource_destruct(struct dcn316_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1492,7 +1492,7 @@ static void dcn316_resource_destruct(struct dcn316_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1508,7 +1508,7 @@ static void dcn316_resource_destruct(struct dcn316_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1541,7 +1541,7 @@ static struct hubp *dcn31_hubp_create(static bool dcn31_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1566,7 +1566,7 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *poolstatic bool dcn31_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1648,7 +1648,8 @@ static int dcn316_populate_dml_pipes_from_context(display_e2e_pipe_params_st *pipes, enum dc_validate_mode validate_mode) { - int i, pipe_cnt; + unsigned int i; +int pipe_cnt;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =0 ;const int max_usable_det = context->bw_ctx.dml.ip.config_return_buffer_size_in_kbytes -DCN3_16_MIN_COMPBUF_SIZE_KB ;
@@ -1904,7 +1905,7 @@ static bool dcn316_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -1943,7 +1944,7 @@ static bool dcn316_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn31_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2062,7 +2063,7 @@ static bool dcn316_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +13 -12
@@ -1421,7 +1421,7 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1451,7 +1451,7 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1464,19 +1464,19 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1499,7 +1499,7 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1515,7 +1515,7 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1541,7 +1541,7 @@ static void dcn32_resource_destruct(struct dcn32_resource_pool *pool)static bool dcn32_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1570,7 +1570,7 @@ static bool dcn32_dwbc_create(struct dc_context *ctx, struct resource_pool *poolstatic bool dcn32_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1906,7 +1906,8 @@ int dcn32_populate_dml_pipes_from_context(display_e2e_pipe_params_st *pipes, enum dc_validate_mode validate_mode) { - int i, pipe_cnt; + unsigned int i; +int pipe_cnt;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =NULL ;bool subvp_in_use = false;
@@ -2380,7 +2381,7 @@ static bool dcn32_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2550,7 +2551,7 @@ static bool dcn32_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c +4 -2
@@ -382,7 +382,8 @@ void dcn32_determine_det_override(struct dc *dc,void dcn32_set_det_allocations (struct dc *dc,struct dc_state *context,display_e2e_pipe_params_st *pipes) { -int i, pipe_cnt; +unsigned int i; +int pipe_cnt;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =0 ;bool disable_unbounded_requesting = dc->debug.disable_z9_mpc || dc->debug.disable_unbounded_requesting;
@@ -751,7 +752,8 @@ bool dcn32_subvp_vblank_admissable(struct dc *dc, struct dc_state *context, intvoid dcn32_update_dml_pipes_odm_policy_based_on_context (struct dc *dc,struct dc_state *context,display_e2e_pipe_params_st *pipes) { -int i, pipe_cnt; +unsigned int i; +int pipe_cnt;struct resource_context *res_ctx = &context->res_ctx;struct pipe_ctx *pipe =NULL ;
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +11 -11
@@ -1402,7 +1402,7 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1431,7 +1431,7 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool)dal_irq_service_destroy (&pool->base.irqs); } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1444,19 +1444,19 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1479,7 +1479,7 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1495,7 +1495,7 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1521,7 +1521,7 @@ static void dcn321_resource_destruct(struct dcn321_resource_pool *pool)static bool dcn321_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1550,7 +1550,7 @@ static bool dcn321_dwbc_create(struct dc_context *ctx, struct resource_pool *poostatic bool dcn321_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1879,7 +1879,7 @@ static bool dcn321_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2044,7 +2044,7 @@ static bool dcn321_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +13 -13
@@ -1154,7 +1154,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1484,7 +1484,7 @@ static void dcn35_resource_destruct(struct dcn35_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1514,7 +1514,7 @@ static void dcn35_resource_destruct(struct dcn35_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1527,19 +1527,19 @@ static void dcn35_resource_destruct(struct dcn35_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1562,7 +1562,7 @@ static void dcn35_resource_destruct(struct dcn35_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1578,7 +1578,7 @@ static void dcn35_resource_destruct(struct dcn35_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1635,7 +1635,7 @@ static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)static bool dcn35_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1674,7 +1674,7 @@ static void dcn35_mmhubbub_init(struct dcn30_mmhubbub *mcif_wb30,static bool dcn35_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -2040,7 +2040,7 @@ static bool dcn35_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2092,7 +2092,7 @@ static bool dcn35_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn35_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2224,7 +2224,7 @@ static bool dcn35_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +13 -13
@@ -1134,7 +1134,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1464,7 +1464,7 @@ static void dcn351_resource_destruct(struct dcn351_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1494,7 +1494,7 @@ static void dcn351_resource_destruct(struct dcn351_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1507,19 +1507,19 @@ static void dcn351_resource_destruct(struct dcn351_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1542,7 +1542,7 @@ static void dcn351_resource_destruct(struct dcn351_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1558,7 +1558,7 @@ static void dcn351_resource_destruct(struct dcn351_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1615,7 +1615,7 @@ static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)static bool dcn35_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1654,7 +1654,7 @@ static void dcn35_mmhubbub_init(struct dcn30_mmhubbub *mcif_wb30,static bool dcn35_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -2012,7 +2012,7 @@ static bool dcn351_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2064,7 +2064,7 @@ static bool dcn351_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn35_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2196,7 +2196,7 @@ static bool dcn351_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +13 -13
@@ -1141,7 +1141,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if (((unsigned int )eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1471,7 +1471,7 @@ static void dcn36_resource_destruct(struct dcn36_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn20_dsc_destroy (&pool->base.dscs[i]); }
@@ -1501,7 +1501,7 @@ static void dcn36_resource_destruct(struct dcn36_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1514,19 +1514,19 @@ static void dcn36_resource_destruct(struct dcn36_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1549,7 +1549,7 @@ static void dcn36_resource_destruct(struct dcn36_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1565,7 +1565,7 @@ static void dcn36_resource_destruct(struct dcn36_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1622,7 +1622,7 @@ static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)static bool dcn35_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1661,7 +1661,7 @@ static void dcn35_mmhubbub_init(struct dcn30_mmhubbub *mcif_wb30,static bool dcn35_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -2010,7 +2010,7 @@ static bool dcn36_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2062,7 +2062,7 @@ static bool dcn36_resource_construct( }/* HUBPs, DPPs, OPPs and TGs */ -for (i =0 ; i < pool->base.pipe_count; i++) { +for (i =0 ; i < (int )pool->base.pipe_count; i++) { pool->base.hubps[i] =dcn35_hubp_create (ctx, i);if (pool->base.hubps[i] ==NULL ) {BREAK_TO_DEBUGGER ();
@@ -2194,7 +2194,7 @@ static bool dcn36_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +16 -16
@@ -1427,7 +1427,7 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn401_dsc_destroy (&pool->base.dscs[i]); }
@@ -1457,7 +1457,7 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1470,19 +1470,19 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1505,7 +1505,7 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1521,7 +1521,7 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1547,7 +1547,7 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool)static bool dcn401_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1578,7 +1578,7 @@ static bool dcn401_dwbc_create(struct dc_context *ctx, struct resource_pool *poostatic bool dcn401_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1796,11 +1796,11 @@ static void dcn401_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx) pixel_clk_params->dio_se_pix_per_cycle =2 ; }else if (dc_is_dp_signal (stream->signal)) {/* round up to nearest power of 2, or max at 8 pixels per cycle */ -if (pixel_clk_params->requested_pix_clk_100hz >4 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { +if ((unsigned int )pixel_clk_params->requested_pix_clk_100hz > (unsigned int )(4 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =8 ; - }else if (pixel_clk_params->requested_pix_clk_100hz >2 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { + }else if ((unsigned int )pixel_clk_params->requested_pix_clk_100hz > (unsigned int )(2 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =4 ; - }else if (pixel_clk_params->requested_pix_clk_100hz > stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { + }else if ((unsigned int )pixel_clk_params->requested_pix_clk_100hz > (unsigned int )(stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =2 ; }else { pixel_clk_params->dio_se_pix_per_cycle =1 ;
@@ -1810,10 +1810,10 @@ static void dcn401_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx)int dcn401_get_power_profile (const struct dc_state *context) { -int uclk_mhz = context->bw_ctx.bw.dcn.clk.dramclk_khz /1000 ; +unsigned int uclk_mhz = context->bw_ctx.bw.dcn.clk.dramclk_khz /1000 ;int dpm_level =0 ; -for (int i =0 ; i < context->clk_mgr->bw_params->clk_table.num_entries_per_clk.num_memclk_levels; i++) { +for (unsigned int i =0 ; i < context->clk_mgr->bw_params->clk_table.num_entries_per_clk.num_memclk_levels; i++) {if (context->clk_mgr->bw_params->clk_table.entries[i].memclk_mhz ==0 || uclk_mhz < context->clk_mgr->bw_params->clk_table.entries[i].memclk_mhz)break ;
@@ -2100,7 +2100,7 @@ static bool dcn401_resource_construct(CLOCK_SOURCE_ID_DP_DTO , &clk_src_regs[0], true); -for (i =0 ; i < pool->base.clk_src_count; i++) { +for (i =0 ; i < (int )pool->base.clk_src_count; i++) {if (pool->base.clock_sources[i] ==NULL ) {dm_error ("DC: failed to create clock sources!\n" );BREAK_TO_DEBUGGER ();
@@ -2262,7 +2262,7 @@ static bool dcn401_resource_construct( dc->caps.max_planes = pool->base.pipe_count; -for (i =0 ; i < dc->caps.max_planes; ++i) +for (i =0 ; i < (int )dc->caps.max_planes; ++i) dc->caps.planes[i] = plane_cap; dc->caps.max_odm_combine_factor =4 ;
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +20 -20
@@ -1416,7 +1416,7 @@ static void dcn42_resource_destruct(struct dcn42_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) {if (pool->base.dscs[i] !=NULL )dcn42_dsc_destroy (&pool->base.dscs[i]); }
@@ -1445,7 +1445,7 @@ static void dcn42_resource_destruct(struct dcn42_resource_pool *pool)dal_irq_service_destroy (&pool->base.irqs); } -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) {if (pool->base.engines[i] !=NULL )dce110_engine_destroy (&pool->base.engines[i]);if (pool->base.hw_i2cs[i] !=NULL ) {
@@ -1458,19 +1458,19 @@ static void dcn42_resource_destruct(struct dcn42_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_opp; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_opp; i++) {if (pool->base.opps[i] !=NULL ) pool->base.opps[i]->funcs->opp_destroy (&pool->base.opps[i]); } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.timing_generators[i] !=NULL ) {kfree (DCN10TG_FROM_TG (pool->base.timing_generators[i])); pool->base.timing_generators[i] =NULL ; } } -for (i =0 ; i < pool->base.res_cap->num_dwb; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dwb; i++) {if (pool->base.dwbc[i] !=NULL ) {kfree (TO_DCN30_DWBC (pool->base.dwbc[i])); pool->base.dwbc[i] =NULL ;
@@ -1493,7 +1493,7 @@ static void dcn42_resource_destruct(struct dcn42_resource_pool *pool) } } -for (i =0 ; i < pool->base.res_cap->num_mpc_3dlut; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_mpc_3dlut; i++) {if (pool->base.mpc_lut[i] !=NULL ) {dc_3dlut_func_release (pool->base.mpc_lut[i]); pool->base.mpc_lut[i] =NULL ;
@@ -1509,7 +1509,7 @@ static void dcn42_resource_destruct(struct dcn42_resource_pool *pool) pool->base.dp_clock_source =NULL ; } -for (i =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {if (pool->base.multiple_abms[i] !=NULL )dce_abm_destroy (&pool->base.multiple_abms[i]); }
@@ -1580,11 +1580,11 @@ static void dcn42_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx) pixel_clk_params->dio_se_pix_per_cycle =2 ; }else if (dc_is_dp_signal (stream->signal)) {/* round up to nearest power of 2, or max at 8 pixels per cycle */ -if (pixel_clk_params->requested_pix_clk_100hz >4 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { +if (pixel_clk_params->requested_pix_clk_100hz > (uint32_t )(4 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =8 ; - }else if (pixel_clk_params->requested_pix_clk_100hz >2 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { + }else if (pixel_clk_params->requested_pix_clk_100hz > (uint32_t )(2 * stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =4 ; - }else if (pixel_clk_params->requested_pix_clk_100hz > stream->ctx->dc->clk_mgr->dprefclk_khz *10 ) { + }else if (pixel_clk_params->requested_pix_clk_100hz > (uint32_t )(stream->ctx->dc->clk_mgr->dprefclk_khz *10 )) { pixel_clk_params->dio_se_pix_per_cycle =2 ; }else { pixel_clk_params->dio_se_pix_per_cycle =1 ;
@@ -1594,7 +1594,7 @@ static void dcn42_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx)static bool dcn42_dwbc_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t dwb_count = pool->res_cap->num_dwb;for (i =0 ; i < dwb_count; i++) {
@@ -1631,7 +1631,7 @@ static void dcn42_mmhubbub_init(struct dcn30_mmhubbub *mcif_wb30,static bool dcn42_mmhubbub_create (struct dc_context *ctx,struct resource_pool *pool) { -int i; +unsigned int i;uint32_t pipe_count = pool->res_cap->num_dwb;for (i =0 ; i < pipe_count; i++) {
@@ -1753,7 +1753,7 @@ static struct link_encoder *dcn42_link_enc_create_minimal( {struct dcn20_link_encoder *enc20; -if ((eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc) +if ((unsigned int )(eng_id -ENGINE_ID_DIGA ) > ctx->dc->res_pool->res_cap->num_dig_link_enc)return NULL ; enc20 =kzalloc (sizeof (struct dcn20_link_encoder ),GFP_KERNEL );
@@ -1831,7 +1831,7 @@ static bool dcn42_resource_construct(struct dc *dc, struct dcn42_resource_pool *pool) { - int i, j; + unsigned int i, j;struct dc_context *ctx = dc->ctx;struct irq_service_init_data init_data;uint32_t pipe_fuses;
@@ -1867,7 +1867,7 @@ static bool dcn42_resource_construct( num_pipes = pool->base.res_cap->num_dpp; pipe_fuses =read_pipe_fuses (ctx); -for (i =0 ; i < pool->base.res_cap->num_dpp; i++) +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dpp; i++)if (pipe_fuses &1 << i) num_pipes--;
@@ -2121,7 +2121,7 @@ static bool dcn42_resource_construct( }/* HUBPs, DPPs, OPPs, TGs, ABMs */ -for (i =0 , j =0 ; i < pool->base.res_cap->num_timing_generator; i++) { +for (i =0 , j =0 ; i < (unsigned int )pool->base.res_cap->num_timing_generator; i++) {/* if pipe is disabled, skip instance of HW pipe, * i.e, skip ASIC register instance */
@@ -2165,7 +2165,7 @@ static bool dcn42_resource_construct( &abm_shift, &abm_mask);if (pool->base.multiple_abms[j] ==NULL ) { -dm_error ("DC: failed to create abm for pipe %d!\n" , i); +dm_error ("DC: failed to create abm for pipe %u!\n" , i);BREAK_TO_DEBUGGER (); goto create_fail; }
@@ -2200,11 +2200,11 @@ static bool dcn42_resource_construct( }/* DSCs */ -for (i =0 ; i < pool->base.res_cap->num_dsc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_dsc; i++) { pool->base.dscs[i] =dcn42_dsc_create (ctx, i);if (pool->base.dscs[i] ==NULL ) {BREAK_TO_DEBUGGER (); -dm_error ("DC: failed to create display stream compressor %d!\n" , i); +dm_error ("DC: failed to create display stream compressor %u!\n" , i); goto create_fail; } }
@@ -2224,7 +2224,7 @@ static bool dcn42_resource_construct( }/* AUX and I2C */ -for (i =0 ; i < pool->base.res_cap->num_ddc; i++) { +for (i =0 ; i < (unsigned int )pool->base.res_cap->num_ddc; i++) { pool->base.engines[i] =dcn42_aux_engine_create (ctx, i);if (pool->base.engines[i] ==NULL ) {
Signature · 1 line
2.43.0
PATCH 5/20 drm/amd/display: Fix compiler warnings in dml2
In reply to James LinFrom: Gaghik Khachatrian <[email protected]>
[Why & How]
In dml2_translation_helper.c, rename the inner loop index inside dml2_init_soc_states() for several project cases
to avoid shadowing the outer function-scope index variable.
In display_mode_core.c, replace shift-based power-of-two expressions used to compute dpte_row_height and dpte_row_height_linear with an equivalent floating-point power function, consistent with existing usage elsewhere in the file.
Behavior for valid inputs is preserved in both cases.
--- drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c +3 -3
@@ -2626,18 +2626,18 @@ static dml_uint_t CalculateVMAndRowBytes( *PixelPTEBytesPerRow_one_row_per_frame = (dml_uint_t)((dml_float_t) *dpte_row_width_ub_one_row_per_frame / (dml_float_t) *PixelPTEReqWidth * *PTERequestSize);if (SurfaceTiling == dml_sw_linear) { - *dpte_row_height = (dml_uint_t)(dml_min (128 ,1 << (dml_uint_t )dml_floor (dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch),1 ))); + *dpte_row_height = (dml_uint_t)(dml_min (128 , (dml_uint_t )dml_pow (2.0 , (int )dml_floor (dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch),1 ))));dml_print ("DML::%s: dpte_row_height term 1 = %u\n" , __func__, PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch);dml_print ("DML::%s: dpte_row_height term 2 = %f\n" , __func__,dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch));dml_print ("DML::%s: dpte_row_height term 3 = %f\n" , __func__,dml_floor (dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch),1 )); -dml_print ("DML::%s: dpte_row_height term 4 = %u\n" , __func__,1 << (dml_uint_t )dml_floor (dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch),1 )); +dml_print ("DML::%s: dpte_row_height term 4 = %u\n" , __func__, (dml_uint_t )dml_pow (2.0 , (int )dml_floor (dml_log2 (PTEBufferSizeInRequests * *PixelPTEReqWidth / Pitch),1 )));dml_print ("DML::%s: dpte_row_height = %u\n" , __func__, *dpte_row_height); *dpte_row_width_ub = (dml_uint_t)(dml_ceil (((dml_float_t ) Pitch * (dml_float_t) *dpte_row_height -1 ), (dml_float_t) *PixelPTEReqWidth) + *PixelPTEReqWidth); *PixelPTEBytesPerRow = (dml_uint_t)((dml_float_t) *dpte_row_width_ub / (dml_float_t) *PixelPTEReqWidth * *PTERequestSize);// VBA_DELTA, VBA doesn't have programming value for pte row height linear. - *dpte_row_height_linear =1 << (dml_uint_t )dml_floor (dml_log2 (PTEBufferSizeInRequests * PixelPTEReqWidth_linear / Pitch),1 ); + *dpte_row_height_linear = (dml_uint_t )dml_pow (2.0 , (int )dml_floor (dml_log2 (PTEBufferSizeInRequests * PixelPTEReqWidth_linear / Pitch),1 ));if (*dpte_row_height_linear >128 ) *dpte_row_height_linear =128 ;
Signature · 1 line
2.43.0
PATCH 6/20 drm/amd/display: Fix multiple compiler warnings
In reply to James LinFrom: Gaghik Khachatrian <[email protected]>
[Why]
Unreachable Code;
Copy Constructor Deleted;
Local Declaration Hides Parameter;
Local Declaration Hides Outer Scope;
Uninitialized or Suspicious Memory Use.
[How]
- Removed or refactored unreachable code paths
- Ensured proper copy constructors in C++ classes
- Renamed local variables that shadowed function parameters
- Renamed inner loop/block variables to avoid shadowing outer scope Fixed in 8 files across several FPU layers
Also fixed in color_gamma and cs_funcs modules
- Reordered guard conditions to validate pipe type before accessing stream
- Ensures safe memory access patterns in DC DMUB service layer
All changes maintain backward compatibility and preserve functional behavior.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++--- .../gpu/drm/amd/display/dc/core/dc_state.c | 6 ++-- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +-- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 3 +- .../dc/dml/dcn21/display_mode_vba_21.c | 8 +++--- .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 4 +-- .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 10 +++---- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 13 +++++---- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 10 +++---- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 10 +++---- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 4 +-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 3 ++ .../amd/display/modules/color/color_gamma.c | 28 +++++++++---------- 13 files changed, 57 insertions(+), 54 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -4
@@ -4976,7 +4976,7 @@ static void commit_planes_for_stream(struct dc *dc,if (!pipe_ctx->top_pipe && !pipe_ctx->prev_odm_pipe &&should_update_pipe_for_stream (context, pipe_ctx, stream)) { -struct dc_stream_status *stream_status =NULL ; +struct dc_stream_status *pipe_stream_status =NULL ;if (!pipe_ctx->plane_state)continue ;
@@ -4985,12 +4985,12 @@ static void commit_planes_for_stream(struct dc *dc,if (update_type ==UPDATE_TYPE_FAST )continue ; - stream_status = + pipe_stream_status =stream_get_status (context, pipe_ctx->stream); -if (dc->hwss.apply_ctx_for_surface && stream_status) +if (dc->hwss.apply_ctx_for_surface && pipe_stream_status) dc->hwss.apply_ctx_for_surface ( - dc, pipe_ctx->stream, stream_status->plane_count, context); + dc, pipe_ctx->stream, pipe_stream_status->plane_count, context); } }
drivers/gpu/drm/amd/display/dc/core/dc_state.c +3 -3
@@ -218,13 +218,13 @@ struct dc_state *dc_state_create(struct dc *dc, struct dc_state_create_params *p }if (dc->caps.dcmode_power_limits_present) { -bool status; +bool dc_power_status;DC_FP_START (); - status =dml2_create (dc, &dc->dml2_dc_power_options, &state->bw_ctx.dml2_dc_power_source); + dc_power_status =dml2_create (dc, &dc->dml2_dc_power_options, &state->bw_ctx.dml2_dc_power_source);DC_FP_END (); -if (!status) { +if (!dc_power_status) {dc_state_release (state);return NULL ; }
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +2 -2
@@ -602,7 +602,7 @@ bool dc_stream_add_writeback(struct dc *dc,if (dc->hwss.enable_writeback) {struct dc_stream_status *stream_status =dc_stream_get_status (stream); -struct dwbc *dwb = dc->res_pool->dwbc[wb_info->dwb_pipe_inst]; + dwb = dc->res_pool->dwbc[wb_info->dwb_pipe_inst];if (stream_status) dwb->otg_inst = stream_status->primary_otg_inst; }
@@ -614,7 +614,7 @@ bool dc_stream_add_writeback(struct dc *dc,/* enable writeback */ if (dc->hwss.enable_writeback) { -struct dwbc *dwb = dc->res_pool->dwbc[wb_info->dwb_pipe_inst]; + dwb = dc->res_pool->dwbc[wb_info->dwb_pipe_inst];if (dwb->funcs->is_enabled (dwb)) {/* writeback pipe already enabled, only need to update */
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +1 -2
@@ -488,12 +488,11 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, strufor (i =0 , k =0 ; context && i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; -if (!resource_is_pipe_type (pipe,OTG_MASTER )) +if (!resource_is_pipe_type (pipe,OTG_MASTER ) || !pipe->stream)continue ; stream_status =dc_state_get_stream_status (context, pipe->stream);if (stream_status && stream_status->fpo_in_use) { -struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];uint8_t min_refresh_in_hz; min_refresh_in_hz = (uint8_t )((pipe->stream->timing.min_refresh_in_uhz +999999 ) /1000000 );
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +4 -4
@@ -4809,14 +4809,14 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l mode_lib->vba.MaximumReadBandwidthWithoutPrefetch =0.0 ; mode_lib->vba.MaximumReadBandwidthWithPrefetch =0.0 ;for (k =0 ; k <= mode_lib->vba.NumberOfActivePlanes -1 ; k++) { -unsigned int m; +unsigned int cursor_idx; locals->cursor_bw[k] =0 ; locals->cursor_bw_pre[k] =0 ; -for (m =0 ; m < mode_lib->vba.NumberOfCursors[k]; m++) { - locals->cursor_bw[k] = mode_lib->vba.CursorWidth[k][m] * mode_lib->vba.CursorBPP[k][m] +for (cursor_idx =0 ; cursor_idx < mode_lib->vba.NumberOfCursors[k]; cursor_idx++) { + locals->cursor_bw[k] = mode_lib->vba.CursorWidth[k][cursor_idx] * mode_lib->vba.CursorBPP[k][cursor_idx] /8.0 / (mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k]) * mode_lib->vba.VRatio[k]; - locals->cursor_bw_pre[k] = mode_lib->vba.CursorWidth[k][m] * mode_lib->vba.CursorBPP[k][m] + locals->cursor_bw_pre[k] = mode_lib->vba.CursorWidth[k][cursor_idx] * mode_lib->vba.CursorBPP[k][cursor_idx] /8.0 / (mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k]) * locals->VRatioPreY[i][j][k]; }
drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c +2 -2
@@ -721,9 +721,9 @@ void dcn3_fpu_build_wm_range_table(struct clk_mgr *base) base->bw_params->wm_table.nv_entries[WM_D ].pmfw_breakdown.max_uclk =0xFFFF ; } -void patch_dcn30_soc_bounding_box (struct dc *dc,struct _vcs_dpi_soc_bounding_box_st *dcn3_0_ip) +void patch_dcn30_soc_bounding_box (struct dc *dc,struct _vcs_dpi_soc_bounding_box_st *soc_bb) { - (void )dcn3_0_ip; + (void )soc_bb;dc_assert_fp_enabled ();if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +5 -5
@@ -410,15 +410,15 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c context->bw_ctx.dml.ip.odm_combine_4to1_supported = true;for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; +struct pipe_ctx *cur_pipe = &context->res_ctx.pipe_ctx[i]; -if (!pipe->stream) +if (!cur_pipe->stream)continue ; -if (pipe->stream->signal ==SIGNAL_TYPE_EDP && dc->debug.seamless_boot_odm_combine && - pipe->stream->apply_seamless_boot_optimization) { +if (cur_pipe->stream->signal ==SIGNAL_TYPE_EDP && dc->debug.seamless_boot_odm_combine && + cur_pipe->stream->apply_seamless_boot_optimization) { -if (pipe->stream->apply_boot_odm_mode == dm_odm_combine_policy_2to1) { +if (cur_pipe->stream->apply_boot_odm_mode == dm_odm_combine_policy_2to1) { context->bw_ctx.dml.vba.ODMCombinePolicy = dm_odm_combine_policy_2to1;break ; }
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +7 -6
@@ -2216,7 +2216,7 @@ bool dcn32_internal_validate_bw(struct dc *dc,if (repopulate_pipes) {int flag_max_mpc_comb = vba->maxMpcComb;int flag_vlevel = vlevel; -int i; +int j; pipe_cnt = dc->res_pool->funcs->populate_dml_pipes (dc, context, pipes, validate_mode);if (!dc->config.enable_windowed_mpo_odm)
@@ -2231,19 +2231,20 @@ bool dcn32_internal_validate_bw(struct dc *dc, dm_prefetch_support_uclk_fclk_and_stutter_if_possible; vlevel =dml_get_voltage_level (&context->bw_ctx.dml, pipes, pipe_cnt); +const int num_states = (int )context->bw_ctx.dml.soc.num_states; -if (vlevel == context->bw_ctx.dml.soc.num_states) { +if (vlevel == num_states) {/* failed after DET size changes */ goto validate_fail; }else if (flag_max_mpc_comb ==0 && flag_max_mpc_comb != context->bw_ctx.dml.vba.maxMpcComb) {/* check the context constructed with pipe split flags is still valid*/ bool flags_valid = false; -for (i = flag_vlevel; i < (int )context->bw_ctx.dml.soc.num_states; i++) { -if (vba->ModeSupport[i][flag_max_mpc_comb]) { +for (j = flag_vlevel; j < (int )context->bw_ctx.dml.soc.num_states; j++) { +if (vba->ModeSupport[j][flag_max_mpc_comb]) { vba->maxMpcComb = flag_max_mpc_comb; - vba->VoltageLevel = i; - vlevel = i; + vba->VoltageLevel = j; + vlevel = j; flags_valid = true;break ; }
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +5 -5
@@ -551,16 +551,16 @@ int dcn35_populate_dml_pipes_from_context_fpu(struct dc *dc, }for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; +struct pipe_ctx *cur_pipe = &context->res_ctx.pipe_ctx[i]; -if (!pipe->stream) +if (!cur_pipe->stream)continue ; -if (pipe->stream->signal ==SIGNAL_TYPE_EDP && +if (cur_pipe->stream->signal ==SIGNAL_TYPE_EDP && dc->debug.seamless_boot_odm_combine && - pipe->stream->apply_seamless_boot_optimization) { + cur_pipe->stream->apply_seamless_boot_optimization) { -if (pipe->stream->apply_boot_odm_mode == +if (cur_pipe->stream->apply_boot_odm_mode == dm_odm_combine_policy_2to1) { context->bw_ctx.dml.vba.ODMCombinePolicy = dm_odm_combine_policy_2to1;
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +5 -5
@@ -583,16 +583,16 @@ int dcn351_populate_dml_pipes_from_context_fpu(struct dc *dc, }for (i =0 ; i < dc->res_pool->pipe_count; i++) { -struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; +struct pipe_ctx *cur_pipe = &context->res_ctx.pipe_ctx[i]; -if (!pipe->stream) +if (!cur_pipe->stream)continue ; -if (pipe->stream->signal ==SIGNAL_TYPE_EDP && +if (cur_pipe->stream->signal ==SIGNAL_TYPE_EDP && dc->debug.seamless_boot_odm_combine && - pipe->stream->apply_seamless_boot_optimization) { + cur_pipe->stream->apply_seamless_boot_optimization) { -if (pipe->stream->apply_boot_odm_mode == +if (cur_pipe->stream->apply_boot_odm_mode == dm_odm_combine_policy_2to1) { context->bw_ctx.dml.vba.ODMCombinePolicy = dm_odm_combine_policy_2to1;
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +2 -2
@@ -3636,8 +3636,8 @@ void dcn10_update_pending_status(struct pipe_ctx *pipe_ctx)if (dc->hwseq->wa_state.disallow_self_refresh_during_multi_plane_transition_applied) {struct dce_hwseq *hwseq = dc->hwseq; -struct timing_generator *tg = dc->res_pool->timing_generators[0 ]; -unsigned int cur_frame = tg->funcs->get_frame_count (tg); +struct timing_generator *wa_tg = dc->res_pool->timing_generators[0 ]; +unsigned int cur_frame = wa_tg->funcs->get_frame_count (wa_tg);if (cur_frame != hwseq->wa_state.disallow_self_refresh_during_multi_plane_transition_applied_on_frame) {struct hubbub *hubbub = dc->res_pool->hubbub;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -0
@@ -1952,6 +1952,9 @@ void dcn401_perform_3dlut_wa_unlock(struct pipe_ctx *pipe_ctx)* This is meant to work around a known HW issue where VREADY will cancel the pending 3DLUT_ENABLE signal regardless * of whether OTG lock is currently being held or not. */ +if (!pipe_ctx) +return ; +struct pipe_ctx *wa_pipes[MAX_PIPES ] = {NULL };struct pipe_ctx *odm_pipe, *mpc_pipe;int i, wa_pipe_ct =0 ;
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +14 -14
@@ -690,7 +690,7 @@ static bool find_software_points(static bool build_custom_gamma_mapping_coefficients_worker (const struct dc_gamma *ramp,struct pixel_gamma_point *coeff, -const struct hw_x_point *coordinates_x, +const struct hw_x_point *hw_coordinates_x,const struct gamma_pixel *axis_x,enum channel_name channel,uint32_t number_of_points)
@@ -712,11 +712,11 @@ static bool build_custom_gamma_mapping_coefficients_worker(struct fixed31_32 right_pos;if (channel ==CHANNEL_NAME_RED ) - coord_x = coordinates_x[i].regamma_y_red; + coord_x = hw_coordinates_x[i].regamma_y_red;else if (channel ==CHANNEL_NAME_GREEN ) - coord_x = coordinates_x[i].regamma_y_green; + coord_x = hw_coordinates_x[i].regamma_y_green;else - coord_x = coordinates_x[i].regamma_y_blue; + coord_x = hw_coordinates_x[i].regamma_y_blue; if (!find_software_points( ramp, axis_x, coord_x, channel,
@@ -1539,11 +1539,11 @@ static void build_evenly_distributed_points( }static inline void copy_rgb_regamma_to_coordinates_x ( -struct hw_x_point *coordinates_x, +struct hw_x_point *hw_coordinates_x,uint32_t hw_points_num,const struct pwl_float_data_ex *rgb_ex) { -struct hw_x_point *coords = coordinates_x; +struct hw_x_point *coords = hw_coordinates_x;uint32_t i =0 ;const struct pwl_float_data_ex *rgb_regamma = rgb_ex;
@@ -1562,7 +1562,7 @@ static bool calculate_interpolated_hardware_curve(const struct dc_gamma *ramp, struct pixel_gamma_point *coeff128, struct pwl_float_data *rgb_user, - const struct hw_x_point *coordinates_x, + const struct hw_x_point *hw_coordinates_x, const struct gamma_pixel *axis_x, uint32_t number_of_points, struct dc_transfer_func_distributed_points *tf_pts)
@@ -1575,7 +1575,7 @@ static bool calculate_interpolated_hardware_curve(for (i =0 ; i <3 ; i++) {if (!build_custom_gamma_mapping_coefficients_worker ( - ramp, coeff128, coordinates_x, axis_x, i, + ramp, coeff128, hw_coordinates_x, axis_x, i, number_of_points))return false; }
@@ -1789,14 +1789,14 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,if (input_tf->tf ==TRANSFER_FUNCTION_PQ ) {/* just copy current rgb_regamma into tf_pts */ struct pwl_float_data_ex *curvePt = curve; -int i =0 ; +int j =0 ; -while (i <=MAX_HW_POINTS ) { - tf_pts->red[i] = curvePt->r; - tf_pts->green[i] = curvePt->g; - tf_pts->blue[i] = curvePt->b; +while (j <=MAX_HW_POINTS ) { + tf_pts->red[j] = curvePt->r; + tf_pts->green[j] = curvePt->g; + tf_pts->blue[j] = curvePt->b; ++curvePt; - ++i; + ++j; } }else {// clamps to 0-1
Signature · 1 line
2.43.0
PATCH 7/20 drm/amd/display: Fix warnings
In reply to James LinFrom: Clay King <[email protected]>
[Why & How]
Fix various warnings related to unsigned/signed mismatches
- Consistently use the same signedness for a given value
- Explcitly cast between types when needed
--- .../display/dc/clk_mgr/dce100/dce_clk_mgr.c | 6 +- .../display/dc/clk_mgr/dce100/dce_clk_mgr.h | 2 +- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 8 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c | 4 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.h | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +- .../drm/amd/display/dc/core/dc_link_exports.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 18 +- .../drm/amd/display/dc/core/dc_vm_helper.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 68 +-- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- .../amd/display/dc/dcn21/dcn21_link_encoder.c | 2 +- .../display/dc/dio/dcn10/dcn10_link_encoder.c | 2 +- .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 4 +- .../dc/dml/dcn21/display_mode_vba_21.c | 28 +- .../dc/dml/dcn30/display_mode_vba_30.c | 342 +++++++-------- .../dc/dml/dcn31/display_mode_vba_31.c | 408 +++++++++--------- .../dc/dml/dcn314/display_mode_vba_314.c | 400 ++++++++--------- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 8 +- .../dc/dml/dcn32/display_mode_vba_util_32.h | 8 +- .../drm/amd/display/dc/dml/display_mode_vba.h | 12 +- .../amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 2 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 2 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 4 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 8 +- .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 8 +- .../amd/display/dc/dsc/dcn401/dcn401_dsc.c | 10 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 4 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 2 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 6 +- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 4 +- .../amd/display/dc/inc/hw/timing_generator.h | 8 +- .../gpu/drm/amd/display/dc/inc/link_service.h | 2 +- .../gpu/drm/amd/display/dc/inc/reg_helper.h | 72 ++-- .../drm/amd/display/dc/link/link_detection.c | 2 +- .../drm/amd/display/dc/link/link_detection.h | 2 +- .../link/protocols/link_edp_panel_control.c | 8 +- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 2 +- .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c | 6 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c | 2 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h | 2 +- .../amd/display/dc/optc/dcn32/dcn32_optc.c | 2 +- .../gpu/drm/amd/display/include/fixed31_32.h | 6 +- .../drm/amd/display/modules/hdcp/hdcp_log.c | 2 +- 59 files changed, 769 insertions(+), 767 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c +3 -3
@@ -88,7 +88,7 @@ static const struct state_dependent_clocks dce80_max_clks_by_state[] = {/* ClocksStatePerformance */ { .display_clk_khz = 625000, .pixel_clk_khz = 400000 } }; -int dentist_get_divider_from_did (int did) +unsigned int dentist_get_divider_from_did (unsigned int did) {if (did <DENTIST_BASE_DID_1 ) did =DENTIST_BASE_DID_1 ;
@@ -155,8 +155,8 @@ static int dce60_get_dp_ref_freq_khz(struct clk_mgr *clk_mgr_base)int dce_get_dp_ref_freq_khz (struct clk_mgr *clk_mgr_base) {struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base); -int dprefclk_wdivider; -int dprefclk_src_sel; +uint32_t dprefclk_wdivider; +uint32_t dprefclk_src_sel;int dp_ref_clk_khz;int target_div;
drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.h +1 -1
@@ -54,6 +54,6 @@ int dce_set_clock(void dce_clk_mgr_destroy (struct clk_mgr **clk_mgr); -int dentist_get_divider_from_did (int did); +unsigned int dentist_get_divider_from_did (unsigned int did);#endif /* _DCE_CLK_MGR_H_ */
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c +4 -4
@@ -430,8 +430,8 @@ void dcn2_read_clocks_from_hw_dentist(struct clk_mgr *clk_mgr_base)struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);uint32_t dispclk_wdivider;uint32_t dppclk_wdivider; -int disp_divider; -int dpp_divider; +unsigned int disp_divider; +unsigned int dpp_divider;REG_GET (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_WDIVIDER , &dispclk_wdivider);REG_GET (DENTIST_DISPCLK_CNTL ,DENTIST_DPPCLK_WDIVIDER , &dppclk_wdivider);
@@ -534,8 +534,8 @@ void dcn20_clk_mgr_construct(struct pp_smu_funcs *pp_smu, struct dccg *dccg) { - int dprefclk_did; -int target_div; + unsigned int dprefclk_did; +unsigned int target_div;uint32_t pll_req_reg;struct fixed31_32 pll_req;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c +2 -2
@@ -123,12 +123,12 @@ bool dcn30_smu_test_message(struct clk_mgr_internal *clk_mgr, uint32_t input)return false; } -bool dcn30_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,unsigned int *version) +bool dcn30_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,int *version) {smu_print ("SMU Get SMU version\n" );if (dcn30_smu_send_msg_with_param (clk_mgr, - DALSMC_MSG_GetSmuVersion,0 , version)) { + DALSMC_MSG_GetSmuVersion,0 , (uint32_t *)version)) {smu_print ("SMU version: %d\n" , *version);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.h +1 -1
@@ -31,7 +31,7 @@struct clk_mgr_internal ;bool dcn30_smu_test_message (struct clk_mgr_internal *clk_mgr,uint32_t input); -bool dcn30_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,unsigned int *version); +bool dcn30_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,int *version);bool dcn30_smu_check_driver_if_version (struct clk_mgr_internal *clk_mgr);bool dcn30_smu_check_msg_header_version (struct clk_mgr_internal *clk_mgr);void dcn30_smu_set_dram_addr_high (struct clk_mgr_internal *clk_mgr,uint32_t addr_high);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +1 -1
@@ -475,7 +475,7 @@ static int dcn32_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base) {struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);uint32_t dispclk_wdivider; -int disp_divider; +unsigned int disp_divider;REG_GET (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_WDIVIDER , &dispclk_wdivider); disp_divider =dentist_get_divider_from_did (dispclk_wdivider);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c +1 -1
@@ -1490,7 +1490,7 @@ static int dcn401_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base) {struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);uint32_t dispclk_wdivider; -int disp_divider; +unsigned int disp_divider;REG_GET (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_WDIVIDER , &dispclk_wdivider); disp_divider =dentist_get_divider_from_did (dispclk_wdivider);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.h +2 -2
@@ -17,14 +17,14 @@ union dcn401_clk_mgr_block_sequence_params {uint32_t ppclk;uint16_t freq_mhz;/* outputs */ -uint32_t *response; +int *response; } update_hardmin_params;struct {/* inputs */ uint32_t ppclk;int freq_khz;/* outputs */ -uint32_t *response; +int *response; } update_hardmin_optimized_params;struct {/* inputs */
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c +2 -2
@@ -143,12 +143,12 @@ static bool dcn401_smu_send_msg_with_param_delay(struct clk_mgr_internal *clk_mgreturn false; } -bool dcn401_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,unsigned int *version) +bool dcn401_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,int *version) {smu_print ("SMU Get SMU version\n" );if (dcn401_smu_send_msg_with_param (clk_mgr, - DALSMC_MSG_GetSmuVersion,0 , version)) { + DALSMC_MSG_GetSmuVersion,0 , (uint32_t *)version)) {smu_print ("SMU version: %d\n" , *version);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h +1 -1
@@ -10,7 +10,7 @@struct clk_mgr_internal ; -bool dcn401_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,unsigned int *version); +bool dcn401_smu_get_smu_version (struct clk_mgr_internal *clk_mgr,int *version);bool dcn401_smu_check_driver_if_version (struct clk_mgr_internal *clk_mgr);bool dcn401_smu_check_msg_header_version (struct clk_mgr_internal *clk_mgr);void dcn401_smu_send_fclk_pstate_message (struct clk_mgr_internal *clk_mgr,bool support);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +1 -1
@@ -879,7 +879,7 @@ int dcn42_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base) (void )clk_mgr_base;struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);uint32_t dispclk_wdivider; -int disp_divider; +unsigned int disp_divider;REG_GET (DENTIST_DISPCLK_CNTL ,DENTIST_DISPCLK_WDIVIDER , &dispclk_wdivider); disp_divider =dentist_get_divider_from_did (dispclk_wdivider);
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
@@ -7006,7 +7006,7 @@ bool dc_can_clear_cursor_limit(const struct dc *dc)return false; } -void dc_get_underflow_debug_data_for_otg (struct dc *dc,int primary_otg_inst, +void dc_get_underflow_debug_data_for_otg (struct dc *dc,unsigned int primary_otg_inst,struct dc_underflow_debug_data *out_data) {struct timing_generator *tg =NULL ;
@@ -7024,7 +7024,7 @@ void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst, dc->hwss.get_underflow_debug_data (dc, tg, out_data); } -void dc_get_power_feature_status (struct dc *dc,int primary_otg_inst, +void dc_get_power_feature_status (struct dc *dc,unsigned int primary_otg_inst,struct power_features *out_data) { (void )primary_otg_inst;
drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c +1 -1
@@ -282,7 +282,7 @@ unsigned int dc_dp_trace_get_link_loss_count(struct dc_link *link)struct dc_sink *dc_link_add_remote_sink (struct dc_link *link,const uint8_t *edid, -int len, +unsigned int len,struct dc_sink_init_data *init_data) {return link->dc->link_srv->add_remote_sink (link, edid, len, init_data);
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +9 -9
@@ -982,7 +982,7 @@ static struct rect calculate_mpc_slice_in_timing_active( }static void calculate_adjust_recout_for_visual_confirm (struct pipe_ctx *pipe_ctx, -int *base_offset,int *dpp_offset) +unsigned int *base_offset,unsigned int *dpp_offset) {struct dc *dc = pipe_ctx->stream->ctx->dc; *base_offset =0 ;
@@ -1004,7 +1004,7 @@ static void calculate_adjust_recout_for_visual_confirm(struct pipe_ctx *pipe_ctxstatic void reverse_adjust_recout_for_visual_confirm (struct rect *recout,struct pipe_ctx *pipe_ctx) { -int dpp_offset, base_offset; +unsigned int dpp_offset, base_offset;calculate_adjust_recout_for_visual_confirm (pipe_ctx, &base_offset, &dpp_offset);
@@ -1015,7 +1015,7 @@ static void reverse_adjust_recout_for_visual_confirm(struct rect *recout,static void adjust_recout_for_visual_confirm (struct rect *recout,struct pipe_ctx *pipe_ctx) { -int dpp_offset, base_offset; +unsigned int dpp_offset, base_offset;calculate_adjust_recout_for_visual_confirm (pipe_ctx, &base_offset, &dpp_offset);
@@ -1692,7 +1692,7 @@ bool resource_can_pipe_disable_cursor(struct pipe_ctx *pipe_ctx)struct pipe_ctx *test_pipe, *split_pipe;struct rect r1 = pipe_ctx->plane_res.scl_data.recout;int r1_right, r1_bottom; -int cur_layer = pipe_ctx->plane_state->layer_index; +unsigned int cur_layer = pipe_ctx->plane_state->layer_index;reverse_adjust_recout_for_visual_confirm (&r1, pipe_ctx); r1_right = r1.x + r1.width;
@@ -4103,9 +4103,9 @@ bool dc_resource_is_dsc_encoding_supported(const struct dc *dc)static bool planes_changed_for_existing_stream (struct dc_state *context,struct dc_stream_state *stream,const struct dc_validation_set set[], -int set_count) +unsigned int set_count) { -int i, j; +unsigned int i, j;struct dc_stream_status *stream_status =NULL ;for (i =0 ; i < context->stream_count; i++) {
@@ -4141,10 +4141,10 @@ static bool add_all_planes_for_stream(const struct dc *dc, struct dc_stream_state *stream, const struct dc_validation_set set[], - int set_count, + unsigned int set_count, struct dc_state *state) { - int i, j; + unsigned int i, j;for (i =0 ; i < set_count; i++)if (set[i].stream == stream)
@@ -4182,7 +4182,7 @@ static bool add_all_planes_for_stream(*/ enum dc_status dc_validate_with_context (struct dc *dc,const struct dc_validation_set set[], -int set_count, +unsigned int set_count,struct dc_state *context,enum dc_validate_mode validate_mode) {
drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c +2 -2
@@ -34,9 +34,9 @@ void vm_helper_mark_vmid_used(struct vm_helper *vm_helper, unsigned int pos, uin vmids.vmid_usage[1 ] =1 << pos; } -int dc_setup_system_context (struct dc *dc,struct dc_phy_addr_space_config *pa_config) +unsigned int dc_setup_system_context (struct dc *dc,struct dc_phy_addr_space_config *pa_config) { -int num_vmids =0 ; +unsigned int num_vmids =0 ;/* Call HWSS to setup HUBBUB for address config */ if (dc->hwss.init_sys_ctx) {
drivers/gpu/drm/amd/display/dc/dc.h +34 -34
157 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc_dsc.h +1 -1
@@ -92,7 +92,7 @@ uint32_t dc_dsc_stream_bandwidth_in_kbps(const struct dc_crtc_timing *timing,uint32_t dc_dsc_stream_bandwidth_overhead_in_kbps (const struct dc_crtc_timing *timing, -const int num_slices_h, +const uint32_t num_slices_h,const bool is_dp); void dc_dsc_dump_decoder_caps(const struct display_stream_compressor *dsc,
drivers/gpu/drm/amd/display/dc/dc_stream.h +2 -2
@@ -159,8 +159,8 @@ struct luminance_data {int luminance_millinits[LUMINANCE_DATA_TABLE_SIZE ];int flicker_criteria_milli_nits_GAMING;int flicker_criteria_milli_nits_STATIC; -int nominal_refresh_rate; -int dm_max_decrease_from_nominal; +unsigned int nominal_refresh_rate; +unsigned int dm_max_decrease_from_nominal; };enum dc_drr_trigger_mode {
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -1
@@ -917,7 +917,7 @@ struct dsc_dec_dpcd_caps {union dsc_slice_caps2 slice_caps2;int32_t lb_bit_depth;bool is_block_pred_supported; -int32_t edp_max_bits_per_pixel;/* Valid only in eDP */ +uint32_t edp_max_bits_per_pixel;/* Valid only in eDP */ union dsc_color_formats color_formats;union dsc_color_depth color_depth;int32_t throughput_mode_0_mps;/* In MPs */
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_link_encoder.c +1 -1
@@ -205,7 +205,7 @@ static bool update_cfg_data(static bool dcn21_link_encoder_acquire_phy (struct link_encoder *enc) {struct dcn10_link_encoder *enc10 =TO_DCN10_LINK_ENC (enc); -int value; +uint32_t value;if (enc->features.flags.bits.DP_IS_USB_C) { REG_GET(RDPCSTX_PHY_CNTL6,
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c +1 -1
@@ -450,7 +450,7 @@ static uint8_t get_frontend_source(unsigned int dcn10_get_dig_frontend (struct link_encoder *enc) {struct dcn10_link_encoder *enc10 =TO_DCN10_LINK_ENC (enc); -int32_t value; +uint32_t value;enum engine_id result;REG_GET (DIG_BE_CNTL ,DIG_FE_SOURCE_SELECT , &value);
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +2 -2
@@ -1105,7 +1105,7 @@ static enum dcn_zstate_support_state decide_zstate_support(struct dc *dc, struc }static void dcn20_adjust_freesync_v_startup ( -const struct dc_crtc_timing *dc_crtc_timing,int *vstartup_start) +const struct dc_crtc_timing *dc_crtc_timing,unsigned int *vstartup_start) {struct dc_crtc_timing patched_crtc_timing;uint32_t asic_blank_end =0 ;
@@ -1253,7 +1253,7 @@ void dcn20_calculate_dlg_params(struct dc *dc,static void swizzle_to_dml_params (enum swizzle_mode_values swizzle, -unsigned int *sw_mode) +int *sw_mode) {switch (swizzle) {case DC_SW_LINEAR :
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +14 -14
@@ -296,7 +296,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(double UrgentOutOfOrderReturn, double ReturnBW, bool GPUVMEnable, - int dpte_group_bytes[], + unsigned int dpte_group_bytes[], unsigned int MetaChunkSize, double UrgentLatency, double ExtraLatency,
@@ -307,7 +307,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(double SRExitTime, double SREnterPlusExitTime, double DCFCLKDeepSleep, - int DPPPerPlane[], + unsigned int DPPPerPlane[], bool DCCEnable[], double DPPCLK[], double SwathWidthSingleDPPY[],
@@ -346,7 +346,7 @@ static void CalculateDCFCLKDeepSleep(double BytePerPixelDETC[], double VRatio[], double SwathWidthY[], - int DPPPerPlane[], + unsigned int DPPPerPlane[], double HRatio[], double PixelClock[], double PSCL_THROUGHPUT[],
@@ -390,7 +390,7 @@ static void CalculatePixelDeliveryTimes(double VRatioPrefetchC[], unsigned int swath_width_luma_ub[], unsigned int swath_width_chroma_ub[], - int DPPPerPlane[], + unsigned int DPPPerPlane[], double HRatio[], double PixelClock[], double PSCL_THROUGHPUT[],
@@ -436,7 +436,7 @@ static void CalculateMetaAndPTETimes(unsigned int meta_row_height[], unsigned int meta_req_width[], unsigned int meta_req_height[], - int dpte_group_bytes[], + unsigned int dpte_group_bytes[], unsigned int PTERequestSizeY[], unsigned int PTERequestSizeC[], unsigned int PixelPTEReqWidthY[],
@@ -477,8 +477,8 @@ static double CalculateExtraLatency(bool GPUVMEnable, bool HostVMEnable, int NumberOfActivePlanes, - int NumberOfDPP[], - int dpte_group_bytes[], + unsigned int NumberOfDPP[], + unsigned int dpte_group_bytes[], double PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelMixedWithVMData, double PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyVMDataOnly, int HostVMMaxPageTableLevels,
@@ -5257,7 +5257,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(double UrgentOutOfOrderReturn, double ReturnBW, bool GPUVMEnable, - int dpte_group_bytes[], + unsigned int dpte_group_bytes[], unsigned int MetaChunkSize, double UrgentLatency, double ExtraLatency,
@@ -5268,7 +5268,7 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(double SRExitTime, double SREnterPlusExitTime, double DCFCLKDeepSleep, - int DPPPerPlane[], + unsigned int DPPPerPlane[], bool DCCEnable[], double DPPCLK[], double SwathWidthSingleDPPY[],
@@ -5543,7 +5543,7 @@ static void CalculateDCFCLKDeepSleep(double BytePerPixelDETC[], double VRatio[], double SwathWidthY[], - int DPPPerPlane[], + unsigned int DPPPerPlane[], double HRatio[], double PixelClock[], double PSCL_THROUGHPUT[],
@@ -5749,7 +5749,7 @@ static void CalculatePixelDeliveryTimes(double VRatioPrefetchC[], unsigned int swath_width_luma_ub[], unsigned int swath_width_chroma_ub[], - int DPPPerPlane[], + unsigned int DPPPerPlane[], double HRatio[], double PixelClock[], double PSCL_THROUGHPUT[],
@@ -5870,7 +5870,7 @@ static void CalculateMetaAndPTETimes(unsigned int meta_row_height[], unsigned int meta_req_width[], unsigned int meta_req_height[], - int dpte_group_bytes[], + unsigned int dpte_group_bytes[], unsigned int PTERequestSizeY[], unsigned int PTERequestSizeC[], unsigned int PixelPTEReqWidthY[],
@@ -6126,8 +6126,8 @@ static double CalculateExtraLatency(bool GPUVMEnable, bool HostVMEnable, int NumberOfActivePlanes, - int NumberOfDPP[], - int dpte_group_bytes[], + unsigned int NumberOfDPP[], + unsigned int dpte_group_bytes[], double PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelMixedWithVMData, double PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyVMDataOnly, int HostVMMaxPageTableLevels,
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +171 -171
564 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c +204 -204
706 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +200 -200
686 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +1 -1
@@ -1400,7 +1400,7 @@ static void try_odm_power_optimization_and_revalidate( display_e2e_pipe_params_st *pipes, int *split, bool *merge, - unsigned int *vlevel, + int *vlevel, int pipe_cnt) {int i;
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +4 -4
@@ -2954,7 +2954,7 @@ void dml32_UseMinimumDCFCLK(unsigned int VTotal[], unsigned int VActive[], unsigned int DynamicMetadataTransmittedBytes[], - unsigned int DynamicMetadataLinesBeforeActiveRequired[], + int DynamicMetadataLinesBeforeActiveRequired[], bool Interlace[], double RequiredDPPCLKPerSurface[][2][DC__NUM_DPP__MAX], double RequiredDISPCLK[][2],
@@ -5631,7 +5631,7 @@ void dml32_CalculateStutterEfficiency(bool Interlace[], double MinTTUVBlank[], unsigned int DPPPerSurface[], - unsigned int DETBufferSizeY[], + unsigned int DETBufferSizeY[], unsigned int BytePerPixelY[], double BytePerPixelDETY[], double SwathWidthY[],
@@ -5663,10 +5663,10 @@ void dml32_CalculateStutterEfficiency(/* Output */ double *StutterEfficiencyNotIncludingVBlank, double *StutterEfficiency, - unsigned int *NumberOfStutterBurstsPerFrame, + int *NumberOfStutterBurstsPerFrame, double *Z8StutterEfficiencyNotIncludingVBlank, double *Z8StutterEfficiency, - unsigned int *Z8NumberOfStutterBurstsPerFrame, + int *Z8NumberOfStutterBurstsPerFrame, double *StutterPeriod, bool *DCHUBBUB_ARB_CSTATE_MAX_CAP_MODE) {
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.h +4 -4
@@ -614,7 +614,7 @@ void dml32_UseMinimumDCFCLK(unsigned int VTotal[], unsigned int VActive[], unsigned int DynamicMetadataTransmittedBytes[], - unsigned int DynamicMetadataLinesBeforeActiveRequired[], + int DynamicMetadataLinesBeforeActiveRequired[], bool Interlace[], double RequiredDPPCLKPerSurface[][2][DC__NUM_DPP__MAX], double RequiredDISPCLK[][2],
@@ -1013,7 +1013,7 @@ void dml32_CalculateStutterEfficiency(bool ProgressiveToInterlaceUnitInOPP, bool Interlace[], double MinTTUVBlank[], - unsigned int DPPPerSurface[], + unsigned int DPPPerSurface[], unsigned int DETBufferSizeY[], unsigned int BytePerPixelY[], double BytePerPixelDETY[],
@@ -1046,10 +1046,10 @@ void dml32_CalculateStutterEfficiency(/* Output */ double *StutterEfficiencyNotIncludingVBlank, double *StutterEfficiency, - unsigned int *NumberOfStutterBurstsPerFrame, + int *NumberOfStutterBurstsPerFrame, double *Z8StutterEfficiencyNotIncludingVBlank, double *Z8StutterEfficiency, - unsigned int *Z8NumberOfStutterBurstsPerFrame, + int *Z8NumberOfStutterBurstsPerFrame, double *StutterPeriod, bool *DCHUBBUB_ARB_CSTATE_MAX_CAP_MODE);
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +6 -6
@@ -472,7 +472,7 @@ struct vba_vars_st {unsigned int VTotal[DC__NUM_DPP__MAX ];unsigned int VTotal_Max[DC__NUM_DPP__MAX ];unsigned int VTotal_Min[DC__NUM_DPP__MAX ]; -int DPPPerPlane[DC__NUM_DPP__MAX ]; +unsigned int DPPPerPlane[DC__NUM_DPP__MAX ];double PixelClock[DC__NUM_DPP__MAX ];double PixelClockBackEnd[DC__NUM_DPP__MAX ];bool DCCEnable[DC__NUM_DPP__MAX ];
@@ -739,7 +739,7 @@ struct vba_vars_st {/* ms locals */ double IdealSDPPortBandwidthPerState[DC__VOLTAGE_STATES ][2 ];unsigned int NoOfDPP[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ]; -int NoOfDPPThisState[DC__NUM_DPP__MAX ]; +unsigned int NoOfDPPThisState[DC__NUM_DPP__MAX ];enum odm_combine_mode ODMCombineEnablePerState[DC__VOLTAGE_STATES ][DC__NUM_DPP__MAX ];double SwathWidthYThisState[DC__NUM_DPP__MAX ];unsigned int SwathHeightCPerState[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ];
@@ -900,7 +900,7 @@ struct vba_vars_st {int PTEBufferSizeInRequestsForChroma;// Missing from VBA -int dpte_group_bytes_chroma; +unsigned int dpte_group_bytes_chroma;unsigned int vm_group_bytes_chroma;double dst_x_after_scaler;double dst_y_after_scaler;
@@ -1100,8 +1100,8 @@ struct vba_vars_st {unsigned int DETBufferSizeCThisState[DC__NUM_DPP__MAX ];bool NoUrgentLatencyHiding[DC__NUM_DPP__MAX ];bool NoUrgentLatencyHidingPre[DC__NUM_DPP__MAX ]; -int swath_width_luma_ub_this_state[DC__NUM_DPP__MAX ]; -int swath_width_chroma_ub_this_state[DC__NUM_DPP__MAX ]; +unsigned int swath_width_luma_ub_this_state[DC__NUM_DPP__MAX ]; +unsigned int swath_width_chroma_ub_this_state[DC__NUM_DPP__MAX ];double UrgLatency[DC__VOLTAGE_STATES ];double VActiveCursorBandwidth[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ];double VActivePixelBandwidth[DC__VOLTAGE_STATES ][2 ][DC__NUM_DPP__MAX ];
@@ -1172,7 +1172,7 @@ struct vba_vars_st {int ConfigReturnBufferSizeInKByte;enum unbounded_requesting_policy UseUnboundedRequesting;int CompressedBufferSegmentSizeInkByte; -int CompressedBufferSizeInkByte; +unsigned int CompressedBufferSizeInkByte;int MetaFIFOSizeInKEntries;int ZeroSizeBufferEntries;int COMPBUF_RESERVED_SPACE_64B ;
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c +1 -1
@@ -307,7 +307,7 @@ void dpp1_cm_set_output_csc_default( {struct dcn10_dpp *dpp =TO_DCN10_DPP (dpp_base);const uint16_t *regval =NULL ; -int arr_size; +uint32_t arr_size; regval =find_color_matrix (colorspace, &arr_size);if (regval ==NULL ) {
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +1 -1
@@ -548,7 +548,7 @@ bool dpp3_get_optimal_number_of_taps(static void dpp3_deferred_update (struct dpp *dpp_base) { -int bypass_state; +uint32_t bypass_state;struct dcn3_dpp *dpp =TO_DCN30_DPP (dpp_base);if (dpp_base->deferred_reg_writes.bits.disable_dscl) {
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c +2 -2
@@ -317,7 +317,7 @@ void dpp3_set_hdr_multiplier(static void program_gamut_remap (struct dcn3_dpp *dpp,const uint16_t *regval, -int select) +unsigned int select) {uint16_t selection =0 ;struct color_matrices_reg gam_regs;
@@ -379,7 +379,7 @@ void dpp3_cm_set_gamut_remap( {struct dcn3_dpp *dpp =TO_DCN30_DPP (dpp_base);int i =0 ; -int gamut_mode; +uint32_t gamut_mode;if (adjust->gamut_adjust_type !=GRAPHICS_GAMUT_ADJUST_TYPE_SW )/* Bypass if type is bypass or hw */
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +1 -1
@@ -1336,7 +1336,7 @@ uint32_t dc_dsc_stream_bandwidth_in_kbps(const struct dc_crtc_timing *timing,uint32_t dc_dsc_stream_bandwidth_overhead_in_kbps (const struct dc_crtc_timing *timing, -const int num_slices_h, +const uint32_t num_slices_h,const bool is_dp) {struct fixed31_32 max_dsc_overhead;
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c +4 -4
@@ -228,9 +228,9 @@ bool dsc2_get_packed_pps(struct display_stream_compressor *dsc, const struct dscvoid dsc2_enable (struct display_stream_compressor *dsc,int opp_pipe) {struct dcn20_dsc *dsc20 =TO_DCN20_DSC (dsc); -int dsc_clock_en; -int dsc_fw_config; -int enabled_opp_pipe; +uint32_t dsc_clock_en; +uint32_t dsc_fw_config; +uint32_t enabled_opp_pipe;DC_LOG_DSC ("enable DSC %d at opp pipe %d" , dsc->inst, opp_pipe);
@@ -253,7 +253,7 @@ void dsc2_enable(struct display_stream_compressor *dsc, int opp_pipe)void dsc2_disable (struct display_stream_compressor *dsc) {struct dcn20_dsc *dsc20 =TO_DCN20_DSC (dsc); -int dsc_clock_en; +uint32_t dsc_clock_en;DC_LOG_DSC ("disable DSC %d" , dsc->inst);
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c +4 -4
@@ -79,9 +79,9 @@ void dsc35_construct(struct dcn20_dsc *dsc,static void dsc35_enable (struct display_stream_compressor *dsc,int opp_pipe) {struct dcn20_dsc *dsc20 =TO_DCN20_DSC (dsc); -int dsc_clock_en; -int dsc_fw_config; -int enabled_opp_pipe; +uint32_t dsc_clock_en; +uint32_t dsc_fw_config; +uint32_t enabled_opp_pipe;DC_LOG_DSC ("enable DSC %d at opp pipe %d" , dsc->inst, opp_pipe);
@@ -96,7 +96,7 @@ static void dsc35_enable(struct display_stream_compressor *dsc, int opp_pipe)REG_GET (DSC_TOP_CONTROL ,DSC_CLOCK_EN , &dsc_clock_en);REG_GET_2 (DSCRM_DSC_FORWARD_CONFIG ,DSCRM_DSC_FORWARD_EN , &dsc_fw_config,DSCRM_DSC_OPP_PIPE_SOURCE , &enabled_opp_pipe);if ((dsc_clock_en || dsc_fw_config) && enabled_opp_pipe != opp_pipe) { -DC_LOG_DSC ("ERROR: DSC %d at opp pipe %d already enabled!" , dsc->inst, enabled_opp_pipe); +DC_LOG_DSC ("ERROR: DSC %d at opp pipe %u already enabled!" , dsc->inst, enabled_opp_pipe);ASSERT (0 ); }
drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +5 -5
@@ -145,16 +145,16 @@ void dsc401_set_config(struct display_stream_compressor *dsc, const struct dsc_cvoid dsc401_enable (struct display_stream_compressor *dsc,int opp_pipe) {struct dcn401_dsc *dsc401 =TO_DCN401_DSC (dsc); -int dsc_clock_en; -int dsc_fw_config; -int enabled_opp_pipe; +uint32_t dsc_clock_en; +uint32_t dsc_fw_config; +uint32_t enabled_opp_pipe;DC_LOG_DSC ("enable DSC %d at opp pipe %d" , dsc->inst, opp_pipe);REG_GET (DSC_TOP_CONTROL ,DSC_CLOCK_EN , &dsc_clock_en);REG_GET_2 (DSCRM_DSC_FORWARD_CONFIG ,DSCRM_DSC_FORWARD_EN , &dsc_fw_config,DSCRM_DSC_OPP_PIPE_SOURCE , &enabled_opp_pipe);if ((dsc_clock_en || dsc_fw_config) && enabled_opp_pipe != opp_pipe) { -DC_LOG_DSC ("ERROR: DSC %d at opp pipe %d already enabled!" , dsc->inst, enabled_opp_pipe); +DC_LOG_DSC ("ERROR: DSC %d at opp pipe %u already enabled!" , dsc->inst, enabled_opp_pipe);ASSERT (0 ); }
@@ -170,7 +170,7 @@ void dsc401_enable(struct display_stream_compressor *dsc, int opp_pipe)void dsc401_disable (struct display_stream_compressor *dsc) {struct dcn401_dsc *dsc401 =TO_DCN401_DSC (dsc); -int dsc_clock_en; +uint32_t dsc_clock_en;DC_LOG_DSC ("disable DSC %d" , dsc->inst);
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +2 -2
@@ -63,10 +63,10 @@ void hubp401_enable_3dlut_fl(struct hubp *hubp, bool enable)REG_UPDATE (HUBP_3DLUT_CONTROL ,HUBP_3DLUT_ENABLE , enable ?1 :0 ); } -int hubp401_get_3dlut_fl_done (struct hubp *hubp) +uint32_t hubp401_get_3dlut_fl_done (struct hubp *hubp) {struct dcn20_hubp *hubp2 =TO_DCN20_HUBP (hubp); -int ret; +uint32_t ret;REG_GET (HUBP_3DLUT_CONTROL ,HUBP_3DLUT_DONE , &ret);return ret;
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h +1 -1
@@ -324,7 +324,7 @@ bool hubp401_construct(void hubp401_init (struct hubp *hubp); -int hubp401_get_3dlut_fl_done (struct hubp *hubp); +uint32_t hubp401_get_3dlut_fl_done (struct hubp *hubp);void hubp401_set_unbounded_requesting (struct hubp *hubp,bool enable);
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +4 -2
@@ -2485,7 +2485,8 @@ void dcn10_enable_vblanks_synchronization( (void )group_index;struct output_pixel_processor *opp;struct timing_generator *tg; -int i, width =0 , height =0 , master; +int i, master; +uint32_t width =0 , height =0 ;DC_LOGGER_INIT (dc->ctx);
@@ -2551,7 +2552,8 @@ void dcn10_enable_timing_synchronization( (void )group_index;struct output_pixel_processor *opp;struct timing_generator *tg; -int i, width =0 , height =0 ; +int i; +uint32_t width =0 , height =0 ;DC_LOGGER_INIT (dc->ctx);
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +1 -1
@@ -147,7 +147,7 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)// Given any pipe_ctx, return the total ODM combine factor, and optionally return // the OPPids which are used -static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,unsigned int *opp_instances) +static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,int *opp_instances) {unsigned int opp_count =1 ;struct pipe_ctx *odm_pipe;
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +1 -1
@@ -1119,7 +1119,7 @@ void dcn32_update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)* Given any pipe_ctx, return the total ODM combine factor, and optionally return * the OPPids which are used * */ -static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,unsigned int *opp_instances) +static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,int *opp_instances) {unsigned int opp_count =1 ;struct pipe_ctx *odm_pipe;
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -1
@@ -403,7 +403,7 @@ static void update_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable)// Given any pipe_ctx, return the total ODM combine factor, and optionally return // the OPPids which are used -static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,unsigned int *opp_instances) +static unsigned int get_odm_config (struct pipe_ctx *pipe_ctx,int *opp_instances) {unsigned int opp_count =1 ;struct pipe_ctx *odm_pipe;
drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h +1 -1
@@ -126,7 +126,7 @@ static inline struct bw_fixed bw_div(const struct bw_fixed arg1, const struct bwstatic inline struct bw_fixed bw_mod (const struct bw_fixed arg1,const struct bw_fixed arg2) {struct bw_fixed res; -div64_u64_rem (arg1.value, arg2.value, (uint64_t *)&res.value); +div64_u64_rem ((uint64_t )arg1.value, (uint64_t )arg2.value, (uint64_t *)&res.value);return res; }
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +1 -1
@@ -305,7 +305,7 @@ struct hubp_funcs {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); -int (*hubp_get_3dlut_fl_done)(struct hubp *hubp); +uint32_t (*hubp_get_3dlut_fl_done)(struct hubp *hubp);void (*hubp_program_3dlut_fl_config)(struct hubp *hubp,struct hubp_fl_3dlut_config *cfg);void (*hubp_clear_tiling)(struct hubp *hubp);uint32_t (*hubp_get_current_read_line)(struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +2 -2
@@ -356,8 +356,8 @@ struct opp_funcs {void (*opp_program_dpg_dimensions)(struct output_pixel_processor *opp, -int width, -int height); +uint32_t width, +uint32_t height);bool (*dpg_is_blanked)(struct output_pixel_processor *opp);
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h +4 -4
@@ -32,9 +32,9 @@ struct dc_bios;/* Contains CRTC vertical/horizontal pixel counters */ struct crtc_position { -int32_t vertical_count; -int32_t horizontal_count; -int32_t nominal_vcount; +uint32_t vertical_count; +uint32_t horizontal_count; +uint32_t nominal_vcount; };struct dcp_gsl_params {
@@ -321,7 +321,7 @@ struct timing_generator {const struct timing_generator_funcs *funcs;struct dc_bios *bp;struct dc_context *ctx; -int inst; +uint32_t inst; };struct dc_crtc_timing ;
drivers/gpu/drm/amd/display/dc/inc/link_service.h +1 -1
@@ -110,7 +110,7 @@ struct link_service {struct dc_sink *(*add_remote_sink)(struct dc_link *link,const uint8_t *edid, -int len, +unsigned int len,struct dc_sink_init_data *init_data);void (*remove_remote_sink)(struct dc_link *link,struct dc_sink *sink);bool (*get_hpd_state)(struct dc_link *link);
drivers/gpu/drm/amd/display/dc/inc/reg_helper.h +36 -36
99 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -1
@@ -1562,7 +1562,7 @@ static bool link_add_remote_sink_helper(struct dc_link *dc_link, struct dc_sinkstruct dc_sink *link_add_remote_sink (struct dc_link *link,const uint8_t *edid, -int len, +unsigned int len,struct dc_sink_init_data *init_data) {struct dc_sink *dc_sink;
drivers/gpu/drm/amd/display/dc/link/link_detection.h +1 -1
@@ -32,7 +32,7 @@ bool link_detect_connection_type(struct dc_link *link,struct dc_sink *link_add_remote_sink (struct dc_link *link,const uint8_t *edid, -int len, +unsigned int len,struct dc_sink_init_data *init_data);void link_remove_remote_sink (struct dc_link *link,struct dc_sink *sink);bool link_reset_cur_dp_mst_topology (struct dc_link *link);
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +4 -4
@@ -47,9 +47,9 @@#define DP_SINK_PR_ENABLE_AND_CONFIGURATION 0x37B/* Travis */ -static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2 [] ="sivarT" ; +static const char DP_VGA_LVDS_CONVERTER_ID_2 [] ="sivarT" ;/* Nutmeg */ -static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3 [] ="dnomlA" ; +static const char DP_VGA_LVDS_CONVERTER_ID_3 [] ="dnomlA" ;void dp_set_panel_mode (struct dc_link *link,enum dp_panel_mode panel_mode) {
@@ -1210,9 +1210,9 @@ int edp_get_backlight_level(const struct dc_link *link) fw_set_brightness = dmcu->funcs->is_dmcu_initialized (dmcu);if (!fw_set_brightness && panel_cntl->funcs->get_current_backlight) -return panel_cntl->funcs->get_current_backlight (panel_cntl); +return (int )panel_cntl->funcs->get_current_backlight (panel_cntl);else if (abm !=NULL && abm->funcs->get_current_backlight !=NULL ) -return (int ) abm->funcs->get_current_backlight (abm); +return (int )abm->funcs->get_current_backlight (abm);else return DC_ERROR_UNEXPECTED ; }
drivers/gpu/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c +1 -1
@@ -375,7 +375,7 @@ void mpc1_mpc_init(struct mpc *mpc)void mpc1_mpc_init_single_inst (struct mpc *mpc,unsigned int mpcc_id) {struct dcn10_mpc *mpc10 =TO_DCN10_MPC (mpc); -int opp_id; +uint32_t opp_id;REG_GET (MPCC_OPP_ID [mpcc_id],MPCC_OPP_ID , &opp_id);
drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c +3 -3
@@ -1067,7 +1067,7 @@ static void program_gamut_remap(struct dcn30_mpc *mpc30, int mpcc_id, const uint16_t *regval, - int select) + uint32_t select) { uint16_t selection = 0;struct color_matrices_reg gam_regs;
@@ -1129,7 +1129,7 @@ void mpc3_set_gamut_remap( {struct dcn30_mpc *mpc30 =TO_DCN30_MPC (mpc);int i =0 ; -int gamut_mode; +uint32_t gamut_mode;if (adjust->gamut_adjust_type !=GRAPHICS_GAMUT_ADJUST_TYPE_SW )program_gamut_remap (mpc30, mpcc_id,NULL ,GAMUT_REMAP_BYPASS );
@@ -1201,7 +1201,7 @@ void mpc3_get_gamut_remap(struct mpc *mpc, {struct dcn30_mpc *mpc30 =TO_DCN30_MPC (mpc);uint16_t arr_reg_val[12 ] = {0 }; -int select; +uint32_t select;read_gamut_remap (mpc30, mpcc_id, arr_reg_val, &select);
drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c +1 -1
@@ -293,7 +293,7 @@ void opp2_set_disp_pattern_generator( void opp2_program_dpg_dimensions( struct output_pixel_processor *opp,
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/include/fixed31_32.h +3 -3
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.c +1 -1
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.
PATCH 8/20 drm/amd/display: only call pmfw if smu present flags true
In reply to James LinFrom: Charlene Liu <[email protected]>
[Why & How]
for fault safe case: only call pmfw if smu present flags true and default to 2 channle for bios intergration info table error.
--- .../gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +5 -4
@@ -1078,10 +1078,11 @@ void dcn42_clk_mgr_construct( dcn42_bw_params.vram_type = ctx->dc_bios->integrated_info->memory_type; dcn42_bw_params.dram_channel_width_bytes = ctx->dc_bios->integrated_info->memory_type ==0x22 ?8 :4 ; - dcn42_bw_params.num_channels = ctx->dc_bios->integrated_info->ma_channel_number ? ctx->dc_bios->integrated_info->ma_channel_number :1 ; - clk_mgr->base.base.dprefclk_khz =dcn42_smu_get_dprefclk (&clk_mgr->base); - clk_mgr->base.base.clks.ref_dtbclk_khz =dcn42_smu_get_dtbclk (&clk_mgr->base); - + dcn42_bw_params.num_channels = ctx->dc_bios->integrated_info->ma_channel_number ? ctx->dc_bios->integrated_info->ma_channel_number :2 ; +if (clk_mgr->base.smu_present) { + clk_mgr->base.base.clks.ref_dtbclk_khz =dcn42_smu_get_dtbclk (&clk_mgr->base); + clk_mgr->base.base.dprefclk_khz =dcn42_smu_get_dprefclk (&clk_mgr->base); + } clk_mgr->base.base.bw_params = &dcn42_bw_params;if (clk_mgr->base.smu_present)
Signature · 1 line
2.43.0
PATCH 9/20 drm/amd/display: Refactor dc_link_aux_transfer_raw
In reply to James LinFrom: Matthew Stewart <[email protected]>
[Why & How]
The logic for choosing between the dce_aux_transfer function variants is moved into dce_aux.c rather than link_ddc.c.
The "dce_aux_transfer_with_retries" function now uses dce_aux_transfer_raw in its implementation as the logic is equivalent.
--- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 20 ++++++++++++------- drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 4 ++++ .../amd/display/dc/link/protocols/link_ddc.c | 7 +------ 3 files changed, 18 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c +13 -7
@@ -559,6 +559,18 @@ static enum i2caux_transaction_action i2caux_action_from_payload(struct aux_paylint dce_aux_transfer_raw (struct ddc_service *ddc,struct aux_payload *payload,enum aux_return_code_type *operation_result) +{ +if (ddc->ctx->dc->debug.enable_dmub_aux_for_legacy_ddc || + !ddc->ddc_pin) { +return dce_aux_transfer_dmub_raw (ddc, payload, operation_result); + }else { +return dce_aux_transfer_raw_with_ddc_pin (ddc, payload, operation_result); + } +} + +int dce_aux_transfer_raw_with_ddc_pin (struct ddc_service *ddc, +struct aux_payload *payload, +enum aux_return_code_type *operation_result) {struct ddc *ddc_pin = ddc->ddc_pin;struct dce_aux *aux_engine;
@@ -740,13 +752,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,if (payload->write)dce_aux_log_payload (" write" , payload->data, payload->length,16 ); -/* Check whether aux to be processed via dmub or dcn directly */ -if (ddc->ctx->dc->debug.enable_dmub_aux_for_legacy_ddc - || ddc->ddc_pin ==NULL ) { - ret =dce_aux_transfer_dmub_raw (ddc, payload, &operation_result); - }else { - ret =dce_aux_transfer_raw (ddc, payload, &operation_result); - } + ret =dce_aux_transfer_raw (ddc, payload, &operation_result); DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION, LOG_FLAG_I2cAux_DceAux,
drivers/gpu/drm/amd/display/dc/dce/dce_aux.h +4 -0
@@ -304,6 +304,10 @@ int dce_aux_transfer_raw(struct ddc_service *ddc,struct aux_payload *cmd, enum aux_return_code_type *operation_result); +int dce_aux_transfer_raw_with_ddc_pin (struct ddc_service *ddc, +struct aux_payload *cmd, +enum aux_return_code_type *operation_result); +int dce_aux_transfer_dmub_raw (struct ddc_service *ddc,struct aux_payload *payload,enum aux_return_code_type *operation_result);
drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c +1 -6
@@ -401,12 +401,7 @@ int link_aux_transfer_raw(struct ddc_service *ddc,struct aux_payload *payload, enum aux_return_code_type *operation_result) { -if (ddc->ctx->dc->debug.enable_dmub_aux_for_legacy_ddc || - !ddc->ddc_pin) { -return dce_aux_transfer_dmub_raw (ddc, payload, operation_result); - }else { -return dce_aux_transfer_raw (ddc, payload, operation_result); - } + return dce_aux_transfer_raw(ddc, payload, operation_result); }uint32_t link_get_fixed_vs_pe_retimer_write_address (struct dc_link *link)
Signature · 1 line
2.43.0
PATCH 10/20 drm/amd/display: always-true lower-bound assert
In reply to James LinFrom: Gaghik Khachatrian <[email protected]>
[Why]
A recent type change made the lower-bound part of the OTG instance assert redundant, which can trigger static-analysis noise and distract from actionable diagnostics.
[How]
Kept the meaningful upper-bound range validation required for safe narrowing to uint8_t. Removed the redundant non-negative portion of the assert so the check matches current type semantics. Revalidated with the latest debug build log: no warnings and no build-failure markers.
--- drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c +1 -1
@@ -255,7 +255,7 @@ static void populate_pipe_ctx_dlg_params_from_dml(struct pipe_ctx *pipe_ctx, str pipe_ctx->pipe_dlg_param.vupdate_width =dml_get_vupdate_width (mode_lib, pipe_idx); pipe_ctx->pipe_dlg_param.vready_offset =dml_get_vready_offset (mode_lib, pipe_idx); -ASSERT (pipe_ctx->stream_res.tg->inst >=0 && pipe_ctx->stream_res.tg->inst <=0xFF ); +ASSERT (pipe_ctx->stream_res.tg->inst <=0xFF ); pipe_ctx->pipe_dlg_param.otg_inst = (unsigned char )pipe_ctx->stream_res.tg->inst; pipe_ctx->pipe_dlg_param.hactive = hactive;
Signature · 1 line
2.43.0
PATCH 11/20 drm/amd/display: Separate ABM functions into dedicated power_abm.c file
In reply to James LinFrom: Lohita Mudimela <[email protected]>
[Why]
Improves code organization by separating Adaptive Backlight Modulation functionality from general power management. This modular approach enhances maintainability and makes the codebase easier to navigate.
[How]
Create new power_abm.c file containing all ABM-related functions moved from power.c. Remove static qualifier from shared functions to enable cross-file access:
- initialize_backlight_caps: Initialize backlight capabilities
- validate_ext_backlight_caps: Validate external backlight capabilities
- backlight_millipercent_to_pwm: Convert brightness percent to PWM
- backlight_millipercent_to_millinit: Convert brightness percent to nits
- fill_backlight_level_params: Populate backlight level parametersAdd function declarations to mod_power.h header. Update CMakeLists.txt to include power_abm.c in build. Maintain forward declaration of struct core_power for type compatibility. Rename struct core_power field from 'public' to 'mod_public'.
Move internal structures (backlight_state, backlight_properties, dmcu_varibright_cached_properties, core_power) to power_helpers.h to
ensure consistent memory layouts across compilation units.
--- .../drm/amd/display/modules/inc/mod_power.h | 25 + .../drm/amd/display/modules/power/Makefile | 2 +- .../gpu/drm/amd/display/modules/power/power.c | 1323 +--------- .../drm/amd/display/modules/power/power_abm.c | 2160 +++++++++++++++++ .../amd/display/modules/power/power_helpers.c | 815 ------- .../amd/display/modules/power/power_helpers.h | 1 + 6 files changed, 2251 insertions(+), 2075 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/power/power_abm.c
drivers/gpu/drm/amd/display/modules/inc/mod_power.h +25 -0
@@ -5,6 +5,8 @@#include "dm_services.h" +struct core_power ; +struct mod_power_init_params {bool disable_fractional_pwm;
@@ -412,4 +414,27 @@ bool mod_power_backlight_nits_to_percent(struct mod_power *mod_power,unsigned int backlight_millinit, unsigned int *backlight_millipercent); +void initialize_backlight_caps (struct core_power *core_power,unsigned int inst); + +unsigned int backlight_millipercent_to_pwm ( +struct core_power *core_power,unsigned int millipercent,unsigned int inst); + +unsigned int backlight_millipercent_to_millinit ( +struct core_power *core_power,unsigned int millipercent,unsigned int inst); + +void fill_backlight_level_params (struct core_power *core_power, +struct set_backlight_level_params *backlight_level_params, +int panel_inst,uint8_t aux_inst,unsigned int backlight_pwm, +enum backlight_control_type backlight_control_type, +unsigned int backlight_millinit,unsigned int transition_time_millisec, +bool is_hdr); + +bool mod_power_hw_init_backlight (struct mod_power *mod_power); + +void mod_power_update_backlight_on_mode_change ( +struct core_power *core_power, +struct dc_link *link, +unsigned int panel_inst, +uint8_t aux_inst, +bool is_hdr);#endif /* MODULES_INC_MOD_POWER_H_ */
drivers/gpu/drm/amd/display/modules/power/Makefile +1 -1
@@ -23,7 +23,7 @@ # Makefile for the 'power' sub-module of DAL. # -MOD_POWER = power_helpers.o power.o +MOD_POWER = power_helpers.o power.o power_abm.o AMD_DAL_MOD_POWER = $(addprefix $(AMDDALPATH)/modules/power/,$(MOD_POWER)) #$(info ************ DAL POWER MODULE MAKEFILE ************)
drivers/gpu/drm/amd/display/modules/power/power.c +64 -1259
1,383 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/power/power_abm.c new file +2160 -0
1,574 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +0 -815
815 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/power/power_helpers.h +1 -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.
PATCH 12/20 drm/amd/display: Add additional IPS entry/exit for PSR/Replay
In reply to James LinFrom: Ivan Lipski <[email protected]>
[Why]
Multiple paths issue DMUB commands without managing IPS state, causing dc_wake_and_execute_gpint/dmub_cmd to internally wake from IPS and reallow idle. This flips idle_allowed back to true while idle_optimizations_allowed remains false during in-flight commits, desynchronizing the two flags.
Affected paths:
- amdgpu_dm_psr_set_event() and amdgpu_dm_replay_set_event() calls from amdgpu_dm_handle_vrr_transition(), amdgpu_dm_commit_planes() and amdgpu_dm_mod_power_update_streams(), that are invoked on atomic commits.
- debugfs psr_get(), psr_read_residency(), replay_get_state(), replay_set_residency() access hardware without holding dc_lock or disabling IPS.
[How]
- Explicitly exit IPS before PSR/Replay set_event w/ hw_programming, called within atomic commit.
- Wrap debugfs PSR/Replay state getters and setters with IPS exit/entry + dc_lock.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 77 +++++++++++++++++++ 2 files changed, 81 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
@@ -9937,6 +9937,7 @@ static void amdgpu_dm_handle_vrr_transition(struct amdgpu_display_manager *dm, __func__, new_state->base.crtc->base.id); scoped_guard(mutex, &dm->dc_lock) { +dc_exit_ips_for_hw_access (dm->dc);amdgpu_dm_psr_set_event (dm, new_state->stream, true, psr_event_vrr_transition, true); amdgpu_dm_replay_set_event(dm, new_state->stream, true,
@@ -9952,6 +9953,7 @@ static void amdgpu_dm_handle_vrr_transition(struct amdgpu_display_manager *dm, __func__, new_state->base.crtc->base.id); scoped_guard(mutex, &dm->dc_lock) { +dc_exit_ips_for_hw_access (dm->dc);amdgpu_dm_psr_set_event (dm, new_state->stream, false, psr_event_vrr_transition, false); amdgpu_dm_replay_set_event(dm, new_state->stream, false,
@@ -10253,6 +10255,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,mutex_lock (&dm->dc_lock); acrtc_state->stream->link->psr_settings.psr_dirty_rects_change_timestamp_ns = timestamp_ns; +dc_exit_ips_for_hw_access (dm->dc);amdgpu_dm_psr_set_event (dm, acrtc_state->stream, true, psr_event_hw_programming, true);mutex_unlock (&dm->dc_lock);
@@ -10610,6 +10613,7 @@ static void amdgpu_dm_mod_power_update_streams(struct drm_atomic_state *state,*/ if (old_crtc_state->active) { scoped_guard(mutex, &dm->dc_lock) { +dc_exit_ips_for_hw_access (dm->dc);amdgpu_dm_psr_set_event (dm, dm_old_crtc_state->stream, true, psr_event_hw_programming, true); amdgpu_dm_replay_set_event(dm, dm_old_crtc_state->stream, true,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +77 -0
126 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 13/20 drm/amd/display: Enable IPS on DCN42
In reply to James LinFrom: Ivan Lipski <[email protected]>
[Why & How]
Fully enable IPS to achieve higher power savings.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -1867,7 +1867,7 @@ static enum dmub_ips_disable_type dm_get_default_ips_mode( ret =DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF ;break ;case IP_VERSION (4 ,2 ,0 ): - ret =DMUB_IPS_DISABLE_ALL ; + ret =DMUB_IPS_ENABLE ;break ;default :/* ASICs older than DCN35 do not have IPSs */
Signature · 1 line
2.43.0
PATCH 14/20 drm/amd/display: Fix enum decl warnings
In reply to James LinFrom: Gaghik Khachatrian <[email protected]>
[Why]
warnings were triggered by enum forward declarations that are not valid in C++ without an explicit underlying type.
[How]
- Replace problematic enum forward declarations with C++-safe forms where applicable.
- Use plain integer types for interface-only declarations that do not require strong enum typing.
- Update dependent winterface signatures and related type usage consistently.
- Add required include and type-visibility fixes to avoid follow-on parse and type-resolution issues.
--- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 1 + .../amd/display/modules/inc/mod_color_types.h | 47 +++++++++++++++++++ .../amd/display/modules/inc/mod_info_packet.h | 9 +--- .../modules/inc/mod_info_packet_types.h | 37 +++++++++++++++ 4 files changed, 86 insertions(+), 8 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_color_types.h create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_info_packet_types.h
drivers/gpu/drm/amd/display/dc/dm_helpers.h +1 -0
@@ -30,6 +30,7 @@#ifndef __DM_HELPERS__#define __DM_HELPERS__ +#include "modules/inc/mod_info_packet_types.h" #include "dc_types.h" #include "dc.h"
drivers/gpu/drm/amd/display/modules/inc/mod_color_types.h new file +47 -0
48 lines not on this page · raw message
drivers/gpu/drm/amd/display/modules/inc/mod_info_packet.h +1 -8
@@ -27,6 +27,7 @@#define MOD_INFO_PACKET_H_ #include "dm_services.h" +#include "mod_info_packet_types.h" #include "mod_shared.h" //Forward Declarations struct dc_stream_state ;
@@ -47,14 +48,6 @@ void mod_build_vsc_infopacket(const struct dc_stream_state *stream,void mod_build_hf_vsif_infopacket (const struct dc_stream_state *stream,struct dc_info_packet *info_packet); -enum adaptive_sync_type { -ADAPTIVE_SYNC_TYPE_NONE =0 , -ADAPTIVE_SYNC_TYPE_DP =1 , -FREESYNC_TYPE_PCON_IN_WHITELIST =2 , -FREESYNC_TYPE_PCON_NOT_IN_WHITELIST =3 , -ADAPTIVE_SYNC_TYPE_EDP =4 , -}; -enum adaptive_sync_sdp_version {AS_SDP_VER_0 =0x0 ,AS_SDP_VER_1 =0x1 ,
drivers/gpu/drm/amd/display/modules/inc/mod_info_packet_types.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright 2018 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef MOD_INFO_PACKET_TYPES_H_ +#define MOD_INFO_PACKET_TYPES_H_ + +enum adaptive_sync_type { +ADAPTIVE_SYNC_TYPE_NONE =0 , +ADAPTIVE_SYNC_TYPE_DP =1 , +FREESYNC_TYPE_PCON_IN_WHITELIST =2 , +FREESYNC_TYPE_PCON_NOT_IN_WHITELIST =3 , +ADAPTIVE_SYNC_TYPE_EDP =4 , +}; + +#endif /* MOD_INFO_PACKET_TYPES_H_ */
Signature · 1 line
2.43.0
PATCH 15/20 drm/amd/display: enable ODM 2:1 on single eDP based on pixel clock
In reply to James LinFrom: Charlene Liu <[email protected]>
[Why & How]
this is to force ODM 2:1 on single eDP to lower dispclk/dppclk.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../dc/resource/dcn42/dcn42_resource.c | 4 ++++ .../dc/resource/dcn42/dcn42_resource_fpu.c | 22 +++++++++++++++++++ .../dc/resource/dcn42/dcn42_resource_fpu.h | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -1219,6 +1219,7 @@ struct dc_debug_options {unsigned int force_vmin_threshold;bool enable_otg_frame_sync_pwa;unsigned int min_deep_sleep_dcfclk_khz; +unsigned int force_odm2to1_for_edp_pixclk_mhz; };
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +4 -0
@@ -765,6 +765,7 @@ static const struct dc_debug_options debug_defaults_drv = { .min_deep_sleep_dcfclk_khz = 8000, .replay_skip_crtc_disabled = true, .psr_skip_crtc_disable = true, + .force_odm2to1_for_edp_pixclk_mhz = 550, // Force ODM 2to1 for eDP when pixel clock is above 550MHz };static const struct dc_check_config config_defaults = {
@@ -1721,9 +1722,12 @@ enum dc_status dcn42_validate_bandwidth(struct dc *dc,DC_FP_START (); +dcn42_decide_odm_override (dc, context); + out =dml2_validate (dc, context, context->bw_ctx.dml2, validate_mode); +if (validate_mode ==DC_VALIDATE_MODE_AND_PROGRAMMING ) {/*not required for mode enumeration*/ dcn42_decide_zstate_support (dc, context);
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource_fpu.c +22 -0
@@ -45,3 +45,25 @@ void dcn42_decide_zstate_support(struct dc *dc, struct dc_state *context) context->bw_ctx.bw.dcn.clk.zstate_support = support; } + +bool dcn42_decide_odm_override (struct dc *dc,struct dc_state *context) +{ +bool odm_override = false; + +DC_LOGGER_INIT (dc->ctx->logger); +if (dc->ctx->dce_environment ==DCE_ENV_DIAG ) +return false; + +if (context->stream_count ==1 && context->streams[0 ]->signal ==SIGNAL_TYPE_EDP ) { + +if (dc->debug.force_odm2to1_for_edp_pixclk_mhz !=0 && + context->streams[0 ]->timing.pix_clk_100hz > dc->debug.force_odm2to1_for_edp_pixclk_mhz *10000 ) { + odm_override = true; + context->streams[0 ]->debug.force_odm_combine_segments =2 ; + } +DC_LOG_SMU ("odm_override: %d, eDP pixelclock: %d, force_odm2to1_for_edp_pixclk_mhz: %d\n" , + odm_override, context->streams[0 ]->timing.pix_clk_100hz /10000 , dc->debug.force_odm2to1_for_edp_pixclk_mhz); + } +return odm_override; +} +
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource_fpu.h +1 -1
@@ -29,5 +29,5 @@#include "core_types.h" void dcn42_decide_zstate_support (struct dc *dc,struct dc_state *context); - +bool dcn42_decide_odm_override (struct dc *dc,struct dc_state *context);#endif /* _DCN42_RESOURCE_FPU_H_ */
Signature · 1 line
2.43.0
PATCH 16/20 drm/amd/display: Revert "Unify fast update classification paths"
In reply to James LinFrom: Ovidiu Bunea <[email protected]>
[why & how]
This change causes regressions in ACPI and display off/on testing. Revert the change to unblock testing.
This reverts commit e8d5c0ef03bb7a3fea8495908e0c47d3ef31f1bf.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 242 ++++++++++++++++-- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 12 - drivers/gpu/drm/amd/display/dc/dc.h | 34 ++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 - .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 - 5 files changed, 252 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +221 -21
@@ -3012,8 +3012,7 @@ 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.cursor_csc_color_matrix_change)) { + update_flags->bits.coeff_reduction_change)) {elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); }return overall_type;
@@ -3103,10 +3102,8 @@ 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 ;
@@ -3171,16 +3168,6 @@ 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++) {
@@ -4550,7 +4537,7 @@ static void build_dmub_update_dirty_rect( } } -bool dc_check_address_only_update (union surface_update_flags update_flags) +static bool check_address_only_update (union surface_update_flags update_flags) {union surface_update_flags addr_only_update_flags; addr_only_update_flags.raw =0 ;
@@ -4656,7 +4643,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 && - !dc_check_address_only_update (srf_updates[i].surface->update_flags)) { + !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 ;
@@ -5624,6 +5611,127 @@ 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; + fast_update[i].cm_hist_control = srf_updates[i].cm_hist_control; + } +} + +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 ].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].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 || + fast_update[i].cm_hist_control || + 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 ].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].input_csc_color_matrix || + fast_update[i].gamma || + fast_update[i].gamut_remap_matrix || + fast_update[i].coeff_reduction_factor || + fast_update[i].cm_hist_control || + 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,
@@ -5652,6 +5760,72 @@ 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) +{ +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].func_shaper || + srf_updates[i].lut3d_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].cm2_params && + (srf_updates[i].cm2_params->component_settings.shaper_3dlut_setting != srf_updates[i].surface->mcm_shaper_3dlut_setting || + srf_updates[i].cm2_params->component_settings.lut1d_enable != srf_updates[i].surface->mcm_lut1d_enable)))) +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,
@@ -5659,6 +5833,7 @@ 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
@@ -5666,7 +5841,11 @@ 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,
@@ -5704,7 +5883,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 (update_type ==UPDATE_TYPE_FAST && !dc->check_config.enable_legacy_fast_update) { +if (is_fast_update_only && !dc->check_config.enable_legacy_fast_update) { commit_planes_for_stream_fast(dc, srf_updates, surface_count,
@@ -5740,8 +5919,13 @@ 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 ); - if (update_type == UPDATE_TYPE_FAST && +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) && !dc->check_config.enable_legacy_fast_update) commit_planes_for_stream_fast(dc, srf_updates,
@@ -7744,6 +7928,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,
@@ -7759,8 +7960,7 @@ 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 = (scratch->update_type ==UPDATE_TYPE_FAST && - !scratch->dc->check_config.enable_legacy_fast_update) + 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;
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +0 -12
@@ -1057,18 +1057,6 @@ 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 +31 -3
@@ -1467,14 +1467,11 @@ 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 {
@@ -1854,6 +1851,32 @@ 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; +struct cm_hist_control *cm_hist_control; +/* 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;
@@ -1988,6 +2011,11 @@ 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 +0 -3
@@ -123,9 +123,6 @@ 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;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +0 -2
@@ -493,12 +493,10 @@ void dcn401_populate_mcm_luts(struct dc *dc,break ;case DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM :switch (mcm_luts.lut3d_data.gpu_mem_params.size) { -#if defined(CONFIG_DRM_AMD_DC_DCN4_2 )case DC_CM2_GPU_MEM_SIZE_333333 :if (dc->caps.color.mpc.rmcm_3d_lut_caps.lut_dim_caps.dim_33) width = hubp_3dlut_fl_width_33;break ; -#endif case DC_CM2_GPU_MEM_SIZE_171717 : width = hubp_3dlut_fl_width_17;break ;
Signature · 1 line
2.43.0
PATCH 17/20 drm/amd/display: Revert "Enable HUBP/OPTC/DPP power gating"
In reply to James LinFrom: Leo Chen <[email protected]>
[why & how]
Pipe power gating is causing regressions.
Revert to unblock testing and promotion
This reverts commit 265d90d95554555d18350e623ab823f3164bd462.
--- .../gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +3 -3
@@ -694,9 +694,9 @@ static const struct dc_debug_options debug_defaults_drv = { .clock_trace = true, .disable_pplib_clock_request = false, .ignore_pg = false, - .disable_dpp_power_gate = false, - .disable_hubp_power_gate = false, - .disable_optc_power_gate = false, + .disable_dpp_power_gate = true, + .disable_hubp_power_gate = true, + .disable_optc_power_gate = true, .disable_dsc_power_gate = false, .disable_dio_power_gate = true, .disable_hpo_power_gate = true,
Signature · 1 line
2.43.0
PATCH 18/20 drm/amd/display: Wrap DCN32 phantom-plane allocation in DC_RUN_WITH_PREEMPTION_ENABLED
In reply to James LinFrom: Mikhail Gavrilov <[email protected]>
[Why]dcn32_validate_bandwidth() wraps dcn32_internal_validate_bw() with DC_FP_START()/DC_FP_END(). In x86 non-RT, DC_FP_START takes fpregs_lock(), which disables local softirqs.
The DML1 path through dcn32_enable_phantom_plane() calls kvzalloc() to allocate ~335 KiB for dc_plane_state. This triggers the vmalloc path, which calls BUG_ON(in_interrupt()) because it's invoked within the FPU-enabled (softirq disabled) region, leading to a kernel crash.
[How]
Wrap the dc_state_create_phantom_plane() call with the DC_RUN_WITH_PREEMPTION_ENABLED() macro to allow preemption during this memory allocation.
--- .../drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +7 -1
@@ -92,9 +92,14 @@#include "dml/dcn32/dcn32_fpu.h" #include "dc_state_priv.h" +#include "dc_fpu.h" #include "dml2_0/dml2_wrapper.h" +#if !defined(DC_RUN_WITH_PREEMPTION_ENABLED ) +#define DC_RUN_WITH_PREEMPTION_ENABLED (code) code +#endif +#define DC_LOGGER_INIT (logger)enum dcn32_clk_src_array_id {
@@ -1688,7 +1693,8 @@ static void dcn32_enable_phantom_plane(struct dc *dc,if (curr_pipe->top_pipe && curr_pipe->top_pipe->plane_state == curr_pipe->plane_state) phantom_plane = prev_phantom_plane;else - phantom_plane =dc_state_create_phantom_plane (dc, context, curr_pipe->plane_state); +DC_RUN_WITH_PREEMPTION_ENABLED (phantom_plane = +dc_state_create_phantom_plane (dc, context, curr_pipe->plane_state));if (!phantom_plane)continue ;
Signature · 1 line
2.43.0
PATCH 19/20 drm/amd/display: [FW Promotion] Release 0.1.59.0
In reply to James LinFrom: Taimur Hassan <[email protected]>
[Why & How]
Update DMUB related command structure.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +18 -14
@@ -2378,24 +2378,24 @@ struct dmub_cmd_lsdma_data { uint32_t dst_mip_max : 5; uint32_t dst_swizzle_mode : 5; uint32_t dst_mip_id : 5; - uint32_t tmz : 1; uint32_t dcc : 1; + uint32_t padding1 : 1; uint32_t data_format : 6; - uint32_t padding1 : 4; + uint32_t tmz : 4; uint32_t dst_element_size : 3; uint32_t num_type : 3; uint32_t src_element_size : 3; uint32_t write_compress : 2; - uint32_t cache_policy_dst : 2; - uint32_t cache_policy_src : 2; + uint32_t cache_policy_dst : 3; + uint32_t cache_policy_src : 3; uint32_t read_compress : 2; - uint32_t src_dim : 2; - uint32_t dst_dim : 2; + uint32_t max_com : 2; uint32_t max_uncom : 1; - uint32_t max_com : 2; - uint32_t padding : 30; + uint32_t dst_dim : 2; + uint32_t src_dim : 2; + uint32_t padding : 28; } tiled_copy_data;struct lsdma_linear_copy_data {uint32_t src_lo;
@@ -2405,11 +2405,13 @@ struct dmub_cmd_lsdma_data {uint32_t dst_hi; uint32_t count : 30; - uint32_t cache_policy_dst : 2; + uint32_t pad0 : 2; - uint32_t tmz : 1; - uint32_t cache_policy_src : 2; - uint32_t padding : 29; + uint32_t tmz : 4; + uint32_t cache_policy_src : 3; + uint32_t cache_policy_dst : 3; + uint32_t pad1 : 22; +// DCC fields not included because linear mode on display does not support DCC } linear_copy_data;struct lsdma_linear_sub_window_copy_data {uint32_t src_lo;
@@ -2433,11 +2435,13 @@ struct dmub_cmd_lsdma_data {uint32_t src_slice_pitch;uint32_t dst_slice_pitch; - uint32_t tmz : 1; + uint32_t tmz : 4; uint32_t element_size : 3; uint32_t src_cache_policy : 3; uint32_t dst_cache_policy : 3; - uint32_t reserved0 : 22; + uint32_t reserved0 : 19; +// Linear mode on display does not support compression so DCC related fields are not included. +// The DCC fields in the command packet will be zero'd at the time of constructing the packet. } linear_sub_window_copy_data;struct lsdma_reg_write_data {uint32_t reg_addr;
Signature · 1 line
2.43.0
PATCH 20/20 drm/amd/display: Promote DC to 3.2.382
In reply to James LinFrom: Taimur Hassan <[email protected]>
This version brings along following update:
-Revert "Enable HUBP/OPTC/DPP power gating" -Revert "Unify fast update classification paths" -enable ODM 2:1 on single eDP based on pixel clock -Enable IPS on DCN42
-Add additional IPS entry/exit for PSR/Replay -Separate ABM functions into dedicated power_abm.c file -Fix always-true lower-bound assert
-Refactor dc_link_aux_transfer_raw
-only call pmfw if smu present flags true
-Fix multiple compiler warnings
-Fix CRC open failure during active rendering -Fix white screen on boot with OLED panel
-Fix refresh rate round up case
--- 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.381" +#define DC_VER "3.2.382"/** * 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 (3abbc6894f696de837f4238a0fc24b236892861a -> drm/amd/display: Promote DC to 3.2.381) with new patches added on top of it.
Tested on Ubuntu 24.04.4, 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: James Lin <[email protected]>
Sent: Wednesday, May 6, 2026 12:31 AM
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]>; Chen, Chen-Yu <[email protected]>
Subject: [PATCH 00/20] DC Patches May 11 2026
Start from:6ee9f5160ad6e0bf672329f7680398e718fc56f5
SWDEV-114487 - modules: [BACKPORT] drm/amd/display: Fix divide by zero in calc_psr_num_static_frames
Stopped at:5e7f507891f430f50c71004b73c5ef4c13224f1a
SWDEV-2 - dc: Promote DC to 3.2.382
This version brings along following update:
-Revert "Enable HUBP/OPTC/DPP power gating" -Revert "Unify fast update classification paths" -enable ODM 2:1 on single eDP based on pixel clock -Enable IPS on DCN42 -Add additional IPS entry/exit for PSR/Replay -Separate ABM functions into dedicated power_abm.c file -Fix always-true lower-bound assert -Refactor dc_link_aux_transfer_raw -only call pmfw if smu present flags true -Fix multiple compiler warnings -Fix CRC open failure during active rendering -Fix white screen on boot with OLED panel -Fix refresh rate round up case
Charlene Liu (2):
drm/amd/display: only call pmfw if smu present flags true drm/amd/display: enable ODM 2:1 on single eDP based on pixel clock
ChunTao Tso (1):
drm/amd/display: Fix refresh rate round up case
Clay King (1):
drm/amd/display: Fix warnings
Gaghik Khachatrian (5):
drm/amd/display: Fix signed/unsigned comparison mismatches drm/amd/display: Fix compiler warnings in dml2 drm/amd/display: Fix multiple compiler warnings drm/amd/display: always-true lower-bound assert drm/amd/display: Fix enum decl warnings
Ivan Lipski (2):
drm/amd/display: Add additional IPS entry/exit for PSR/Replay drm/amd/display: Enable IPS on DCN42
Leo Chen (1):
drm/amd/display: Revert "Enable HUBP/OPTC/DPP power gating"
Lohita Mudimela (1):
drm/amd/display: Separate ABM functions into dedicated power_abm.c
file
Matthew Stewart (1):
drm/amd/display: Refactor dc_link_aux_transfer_raw
Mikhail Gavrilov (1):
drm/amd/display: Wrap DCN32 phantom-plane allocation in
DC_RUN_WITH_PREEMPTION_ENABLED
Ovidiu Bunea (1):
drm/amd/display: Revert "Unify fast update classification paths"
Ray Wu (1):
drm/amd/display: Fix white screen on boot with OLED panel
Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.59.0 drm/amd/display: Promote DC to 3.2.382
Tom Chung (1):
drm/amd/display: Fix CRC open failure during active rendering
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 7 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 77 + .../display/dc/clk_mgr/dce100/dce_clk_mgr.c | 6 +- .../display/dc/clk_mgr/dce100/dce_clk_mgr.h | 2 +- .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 8 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c | 4 +- .../dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.h | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c | 4 +- .../clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.h | 2 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 11 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 260 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 12 - .../drm/amd/display/dc/core/dc_link_exports.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 18 +- .../gpu/drm/amd/display/dc/core/dc_state.c | 6 +- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- .../drm/amd/display/dc/core/dc_vm_helper.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 105 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 3 +- drivers/gpu/drm/amd/display/dc/dc_dsc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_stream.h | 7 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 20 +- drivers/gpu/drm/amd/display/dc/dce/dce_aux.h | 4 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 2 +- .../display/dc/dio/dcn10/dcn10_link_encoder.c | 2 +- drivers/gpu/drm/amd/display/dc/dm_helpers.h | 1 + .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 6 +- .../dc/dml/dcn21/display_mode_vba_21.c | 36 +- .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c | 4 +- .../dc/dml/dcn30/display_mode_vba_30.c | 342 +-- .../amd/display/dc/dml/dcn301/dcn301_fpu.c | 2 +- .../dc/dml/dcn31/display_mode_vba_31.c | 408 ++-- .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 10 +- .../dc/dml/dcn314/display_mode_vba_314.c | 400 +-- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 15 +- .../dc/dml/dcn32/display_mode_vba_util_32.c | 8 +- .../dc/dml/dcn32/display_mode_vba_util_32.h | 8 +- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 10 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 10 +- .../drm/amd/display/dc/dml/display_mode_vba.h | 12 +- .../amd/display/dc/dml2_0/display_mode_core.c | 6 +- .../drm/amd/display/dc/dml2_0/dml2_utils.c | 2 +- .../amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c | 2 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 2 +- .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c | 4 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 2 +- .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c | 8 +- .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c | 8 +- .../amd/display/dc/dsc/dcn401/dcn401_dsc.c | 10 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 4 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 2 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 10 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 5 +- drivers/gpu/drm/amd/display/dc/inc/bw_fixed.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 2 +- drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 4 +- .../amd/display/dc/inc/hw/timing_generator.h | 8 +- .../gpu/drm/amd/display/dc/inc/link_service.h | 2 +- .../gpu/drm/amd/display/dc/inc/reg_helper.h | 72 +- .../drm/amd/display/dc/link/link_detection.c | 2 +- .../drm/amd/display/dc/link/link_detection.h | 2 +- .../amd/display/dc/link/protocols/link_ddc.c | 7 +- .../link/protocols/link_edp_panel_control.c | 8 +- .../drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c | 2 +- .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c | 6 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c | 2 +- .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h | 2 +- .../amd/display/dc/optc/dcn32/dcn32_optc.c | 2 +- .../dc/resource/dce100/dce100_resource.c | 10 +- .../dc/resource/dce110/dce110_resource.c | 8 +- .../dc/resource/dce112/dce112_resource.c | 4 +- .../dc/resource/dce120/dce120_resource.c | 6 +- .../dc/resource/dce80/dce80_resource.c | 8 +- .../dc/resource/dcn10/dcn10_resource.c | 15 +- .../dc/resource/dcn20/dcn20_resource.c | 60 +- .../dc/resource/dcn21/dcn21_resource.c | 26 +- .../dc/resource/dcn30/dcn30_resource.c | 63 +- .../dc/resource/dcn301/dcn301_resource.c | 31 +- .../dc/resource/dcn302/dcn302_resource.c | 22 +- .../dc/resource/dcn303/dcn303_resource.c | 22 +- .../dc/resource/dcn31/dcn31_resource.c | 30 +- .../dc/resource/dcn314/dcn314_resource.c | 26 +- .../dc/resource/dcn315/dcn315_resource.c | 37 +- .../dc/resource/dcn316/dcn316_resource.c | 29 +- .../dc/resource/dcn32/dcn32_resource.c | 33 +- .../resource/dcn32/dcn32_resource_helpers.c | 6 +- .../dc/resource/dcn321/dcn321_resource.c | 22 +- .../dc/resource/dcn35/dcn35_resource.c | 26 +- .../dc/resource/dcn351/dcn351_resource.c | 26 +- .../dc/resource/dcn36/dcn36_resource.c | 26 +- .../dc/resource/dcn401/dcn401_resource.c | 32 +- .../dc/resource/dcn42/dcn42_resource.c | 50 +- .../dc/resource/dcn42/dcn42_resource_fpu.c | 22 + .../dc/resource/dcn42/dcn42_resource_fpu.h | 2 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 32 +- .../gpu/drm/amd/display/include/fixed31_32.h | 6 +- .../amd/display/modules/color/color_gamma.c | 28 +- .../drm/amd/display/modules/hdcp/hdcp_log.c | 2 +- .../amd/display/modules/inc/mod_color_types.h | 47 + .../amd/display/modules/inc/mod_info_packet.h | 9 +- .../modules/inc/mod_info_packet_types.h | 37 + .../drm/amd/display/modules/inc/mod_power.h | 25 + .../drm/amd/display/modules/power/Makefile | 2 +- .../gpu/drm/amd/display/modules/power/power.c | 1323 +--------- .../drm/amd/display/modules/power/power_abm.c | 2160 +++++++++++++++++ .../amd/display/modules/power/power_helpers.c | 823 +------ .../amd/display/modules/power/power_helpers.h | 1 + 116 files changed, 3922 insertions(+), 3295 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_color_types.h create mode 100644 drivers/gpu/drm/amd/display/modules/inc/mod_info_packet_types.h create mode 100644 drivers/gpu/drm/amd/display/modules/power/power_abm.c
--
2.43.0