Skip to contentSkip to conversation

DC Patches March 25, 2026

PATCH In review ChuanYu Tseng 4 participants 36 messages Mar 26 – May 11

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover DC Patches March 25, 2026

This DC patchset brings improvements in multiple areas. In summary, we have:

- correct unknown plane state patch
- Revert "Refactor DC update checks"
- Revert "Add 3DLUT DMA broadcast support"
- Remove invalid DPSTREAMCLK mask usage
- enable eDP DSC seamless boot support
- Revert "Rework HDMI link training and YCbCr422 with DSC policy"
- Disable PSR & Replay CRTC disable by default
- Fix Silence Compiler Warnings
- Add link output control for DPIA
- eliminate clock manager code duplication
- Don't set 4to1MPC config dynamically
- Merge pipes for validate
- Fix bounds checking in dml2_0 clock table array
- Avoid turning off the PHY when OTG is running for DVI
- Should support p-state under dcn21
- Enable Replay support for dcn42
- Remove check for DC_DMCUB_ENABLE on DCN42

Changes since v1:
- Typo commit SHA of "Remove check for DC_DMCUB_ENABLE on DCN42" Using the wrong SHA of last commit that I would like to promote

Cc Daniel Wheeler <[email protected]>

Charlene Liu (1):
drm/amd/display: correct unknown plane state patch

Clay King (2):
drm/amd/display: Fix silence signed/unsigned mismatch warnings in dml drm/amd/display: Fixed silence signed/unsigned mismatch warnings

Dillon Varone (3):
drm/amd/display: using cm structure for lut3d related info Revert "drm/amd/display: Add 3DLUT DMA broadcast support" Revert "drm/amd/display: Refactor DC update checks"

Gabe Teeger (3):
drm/amd/display: Remove check for DC_DMCUB_ENABLE on DCN42 drm/amd/display: Fix bounds checking in dml2_0 clock table array drm/amd/display: eliminate clock manager code duplication

Gaghik Khachatrian (6):
drm/amd/display: Fix Compiler Warning - unused func parameters drm/amd/display: Fix Silence Conversion Warnings in Dmub drm/amd/display: Fix Silence signed/unsighed mismatch warning in dc drm/amd/display: Fixed Silence complier warnings in dc drm/amd/display: Fix Compiler warnings in dmub drm/amd/display: Silence type conversion warnings in dml2

Harry Wentland (2):
drm/amd/display: Merge pipes for validate drm/amd/display: Don't set 4to1MPC config dynamically

Lincheng Ku (1):
drm/amd/dc: Add link output control for DPIA

Mohit Bawa (1):
drm/amd/display: enable eDP DSC seamless boot support

Nicholas Kazlauskas (1):
drm/amd/display: Avoid turning off the PHY when OTG is running for DVI

Ovidiu Bunea (1):
drm/amd/dc: Disable PSR & Replay CRTC disable by default

Rafal Ostrowski (3):
drm/amd/display: Move FPU Guards From DML To DC - Part 1 drm/amd/display: Move FPU Guards From DML To DC - Part 2 drm/amd/display: Move FPU Guards From DML To DC - Part 3

Relja Vojvodic (1):
Revert "drm/amd/display: Rework YCbCr422 DSC policy"

Roman Li (2):
drm/amd/display: Enable Replay support for dcn42 drm/amd/display: Remove invalid DPSTREAMCLK mask usage

Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.53.0 drm/amd/display: Promote DC to 3.2.376

Wayne Lin (1):
drm/amd/display: Should support p-state under dcn21

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   7 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    |   2 +-
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c    |  25 +-
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.h    |  17 +-
 .../gpu/drm/amd/display/dc/basics/dce_calcs.c |   8 +-
 .../drm/amd/display/dc/basics/fixpt31_32.c    |   1 +
 .../gpu/drm/amd/display/dc/basics/vector.c    |   1 +
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |   1 +
 .../drm/amd/display/dc/bios/bios_parser2.c    |   9 +
 .../drm/amd/display/dc/bios/command_table2.c  |   2 +
 .../bios/dce110/command_table_helper_dce110.c |   1 +
 .../dce112/command_table_helper2_dce112.c     |   1 +
 .../bios/dce112/command_table_helper_dce112.c |   1 +
 .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |   5 +-
 .../dc/clk_mgr/dce110/dce110_clk_mgr.c        |   2 +-
 .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c  |   3 +-
 .../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c  |   3 +
 .../dc/clk_mgr/dcn314/dcn314_clk_mgr.c        |   3 +
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c        |   3 +
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.c        |   3 +
 .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  |   4 +-
 .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c        |   3 +
 .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c  |  31 +-
 .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h  |   9 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 580 +++++++++++-------
 .../drm/amd/display/dc/core/dc_hw_sequencer.c |   1 +
 .../drm/amd/display/dc/core/dc_link_exports.c |   4 +-
 .../gpu/drm/amd/display/dc/core/dc_resource.c |   9 +-
 .../gpu/drm/amd/display/dc/core/dc_state.c    |  77 ++-
 .../gpu/drm/amd/display/dc/core/dc_stream.c   |  13 +-
 .../gpu/drm/amd/display/dc/core/dc_surface.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dc.h           |  30 +-
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dc_dsc.h       |   1 -
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |   1 +
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.c    |   2 +
 .../amd/display/dc/dccg/dcn32/dcn32_dccg.c    |   1 +
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.c    |   2 +
 .../amd/display/dc/dccg/dcn401/dcn401_dccg.c  |   8 +-
 .../amd/display/dc/dccg/dcn42/dcn42_dccg.c    |   1 +
 drivers/gpu/drm/amd/display/dc/dce/dce_abm.c  |   1 +
 .../gpu/drm/amd/display/dc/dce/dce_audio.c    |   3 +
 .../drm/amd/display/dc/dce/dce_clock_source.c |  10 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c |   1 +
 drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c  |   1 +
 .../gpu/drm/amd/display/dc/dce/dce_i2c_hw.c   |   2 +
 .../gpu/drm/amd/display/dc/dce/dce_i2c_sw.c   |   3 +
 drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c  |   1 +
 .../drm/amd/display/dc/dce/dce_link_encoder.c |   1 +
 .../drm/amd/display/dc/dce/dce_mem_input.c    |   4 +
 drivers/gpu/drm/amd/display/dc/dce/dce_opp.c  |   1 +
 .../amd/display/dc/dce/dce_stream_encoder.c   |   4 +
 .../drm/amd/display/dc/dce/dce_transform.c    |   2 +
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c |   4 +-
 .../gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c |   1 +
 .../drm/amd/display/dc/dce/dmub_hw_lock_mgr.c |   2 +-
 .../gpu/drm/amd/display/dc/dce/dmub_replay.c  |   1 +
 .../display/dc/dce110/dce110_mem_input_v.c    |  10 +
 .../amd/display/dc/dce110/dce110_opp_csc_v.c  |   1 +
 .../display/dc/dce110/dce110_opp_regamma_v.c  |   2 +
 .../dc/dce110/dce110_timing_generator.c       |   9 +
 .../dc/dce110/dce110_timing_generator_v.c     |   9 +
 .../display/dc/dce110/dce110_transform_v.c    |   6 +
 .../amd/display/dc/dce112/dce112_compressor.c |   1 +
 .../dc/dce120/dce120_timing_generator.c       |   7 +
 .../display/dc/dce80/dce80_timing_generator.c |   6 +
 .../amd/display/dc/dcn10/dcn10_cm_common.c    |   8 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c  |   2 +
 .../drm/amd/display/dc/dcn20/dcn20_dwb_scl.c  |   4 +-
 .../amd/display/dc/dcn30/dcn30_cm_common.c    |   4 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_apg.c  |   1 +
 .../dc/dio/dcn10/dcn10_stream_encoder.c       |   2 +
 .../dc/dio/dcn314/dcn314_dio_stream_encoder.c |   2 +
 .../dc/dio/dcn32/dcn32_dio_stream_encoder.c   |   2 +
 .../dc/dio/dcn35/dcn35_dio_stream_encoder.c   |   1 +
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.c |   3 +
 .../dc/dio/virtual/virtual_link_encoder.c     |  65 +-
 .../dc/dio/virtual/virtual_stream_encoder.c   | 111 +++-
 .../drm/amd/display/dc/dml/calcs/dcn_calcs.c  |   1 +
 .../drm/amd/display/dc/dml/dcn10/dcn10_fpu.c  |   2 +-
 .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c  |   3 +-
 .../dc/dml/dcn20/display_mode_vba_20.c        |   4 +
 .../dc/dml/dcn20/display_mode_vba_20v2.c      |   5 +
 .../dc/dml/dcn20/display_rq_dlg_calc_20.c     |   5 +
 .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c   |   5 +
 .../dc/dml/dcn21/display_mode_vba_21.c        |  19 +
 .../dc/dml/dcn21/display_rq_dlg_calc_21.c     |   5 +
 .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c  |   2 +
 .../dc/dml/dcn30/display_mode_vba_30.c        |  23 +
 .../dc/dml/dcn30/display_rq_dlg_calc_30.c     |   5 +
 .../dc/dml/dcn31/display_mode_vba_31.c        |  24 +
 .../dc/dml/dcn31/display_rq_dlg_calc_31.c     |   8 +
 .../amd/display/dc/dml/dcn314/dcn314_fpu.c    |   6 +-
 .../dc/dml/dcn314/display_mode_vba_314.c      |  24 +
 .../dc/dml/dcn314/display_rq_dlg_calc_314.c   |   8 +
 .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c  |   2 +
 .../dc/dml/dcn32/display_mode_vba_util_32.c   |  23 +
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |   8 +-
 .../amd/display/dc/dml/dcn351/dcn351_fpu.c    |   7 +-
 .../drm/amd/display/dc/dml/display_mode_lib.c |   1 +
 .../display/dc/dml/display_rq_dlg_helpers.c   |  14 +
 .../display/dc/dml/dml1_display_rq_dlg_calc.c |   3 +
 .../gpu/drm/amd/display/dc/dml2_0/Makefile    |  74 +--
 .../dml2_0/dml21/dml21_translation_helper.c   |  39 +-
 .../amd/display/dc/dml2_0/dml21/dml21_utils.c |  15 +-
 .../display/dc/dml2_0/dml21/dml21_wrapper.c   | 380 +-----------
 .../display/dc/dml2_0/dml21/dml21_wrapper.h   |  30 -
 .../dc/dml2_0/dml21/dml21_wrapper_fpu.c       | 381 ++++++++++++
 .../dc/dml2_0/dml21/dml21_wrapper_fpu.h       |  60 ++
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c      |  20 +
 .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c |   9 +-
 .../dml21/src/dml2_mcg/dml2_mcg_dcn42.c       |   9 +-
 .../display/dc/dml2_0/dml2_dc_resource_mgmt.c |  28 +-
 .../amd/display/dc/dml2_0/dml2_mall_phantom.c |   3 +-
 .../dc/dml2_0/dml2_translation_helper.c       |   6 +-
 .../drm/amd/display/dc/dml2_0/dml2_utils.c    |   3 +-
 .../drm/amd/display/dc/dml2_0/dml2_wrapper.c  |  23 +-
 .../amd/display/dc/dml2_0/dml2_wrapper_fpu.c  |   9 +-
 .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c  |  11 +-
 .../amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c   |   1 +
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  |   1 +
 .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c   |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |   5 +
 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c   |  13 +-
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c  |   2 +-
 .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c  |   2 +-
 .../amd/display/dc/dsc/dcn401/dcn401_dsc.c    |   7 +-
 drivers/gpu/drm/amd/display/dc/dsc/dsc.h      |   5 +
 .../drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c  |   1 +
 .../dc/gpio/dcn42/hw_translate_dcn42.c        |   1 +
 .../gpu/drm/amd/display/dc/gpio/hw_factory.c  |   1 +
 drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c |   1 +
 .../drm/amd/display/dc/gpio/hw_translate.c    |   1 +
 .../display/dc/hubbub/dcn31/dcn31_hubbub.c    |   1 +
 .../display/dc/hubbub/dcn35/dcn35_hubbub.c    |   1 +
 .../display/dc/hubbub/dcn401/dcn401_hubbub.c  |   4 +
 .../display/dc/hubbub/dcn42/dcn42_hubbub.c    |   2 +
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn35/dcn35_hubp.c    |   1 +
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  |   3 +
 .../amd/display/dc/hubp/dcn42/dcn42_hubp.c    |   1 +
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  40 +-
 .../amd/display/dc/hwss/dce120/dce120_hwseq.c |   4 +
 .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  23 +-
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   |  13 +-
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |   5 +-
 .../amd/display/dc/hwss/dcn303/dcn303_hwseq.c |  11 +
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |   4 +-
 .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c |   1 +
 .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c   |   4 +-
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |   6 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 122 ++--
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h |   3 +-
 .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c   |   6 +-
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |   2 +-
 .../dc/irq/dce110/irq_service_dce110.c        |  12 +-
 .../dc/irq/dce120/irq_service_dce120.c        |   2 +-
 .../display/dc/irq/dce80/irq_service_dce80.c  |  10 +-
 .../display/dc/irq/dcn10/irq_service_dcn10.c  |   5 +-
 .../display/dc/irq/dcn20/irq_service_dcn20.c  |   5 +-
 .../display/dc/irq/dcn21/irq_service_dcn21.c  |   5 +-
 .../display/dc/irq/dcn30/irq_service_dcn30.c  |   5 +-
 .../dc/irq/dcn302/irq_service_dcn302.c        |   7 +-
 .../dc/irq/dcn303/irq_service_dcn303.c        |   5 +-
 .../display/dc/irq/dcn31/irq_service_dcn31.c  |   7 +-
 .../dc/irq/dcn314/irq_service_dcn314.c        |   7 +-
 .../dc/irq/dcn315/irq_service_dcn315.c        |   7 +-
 .../display/dc/irq/dcn32/irq_service_dcn32.c  |   7 +-
 .../display/dc/irq/dcn35/irq_service_dcn35.c  |   7 +-
 .../dc/irq/dcn351/irq_service_dcn351.c        |   7 +-
 .../display/dc/irq/dcn36/irq_service_dcn36.c  |   7 +-
 .../dc/irq/dcn401/irq_service_dcn401.c        |   7 +-
 .../display/dc/irq/dcn42/irq_service_dcn42.c  |   7 +-
 .../display/dc/link/accessories/link_dp_cts.c |   2 +
 .../amd/display/dc/link/hwss/link_hwss_dpia.c |  22 +-
 .../display/dc/link/hwss/link_hwss_hpo_dp.c   |   6 +
 .../link_hwss_hpo_fixed_vs_pe_retimer_dp.c    |   1 +
 .../display/dc/link/hwss/link_hwss_virtual.c  |   6 +
 .../drm/amd/display/dc/link/link_detection.c  |  12 +-
 .../gpu/drm/amd/display/dc/link/link_dpms.c   |   3 +-
 .../drm/amd/display/dc/link/link_validation.c |   1 +
 .../dc/link/protocols/link_dp_training.c      |   2 +
 .../protocols/link_dp_training_128b_132b.c    |   1 +
 .../dc/link/protocols/link_dp_training_dpia.c |   6 +
 .../amd/display/dc/link/protocols/link_dpcd.c |   1 +
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c  |   6 +-
 .../drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c  |   1 +
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.c  |   1 +
 .../amd/display/dc/optc/dcn10/dcn10_optc.c    |   4 +
 .../amd/display/dc/optc/dcn20/dcn20_optc.c    |   2 +
 .../amd/display/dc/optc/dcn30/dcn30_optc.c    |   1 +
 .../amd/display/dc/optc/dcn31/dcn31_optc.c    |   1 +
 .../amd/display/dc/optc/dcn314/dcn314_optc.c  |   1 +
 .../amd/display/dc/optc/dcn32/dcn32_optc.c    |   1 +
 .../amd/display/dc/optc/dcn35/dcn35_optc.c    |   1 +
 .../dc/resource/dce100/dce100_resource.c      |   9 +-
 .../dc/resource/dce110/dce110_resource.c      |   6 +
 .../dc/resource/dce112/dce112_resource.c      |   7 +-
 .../dc/resource/dce120/dce120_resource.c      |   3 +-
 .../dc/resource/dce80/dce80_resource.c        |   7 +-
 .../dc/resource/dcn10/dcn10_resource.c        |   5 +-
 .../dc/resource/dcn20/dcn20_resource.c        |  24 +-
 .../dc/resource/dcn21/dcn21_resource.c        |  33 +-
 .../dc/resource/dcn21/dcn21_resource.h        |   3 +-
 .../dc/resource/dcn30/dcn30_resource.c        |   5 +-
 .../dc/resource/dcn301/dcn301_resource.c      |   3 +-
 .../dc/resource/dcn302/dcn302_resource.c      |   3 +-
 .../dc/resource/dcn303/dcn303_resource.c      |   3 +-
 .../dc/resource/dcn31/dcn31_resource.c        |  16 +-
 .../dc/resource/dcn314/dcn314_resource.c      |   6 +-
 .../dc/resource/dcn315/dcn315_resource.c      |  10 +-
 .../dc/resource/dcn316/dcn316_resource.c      |   9 +-
 .../dc/resource/dcn32/dcn32_resource.c        |   2 +-
 .../resource/dcn32/dcn32_resource_helpers.c   |   1 +
 .../dc/resource/dcn321/dcn321_resource.c      |   2 +-
 .../dc/resource/dcn35/dcn35_resource.c        |  15 +-
 .../dc/resource/dcn35/dcn35_resource.h        |   1 +
 .../dc/resource/dcn351/dcn351_resource.c      |  15 +-
 .../dc/resource/dcn36/dcn36_resource.c        |   6 +-
 .../dc/resource/dcn401/dcn401_resource.c      |  32 +-
 .../dc/resource/dcn42/dcn42_resource.c        |  34 +-
 .../dcn42/dcn42_soc_and_ip_translator.c       |   1 +
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |   1 +
 .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c |  20 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn30.c |   1 +
 .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c |  23 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c |  17 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c |  18 +-
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  22 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.c |  32 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.h | 136 +++-
 .../gpu/drm/amd/display/dmub/src/dmub_reg.c   |   4 +-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |   8 +-
 236 files changed, 2396 insertions(+), 1136 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/30 drm/amd/display: Remove check for DC_DMCUB_ENABLE on DCN42

From: Gabe Teeger <[email protected]>

[why]
DCN without DMCUB is not a supported configuration on DCN42.

[how]
Remove the DC_DMCUB_ENABLE fuse register check and remove the corresponding entries in the DCN42 DMUB register list.

---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.c |   8 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.h | 136 +++++++++++++++++-
 2 files changed, 137 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c +3 -5
index 7833a4fb7fbf..f687359b7d83 100644
@@ -321,11 +321,9 @@ void dmub_dcn42_set_outbox1_rptr(struct dmub_srv *dmub, uint32_t rptr_offset)
 
 bool dmub_dcn42_is_supported(struct dmub_srv *dmub)
 {
-	uint32_t supported = 0;
-
-	REG_GET(CC_DC_PIPE_DIS, DC_DMCUB_ENABLE, &supported);
-
-	return supported;
+	// DCN without DMUB is not a supported configuration; safe to assume that it is always
+	// present.
+	return true;
 }
 
 union dmub_fw_boot_options dmub_dcn42_get_fw_boot_option(struct dmub_srv *dmub)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.h +134 -2

148 lines not on this page · raw message

Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 2/30 drm/amd/display: Enable Replay support for dcn42

In reply to ChuanYu Tseng

From: Roman Li <[email protected]>

Add DCN4.2 to the list that supports
Panel Replay feature.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -0
index 44294a67c40c..cc1127aaea9e 100644
@@ -5577,6 +5577,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 		case IP_VERSION(3, 5, 0):
 		case IP_VERSION(3, 5, 1):
 		case IP_VERSION(3, 6, 0):
+		case IP_VERSION(4, 2, 0):
 			replay_feature_enabled = true;
 			break;
 
Signature · 1 line
2.43.0
#3 lore raw

PATCH v2 3/30 drm/amd/display: Should support p-state under dcn21

In reply to ChuanYu Tseng

From: Wayne Lin <[email protected]>

[Why]
Under DCN21, observe flip_done timeout issue while running 3D benchmark under MPO case. Timeout is caused by driver fails validate_bandwidth() during atomic_commit_tail but passes atomic_check.

Under further analysis, indicates the delta of atomic_check and atomic_commit_tail are dc->current_state->bw_ctx.dml.soc.sr_exit_time_us and dc->current_state->bw_ctx.dml.soc.sr_enter_plus_exit_time_us.

We set validate_mode as DC_VALIDATE_MODE_ONLY while calling dc_validate_global_state() at atomic_check, but set mode as DC_VALIDATE_MODE_AND_PROGRAMMING during atomic_commit_tail. If dc_validate_mode set as DC_VALIDATE_MODE_ONLY, validate_bandwidth() will skip the wm and dlg calculation.

During commit_tail, validate_bandwidth() is called with dc_validate_mode set as DC_VALIDATE_MODE_AND_PROGRAMMING and dc_state->bw_ctx.dml.soc.sr_exit_time_us might get modified after the wm_calculation and stored into dc->current_state. Which means dc->current_state->bw_ctx.dml.soc.sr_exit_time_us might not aligned with the one stored in dm_state->context. That causes duplicated dm_state->context not aligned with dc->current_state, and might have bandwidth validation pass in atomic_check and fail in commit_tail later.

[How]
When the issue occurs, it fails dml_get_voltage_level() with the condition dm_allow_self_refresh_and_mclk_switch but pass with the condition dm_allow_self_refresh. However, we should support p-state. So we should not pass validate_bandwidth by allowing self refresh only. Change the policy under DCN21.

---
 .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c  |  2 +-
 .../dc/resource/dcn21/dcn21_resource.c        | 30 +++++++++++--------
 .../dc/resource/dcn21/dcn21_resource.h        |  3 +-
 3 files changed, 21 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +1 -1
index 7aaf13bbd4e4..ae34982b1b1c 100644
@@ -2335,7 +2335,7 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc, struct dc_state *context,
 	/*Unsafe due to current pipe merge and split logic*/
 	ASSERT(context != dc->current_state);
 
-	out = dcn21_fast_validate_bw(dc, context, pipes, &pipe_cnt, pipe_split_from, &vlevel, validate_mode);
+	out = dcn21_fast_validate_bw(dc, context, pipes, &pipe_cnt, pipe_split_from, &vlevel, validate_mode, false);
 
 	if (pipe_cnt == 0)
 		goto validate_out;
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +18 -12
index e57022af2c2a..a612c8932da9 100644
@@ -772,7 +772,8 @@ bool dcn21_fast_validate_bw(struct dc *dc,
 			    int *pipe_cnt_out,
 			    int *pipe_split_from,
 			    int *vlevel_out,
-			    enum dc_validate_mode validate_mode)
+			    enum dc_validate_mode validate_mode,
+			    bool allow_self_refresh_only)
 {
 	bool out = false;
 	int split[MAX_PIPES] = { 0 };
@@ -803,18 +804,23 @@ bool dcn21_fast_validate_bw(struct dc *dc,
 	vlevel = dml_get_voltage_level(&context->bw_ctx.dml, pipes, pipe_cnt);
 
 	if (vlevel > context->bw_ctx.dml.soc.num_states) {
-		/*
-		 * If mode is unsupported or there's still no p-state support then
-		 * fall back to favoring voltage.
-		 *
-		 * We don't actually support prefetch mode 2, so require that we
-		 * at least support prefetch mode 1.
-		 */
-		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 (allow_self_refresh_only) {
+			/*
+			 * If mode is unsupported or there's still no p-state support then
+			 * fall back to favoring voltage.
+			 *
+			 * We don't actually support prefetch mode 2, so require that we
+			 * at least support prefetch mode 1.
+			 */
+			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)
+				goto validate_fail;
+		} else {
 			goto validate_fail;
+		}
 	}
 
 	vlevel = dcn20_validate_apply_pipe_split_flags(dc, context, vlevel, split, merge);
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.h +2 -1
index a017fd9854d1..23d3a36872bb 100644
@@ -51,6 +51,7 @@ bool dcn21_fast_validate_bw(
 		int *pipe_cnt_out,
 		int *pipe_split_from,
 		int *vlevel_out,
-		enum dc_validate_mode validate_mode);
+		enum dc_validate_mode validate_mode,
+		bool allow_self_refresh_only);
 
 #endif /* _DCN21_RESOURCE_H_ */
Signature · 1 line
2.43.0
#4 lore raw

PATCH v2 4/30 drm/amd/display: Fix Compiler Warning - unused func parameters

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

Handling unused function parameter due to cause compiler warning

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
index 8b21816cf7c8..5d27666bbc7f 100644
@@ -3142,6 +3142,9 @@ static struct surface_update_descriptor check_update_state_and_surfaces_for_stre
 		const int surface_count,
 		const struct dc_stream_update *stream_update)
 {
+	(void)check_config;
+	(void)stream_update;
+
 	const struct dc_state *context = dc->current_state;
 
 	struct surface_update_descriptor overall_type = { UPDATE_TYPE_ADDR_ONLY, LOCK_DESCRIPTOR_NONE};
Signature · 1 line
2.43.0
#5 lore raw

PATCH v2 5/30 drm/amd/display: Avoid turning off the PHY when OTG is running for DVI

In reply to ChuanYu Tseng

From: Nicholas Kazlauskas <[email protected]>

[Why]
The OTG's virtual pixel clock source for DVI comes from the PHY.

If the signal type is DVI then the OTG can become stuck on pre DCN401 ASIC when DPMS off occurs because the OTG remains running but the PHY transmitter is disabled.

[How]
There exists logic to keep track of the OTG running refcount on the link to determine if the link needs to go to PLL_EN instead of TX_EN but the logic only checks for HDMI TMDS on older ASIC.

DVI is still a TMDS signal type so the constraint should also apply.

Replace the checks for dc_is_hdmi_tmds_signal with dc_is_tmds_signal to cover both HDMI and DVI for the symclk refcount workaround.

---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c   | 4 ++--
 drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c   | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -2
index 8a17cc036399..d2025779d036 100644
@@ -1568,7 +1568,7 @@ static enum dc_status dce110_enable_stream_timing(
 			return DC_ERROR_UNEXPECTED;
 		}
 
-		if (dc_is_hdmi_tmds_signal(stream->signal)) {
+		if (dc_is_tmds_signal(stream->signal)) {
 			stream->link->phy_state.symclk_ref_cnts.otg = 1;
 			if (stream->link->phy_state.symclk_state == SYMCLK_OFF_TX_OFF)
 				stream->link->phy_state.symclk_state = SYMCLK_ON_TX_OFF;
@@ -2418,7 +2418,7 @@ static void dce110_reset_hw_ctx_wrap(
 				BREAK_TO_DEBUGGER();
 			}
 			pipe_ctx_old->stream_res.tg->funcs->disable_crtc(pipe_ctx_old->stream_res.tg);
-			if (dc_is_hdmi_tmds_signal(pipe_ctx_old->stream->signal))
+			if (dc_is_tmds_signal(pipe_ctx_old->stream->signal))
 				pipe_ctx_old->stream->link->phy_state.symclk_ref_cnts.otg = 0;
 			pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
 					pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +2 -2
index 307e8f8060e6..a673ab0803a8 100644
@@ -893,7 +893,7 @@ enum dc_status dcn20_enable_stream_timing(
 		dccg->funcs->set_dtbclk_dto(dccg, &dto_params);
 	}
 
-	if (dc_is_hdmi_tmds_signal(stream->signal)) {
+	if (dc_is_tmds_signal(stream->signal)) {
 		stream->link->phy_state.symclk_ref_cnts.otg = 1;
 		if (stream->link->phy_state.symclk_state == SYMCLK_OFF_TX_OFF)
 			stream->link->phy_state.symclk_state = SYMCLK_ON_TX_OFF;
@@ -2856,7 +2856,7 @@ void dcn20_reset_back_end_for_pipe(
 		 * the case where the same symclk is shared across multiple otg
 		 * instances
 		 */
-		if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal))
+		if (dc_is_tmds_signal(pipe_ctx->stream->signal))
 			link->phy_state.symclk_ref_cnts.otg = 0;
 		if (link->phy_state.symclk_state == SYMCLK_ON_TX_OFF) {
 			link_hwss->disable_link_output(link,
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +1 -1
index 94f63fd54e3e..1fba44aecdd3 100644
@@ -548,7 +548,7 @@ static void dcn31_reset_back_end_for_pipe(
 	 * the case where the same symclk is shared across multiple otg
 	 * instances
 	 */
-	if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal))
+	if (dc_is_tmds_signal(pipe_ctx->stream->signal))
 		link->phy_state.symclk_ref_cnts.otg = 0;
 
 	if (pipe_ctx->top_pipe == NULL) {
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -1
index a72284c3fa1c..ca611b3c22d3 100644
@@ -1938,7 +1938,7 @@ void dcn401_reset_back_end_for_pipe(
 		 * the case where the same symclk is shared across multiple otg
 		 * instances
 		 */
-		if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal))
+		if (dc_is_tmds_signal(pipe_ctx->stream->signal))
 			link->phy_state.symclk_ref_cnts.otg = 0;
 		if (link->phy_state.symclk_state == SYMCLK_ON_TX_OFF) {
 			link_hwss->disable_link_output(link,
Signature · 1 line
2.43.0
#6 lore raw

PATCH v2 6/30 drm/amd/display: Fix bounds checking in dml2_0 clock table array

In reply to ChuanYu Tseng

From: Gabe Teeger <[email protected]>

[Why]
Multiple locations in dml2_0 used num_clk_values-1 as array index without checking if num_clk_values > 0. When num_clk_values is 0, this results in accessing array index -1, which wraps to 255 for unsigned types, causing out-of-bounds memory access and potential crashes.

[How]
Add proper bounds checking using ternary operators to guard all num_clk_values-1 array accesses. When num_clk_values is 0, return 0 as fallback value instead of accessing invalid memory. This prevents buffer overflows while maintaining backward compatibility and provides sensible default behavior for empty clock tables.

---
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c      | 20 +++++++++++++++++++
 .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c |  9 ++++++---
 .../dml21/src/dml2_mcg/dml2_mcg_dcn42.c       |  9 ++++++---
 3 files changed, 32 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c +20 -0
index d17e59d684fd..ab0b4a4b5d65 100644
@@ -279,6 +279,26 @@ static bool round_up_and_copy_to_next_dpm(unsigned long min_value, unsigned long
 	bool result = false;
 	int index = 0;
 
+	/* Guard against empty clock tables (e.g. DTBCLK on DCN42B where the
+	 * clock is tied off and num_clk_values == 0).  Without this check the
+	 * else-if branch below would evaluate
+	 * clk_values_khz[num_clk_values - 1] with num_clk_values == 0, which
+	 * wraps the unsigned char index to 255 — a 235-element out-of-bounds
+	 * read on an array of DML_MAX_CLK_TABLE_SIZE (20) entries.
+	 *
+	 * Semantic: if the clock doesn't exist on this ASIC but no frequency
+	 * is required (min_value == 0), the request is trivially satisfied.
+	 * If a non-zero frequency is required but the clock is absent, the
+	 * configuration is unsupportable.
+	 */
+	if (clock_table->num_clk_values == 0) {
+		if (min_value == 0) {
+			*rounded_value = 0;
+			return true;
+		}
+		return false;
+	}
+
 	if (clock_table->num_clk_values > 2) {
 		while (index < clock_table->num_clk_values && clock_table->clk_values_khz[index] < min_value)
 			index++;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c +6 -3
index a265f254152c..eab13e1c96fd 100644
@@ -178,9 +178,12 @@ static bool build_min_clock_table(const struct dml2_soc_bb *soc_bb, struct dml2_
 
 	min_table->max_clocks_khz.dispclk = soc_bb->clk_table.dispclk.clk_values_khz[soc_bb->clk_table.dispclk.num_clk_values - 1];
 	min_table->max_clocks_khz.dppclk = soc_bb->clk_table.dppclk.clk_values_khz[soc_bb->clk_table.dppclk.num_clk_values - 1];
-	min_table->max_clocks_khz.dscclk = soc_bb->clk_table.dscclk.clk_values_khz[soc_bb->clk_table.dscclk.num_clk_values - 1];
-	min_table->max_clocks_khz.dtbclk = soc_bb->clk_table.dtbclk.clk_values_khz[soc_bb->clk_table.dtbclk.num_clk_values - 1];
-	min_table->max_clocks_khz.phyclk = soc_bb->clk_table.phyclk.clk_values_khz[soc_bb->clk_table.phyclk.num_clk_values - 1];
+	min_table->max_clocks_khz.dscclk = (soc_bb->clk_table.dscclk.num_clk_values > 0) ?
+		soc_bb->clk_table.dscclk.clk_values_khz[soc_bb->clk_table.dscclk.num_clk_values - 1] : 0;
+	min_table->max_clocks_khz.dtbclk = (soc_bb->clk_table.dtbclk.num_clk_values > 0) ?
+		soc_bb->clk_table.dtbclk.clk_values_khz[soc_bb->clk_table.dtbclk.num_clk_values - 1] : 0;
+	min_table->max_clocks_khz.phyclk = (soc_bb->clk_table.phyclk.num_clk_values > 0) ?
+		soc_bb->clk_table.phyclk.clk_values_khz[soc_bb->clk_table.phyclk.num_clk_values - 1] : 0;
 
 	min_table->max_ss_clocks_khz.dispclk = (unsigned int)((double)min_table->max_clocks_khz.dispclk / (1.0 + soc_bb->dcn_downspread_percent / 100.0));
 	min_table->max_ss_clocks_khz.dppclk = (unsigned int)((double)min_table->max_clocks_khz.dppclk / (1.0 + soc_bb->dcn_downspread_percent / 100.0));
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.c +6 -3
index 1f67cbc2c236..3eaeff39ee79 100644
@@ -54,9 +54,12 @@ static bool build_min_clock_table(const struct dml2_soc_bb *soc_bb, struct dml2_
 
 	min_table->max_clocks_khz.dispclk = soc_bb->clk_table.dispclk.clk_values_khz[soc_bb->clk_table.dispclk.num_clk_values - 1];
 	min_table->max_clocks_khz.dppclk = soc_bb->clk_table.dppclk.clk_values_khz[soc_bb->clk_table.dppclk.num_clk_values - 1];
-	min_table->max_clocks_khz.dscclk = soc_bb->clk_table.dscclk.clk_values_khz[soc_bb->clk_table.dscclk.num_clk_values - 1];
-	min_table->max_clocks_khz.dtbclk = soc_bb->clk_table.dtbclk.clk_values_khz[soc_bb->clk_table.dtbclk.num_clk_values - 1];
-	min_table->max_clocks_khz.phyclk = soc_bb->clk_table.phyclk.clk_values_khz[soc_bb->clk_table.phyclk.num_clk_values - 1];
+	min_table->max_clocks_khz.dscclk = (soc_bb->clk_table.dscclk.num_clk_values > 0) ?
+		soc_bb->clk_table.dscclk.clk_values_khz[soc_bb->clk_table.dscclk.num_clk_values - 1] : 0;
+	min_table->max_clocks_khz.dtbclk = (soc_bb->clk_table.dtbclk.num_clk_values > 0) ?
+		soc_bb->clk_table.dtbclk.clk_values_khz[soc_bb->clk_table.dtbclk.num_clk_values - 1] : 0;
+	min_table->max_clocks_khz.phyclk = (soc_bb->clk_table.phyclk.num_clk_values > 0) ?
+		soc_bb->clk_table.phyclk.clk_values_khz[soc_bb->clk_table.phyclk.num_clk_values - 1] : 0;
 
 	min_table->max_ss_clocks_khz.dispclk = (unsigned int)((double)min_table->max_clocks_khz.dispclk / (1.0 + soc_bb->dcn_downspread_percent / 100.0));
 	min_table->max_ss_clocks_khz.dppclk = (unsigned int)((double)min_table->max_clocks_khz.dppclk / (1.0 + soc_bb->dcn_downspread_percent / 100.0));
Signature · 1 line
2.43.0
#7 lore raw

PATCH v2 7/30 drm/amd/display: Merge pipes for validate

In reply to ChuanYu Tseng

From: Harry Wentland <[email protected]>

Validation expects to operate on non-split pipes. This is seen in dcn20_fast_validate_bw, which merges pipes for validation. We weren't doing that in the non-fast path which lead to validation failures when operating with 4-to-1 MPC and a writeback connector.

---
 drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +2 -0
index 66b1a1c2db1d..2c606d9042a2 100644
@@ -1645,6 +1645,8 @@ noinline bool dcn30_internal_validate_bw(
 	if (!pipes)
 		return false;
 
+	dcn20_merge_pipes_for_validate(dc, context);
+
 	context->bw_ctx.dml.vba.maxMpcComb = 0;
 	context->bw_ctx.dml.vba.VoltageLevel = 0;
 	context->bw_ctx.dml.vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
Signature · 1 line
2.43.0
#8 lore raw

PATCH v2 8/30 drm/amd/display: Don't set 4to1MPC config dynamically

In reply to ChuanYu Tseng

From: Harry Wentland <[email protected]>

We were previously modifying the global dc->config.enable_4to1MPC dynamically. These variables are meant as global configs, not to by dynamically modified. Modifying them dynamically prevents us from enabling/disabling functionality for debug purposes and can easily lead to bad things since we're not operating on the current state but on DC-wide variables.

Instead we should look at the existing split4mpc decision in dcn20_validate_apply_split_flags and make the decision there, if the global config.enable_4to1MPC is set to true for the DCN version we're running.

This fixes corruption that is observed when running a new IGT kms_colorop test for color-space-conversion that uses a YUV plane and outputs to a writeback connector.

---
 drivers/gpu/drm/amd/display/dc/dc.h              |  2 +-
 .../drm/amd/display/dc/dml/dcn314/dcn314_fpu.c   |  6 +-----
 .../gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c |  7 +------
 .../drm/amd/display/dc/dml/dcn351/dcn351_fpu.c   |  7 +------
 .../display/dc/resource/dcn20/dcn20_resource.c   | 16 ++++++++++++++--
 .../display/dc/resource/dcn31/dcn31_resource.c   | 10 +++++-----
 .../display/dc/resource/dcn314/dcn314_resource.c |  3 +++
 .../display/dc/resource/dcn315/dcn315_resource.c |  5 +++--
 .../display/dc/resource/dcn316/dcn316_resource.c |  6 ++++--
 .../display/dc/resource/dcn35/dcn35_resource.c   |  3 +++
 .../display/dc/resource/dcn351/dcn351_resource.c |  3 +++
 11 files changed, 39 insertions(+), 29 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 80e217c5a23d..41b5dedb6eff 100644
@@ -521,7 +521,7 @@ struct dc_config {
 	union allow_lttpr_non_transparent_mode allow_lttpr_non_transparent_mode;
 	bool multi_mon_pp_mclk_switch;
 	bool disable_dmcu;
-	bool enable_4to1MPC;
+	bool allow_4to1MPC;
 	bool enable_windowed_mpo_odm;
 	bool forceHBR2CP2520; // Used for switching between test patterns TPS4 and CP2520
 	uint32_t allow_edp_hotplug_detection;
drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +1 -5
index df9d50b9b57c..ab016c294ba7 100644
@@ -391,13 +391,9 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c
 	}
 	context->bw_ctx.dml.ip.det_buffer_size_kbytes = DCN3_14_DEFAULT_DET_SIZE;
 
-	dc->config.enable_4to1MPC = false;
 	if (pipe_cnt == 1 && pipe->plane_state
 		&& pipe->plane_state->rotation == ROTATION_ANGLE_0 && !dc->debug.disable_z9_mpc) {
-		if (is_dual_plane(pipe->plane_state->format)
-				&& pipe->plane_state->src_rect.width <= 1920 && pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
-		} else if (!is_dual_plane(pipe->plane_state->format) && pipe->plane_state->src_rect.width <= 5120) {
+		if (!is_dual_plane(pipe->plane_state->format) && pipe->plane_state->src_rect.width <= 5120) {
 			/* 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;
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +1 -6
index 8a177d5ae213..6713cd8ba86a 100644
@@ -528,14 +528,9 @@ int dcn35_populate_dml_pipes_from_context_fpu(struct dc *dc,
 	}
 
 	context->bw_ctx.dml.ip.det_buffer_size_kbytes = 384;/*per guide*/
-	dc->config.enable_4to1MPC = false;
 
 	if (pipe_cnt == 1 && pipe->plane_state && !dc->debug.disable_z9_mpc) {
-		if (is_dual_plane(pipe->plane_state->format)
-				&& pipe->plane_state->src_rect.width <= 1920 &&
-				pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
-		} else if (!is_dual_plane(pipe->plane_state->format) &&
+		if (!is_dual_plane(pipe->plane_state->format) &&
 			   pipe->plane_state->src_rect.width <= 5120) {
 			/*
 			 * Limit to 5k max to avoid forced pipe split when there
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +1 -6
index 77023b619f1e..73c2aee57f28 100644
@@ -561,14 +561,9 @@ int dcn351_populate_dml_pipes_from_context_fpu(struct dc *dc,
 	}
 
 	context->bw_ctx.dml.ip.det_buffer_size_kbytes = 384;/*per guide*/
-	dc->config.enable_4to1MPC = false;
 
 	if (pipe_cnt == 1 && pipe->plane_state && !dc->debug.disable_z9_mpc) {
-		if (is_dual_plane(pipe->plane_state->format)
-				&& pipe->plane_state->src_rect.width <= 1920 &&
-				pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
-		} else if (!is_dual_plane(pipe->plane_state->format) &&
+		if (!is_dual_plane(pipe->plane_state->format) &&
 			   pipe->plane_state->src_rect.width <= 5120) {
 			/*
 			 * Limit to 5k max to avoid forced pipe split when there
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +14 -2
index b28e877fb99d..7d49a6003f03 100644
@@ -1814,6 +1814,11 @@ void dcn20_merge_pipes_for_validate(
 	}
 }
 
+static bool is_dual_plane(enum surface_pixel_format format)
+{
+	return format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN || format == SURFACE_PIXEL_FORMAT_GRPH_RGBE_ALPHA;
+}
+
 int dcn20_validate_apply_pipe_split_flags(
 		struct dc *dc,
 		struct dc_state *context,
@@ -1898,8 +1903,15 @@ int dcn20_validate_apply_pipe_split_flags(
 	for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
 		struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
 		int pipe_plane = v->pipe_plane[pipe_idx];
-		bool split4mpc = context->stream_count == 1 && plane_count == 1
-				&& dc->config.enable_4to1MPC && dc->res_pool->pipe_count >= 4;
+		bool split4mpc = false;
+
+		if (context->stream_count == 1 && plane_count == 1
+		    && dc->config.allow_4to1MPC && dc->res_pool->pipe_count >= 4
+		    && !dc->debug.disable_z9_mpc
+		    && pipe->plane_state && is_dual_plane(pipe->plane_state->format)
+		    && pipe->plane_state->src_rect.width <= 1920
+		    && pipe->plane_state->src_rect.height <= 1080)
+				split4mpc = true;
 
 		if (!context->res_ctx.pipe_ctx[i].stream)
 			continue;
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +5 -5
index 95c7ecdb3496..6d23d88e400c 100644
@@ -1703,12 +1703,9 @@ int dcn31_populate_dml_pipes_from_context(
 		pipe_cnt++;
 	}
 	context->bw_ctx.dml.ip.det_buffer_size_kbytes = DCN3_1_DEFAULT_DET_SIZE;
-	dc->config.enable_4to1MPC = false;
+
 	if (pipe_cnt == 1 && pipe->plane_state && !dc->debug.disable_z9_mpc) {
-		if (is_dual_plane(pipe->plane_state->format)
-				&& pipe->plane_state->src_rect.width <= 1920 && pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
-		} else if (!is_dual_plane(pipe->plane_state->format) && pipe->plane_state->src_rect.width <= 5120) {
+		if (!is_dual_plane(pipe->plane_state->format) && pipe->plane_state->src_rect.width <= 5120) {
 			/* 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;
@@ -1926,6 +1923,9 @@ static bool dcn31_resource_construct(
 	dc->caps.is_apu = true;
 	dc->caps.zstate_support = true;
 
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
+
 	/* Color pipeline capabilities */
 	dc->caps.color.dpp.dcn_arch = 1;
 	dc->caps.color.dpp.input_lut_shared = 0;
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +3 -0
index 803b87986802..7b1f426652be 100644
@@ -1834,6 +1834,9 @@ static bool dcn314_resource_construct(
 	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
+
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
 	dc->caps.max_downscale_ratio = 400;
 	dc->caps.i2c_speed_in_khz = 100;
 	dc->caps.i2c_speed_in_khz_hdcp = 100;
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +3 -2
index e488fa6f32e6..10feb64c0010 100644
@@ -1789,11 +1789,9 @@ static int dcn315_populate_dml_pipes_from_context(
 	if (context->bw_ctx.dml.ip.det_buffer_size_kbytes > DCN3_15_MAX_DET_SIZE)
 		context->bw_ctx.dml.ip.det_buffer_size_kbytes = DCN3_15_MAX_DET_SIZE;
 
-	dc->config.enable_4to1MPC = false;
 	if (pipe_cnt == 1 && pipe->plane_state && !dc->debug.disable_z9_mpc) {
 		if (is_dual_plane(pipe->plane_state->format)
 				&& pipe->plane_state->src_rect.width <= 1920 && pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
 			context->bw_ctx.dml.ip.det_buffer_size_kbytes =
 					(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)
@@ -1874,6 +1872,9 @@ static bool dcn315_resource_construct(
 	 *************************************************/
 	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
+
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
 	dc->caps.i2c_speed_in_khz = 100;
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +4 -2
index fa51a9ae945f..835bedfd6074 100644
@@ -1673,11 +1673,9 @@ static int dcn316_populate_dml_pipes_from_context(
 	if (context->bw_ctx.dml.ip.det_buffer_size_kbytes > DCN3_16_MAX_DET_SIZE)
 		context->bw_ctx.dml.ip.det_buffer_size_kbytes = DCN3_16_MAX_DET_SIZE;
 	ASSERT(context->bw_ctx.dml.ip.det_buffer_size_kbytes >= DCN3_16_DEFAULT_DET_SIZE);
-	dc->config.enable_4to1MPC = false;
 	if (pipe_cnt == 1 && pipe->plane_state && !dc->debug.disable_z9_mpc) {
 		if (is_dual_plane(pipe->plane_state->format)
 				&& pipe->plane_state->src_rect.width <= 1920 && pipe->plane_state->src_rect.height <= 1080) {
-			dc->config.enable_4to1MPC = true;
 			context->bw_ctx.dml.ip.det_buffer_size_kbytes =
 					(max_usable_det / DCN3_16_CRB_SEGMENT_SIZE_KB / 4) * DCN3_16_CRB_SEGMENT_SIZE_KB;
 		} else if (!is_dual_plane(pipe->plane_state->format)) {
@@ -1750,6 +1748,10 @@ static bool dcn316_resource_construct(
 	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
+
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
+
 	dc->caps.max_downscale_ratio = 600;
 	dc->caps.i2c_speed_in_khz = 100;
 	dc->caps.i2c_speed_in_khz_hdcp = 5; /*1.5 w/a applied by default*/
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +3 -0
index f7e2e79bc0e1..154e00c32511 100644
@@ -1830,6 +1830,9 @@ static bool dcn35_resource_construct(
 	clk_src_regs_init(3, D),
 	clk_src_regs_init(4, E);
 
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
+
 #undef REG_STRUCT
 #define REG_STRUCT abm_regs
 	abm_regs_init(0),
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +3 -0
index 5dffaf12a7c0..640650ed2184 100644
@@ -1803,6 +1803,9 @@ static bool dcn351_resource_construct(
 	clk_src_regs_init(3, D),
 	clk_src_regs_init(4, E);
 
+	/* Enable 4to1MPC by default */
+	dc->config.allow_4to1MPC = true;
+
 #undef REG_STRUCT
 #define REG_STRUCT abm_regs
 	abm_regs_init(0),
Signature · 1 line
2.43.0
#9 lore raw

PATCH v2 9/30 drm/amd/display: Fix Silence Conversion Warnings in Dmub

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

Fix Conversion that might result in a loss of data warnings in dmub/src/:

- dmub_dcn20/31/32/35/42/60/401.c: Add ASSERT(value <= 0xFF) and explicit (uint8_t) cast when storing REG_GET results into uint8_t debug struct fields. Add != 0 for bool assignments from uint32_t bitfield reads.
- dmub_reg.c: Cast va_arg shift value to uint8_t with ASSERT guard before passing to set_reg_field_value_masks().
- dmub_srv.c: Widen num_pending to uint64_t to match uint64_t arithmetic; use != 0 for bool assignments from unsigned expressions.

No functional change intended.

---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 18 ++++++++++-----
 .../gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 21 +++++++++++------
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 15 ++++++++----
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 17 +++++++++-----
 .../drm/amd/display/dmub/src/dmub_dcn401.c    | 21 +++++++++++------
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.c | 23 ++++++++++++-------
 .../gpu/drm/amd/display/dmub/src/dmub_reg.c   |  3 ++-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  8 +++----
 8 files changed, 82 insertions(+), 44 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +12 -6
index 54df2147e4dc..73221ca53b7d 100644
@@ -460,20 +460,26 @@ void dmub_dcn20_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.inbox0_size = REG_READ(DMCUB_INBOX0_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_SEC_CNTL, DMCUB_SEC_RESET_STATUS, &is_sec_reset);
-	dmub->debug.is_dmcub_secure_reset = is_sec_reset;
+	ASSERT(is_sec_reset <= 0xFF);
+	dmub->debug.is_dmcub_secure_reset = (uint8_t)is_sec_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_ENABLE, &is_cw0_enabled);
-	dmub->debug.is_cw0_enabled = is_cw0_enabled;
+	ASSERT(is_cw0_enabled <= 0xFF);
+	dmub->debug.is_cw0_enabled = (uint8_t)is_cw0_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +14 -7
index a0cefc03b21d..244244f3df80 100644
@@ -466,25 +466,32 @@ void dmub_dcn31_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &is_pwait);
-	dmub->debug.is_pwait = is_pwait;
+	ASSERT(is_pwait <= 0xFF);
+	dmub->debug.is_pwait = (uint8_t)is_pwait;
 
 	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_SEC_CNTL, DMCUB_SEC_RESET_STATUS, &is_sec_reset);
-	dmub->debug.is_dmcub_secure_reset = is_sec_reset;
+	ASSERT(is_sec_reset <= 0xFF);
+	dmub->debug.is_dmcub_secure_reset = (uint8_t)is_sec_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_ENABLE, &is_cw0_enabled);
-	dmub->debug.is_cw0_enabled = is_cw0_enabled;
+	ASSERT(is_cw0_enabled <= 0xFF);
+	dmub->debug.is_cw0_enabled = (uint8_t)is_cw0_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 }
 
 bool dmub_dcn31_should_detect(struct dmub_srv *dmub)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +10 -5
index 2f99a2772599..5d86f649db4b 100644
@@ -486,19 +486,24 @@ void dmub_dcn32_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &is_pwait);
-	dmub->debug.is_pwait = is_pwait;
+	ASSERT(is_pwait <= 0xFF);
+	dmub->debug.is_pwait = (uint8_t)is_pwait;
 
 	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	dmub->debug.gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +11 -6
index 639f9835e5e9..f9b16eb8ef8e 100644
@@ -402,7 +402,7 @@ void dmub_dcn35_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
 	union dmub_fw_boot_options boot_options = {0};
 
 	if (!dmub->dpia_supported) {
-		dmub->dpia_supported = dmub_dcn35_get_fw_boot_option(dmub).bits.enable_dpia;
+		dmub->dpia_supported = dmub_dcn35_get_fw_boot_option(dmub).bits.enable_dpia != 0;
 	}
 
 	boot_options.bits.z10_disable = params->disable_z10;
@@ -508,19 +508,24 @@ void dmub_dcn35_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &is_pwait);
-	dmub->debug.is_pwait = is_pwait;
+	ASSERT(is_pwait <= 0xFF);
+	dmub->debug.is_pwait = (uint8_t)is_pwait;
 
 	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	dmub->debug.gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +14 -7
index 16ed07f0e96d..3d2307d0ce49 100644
@@ -473,25 +473,32 @@ void dmub_dcn401_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &is_pwait);
-	dmub->debug.is_pwait = is_pwait;
+	ASSERT(is_pwait <= 0xFF);
+	dmub->debug.is_pwait = (uint8_t)is_pwait;
 
 	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_SEC_CNTL, DMCUB_SEC_RESET_STATUS, &is_sec_reset);
-	dmub->debug.is_dmcub_secure_reset = is_sec_reset;
+	ASSERT(is_sec_reset <= 0xFF);
+	dmub->debug.is_dmcub_secure_reset = (uint8_t)is_sec_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_ENABLE, &is_cw0_enabled);
-	dmub->debug.is_cw0_enabled = is_cw0_enabled;
+	ASSERT(is_cw0_enabled <= 0xFF);
+	dmub->debug.is_cw0_enabled = (uint8_t)is_cw0_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	dmub->debug.gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c +15 -8
index f687359b7d83..7b870b831199 100644
@@ -41,7 +41,7 @@ void dmub_dcn42_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmu
 	union dmub_fw_boot_options boot_options = {0};
 
 	if (!dmub->dpia_supported) {
-		dmub->dpia_supported = dmub_dcn42_get_fw_boot_option(dmub).bits.enable_dpia;
+		dmub->dpia_supported = dmub_dcn42_get_fw_boot_option(dmub).bits.enable_dpia != 0;
 	}
 
 	boot_options.bits.z10_disable = params->disable_z10;
@@ -676,25 +676,32 @@ void dmub_dcn42_get_diagnostic_data(struct dmub_srv *dmub)
 	dmub->debug.outbox1_size = REG_READ(DMCUB_OUTBOX1_SIZE);
 
 	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_dmub_enabled);
-	dmub->debug.is_dmcub_enabled = is_dmub_enabled;
+	ASSERT(is_dmub_enabled <= 0xFF);
+	dmub->debug.is_dmcub_enabled = (uint8_t)is_dmub_enabled;
 
 	REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &is_pwait);
-	dmub->debug.is_pwait = is_pwait;
+	ASSERT(is_pwait <= 0xFF);
+	dmub->debug.is_pwait = (uint8_t)is_pwait;
 
 	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &is_soft_reset);
-	dmub->debug.is_dmcub_soft_reset = is_soft_reset;
+	ASSERT(is_soft_reset <= 0xFF);
+	dmub->debug.is_dmcub_soft_reset = (uint8_t)is_soft_reset;
 
 	REG_GET(DMCUB_SEC_CNTL, DMCUB_SEC_RESET_STATUS, &is_sec_reset);
-	dmub->debug.is_dmcub_secure_reset = is_sec_reset;
+	ASSERT(is_sec_reset <= 0xFF);
+	dmub->debug.is_dmcub_secure_reset = (uint8_t)is_sec_reset;
 
 	REG_GET(DMCUB_CNTL, DMCUB_TRACEPORT_EN, &is_traceport_enabled);
-	dmub->debug.is_traceport_en  = is_traceport_enabled;
+	ASSERT(is_traceport_enabled <= 0xFF);
+	dmub->debug.is_traceport_en  = (uint8_t)is_traceport_enabled;
 
 	REG_GET(DMCUB_REGION3_CW0_TOP_ADDRESS, DMCUB_REGION3_CW0_ENABLE, &is_cw0_enabled);
-	dmub->debug.is_cw0_enabled = is_cw0_enabled;
+	ASSERT(is_cw0_enabled <= 0xFF);
+	dmub->debug.is_cw0_enabled = (uint8_t)is_cw0_enabled;
 
 	REG_GET(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, &is_cw6_enabled);
-	dmub->debug.is_cw6_enabled = is_cw6_enabled;
+	ASSERT(is_cw6_enabled <= 0xFF);
+	dmub->debug.is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	dmub->debug.gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c +2 -1
index ca0c8a54b635..94f4931d3d44 100644
@@ -57,8 +57,9 @@ static void set_reg_field_values(struct dmub_reg_value_masks *field_value_mask,
 		mask = va_arg(ap, uint32_t);
 		field_value = va_arg(ap, uint32_t);
 
+		ASSERT(shift <= 0xFF);
 		set_reg_field_value_masks(field_value_mask, field_value, mask,
-					  shift);
+					  (uint8_t)shift);
 		i++;
 	}
 }
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +4 -4
index 3bba256a288d..10d23f5f5d94 100644
@@ -1034,8 +1034,8 @@ enum dmub_status dmub_srv_wait_for_auto_load(struct dmub_srv *dmub,
 static void dmub_srv_update_reg_inbox0_status(struct dmub_srv *dmub)
 {
 	if (dmub->reg_inbox0.is_pending) {
-		dmub->reg_inbox0.is_pending = dmub->hw_funcs.read_reg_inbox0_rsp_int_status &&
-				!dmub->hw_funcs.read_reg_inbox0_rsp_int_status(dmub);
+		dmub->reg_inbox0.is_pending = (dmub->hw_funcs.read_reg_inbox0_rsp_int_status &&
+				!dmub->hw_funcs.read_reg_inbox0_rsp_int_status(dmub)) != 0;
 
 		if (!dmub->reg_inbox0.is_pending) {
 			/* ack the rsp interrupt */
@@ -1320,7 +1320,7 @@ void dmub_srv_set_power_state(struct dmub_srv *dmub, enum dmub_srv_power_state_t
 
 enum dmub_status dmub_srv_reg_cmd_execute(struct dmub_srv *dmub, union dmub_rb_cmd *cmd)
 {
-	uint32_t num_pending = 0;
+	uint64_t num_pending = 0;
 
 	if (!dmub->hw_init)
 		return DMUB_STATUS_INVALID;
@@ -1348,7 +1348,7 @@ enum dmub_status dmub_srv_reg_cmd_execute(struct dmub_srv *dmub, union dmub_rb_c
 
 	dmub->reg_inbox0.num_submitted++;
 	dmub->reg_inbox0.is_pending = true;
-	dmub->reg_inbox0.is_multi_pending = cmd->cmd_common.header.multi_cmd_pending;
+	dmub->reg_inbox0.is_multi_pending = cmd->cmd_common.header.multi_cmd_pending != 0;
 
 	return DMUB_STATUS_OK;
 }
Signature · 1 line
2.43.0
#10 lore raw

PATCH v2 10/30 drm/amd/display: eliminate clock manager code duplication

In reply to ChuanYu Tseng

From: Gabe Teeger <[email protected]>

[Why]
Clock manager contained significant duplicate code between variants with identical logic for functions using only SMU calls or shared registers. This increases maintenance overhead and potential for bugs.

[How]
Expose clock constants and internal functions in header for sharing. Remove duplicate implementations and update function pointers to use shared functions. Refactor remaining variant-specific functions to use shared constants and helper functions. Add compatibility comments for hardware differences.

---
 .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c  | 26 ++++++++++---------
 .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h  |  8 +++++-
 2 files changed, 21 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +14 -12
index b4c6522e922c..97f182bfc9ca 100644
@@ -43,8 +43,6 @@
 #define DC_LOGGER_INIT(logger) \
 	struct dal_logger *dc_logger = logger
 
-#define DCN42_CLKIP_REFCLK 48000
-
 #undef FN
 #define FN(reg_name, field_name) \
 	clk_mgr->clk_mgr_shift->field_name, clk_mgr->clk_mgr_mask->field_name
@@ -255,6 +253,10 @@ void dcn42_update_clocks(struct clk_mgr *clk_mgr_base,
 			dcn42_smu_set_zstate_support(clk_mgr, DCN_ZSTATE_SUPPORT_DISALLOW);
 			clk_mgr_base->clks.zstate_support = new_clocks->zstate_support;
 		}
+		/* Only attempt to enable dtbclk if currently disabled AND new state requests it.
+		 * For dcn42b (no dtbclk hardware), init_clk_states sets dtbclk_en=false and
+		 * new_clocks->dtbclk_en should always be false, so this block never executes.
+		 */
 		if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) {
 			int actual_dtbclk = 0;
 
@@ -326,7 +328,7 @@ void dcn42_update_clocks(struct clk_mgr *clk_mgr_base,
 	}
 
 	/* clock limits are received with MHz precision, divide by 1000 to prevent setting clocks at every call */
-	if (!dc->debug.disable_dtb_ref_clk_switch &&
+	if (!dc->debug.disable_dtb_ref_clk_switch && new_clocks->dtbclk_en &&
 	    should_set_clock(safe_to_lower, new_clocks->ref_dtbclk_khz / 1000,
 			     clk_mgr_base->clks.ref_dtbclk_khz / 1000)) {
 		dcn42_update_clocks_update_dtb_dto(clk_mgr, context, new_clocks->ref_dtbclk_khz);
@@ -519,7 +521,7 @@ static void init_clk_states(struct clk_mgr *clk_mgr)
 	clk_mgr->clks.zstate_support = DCN_ZSTATE_SUPPORT_UNKNOWN;
 }
 
-static void dcn42_get_dpm_table_from_smu(struct clk_mgr_internal *clk_mgr,
+void dcn42_get_dpm_table_from_smu(struct clk_mgr_internal *clk_mgr,
 		struct dcn42_smu_dpm_clks *smu_dpm_clks)
 {
 	DpmClocks_t_dcn42 *table = smu_dpm_clks->dpm_clks;
@@ -842,7 +844,7 @@ static void dcn42_init_clocks_fpga(struct clk_mgr *clk_mgr)
 
 }
 
-static void dcn42_update_clocks_fpga(struct clk_mgr *clk_mgr,
+void dcn42_update_clocks_fpga(struct clk_mgr *clk_mgr,
 		struct dc_state *context,
 		bool safe_to_lower)
 {
@@ -895,13 +897,13 @@ static void dcn42_update_clocks_fpga(struct clk_mgr *clk_mgr,
 	// Both fclk and ref_dppclk run on the same scemi clock.
 	clk_mgr_int->dccg->ref_dppclk = clk_mgr->clks.fclk_khz;
 
-	/* TODO: set dtbclk in correct place */
-	clk_mgr->clks.dtbclk_en = true;
-
 	dm_set_dcn_clocks(clk_mgr->ctx, &clk_mgr->clks);
+	if (clk_mgr->clks.dtbclk_en) {
+		dcn42_update_clocks_update_dtb_dto(clk_mgr_int, context, clk_mgr->clks.ref_dtbclk_khz);
+	} else {
+		clk_mgr->clks.ref_dtbclk_khz = 0;
+	}
 	dcn42_update_clocks_update_dpp_dto(clk_mgr_int, context, safe_to_lower);
-
-	dcn42_update_clocks_update_dtb_dto(clk_mgr_int, context, clk_mgr->clks.ref_dtbclk_khz);
 }
 
 unsigned int dcn42_get_max_clock_khz(struct clk_mgr *clk_mgr_base, enum clk_type clk_type)
@@ -933,7 +935,7 @@ unsigned int dcn42_get_max_clock_khz(struct clk_mgr *clk_mgr_base, enum clk_type
 	return 0;
 }
 
-static int dcn42_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base)
+int dcn42_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;
@@ -954,7 +956,7 @@ bool dcn42_is_smu_present(struct clk_mgr *clk_mgr_base)
 	return clk_mgr->smu_present;
 }
 
-static void dcn42_get_smu_clocks(struct clk_mgr_internal *clk_mgr_int)
+void dcn42_get_smu_clocks(struct clk_mgr_internal *clk_mgr_int)
 {
 	struct clk_mgr *clk_mgr_base = &clk_mgr_int->base;
 	struct dcn42_smu_dpm_clks smu_dpm_clks = { 0 };
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h +7 -1
index 5ad027a9edaf..42aea81fb61c 100644
@@ -27,6 +27,7 @@
 #include "clk_mgr_internal.h"
 
 #define NUM_CLOCK_SOURCES 5
+#define DCN42_CLKIP_REFCLK 48000
 
 struct dcn42_watermarks;
 
@@ -71,9 +72,14 @@ void dcn42_set_low_power_state(struct clk_mgr *clk_mgr_base);
 void dcn42_exit_low_power_state(struct clk_mgr *clk_mgr_base);
 unsigned int dcn42_get_max_clock_khz(struct clk_mgr *clk_mgr_base, enum clk_type clk_type);
 bool dcn42_is_smu_present(struct clk_mgr *clk_mgr_base);
+bool dcn42_has_active_display(struct dc *dc, const struct dc_state *context);
 int dcn42_get_active_display_cnt_wa(struct dc *dc, struct dc_state *context, int *all_active_disps);
 void dcn42_update_clocks_update_dpp_dto(struct clk_mgr_internal *clk_mgr, struct dc_state *context, bool safe_to_lower);
 void dcn42_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr, struct dc_state *context, int ref_dtbclk_khz);
 bool dcn42_is_spll_ssc_enabled(struct clk_mgr *clk_mgr_base);
-bool dcn42_has_active_display(struct dc *dc, const struct dc_state *context);
+struct dcn42_smu_dpm_clks; /* Forward declaration for pointer parameter below */
+void dcn42_get_dpm_table_from_smu(struct clk_mgr_internal *clk_mgr, struct dcn42_smu_dpm_clks *smu_dpm_clks);
+void dcn42_get_smu_clocks(struct clk_mgr_internal *clk_mgr_int);
+void dcn42_update_clocks_fpga(struct clk_mgr *clk_mgr, struct dc_state *context, bool safe_to_lower);
+int dcn42_get_dispclk_from_dentist(struct clk_mgr *clk_mgr_base);
 #endif //__DCN42_CLK_MGR_H__
Signature · 1 line
2.43.0
#11 lore raw

PATCH v2 11/30 drm/amd/display: Fix Silence signed/unsighed mismatch warning in dc

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

[Why]
Implicit signed-to-unsigned conversions caused compiler warnings in DC paths.

[How]
Added explicit (unsigned int)/(uint32_t) casts for sentinel -1 assignments and IRQ ~MASK initializers, with small cast alignment in logging/DPCD code.

Functionality and behavior is unchanged; only type intent is explicit.

---
 drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c    |  8 ++++----
 .../amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c   |  2 +-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c    |  2 +-
 .../gpu/drm/amd/display/dc/dce/dce_clock_source.c    |  6 +++---
 .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c   |  8 ++++----
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c |  4 ++--
 .../gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c   |  4 ++--
 drivers/gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c |  2 +-
 .../drm/amd/display/dc/hwss/dce110/dce110_hwseq.c    | 12 ++++++------
 .../amd/display/dc/irq/dce110/irq_service_dce110.c   | 10 +++++-----
 .../amd/display/dc/irq/dce120/irq_service_dce120.c   |  2 +-
 .../drm/amd/display/dc/irq/dce80/irq_service_dce80.c | 10 +++++-----
 .../drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c |  2 +-
 .../drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c |  2 +-
 .../drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c |  2 +-
 .../drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c |  2 +-
 .../amd/display/dc/irq/dcn302/irq_service_dcn302.c   |  4 ++--
 .../amd/display/dc/irq/dcn303/irq_service_dcn303.c   |  2 +-
 .../drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c |  4 ++--
 .../amd/display/dc/irq/dcn314/irq_service_dcn314.c   |  4 ++--
 .../amd/display/dc/irq/dcn315/irq_service_dcn315.c   |  4 ++--
 .../drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c |  4 ++--
 .../drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c |  4 ++--
 .../amd/display/dc/irq/dcn351/irq_service_dcn351.c   |  4 ++--
 .../drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c |  4 ++--
 .../amd/display/dc/irq/dcn401/irq_service_dcn401.c   |  4 ++--
 .../drm/amd/display/dc/irq/dcn42/irq_service_dcn42.c |  4 ++--
 drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c |  2 +-
 .../amd/display/dc/resource/dce100/dce100_resource.c |  4 ++--
 .../amd/display/dc/resource/dce112/dce112_resource.c |  2 +-
 .../amd/display/dc/resource/dce120/dce120_resource.c |  2 +-
 .../amd/display/dc/resource/dce80/dce80_resource.c   |  6 +++---
 .../amd/display/dc/resource/dcn10/dcn10_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn20/dcn20_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn21/dcn21_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn30/dcn30_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn301/dcn301_resource.c |  2 +-
 .../amd/display/dc/resource/dcn302/dcn302_resource.c |  2 +-
 .../amd/display/dc/resource/dcn303/dcn303_resource.c |  2 +-
 .../amd/display/dc/resource/dcn31/dcn31_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn314/dcn314_resource.c |  2 +-
 .../amd/display/dc/resource/dcn315/dcn315_resource.c |  2 +-
 .../amd/display/dc/resource/dcn316/dcn316_resource.c |  2 +-
 .../amd/display/dc/resource/dcn32/dcn32_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn321/dcn321_resource.c |  2 +-
 .../amd/display/dc/resource/dcn35/dcn35_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn351/dcn351_resource.c |  2 +-
 .../amd/display/dc/resource/dcn36/dcn36_resource.c   |  2 +-
 .../amd/display/dc/resource/dcn401/dcn401_resource.c |  2 +-
 .../amd/display/dc/resource/dcn42/dcn42_resource.c   |  2 +-
 50 files changed, 86 insertions(+), 86 deletions(-)
drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c +4 -4
index 4da5adab799c..070195c5393e 100644
@@ -2010,10 +2010,10 @@ static void calculate_bandwidth(
 	}
 	/*output link bit per pixel supported*/
 	for (k = 0; k <= maximum_number_of_surfaces - 1; k++) {
-		data->output_bpphdmi[k] = bw_def_na;
-		data->output_bppdp4_lane_hbr[k] = bw_def_na;
-		data->output_bppdp4_lane_hbr2[k] = bw_def_na;
-		data->output_bppdp4_lane_hbr3[k] = bw_def_na;
+		data->output_bpphdmi[k] = (uint32_t)bw_def_na;
+		data->output_bppdp4_lane_hbr[k] = (uint32_t)bw_def_na;
+		data->output_bppdp4_lane_hbr2[k] = (uint32_t)bw_def_na;
+		data->output_bppdp4_lane_hbr3[k] = (uint32_t)bw_def_na;
 		if (data->enable[k]) {
 			data->output_bpphdmi[k] = bw_fixed_to_int(bw_mul(bw_div(bw_min2(bw_int_to_fixed(600), data->max_phyclk), data->pixel_rate[k]), bw_int_to_fixed(24)));
 			if (bw_meq(data->max_phyclk, bw_int_to_fixed(270))) {
drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +1 -1
index d50b9440210e..cd4c45516616 100644
@@ -92,7 +92,7 @@ static int determine_sclk_from_bounding_box(
 uint32_t dce110_get_min_vblank_time_us(const struct dc_state *context)
 {
 	uint8_t j;
-	uint32_t min_vertical_blank_time = -1;
+	uint32_t min_vertical_blank_time = (uint32_t)-1;
 
 	for (j = 0; j < context->stream_count; j++) {
 		struct dc_stream_state *stream = context->streams[j];
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
index 727bcf08a84f..e95d5b269738 100644
@@ -5240,7 +5240,7 @@ unsigned int resource_pixel_format_to_bpp(enum surface_pixel_format format)
 		return 64;
 	default:
 		ASSERT_CRITICAL(false);
-		return -1;
+		return UINT_MAX;
 	}
 }
 static unsigned int get_max_audio_sample_rate(struct audio_mode *modes)
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +3 -3
index b4f5b4a6331a..993a25c39aa9 100644
@@ -610,7 +610,7 @@ static uint32_t dce112_get_pix_clk_dividers(
 			|| pix_clk_params->requested_pix_clk_100hz == 0) {
 		DC_LOG_ERROR(
 			"%s: Invalid parameters!!\n", __func__);
-		return -1;
+		return (uint32_t)-1;
 	}
 
 	memset(pll_settings, 0, sizeof(*pll_settings));
@@ -621,7 +621,7 @@ static uint32_t dce112_get_pix_clk_dividers(
 		pll_settings->calculated_pix_clk_100hz = clk_src->ext_clk_khz * 10;
 		pll_settings->actual_pix_clk_100hz =
 					pix_clk_params->requested_pix_clk_100hz;
-		return -1;
+		return (uint32_t)-1;
 	}
 
 	dce112_get_pix_clk_dividers_helper(clk_src,
@@ -1376,7 +1376,7 @@ static uint32_t dcn3_get_pix_clk_dividers(
 			|| pix_clk_params->requested_pix_clk_100hz == 0) {
 		DC_LOG_ERROR(
 			"%s: Invalid parameters!!\n", __func__);
-		return -1;
+		return UINT_MAX;
 	}
 
 	memset(pll_settings, 0, sizeof(*pll_settings));
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +4 -4
index dcd2cdfe91eb..c702a30563f9 100644
@@ -381,10 +381,10 @@ bool cm_helper_translate_curve_to_hw_format(struct dc_context *ctx,
 	}
 
 	for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++)
-		seg_distr[i] = -1;
+		seg_distr[i] = (uint32_t)-1;
 
 	for (k = 0; k < MAX_REGIONS_NUMBER; k++) {
-		if (seg_distr[k] != -1)
+		if (seg_distr[k] != (uint32_t)-1)
 			hw_points += (1 << seg_distr[k]);
 	}
 
@@ -565,7 +565,7 @@ bool cm_helper_translate_curve_to_degamma_hw_format(
 
 
 	for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++)
-		seg_distr[i] = -1;
+		seg_distr[i] = (uint32_t)-1;
 	/* 12 segments
 	 * segments are from 2^-12 to 0
 	 */
@@ -573,7 +573,7 @@ bool cm_helper_translate_curve_to_degamma_hw_format(
 		seg_distr[i] = 4;
 
 	for (k = 0; k < MAX_REGIONS_NUMBER; k++) {
-		if (seg_distr[k] != -1)
+		if (seg_distr[k] != (uint32_t)-1)
 			hw_points += (1 << seg_distr[k]);
 	}
 
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c +2 -2
index a0d437f0ce2b..f73c5f42ea68 100644
@@ -746,7 +746,7 @@ bool dwb_program_horz_scalar(struct dcn20_dwbc *dwbc20,
 		src_width, dest_width);
 
 	if (dc_fixpt_floor(tmp_h_ratio_luma) == 8)
-		h_ratio_luma = -1;
+		h_ratio_luma = (uint32_t)-1;
 	else
 		h_ratio_luma = dc_fixpt_u3d19(tmp_h_ratio_luma) << 5;
 
@@ -824,7 +824,7 @@ bool dwb_program_vert_scalar(struct dcn20_dwbc *dwbc20,
 		src_height, dest_height);
 
 	if (dc_fixpt_floor(tmp_v_ratio_luma) == 8)
-		v_ratio_luma = -1;
+		v_ratio_luma = (uint32_t)-1;
 	else
 		v_ratio_luma = dc_fixpt_u3d19(tmp_v_ratio_luma) << 5;
 
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_cm_common.c +2 -2
index 227aa8672d17..9dbccf58dde5 100644
@@ -159,10 +159,10 @@ bool cm3_helper_translate_curve_to_hw_format(struct dc_context *ctx,
 	}
 
 	for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++)
-		seg_distr[i] = -1;
+		seg_distr[i] = (uint32_t)-1;
 
 	for (k = 0; k < MAX_REGIONS_NUMBER; k++) {
-		if (seg_distr[k] != -1)
+		if (seg_distr[k] != (uint32_t)-1)
 			hw_points += (1 << seg_distr[k]);
 	}
 
drivers/gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c +1 -1
index c5e84190c17a..5679b79d6f53 100644
@@ -76,7 +76,7 @@ struct _vcs_dpi_ip_params_st dcn1_0_ip = {
 	.line_buffer_size_bits = 589824,
 	.max_line_buffer_lines = 12,
 	.IsLineBufferBppFixed = 0,
-	.LineBufferFixedBpp = -1,
+	.LineBufferFixedBpp = (unsigned int)-1,
 	.writeback_luma_buffer_size_kbytes = 12,
 	.writeback_chroma_buffer_size_kbytes = 8,
 	.max_num_dpp = 4,
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +6 -6
index d2025779d036..e4bd6089026b 100644
@@ -488,15 +488,15 @@ dce110_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,
 		seg_distr[8] = 4;
 		seg_distr[9] = 4;
 		seg_distr[10] = 0;
-		seg_distr[11] = -1;
-		seg_distr[12] = -1;
-		seg_distr[13] = -1;
-		seg_distr[14] = -1;
-		seg_distr[15] = -1;
+		seg_distr[11] = (uint32_t)-1;
+		seg_distr[12] = (uint32_t)-1;
+		seg_distr[13] = (uint32_t)-1;
+		seg_distr[14] = (uint32_t)-1;
+		seg_distr[15] = (uint32_t)-1;
 	}
 
 	for (k = 0; k < 16; k++) {
-		if (seg_distr[k] != -1)
+		if (seg_distr[k] != (uint32_t)-1)
 			hw_points += (1 << seg_distr[k]);
 	}
 
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +5 -5
index bb576a9c5fdb..1994a5f40ee9 100644
@@ -92,7 +92,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		.enable_mask = DC_HPD_INT_CONTROL__DC_HPD_INT_EN_MASK,\
 		.enable_value = {\
 			DC_HPD_INT_CONTROL__DC_HPD_INT_EN_MASK,\
-			~DC_HPD_INT_CONTROL__DC_HPD_INT_EN_MASK\
+			(uint32_t)~DC_HPD_INT_CONTROL__DC_HPD_INT_EN_MASK\
 		},\
 		.ack_reg = mmHPD ## reg_num ## _DC_HPD_INT_CONTROL,\
 		.ack_mask = DC_HPD_INT_CONTROL__DC_HPD_INT_ACK_MASK,\
@@ -107,7 +107,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		.enable_mask = DC_HPD_INT_CONTROL__DC_HPD_RX_INT_EN_MASK,\
 		.enable_value = {\
 			DC_HPD_INT_CONTROL__DC_HPD_RX_INT_EN_MASK,\
-			~DC_HPD_INT_CONTROL__DC_HPD_RX_INT_EN_MASK },\
+			(uint32_t)~DC_HPD_INT_CONTROL__DC_HPD_RX_INT_EN_MASK },\
 		.ack_reg = mmHPD ## reg_num ## _DC_HPD_INT_CONTROL,\
 		.ack_mask = DC_HPD_INT_CONTROL__DC_HPD_RX_INT_ACK_MASK,\
 		.ack_value = DC_HPD_INT_CONTROL__DC_HPD_RX_INT_ACK_MASK,\
@@ -121,7 +121,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK,\
 		.enable_value = {\
 			GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK,\
-			~GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK},\
+			(uint32_t)~GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK},\
 		.ack_reg = mmDCP ## reg_num ## _GRPH_INTERRUPT_STATUS,\
 		.ack_mask = GRPH_INTERRUPT_STATUS__GRPH_PFLIP_INT_CLEAR_MASK,\
 		.ack_value = GRPH_INTERRUPT_STATUS__GRPH_PFLIP_INT_CLEAR_MASK,\
@@ -136,7 +136,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK,\
 		.enable_value = {\
 			CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK,\
-			~CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK},\
+			(uint32_t)~CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK},\
 		.ack_reg = mmCRTC ## reg_num ## _CRTC_V_UPDATE_INT_STATUS,\
 		.ack_mask =\
 		CRTC_V_UPDATE_INT_STATUS__CRTC_V_UPDATE_INT_CLEAR_MASK,\
@@ -152,7 +152,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK,\
 		.enable_value = {\
 			CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK,\
-			~CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK},\
+			(uint32_t)~CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK},\
 		.ack_reg = mmCRTC ## reg_num ## _CRTC_VERTICAL_INTERRUPT0_CONTROL,\
 		.ack_mask =\
 		CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK,\
drivers/gpu/drm/amd/display/dc/irq/dce120/irq_service_dce120.c +1 -1
index 33ce470e4c88..6e2554503e90 100644
@@ -79,7 +79,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dce80/irq_service_dce80.c +5 -5
index 3a9163acb49b..41e5b6fd176f 100644
@@ -68,7 +68,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		.enable_mask = DC_HPD1_INT_CONTROL__DC_HPD1_INT_EN_MASK,\
 		.enable_value = {\
 			DC_HPD1_INT_CONTROL__DC_HPD1_INT_EN_MASK,\
-			~DC_HPD1_INT_CONTROL__DC_HPD1_INT_EN_MASK\
+			(uint32_t)~DC_HPD1_INT_CONTROL__DC_HPD1_INT_EN_MASK\
 		},\
 		.ack_reg = mmDC_HPD ## reg_num ## _INT_CONTROL,\
 		.ack_mask = DC_HPD1_INT_CONTROL__DC_HPD1_INT_ACK_MASK,\
@@ -83,7 +83,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		.enable_mask = DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_EN_MASK,\
 		.enable_value = {\
 				DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_EN_MASK,\
-			~DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_EN_MASK },\
+			(uint32_t)~DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_EN_MASK },\
 		.ack_reg = mmDC_HPD ## reg_num ## _INT_CONTROL,\
 		.ack_mask = DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_ACK_MASK,\
 		.ack_value = DC_HPD1_INT_CONTROL__DC_HPD1_RX_INT_ACK_MASK,\
@@ -98,7 +98,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK,\
 		.enable_value = {\
 			GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK,\
-			~GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK},\
+			(uint32_t)~GRPH_INTERRUPT_CONTROL__GRPH_PFLIP_INT_MASK_MASK},\
 		.ack_reg = mmDCP ## reg_num ## _GRPH_INTERRUPT_STATUS,\
 		.ack_mask = GRPH_INTERRUPT_STATUS__GRPH_PFLIP_INT_CLEAR_MASK,\
 		.ack_value = GRPH_INTERRUPT_STATUS__GRPH_PFLIP_INT_CLEAR_MASK,\
@@ -113,7 +113,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK,\
 		.enable_value = {\
 			CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK,\
-			~CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK},\
+			(uint32_t)~CRTC_INTERRUPT_CONTROL__CRTC_V_UPDATE_INT_MSK_MASK},\
 		.ack_reg = mmCRTC ## reg_num ## _CRTC_V_UPDATE_INT_STATUS,\
 		.ack_mask =\
 		CRTC_V_UPDATE_INT_STATUS__CRTC_V_UPDATE_INT_CLEAR_MASK,\
@@ -129,7 +129,7 @@ static struct irq_source_info_funcs vupdate_irq_info_funcs = {
 		CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK,\
 		.enable_value = {\
 			CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK,\
-			~CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK},\
+			(uint32_t)~CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK},\
 		.ack_reg = mmCRTC ## reg_num ## _CRTC_VERTICAL_INTERRUPT0_CONTROL,\
 		.ack_mask =\
 		CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK,\
drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c +1 -1
index 4ce9edd16344..8c8fc1c6b4ec 100644
@@ -176,7 +176,7 @@ static struct irq_source_info_funcs vupdate_no_lock_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c +1 -1
index 5847af0e66cb..59516b6f84a3 100644
@@ -179,7 +179,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c +1 -1
index 71d2f065140b..8253a5f7adcb 100644
@@ -189,7 +189,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c +1 -1
index 2a4080bdcf6b..cd128b6fab73 100644
@@ -196,7 +196,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c +2 -2
index 624f1ac309f8..adef0e4ae2bb 100644
@@ -180,7 +180,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		.enable_mask = block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 		.enable_value = {\
 				block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-				~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+				(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 		},\
 		.ack_reg = SRI(reg2, block, reg_num),\
 		.ack_mask = block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
@@ -199,7 +199,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c +1 -1
index 137caffae916..639d649915e5 100644
@@ -123,7 +123,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		.enable_mask = block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 		.enable_value = {\
 				block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-				~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+				(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 		},\
 		.ack_reg = SRI(reg2, block, reg_num),\
 		.ack_mask = block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c +2 -2
index 921cb167d920..18049aa0dbd2 100644
@@ -184,7 +184,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -198,7 +198,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c +2 -2
index 0118fd6e5db0..e86f3c03d4d4 100644
@@ -186,7 +186,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -200,7 +200,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c +2 -2
index adebfc888618..5f9d90f37ffe 100644
@@ -191,7 +191,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -205,7 +205,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c +2 -2
index e9e315c75d76..436461730db3 100644
@@ -195,7 +195,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -209,7 +209,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c +2 -2
index 79e5e8c137ca..8d252ccbb297 100644
@@ -184,7 +184,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base + reg_num].enable_value[0] = \
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base + reg_num].enable_value[1] = \
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base + reg_num].ack_reg = SRI(reg2, block, reg_num),\
 	REG_STRUCT[base + reg_num].ack_mask = \
 		block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
@@ -198,7 +198,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base].enable_value[0] = \
 		reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base].enable_value[1] = \
-		~reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base].ack_reg = SRI_DMUB(reg2),\
 	REG_STRUCT[base].ack_mask = \
 		reg2 ## __ ## mask2 ## _MASK,\
drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c +2 -2
index 163b8ee9ebf7..3e2f53308cde 100644
@@ -163,7 +163,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base + reg_num].enable_value[0] = \
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base + reg_num].enable_value[1] = \
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base + reg_num].ack_reg = SRI(reg2, block, reg_num),\
 	REG_STRUCT[base + reg_num].ack_mask = \
 		block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
@@ -177,7 +177,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base].enable_value[0] = \
 		reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base].enable_value[1] = \
-		~reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base].ack_reg = SRI_DMUB(reg2),\
 	REG_STRUCT[base].ack_mask = \
 		reg2 ## __ ## mask2 ## _MASK,\
drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c +2 -2
index f716ab0fd30e..2540e8dc93a0 100644
@@ -162,7 +162,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base + reg_num].enable_value[0] = \
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base + reg_num].enable_value[1] = \
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base + reg_num].ack_reg = SRI(reg2, block, reg_num),\
 	REG_STRUCT[base + reg_num].ack_mask = \
 		block ## reg_num ## _ ## reg2 ## __ ## mask2 ## _MASK,\
@@ -176,7 +176,7 @@ static struct irq_source_info_funcs vline0_irq_info_funcs = {
 	REG_STRUCT[base].enable_value[0] = \
 		reg1 ## __ ## mask1 ## _MASK,\
 	REG_STRUCT[base].enable_value[1] = \
-		~reg1 ## __ ## mask1 ## _MASK, \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK, \
 	REG_STRUCT[base].ack_reg = SRI_DMUB(reg2),\
 	REG_STRUCT[base].ack_mask = \
 		reg2 ## __ ## mask2 ## _MASK,\
drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c +2 -2
index fd9bb1950c20..dcfafcee0587 100644
@@ -175,7 +175,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -189,7 +189,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/irq/dcn42/irq_service_dcn42.c +2 -2
index 19e0741c62cd..bdf733d37a76 100644
@@ -173,7 +173,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK,\
-		~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~block ## reg_num ## _ ## reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI(reg2, block, reg_num),\
 	.ack_mask = \
@@ -187,7 +187,7 @@ static struct irq_source_info_funcs vline2_irq_info_funcs = {
 		reg1 ## __ ## mask1 ## _MASK,\
 	.enable_value = {\
 		reg1 ## __ ## mask1 ## _MASK,\
-		~reg1 ## __ ## mask1 ## _MASK \
+		(uint32_t)~reg1 ## __ ## mask1 ## _MASK \
 	},\
 	.ack_reg = SRI_DMUB(reg2),\
 	.ack_mask = \
drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c +1 -1
index 6bfd2c1294e5..8b398b9a2b6b 100644
@@ -1428,7 +1428,7 @@ uint32_t mpcc3_acquire_rmu(struct mpc *mpc, int mpcc_id, int rmu_idx)
 	}
 
 	//no vacant RMU units or invalid parameters acquire_post_bldn_3dlut
-	return -1;
+	return (uint32_t)-1;
 }
 
 static int mpcc3_release_rmu(struct mpc *mpc, int mpcc_id)
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +2 -2
index 05f7ff60f8f5..82d76e7276a3 100644
@@ -1042,7 +1042,7 @@ static bool dce100_resource_construct(
 
 	pool->base.res_cap = &res_cap;
 	pool->base.funcs = &dce100_res_pool_funcs;
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 
 	bp = ctx->dc_bios;
 
@@ -1114,7 +1114,7 @@ static bool dce100_resource_construct(
 	/*************************************************
 	*  Resource + asic cap harcoding                *
 	*************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = res_cap.num_timing_generator;
 	pool->base.timing_generator_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 200;
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +1 -1
index 3f0a6bc4dcc2..294f3f5016b8 100644
@@ -1240,7 +1240,7 @@ static bool dce112_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.timing_generator_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 200;
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +1 -1
index 92890784caa6..5dd80d2279d2 100644
@@ -1082,7 +1082,7 @@ static bool dce120_resource_construct(
 	/* TODO: Fill more data from GreenlandAsicCapability.cpp */
 	pool->base.pipe_count = res_cap.num_timing_generator;
 	pool->base.timing_generator_count = pool->base.res_cap->num_timing_generator;
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 
 	dc->caps.max_downscale_ratio = 200;
 	dc->caps.i2c_speed_in_khz = 100;
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +3 -3
index a68e799d5885..bf889f40d9ff 100644
@@ -937,7 +937,7 @@ static bool dce80_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = res_cap.num_timing_generator;
 	pool->base.timing_generator_count = res_cap.num_timing_generator;
 	dc->caps.max_downscale_ratio = 200;
@@ -1140,7 +1140,7 @@ static bool dce81_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = res_cap_81.num_timing_generator;
 	pool->base.timing_generator_count = res_cap_81.num_timing_generator;
 	dc->caps.max_downscale_ratio = 200;
@@ -1340,7 +1340,7 @@ static bool dce83_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = res_cap_83.num_timing_generator;
 	pool->base.timing_generator_count = res_cap_83.num_timing_generator;
 	dc->caps.max_downscale_ratio = 200;
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +1 -1
index 9c1a57a1f989..70d7ca0b0f86 100644
@@ -1348,7 +1348,7 @@ static bool dcn10_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 
 	/* max pipe num for ASIC before check pipe fuses */
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 -1
index 7d49a6003f03..e8d232006dbf 100644
@@ -2430,7 +2430,7 @@ static bool dcn20_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 
 	dc->caps.max_downscale_ratio = 200;
 	dc->caps.i2c_speed_in_khz = 100;
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +1 -1
index a612c8932da9..959001d0a578 100644
@@ -1409,7 +1409,7 @@ static bool dcn21_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 
 	/* max pipe num for ASIC before check pipe fuses */
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +1 -1
index 2c606d9042a2..0c70677b4544 100644
@@ -2301,7 +2301,7 @@ static bool dcn30_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +1 -1
index 65781c10e83c..97b6c4ee8532 100644
@@ -1432,7 +1432,7 @@ static bool dcn301_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +1 -1
index 7c4c5c8aa4b6..bb3edfe86a1f 100644
@@ -1218,7 +1218,7 @@ static bool dcn302_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->pipe_count = pool->res_cap->num_timing_generator;
 	pool->mpcc_count = pool->res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +1 -1
index 360934bc5481..db627b4aa76a 100644
@@ -1159,7 +1159,7 @@ static bool dcn303_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->pipe_count = pool->res_cap->num_timing_generator;
 	pool->mpcc_count = pool->res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +1 -1
index 6d23d88e400c..9d7520a384ae 100644
@@ -1898,7 +1898,7 @@ static bool dcn31_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -1
index 7b1f426652be..ee1d48158d3c 100644
@@ -1831,7 +1831,7 @@ static bool dcn314_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -1
index 10feb64c0010..9ded310c74b6 100644
@@ -1870,7 +1870,7 @@ static bool dcn315_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 
 	/* Enable 4to1MPC by default */
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +1 -1
index 835bedfd6074..cab523733ce4 100644
@@ -1745,7 +1745,7 @@ static bool dcn316_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -1
index 5c0658a609a8..0b419877c8bc 100644
@@ -2195,7 +2195,7 @@ static bool dcn32_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.timing_generator_count = num_pipes;
 	pool->base.pipe_count = num_pipes;
 	pool->base.mpcc_count = num_pipes;
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +1 -1
index b254e22a7628..38c9e79e891a 100644
@@ -1699,7 +1699,7 @@ static bool dcn321_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.timing_generator_count = num_pipes;
 	pool->base.pipe_count = num_pipes;
 	pool->base.mpcc_count = num_pipes;
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
index 154e00c32511..2d8a5f157988 100644
@@ -1853,7 +1853,7 @@ static bool dcn35_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -1
index 640650ed2184..9ed3d4879f76 100644
@@ -1826,7 +1826,7 @@ static bool dcn351_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -1
index 40894afd990e..d849d9eeb121 100644
@@ -1829,7 +1829,7 @@ static bool dcn36_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
 	pool->base.mpcc_count = pool->base.res_cap->num_timing_generator;
 	dc->caps.max_downscale_ratio = 600;
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +1 -1
index 7ac2f38bfde8..78bb1def9a0c 100644
@@ -1919,7 +1919,7 @@ static bool dcn401_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.timing_generator_count = num_pipes;
 	pool->base.pipe_count = num_pipes;
 	pool->base.mpcc_count = num_pipes;
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -1
index 6328b3dc35f9..11b302c4d06f 100644
@@ -1864,7 +1864,7 @@ static bool dcn42_resource_construct(
 	/*************************************************
 	 *  Resource + asic cap harcoding                *
 	 *************************************************/
-	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
+	pool->base.underlay_pipe_index = (unsigned int)NO_UNDERLAY_PIPE;
 	pool->base.timing_generator_count = pool->base.res_cap->num_timing_generator;
 	pool->base.pipe_count = num_pipes;
 	pool->base.mpcc_count = num_pipes;
Signature · 1 line
2.43.0
#12 lore raw

PATCH v2 12/30 drm/amd/display: Fix silence signed/unsigned mismatch warnings in dml

In reply to ChuanYu Tseng

From: Clay King <[email protected]>

[Why & How]
Fix signed/unsigned mismatch warnings by using the same signedness for a given value

---
 .../drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h   |  1 +
 .../drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c  | 10 +++++-----
 .../amd/display/dc/dml2_0/dml2_translation_helper.c    |  4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h +1 -0
index 42aea81fb61c..9568ca06f00f 100644
@@ -74,6 +74,7 @@ unsigned int dcn42_get_max_clock_khz(struct clk_mgr *clk_mgr_base, enum clk_type
 bool dcn42_is_smu_present(struct clk_mgr *clk_mgr_base);
 bool dcn42_has_active_display(struct dc *dc, const struct dc_state *context);
 int dcn42_get_active_display_cnt_wa(struct dc *dc, struct dc_state *context, int *all_active_disps);
+bool dcn42_has_active_display(struct dc *dc, const struct dc_state *context);
 void dcn42_update_clocks_update_dpp_dto(struct clk_mgr_internal *clk_mgr, struct dc_state *context, bool safe_to_lower);
 void dcn42_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr, struct dc_state *context, int ref_dtbclk_khz);
 bool dcn42_is_spll_ssc_enabled(struct clk_mgr *clk_mgr_base);
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c +5 -5
index fd3c61509f1b..40f2f1ebab3a 100644
@@ -35,7 +35,7 @@
 #define MAX_MPCC_FACTOR 4
 
 struct dc_plane_pipe_pool {
-	int pipes_assigned_to_plane[MAX_ODM_FACTOR][MAX_MPCC_FACTOR];
+	unsigned int pipes_assigned_to_plane[MAX_ODM_FACTOR][MAX_MPCC_FACTOR];
 	bool pipe_used[MAX_ODM_FACTOR][MAX_MPCC_FACTOR];
 	int num_pipes_assigned_to_plane_for_mpcc_combine;
 	int num_pipes_assigned_to_plane_for_odm_combine;
@@ -340,8 +340,8 @@ static bool is_pipe_in_candidate_array(const unsigned int pipe_idx,
 static bool find_more_pipes_for_stream(struct dml2_context *ctx,
 	struct dc_state *state, // The state we want to find a free mapping in
 	unsigned int stream_id, // The stream we want this pipe to drive
-	int *assigned_pipes,
-	int *assigned_pipe_count,
+	unsigned int *assigned_pipes,
+	unsigned int *assigned_pipe_count,
 	int pipes_needed,
 	const struct dc_state *existing_state) // The state (optional) that we want to minimize remapping relative to
 {
@@ -406,8 +406,8 @@ static bool find_more_pipes_for_stream(struct dml2_context *ctx,
 static bool find_more_free_pipes(struct dml2_context *ctx,
 	struct dc_state *state, // The state we want to find a free mapping in
 	unsigned int stream_id, // The stream we want this pipe to drive
-	int *assigned_pipes,
-	int *assigned_pipe_count,
+	unsigned int *assigned_pipes,
+	unsigned int *assigned_pipe_count,
 	int pipes_needed,
 	const struct dc_state *existing_state) // The state (optional) that we want to minimize remapping relative to
 {
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c +2 -2
index e25b88f2d6b9..57f45b27de1d 100644
@@ -330,8 +330,8 @@ void dml2_init_soc_states(struct dml2_context *dml2, const struct dc *in_dc,
 {
 	struct dml2_policy_build_synthetic_soc_states_scratch *s = &dml2->v20.scratch.create_scratch.build_synthetic_socbb_scratch;
 	struct dml2_policy_build_synthetic_soc_states_params *p = &dml2->v20.scratch.build_synthetic_socbb_params;
-	unsigned int dcfclk_stas_mhz[NUM_DCFCLK_STAS] = {0};
-	unsigned int dcfclk_stas_mhz_new[NUM_DCFCLK_STAS_NEW] = {0};
+	int dcfclk_stas_mhz[NUM_DCFCLK_STAS] = {0};
+	int dcfclk_stas_mhz_new[NUM_DCFCLK_STAS_NEW] = {0};
 	unsigned int dml_project = dml2->v20.dml_core_ctx.project;
 
 	unsigned int i = 0;
Signature · 1 line
2.43.0
#13 lore raw

PATCH v2 13/30 drm/amd/dc: Add link output control for DPIA

In reply to ChuanYu Tseng

From: Lincheng Ku <[email protected]>

[Why]
To support specific sequencing requirements for DPIA link output

[How]
Implement the dpia_link_hwss structure and define the necessary control function pointers. The initialization order is aligned with the core link_hwss definition to ensure consistency

---
 .../amd/display/dc/link/hwss/link_hwss_dpia.c  | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dpia.c +11 -7
index 81bf3c5e1fdf..5d708039c7cf 100644
@@ -145,13 +145,9 @@ static void disable_dpia_link_output(struct dc_link *link,
 }
 
 static const struct link_hwss dpia_link_hwss = {
-	.setup_stream_encoder = setup_dio_stream_encoder,
-	.reset_stream_encoder = reset_dio_stream_encoder,
-	.setup_stream_attribute = setup_dio_stream_attribute,
-	.disable_link_output = disable_dpia_link_output,
-	.setup_audio_output = setup_dio_audio_output,
-	.enable_audio_packet = enable_dio_audio_packet,
-	.disable_audio_packet = disable_dio_audio_packet,
+	/* Ensure initialization order matches the declaration in link_hwss.h
+     * for strict compiler compliance and consistency across HWSS implementations
+     */
 	.ext = {
 		.set_throttled_vcp_size = set_dio_throttled_vcp_size,
 		.enable_dp_link_output = enable_dpia_link_output,
@@ -159,6 +155,14 @@ static const struct link_hwss dpia_link_hwss = {
 		.set_dp_lane_settings = set_dio_dpia_lane_settings,
 		.update_stream_allocation_table = update_dpia_stream_allocation_table,
 	},
+
+	.setup_stream_encoder = setup_dio_stream_encoder,
+	.reset_stream_encoder = reset_dio_stream_encoder,
+	.setup_stream_attribute = setup_dio_stream_attribute,
+	.disable_link_output = disable_dpia_link_output,
+	.setup_audio_output = setup_dio_audio_output,
+	.enable_audio_packet = enable_dio_audio_packet,
+	.disable_audio_packet = disable_dio_audio_packet,
 };
 
 bool can_use_dpia_link_hwss(const struct dc_link *link,
Signature · 1 line
2.43.0
#14 lore raw

PATCH v2 14/30 drm/amd/display: Fixed silence signed/unsigned mismatch warnings

In reply to ChuanYu Tseng

From: Clay King <[email protected]>

Fix compiler warnings by consistently use the same signedness for a given value

---
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c         | 4 ++--
 drivers/gpu/drm/amd/display/dc/core/dc.c                 | 9 +++------
 drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c    | 4 ++--
 drivers/gpu/drm/amd/display/dc/dc.h                      | 2 +-
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c            | 3 +--
 drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c    | 2 +-
 .../gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c    | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c  | 4 ++--
 .../gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c    | 2 +-
 drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c  | 4 ++--
 13 files changed, 19 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +2 -2
index d2e2e8f29967..f1a639328ab0 100644
@@ -97,7 +97,7 @@ void clk_mgr_exit_optimized_pwr_state(const struct dc *dc, struct clk_mgr *clk_m
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
-	int edp_num;
+	unsigned int edp_num;
 	unsigned int panel_inst;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
@@ -123,7 +123,7 @@ void clk_mgr_optimize_pwr_state(const struct dc *dc, struct clk_mgr *clk_mgr)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
-	int edp_num;
+	unsigned int edp_num;
 	unsigned int panel_inst;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -6
index 5d27666bbc7f..6ff1377c4dc5 100644
@@ -1563,8 +1563,7 @@ static void detect_edp_presence(struct dc *dc)
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
 	enum dc_connection_type type;
-	int i;
-	int edp_num;
+	unsigned int i, edp_num;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
 	if (!edp_num)
@@ -6264,8 +6263,7 @@ void dc_disable_accelerated_mode(struct dc *dc)
  */
 void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bool enable)
 {
-	int i;
-	int edp_num;
+	unsigned int i, edp_num;
 	struct pipe_ctx *pipe = NULL;
 	struct dc_link *link = stream->sink->link;
 	struct dc_link *edp_links[MAX_NUM_EDP];
@@ -6319,8 +6317,7 @@ bool dc_abm_save_restore(
 		struct dc_stream_state *stream,
 		struct abm_save_restore *pData)
 {
-	int i;
-	int edp_num;
+	unsigned int i, edp_num;
 	struct pipe_ctx *pipe = NULL;
 	struct dc_link *link = stream->sink->link;
 	struct dc_link *edp_links[MAX_NUM_EDP];
drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c +2 -2
index 7bb4504889be..f4e99ca7918f 100644
@@ -46,7 +46,7 @@ struct dc_link *dc_get_link_at_index(struct dc *dc, uint32_t link_index)
 
 void dc_get_edp_links(const struct dc *dc,
 		struct dc_link **edp_links,
-		int *edp_num)
+		unsigned int *edp_num)
 {
 	int i;
 
@@ -68,7 +68,7 @@ bool dc_get_edp_link_panel_inst(const struct dc *dc,
 		unsigned int *inst_out)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
-	int edp_num, i;
+	unsigned int edp_num, i;
 
 	*inst_out = 0;
 	if (link->connector_signal != SIGNAL_TYPE_EDP)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 41b5dedb6eff..48b523fabbbe 100644
@@ -2062,7 +2062,7 @@ bool dc_get_edp_link_panel_inst(const struct dc *dc,
 /* Return an array of link pointers to edp links. */
 void dc_get_edp_links(const struct dc *dc,
 		struct dc_link **edp_links,
-		int *edp_num);
+		unsigned int *edp_num);
 
 void dc_set_edp_power(const struct dc *dc, struct dc_link *edp_link,
 				 bool powerOn);
drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c +1 -2
index 3b9011ef9b68..2764125d63b3 100644
@@ -41,8 +41,7 @@ static unsigned int abm_feature_support(struct abm *abm, unsigned int panel_inst
 {
 	struct dc_context *dc = abm->ctx;
 	struct dc_link *edp_links[MAX_NUM_EDP];
-	int i;
-	int edp_num;
+	unsigned int i, edp_num;
 	unsigned int ret = ABM_FEATURE_NO_SUPPORT;
 
 	dc_get_edp_links(dc->dc, edp_links, &edp_num);
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +1 -1
index d0ffa99f1fe0..52673e2f504c 100644
@@ -82,7 +82,7 @@ bool dmub_hw_lock_mgr_does_link_require_lock(const struct dc *dc, const struct d
 
 	if (link->psr_settings.psr_version == DC_PSR_VERSION_1) {
 		struct dc_link *edp_links[MAX_NUM_EDP];
-		int edp_num;
+		unsigned int edp_num;
 
 		dc_get_edp_links(dc, edp_links, &edp_num);
 		if (edp_num == 1)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +1 -1
index e4bd6089026b..8f56f164d567 100644
@@ -1986,7 +1986,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 	struct pipe_ctx *pipe_ctx = NULL;
 	struct dce_hwseq *hws = dc->hwseq;
 	int edp_with_sink_num;
-	int edp_num;
+	unsigned int edp_num;
 	int edp_stream_num;
 	int i;
 	bool can_apply_edp_fast_boot = false;
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +1 -1
index ffeec61824f5..29673a7b92ec 100644
@@ -1904,7 +1904,7 @@ void dcn10_power_down_on_boot(struct dc *dc)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
-	int edp_num;
+	unsigned int edp_num;
 	int i = 0;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +1 -1
index d04cfd403b7e..34d4519b3a17 100644
@@ -645,7 +645,7 @@ void dcn30_init_hw(struct dc *dc)
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	struct resource_pool *res_pool = dc->res_pool;
 	int i;
-	int edp_num;
+	unsigned int edp_num;
 	uint32_t backlight = MAX_BACKLIGHT_LEVEL;
 	uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +1 -1
index e5d93dd348dd..ef08c98b11e9 100644
@@ -793,7 +793,7 @@ void dcn32_init_hw(struct dc *dc)
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	struct resource_pool *res_pool = dc->res_pool;
 	int i;
-	int edp_num;
+	unsigned int edp_num;
 	uint32_t backlight = MAX_BACKLIGHT_LEVEL;
 	uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +2 -2
index b5f60f59382e..7c25911089b8 100644
@@ -520,7 +520,7 @@ void dcn35_power_down_on_boot(struct dc *dc)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
-	int edp_num;
+	unsigned int edp_num;
 	int i = 0;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
@@ -921,7 +921,7 @@ void dcn35_calc_blocks_to_gate(struct dc *dc, struct dc_state *context,
 	bool hpo_frl_stream_enc_acquired = false;
 	bool hpo_dp_stream_enc_acquired = false;
 	int i = 0, j = 0;
-	int edp_num = 0;
+	unsigned int edp_num = 0;
 	struct dc_link *edp_links[MAX_NUM_EDP] = { NULL };
 
 	memset(update_state, 0, sizeof(struct pg_block_update));
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -1
index ca611b3c22d3..56d4c350d8c9 100644
@@ -140,7 +140,7 @@ void dcn401_init_hw(struct dc *dc)
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	struct resource_pool *res_pool = dc->res_pool;
 	int i;
-	int edp_num;
+	unsigned int edp_num;
 	uint32_t backlight = MAX_BACKLIGHT_LEVEL;
 	uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 	int current_dchub_ref_freq = 0;
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +2 -2
index 7f9c121c00e6..ba1813eb3c6c 100644
@@ -66,7 +66,7 @@ void dcn42_init_hw(struct dc *dc)
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	struct resource_pool *res_pool = dc->res_pool;
 	int i;
-	int edp_num;
+	unsigned int edp_num;
 	uint32_t backlight = MAX_BACKLIGHT_LEVEL;
 	uint32_t user_level = MAX_BACKLIGHT_LEVEL;
 	bool dchub_ref_freq_changed;
@@ -1063,7 +1063,7 @@ void dcn42_power_down_on_boot(struct dc *dc)
 {
 	struct dc_link *edp_links[MAX_NUM_EDP];
 	struct dc_link *edp_link = NULL;
-	int edp_num;
+	unsigned int edp_num;
 	int i = 0;
 
 	dc_get_edp_links(dc, edp_links, &edp_num);
Signature · 1 line
2.43.0
#15 lore raw

PATCH v2 15/30 drm/amd/dc: Disable PSR & Replay CRTC disable by default

In reply to ChuanYu Tseng

From: Ovidiu Bunea <[email protected]>

[why & how]
Let IPS FSM handle OTG disable.

---
 drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +2 -0
index 11b302c4d06f..f2a6e260f061 100644
@@ -761,6 +761,8 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.ignore_pg = true,
 	.disable_stutter_for_wm_program = true,
 	.min_deep_sleep_dcfclk_khz = 8000,
+	.replay_skip_crtc_disabled = true,
+	.psr_skip_crtc_disable = true,
 };
 
 static const struct dc_check_config config_defaults = {
Signature · 1 line
2.43.0
#16 lore raw

PATCH v2 16/30 Revert "drm/amd/display: Rework YCbCr422 DSC policy"

In reply to ChuanYu Tseng

From: Relja Vojvodic <[email protected]>

Revert commit 085d98740327 ("drm/amd/display: Rework YCbCr422 DSC policy")

Reason for Revert:
This commit is causing compliance failures

---
 drivers/gpu/drm/amd/display/dc/dc.h                 |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_dsc.h             |  1 -
 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c         | 13 +++++++------
 .../gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c    |  2 +-
 .../gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c    |  2 +-
 .../gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c  |  2 +-
 .../gpu/drm/amd/display/dc/link/link_detection.c    | 11 ++++++-----
 drivers/gpu/drm/amd/display/dc/link/link_dpms.c     |  3 +--
 .../amd/display/dc/resource/dcn31/dcn31_resource.c  |  2 --
 .../display/dc/resource/dcn315/dcn315_resource.c    |  2 --
 10 files changed, 18 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 48b523fabbbe..ab7dea9d47f7 100644
@@ -563,7 +563,6 @@ struct dc_config {
 	bool frame_update_cmd_version2;
 	struct spl_sharpness_range dcn_sharpness_range;
 	struct spl_sharpness_range dcn_override_sharpness_range;
-	bool no_native422_support;
 };
 
 enum visual_confirm {
@@ -988,6 +987,7 @@ struct link_service;
  * causing an issue or not.
  */
 struct dc_debug_options {
+	bool native422_support;
 	bool disable_dsc;
 	enum visual_confirm visual_confirm;
 	int visual_confirm_rect_height;
drivers/gpu/drm/amd/display/dc/dc_dsc.h +0 -1
index 101bce6b8de6..9d18f1c08079 100644
@@ -52,7 +52,6 @@ struct dc_dsc_policy {
 	uint32_t max_target_bpp;
 	uint32_t min_target_bpp;
 	bool enable_dsc_when_not_needed;
-	bool ycbcr422_simple;
 };
 
 struct dc_dsc_config_options {
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +7 -6
index 8dfb6dd14eb2..5b3584ad5b6b 100644
@@ -680,6 +680,9 @@ static void get_dsc_enc_caps(
 	} else {
 		build_dsc_enc_caps(dsc, dsc_enc_caps);
 	}
+
+	if (dsc->ctx->dc->debug.native422_support)
+		dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
 }
 
 /* Returns 'false' if no intersection was found for at least one capability.
@@ -1097,14 +1100,13 @@ static bool setup_dsc_config(
 		branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_0_mps;
 		break;
 	case PIXEL_ENCODING_YCBCR422:
-		if (policy.ycbcr422_simple) {
+		is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422;
+		sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps;
+		branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps;
+		if (!is_dsc_possible) {
 			is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_SIMPLE_422;
 			dsc_cfg->ycbcr422_simple = is_dsc_possible;
 			sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_0_mps;
-		} else {
-			is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422;
-			sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps;
-			branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps;
 		}
 		break;
 	case PIXEL_ENCODING_YCBCR420:
@@ -1404,7 +1406,6 @@ void dc_dsc_get_policy_for_timing(const struct dc_crtc_timing *timing,
 		policy->min_target_bpp = 8;
 		/* DP specs limits to 3 x bpc */
 		policy->max_target_bpp = 3 * bpc;
-		policy->ycbcr422_simple = true;
 		break;
 	case PIXEL_ENCODING_YCBCR420:
 		/* DP specs limits to 6 */
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c +1 -1
index 6e1e759462bf..242f1e6f0d8f 100644
@@ -100,7 +100,7 @@ void dsc2_get_enc_caps(struct dsc_enc_caps *dsc_enc_caps, int pixel_clock_100Hz)
 	dsc_enc_caps->color_formats.bits.RGB = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
-	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
+	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
 	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
 
 	dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c +1 -1
index 17acb64a9d80..e712985f7abd 100644
@@ -128,7 +128,7 @@ void dsc35_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsigned int m
 	dsc_enc_caps->color_formats.bits.RGB = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
-	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
+	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
 	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
 
 	dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +1 -1
index bbb8b5b18a4e..c1bdbb38c690 100644
@@ -78,7 +78,7 @@ static void dsc401_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsign
 	dsc_enc_caps->color_formats.bits.RGB = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
 	dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
-	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
+	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
 	dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
 
 	dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
drivers/gpu/drm/amd/display/dc/link/link_detection.c +6 -5
index 7f1761080aba..b761f330311f 100644
@@ -781,8 +781,10 @@ static void restore_phy_clocks_for_destructive_link_verification(const struct dc
 }
 
 static void verify_link_capability_destructive(struct dc_link *link,
+		struct dc_sink *sink,
 		enum dc_detect_reason reason)
 {
+	(void)sink;
 	bool should_prepare_phy_clocks =
 			should_prepare_phy_clocks_for_link_verification(link->dc, reason);
 
@@ -854,11 +856,11 @@ static bool should_verify_link_capability_destructively(struct dc_link *link,
 	return destrictive;
 }
 
-static void verify_link_capability(struct dc_link *link,
+static void verify_link_capability(struct dc_link *link, struct dc_sink *sink,
 		enum dc_detect_reason reason)
 {
 	if (should_verify_link_capability_destructively(link, reason))
-		verify_link_capability_destructive(link, reason);
+		verify_link_capability_destructive(link, sink, reason);
 	else
 		verify_link_capability_non_destructive(link);
 }
@@ -1452,9 +1454,8 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason)
 
 	is_local_sink_detect_success = detect_link_and_local_sink(link, reason);
 
-	if (is_local_sink_detect_success && link->local_sink) {
-		verify_link_capability(link, reason);
-	}
+	if (is_local_sink_detect_success && link->local_sink)
+		verify_link_capability(link, link->local_sink, reason);
 
 	DC_LOG_DC("%s: link_index=%d is_local_sink_detect_success=%d pre_link_type=%d link_type=%d\n", __func__,
 				link->link_index, is_local_sink_detect_success, pre_link_type, link->type);
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +1 -2
index e12c25896364..b4f46408a000 100644
@@ -181,8 +181,7 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
 	/* link can be also enabled by vbios. In this case it is not recorded
 	 * in pipe_ctx. Disable link phy here to make sure it is completely off
 	 */
-	if (dc_is_dp_signal(link->connector_signal))
-		dp_disable_link_phy(link, &link_res, link->connector_signal);
+	dp_disable_link_phy(link, &link_res, link->connector_signal);
 }
 
 void link_resume(struct dc_link *link)
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +0 -2
index 9d7520a384ae..e14b00cba962 100644
@@ -1967,8 +1967,6 @@ static bool dcn31_resource_construct(
 	dc->config.use_pipe_ctx_sync_logic = true;
 	dc->config.disable_hbr_audio_dp2 = true;
 
-	dc->config.no_native422_support = true;
-
 	/* read VBIOS LTTPR caps */
 	{
 		if (ctx->dc_bios->funcs->get_lttpr_caps) {
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +0 -2
index 9ded310c74b6..999fef8879be 100644
@@ -1930,8 +1930,6 @@ static bool dcn315_resource_construct(
 	dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
 	dc->caps.color.mpc.ocsc = 1;
 
-	dc->config.no_native422_support = true;
-
 	/* read VBIOS LTTPR caps */
 	{
 		if (ctx->dc_bios->funcs->get_lttpr_caps) {
Signature · 1 line
2.43.0
#17 lore raw

PATCH v2 17/30 drm/amd/display: enable eDP DSC seamless boot support

In reply to ChuanYu Tseng

From: Mohit Bawa <[email protected]>

[Why]
VBIOS supports DSC for seamless boot on newer hardware. Reading hardware state allows proper DSC validation without breaking existing boot display.

[What]
Remove DSC block for boot timing validation and implement hardware state reading to populate DSC configuration from VBIOS-configured state. Enhance dsc_read_state function in DCN401 to read additional DSC parameters.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 73 ++++++++++++++++++-
 .../amd/display/dc/dsc/dcn401/dcn401_dsc.c    |  5 ++
 drivers/gpu/drm/amd/display/dc/dsc/dsc.h      |  5 ++
 3 files changed, 80 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +70 -3
index 6ff1377c4dc5..1db99c14876a 100644
@@ -1922,10 +1922,77 @@ bool dc_validate_boot_timing(const struct dc *dc,
 		return false;
 	}
 
-	/* block DSC for now, as VBIOS does not currently support DSC timings */
 	if (crtc_timing->flags.DSC) {
-		DC_LOG_DEBUG("boot timing validation failed due to DSC\n");
-		return false;
+		struct display_stream_compressor *dsc = NULL;
+		struct dcn_dsc_state dsc_state = {0};
+
+		/* Find DSC associated with this timing generator */
+		if (tg_inst < dc->res_pool->res_cap->num_dsc) {
+			dsc = dc->res_pool->dscs[tg_inst];
+		}
+
+		if (!dsc || !dsc->funcs->dsc_read_state) {
+			DC_LOG_DEBUG("boot timing validation failed due to no DSC resource or read function\n");
+			return false;
+		}
+
+		/* Read current DSC hardware state */
+		dsc->funcs->dsc_read_state(dsc, &dsc_state);
+
+		/* Check if DSC is actually enabled in hardware */
+		if (dsc_state.dsc_clock_en == 0) {
+			DC_LOG_DEBUG("boot timing validation failed due to DSC not enabled in hardware\n");
+			return false;
+		}
+
+		uint32_t num_slices_h = 0;
+		uint32_t num_slices_v = 0;
+
+		if (dsc_state.dsc_slice_width > 0) {
+			num_slices_h = (crtc_timing->h_addressable + dsc_state.dsc_slice_width - 1) / dsc_state.dsc_slice_width;
+		}
+
+		if (dsc_state.dsc_slice_height > 0) {
+			num_slices_v = (crtc_timing->v_addressable + dsc_state.dsc_slice_height - 1) / dsc_state.dsc_slice_height;
+		}
+
+		if (crtc_timing->dsc_cfg.num_slices_h != num_slices_h) {
+			DC_LOG_DEBUG("boot timing validation failed due to num_slices_h mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.num_slices_v != num_slices_v) {
+			DC_LOG_DEBUG("boot timing validation failed due to num_slices_v mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.bits_per_pixel != dsc_state.dsc_bits_per_pixel) {
+			DC_LOG_DEBUG("boot timing validation failed due to bits_per_pixel mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.block_pred_enable != dsc_state.dsc_block_pred_enable) {
+			DC_LOG_DEBUG("boot timing validation failed due to block_pred_enable mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.linebuf_depth != dsc_state.dsc_line_buf_depth) {
+			DC_LOG_DEBUG("boot timing validation failed due to linebuf_depth mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.version_minor != dsc_state.dsc_version_minor) {
+			DC_LOG_DEBUG("boot timing validation failed due to version_minor mismatch\n");
+			return false;
+		}
+
+		if (crtc_timing->dsc_cfg.ycbcr422_simple != dsc_state.dsc_simple_422) {
+			DC_LOG_DEBUG("boot timing validation failed due to pixel encoding mismatch\n");
+			return false;
+		}
+
+		// Skip checks for is_frl, is_dp, and rc_buffer_size which are not programmed by vbios
+		// or not necessary for seamless boot validation.
 	}
 
 	if (dc_is_dp_signal(link->connector_signal)) {
drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +5 -0
index c1bdbb38c690..3bf737195bac 100644
@@ -107,6 +107,11 @@ void dsc401_read_state(struct display_stream_compressor *dsc, struct dcn_dsc_sta
 	REG_GET(DSCC_PPS_CONFIG7, SLICE_BPG_OFFSET, &s->dsc_slice_bpg_offset);
 	REG_GET_2(DSCRM_DSC_FORWARD_CONFIG, DSCRM_DSC_FORWARD_EN, &s->dsc_fw_en,
 		DSCRM_DSC_OPP_PIPE_SOURCE, &s->dsc_opp_source);
+	REG_GET(DSCC_PPS_CONFIG1, BLOCK_PRED_ENABLE, &s->dsc_block_pred_enable);
+	REG_GET(DSCC_PPS_CONFIG0, LINEBUF_DEPTH, &s->dsc_line_buf_depth);
+	REG_GET(DSCC_PPS_CONFIG0, DSC_VERSION_MINOR, &s->dsc_version_minor);
+	REG_GET(DSCC_CONFIG1, DSCC_RATE_CONTROL_BUFFER_MODEL_SIZE, &s->dsc_rc_buffer_size);
+	REG_GET(DSCC_PPS_CONFIG0, SIMPLE_422, &s->dsc_simple_422);
 }
 
 
drivers/gpu/drm/amd/display/dc/dsc/dsc.h +5 -0
index ad7ef83694ea..a16c60d8532f 100644
@@ -64,6 +64,11 @@ struct dcn_dsc_state {
 	uint32_t dsc_chunk_size;
 	uint32_t dsc_fw_en;
 	uint32_t dsc_opp_source;
+	uint32_t dsc_block_pred_enable;
+	uint32_t dsc_line_buf_depth;
+	uint32_t dsc_version_minor;
+	uint32_t dsc_rc_buffer_size;
+	uint32_t dsc_simple_422;
 };
 
 struct dcn_dsc_reg_state {
Signature · 1 line
2.43.0
#18 lore raw

PATCH v2 18/30 drm/amd/display: using cm structure for lut3d related info

In reply to ChuanYu Tseng

From: Dillon Varone <[email protected]>

[Why]
Using the alternative implementation via cm structure of config lut3d data

---
 .../dml2_0/dml21/dml21_translation_helper.c   | 26 ++++++++++++-------
 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +16 -10
index 847fab508750..eadf84842ca0 100644
@@ -601,27 +601,33 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
 
 	plane->composition.viewport.stationary = false;
 
-	if (plane_state->cm.flags.bits.lut3d_dma_enable) {
+	if (plane_state->mcm_luts.lut3d_data.lut3d_src == DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM) {
 		plane->tdlut.setup_for_tdlut = true;
 
-		switch (plane_state->cm.lut3d_dma.swizzle) {
-		case CM_LUT_3D_SWIZZLE_LINEAR_RGB:
-		case CM_LUT_3D_SWIZZLE_LINEAR_BGR:
+		switch (plane_state->mcm_luts.lut3d_data.gpu_mem_params.layout) {
+		case DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_RGB:
+		case DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_BGR:
 			plane->tdlut.tdlut_addressing_mode = dml2_tdlut_sw_linear;
 			break;
-		case CM_LUT_1D_PACKED_LINEAR:
-		default:
+		case DC_CM2_GPU_MEM_LAYOUT_1D_PACKED_LINEAR:
 			plane->tdlut.tdlut_addressing_mode = dml2_tdlut_simple_linear;
 			break;
 		}
 
-		switch (plane_state->cm.lut3d_dma.size) {
-		case CM_LUT_SIZE_333333:
+		switch (plane_state->mcm_luts.lut3d_data.gpu_mem_params.size) {
+		case DC_CM2_GPU_MEM_SIZE_171717:
+			plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;
+			break;
+		case DC_CM2_GPU_MEM_SIZE_333333:
 			plane->tdlut.tdlut_width_mode = dml2_tdlut_width_33_cube;
 			break;
-		case CM_LUT_SIZE_171717:
+		// handling when use case and HW support available
+		case DC_CM2_GPU_MEM_SIZE_454545:
+		case DC_CM2_GPU_MEM_SIZE_656565:
+			break;
+		case DC_CM2_GPU_MEM_SIZE_TRANSFORMED:
 		default:
-			plane->tdlut.tdlut_width_mode = dml2_tdlut_width_17_cube;
+			//plane->tdlut.tdlut_width_mode = dml2_tdlut_width_flatten; // dml2_tdlut_width_flatten undefined
 			break;
 		}
 	}
Signature · 1 line
2.43.0
#19 lore raw

PATCH v2 19/30 drm/amd/display: Remove invalid DPSTREAMCLK mask usage

In reply to ChuanYu Tseng

From: Roman Li <[email protected]>

[Why]
The invalid register field access causes ASSERT(mask != 0) to fire in set_reg_field_values() during display enable.

WARNING: at drivers/gpu/drm/amd/amdgpu/../display/dc/dc_helper.c:100
set_reg_field_values.isra.0+0xcf/0xf0 [amdgpu]
Call Trace:
 <TASK>
generic_reg_update_ex+0x66/0x1d0 [amdgpu]
dccg401_set_dpstreamclk+0xed/0x350 [amdgpu]
dcn401_enable_stream+0x165/0x370 [amdgpu]
link_set_dpms_on+0x6e9/0xe90 [amdgpu]
dce110_apply_single_controller_ctx_to_hw+0x343/0x530 [amdgpu]
dce110_apply_ctx_to_hw+0x1f6/0x2d0 [amdgpu]
dc_commit_state_no_check+0x49a/0xe20 [amdgpu]
dc_commit_streams+0x354/0x570 [amdgpu]
amdgpu_dm_atomic_commit_tail+0x6f8/0x3fc0 [amdgpu]

DCN4.x hardware does not have DPSTREAMCLK_GATE_DISABLE and DPSTREAMCLK_ROOT_GATE_DISABLE fields in DCCG_GATE_DISABLE_CNTL3. These global fields only exist in DCN3.1.x hardware.

[How]
Remove the call that tries to update non-existent fields in CNTL3. DCN4.x uses per-instance fields in CNTL5 instead,
which are already correctly programmed in the switch cases above.

---
 drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +0 -4
index 0cdf93c614b7..f4ead86c9a96 100644
@@ -526,10 +526,6 @@ static void dccg401_enable_dpstreamclk(struct dccg *dccg, int otg_inst, int dp_h
 		BREAK_TO_DEBUGGER();
 		return;
 	}
-	if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
-		REG_UPDATE_2(DCCG_GATE_DISABLE_CNTL3,
-			DPSTREAMCLK_GATE_DISABLE, 1,
-			DPSTREAMCLK_ROOT_GATE_DISABLE, 1);
 }
 
 void dccg401_disable_dpstreamclk(struct dccg *dccg, int dp_hpo_inst)
Signature · 1 line
2.43.0
#20 lore raw

PATCH v2 20/30 Revert "drm/amd/display: Add 3DLUT DMA broadcast support"

In reply to ChuanYu Tseng

From: Dillon Varone <[email protected]>

Revert commit 14978d267e12 ("drm/amd/display: Add 3DLUT DMA broadcast support")

[WHY&HOW]
Dependencies of this change are still causing issues, so reverting until those can be fixed.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 109 ++++++++----------
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h |   3 +-
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |   2 +-
 4 files changed, 49 insertions(+), 67 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 1db99c14876a..e0eba1bf2dde 100644
@@ -4671,7 +4671,7 @@ static void commit_planes_for_stream(struct dc *dc,
 						srf_updates[i].cm->flags.bits.lut3d_enable &&
 						srf_updates[i].cm->flags.bits.lut3d_dma_enable &&
 						dc->hwss.trigger_3dlut_dma_load)
-					dc->hwss.trigger_3dlut_dma_load(pipe_ctx);
+					dc->hwss.trigger_3dlut_dma_load(dc, pipe_ctx);
 
 				/*program triple buffer after lock based on flip type*/
 				if (dc->hwss.program_triplebuffer != NULL && dc->debug.enable_tri_buf) {
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +45 -64

152 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h +2 -1
index b9a03ffa2717..f78162ab859b 100644
@@ -41,7 +41,8 @@ bool dcn401_set_mcm_luts(struct pipe_ctx *pipe_ctx,
 bool dcn401_set_output_transfer_func(struct dc *dc,
 				struct pipe_ctx *pipe_ctx,
 				const struct dc_stream_state *stream);
-void dcn401_trigger_3dlut_dma_load(struct pipe_ctx *pipe_ctx);
+void dcn401_trigger_3dlut_dma_load(struct dc *dc,
+				struct pipe_ctx *pipe_ctx);
 void dcn401_calculate_dccg_tmds_div_value(struct pipe_ctx *pipe_ctx,
 				unsigned int *tmds_div);
 enum dc_status dcn401_enable_stream_timing(
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +1 -1
index 98abe0d2d30f..d1dba7ffcd9b 100644
@@ -1120,7 +1120,7 @@ struct hw_sequencer_funcs {
 	void (*program_output_csc)(struct dc *dc, struct pipe_ctx *pipe_ctx,
 			enum dc_color_space colorspace,
 			uint16_t *matrix, int opp_id);
-	void (*trigger_3dlut_dma_load)(struct pipe_ctx *pipe_ctx);
+	void (*trigger_3dlut_dma_load)(struct dc *dc, struct pipe_ctx *pipe_ctx);
 
 	/* VM Related */
 	int (*init_sys_ctx)(struct dce_hwseq *hws,
Signature · 1 line
2.43.0
#21 lore raw

PATCH v2 21/30 Revert "drm/amd/display: Refactor DC update checks"

In reply to ChuanYu Tseng

From: Dillon Varone <[email protected]>

Revert commit 90fe5f44136d ("drm/amd/display: Refactor DC update checks")

[WHY]
Causing issues with PSR/Replay, reverting until those can be fixed.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   6 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    |   2 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 482 +++++++++++-------
 drivers/gpu/drm/amd/display/dc/dc.h           |  22 +-
 4 files changed, 308 insertions(+), 204 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
index cc1127aaea9e..ecd0bdc0fd26 100644
@@ -9886,7 +9886,7 @@ static void amdgpu_dm_enable_self_refresh(struct amdgpu_crtc *acrtc_attach,
 	}
 
 	/* Decrement skip count when SR is enabled and we're doing fast updates. */
-	if (acrtc_state->update_type <= UPDATE_TYPE_FAST &&
+	if (acrtc_state->update_type == UPDATE_TYPE_FAST &&
 	    (psr->psr_feature_enabled || pr->config.replay_supported)) {
 		if (aconn->sr_skip_count > 0)
 			aconn->sr_skip_count--;
@@ -10094,7 +10094,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		 * fast updates.
 		 */
 		if (crtc->state->async_flip &&
-		    (acrtc_state->update_type > UPDATE_TYPE_FAST ||
+		    (acrtc_state->update_type != UPDATE_TYPE_FAST ||
 		     get_mem_type(old_plane_state->fb) != get_mem_type(fb)))
 			drm_warn_once(state->dev,
 				      "[PLANE:%d:%s] async flip with non-fast update\n",
@@ -10102,7 +10102,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 
 		bundle->flip_addrs[planes_count].flip_immediate =
 			crtc->state->async_flip &&
-			acrtc_state->update_type <= UPDATE_TYPE_FAST &&
+			acrtc_state->update_type == UPDATE_TYPE_FAST &&
 			get_mem_type(old_plane_state->fb) == get_mem_type(fb);
 
 		timestamp_ns = ktime_get_ns();
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +1 -1
index 50f2fb704539..39fcbc3e702d 100644
@@ -685,7 +685,7 @@ static int amdgpu_dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
 	 * pitch, the DCC state, rotation, etc.
 	 */
 	if (crtc_state->async_flip &&
-	    dm_crtc_state->update_type > UPDATE_TYPE_FAST) {
+	    dm_crtc_state->update_type != UPDATE_TYPE_FAST) {
 		drm_dbg_atomic(crtc->dev,
 			       "[CRTC:%d:%s] async flips are only supported for fast updates\n",
 			       crtc->base.id, crtc->name);
drivers/gpu/drm/amd/display/dc/core/dc.c +284 -198

851 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dc.h +20 -2
index ab7dea9d47f7..afc06dfc161f 100644
@@ -467,7 +467,6 @@ struct dc_static_screen_params {
  */
 
 enum surface_update_type {
-	UPDATE_TYPE_ADDR_ONLY, /* only surface address is being updated, no other programming needed */
 	UPDATE_TYPE_FAST, /* super fast, safe to execute in isr */
 	UPDATE_TYPE_MED,  /* ISR safe, most of programming needed, no bw/clk change*/
 	UPDATE_TYPE_FULL, /* may need to shuffle resources */
@@ -1881,6 +1880,20 @@ struct dc_scaling_info {
 	struct scaling_taps scaling_quality;
 };
 
+struct dc_fast_update {
+	const struct dc_flip_addrs *flip_addr;
+	const struct dc_gamma *gamma;
+	const struct colorspace_transform *gamut_remap_matrix;
+	const struct dc_csc_transform *input_csc_color_matrix;
+	const struct fixed31_32 *coeff_reduction_factor;
+	struct dc_transfer_func *out_transfer_func;
+	struct dc_csc_transform *output_csc_transform;
+	const struct dc_csc_transform *cursor_csc_color_matrix;
+#if defined(CONFIG_DRM_AMD_DC_DCN4_2)
+	struct cm_hist_control *cm_hist_control;
+#endif
+};
+
 struct dc_surface_update {
 	struct dc_plane_state *surface;
 
@@ -2019,7 +2032,12 @@ 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.
  *
Signature · 1 line
2.43.0
#22 lore raw

PATCH v2 22/30 drm/amd/display: correct unknown plane state patch

In reply to ChuanYu Tseng

From: Charlene Liu <[email protected]>

[why]
dcn42x is using same gfx as dcn35, i.e. not use gfx_address3.

---
 drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -1
index f2a6e260f061..9d6a989d6dd2 100644
@@ -1785,7 +1785,7 @@ static struct resource_funcs dcn42_res_pool_funcs = {
 	.acquire_post_bldn_3dlut = dcn32_acquire_post_bldn_3dlut,
 	.release_post_bldn_3dlut = dcn32_release_post_bldn_3dlut,
 	.update_bw_bounding_box = dcn42_update_bw_bounding_box,
-	.patch_unknown_plane_state = dcn401_patch_unknown_plane_state,
+	.patch_unknown_plane_state = dcn35_patch_unknown_plane_state,
 	.get_panel_config_defaults = dcn42_get_panel_config_defaults,
 	.get_preferred_eng_id_dpia = dcn42_get_preferred_eng_id_dpia,
 	.update_soc_for_wm_a = dcn30_update_soc_for_wm_a,
Signature · 1 line
2.43.0
#23 lore raw

PATCH v2 23/30 drm/amd/display: Move FPU Guards From DML To DC - Part 1

In reply to ChuanYu Tseng

From: Rafal Ostrowski <[email protected]>

[Why]
FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

[How]
Added DC_FP_START and DC_FP_END to DC functions that call DML functions using FPU.

---
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c    | 25 ++++++-
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.h    | 17 ++++-
 .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c  |  2 -
 .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  |  2 -
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  5 +-
 .../gpu/drm/amd/display/dc/core/dc_state.c    | 75 ++++++++++++++-----
 .../gpu/drm/amd/display/dc/core/dc_stream.c   | 13 +++-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  3 +-
 .../dc/resource/dcn35/dcn35_resource.c        | 10 ++-
 .../dc/resource/dcn35/dcn35_resource.h        |  1 +
 .../dc/resource/dcn351/dcn351_resource.c      | 10 ++-
 .../dc/resource/dcn36/dcn36_resource.c        |  4 +-
 .../dc/resource/dcn401/dcn401_resource.c      | 30 ++++++--
 .../dc/resource/dcn42/dcn42_resource.c        | 25 +++++--
 14 files changed, 169 insertions(+), 53 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.c +22 -3
index e46f8ce41d87..8ba9b4f56f87 100644
@@ -53,11 +53,30 @@ inline void dc_assert_fp_enabled(void)
 {
 	int depth;
 
-	depth = __this_cpu_read(fpu_recursion_depth);
+	depth = this_cpu_read(fpu_recursion_depth);
 
 	ASSERT(depth >= 1);
 }
 
+/**
+ * dc_assert_fp_enabled - Check if FPU protection is enabled
+ *
+ * This function tells if the code is already under FPU protection or not. A
+ * function that works as an API for a set of FPU operations can use this
+ * function for checking if the caller invoked it after DC_FP_START(). For
+ * example, take a look at dcn20_fpu.c file.
+ *
+ * Similar to dc_assert_fp_enabled, but does not assert, returns status instead.
+ */
+inline bool dc_is_fp_enabled(void)
+{
+	int depth;
+
+	depth = this_cpu_read(fpu_recursion_depth);
+
+	return (depth >= 1);
+}
+
 /**
  * dc_fpu_begin - Enables FPU protection
  * @function_name: A string containing the function name for debug purposes
@@ -77,7 +96,7 @@ void dc_fpu_begin(const char *function_name, const int line)
 
 	WARN_ON_ONCE(!in_task());
 	preempt_disable();
-	depth = __this_cpu_inc_return(fpu_recursion_depth);
+	depth = this_cpu_inc_return(fpu_recursion_depth);
 	if (depth == 1) {
 		BUG_ON(!kernel_fpu_available());
 		kernel_fpu_begin();
@@ -100,7 +119,7 @@ void dc_fpu_end(const char *function_name, const int line)
 {
 	int depth;
 
-	depth = __this_cpu_dec_return(fpu_recursion_depth);
+	depth = this_cpu_dec_return(fpu_recursion_depth);
 	if (depth == 0) {
 		kernel_fpu_end();
 	} else {
drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h +16 -1
index 4e921632bc4e..5e95419d3798 100644
@@ -28,15 +28,30 @@
 #define __DC_FPU_H__
 
 void dc_assert_fp_enabled(void);
+bool dc_is_fp_enabled(void);
 void dc_fpu_begin(const char *function_name, const int line);
 void dc_fpu_end(const char *function_name, const int line);
 
 #ifndef _LINUX_FPU_COMPILATION_UNIT
 #define DC_FP_START()	dc_fpu_begin(__func__, __LINE__)
 #define DC_FP_END()	dc_fpu_end(__func__, __LINE__)
+#ifdef CONFIG_DRM_AMD_DC_FP
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) \
+	do { \
+		bool dc_fp_enabled = dc_is_fp_enabled(); \
+		if (dc_fp_enabled) \
+			DC_FP_END(); \
+		code; \
+		if (dc_fp_enabled) \
+			DC_FP_START(); \
+	} while (0)
+#else
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
+#endif // !CONFIG_DRM_AMD_DC_FP
 #else
 #define DC_FP_START()	BUILD_BUG()
 #define DC_FP_END()	BUILD_BUG()
-#endif
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
+#endif // !_LINUX_FPU_COMPILATION_UNIT
 
 #endif /* __DC_FPU_H__ */
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +0 -2
index f2a716e1e732..4ad09b877b6e 100644
@@ -421,10 +421,8 @@ static void dcn3_get_memclk_states_from_smu(struct clk_mgr *clk_mgr_base)
 	clk_mgr_base->bw_params->dc_mode_softmax_memclk = dcn30_smu_get_dc_mode_max_dpm_freq(clk_mgr, PPCLK_UCLK);
 
 	/* Refresh bounding box */
-	DC_FP_START();
 	clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box(
 			clk_mgr->base.ctx->dc, clk_mgr_base->bw_params);
-	DC_FP_END();
 }
 
 static bool dcn3_is_smu_present(struct clk_mgr *clk_mgr_base)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +0 -2
index 7da7b41bd092..36d0c1e2014d 100644
@@ -1059,11 +1059,9 @@ static void dcn32_get_memclk_states_from_smu(struct clk_mgr *clk_mgr_base)
 	if (!clk_mgr->dpm_present)
 		dcn32_patch_dpm_table(clk_mgr_base->bw_params);
 
-	DC_FP_START();
 	/* Refresh bounding box */
 	clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box(
 			clk_mgr->base.ctx->dc, clk_mgr_base->bw_params);
-	DC_FP_END();
 }
 
 static bool dcn32_are_clock_states_equal(struct dc_clocks *a,
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -4
index e55ffdade662..2f938379aec7 100644
@@ -1096,11 +1096,8 @@ static bool dc_construct(struct dc *dc,
 #ifdef CONFIG_DRM_AMD_DC_FP
 	dc->clk_mgr->force_smu_not_present = init_params->force_smu_not_present;
 
-	if (dc->res_pool->funcs->update_bw_bounding_box) {
-		DC_FP_START();
+	if (dc->res_pool->funcs->update_bw_bounding_box)
 		dc->res_pool->funcs->update_bw_bounding_box(dc, dc->clk_mgr->bw_params);
-		DC_FP_END();
-	}
 	dc->soc_and_ip_translator = dc_create_soc_and_ip_translator(dc_ctx->dce_version);
 	if (!dc->soc_and_ip_translator)
 		goto fail;
drivers/gpu/drm/amd/display/dc/core/dc_state.c +55 -20

121 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/core/dc_stream.c +11 -2
index 87ecef6e699f..473fe959f5c7 100644
@@ -42,6 +42,13 @@
 #define MAX(x, y) ((x > y) ? x : y)
 #endif
 
+#include "dc_fpu.h"
+
+#if !defined(DC_RUN_WITH_PREEMPTION_ENABLED)
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
+#endif // !DC_RUN_WITH_PREEMPTION_ENABLED
+
+
 /*******************************************************************************
  * Private functions
  ******************************************************************************/
@@ -170,12 +177,14 @@ struct dc_stream_state *dc_create_stream_for_sink(
 	if (sink == NULL)
 		goto fail;
 
-	stream = kzalloc(sizeof(struct dc_stream_state), GFP_ATOMIC);
+	DC_RUN_WITH_PREEMPTION_ENABLED(stream = kzalloc(sizeof(struct dc_stream_state), GFP_ATOMIC));
 
 	if (stream == NULL)
 		goto fail;
 
-	stream->update_scratch = kzalloc((int32_t) dc_update_scratch_space_size(), GFP_ATOMIC);
+	DC_RUN_WITH_PREEMPTION_ENABLED(stream->update_scratch =
+					kzalloc((int32_t) dc_update_scratch_space_size(),
+						GFP_ATOMIC));
 
 	if (stream->update_scratch == NULL)
 		goto fail;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -2
index a11dd9dd703b..f28a522ea6cd 100644
@@ -363,8 +363,7 @@ void dcn401_init_hw(struct dc *dc)
 			|| res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000 != current_dchub_ref_freq) {
 			/* update bounding box if FAMS2 disabled, or if dchub clk has changed */
 			if (dc->clk_mgr)
-				dc->res_pool->funcs->update_bw_bounding_box(dc,
-									    dc->clk_mgr->bw_params);
+				dc->res_pool->funcs->update_bw_bounding_box(dc, dc->clk_mgr->bw_params);
 		}
 	}
 }
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +9 -1
index 2d8a5f157988..e87feb2d1fa8 100644
@@ -1741,9 +1741,11 @@ static enum dc_status dcn35_validate_bandwidth(struct dc *dc,
 {
 	bool out = false;
 
+	DC_FP_START();
 	out = dml2_validate(dc, context,
 			context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
 			validate_mode);
+	DC_FP_END();
 
 	if (validate_mode != DC_VALIDATE_MODE_AND_PROGRAMMING)
 		return out ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
@@ -1777,6 +1779,12 @@ static int populate_dml_pipes_from_context_fpu(struct dc *dc,
 	return ret;
 }
 
+void dcn35_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+{
+	DC_FP_START();
+	dcn35_update_bw_bounding_box_fpu(dc, bw_params);
+	DC_FP_END();
+}
 static struct resource_funcs dcn35_res_pool_funcs = {
 	.destroy = dcn35_destroy_resource_pool,
 	.link_enc_create = dcn35_link_encoder_create,
@@ -1798,7 +1806,7 @@ static struct resource_funcs dcn35_res_pool_funcs = {
 	.find_first_free_match_stream_enc_for_link = dcn10_find_first_free_match_stream_enc_for_link,
 	.acquire_post_bldn_3dlut = dcn30_acquire_post_bldn_3dlut,
 	.release_post_bldn_3dlut = dcn30_release_post_bldn_3dlut,
-	.update_bw_bounding_box = dcn35_update_bw_bounding_box_fpu,
+	.update_bw_bounding_box = dcn35_update_bw_bounding_box,
 	.patch_unknown_plane_state = dcn35_patch_unknown_plane_state,
 	.get_panel_config_defaults = dcn35_get_panel_config_defaults,
 	.get_preferred_eng_id_dpia = dcn35_get_preferred_eng_id_dpia,
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.h +1 -0
index 9c56ae76e0c7..6c2c61c711b9 100644
@@ -312,4 +312,5 @@ struct resource_pool *dcn35_create_resource_pool(
 #define DPP_REG_LIST_DCN35_RI(id)\
 	DPP_REG_LIST_DCN30_COMMON_RI(id)
 
+void dcn35_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params);
 #endif /* _DCN35_RESOURCE_H_ */
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +9 -1
index 9ed3d4879f76..c3454755a40f 100644
@@ -1721,9 +1721,11 @@ static enum dc_status dcn351_validate_bandwidth(struct dc *dc,
 {
 	bool out = false;
 
+	DC_FP_START();
 	out = dml2_validate(dc, context,
 			context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
 			validate_mode);
+	DC_FP_END();
 
 	if (validate_mode != DC_VALIDATE_MODE_AND_PROGRAMMING)
 		return out ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
@@ -1750,6 +1752,12 @@ static int populate_dml_pipes_from_context_fpu(struct dc *dc,
 
 }
 
+static void dcn351_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+{
+	DC_FP_START();
+	dcn351_update_bw_bounding_box_fpu(dc, bw_params);
+	DC_FP_END();
+}
 static struct resource_funcs dcn351_res_pool_funcs = {
 	.destroy = dcn351_destroy_resource_pool,
 	.link_enc_create = dcn35_link_encoder_create,
@@ -1771,7 +1779,7 @@ static struct resource_funcs dcn351_res_pool_funcs = {
 	.find_first_free_match_stream_enc_for_link = dcn10_find_first_free_match_stream_enc_for_link,
 	.acquire_post_bldn_3dlut = dcn30_acquire_post_bldn_3dlut,
 	.release_post_bldn_3dlut = dcn30_release_post_bldn_3dlut,
-	.update_bw_bounding_box = dcn351_update_bw_bounding_box_fpu,
+	.update_bw_bounding_box = dcn351_update_bw_bounding_box,
 	.patch_unknown_plane_state = dcn35_patch_unknown_plane_state,
 	.get_panel_config_defaults = dcn35_get_panel_config_defaults,
 	.get_preferred_eng_id_dpia = dcn351_get_preferred_eng_id_dpia,
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +3 -1
index d849d9eeb121..d8ec832940cb 100644
@@ -1728,9 +1728,11 @@ static enum dc_status dcn35_validate_bandwidth(struct dc *dc,
 {
 	bool out = false;
 
+	DC_FP_START();
 	out = dml2_validate(dc, context,
 			context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
 			validate_mode);
+	DC_FP_END();
 
 	if (validate_mode != DC_VALIDATE_MODE_AND_PROGRAMMING)
 		return out ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
@@ -1778,7 +1780,7 @@ static struct resource_funcs dcn36_res_pool_funcs = {
 	.find_first_free_match_stream_enc_for_link = dcn10_find_first_free_match_stream_enc_for_link,
 	.acquire_post_bldn_3dlut = dcn30_acquire_post_bldn_3dlut,
 	.release_post_bldn_3dlut = dcn30_release_post_bldn_3dlut,
-	.update_bw_bounding_box = dcn35_update_bw_bounding_box_fpu,
+	.update_bw_bounding_box = dcn35_update_bw_bounding_box,
 	.patch_unknown_plane_state = dcn20_patch_unknown_plane_state,
 	.get_panel_config_defaults = dcn35_get_panel_config_defaults,
 	.get_preferred_eng_id_dpia = dcn36_get_preferred_eng_id_dpia,
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +22 -8
index 78bb1def9a0c..5a3684307c6b 100644
@@ -1647,8 +1647,10 @@ static struct dc_cap_funcs cap_funcs = {
 	.get_subvp_en = dcn32_subvp_in_use,
 };
 
-static void dcn401_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+static void dcn401_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_params)
 {
+	dc_assert_fp_enabled();
+
 	/* re-calculate the available MALL size if required */
 	if (bw_params->num_channels > 0) {
 		dc->caps.max_cab_allocation_bytes = dcn401_calc_num_avail_chans_for_mall(
@@ -1657,17 +1659,19 @@ static void dcn401_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *b
 		dc->caps.mall_size_total = dc->caps.max_cab_allocation_bytes;
 	}
 
-	DC_FP_START();
-
 	if (dc->debug.using_dml2 && dc->current_state && dc->current_state->bw_ctx.dml2)
 		dml2_reinit(dc, &dc->dml2_options, &dc->current_state->bw_ctx.dml2);
 
 	if (dc->debug.using_dml2 && dc->current_state && dc->current_state->bw_ctx.dml2_dc_power_source)
 		dml2_reinit(dc, &dc->dml2_dc_power_options, &dc->current_state->bw_ctx.dml2_dc_power_source);
+}
 
+static void dcn401_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+{
+	DC_FP_START();
+	dcn401_update_bw_bounding_box_fpu(dc, bw_params);
 	DC_FP_END();
 }
-
 enum dc_status dcn401_patch_unknown_plane_state(struct dc_plane_state *plane_state)
 {
 	plane_state->tiling_info.gfxversion = DcGfxAddr3;
@@ -1692,10 +1696,13 @@ enum dc_status dcn401_validate_bandwidth(struct dc *dc,
 		}
 	}
 
-	if (dc->debug.using_dml2)
+	if (dc->debug.using_dml2) {
+		DC_FP_START();
 		status = dml2_validate(dc, context,
 				context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
 				validate_mode) ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
+		DC_FP_END();
+	}
 
 	if (validate_mode == DC_VALIDATE_MODE_AND_PROGRAMMING && status == DC_OK && dc_state_is_subvp_in_use(context)) {
 		/* check new stream configuration still supports cursor if subvp used */
@@ -1714,10 +1721,13 @@ enum dc_status dcn401_validate_bandwidth(struct dc *dc,
 
 	if (validate_mode == DC_VALIDATE_MODE_AND_PROGRAMMING && status == DC_FAIL_HW_CURSOR_SUPPORT) {
 		/* attempt to validate again with subvp disabled due to cursor */
-		if (dc->debug.using_dml2)
+		if (dc->debug.using_dml2) {
+			DC_FP_START();
 			status = dml2_validate(dc, context,
 					context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2,
 					validate_mode) ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
+			DC_FP_END();
+		}
 	}
 
 	return status;
@@ -1726,9 +1736,13 @@ enum dc_status dcn401_validate_bandwidth(struct dc *dc,
 void dcn401_prepare_mcache_programming(struct dc *dc,
 		struct dc_state *context)
 {
-	if (dc->debug.using_dml21)
+	if (dc->debug.using_dml21) {
+		DC_FP_START();
 		dml2_prepare_mcache_programming(dc, context,
-				context->power_source == DC_POWER_SOURCE_DC ? context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2);
+			context->power_source == DC_POWER_SOURCE_DC ?
+			context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2);
+		DC_FP_END();
+	}
 }
 
 static void dcn401_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx)
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +19 -6
index 9d6a989d6dd2..b9532ebcced4 100644
@@ -1696,37 +1696,50 @@ static void dcn42_destroy_resource_pool(struct resource_pool **pool)
 static struct dc_cap_funcs cap_funcs = {
 	.get_dcc_compression_cap = dcn20_get_dcc_compression_cap};
 
-static void dcn42_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+static void dcn42_update_bw_bounding_box_fpu(struct dc *dc, struct clk_bw_params *bw_params)
 {
-	DC_FP_START();
+	dc_assert_fp_enabled();
+
 	if (dc->current_state && dc->current_state->bw_ctx.dml2)
 		dml2_reinit(dc, &dc->dml2_options, &dc->current_state->bw_ctx.dml2);
-	DC_FP_END();
 }
 
+static void dcn42_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
+{
+	DC_FP_START();
+	dcn42_update_bw_bounding_box_fpu(dc, bw_params);
+	DC_FP_END();
+}
 enum dc_status dcn42_validate_bandwidth(struct dc *dc,
 							  struct dc_state *context,
 							  enum dc_validate_mode validate_mode)
 {
 	bool out = false;
 
+	DC_FP_START();
+
 	out = dml2_validate(dc, context, context->bw_ctx.dml2,
 						validate_mode);
-	DC_FP_START();
+
 	if (validate_mode == DC_VALIDATE_MODE_AND_PROGRAMMING) {
 		/*not required for mode enumeration*/
 		dcn42_decide_zstate_support(dc, context);
 	}
+
 	DC_FP_END();
+
 	return out ? DC_OK : DC_FAIL_BANDWIDTH_VALIDATE;
 }
 void dcn42_prepare_mcache_programming(struct dc *dc,
 									  struct dc_state *context)
 {
-	if (dc->debug.using_dml21)
+	if (dc->debug.using_dml21) {
+		DC_FP_START();
 		dml2_prepare_mcache_programming(dc, context,
 			context->power_source == DC_POWER_SOURCE_DC ?
-				context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2);
+			context->bw_ctx.dml2_dc_power_source : context->bw_ctx.dml2);
+		DC_FP_END();
+	}
 }
 /* Create a minimal link encoder object not associated with a particular
  * physical connector.
Signature · 1 line
2.43.0
#24 lore raw

Re: [PATCH v2 23/30] drm/amd/display: Move FPU Guards From DML To DC - Part 1

Quoted 33 lines · ChuanYu Tseng

From: Rafal Ostrowski <[email protected]>

[Why]
FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

[How]
Added DC_FP_START and DC_FP_END to DC functions that call DML functions using FPU.

---
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.c    | 25 ++++++-
 .../gpu/drm/amd/display/amdgpu_dm/dc_fpu.h    | 17 ++++-
 .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c  |  2 -
 .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  |  2 -
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  5 +-
 .../gpu/drm/amd/display/dc/core/dc_state.c    | 75 ++++++++++++++-----
 .../gpu/drm/amd/display/dc/core/dc_stream.c   | 13 +++-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  3 +-
 .../dc/resource/dcn35/dcn35_resource.c        | 10 ++-
 .../dc/resource/dcn35/dcn35_resource.h        |  1 +
 .../dc/resource/dcn351/dcn351_resource.c      | 10 ++-
 .../dc/resource/dcn36/dcn36_resource.c        |  4 +-
 .../dc/resource/dcn401/dcn401_resource.c      | 30 ++++++--
 .../dc/resource/dcn42/dcn42_resource.c        | 25 +++++--
 14 files changed, 169 insertions(+), 53 deletions(-)

...

Quoted 24 lines
drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h +9 -0
index 4e921632bc4e..5e95419d3798 100644
@@ -28,15 +28,30 @@
 #define __DC_FPU_H__
 
 void dc_assert_fp_enabled(void);
+bool dc_is_fp_enabled(void);
 void dc_fpu_begin(const char *function_name, const int line);
 void dc_fpu_end(const char *function_name, const int line);
 
 #ifndef _LINUX_FPU_COMPILATION_UNIT
 #define DC_FP_START()	dc_fpu_begin(__func__, __LINE__)
 #define DC_FP_END()	dc_fpu_end(__func__, __LINE__)
+#ifdef CONFIG_DRM_AMD_DC_FP
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) \
+	do { \
+		bool dc_fp_enabled = dc_is_fp_enabled(); \
+		if (dc_fp_enabled) \
+			DC_FP_END(); \
+		code; \
+		if (dc_fp_enabled) \

drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h line 54

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h +6 -1
+			DC_FP_START(); \
+	} while (0)
+#else
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
+#endif // !CONFIG_DRM_AMD_DC_FP
 #else
 #define DC_FP_START()	BUILD_BUG()
 #define DC_FP_END()	BUILD_BUG()
-#endif
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code

This looks wrong to me. If _LINUX_FPU_COMPILATION_UNIT is #define'd, it means the code runs within a DC_FP_START/END pair, and so doing nothing will not re-enable preemption.

I think this #define should probably just be dropped. If that breaks the build, it means the code is already fundamentally broken and needs fixing.

#25 lore raw

Re: [PATCH v2 23/30] drm/amd/display: Move FPU Guards From DML To DC - Part 1

Quoted 7 lines · Ard Biesheuvel

This looks wrong to me. If _LINUX_FPU_COMPILATION_UNIT is #define'd, it means the code runs within a DC_FP_START/END pair, and so doing nothing will not re-enable preemption.

I think this #define should probably just be dropped. If that breaks the build, it means the code is already fundamentally broken and needs fixing.

Hi Ard,

I appreciate your feedback. Yes, you are right, it is not needed. I decided to replace it with:
#define DC_RUN_WITH_PREEMPTION_ENABLED(code) BUILD_BUG()
I compiled it on various supported platforms without issues. Is that ok to you? If yes, I will work on patch.

Kind Regards,
Rafal Ostrowski

#26 lore raw

Re: [PATCH v2 23/30] drm/amd/display: Move FPU Guards From DML To DC - Part 1

Quoted 9 lines · Rafal
Quoted 7 lines · Ard Biesheuvel

This looks wrong to me. If _LINUX_FPU_COMPILATION_UNIT is #define'd, it means the code runs within a DC_FP_START/END pair, and so doing nothing will not re-enable preemption.

I think this #define should probably just be dropped. If that breaks the build, it means the code is already fundamentally broken and needs fixing.

Quoted 8 lines

Hi Ard,

I appreciate your feedback. Yes, you are right, it is not needed. I decided to replace it with:
#define DC_RUN_WITH_PREEMPTION_ENABLED(code) BUILD_BUG()
I compiled it on various supported platforms without issues. Is that ok to you? If yes, I will work on patch.

Yes, that is fine.

#27 lore raw

PATCH v2 24/30 drm/amd/display: Move FPU Guards From DML To DC - Part 2

In reply to ChuanYu Tseng

From: Rafal Ostrowski <[email protected]>

[Why]
FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

[How]
Removed DC_FP_START and DC_FP_END.

---
 .../gpu/drm/amd/display/dc/dml2_0/Makefile    |  75 +---
 .../display/dc/dml2_0/dml21/dml21_wrapper.c   | 379 +----------------
 .../display/dc/dml2_0/dml21/dml21_wrapper.h   |  30 --
 .../dc/dml2_0/dml21/dml21_wrapper_fpu.c       | 381 ++++++++++++++++++
 .../dc/dml2_0/dml21/dml21_wrapper_fpu.h       |  60 +++
 .../drm/amd/display/dc/dml2_0/dml2_wrapper.c  |  21 +-
 .../amd/display/dc/dml2_0/dml2_wrapper_fpu.c  |   9 +-
 7 files changed, 484 insertions(+), 471 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +22 -53
index 70d9f2cd0b60..5cb3035b814c 100644
@@ -53,25 +53,29 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/inc
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/inc
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/
 
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/display_mode_core.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/display_mode_util.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper_fpu.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_utils.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_policy.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_translation_helper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_mall_phantom.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml_display_rq_dlg_calc.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_dc_resource_mgmt.o := $(dml2_ccflags)
+# Add FPU flags to all dml2 files by default, remove NO_FPU flags.
+# FPU flags step 1: Find all .c files in dal/dc/dml2_0 and it's subfolders
+DML2_ABS_PATH := $(FULL_AMD_DISPLAY_PATH)/dc/dml2_0
+DML2_C_FILES := $(shell find $(DML2_ABS_PATH) -name '*.c' -type f)
+
+# FPU flags step 2: Convert to .o and make paths relative to $(AMDDALPATH)/dc/dml2_0/
+DML2_RELATIVE_O_FILES := $(patsubst $(DML2_ABS_PATH)/%,dc/dml2_0/%,$(patsubst %.c,%.o,$(DML2_C_FILES)))
 
+# FPU flags step 3: Apply FPU flags to all .o files from dal/dc/dml2_0 and it's subfolders
+$(foreach obj,$(DML2_RELATIVE_O_FILES),$(eval CFLAGS_$(AMDDALPATH)/$(obj) := $(dml2_ccflags)))
+$(foreach obj,$(DML2_RELATIVE_O_FILES),$(eval CFLAGS_REMOVE_$(AMDDALPATH)/$(obj) := $(dml2_rcflags)))
+
+# FPU flags step 4: Replace CFLAGS per file for files with additional flags beyond dml2_ccflags and dml2_rcflags
+CFLAGS_$(AMDDALPATH)/dc/dml2_0/display_mode_core.o := $(dml2_ccflags) $(frame_warn_flag)
+CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
+CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_ccflags) $(frame_warn_flag)
+CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper.o := $(dml2_rcflags)
+CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_wrapper.o := $(dml2_rcflags)
 CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/display_mode_core.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/display_mode_util.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper_fpu.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_utils.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_policy.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_translation_helper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_mall_phantom.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml_display_rq_dlg_calc.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_dc_resource_mgmt.o := $(dml2_rcflags)
+CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_rcflags)
+CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_rcflags)
+CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper.o := $(dml2_ccflags)
+CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_wrapper.o := $(dml2_ccflags)
 
 DML2 = display_mode_core.o display_mode_util.o dml2_wrapper_fpu.o dml2_wrapper.o \
 		dml2_utils.o dml2_policy.o dml2_translation_helper.o dml2_dc_resource_mgmt.o dml2_mall_phantom.o \
@@ -81,42 +85,6 @@ AMD_DAL_DML2 = $(addprefix $(AMDDALPATH)/dc/dml2_0/,$(DML2))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_DML2)
 
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_translation_helper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_utils.o := $(dml2_ccflags)
-
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn42.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_translation_helper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2_0/dml21/dml21_utils.o := $(dml2_rcflags)
-
 DML21 := src/dml2_top/dml2_top_interfaces.o
 DML21 += src/dml2_top/dml2_top_soc15.o
 DML21 += src/dml2_core/dml2_core_dcn4.o
@@ -134,6 +102,7 @@ DML21 += src/dml2_pmo/dml2_pmo_dcn4_fams2.o
 DML21 += src/dml2_standalone_libraries/lib_float_math.o
 DML21 += dml21_translation_helper.o
 DML21 += dml21_wrapper.o
+DML21 += dml21_wrapper_fpu.o
 DML21 += dml21_utils.o
 
 AMD_DAL_DML21 = $(addprefix $(AMDDALPATH)/dc/dml2_0/dml21/,$(DML21))
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c +5 -374

412 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h +0 -30
index b508bbcc0e16..c4813c51251b 100644
@@ -34,36 +34,6 @@ void dml21_copy(struct dml2_context *dst_dml_ctx,
 	struct dml2_context *src_dml_ctx);
 bool dml21_create_copy(struct dml2_context **dst_dml_ctx,
 	struct dml2_context *src_dml_ctx);
-void dml21_reinit(const struct dc *in_dc, struct dml2_context *dml_ctx, const struct dml2_configuration_options *config);
-
-/**
- * dml21_validate - Determines if a display configuration is supported or not.
- * @in_dc: dc.
- * @context: dc_state to be validated.
- * @dml_ctx: dml21 context.
- * @validate_mode: DC_VALIDATE_MODE_ONLY and DC_VALIDATE_MODE_AND_STATE_INDEX
- *           will not populate context.res_ctx.
- *
- * Based on fast_validate option internally would call:
- *
- * -dml21_mode_check_and_programming - for DC_VALIDATE_MODE_AND_PROGRAMMING option
- * Calculates if dc_state can be supported on the input display
- * configuration. If supported, generates the necessary HW
- * programming for the new dc_state.
- *
- * -dml21_check_mode_support - for DC_VALIDATE_MODE_ONLY and DC_VALIDATE_MODE_AND_STATE_INDEX option
- * Calculates if dc_state can be supported for the input display
- * config.
- *
- * Context: Two threads may not invoke this function concurrently unless they reference
- *          separate dc_states for validation.
- * Return: True if mode is supported, false otherwise.
- */
-bool dml21_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml_ctx,
-	enum dc_validate_mode validate_mode);
-
-/* Prepare hubp mcache_regs for hubp mcache ID and split coordinate programming */
-void dml21_prepare_mcache_programming(struct dc *in_dc, struct dc_state *context, struct dml2_context *dml_ctx);
 
 /* Structure for inputting external SOCBB and DCNIP values for tool based debugging. */
 struct socbb_ip_params_external {
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c new file +381 -0

381 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h new file +60 -0

60 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +13 -8
index 408559d6fb2d..f8250c80be02 100644
@@ -6,7 +6,20 @@
  */
 
 #include "dml2_internal_types.h"
+#include "dml2_wrapper.h"
 #include "dml2_wrapper_fpu.h"
+#include "dml21_wrapper.h"
+#include "dml21_wrapper_fpu.h"
+
+#include "dc_fpu.h"
+
+struct dml2_context *dml2_allocate_memory(void)
+{
+	struct dml2_context *dml2;
+
+	DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context)));
+	return dml2;
+}
 
 bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2,
 	enum dc_validate_mode validate_mode)
@@ -23,16 +36,12 @@ bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2
 		return out;
 	}
 
-	DC_FP_START();
-
 	/* Use dml_validate_only for DC_VALIDATE_MODE_ONLY and DC_VALIDATE_MODE_AND_STATE_INDEX path */
 	if (validate_mode != DC_VALIDATE_MODE_AND_PROGRAMMING)
 		out = dml2_validate_only(context, validate_mode);
 	else
 		out = dml2_validate_and_build_resource(in_dc, context, validate_mode);
 
-	DC_FP_END();
-
 	return out;
 }
 
@@ -70,15 +79,11 @@ static void dml2_init(const struct dc *in_dc, const struct dml2_configuration_op
 		break;
 	}
 
-	DC_FP_START();
-
 	initialize_dml2_ip_params(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.ip);
 
 	initialize_dml2_soc_bbox(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc);
 
 	initialize_dml2_soc_states(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc, &(*dml2)->v20.dml_core_ctx.states);
-
-	DC_FP_END();
 }
 
 bool dml2_create(const struct dc *in_dc, const struct dml2_configuration_options *config, struct dml2_context **dml2)
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper_fpu.c +3 -6
index 203eef747262..66624cfc27b1 100644
@@ -31,8 +31,10 @@
 #include "dml2_translation_helper.h"
 #include "dml2_mall_phantom.h"
 #include "dml2_dc_resource_mgmt.h"
-#include "dml21_wrapper.h"
+#include "dml2_wrapper.h"
 #include "dml2_wrapper_fpu.h"
+#include "dml21_wrapper.h"
+#include "dml21_wrapper_fpu.h"
 
 void initialize_dml2_ip_params(struct dml2_context *dml2, const struct dc *in_dc, struct ip_params_st *out)
 {
@@ -546,11 +548,6 @@ void dml2_apply_debug_options(const struct dc *dc, struct dml2_context *dml2)
 	}
 }
 
-inline struct dml2_context *dml2_allocate_memory(void)
-{
-	return (struct dml2_context *) vzalloc(sizeof(struct dml2_context));
-}
-
 void dml2_destroy(struct dml2_context *dml2)
 {
 	if (!dml2)
Signature · 1 line
2.43.0
#28 lore raw

Re: [PATCH v2 24/30] drm/amd/display: Move FPU Guards From DML To DC - Part 2

Quoted 5 lines · ChuanYu Tseng

FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

/* snip */

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c

Quoted 1 line
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0

We have:

CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper.o := $(dml2_rcflags)

and

dml2_rcflags := $(CC_FLAGS_NO_FPU)

so this file isn't compiled as a FPU unit. Why removing the guards here?

/* snip */

Quoted 28 lines

index 408559d6fb2d..f8250c80be02 100644

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0
@@ -6,7 +6,20 @@
   */


 #include "dml2_internal_types.h"
+#include "dml2_wrapper.h"
 #include "dml2_wrapper_fpu.h"

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +12 -0
+#include "dml21_wrapper.h"
+#include "dml21_wrapper_fpu.h"
+
+#include "dc_fpu.h"
+
+struct dml2_context *dml2_allocate_memory(void)
+{
+	struct dml2_context *dml2;
+
+	DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context)));
+	return dml2;
+}


 bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2, enum dc_validate_mode validate_mode)

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0
@@ -23,16 +36,12 @@ bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2
  		return out;
  	}

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c

Quoted 1 line
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -1
-	DC_FP_START();

Notably the removal of this is causing:

[    3.943927] do_fpu invoked from kernel context![#1]:
[    3.948860] CPU: 0 UID: 0 PID: 11 Comm: kworker/0:1 Not tainted 7.0.3-aosc-main-4k #2 PREEMPT(lazy)
[    3.957938] Hardware name: Loongson Loongson-3B6000x1-7A2000x1-XB612B0_v1.1/XB612B0_v1.1, BIOS Loongson-FwSdk-V5.0.0431-stable202602 04/10/26 09:20:09
[    3.971334] Workqueue: sync_wq local_pci_probe_callback
[    3.976528] pc ffff800002becd80 ra ffff800002becd30 tp 90000001005d8000 sp 90000001005db5e0
[    3.984827] a0 ffff80001326ebf8 a1 0000000000000000 a2 ffff80001326ec98 a3 ffff80001326ec90
[    3.993124] a4 ffff80001326ec90 a5 0000000000000000 a6 0000000000000000 a7 0000000000000000
[    4.001422] t0 ffff800003327000 t1 ffff80001326f000 t2 0000000000000001 t3 0000000000000000
[    4.009720] t4 0000000000000004 t5 0000000000000100 t6 0000000000000000 t7 0000000000000000
[    4.018018] t8 0000000000000000 u0 ffff800002be8220 s9 90000001413e2000 s0 9000000160c00000
[    4.026316] s1 9000000161c80000 s2 9000000160c00000 s3 90000001223af080 s4 9000000161c80000
[    4.034613] s5 9000000160c00000 s6 9000000161c80000 s7 9000000161c40000 s8 ffff80001326a000
[    4.042912]    ra: ffff800002becd30 dml21_map_dc_state_into_dml_display_cfg+0x40/0x12a0 [amdgpu]
[    4.052169]   ERA: ffff800002becd80 dml21_map_dc_state_into_dml_display_cfg+0x90/0x12a0 [amdgpu]
[    4.061277]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
[    4.067423]  PRMD: 00000004 (PPLV0 +PIE -PWE)
[    4.071749]  EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
[    4.076508]  ECFG: 00071c1d (LIE=0,2-4,10-12 VS=7)
[    4.081266] ESTAT: 000f0000 [FPD] (IS= ECode=15 EsubCode=0)
[    4.086801]  PRID: 0014d011 (Loongson-64bit, Loongson-3B6000)
[    4.092507] Modules linked in: amdgpu(+) hid_logitech_dj i2c_algo_bit drm_ttm_helper ttm drm_exec drm_suballoc_helper drm_buddy drm_panel_backlight_quirks gpu_sched amdxcp drm_display_helper cec hid_generic pwm_loongson la_ow_syscall
 ntsync i2c_dev dmi_sysfs
[    4.115253] Process kworker/0:1 (pid: 11, threadinfo=00000000187c43c8, task=00000000627a7089)
[    4.123725] Stack : ffff8000135e6360 ffff8000135e66b8 0000000000000000 0000043800000780
[    4.131681]         ffff800003328000 9000000161c40000 9000000161c802d8 ffff800002c32b28
[    4.139637]         ffff8000135e63f0 0000000000000000 0000000000000000 0000000000000000
[    4.147592]         0000000000000000 0000000000000000 0000000000000000 9000000121846010
[    4.155548]         0000000000000000 9000000161c80000 9000000161c80000 0000000000000001
[    4.163504]         0000000000000001 90000001223af080 9000000160c00000 ffff80001326a000
[    4.171460]         ffff80001326a000 ffff800002bef274 9000000161c86000 0000000000000001
[    4.179415]         0000000000000010 0000000000000001 9000000161c80000 ffff800002aeb330
[    4.187371]         9000000160c00000 9000000160c00000 90000001413e2000 90000001223af080
[    4.195326]         0000000000000010 0000000000000001 90000001415b0000 ffff800002851348
[    4.203282]         ...
[    4.205705] Call Trace:
[    4.205707] [<ffff800002becd80>] dml21_map_dc_state_into_dml_display_cfg+0x90/0x12a0 [amdgpu]
[    4.216978] [<ffff800002bef270>] dml21_validate+0xc0/0x160 [amdgpu]
[    4.223573] [<ffff800002aeb32c>] dcn401_validate_bandwidth+0xdc/0x290 [amdgpu]
[    4.231156] [<ffff800002851344>] create_validate_stream_for_sink+0x574/0x5b0 [amdgpu]
[    4.239328] [<ffff800002851404>] amdgpu_dm_connector_mode_valid+0x84/0x2c0 [amdgpu]
[    4.247312] [<9000000006bc2db4>] drm_connector_mode_valid+0x44/0xc0
[    4.253542] [<9000000006bc2f6c>] __drm_helper_update_and_validate+0x13c/0x490
[    4.260632] [<9000000006bc35c8>] drm_helper_probe_single_connector_modes+0x308/0x6c0
[    4.268326] [<9000000006ba055c>] drm_client_modeset_probe+0x1bc/0x1a50
[    4.274811] [<9000000006bc5df8>] __drm_fb_helper_initial_config_and_unlock+0x38/0x6f0
[    4.282594] [<9000000006bccfcc>] drm_fbdev_client_hotplug+0x9c/0x120
[    4.288906] [<9000000006b9ddd0>] drm_client_register+0x60/0xb0
[    4.294702] [<9000000006bcd158>] drm_fbdev_client_setup+0xa8/0x260
[    4.300841] [<9000000006bcbed8>] drm_client_setup+0xf8/0x170
[    4.306461] [<ffff80000236a35c>] amdgpu_pci_probe+0x38c/0x8a0 [amdgpu]
[    4.313291] [<9000000006957294>] local_pci_probe+0x44/0xe0
[    4.318740] [<900000000695734c>] local_pci_probe_callback+0x1c/0x40
[    4.324965] [<9000000005a6d4f8>] process_one_work+0x1a8/0x670
[    4.330672] [<9000000005a6e42c>] worker_thread+0x1cc/0x3a0
[    4.336120] [<9000000005a787d4>] kthread+0x134/0x170
[    4.341049] [<90000000074a8314>] ret_from_kernel_thread+0x24/0x1d0
[    4.347191] [<90000000059e28c4>] ret_from_kernel_thread_asm+0xc/0x88
[    4.353504]
[    4.354975] Code: 40074580  1a00e76c  29c2207d <2bc1a078> 1400003d  2b926198  038b03bd  00150369  29c30076
[    4.364664]
[    4.366156] ---[ end trace 0000000000000000 ]---
Signature · 1 line
Xi Ruoyao <[email protected]>
#29 lore raw

Re: [PATCH v2 24/30] drm/amd/display: Move FPU Guards From DML To DC - Part 2

Quoted 58 lines · Xi Ruoyao
Quoted 5 lines · ChuanYu Tseng

FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

/* snip */

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c

Quoted 1 line
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0

We have:

CFLAGS_$(AMDDALPATH)/dc/dml2_0/dml2_wrapper.o := $(dml2_rcflags)

and

dml2_rcflags := $(CC_FLAGS_NO_FPU)

so this file isn't compiled as a FPU unit.  Why removing the guards here?

/* snip */

Quoted 28 lines

index 408559d6fb2d..f8250c80be02 100644

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0
@@ -6,7 +6,20 @@
   */


 #include "dml2_internal_types.h"
+#include "dml2_wrapper.h"
 #include "dml2_wrapper_fpu.h"

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +12 -0
+#include "dml21_wrapper.h"
+#include "dml21_wrapper_fpu.h"
+
+#include "dc_fpu.h"
+
+struct dml2_context *dml2_allocate_memory(void)
+{
+	struct dml2_context *dml2;
+
+	DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context)));
+	return dml2;
+}


 bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2, enum dc_validate_mode validate_mode)

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -0
@@ -23,16 +36,12 @@ bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2
  		return out;
  	}

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c

Quoted 1 line
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +0 -1
-	DC_FP_START();

Notably the removal of this is causing:

Quoted 2 lines

[    3.943927] do_fpu invoked from kernel context![#1]:
[    3.948860] CPU: 0 UID: 0 PID: 11 Comm: kworker/0:1 Not tainted 7.0.3-aosc-main-4k #2 PREEMPT(lazy)

Oh, I didn't expect the code path of 7.0.3 is so different from the mainline (7.1-rc1). The mainline has guarded this elsewhere and the breakage on 7.0.3 is caused by some difference reason that I'm still trying to figure out...

Signature · 1 line
Xi Ruoyao <[email protected]>
#30 lore raw

PATCH v2 25/30 drm/amd/display: Move FPU Guards From DML To DC - Part 3

In reply to ChuanYu Tseng

From: Rafal Ostrowski <[email protected]>

[Why]
FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that can manipulates floats. To do this properly, the FPU guards must be used in a file that is not compiled as a FPU unit. If the guards are used in a file that is a FPU unit, other sections in the file that aren't guarded may be end up being compiled to use FPU operations.

[How]
Added DC_FP_START and DC_FP_END to DC functions that call DML functions using FPU.

---
 drivers/gpu/drm/amd/display/dc/dml2_0/Makefile              | 1 +
 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c | 1 +
 .../gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c | 4 +---
 .../gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h | 2 +-
 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c        | 6 +++++-
 5 files changed, 9 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +1 -0
index 5cb3035b814c..2625943d7f7e 100644
@@ -85,6 +85,7 @@ AMD_DAL_DML2 = $(addprefix $(AMDDALPATH)/dc/dml2_0/,$(DML2))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_DML2)
 
+
 DML21 := src/dml2_top/dml2_top_interfaces.o
 DML21 += src/dml2_top/dml2_top_soc15.o
 DML21 += src/dml2_core/dml2_core_dcn4.o
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c +1 -0
index 1a98578f223c..7398f8b69adb 100644
@@ -38,6 +38,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
 	(*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config;
 
 	DC_RUN_WITH_PREEMPTION_ENABLED((*dml_ctx)->v21.mode_programming.programming = vzalloc(sizeof(struct dml2_display_cfg_programming)));
+
 	if (!((*dml_ctx)->v21.mode_programming.programming))
 		return false;
 
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c +1 -3
index d5885bbd14c4..f3abfdbe6805 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 //
-// Copyright 2024 Advanced Micro Devices, Inc.
+// Copyright 2026 Advanced Micro Devices, Inc.
 
 #include "dml2_internal_types.h"
 #include "dml_top.h"
@@ -377,5 +377,3 @@ void dml21_prepare_mcache_programming(struct dc *in_dc, struct dc_state *context
 		}
 	}
 }
-
-
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h +1 -1
index 2972c6eed21a..e5d9a456645f 100644
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 //
-// Copyright 2024 Advanced Micro Devices, Inc.
+// Copyright 2026 Advanced Micro Devices, Inc.
 
 #ifndef _DML21_WRAPPER_FPU_H_
 #define _DML21_WRAPPER_FPU_H_
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c +5 -1
index f8250c80be02..93b7613fc4f2 100644
@@ -13,6 +13,10 @@
 
 #include "dc_fpu.h"
 
+#if !defined(DC_RUN_WITH_PREEMPTION_ENABLED)
+#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
+#endif // !DC_RUN_WITH_PREEMPTION_ENABLED
+
 struct dml2_context *dml2_allocate_memory(void)
 {
 	struct dml2_context *dml2;
@@ -20,7 +24,6 @@ struct dml2_context *dml2_allocate_memory(void)
 	DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context)));
 	return dml2;
 }
-
 bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2,
 	enum dc_validate_mode validate_mode)
 {
@@ -84,6 +87,7 @@ static void dml2_init(const struct dc *in_dc, const struct dml2_configuration_op
 	initialize_dml2_soc_bbox(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc);
 
 	initialize_dml2_soc_states(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc, &(*dml2)->v20.dml_core_ctx.states);
+
 }
 
 bool dml2_create(const struct dc *in_dc, const struct dml2_configuration_options *config, struct dml2_context **dml2)
Signature · 1 line
2.43.0
#31 lore raw

PATCH v2 26/30 drm/amd/display: Fixed Silence complier warnings in dc

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

[Why]
Resolve compiler warnings by marking unused parameters explicitly.

[How]
In .c and .h function definitions, keep parameter names in signatures and add a line with (void)param; in function body

Preserved function signatures and avoids breaking code paths that may reference the parameter under conditional compilation.

---
 .../drm/amd/display/dc/basics/fixpt31_32.c    |   1 +
 .../gpu/drm/amd/display/dc/basics/vector.c    |   1 +
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |   1 +
 .../drm/amd/display/dc/bios/bios_parser2.c    |   9 ++
 .../drm/amd/display/dc/bios/command_table2.c  |   2 +
 .../bios/dce110/command_table_helper_dce110.c |   1 +
 .../dce112/command_table_helper2_dce112.c     |   1 +
 .../bios/dce112/command_table_helper_dce112.c |   1 +
 .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |   1 +
 .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c  |   1 +
 .../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c  |   3 +
 .../dc/clk_mgr/dcn314/dcn314_clk_mgr.c        |   3 +
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c        |   3 +
 .../dc/clk_mgr/dcn316/dcn316_clk_mgr.c        |   3 +
 .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c  |   2 +
 .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c        |   3 +
 .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c  |   5 +
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  12 ++
 .../drm/amd/display/dc/core/dc_hw_sequencer.c |   1 +
 .../gpu/drm/amd/display/dc/core/dc_resource.c |   7 ++
 .../gpu/drm/amd/display/dc/core/dc_state.c    |   2 +
 .../gpu/drm/amd/display/dc/core/dc_surface.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |   1 +
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.c    |   2 +
 .../amd/display/dc/dccg/dcn32/dcn32_dccg.c    |   1 +
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.c    |   2 +
 .../amd/display/dc/dccg/dcn401/dcn401_dccg.c  |   4 +
 .../amd/display/dc/dccg/dcn42/dcn42_dccg.c    |   1 +
 drivers/gpu/drm/amd/display/dc/dce/dce_abm.c  |   1 +
 .../gpu/drm/amd/display/dc/dce/dce_audio.c    |   3 +
 .../drm/amd/display/dc/dce/dce_clock_source.c |   4 +
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c |   1 +
 drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c  |   1 +
 .../gpu/drm/amd/display/dc/dce/dce_i2c_hw.c   |   2 +
 .../gpu/drm/amd/display/dc/dce/dce_i2c_sw.c   |   3 +
 drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c  |   1 +
 .../drm/amd/display/dc/dce/dce_link_encoder.c |   1 +
 .../drm/amd/display/dc/dce/dce_mem_input.c    |   4 +
 drivers/gpu/drm/amd/display/dc/dce/dce_opp.c  |   1 +
 .../amd/display/dc/dce/dce_stream_encoder.c   |   4 +
 .../drm/amd/display/dc/dce/dce_transform.c    |   2 +
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c |   1 +
 .../gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c |   1 +
 .../gpu/drm/amd/display/dc/dce/dmub_replay.c  |   1 +
 .../display/dc/dce110/dce110_mem_input_v.c    |  10 ++
 .../amd/display/dc/dce110/dce110_opp_csc_v.c  |   1 +
 .../display/dc/dce110/dce110_opp_regamma_v.c  |   2 +
 .../dc/dce110/dce110_timing_generator.c       |   9 ++
 .../dc/dce110/dce110_timing_generator_v.c     |   9 ++
 .../display/dc/dce110/dce110_transform_v.c    |   6 +
 .../amd/display/dc/dce112/dce112_compressor.c |   1 +
 .../dc/dce120/dce120_timing_generator.c       |   7 ++
 .../display/dc/dce80/dce80_timing_generator.c |   6 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c  |   2 +
 .../gpu/drm/amd/display/dc/dcn31/dcn31_apg.c  |   1 +
 .../dc/dio/dcn10/dcn10_stream_encoder.c       |   2 +
 .../dc/dio/dcn314/dcn314_dio_stream_encoder.c |   2 +
 .../dc/dio/dcn32/dcn32_dio_stream_encoder.c   |   2 +
 .../dc/dio/dcn35/dcn35_dio_stream_encoder.c   |   1 +
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.c |   3 +
 .../dc/dio/virtual/virtual_link_encoder.c     |  65 ++++++++--
 .../dc/dio/virtual/virtual_stream_encoder.c   | 111 +++++++++++++-----
 .../drm/amd/display/dc/dml/calcs/dcn_calcs.c  |   1 +
 .../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c  |   1 +
 .../dc/dml/dcn20/display_mode_vba_20.c        |   4 +
 .../dc/dml/dcn20/display_mode_vba_20v2.c      |   5 +
 .../dc/dml/dcn20/display_rq_dlg_calc_20.c     |   5 +
 .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c   |   5 +
 .../dc/dml/dcn21/display_mode_vba_21.c        |  19 +++
 .../dc/dml/dcn21/display_rq_dlg_calc_21.c     |   5 +
 .../drm/amd/display/dc/dml/dcn30/dcn30_fpu.c  |   2 +
 .../dc/dml/dcn30/display_mode_vba_30.c        |  23 ++++
 .../dc/dml/dcn30/display_rq_dlg_calc_30.c     |   5 +
 .../dc/dml/dcn31/display_mode_vba_31.c        |  24 ++++
 .../dc/dml/dcn31/display_rq_dlg_calc_31.c     |   8 ++
 .../dc/dml/dcn314/display_mode_vba_314.c      |  24 ++++
 .../dc/dml/dcn314/display_rq_dlg_calc_314.c   |   8 ++
 .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c  |   2 +
 .../dc/dml/dcn32/display_mode_vba_util_32.c   |  23 ++++
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |   1 +
 .../drm/amd/display/dc/dml/display_mode_lib.c |   1 +
 .../display/dc/dml/display_rq_dlg_helpers.c   |  14 +++
 .../display/dc/dml/dml1_display_rq_dlg_calc.c |   3 +
 .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c  |  11 +-
 .../amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c   |   1 +
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  |   1 +
 .../amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c   |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |   5 +
 .../drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c  |   1 +
 .../dc/gpio/dcn42/hw_translate_dcn42.c        |   1 +
 .../gpu/drm/amd/display/dc/gpio/hw_factory.c  |   1 +
 drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c |   1 +
 .../drm/amd/display/dc/gpio/hw_translate.c    |   1 +
 .../display/dc/hubbub/dcn31/dcn31_hubbub.c    |   1 +
 .../display/dc/hubbub/dcn35/dcn35_hubbub.c    |   1 +
 .../display/dc/hubbub/dcn401/dcn401_hubbub.c  |   4 +
 .../display/dc/hubbub/dcn42/dcn42_hubbub.c    |   2 +
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    |   2 +
 .../amd/display/dc/hubp/dcn35/dcn35_hubp.c    |   1 +
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  |   3 +
 .../amd/display/dc/hubp/dcn42/dcn42_hubp.c    |   1 +
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  22 ++++
 .../amd/display/dc/hwss/dce120/dce120_hwseq.c |   4 +
 .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  21 ++++
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   |   9 ++
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |   3 +
 .../amd/display/dc/hwss/dcn303/dcn303_hwseq.c |  11 ++
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |   2 +
 .../amd/display/dc/hwss/dcn314/dcn314_hwseq.c |   1 +
 .../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 |   6 +
 .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c   |   2 +
 .../dc/irq/dce110/irq_service_dce110.c        |   2 +
 .../display/dc/irq/dcn10/irq_service_dcn10.c  |   3 +
 .../display/dc/irq/dcn20/irq_service_dcn20.c  |   3 +
 .../display/dc/irq/dcn21/irq_service_dcn21.c  |   3 +
 .../display/dc/irq/dcn30/irq_service_dcn30.c  |   3 +
 .../dc/irq/dcn302/irq_service_dcn302.c        |   3 +
 .../dc/irq/dcn303/irq_service_dcn303.c        |   3 +
 .../display/dc/irq/dcn31/irq_service_dcn31.c  |   3 +
 .../dc/irq/dcn314/irq_service_dcn314.c        |   3 +
 .../dc/irq/dcn315/irq_service_dcn315.c        |   3 +
 .../display/dc/irq/dcn32/irq_service_dcn32.c  |   3 +
 .../display/dc/irq/dcn35/irq_service_dcn35.c  |   3 +
 .../dc/irq/dcn351/irq_service_dcn351.c        |   3 +
 .../display/dc/irq/dcn36/irq_service_dcn36.c  |   3 +
 .../dc/irq/dcn401/irq_service_dcn401.c        |   3 +
 .../display/dc/irq/dcn42/irq_service_dcn42.c  |   3 +
 .../display/dc/link/accessories/link_dp_cts.c |   2 +
 .../amd/display/dc/link/hwss/link_hwss_dpia.c |   4 +
 .../display/dc/link/hwss/link_hwss_hpo_dp.c   |   6 +
 .../link_hwss_hpo_fixed_vs_pe_retimer_dp.c    |   1 +
 .../display/dc/link/hwss/link_hwss_virtual.c  |   6 +
 .../drm/amd/display/dc/link/link_detection.c  |   1 +
 .../drm/amd/display/dc/link/link_validation.c |   1 +
 .../dc/link/protocols/link_dp_training.c      |   2 +
 .../protocols/link_dp_training_128b_132b.c    |   1 +
 .../dc/link/protocols/link_dp_training_dpia.c |   6 +
 .../amd/display/dc/link/protocols/link_dpcd.c |   1 +
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c  |   4 +
 .../drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c  |   1 +
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.c  |   1 +
 .../amd/display/dc/optc/dcn10/dcn10_optc.c    |   4 +
 .../amd/display/dc/optc/dcn20/dcn20_optc.c    |   2 +
 .../amd/display/dc/optc/dcn30/dcn30_optc.c    |   1 +
 .../amd/display/dc/optc/dcn31/dcn31_optc.c    |   1 +
 .../amd/display/dc/optc/dcn314/dcn314_optc.c  |   1 +
 .../amd/display/dc/optc/dcn32/dcn32_optc.c    |   1 +
 .../amd/display/dc/optc/dcn35/dcn35_optc.c    |   1 +
 .../dc/resource/dce100/dce100_resource.c      |   5 +
 .../dc/resource/dce110/dce110_resource.c      |   6 +
 .../dc/resource/dce112/dce112_resource.c      |   5 +
 .../dc/resource/dce120/dce120_resource.c      |   1 +
 .../dc/resource/dce80/dce80_resource.c        |   1 +
 .../dc/resource/dcn10/dcn10_resource.c        |   3 +
 .../dc/resource/dcn20/dcn20_resource.c        |   6 +
 .../dc/resource/dcn21/dcn21_resource.c        |   1 +
 .../dc/resource/dcn30/dcn30_resource.c        |   1 +
 .../dc/resource/dcn301/dcn301_resource.c      |   1 +
 .../dc/resource/dcn302/dcn302_resource.c      |   1 +
 .../dc/resource/dcn303/dcn303_resource.c      |   1 +
 .../dc/resource/dcn31/dcn31_resource.c        |   2 +
 .../dc/resource/dcn314/dcn314_resource.c      |   1 +
 .../dc/resource/dcn315/dcn315_resource.c      |   1 +
 .../dc/resource/dcn316/dcn316_resource.c      |   1 +
 .../resource/dcn32/dcn32_resource_helpers.c   |   1 +
 .../dc/resource/dcn42/dcn42_resource.c        |   3 +
 .../dcn42/dcn42_soc_and_ip_translator.c       |   1 +
 173 files changed, 750 insertions(+), 46 deletions(-)
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +1 -0
index 6073cadde76c..fa10f85df3db 100644
@@ -503,6 +503,7 @@ struct fixed31_32 dc_fixpt_from_int_dy(unsigned int int_value,
 	unsigned int integer_bits,
 	unsigned int fractional_bits)
 {
+	(void)integer_bits;
 	struct fixed31_32 fixpt_value = dc_fixpt_from_int(int_value);
 
 	fixpt_value.value |= (long long)frac_value << (FIXED31_32_BITS_PER_FRACTIONAL_PART - fractional_bits);
drivers/gpu/drm/amd/display/dc/basics/vector.c +1 -0
index b413a672c2c0..d4dcc077854d 100644
@@ -56,6 +56,7 @@ static bool dal_vector_presized_costruct(struct vector *vector,
 					 void *initial_value,
 					 uint32_t struct_size)
 {
+	(void)ctx;
 	uint32_t i;
 
 	vector->container = NULL;
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +1 -0
index 82877f7b3b6f..9344a3e4a2fc 100644
@@ -2696,6 +2696,7 @@ static enum bp_result update_slot_layout_info(struct dc_bios *dcb,
 					      struct slot_layout_info *slot_layout_info,
 					      unsigned int record_offset)
 {
+	(void)i;
 	unsigned int j;
 	struct bios_parser *bp;
 	ATOM_BRACKET_LAYOUT_RECORD *record;
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +9 -0
index 550a9f1d03f8..d2fb9c0162e5 100644
@@ -205,6 +205,7 @@ static enum bp_result bios_parser_get_src_obj(struct dc_bios *dcb,
 	struct graphics_object_id object_id, uint32_t index,
 	struct graphics_object_id *src_object_id)
 {
+	(void)index;
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
 	unsigned int i;
 	enum bp_result bp_result = BP_RESULT_BADINPUT;
@@ -765,6 +766,7 @@ static enum bp_result bios_parser_get_device_tag(
 	uint32_t device_tag_index,
 	struct connector_device_tag_info *info)
 {
+	(void)device_tag_index;
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
 	struct atom_display_object_path_v2 *object;
 
@@ -809,6 +811,7 @@ static enum bp_result get_ss_info_v4_1(
 	uint32_t index,
 	struct spread_spectrum_info *ss_info)
 {
+	(void)index;
 	enum bp_result result = BP_RESULT_OK;
 	struct atom_display_controller_info_v4_1 *disp_cntl_tbl = NULL;
 	struct atom_smu_info_v3_3 *smu_info = NULL;
@@ -897,6 +900,7 @@ static enum bp_result get_ss_info_v4_2(
 	uint32_t index,
 	struct spread_spectrum_info *ss_info)
 {
+	(void)index;
 	enum bp_result result = BP_RESULT_OK;
 	struct atom_display_controller_info_v4_2 *disp_cntl_tbl = NULL;
 	struct atom_smu_info_v3_1 *smu_info = NULL;
@@ -977,6 +981,7 @@ static enum bp_result get_ss_info_v4_5(
 	uint32_t index,
 	struct spread_spectrum_info *ss_info)
 {
+	(void)index;
 	enum bp_result result = BP_RESULT_OK;
 	struct atom_display_controller_info_v4_5 *disp_cntl_tbl = NULL;
 
@@ -1604,6 +1609,8 @@ static uint32_t bios_parser_get_ss_entry_number(
 	struct dc_bios *dcb,
 	enum as_signal_type signal)
 {
+	(void)dcb;
+	(void)signal;
 	/* TODO: DAL2 atomfirmware implementation does not need this.
 	 * why DAL3 need this?
 	 */
@@ -3536,6 +3543,8 @@ static uint16_t bios_parser_pack_data_tables(
 	struct dc_bios *dcb,
 	void *dst)
 {
+	(void)dcb;
+	(void)dst;
 	// TODO: There is data bytes alignment issue, disable it for now.
 	return 0;
 }
drivers/gpu/drm/amd/display/dc/bios/command_table2.c +2 -0
index f2b1720a6a66..17ef515c6c69 100644
@@ -783,6 +783,8 @@ static enum bp_result external_encoder_control_v3(
 	struct bios_parser *bp,
 	struct bp_external_encoder_control *cntl)
 {
+	(void)bp;
+	(void)cntl;
 	/* TODO */
 	return BP_RESULT_OK;
 }
drivers/gpu/drm/amd/display/dc/bios/dce110/command_table_helper_dce110.c +1 -0
index 3099128223df..cec61c9d7263 100644
@@ -94,6 +94,7 @@ static uint8_t hpd_sel_to_atom(enum hpd_source_id id)
 
 static uint8_t dig_encoder_sel_to_atom(enum engine_id id)
 {
+	(void)id;
 	/* On any ASIC after DCE80, we manually program the DIG_FE
 	 * selection (see connect_dig_be_to_fe function of the link
 	 * encoder), so translation should always return 0 (no FE).
drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper2_dce112.c +1 -0
index 349f0e5d5856..478465fba224 100644
@@ -93,6 +93,7 @@ static uint8_t hpd_sel_to_atom(enum hpd_source_id id)
 
 static uint8_t dig_encoder_sel_to_atom(enum engine_id id)
 {
+	(void)id;
 	/* On any ASIC after DCE80, we manually program the DIG_FE
 	 * selection (see connect_dig_be_to_fe function of the link
 	 * encoder), so translation should always return 0 (no FE).
drivers/gpu/drm/amd/display/dc/bios/dce112/command_table_helper_dce112.c +1 -0
index 1a5fefcde8af..6b8a87f2c49e 100644
@@ -91,6 +91,7 @@ static uint8_t hpd_sel_to_atom(enum hpd_source_id id)
 
 static uint8_t dig_encoder_sel_to_atom(enum engine_id id)
 {
+	(void)id;
 	/* On any ASIC after DCE80, we manually program the DIG_FE
 	 * selection (see connect_dig_be_to_fe function of the link
 	 * encoder), so translation should always return 0 (no FE).
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +1 -0
index f1a639328ab0..0340f6b9f157 100644
@@ -78,6 +78,7 @@ int clk_mgr_helper_get_active_plane_cnt(
 		struct dc *dc,
 		struct dc_state *context)
 {
+	(void)dc;
 	int i, total_plane_count;
 
 	total_plane_count = 0;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +1 -0
index 4ad09b877b6e..c7c849b04a50 100644
@@ -521,6 +521,7 @@ void dcn3_clk_mgr_construct(
 		struct pp_smu_funcs *pp_smu,
 		struct dccg *dccg)
 {
+	(void)pp_smu;
 	struct clk_state_registers_and_bypass s = { 0 };
 
 	clk_mgr->base.ctx = ctx;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +3 -0
index 051052bd10c9..deda0efe18be 100644
@@ -329,6 +329,9 @@ bool dcn31_are_clock_states_equal(struct dc_clocks *a,
 static void dcn31_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)regs_and_bypass;
+	(void)clk_mgr_base;
+	(void)log_info;
 	return;
 }
 
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +3 -0
index 0cb37827a62b..f677cfdafe4d 100644
@@ -395,6 +395,9 @@ bool dcn314_are_clock_states_equal(struct dc_clocks *a,
 static void dcn314_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)regs_and_bypass;
+	(void)clk_mgr_base;
+	(void)log_info;
 	return;
 }
 
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +3 -0
index c49268db85f6..7350406ffe63 100644
@@ -247,6 +247,9 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
 static void dcn315_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)regs_and_bypass;
+	(void)clk_mgr_base;
+	(void)log_info;
 	return;
 }
 
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c +3 -0
index 1769b1f26e75..6c228059be3c 100644
@@ -255,6 +255,9 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
 static void dcn316_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)regs_and_bypass;
+	(void)clk_mgr_base;
+	(void)log_info;
 	return;
 }
 
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +2 -0
index 36d0c1e2014d..f427154a54f8 100644
@@ -872,6 +872,7 @@ static uint32_t dcn32_get_vco_frequency_from_reg(struct clk_mgr_internal *clk_mg
 static void dcn32_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)log_info;
 	struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
 	uint32_t dprefclk_did = 0;
 	uint32_t dcfclk_did = 0;
@@ -1145,6 +1146,7 @@ void dcn32_clk_mgr_construct(
 		struct pp_smu_funcs *pp_smu,
 		struct dccg *dccg)
 {
+	(void)pp_smu;
 	struct clk_log_info log_info = {0};
 
 	clk_mgr->base.ctx = ctx;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c +3 -0
index 306016c1f109..fa284523d8a4 100644
@@ -333,6 +333,7 @@ bool dcn401_is_dc_mode_present(struct clk_mgr *clk_mgr_base)
 static void dcn401_dump_clk_registers(struct clk_state_registers_and_bypass *regs_and_bypass,
 		struct clk_mgr *clk_mgr_base, struct clk_log_info *log_info)
 {
+	(void)log_info;
 		struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
 		uint32_t dprefclk_did = 0;
 		uint32_t dcfclk_did = 0;
@@ -525,6 +526,7 @@ static void dcn401_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr
 			struct dc_state *context,
 			int ref_dtbclk_khz)
 {
+	(void)ref_dtbclk_khz;
 	int i;
 	struct dccg *dccg = clk_mgr->dccg;
 	struct pipe_ctx *otg_master;
@@ -614,6 +616,7 @@ static void dcn401_update_clocks_update_dentist(
 		struct clk_mgr_internal *clk_mgr,
 		struct dc_state *context)
 {
+	(void)context;
 	uint32_t new_disp_divider = 0;
 	uint32_t new_dispclk_wdivider = 0;
 	uint32_t dentist_dispclk_wdivider_readback = 0;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +5 -0
index 97f182bfc9ca..ec888aed207d 100644
@@ -158,6 +158,9 @@ void dcn42_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr,
 		struct dc_state *context,
 		int ref_dtbclk_khz)
 {
+	(void)clk_mgr;
+	(void)context;
+	(void)ref_dtbclk_khz;
 	/* DCN42 does not implement set_dtbclk_dto function, so this is a no-op */
 }
 
@@ -835,6 +838,7 @@ void dcn42_set_low_power_state(struct clk_mgr *clk_mgr_base)
 
 void dcn42_exit_low_power_state(struct clk_mgr *clk_mgr_base)
 {
+	(void)clk_mgr_base;
 
 }
 
@@ -937,6 +941,7 @@ unsigned int dcn42_get_max_clock_khz(struct clk_mgr *clk_mgr_base, enum clk_type
 
 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;
drivers/gpu/drm/amd/display/dc/core/dc.c +12 -0
index 2f938379aec7..bbd5891ab77f 100644
@@ -1134,6 +1134,8 @@ static void disable_all_writeback_pipes_for_stream(
 		struct dc_stream_state *stream,
 		struct dc_state *context)
 {
+	(void)dc;
+	(void)context;
 	int i;
 
 	for (i = 0; i < stream->num_wb_info; i++)
@@ -1145,6 +1147,8 @@ static void apply_ctx_interdependent_lock(struct dc *dc,
 					  struct dc_stream_state *stream,
 					  bool lock)
 {
+	(void)dc;
+	(void)context;
 	int i;
 
 	/* Checks if interdependent update function pointer is NULL or not, takes care of DCE110 case */
@@ -3008,6 +3012,7 @@ static struct surface_update_descriptor det_surface_update(
  */
 static void force_immediate_gsl_plane_flip(struct dc *dc, struct dc_surface_update *updates, int surface_count)
 {
+	(void)dc;
 	bool has_flip_immediate_plane = false;
 	int i;
 
@@ -3286,6 +3291,7 @@ static void copy_stream_update_to_stream(struct dc *dc,
 					 struct dc_stream_state *stream,
 					 struct dc_stream_update *update)
 {
+	(void)context;
 	struct dc_context *dc_ctx = dc->ctx;
 
 	if (update == NULL || stream == NULL)
@@ -3889,6 +3895,7 @@ static void commit_planes_do_stream_update(struct dc *dc,
 
 static bool dc_dmub_should_send_dirty_rect_cmd(struct dc *dc, struct dc_stream_state *stream)
 {
+	(void)dc;
 	if ((stream->link->psr_settings.psr_version == DC_PSR_VERSION_SU_1
 			|| stream->link->psr_settings.psr_version == DC_PSR_VERSION_1)
 			&& stream->ctx->dce_version >= DCN_VERSION_3_1)
@@ -4689,6 +4696,7 @@ static bool could_mpcc_tree_change_for_active_pipes(struct dc *dc,
 		int surface_count,
 		bool *is_plane_addition)
 {
+	(void)srf_updates;
 
 	struct dc_stream_status *cur_stream_status = stream_get_status(dc->current_state, stream);
 	bool force_minimal_pipe_splitting = false;
@@ -5543,6 +5551,7 @@ void dc_commit_updates_for_stream(struct dc *dc,
 		struct dc_stream_update *stream_update,
 		struct dc_state *state)
 {
+	(void)state;
 	bool ret = false;
 
 	dc_exit_ips_for_hw_access(dc);
@@ -5852,6 +5861,7 @@ void dc_lock_memory_clock_frequency(struct dc *dc)
 
 static void blank_and_force_memclk(struct dc *dc, bool apply, unsigned int memclk_mhz)
 {
+	(void)apply;
 	struct dc_state *context = dc->current_state;
 	struct hubp *hubp;
 	struct pipe_ctx *pipe;
@@ -6526,6 +6536,7 @@ void dc_query_current_properties(struct dc *dc, struct dc_current_properties *pr
 void dc_set_edp_power(const struct dc *dc, struct dc_link *edp_link,
 				 bool powerOn)
 {
+	(void)dc;
 	if (edp_link->connector_signal != SIGNAL_TYPE_EDP)
 		return;
 
@@ -6652,6 +6663,7 @@ void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst,
 void dc_get_power_feature_status(struct dc *dc, int primary_otg_inst,
 				struct power_features *out_data)
 {
+	(void)primary_otg_inst;
 	out_data->uclk_p_state = dc->current_state->clk_mgr->clks.p_state_change_support;
 	out_data->fams = dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching;
 }
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +1 -0
index 5b3695e72e19..db86e346307c 100644
@@ -249,6 +249,7 @@ void color_space_to_black_color(
 	enum dc_color_space colorspace,
 	struct tg_color *black_color)
 {
+	(void)dc;
 	switch (colorspace) {
 	case COLOR_SPACE_YCBCR601:
 	case COLOR_SPACE_YCBCR709:
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +7 -0
index e95d5b269738..66597a1f5b78 100644
@@ -1748,6 +1748,7 @@ enum dc_status resource_build_scaling_params_for_context(
 	const struct dc  *dc,
 	struct dc_state *context)
 {
+	(void)dc;
 	int i;
 
 	for (i = 0; i < MAX_PIPES; i++) {
@@ -1825,6 +1826,7 @@ int resource_find_free_pipe_used_as_sec_opp_head_by_cur_otg_master(
 		struct resource_context *new_res_ctx,
 		const struct pipe_ctx *cur_otg_master)
 {
+	(void)cur_res_ctx;
 	const struct pipe_ctx *cur_sec_opp_head = cur_otg_master->next_odm_pipe;
 	struct pipe_ctx *new_pipe;
 	int free_pipe_idx = FREE_PIPE_INDEX_NOT_FOUND;
@@ -1846,6 +1848,7 @@ int resource_find_free_pipe_used_in_cur_mpc_blending_tree(
 		struct resource_context *new_res_ctx,
 		const struct pipe_ctx *cur_opp_head)
 {
+	(void)cur_res_ctx;
 	const struct pipe_ctx *cur_sec_dpp = cur_opp_head->bottom_pipe;
 	struct pipe_ctx *new_pipe;
 	int free_pipe_idx = FREE_PIPE_INDEX_NOT_FOUND;
@@ -2941,6 +2944,7 @@ enum dc_status resource_add_otg_master_for_stream_output(struct dc_state *new_ct
 		const struct resource_pool *pool,
 		struct dc_stream_state *stream)
 {
+	(void)pool;
 	struct dc *dc = stream->ctx->dc;
 
 	return dc->res_pool->funcs->add_stream_to_ctx(dc, new_ctx, stream);
@@ -3023,6 +3027,7 @@ static bool add_plane_to_opp_head_pipes(struct pipe_ctx *otg_master_pipe,
 		struct dc_plane_state *plane_state,
 		struct dc_state *context)
 {
+	(void)context;
 	struct pipe_ctx *opp_head_pipe = otg_master_pipe;
 
 	while (opp_head_pipe) {
@@ -3615,6 +3620,7 @@ static struct hpo_dp_stream_encoder *find_first_free_match_hpo_dp_stream_enc_for
 		const struct resource_pool *pool,
 		struct dc_stream_state *stream)
 {
+	(void)stream;
 	int i;
 
 	for (i = 0; i < pool->hpo_dp_stream_enc_count; i++) {
@@ -3634,6 +3640,7 @@ static struct audio *find_first_free_audio(
 		enum engine_id id,
 		enum dce_version dc_version)
 {
+	(void)dc_version;
 	int i, available_audio_count;
 
 	if (id == ENGINE_ID_UNKNOWN)
drivers/gpu/drm/amd/display/dc/core/dc_state.c +2 -0
index 4b2d5a174fa9..dbee34935c2f 100644
@@ -410,6 +410,7 @@ enum dc_status dc_state_add_stream(
 		struct dc_state *state,
 		struct dc_stream_state *stream)
 {
+	(void)dc;
 	enum dc_status res;
 
 	DC_LOGGER_INIT(dc->ctx->logger);
@@ -785,6 +786,7 @@ struct dc_plane_state *dc_state_create_phantom_plane(const struct dc *dc,
 		struct dc_state *state,
 		struct dc_plane_state *main_plane)
 {
+	(void)main_plane;
 	struct dc_plane_state *phantom_plane = dc_create_plane_state(dc);
 
 	DC_LOGGER_INIT(dc->ctx->logger);
drivers/gpu/drm/amd/display/dc/core/dc_surface.c +1 -0
index 5d3a8a63b7cd..56b21059a663 100644
@@ -57,6 +57,7 @@ void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_sta
 
 void dc_plane_destruct(struct dc_plane_state *plane_state)
 {
+	(void)plane_state;
 	// no more pointers to free within dc_plane_state
 }
 
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +1 -0
index d6a08064456b..9f5886d235e3 100644
@@ -1082,6 +1082,7 @@ static void dc_build_cursor_attribute_update_payload1(
 		struct dmub_cursor_attributes_cfg *pl_A, const uint8_t p_idx,
 		const struct hubp *hubp, const struct dpp *dpp)
 {
+	(void)p_idx;
 	/* Hubp */
 	pl_A->aHubp.SURFACE_ADDR_HIGH = hubp->att.SURFACE_ADDR_HIGH;
 	pl_A->aHubp.SURFACE_ADDR = hubp->att.SURFACE_ADDR;
drivers/gpu/drm/amd/display/dc/dc_helper.c +1 -0
index 04b8b798dfff..77299767096f 100644
@@ -108,6 +108,7 @@ static void set_reg_field_values(struct dc_reg_value_masks *field_value_mask,
 		uint8_t shift1, uint32_t mask1, uint32_t field_value1,
 		va_list ap)
 {
+	(void)addr;
 	uint32_t shift, mask, field_value;
 	int i = 1;
 
drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c +2 -0
index c647dff5234a..42cb8b29dd47 100644
@@ -165,6 +165,7 @@ void dccg31_set_dpstreamclk(
 		int otg_inst,
 		int dp_hpo_inst)
 {
+	(void)dp_hpo_inst;
 	if (src == REFCLK)
 		dccg31_disable_dpstreamclk(dccg, otg_inst);
 	else
@@ -644,6 +645,7 @@ void dccg31_get_dccg_ref_freq(struct dccg *dccg,
 		unsigned int xtalin_freq_inKhz,
 		unsigned int *dccg_ref_freq_inKhz)
 {
+	(void)dccg;
 	/*
 	 * Assume refclk is sourced from xtalin
 	 * expect 24MHz
drivers/gpu/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c +1 -0
index ce697c3249fb..d2752dd8f81f 100644
@@ -265,6 +265,7 @@ static void dccg32_get_dccg_ref_freq(struct dccg *dccg,
 		unsigned int xtalin_freq_inKhz,
 		unsigned int *dccg_ref_freq_inKhz)
 {
+	(void)dccg;
 	/*
 	 * Assume refclk is sourced from xtalin
 	 * expect 100MHz
drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c +2 -0
index 943ec1983076..33418ee1fa62 100644
@@ -558,6 +558,7 @@ static void dccg35_set_symclk32_se_src_new(
 static int
 dccg35_is_symclk32_se_src_functional_le_new(struct dccg *dccg, int symclk_32_se_inst, int symclk_32_le_inst)
 {
+	(void)symclk_32_se_inst;
 	uint32_t en;
 	uint32_t src_sel;
 
@@ -2373,6 +2374,7 @@ static void dccg35_disable_symclk_se_cb(
 			uint32_t stream_enc_inst,
 			uint32_t link_enc_inst)
 {
+	(void)link_enc_inst;
 	dccg35_disable_symclk_fe_new(dccg, stream_enc_inst);
 
 	/* DMU PHY sequence switches SYMCLK_BE (link_enc_inst) to ref clock once PHY is turned off */
drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +4 -0
index f4ead86c9a96..72aaf057e775 100644
@@ -161,6 +161,7 @@ void dccg401_set_pixel_rate_div(
 		enum pixel_rate_div tmds_div,
 		enum pixel_rate_div unused)
 {
+	(void)unused;
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 	uint32_t cur_tmds_div = PIXEL_RATE_DIV_NA;
 	uint32_t dp_dto_int;
@@ -353,6 +354,7 @@ void dccg401_get_dccg_ref_freq(struct dccg *dccg,
 		unsigned int xtalin_freq_inKhz,
 		unsigned int *dccg_ref_freq_inKhz)
 {
+	(void)dccg;
 	/*
 	 * Assume refclk is sourced from xtalin
 	 * expect 100MHz
@@ -721,6 +723,7 @@ void dccg401_init(struct dccg *dccg)
 
 void dccg401_set_dto_dscclk(struct dccg *dccg, uint32_t inst, uint32_t num_slices_h)
 {
+	(void)num_slices_h;
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 
 	switch (inst) {
@@ -838,6 +841,7 @@ void dccg401_enable_symclk_se(struct dccg *dccg, uint32_t stream_enc_inst, uint3
 
 void dccg401_disable_symclk_se(struct dccg *dccg, uint32_t stream_enc_inst, uint32_t link_enc_inst)
 {
+	(void)link_enc_inst;
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 
 	switch (stream_enc_inst) {
drivers/gpu/drm/amd/display/dc/dccg/dcn42/dcn42_dccg.c +1 -0
index 19dfc3fe5c3a..b813310763e5 100644
@@ -186,6 +186,7 @@ void dccg42_set_pixel_rate_div(
 		enum pixel_rate_div tmds_div,
 		enum pixel_rate_div unused)
 {
+	(void)unused;
 	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
 	uint32_t cur_tmds_div = PIXEL_RATE_DIV_NA;
 	uint32_t dp_dto_int;
drivers/gpu/drm/amd/display/dc/dce/dce_abm.c +1 -0
index 2dcf394edf22..07023199fd21 100644
@@ -57,6 +57,7 @@
 
 static bool dce_abm_set_pipe(struct abm *abm, uint32_t controller_id, uint32_t panel_inst)
 {
+	(void)panel_inst;
 	struct dce_abm *abm_dce = TO_DCE_ABM(abm);
 	uint32_t rampingBoundary = 0xFFFF;
 
drivers/gpu/drm/amd/display/dc/dce/dce_audio.c +3 -0
index 1276f19164b3..8af8e2c17134 100644
@@ -350,6 +350,7 @@ static uint32_t calculate_required_audio_bw_in_symbols(
 	uint32_t av_stream_map_lane_count,
 	uint32_t audio_sdp_overhead)
 {
+	(void)channel_count;
 	/* DP spec recommends between 1.05 to 1.1 safety margin to prevent sample under-run */
 	struct fixed31_32 audio_sdp_margin = dc_fixpt_from_fraction(110, 100);
 	struct fixed31_32 horizontal_line_freq_khz = dc_fixpt_from_fraction(
@@ -1027,6 +1028,7 @@ static void get_azalia_clock_info_hdmi(
 	uint32_t actual_pixel_clock_100Hz,
 	struct azalia_clock_info *azalia_clock_info)
 {
+	(void)crtc_pixel_clock_100hz;
 	/* audio_dto_phase= 24 * 10,000;
 	 *   24MHz in [100Hz] units */
 	azalia_clock_info->audio_dto_phase =
@@ -1043,6 +1045,7 @@ static void get_azalia_clock_info_dp(
 	const struct audio_pll_info *pll_info,
 	struct azalia_clock_info *azalia_clock_info)
 {
+	(void)requested_pixel_clock_100Hz;
 	/* Reported dpDtoSourceClockInkhz value for
 	 * DCE8 already adjusted for SS, do not need any
 	 * adjustment here anymore
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +4 -0
index 993a25c39aa9..c9722ecdbb9b 100644
@@ -539,6 +539,7 @@ static void dce112_get_pix_clk_dividers_helper (
 		struct pll_settings *pll_settings,
 		struct pixel_clk_params *pix_clk_params)
 {
+	(void)clk_src;
 	uint32_t actual_pixel_clock_100hz;
 
 	actual_pixel_clock_100hz = pix_clk_params->requested_pix_clk_100hz;
@@ -847,6 +848,7 @@ static bool dce110_program_pix_clk(
 		enum dp_link_encoding encoding,
 		struct pll_settings *pll_settings)
 {
+	(void)encoding;
 	struct dce110_clk_src *clk_src = TO_DCE110_CLK_SRC(clock_source);
 	struct bp_pixel_clock_parameters bp_pc_params = {0};
 
@@ -921,6 +923,7 @@ static bool dce112_program_pix_clk(
 		enum dp_link_encoding encoding,
 		struct pll_settings *pll_settings)
 {
+	(void)encoding;
 	struct dce110_clk_src *clk_src = TO_DCE110_CLK_SRC(clock_source);
 	struct bp_pixel_clock_parameters bp_pc_params = {0};
 
@@ -1070,6 +1073,7 @@ static bool dcn401_program_pix_clk(
 		enum dp_link_encoding encoding,
 		struct pll_settings *pll_settings)
 {
+	(void)encoding;
 	struct dce110_clk_src *clk_src = TO_DCE110_CLK_SRC(clock_source);
 	unsigned int inst = pix_clk_params->controller_id - CONTROLLER_ID_D0;
 	const struct pixel_rate_range_table_entry *e =
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +1 -0
index 5f8fba45d98d..e7a0d3b7c2cb 100644
@@ -71,6 +71,7 @@ static const uint32_t abm_gain_stepsize = 0x0060;
 
 static bool dce_dmcu_init(struct dmcu *dmcu)
 {
+	(void)dmcu;
 	// Do nothing
 	return true;
 }
drivers/gpu/drm/amd/display/dc/dce/dce_i2c.c +1 -0
index f5cd2392fc5f..f5261e8d7678 100644
@@ -31,6 +31,7 @@ bool dce_i2c_oem_device_present(
 	size_t slave_address
 )
 {
+	(void)pool;
 	struct dc *dc = ddc->ctx->dc;
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	struct graphics_object_id id = {0};
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c +2 -0
index 365dd2e37aea..fe239a96121e 100644
@@ -69,6 +69,7 @@ static enum i2c_channel_operation_result get_channel_status(
 	struct dce_i2c_hw *dce_i2c_hw,
 	uint8_t *returned_bytes)
 {
+	(void)returned_bytes;
 	uint32_t i2c_sw_status = 0;
 	uint32_t value =
 		REG_GET(DC_I2C_SW_STATUS, DC_I2C_SW_STATUS, &i2c_sw_status);
@@ -631,6 +632,7 @@ bool dce_i2c_submit_command_hw(
 	struct i2c_command *cmd,
 	struct dce_i2c_hw *dce_i2c_hw)
 {
+	(void)ddc;
 	uint8_t index_of_payload = 0;
 	bool result;
 
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c +3 -0
index 2d73b94c515c..52e05b9185f1 100644
@@ -67,6 +67,7 @@ static void release_engine_dce_sw(
 	struct resource_pool *pool,
 	struct dce_i2c_sw *dce_i2c_sw)
 {
+	(void)pool;
 	dal_ddc_close(dce_i2c_sw->ddc);
 	dce_i2c_sw->ddc = NULL;
 }
@@ -76,6 +77,7 @@ static bool wait_for_scl_high_sw(
 	struct ddc *ddc,
 	uint16_t clock_delay_div_4)
 {
+	(void)ctx;
 	uint32_t scl_retry = 0;
 	uint32_t scl_retry_max = I2C_SW_TIMEOUT_DELAY / clock_delay_div_4;
 
@@ -469,6 +471,7 @@ bool dce_i2c_submit_command_sw(
 	struct i2c_command *cmd,
 	struct dce_i2c_sw *dce_i2c_sw)
 {
+	(void)ddc;
 	uint8_t index_of_payload = 0;
 	bool result;
 
drivers/gpu/drm/amd/display/dc/dce/dce_ipp.c +1 -0
index 34bff9aef66c..ee55ec21d270 100644
@@ -43,6 +43,7 @@ static void dce_ipp_cursor_set_position(
 	const struct dc_cursor_position *position,
 	const struct dc_cursor_mi_param *param)
 {
+	(void)param;
 	struct dce_ipp *ipp_dce = TO_DCE_IPP(ipp);
 
 	/* lock cursor registers */
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +1 -0
index 2ba3d3a3aac5..b95c5866a10c 100644
@@ -820,6 +820,7 @@ bool dce110_link_encoder_validate_dp_output(
 	const struct dce110_link_encoder *enc110,
 	const struct dc_crtc_timing *crtc_timing)
 {
+	(void)enc110;
 	if (crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
 		return false;
 
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +4 -0
index 1c2009e38aa1..168c2d0a5eaa 100644
@@ -317,6 +317,7 @@ static void dce_mi_program_display_marks(
 	struct dce_watermarks urgent,
 	uint32_t total_dest_line_time_ns)
 {
+	(void)stutter_enter;
 	struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi);
 	uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
 
@@ -370,6 +371,7 @@ static void dce112_mi_program_display_marks(struct mem_input *mi,
 	struct dce_watermarks urgent,
 	uint32_t total_dest_line_time_ns)
 {
+	(void)stutter_entry;
 	struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi);
 	uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
 
@@ -656,6 +658,8 @@ static void dce_mi_program_surface_config(
 	struct dc_plane_dcc_param *dcc,
 	bool horizontal_mirror)
 {
+	(void)dcc;
+	(void)horizontal_mirror;
 	struct dce_mem_input *dce_mi = TO_DCE_MEM_INPUT(mi);
 	REG_UPDATE(GRPH_ENABLE, GRPH_ENABLE, 1);
 
drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +1 -0
index f342da5a5e50..61d478cfca6d 100644
@@ -600,6 +600,7 @@ void dce110_opp_set_dyn_expansion(
 	enum dc_color_depth color_dpth,
 	enum signal_type signal)
 {
+	(void)color_sp;
 	struct dce110_opp *opp110 = TO_DCE110_OPP(opp);
 
 	REG_UPDATE_2(FMT_DYNAMIC_EXP_CNTL,
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +4 -0
index 87c19f17c799..ed407e779c12 100644
@@ -271,6 +271,8 @@ static void dce110_stream_encoder_dp_set_stream_attribute(
 	bool use_vsc_sdp_for_colorimetry,
 	uint32_t enable_sdp_splitting)
 {
+	(void)use_vsc_sdp_for_colorimetry;
+	(void)enable_sdp_splitting;
 	uint32_t h_active_start;
 	uint32_t v_active_start;
 	uint32_t misc0 = 0;
@@ -901,6 +903,7 @@ static void dce110_stream_encoder_dp_blank(
 	struct dc_link *link,
 	struct stream_encoder *enc)
 {
+	(void)link;
 	struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
 	uint32_t  reg1 = 0;
 	uint32_t max_retries = DP_BLANK_MAX_RETRY * 10;
@@ -951,6 +954,7 @@ static void dce110_stream_encoder_dp_unblank(
 	struct stream_encoder *enc,
 	const struct encoder_unblank_param *param)
 {
+	(void)link;
 	struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
 
 	if (param->link_settings.link_rate != LINK_RATE_UNKNOWN) {
drivers/gpu/drm/amd/display/dc/dce/dce_transform.c +2 -0
index 1ab5ae9b5ea5..c1448ae47366 100644
@@ -282,6 +282,7 @@ static void calculate_inits(
 	const struct scaler_data *data,
 	struct scl_ratios_inits *inits)
 {
+	(void)xfm_dce;
 	struct fixed31_32 h_init;
 	struct fixed31_32 v_init;
 
@@ -1240,6 +1241,7 @@ static void program_color_matrix(
 	const struct out_csc_color_matrix *tbl_entry,
 	enum grph_color_adjust_option options)
 {
+	(void)options;
 	{
 		REG_SET_2(OUTPUT_CSC_C11_C12, 0,
 			OUTPUT_CSC_C11, tbl_entry->regval[0],
drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c +1 -0
index 2764125d63b3..c8077905ff9e 100644
@@ -173,6 +173,7 @@ static bool dmub_abm_set_backlight_level_pwm_ex(struct abm *abm,
 		unsigned int controller_id,
 		unsigned int panel_inst)
 {
+	(void)controller_id;
 	bool ret = false;
 	unsigned int feature_support;
 
drivers/gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c +1 -0
index a641ae04450c..806b5709c9e7 100644
@@ -188,6 +188,7 @@ void dmub_abm_init_config(struct abm *abm,
 
 bool dmub_abm_set_pause(struct abm *abm, bool pause, unsigned int panel_inst, unsigned int stream_inst)
 {
+	(void)stream_inst;
 	union dmub_rb_cmd cmd;
 	struct dc_context *dc = abm->ctx;
 	uint8_t panel_mask = 0x01 << panel_inst;
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +1 -0
index fd8244c94687..fbb7ee44c589 100644
@@ -216,6 +216,7 @@ static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub,
 		uint8_t panel_inst,
 		uint16_t frame_skip_number)
 {
+	(void)panel_inst;
 	union dmub_rb_cmd cmd;
 	struct dc_context *dc = dmub->ctx;
 	struct dmub_rb_cmd_replay_set_coasting_vtotal *pCmd = NULL;
drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input_v.c +10 -0
index 2c43c2422638..b265a72eeb70 100644
@@ -40,6 +40,7 @@ static void set_flip_control(
 	struct dce_mem_input *mem_input110,
 	bool immediate)
 {
+	(void)immediate;
 	uint32_t value = 0;
 
 	value = dm_read_reg(
@@ -165,6 +166,7 @@ static void program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
+	(void)pixel_format;
 	uint32_t value = 0;
 
 	set_reg_field_value(value, info->gfx8.num_banks,
@@ -642,6 +644,8 @@ static void dce_mem_input_v_program_surface_config(
 	struct dc_plane_dcc_param *dcc,
 	bool horizotal_mirror)
 {
+	(void)dcc;
+	(void)horizotal_mirror;
 	struct dce_mem_input *mem_input110 = TO_DCE_MEM_INPUT(mem_input);
 
 	enable(mem_input110);
@@ -927,6 +931,7 @@ static void dce_mem_input_v_program_display_marks(
 	struct dce_watermarks urgent,
 	uint32_t total_dest_line_time_ns)
 {
+	(void)stutter_enter;
 	program_urgency_watermark_l(
 		mem_input->ctx,
 		urgent,
@@ -970,6 +975,9 @@ static void dce110_allocate_mem_input_v(
 	uint32_t pix_clk_khz,/* for current stream */
 	uint32_t total_stream_num)
 {
+	(void)h_total;
+	(void)v_total;
+	(void)total_stream_num;
 	uint32_t addr;
 	uint32_t value;
 	uint32_t pix_dur;
@@ -1009,6 +1017,8 @@ static void dce110_free_mem_input_v(
 	struct mem_input *mi,
 	uint32_t total_stream_num)
 {
+	(void)mi;
+	(void)total_stream_num;
 }
 
 static const struct mem_input_funcs dce110_mem_input_v_funcs = {
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_csc_v.c +1 -0
index e096d2b95ef9..cf63fac82832 100644
@@ -110,6 +110,7 @@ static void program_color_matrix_v(
 	const struct out_csc_color_matrix *tbl_entry,
 	enum grph_color_adjust_option options)
 {
+	(void)options;
 	struct dc_context *ctx = xfm_dce->base.ctx;
 	uint32_t cntl_value = dm_read_reg(ctx, mmCOL_MAN_OUTPUT_CSC_CONTROL);
 	bool use_set_a = (get_reg_field_value(cntl_value,
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c +2 -0
index 9b65b77e8823..a4e76db46c9c 100644
@@ -551,5 +551,7 @@ void dce110_opp_set_regamma_mode_v(
 	struct transform *xfm,
 	enum opp_regamma mode)
 {
+	(void)xfm;
+	(void)mode;
 	// TODO: need to implement the function
 }
drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.c +9 -0
index 61b0807693fb..b015b27cd1c6 100644
@@ -66,6 +66,7 @@ static void dce110_timing_generator_apply_front_porch_workaround(
 	struct timing_generator *tg,
 	struct dc_crtc_timing *timing)
 {
+	(void)tg;
 	if (timing->flags.INTERLACE == 1) {
 		if (timing->v_front_porch < 2)
 			timing->v_front_porch = 2;
@@ -1115,6 +1116,7 @@ bool dce110_timing_generator_validate_timing(
 	const struct dc_crtc_timing *timing,
 	enum signal_type signal)
 {
+	(void)signal;
 	uint32_t h_blank;
 	uint32_t h_back_porch, hsync_offset, h_sync_start;
 
@@ -1490,6 +1492,7 @@ void dce110_timing_generator_enable_reset_trigger(
 	struct timing_generator *tg,
 	int source_tg_inst)
 {
+	(void)source_tg_inst;
 	uint32_t value;
 	uint32_t rising_edge = 0;
 	uint32_t falling_edge = 0;
@@ -1959,6 +1962,12 @@ void dce110_tg_program_timing(struct timing_generator *tg,
 	const enum signal_type signal,
 	bool use_vbios)
 {
+	(void)vready_offset;
+	(void)vstartup_start;
+	(void)vupdate_offset;
+	(void)vupdate_width;
+	(void)pstate_keepout;
+	(void)signal;
 	if (use_vbios)
 		dce110_timing_generator_program_timing_generator(tg, timing);
 	else
drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c +9 -0
index 9837dec837ff..ba22c93acd81 100644
@@ -442,6 +442,12 @@ static void dce110_timing_generator_v_program_timing(struct timing_generator *tg
 	const enum signal_type signal,
 	bool use_vbios)
 {
+	(void)vready_offset;
+	(void)vstartup_start;
+	(void)vupdate_offset;
+	(void)vupdate_width;
+	(void)pstate_keepout;
+	(void)signal;
 	if (use_vbios)
 		dce110_timing_generator_program_timing_generator(tg, timing);
 	else
@@ -621,6 +627,7 @@ static void dce110_timing_generator_v_setup_global_swap_lock(
 	struct timing_generator *tg,
 	const struct dcp_gsl_params *gsl_params)
 {
+	(void)gsl_params;
 	DC_LOG_ERROR("Timing Sync not supported on underlay pipe\n");
 	return;
 }
@@ -629,6 +636,7 @@ static void dce110_timing_generator_v_enable_reset_trigger(
 	struct timing_generator *tg,
 	int source_tg_inst)
 {
+	(void)source_tg_inst;
 	DC_LOG_ERROR("Timing Sync not supported on underlay pipe\n");
 	return;
 }
@@ -650,6 +658,7 @@ static void dce110_timing_generator_v_tear_down_global_swap_lock(
 static void dce110_timing_generator_v_disable_vga(
 	struct timing_generator *tg)
 {
+	(void)tg;
 	return;
 }
 
drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c +6 -0
index 28d3b2663cd3..6be18665b1f7 100644
@@ -371,6 +371,9 @@ static void calculate_inits(
 	struct rect *luma_viewport,
 	struct rect *chroma_viewport)
 {
+	(void)xfm_dce;
+	(void)luma_viewport;
+	(void)chroma_viewport;
 	inits->h_int_scale_ratio_luma =
 		dc_fixpt_u2d19(data->ratios.horz) << 5;
 	inits->v_int_scale_ratio_luma =
@@ -619,6 +622,8 @@ static void dce110_xfmv_set_gamut_remap(
 	struct transform *xfm,
 	const struct xfm_grph_csc_adjustment *adjust)
 {
+	(void)xfm;
+	(void)adjust;
 	/* DO NOTHING*/
 }
 
@@ -627,6 +632,7 @@ static void dce110_xfmv_set_pixel_storage_depth(
 	enum lb_pixel_depth depth,
 	const struct bit_depth_reduction_params *bit_depth_params)
 {
+	(void)bit_depth_params;
 	struct dce_transform *xfm_dce = TO_DCE_TRANSFORM(xfm);
 	int pixel_depth = 0;
 	int expan_mode = 0;
drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c +1 -0
index faae12cf7968..6b08cab32ee3 100644
@@ -284,6 +284,7 @@ static uint32_t align_to_chunks_number_per_line(
 	struct dce112_compressor *cp110,
 	uint32_t pixels)
 {
+	(void)cp110;
 	return 256 * ((pixels + 255) / 256);
 }
 
drivers/gpu/drm/amd/display/dc/dce120/dce120_timing_generator.c +7 -0
index 31c4f44ceaac..70410ef0c291 100644
@@ -304,6 +304,7 @@ static void dce120_timing_generator_enable_reset_trigger(
 	struct timing_generator *tg,
 	int source)
 {
+	(void)source;
 	enum trigger_source_select trig_src_select = TRIGGER_SOURCE_SELECT_LOGIC_ZERO;
 	struct dce110_timing_generator *tg110 = DCE110TG_FROM_TG(tg);
 	uint32_t rising_edge = 0;
@@ -701,6 +702,12 @@ static void dce120_tg_program_timing(struct timing_generator *tg,
 	const enum signal_type signal,
 	bool use_vbios)
 {
+	(void)vready_offset;
+	(void)vstartup_start;
+	(void)vupdate_offset;
+	(void)vupdate_width;
+	(void)pstate_keepout;
+	(void)signal;
 	if (use_vbios)
 		dce110_timing_generator_program_timing_generator(tg, timing);
 	else
drivers/gpu/drm/amd/display/dc/dce80/dce80_timing_generator.c +6 -0
index 88e7a1fc9a30..53c03364f5d4 100644
@@ -115,6 +115,12 @@ static void dce80_timing_generator_program_timing(struct timing_generator *tg,
 	const enum signal_type signal,
 	bool use_vbios)
 {
+	(void)vready_offset;
+	(void)vstartup_start;
+	(void)vupdate_offset;
+	(void)vupdate_width;
+	(void)pstate_keepout;
+	(void)signal;
 	if (!use_vbios)
 		program_pix_dur(tg, timing->pix_clk_100hz);
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c +2 -0
index 365a3215f6d5..e9efbb49586e 100644
@@ -44,6 +44,7 @@
 
 static bool dwb1_get_caps(struct dwbc *dwbc, struct dwb_caps *caps)
 {
+	(void)dwbc;
 	if (caps) {
 		caps->adapter_id = 0;	/* we only support 1 adapter currently */
 		caps->hw_version = DCN_VERSION_1_0;
@@ -63,6 +64,7 @@ static bool dwb1_get_caps(struct dwbc *dwbc, struct dwb_caps *caps)
 
 static bool dwb1_enable(struct dwbc *dwbc, struct dc_dwb_params *params)
 {
+	(void)params;
 	struct dcn10_dwbc *dwbc10 = TO_DCN10_DWBC(dwbc);
 
 	/* disable first. */
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c +1 -0
index 05aac3e444b4..4c7e4fe3c680 100644
@@ -77,6 +77,7 @@ static void apg31_se_audio_setup(
 	unsigned int az_inst,
 	struct audio_info *audio_info)
 {
+	(void)az_inst;
 	struct dcn31_apg *apg31 = DCN31_APG_FROM_APG(apg);
 
 	ASSERT(audio_info);
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c +2 -0
index d928b4dcf6b8..d913f065ecca 100644
@@ -249,6 +249,7 @@ void enc1_stream_encoder_dp_set_stream_attribute(
 	bool use_vsc_sdp_for_colorimetry,
 	uint32_t enable_sdp_splitting)
 {
+	(void)enable_sdp_splitting;
 	uint32_t h_active_start;
 	uint32_t v_active_start;
 	uint32_t misc0 = 0;
@@ -783,6 +784,7 @@ void enc1_stream_encoder_send_immediate_sdp_message(
 	const uint8_t *custom_sdp_message,
 	unsigned int sdp_message_size)
 {
+	(void)sdp_message_size;
 	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
 	uint32_t value = 0;
 
drivers/gpu/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c +2 -0
index 3e85e9c3d2cb..d1fd5462dca5 100644
@@ -394,6 +394,8 @@ void enc314_dp_set_dsc_config(struct stream_encoder *enc,
 					uint32_t dsc_bytes_per_pixel,
 					uint32_t dsc_slice_width)
 {
+	(void)dsc_bytes_per_pixel;
+	(void)dsc_slice_width;
 	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
 
 	REG_UPDATE(DP_DSC_CNTL,	DP_DSC_MODE, dsc_mode == OPTC_DSC_DISABLED ? 0 : 1);
drivers/gpu/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c +2 -0
index 3523d1cdc1a3..edafa3808455 100644
@@ -356,6 +356,8 @@ static void enc32_dp_set_dsc_config(struct stream_encoder *enc,
 					uint32_t dsc_bytes_per_pixel,
 					uint32_t dsc_slice_width)
 {
+	(void)dsc_bytes_per_pixel;
+	(void)dsc_slice_width;
 	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
 
 	REG_UPDATE(DP_DSC_CNTL,	DP_DSC_MODE, dsc_mode == OPTC_DSC_DISABLED ? 0 : 1);
drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c +1 -0
index fd5d1dbf9dc6..de24dcd27e6c 100644
@@ -369,6 +369,7 @@ static void enc35_stream_encoder_map_to_link(
 		uint32_t stream_enc_inst,
 		uint32_t link_enc_inst)
 {
+	(void)stream_enc_inst;
 	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
 
 	ASSERT(stream_enc_inst < 5 && link_enc_inst < 5);
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c +3 -0
index 99aab70ef3e1..2d33ed0c062d 100644
@@ -57,6 +57,8 @@ static void enc401_dp_set_odm_combine(
 	struct stream_encoder *enc,
 	bool odm_combine)
 {
+	(void)enc;
+	(void)odm_combine;
 }
 
 /* setup stream encoder in dvi mode */
@@ -710,6 +712,7 @@ void enc401_stream_encoder_map_to_link(
 		uint32_t stream_enc_inst,
 		uint32_t link_enc_inst)
 {
+	(void)stream_enc_inst;
 	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
 
 	REG_UPDATE(STREAM_MAPPER_CONTROL,
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.c +53 -12

111 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c +79 -32

159 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c +1 -0
index 74962791302f..61553e24d53e 100644
@@ -525,6 +525,7 @@ static void split_stream_across_pipes(
 		struct pipe_ctx *primary_pipe,
 		struct pipe_ctx *secondary_pipe)
 {
+	(void)res_ctx;
 	int pipe_idx = secondary_pipe->pipe_idx;
 
 	if (!primary_pipe->plane_state)
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +1 -0
index ae34982b1b1c..887744d56d6a 100644
@@ -1316,6 +1316,7 @@ int dcn20_populate_dml_pipes_from_context(struct dc *dc,
 					  display_e2e_pipe_params_st *pipes,
 					  enum dc_validate_mode validate_mode)
 {
+	(void)validate_mode;
 	int pipe_cnt, i;
 	bool synchronized_vblank = true;
 	struct resource_context *res_ctx = &context->res_ctx;
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c +4 -0
index 0c8c4a080c50..f5f636afe33c 100644
@@ -501,6 +501,8 @@ static bool CalculatePrefetchSchedule(
 		double *VUpdateWidthPix,
 		double *VReadyOffsetPix)
 {
+	(void)mode_lib;
+
 	bool MyError = false;
 	unsigned int DPPCycles, DISPCLKCycles;
 	double DSTTotalPixelsAfterScaler, TotalRepeaterDelayTime;
@@ -878,6 +880,7 @@ static unsigned int CalculateVMAndRowBytes(
 		unsigned int *dpte_row_height,
 		unsigned int *meta_row_height)
 {
+	(void)ViewportWidth;
 	unsigned int MetaRequestHeight;
 	unsigned int MetaRequestWidth;
 	unsigned int MetaSurfWidth;
@@ -2953,6 +2956,7 @@ static double CalculateRemoteSurfaceFlipDelay(
 		double *TInitXFill,
 		double *TslvChk)
 {
+	(void)mode_lib;
 	double TSlvSetup, AvgfillRate, result;
 
 	*SrcActiveDrainRate = VRatio * SwathWidth * Bpp / LineTime;
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c +5 -0
index c935903b68e1..95b0a3501880 100644
@@ -495,6 +495,7 @@ static bool CalculateDelayAfterScaler(
 		double *DSTYAfterScaler
 		)
 {
+	(void)ReturnBW;
 	unsigned int DPPCycles, DISPCLKCycles;
 	double DataFabricLineDeliveryTimeLuma;
 	double DataFabricLineDeliveryTimeChroma;
@@ -592,6 +593,8 @@ static bool CalculatePrefetchSchedule(
 		double *VUpdateWidthPix,
 		double *VReadyOffsetPix)
 {
+	(void)mode_lib;
+
 	bool MyError = false;
 	double TotalRepeaterDelayTime;
 	double Tdm, LineTime, Tsetup;
@@ -938,6 +941,7 @@ static unsigned int CalculateVMAndRowBytes(
 		unsigned int *dpte_row_height,
 		unsigned int *meta_row_height)
 {
+	(void)ViewportWidth;
 	unsigned int MetaRequestHeight;
 	unsigned int MetaRequestWidth;
 	unsigned int MetaSurfWidth;
@@ -3026,6 +3030,7 @@ static double CalculateRemoteSurfaceFlipDelay(
 		double *TInitXFill,
 		double *TslvChk)
 {
+	(void)mode_lib;
 	double TSlvSetup, AvgfillRate, result;
 
 	*SrcActiveDrainRate = VRatio * SwathWidth * Bpp / LineTime;
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c +5 -0
index 9c58ff1069d6..591d9618bdc0 100644
@@ -126,6 +126,7 @@ static double get_refcyc_per_delivery(struct display_mode_lib *mode_lib,
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -1538,6 +1539,9 @@ void dml20_rq_dlg_get_dlg_reg(struct display_mode_lib *mode_lib,
 		const bool ignore_viewport_pos,
 		const bool immediate_flip_support)
 {
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
 	display_rq_params_st rq_param = {0};
 	display_dlg_sys_params_st dlg_sys_param = {0};
 
@@ -1588,6 +1592,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
 		unsigned int cur_width,
 		enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c +5 -0
index 570e6e39eb45..d4dddc9d535a 100644
@@ -126,6 +126,7 @@ static double get_refcyc_per_delivery(struct display_mode_lib *mode_lib,
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -1539,6 +1540,9 @@ void dml20v2_rq_dlg_get_dlg_reg(struct display_mode_lib *mode_lib,
 		const bool ignore_viewport_pos,
 		const bool immediate_flip_support)
 {
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
 	display_rq_params_st rq_param = {0};
 	display_dlg_sys_params_st dlg_sys_param = {0};
 
@@ -1589,6 +1593,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
 		unsigned int cur_width,
 		enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c +19 -0
index 48905ca39b70..11570a0c9427 100644
@@ -695,6 +695,9 @@ static bool CalculatePrefetchSchedule(
 		double *VUpdateWidthPix,
 		double *VReadyOffsetPix)
 {
+	(void)mode_lib;
+	(void)XFCEnabled;
+
 	bool MyError = false;
 	unsigned int DPPCycles, DISPCLKCycles;
 	double DSTTotalPixelsAfterScaler, TotalRepeaterDelayTime;
@@ -1290,6 +1293,8 @@ static unsigned int CalculateVMAndRowBytes(
 		unsigned int *DPDE0BytesFrame,
 		unsigned int *MetaPTEBytesFrame)
 {
+	(void)SourcePixelFormat;
+	(void)ViewportWidth;
 	unsigned int MPDEBytesFrame;
 	unsigned int DCCMetaSurfaceBytes;
 	unsigned int MacroTileSizeBytes;
@@ -3040,6 +3045,7 @@ static double CalculateRemoteSurfaceFlipDelay(
 		double *TInitXFill,
 		double *TslvChk)
 {
+	(void)mode_lib;
 	double TSlvSetup, AvgfillRate, result;
 
 	*SrcActiveDrainRate = VRatio * SwathWidth * Bpp / LineTime;
@@ -3187,6 +3193,7 @@ static void CalculateFlipSchedule(
 		double *final_flip_bw,
 		bool *ImmediateFlipSupportedForPipe)
 {
+	(void)mode_lib;
 	double min_row_time = 0.0;
 	unsigned int HostVMDynamicLevels;
 	double TimeForFetchingMetaPTEImmediateFlip;
@@ -5294,6 +5301,15 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(
 		double *StutterEnterPlusExitWatermark,
 		double *MinActiveDRAMClockChangeLatencySupported)
 {
+	(void)DPPCLK;
+	(void)SwathWidthSingleDPPY;
+	(void)DCFCLK;
+	(void)UrgentOutOfOrderReturn;
+	(void)ReturnBW;
+	(void)GPUVMEnable;
+	(void)dpte_group_bytes;
+	(void)MetaChunkSize;
+
 	double EffectiveLBLatencyHidingY;
 	double EffectiveLBLatencyHidingC;
 	double DPPOutputBufferLinesY;
@@ -5885,6 +5901,9 @@ static void CalculateMetaAndPTETimes(
 		double TimePerVMRequestVBlank[],
 		double TimePerVMRequestFlip[])
 {
+	(void)VRatioPrefetchY;
+	(void)VRatioPrefetchC;
+
 	unsigned int meta_chunk_width;
 	unsigned int min_meta_chunk_width;
 	unsigned int meta_chunk_per_row_int;
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c +5 -0
index f549da082c01..8a611b3bec33 100644
@@ -102,6 +102,7 @@ static double get_refcyc_per_delivery(
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -1647,6 +1648,9 @@ void dml21_rq_dlg_get_dlg_reg(
 		const bool ignore_viewport_pos,
 		const bool immediate_flip_support)
 {
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
 	display_rq_params_st rq_param = {0};
 	display_dlg_sys_params_st dlg_sys_param = {0};
 
@@ -1702,6 +1706,7 @@ static void calculate_ttu_cursor(
 		unsigned int cur_width,
 		enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
drivers/gpu/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c +2 -0
index e5f5c0663750..0cdd60869ce1 100644
@@ -571,6 +571,7 @@ void dcn30_fpu_update_bw_bounding_box(struct dc *dc,
 	unsigned int *dcfclk_mhz,
 	unsigned int *dram_speed_mts)
 {
+	(void)bw_params;
 	unsigned int i;
 
 	dc_assert_fp_enabled();
@@ -720,6 +721,7 @@ void dcn3_fpu_build_wm_range_table(struct clk_mgr *base)
 
 void patch_dcn30_soc_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_st *dcn3_0_ip)
 {
+	(void)dcn3_0_ip;
 	dc_assert_fp_enabled();
 
 	if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c +23 -0
index 1df3412be346..634982173190 100644
@@ -778,6 +778,8 @@ static bool CalculatePrefetchSchedule(
 		double *RequiredPrefetchPixDataBWChroma,
 		bool *NotEnoughTimeForDynamicMetadata)
 {
+	(void)SwathWidthY;
+	(void)SwathWidthC;
 	struct vba_vars_st *v = &mode_lib->vba;
 	double DPPCLKDelaySubtotalPlusCNVCFormater = v->DPPCLKDelaySubtotal + v->DPPCLKDelayCNVCFormater;
 	bool MyError = false;
@@ -1233,6 +1235,10 @@ static void CalculateDCCConfiguration(
 		unsigned int *IndependentBlockLuma,
 		unsigned int *IndependentBlockChroma)
 {
+	(void)SurfaceWidthChroma;
+	(void)SurfaceHeightChroma;
+	(void)BytePerPixelDETY;
+	(void)BytePerPixelDETC;
 	int yuv420 = 0;
 	int horz_div_l = 0;
 	int horz_div_c = 0;
@@ -1595,6 +1601,7 @@ static unsigned int CalculateVMAndRowBytes(
 		unsigned int *DPDE0BytesFrame,
 		unsigned int *MetaPTEBytesFrame)
 {
+	(void)SourcePixelFormat;
 	unsigned int MPDEBytesFrame = 0;
 	unsigned int DCCMetaSurfaceBytes = 0;
 	unsigned int MacroTileSizeBytes = 0;
@@ -3068,6 +3075,8 @@ double dml30_CalculateWriteBackDISPCLK(
 		unsigned int HTotal,
 		unsigned int WritebackLineBufferSize)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackVRatio;
 	double DISPCLK_H = 0, DISPCLK_V = 0, DISPCLK_HB = 0;
 
 	DISPCLK_H = PixelClock * dml_ceil(WritebackHTaps / 8.0, 1) / WritebackHRatio;
@@ -3086,6 +3095,8 @@ static double CalculateWriteBackDelay(
 		long         WritebackSourceHeight,
 		unsigned int HTotal)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackHRatio;
 	double CalculateWriteBackDelay = 0;
 	double Line_length = 0;
 	double Output_lines_last_notclamped = 0;
@@ -3199,6 +3210,8 @@ static void CalculateFlipSchedule(
 		double *final_flip_bw,
 		bool *ImmediateFlipSupportedForPipe)
 {
+	(void)mode_lib;
+	(void)HostVMMinPageSize;
 	double min_row_time = 0.0;
 	unsigned int HostVMDynamicLevelsTrips = 0;
 	double TimeForFetchingMetaPTEImmediateFlip = 0;
@@ -4968,6 +4981,10 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(
 		double BytePerPixelDETC[],
 		enum clock_change_support *DRAMClockChangeSupport)
 {
+	(void)DCFCLK;
+	(void)ReturnBW;
+	(void)DPPCLK;
+	(void)DETBufferSizeC;
 	struct vba_vars_st *v = &mode_lib->vba;
 	double EffectiveLBLatencyHidingY = 0;
 	double EffectiveLBLatencyHidingC = 0;
@@ -5212,6 +5229,8 @@ static void CalculateUrgentBurstFactor(
 		double *UrgentBurstFactorChroma,
 		bool *NotEnoughUrgentLatencyHiding)
 {
+	(void)DETBufferSizeInKByte;
+	(void)VRatioC;
 	double LinesInDETLuma = 0;
 	double LinesInDETChroma = 0;
 	unsigned int LinesInCursorBuffer = 0;
@@ -5575,6 +5594,8 @@ static void CalculateVMGroupAndRequestTimes(
 		double TimePerVMRequestVBlank[],
 		double TimePerVMRequestFlip[])
 {
+	(void)dpte_row_width_luma_ub;
+	(void)dpte_row_width_chroma_ub;
 	int num_group_per_lower_vm_stage = 0;
 	int num_req_per_lower_vm_stage = 0;
 	unsigned int k;
@@ -5857,6 +5878,7 @@ static void CalculateSwathAndDETConfiguration(
 		bool ViewportSizeSupportPerPlane[],
 		bool *ViewportSizeSupport)
 {
+	(void)HRatioChroma;
 	int MaximumSwathHeightY[DC__NUM_DPP__MAX] = { 0 };
 	int MaximumSwathHeightC[DC__NUM_DPP__MAX] = { 0 };
 	int MinimumSwathHeightY = 0;
@@ -6039,6 +6061,7 @@ static void CalculateSwathWidth(
 		unsigned int swath_width_luma_ub[],
 		unsigned int swath_width_chroma_ub[])
 {
+	(void)BytePerPixY;
 	unsigned int k, j;
 	long surface_width_ub_l;
 	long surface_height_ub_l;
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c +5 -0
index 4fb37df54d59..472ac5ee165f 100644
@@ -50,6 +50,7 @@ static double get_refcyc_per_delivery(struct display_mode_lib *mode_lib,
 	unsigned int delivery_width,
 	unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -804,6 +805,7 @@ static void calculate_ttu_cursor(struct display_mode_lib *mode_lib,
 	unsigned int cur_width,
 	enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
@@ -896,6 +898,9 @@ static void dml_rq_dlg_get_dlg_params(struct display_mode_lib *mode_lib,
 	const bool ignore_viewport_pos,
 	const bool immediate_flip_support)
 {
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
 	const display_pipe_source_params_st *src = &e2e_pipe_param[pipe_idx].pipe.src;
 	const display_pipe_dest_params_st *dst = &e2e_pipe_param[pipe_idx].pipe.dest;
 	const display_output_params_st *dout = &e2e_pipe_param[pipe_idx].dout;
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c +24 -0
index ed59c77bc6f6..9833467722b9 100644
@@ -873,6 +873,11 @@ static bool CalculatePrefetchSchedule(
 		double *VUpdateWidthPix,
 		double *VReadyOffsetPix)
 {
+	(void)mode_lib;
+	(void)HostVMMinPageSize;
+	(void)SwathWidthY;
+	(void)SwathWidthC;
+
 	bool MyError = false;
 	unsigned int DPPCycles, DISPCLKCycles;
 	double DSTTotalPixelsAfterScaler;
@@ -1491,6 +1496,10 @@ static void CalculateDCCConfiguration(
 		unsigned int *IndependentBlockLuma,
 		unsigned int *IndependentBlockChroma)
 {
+	(void)SurfaceWidthChroma;
+	(void)SurfaceHeightChroma;
+	(void)BytePerPixelDETY;
+	(void)BytePerPixelDETC;
 	int yuv420;
 	int horz_div_l;
 	int horz_div_c;
@@ -1823,6 +1832,7 @@ static unsigned int CalculateVMAndRowBytes(
 		int *DPDE0BytesFrame,
 		int *MetaPTEBytesFrame)
 {
+	(void)SourcePixelFormat;
 	struct vba_vars_st *v = &mode_lib->vba;
 	unsigned int MPDEBytesFrame;
 	unsigned int DCCMetaSurfaceBytes;
@@ -3365,6 +3375,8 @@ double dml31_CalculateWriteBackDISPCLK(
 		unsigned int HTotal,
 		unsigned int WritebackLineBufferSize)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackVRatio;
 	double DISPCLK_H, DISPCLK_V, DISPCLK_HB;
 
 	DISPCLK_H = PixelClock * dml_ceil(WritebackHTaps / 8.0, 1) / WritebackHRatio;
@@ -3383,6 +3395,8 @@ static double CalculateWriteBackDelay(
 		int WritebackSourceHeight,
 		unsigned int HTotal)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackHRatio;
 	double CalculateWriteBackDelay;
 	double Line_length;
 	double Output_lines_last_notclamped;
@@ -5566,6 +5580,9 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(
 		double *Z8StutterExitWatermark,
 		double *Z8StutterEnterPlusExitWatermark)
 {
+	(void)DCFCLK;
+	(void)ReturnBW;
+	(void)DETBufferSizeC;
 	struct vba_vars_st *v = &mode_lib->vba;
 	double EffectiveLBLatencyHidingY;
 	double EffectiveLBLatencyHidingC;
@@ -5831,6 +5848,7 @@ static void CalculateUrgentBurstFactor(
 		double *UrgentBurstFactorChroma,
 		bool *NotEnoughUrgentLatencyHiding)
 {
+	(void)VRatioC;
 	double LinesInDETLuma;
 	double LinesInDETChroma;
 	unsigned int LinesInCursorBuffer;
@@ -6213,6 +6231,8 @@ static void CalculateVMGroupAndRequestTimes(
 		double TimePerVMRequestVBlank[],
 		double TimePerVMRequestFlip[])
 {
+	(void)dpte_row_width_luma_ub;
+	(void)dpte_row_width_chroma_ub;
 	int num_group_per_lower_vm_stage;
 	int num_req_per_lower_vm_stage;
 	int k;
@@ -6350,6 +6370,8 @@ static void CalculateStutterEfficiency(
 		int *Z8NumberOfStutterBurstsPerFrame,
 		double *StutterPeriod)
 {
+	(void)ConfigReturnBufferSizeInKByte;
+
 	struct vba_vars_st *v = &mode_lib->vba;
 
 	double DETBufferingTimeY;
@@ -6649,6 +6671,7 @@ static void CalculateSwathAndDETConfiguration(
 		bool ViewportSizeSupportPerPlane[],
 		bool *ViewportSizeSupport)
 {
+	(void)HRatioChroma;
 	int MaximumSwathHeightY[DC__NUM_DPP__MAX];
 	int MaximumSwathHeightC[DC__NUM_DPP__MAX];
 	int MinimumSwathHeightY;
@@ -6823,6 +6846,7 @@ static void CalculateSwathWidth(
 		int swath_width_luma_ub[],
 		int swath_width_chroma_ub[])
 {
+	(void)BytePerPixY;
 	enum odm_combine_mode MainPlaneODMCombine;
 	int j, k;
 
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c +8 -0
index bfeb01477f0c..dfa1bc31eb0a 100644
@@ -51,6 +51,7 @@ static double get_refcyc_per_delivery(
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -785,6 +786,7 @@ static void calculate_ttu_cursor(
 		unsigned int cur_width,
 		enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
@@ -859,6 +861,12 @@ static void dml_rq_dlg_get_dlg_params(
 		const bool ignore_viewport_pos,
 		const bool immediate_flip_support)
 {
+	(void)cstate_en;
+	(void)pstate_en;
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
+	(void)dlg_sys_param;
 	const display_pipe_source_params_st *src = &e2e_pipe_param[pipe_idx].pipe.src;
 	const display_pipe_dest_params_st *dst = &e2e_pipe_param[pipe_idx].pipe.dest;
 	const display_clocks_and_cfg_st *clks = &e2e_pipe_param[pipe_idx].clks_cfg;
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_mode_vba_314.c +24 -0
index 9f3938a50240..033fde774337 100644
@@ -891,6 +891,11 @@ static bool CalculatePrefetchSchedule(
 		double *VUpdateWidthPix,
 		double *VReadyOffsetPix)
 {
+	(void)mode_lib;
+	(void)HostVMMinPageSize;
+	(void)SwathWidthY;
+	(void)SwathWidthC;
+
 	bool MyError = false;
 	unsigned int DPPCycles, DISPCLKCycles;
 	double DSTTotalPixelsAfterScaler;
@@ -1508,6 +1513,10 @@ static void CalculateDCCConfiguration(
 		unsigned int *IndependentBlockLuma,
 		unsigned int *IndependentBlockChroma)
 {
+	(void)SurfaceWidthChroma;
+	(void)SurfaceHeightChroma;
+	(void)BytePerPixelDETY;
+	(void)BytePerPixelDETC;
 	int yuv420;
 	int horz_div_l;
 	int horz_div_c;
@@ -1840,6 +1849,7 @@ static unsigned int CalculateVMAndRowBytes(
 		int *DPDE0BytesFrame,
 		int *MetaPTEBytesFrame)
 {
+	(void)SourcePixelFormat;
 	struct vba_vars_st *v = &mode_lib->vba;
 	unsigned int MPDEBytesFrame;
 	unsigned int DCCMetaSurfaceBytes;
@@ -3471,6 +3481,8 @@ double dml314_CalculateWriteBackDISPCLK(
 		unsigned int HTotal,
 		unsigned int WritebackLineBufferSize)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackVRatio;
 	double DISPCLK_H, DISPCLK_V, DISPCLK_HB;
 
 	DISPCLK_H = PixelClock * dml_ceil(WritebackHTaps / 8.0, 1) / WritebackHRatio;
@@ -3489,6 +3501,8 @@ static double CalculateWriteBackDelay(
 		int WritebackSourceHeight,
 		unsigned int HTotal)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackHRatio;
 	double CalculateWriteBackDelay;
 	double Line_length;
 	double Output_lines_last_notclamped;
@@ -5660,6 +5674,9 @@ static void CalculateWatermarksAndDRAMSpeedChangeSupport(
 		double *Z8StutterExitWatermark,
 		double *Z8StutterEnterPlusExitWatermark)
 {
+	(void)DCFCLK;
+	(void)ReturnBW;
+	(void)DETBufferSizeC;
 	struct vba_vars_st *v = &mode_lib->vba;
 	double EffectiveLBLatencyHidingY;
 	double EffectiveLBLatencyHidingC;
@@ -5925,6 +5942,7 @@ static void CalculateUrgentBurstFactor(
 		double *UrgentBurstFactorChroma,
 		bool *NotEnoughUrgentLatencyHiding)
 {
+	(void)VRatioC;
 	double LinesInDETLuma;
 	double LinesInDETChroma;
 	unsigned int LinesInCursorBuffer;
@@ -6308,6 +6326,8 @@ static void CalculateVMGroupAndRequestTimes(
 		double TimePerVMRequestVBlank[],
 		double TimePerVMRequestFlip[])
 {
+	(void)dpte_row_width_luma_ub;
+	(void)dpte_row_width_chroma_ub;
 	int num_group_per_lower_vm_stage;
 	int num_req_per_lower_vm_stage;
 	int k;
@@ -6445,6 +6465,8 @@ static void CalculateStutterEfficiency(
 		int *Z8NumberOfStutterBurstsPerFrame,
 		double *StutterPeriod)
 {
+	(void)ConfigReturnBufferSizeInKByte;
+
 	struct vba_vars_st *v = &mode_lib->vba;
 
 	double DETBufferingTimeY;
@@ -6743,6 +6765,7 @@ static void CalculateSwathAndDETConfiguration(
 		bool ViewportSizeSupportPerPlane[],
 		bool *ViewportSizeSupport)
 {
+	(void)HRatioChroma;
 	int MaximumSwathHeightY[DC__NUM_DPP__MAX];
 	int MaximumSwathHeightC[DC__NUM_DPP__MAX];
 	int MinimumSwathHeightY;
@@ -6914,6 +6937,7 @@ static void CalculateSwathWidth(
 		int swath_width_luma_ub[],
 		int swath_width_chroma_ub[])
 {
+	(void)BytePerPixY;
 	enum odm_combine_mode MainPlaneODMCombine;
 	int j, k;
 
drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c +8 -0
index 04df263ff65e..40a916c2a9c6 100644
@@ -139,6 +139,7 @@ static double get_refcyc_per_delivery(
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -872,6 +873,7 @@ static void calculate_ttu_cursor(
 		unsigned int cur_width,
 		enum cursor_bpp cur_bpp)
 {
+	(void)mode_lib;
 	unsigned int cur_src_width = cur_width;
 	unsigned int cur_req_size = 0;
 	unsigned int cur_req_width = 0;
@@ -944,6 +946,12 @@ static void dml_rq_dlg_get_dlg_params(
 		const bool ignore_viewport_pos,
 		const bool immediate_flip_support)
 {
+	(void)cstate_en;
+	(void)pstate_en;
+	(void)vm_en;
+	(void)ignore_viewport_pos;
+	(void)immediate_flip_support;
+	(void)dlg_sys_param;
 	const display_pipe_source_params_st *src = &e2e_pipe_param[pipe_idx].pipe.src;
 	const display_pipe_dest_params_st *dst = &e2e_pipe_param[pipe_idx].pipe.dest;
 	const display_clocks_and_cfg_st *clks = &e2e_pipe_param[pipe_idx].clks_cfg;
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +2 -0
index 8a0f128722b0..e29497204df7 100644
@@ -3488,6 +3488,7 @@ bool dcn32_allow_subvp_high_refresh_rate(struct dc *dc, struct dc_state *context
  */
 double dcn32_determine_max_vratio_prefetch(struct dc *dc, struct dc_state *context)
 {
+	(void)dc;
 	double max_vratio_pre = __DML_MAX_BW_RATIO_PRE__; // Default value is 4
 	int i;
 
@@ -3593,6 +3594,7 @@ bool dcn32_find_vactive_pipe(struct dc *dc, const struct dc_state *context, stru
 
 void dcn32_set_clock_limits(const struct _vcs_dpi_soc_bounding_box_st *soc_bb)
 {
+	(void)soc_bb;
 	dc_assert_fp_enabled();
 	dcn3_2_soc.clock_limits[0].dcfclk_mhz = 1200.0;
 }
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c +23 -0
index 19b142412a84..5e72966a8daf 100644
@@ -457,6 +457,7 @@ void dml32_CalculateSwathAndDETConfiguration(
 		bool ViewportSizeSupportPerSurface[],
 		bool *ViewportSizeSupport)
 {
+	(void)HRatioChroma;
 	unsigned int MaximumSwathHeightY[DC__NUM_DPP__MAX];
 	unsigned int MaximumSwathHeightC[DC__NUM_DPP__MAX];
 	unsigned int RoundedUpMaxSwathSizeBytesY[DC__NUM_DPP__MAX] = { 0 };
@@ -716,6 +717,7 @@ void dml32_CalculateSwathWidth(
 		unsigned int			swath_width_luma_ub[], // per-pipe
 		unsigned int			swath_width_chroma_ub[]) // per-pipe
 {
+	(void)BytePerPixY;
 	unsigned int k, j;
 	enum odm_combine_mode MainSurfaceODMMode;
 
@@ -2304,6 +2306,7 @@ unsigned int dml32_CalculateVMAndRowBytes(
 		unsigned int    *DPDE0BytesFrame,
 		unsigned int    *MetaPTEBytesFrame)
 {
+	(void)SourcePixelFormat;
 	unsigned int MPDEBytesFrame;
 	unsigned int DCCMetaSurfaceBytes;
 	unsigned int ExtraDPDEBytesFrame;
@@ -2745,6 +2748,7 @@ void dml32_CalculateUrgentBurstFactor(
 		double *UrgentBurstFactorChroma,
 		bool   *NotEnoughUrgentLatencyHiding)
 {
+	(void)VRatioC;
 	double       LinesInDETLuma;
 	double       LinesInDETChroma;
 	unsigned int LinesInCursorBuffer;
@@ -2900,6 +2904,8 @@ double dml32_CalculateWriteBackDelay(
 		unsigned int         WritebackSourceHeight,
 		unsigned int HTotal)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackHRatio;
 	double CalculateWriteBackDelay;
 	double Line_length;
 	double Output_lines_last_notclamped;
@@ -2977,6 +2983,9 @@ void dml32_UseMinimumDCFCLK(
 		/* Output */
 		double DCFCLKState[][2])
 {
+	(void)MaxAveragePercentOfIdealSDPPortBWDisplayCanUseInNormalSystemOperation;
+	(void)ReadBandwidthLuma;
+	(void)ReadBandwidthChroma;
 	unsigned int i, j, k;
 	unsigned int     dummy1;
 	double dummy2, dummy3;
@@ -3447,6 +3456,8 @@ bool dml32_CalculatePrefetchSchedule(
 		double   *VUpdateWidthPix,
 		double   *VReadyOffsetPix)
 {
+	(void)SwathWidthY;
+	(void)SwathWidthC;
 	double DPPCLKDelaySubtotalPlusCNVCFormater = v->DPPCLKDelaySubtotal + v->DPPCLKDelayCNVCFormater;
 	bool MyError = false;
 	unsigned int DPPCycles, DISPCLKCycles;
@@ -4145,6 +4156,7 @@ void dml32_CalculateFlipSchedule(
 		double *final_flip_bw,
 		bool *ImmediateFlipSupportedForPipe)
 {
+	(void)HostVMMinPageSize;
 	double min_row_time = 0.0;
 	unsigned int HostVMDynamicLevelsTrips;
 	double TimeForFetchingMetaPTEImmediateFlip;
@@ -4287,6 +4299,8 @@ void dml32_CalculateWatermarksMALLUseAndDRAMSpeedChangeSupport(
 		bool *USRRetrainingSupport,
 		double ActiveDRAMClockChangeLatencyMargin[])
 {
+	(void)DCFCLK;
+	(void)ReturnBW;
 	unsigned int i, j, k;
 	unsigned int SurfaceWithMinActiveFCLKChangeMargin = 0;
 	unsigned int DRAMClockChangeSupportNumber = 0;
@@ -4655,6 +4669,8 @@ double dml32_CalculateWriteBackDISPCLK(
 		unsigned int WritebackLineBufferSize,
 		double DISPCLKDPPCLKVCOSpeed)
 {
+	(void)WritebackPixelFormat;
+	(void)WritebackVRatio;
 	double DISPCLK_H, DISPCLK_V, DISPCLK_HB;
 
 	DISPCLK_H = PixelClock * dml_ceil(WritebackHTaps / 8.0, 1) / WritebackHRatio;
@@ -5166,6 +5182,8 @@ void dml32_CalculateVMGroupAndRequestTimes(
 		double      TimePerVMRequestVBlank[],
 		double      TimePerVMRequestFlip[])
 {
+	(void)dpte_row_width_luma_ub;
+	(void)dpte_row_width_chroma_ub;
 	unsigned int k;
 	unsigned int   num_group_per_lower_vm_stage;
 	unsigned int   num_req_per_lower_vm_stage;
@@ -5321,6 +5339,11 @@ void dml32_CalculateDCCConfiguration(
 		unsigned int        *IndependentBlockLuma,
 		unsigned int        *IndependentBlockChroma)
 {
+	(void)SurfaceWidthChroma;
+	(void)SurfaceHeightChroma;
+	(void)TilingFormat;
+	(void)BytePerPixelDETY;
+	(void)BytePerPixelDETC;
 	typedef enum {
 		REQ_256Bytes,
 		REQ_128BytesNonContiguous,
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +1 -0
index 6713cd8ba86a..7f40048dd67d 100644
@@ -202,6 +202,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = {
 
 void dcn35_build_wm_range_table_fpu(struct clk_mgr *clk_mgr)
 {
+	(void)clk_mgr;
 	//TODO
 }
 
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c +1 -0
index da0cfbb071e6..684779ee54a3 100644
@@ -162,6 +162,7 @@ void dml_log_pipe_params(
 		display_e2e_pipe_params_st *pipes,
 		int pipe_cnt)
 {
+	(void)mode_lib;
 	display_pipe_source_params_st *pipe_src;
 	display_pipe_dest_params_st   *pipe_dest;
 	scaler_ratio_depth_st         *scale_ratio_depth;
drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_helpers.c +14 -0
index 12ff65b6a7e5..3f27293a41cb 100644
@@ -49,6 +49,8 @@ void print__rq_params_st(struct display_mode_lib *mode_lib, const struct _vcs_dp
 
 void print__data_rq_sizing_params_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_data_rq_sizing_params_st *rq_sizing)
 {
+	(void)mode_lib;
+	(void)rq_sizing;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_DATA_RQ_SIZING_PARAM_ST\n");
 	dml_print("DML_RQ_DLG_CALC:    chunk_bytes           = %0d\n", rq_sizing->chunk_bytes);
@@ -64,6 +66,8 @@ void print__data_rq_sizing_params_st(struct display_mode_lib *mode_lib, const st
 
 void print__data_rq_dlg_params_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_data_rq_dlg_params_st *rq_dlg_param)
 {
+	(void)mode_lib;
+	(void)rq_dlg_param;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_DATA_RQ_DLG_PARAM_ST\n");
 	dml_print(
@@ -107,6 +111,8 @@ void print__data_rq_dlg_params_st(struct display_mode_lib *mode_lib, const struc
 
 void print__data_rq_misc_params_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_data_rq_misc_params_st *rq_misc_param)
 {
+	(void)mode_lib;
+	(void)rq_misc_param;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_DATA_RQ_MISC_PARAM_ST\n");
 	dml_print(
@@ -124,6 +130,8 @@ void print__data_rq_misc_params_st(struct display_mode_lib *mode_lib, const stru
 
 void print__dlg_sys_params_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_dlg_sys_params_st *dlg_sys_param)
 {
+	(void)dlg_sys_param;
+	(void)mode_lib;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_RQ_DLG_PARAM_ST\n");
 	dml_print("DML_RQ_DLG_CALC:    t_mclk_wm_us         = %3.2f\n", dlg_sys_param->t_mclk_wm_us);
@@ -144,6 +152,8 @@ void print__dlg_sys_params_st(struct display_mode_lib *mode_lib, const struct _v
 
 void print__data_rq_regs_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_data_rq_regs_st *rq_regs)
 {
+	(void)mode_lib;
+	(void)rq_regs;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_DATA_RQ_REGS_ST\n");
 	dml_print("DML_RQ_DLG_CALC:    chunk_size              = 0x%0x\n", rq_regs->chunk_size);
@@ -179,6 +189,8 @@ void print__rq_regs_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_
 
 void print__dlg_regs_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_dlg_regs_st *dlg_regs)
 {
+	(void)dlg_regs;
+	(void)mode_lib;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_DLG_REGS_ST\n");
 	dml_print(
@@ -316,6 +328,8 @@ void print__dlg_regs_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi
 
 void print__ttu_regs_st(struct display_mode_lib *mode_lib, const struct _vcs_dpi_display_ttu_regs_st *ttu_regs)
 {
+	(void)mode_lib;
+	(void)ttu_regs;
 	dml_print("DML_RQ_DLG_CALC: =====================================\n");
 	dml_print("DML_RQ_DLG_CALC: DISPLAY_TTU_REGS_ST\n");
 	dml_print(
drivers/gpu/drm/amd/display/dc/dml/dml1_display_rq_dlg_calc.c +3 -0
index 88dc2b97e7bf..cf194bcba455 100644
@@ -104,6 +104,7 @@ static double get_refcyc_per_delivery(
 		unsigned int delivery_width,
 		unsigned int req_per_swath_ub)
 {
+	(void)mode_lib;
 	double refcyc_per_delivery = 0.0;
 
 	if (vratio <= 1.0) {
@@ -133,6 +134,7 @@ static double get_vratio_pre(
 		double vinit,
 		double l_sw)
 {
+	(void)mode_lib;
 	double prefill = dml_floor(vinit, 1);
 	double vratio_pre = 1.0;
 
@@ -174,6 +176,7 @@ static void get_swath_need(
 		unsigned int swath_height,
 		double vinit)
 {
+	(void)mode_lib;
 	double prefill = dml_floor(vinit, 1);
 	unsigned int max_partial_sw_int;
 
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +1 -0
index 0e70ffc784b1..ef605e0a75e3 100644
@@ -288,6 +288,7 @@ void dpp1_cnv_setup (
 		enum dc_color_space input_color_space,
 		struct cnv_alpha_2bit_lut *alpha_2bit_lut)
 {
+	(void)alpha_2bit_lut;
 	uint32_t pixel_format;
 	uint32_t alpha_en;
 	enum pixel_format_description fmt ;
drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c +9 -2
index c433f4b876e9..8d5000790904 100644
@@ -92,7 +92,10 @@ void dpp2_power_on_obuf(
 void dpp2_dummy_program_input_lut(
 		struct dpp *dpp_base,
 		const struct dc_gamma *gamma)
-{}
+{
+	(void)dpp_base;
+	(void)gamma;
+}
 
 static void dpp2_cnv_setup (
 		struct dpp *dpp_base,
@@ -369,7 +372,11 @@ void oppn20_dummy_program_regamma_pwl(
 		struct dpp *dpp,
 		const struct pwl_params *params,
 		enum opp_regamma mode)
-{}
+{
+	(void)dpp;
+	(void)params;
+	(void)mode;
+}
 
 static struct dpp_funcs dcn20_dpp_funcs = {
 	.dpp_read_state = dpp20_read_state,
drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c +1 -0
index 31613372e214..26f9485f165d 100644
@@ -1016,6 +1016,7 @@ static void dpp20_set_3dlut_mode(
 		bool is_color_channel_12bits,
 		bool is_lut_size17x17x17)
 {
+	(void)is_color_channel_12bits;
 	uint32_t lut_mode;
 	struct dcn20_dpp *dpp = TO_DCN20_DPP(dpp_base);
 
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +1 -0
index 8a146968ee15..e7880fc61b4a 100644
@@ -1307,6 +1307,7 @@ static void dpp3_set_3dlut_mode(
 		bool is_color_channel_12bits,
 		bool is_lut_size17x17x17)
 {
+	(void)is_color_channel_12bits;
 	uint32_t lut_mode;
 	struct dcn3_dpp *dpp = TO_DCN30_DPP(dpp_base);
 
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c +1 -0
index 3284084ca7ad..8170a86ad0ea 100644
@@ -80,6 +80,7 @@ static void dpp3_program_gammcor_lut(
 		uint32_t num,
 		bool is_ram_a)
 {
+	(void)is_ram_a;
 	uint32_t i;
 	struct dcn3_dpp *dpp = TO_DCN30_DPP(dpp_base);
 	uint32_t last_base_value_red = rgb[num-1].red_reg + rgb[num-1].delta_red_reg;
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c +5 -0
index 62bf7cea21d8..821d5173b59f 100644
@@ -132,6 +132,9 @@ void dpp401_set_cursor_position(
 	uint32_t width,
 	uint32_t height)
 {
+	(void)param;
+	(void)width;
+	(void)height;
 	struct dcn401_dpp *dpp = TO_DCN401_DPP(dpp_base);
 	uint32_t cur_en = pos->enable ? 1 : 0;
 
@@ -237,6 +240,8 @@ void dpp401_set_cursor_matrix(
 	enum dc_color_space color_space,
 	struct dc_csc_transform cursor_csc_color_matrix)
 {
+	(void)color_space;
+	(void)cursor_csc_color_matrix;
 	//Since we don't have cursor matrix information, force bypass mode by passing in unknown color space
 	dpp401_program_cursor_csc(dpp_base, COLOR_SPACE_UNKNOWN, NULL);
 }
drivers/gpu/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c +1 -0
index bc058f682438..0ee4f83a02eb 100644
@@ -45,6 +45,7 @@
 
 static bool dwb3_get_caps(struct dwbc *dwbc, struct dwb_caps *caps)
 {
+	(void)dwbc;
 	if (caps) {
 		caps->adapter_id = 0;	/* we only support 1 adapter currently */
 		caps->hw_version = DCN_VERSION_3_0;
drivers/gpu/drm/amd/display/dc/gpio/dcn42/hw_translate_dcn42.c +1 -0
index dcbcf6b85abf..e7e1d9979876 100644
@@ -45,6 +45,7 @@ static bool offset_to_id(
 	enum gpio_id *id,
 	uint32_t *en)
 {
+	(void)mask;
 	switch (offset) {
 	/* HPD */
 	case REG(HPD0_DC_HPD_INT_STATUS):
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +1 -0
index f3d562c8df4c..d81a71ac00d2 100644
@@ -60,6 +60,7 @@ bool dal_hw_factory_init(
 	enum dce_version dce_version,
 	enum dce_environment dce_environment)
 {
+	(void)dce_environment;
 	switch (dce_version) {
 #if defined(CONFIG_DRM_AMD_DC_SI)
 	case DCE_VERSION_6_0:
drivers/gpu/drm/amd/display/dc/gpio/hw_gpio.c +1 -0
index 660510842ecf..f0d400972897 100644
@@ -199,5 +199,6 @@ void dal_hw_gpio_construct(
 void dal_hw_gpio_destruct(
 	struct hw_gpio *pin)
 {
+	(void)pin;
 	ASSERT(!pin->base.opened);
 }
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +1 -0
index 1c977fc4d0e3..e6e36a912b13 100644
@@ -64,6 +64,7 @@ bool dal_hw_translate_init(
 	enum dce_version dce_version,
 	enum dce_environment dce_environment)
 {
+	(void)dce_environment;
 	switch (dce_version) {
 #if defined(CONFIG_DRM_AMD_DC_SI)
 	case DCE_VERSION_6_0:
drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c +1 -0
index 5a03758e3de6..3c298192f359 100644
@@ -943,6 +943,7 @@ static void hubbub31_get_dchub_ref_freq(struct hubbub *hubbub,
 		unsigned int dccg_ref_freq_inKhz,
 		unsigned int *dchub_ref_freq_inKhz)
 {
+	(void)dccg_ref_freq_inKhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	uint32_t ref_div = 0;
 	uint32_t ref_en = 0;
drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c +1 -0
index 43ba399f4822..82d4e3e0e5e8 100644
@@ -259,6 +259,7 @@ void hubbub35_get_dchub_ref_freq(struct hubbub *hubbub,
 		unsigned int dccg_ref_freq_inKhz,
 		unsigned int *dchub_ref_freq_inKhz)
 {
+	(void)dccg_ref_freq_inKhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	uint32_t ref_div = 0;
 	uint32_t ref_en = 0;
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c +4 -0
index b0a4b68cf359..3b9542c08f3d 100644
@@ -70,6 +70,7 @@ bool hubbub401_program_urgent_watermarks(
 		unsigned int refclk_mhz,
 		bool safe_to_lower)
 {
+	(void)refclk_mhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	bool wm_pending = false;
 
@@ -188,6 +189,7 @@ bool hubbub401_program_stutter_watermarks(
 		unsigned int refclk_mhz,
 		bool safe_to_lower)
 {
+	(void)refclk_mhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	bool wm_pending = false;
 
@@ -287,6 +289,7 @@ bool hubbub401_program_pstate_watermarks(
 		unsigned int refclk_mhz,
 		bool safe_to_lower)
 {
+	(void)refclk_mhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	bool wm_pending = false;
 
@@ -414,6 +417,7 @@ bool hubbub401_program_usr_watermarks(
 		unsigned int refclk_mhz,
 		bool safe_to_lower)
 {
+	(void)refclk_mhz;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	bool wm_pending = false;
 
drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.c +2 -0
index a436fa71d4b4..73b6b0ffcb74 100644
@@ -488,6 +488,8 @@ static bool hubbub42_program_watermarks(
 
 static void hubbub42_set_request_limit(struct hubbub *hubbub, int memory_channel_count, int words_per_channel)
 {
+	(void)memory_channel_count;
+	(void)words_per_channel;
 	struct dcn20_hubbub *hubbub2 = TO_DCN20_HUBBUB(hubbub);
 	uint32_t request_limit = 96; //MAX(12 * memory_channel_count, 96);
 
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c +2 -0
index 6378e3fd7249..7c97a774141f 100644
@@ -143,6 +143,7 @@ void hubp1_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
+	(void)pixel_format;
 	struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
 
 	REG_UPDATE_6(DCSURF_ADDR_CONFIG,
@@ -563,6 +564,7 @@ void hubp1_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	hubp1_dcc_control(hubp, dcc->enable, dcc->independent_64b_blks);
 	hubp1_program_tiling(hubp, tiling_info, format);
 	hubp1_program_size(hubp, format, plane_size, dcc);
drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c +2 -0
index 92288de4cc10..ceee5165fd6a 100644
@@ -313,6 +313,7 @@ static void hubp2_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
+	(void)pixel_format;
 	REG_UPDATE_3(DCSURF_ADDR_CONFIG,
 			NUM_PIPES, log_2(info->gfx9.num_pipes),
 			PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
@@ -557,6 +558,7 @@ void hubp2_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 
 	hubp2_dcc_control(hubp, dcc->enable, dcc->independent_64b_blks);
drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c +2 -0
index 0cc6f4558989..e2708e30eb1b 100644
@@ -321,6 +321,7 @@ void hubp3_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
+	(void)pixel_format;
 	REG_UPDATE_4(DCSURF_ADDR_CONFIG,
 		NUM_PIPES, log_2(info->gfx9.num_pipes),
 		PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
@@ -418,6 +419,7 @@ void hubp3_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 
 	hubp3_dcc_control_sienna_cichlid(hubp, dcc);
drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c +1 -0
index 79c583e258c7..c879f4901c7d 100644
@@ -179,6 +179,7 @@ void hubp35_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 
 	hubp3_dcc_control_sienna_cichlid(hubp, dcc);
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +3 -0
index 263e0c4d34f6..5a816442deee 100644
@@ -657,6 +657,7 @@ void hubp401_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
+	(void)pixel_format;
 	/* DCSURF_ADDR_CONFIG still shows up in reg spec, but does not need to be programmed for DCN4x
 	 * All 4 fields NUM_PIPES, PIPE_INTERLEAVE, MAX_COMPRESSED_FRAGS and NUM_PKRS are irrelevant.
 	 *
@@ -671,6 +672,7 @@ void hubp401_program_size(
 	const struct plane_size *plane_size,
 	struct dc_plane_dcc_param *dcc)
 {
+	(void)dcc;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 	uint32_t pitch, pitch_c;
 	bool use_pitch_c = false;
@@ -709,6 +711,7 @@ void hubp401_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 
 	hubp401_dcc_control(hubp, dcc);
drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.c +1 -0
index d85a4ab957a4..ad6badcceb12 100644
@@ -301,6 +301,7 @@ static void hubp42_program_surface_config(
 	bool horizontal_mirror,
 	unsigned int compat_level)
 {
+	(void)compat_level;
 	struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
 
 	hubp3_dcc_control_sienna_cichlid(hubp, dcc);
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +22 -0
index 8f56f164d567..5273ca09fe12 100644
@@ -201,6 +201,8 @@ static void enable_display_pipe_clock_gating(
 	struct dc_context *ctx,
 	bool clock_gating)
 {
+	(void)ctx;
+	(void)clock_gating;
 	/*TODO*/
 }
 
@@ -284,6 +286,7 @@ static bool
 dce110_set_input_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
 			       const struct dc_plane_state *plane_state)
 {
+	(void)dc;
 	struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp;
 	const struct dc_transfer_func *tf = NULL;
 	struct ipp_prescale_params prescale_params = { 0 };
@@ -607,6 +610,7 @@ static bool
 dce110_set_output_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
 				const struct dc_stream_state *stream)
 {
+	(void)dc;
 	struct transform *xfm = pipe_ctx->plane_res.xfm;
 
 	xfm->funcs->opp_power_on_regamma_lut(xfm, true);
@@ -1539,6 +1543,7 @@ static enum dc_status dce110_enable_stream_timing(
 		struct dc_state *context,
 		struct dc *dc)
 {
+	(void)context;
 	struct dc_stream_state *stream = pipe_ctx->stream;
 	struct pipe_ctx *pipe_ctx_old = &dc->current_state->res_ctx.
 			pipe_ctx[pipe_ctx->pipe_idx];
@@ -2728,6 +2733,7 @@ static void program_gamut_remap(struct pipe_ctx *pipe_ctx)
 static void update_plane_addr(const struct dc *dc,
 		struct pipe_ctx *pipe_ctx)
 {
+	(void)dc;
 	struct dc_plane_state *plane_state = pipe_ctx->plane_state;
 
 	if (plane_state == NULL)
@@ -2814,6 +2820,8 @@ static void dce110_enable_timing_synchronization(
 		int group_size,
 		struct pipe_ctx *grouped_pipes[])
 {
+	(void)state;
+	(void)group_index;
 	struct dcp_gsl_params gsl_params = { 0 };
 	int i;
 	DC_LOGGER_INIT(dc->ctx);
@@ -2889,6 +2897,8 @@ static void dce110_enable_per_frame_crtc_position_reset(
 
 static void dce110_init_pipes(struct dc *dc, struct dc_state *context)
 {
+	(void)context;
+	(void)dc;
 	// Do nothing
 }
 
@@ -3154,10 +3164,13 @@ static void dce110_post_unlock_program_front_end(
 		struct dc *dc,
 		struct dc_state *context)
 {
+	(void)dc;
+	(void)context;
 }
 
 static void dce110_power_down_fe(struct dc *dc, struct dc_state *state, struct pipe_ctx *pipe_ctx)
 {
+	(void)state;
 	struct dce_hwseq *hws = dc->hwseq;
 	int fe_idx = pipe_ctx->plane_res.mi ?
 		pipe_ctx->plane_res.mi->inst : pipe_ctx->pipe_idx;
@@ -3178,6 +3191,9 @@ static void dce110_wait_for_mpcc_disconnect(
 		struct resource_pool *res_pool,
 		struct pipe_ctx *pipe_ctx)
 {
+	(void)dc;
+	(void)res_pool;
+	(void)pipe_ctx;
 	/* do nothing*/
 }
 
@@ -3187,6 +3203,10 @@ static void program_output_csc(struct dc *dc,
 		uint16_t *matrix,
 		int opp_id)
 {
+	(void)dc;
+	(void)colorspace;
+	(void)matrix;
+	(void)opp_id;
 	int i;
 	struct out_csc_color_matrix tbl_entry;
 
@@ -3331,6 +3351,7 @@ void dce110_enable_lvds_link_output(struct dc_link *link,
 		enum clock_source_id clock_source,
 		uint32_t pixel_clock)
 {
+	(void)link_res;
 	link->link_enc->funcs->enable_lvds_output(
 			link->link_enc,
 			clock_source,
@@ -3345,6 +3366,7 @@ void dce110_enable_tmds_link_output(struct dc_link *link,
 		enum dc_color_depth color_depth,
 		uint32_t pixel_clock)
 {
+	(void)link_res;
 	link->link_enc->funcs->enable_tmds_output(
 			link->link_enc,
 			clock_source,
drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c +4 -0
index 2a62f63d0357..0689bbf12ad8 100644
@@ -154,6 +154,10 @@ static bool dce120_enable_display_power_gating(
 	struct dc_bios *dcb,
 	enum pipe_gating_control power_gating)
 {
+	(void)dc;
+	(void)controller_id;
+	(void)dcb;
+	(void)power_gating;
 	/* disable for bringup */
 #if 0
 	enum bp_result bp_result = BP_RESULT_OK;
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +21 -0
index 29673a7b92ec..f1fd372e3826 100644
@@ -86,6 +86,7 @@ static void print_microsec(struct dc_context *dc_ctx,
 			   struct dc_log_buffer_ctx *log_ctx,
 			   uint32_t ref_cycle)
 {
+	(void)log_ctx;
 	const uint32_t ref_clk_mhz = dc_ctx->dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000;
 	static const unsigned int frac = 1000;
 	uint32_t us_x10 = (ref_cycle * frac) / ref_clk_mhz;
@@ -252,6 +253,7 @@ void dcn10_lock_all_pipes(struct dc *dc,
 static void log_mpc_crc(struct dc *dc,
 	struct dc_log_buffer_ctx *log_ctx)
 {
+	(void)log_ctx;
 	struct dc_context *dc_ctx = dc->ctx;
 	struct dce_hwseq *hws = dc->hwseq;
 
@@ -450,6 +452,7 @@ static void dcn10_log_hubp_states(struct dc *dc, void *log_ctx)
 static void dcn10_log_color_state(struct dc *dc,
 				  struct dc_log_buffer_ctx *log_ctx)
 {
+	(void)log_ctx;
 	struct dc_context *dc_ctx = dc->ctx;
 	struct resource_pool *pool = dc->res_pool;
 	bool is_gamut_remap_available = false;
@@ -813,6 +816,7 @@ void dcn10_log_hw_state(struct dc *dc,
 
 bool dcn10_did_underflow_occur(struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
+	(void)dc;
 	struct hubp *hubp = pipe_ctx->plane_res.hubp;
 	struct timing_generator *tg = pipe_ctx->stream_res.tg;
 
@@ -1181,6 +1185,7 @@ enum dc_status dcn10_enable_stream_timing(
 		struct dc_state *context,
 		struct dc *dc)
 {
+	(void)context;
 	struct dc_stream_state *stream = pipe_ctx->stream;
 	enum dc_color_space color_space;
 	struct tg_color black_color = {0};
@@ -1284,6 +1289,7 @@ static void dcn10_reset_back_end_for_pipe(
 		struct pipe_ctx *pipe_ctx,
 		struct dc_state *context)
 {
+	(void)context;
 	int i;
 	struct dc_link *link;
 	DC_LOGGER_INIT(dc->ctx);
@@ -1551,6 +1557,7 @@ void dcn10_plane_atomic_disable(struct dc *dc, struct pipe_ctx *pipe_ctx)
 
 void dcn10_disable_plane(struct dc *dc, struct dc_state *state, struct pipe_ctx *pipe_ctx)
 {
+	(void)state;
 	struct dce_hwseq *hws = dc->hwseq;
 	DC_LOGGER_INIT(dc->ctx);
 
@@ -2004,6 +2011,7 @@ static bool patch_address_for_sbs_tb_stereo(
 
 void dcn10_update_plane_addr(const struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
+	(void)dc;
 	bool addr_patched = false;
 	PHYSICAL_ADDRESS_LOC addr;
 	struct dc_plane_state *plane_state = pipe_ctx->plane_state;
@@ -2030,6 +2038,7 @@ void dcn10_update_plane_addr(const struct dc *dc, struct pipe_ctx *pipe_ctx)
 bool dcn10_set_input_transfer_func(struct dc *dc, struct pipe_ctx *pipe_ctx,
 			const struct dc_plane_state *plane_state)
 {
+	(void)dc;
 	struct dpp *dpp_base = pipe_ctx->plane_res.dpp;
 	const struct dc_transfer_func *tf = NULL;
 	bool result = true;
@@ -2472,6 +2481,7 @@ void dcn10_enable_vblanks_synchronization(
 	int group_size,
 	struct pipe_ctx *grouped_pipes[])
 {
+	(void)group_index;
 	struct output_pixel_processor *opp;
 	struct timing_generator *tg;
 	int i, width = 0, height = 0, master;
@@ -2537,6 +2547,7 @@ void dcn10_enable_timing_synchronization(
 	int group_size,
 	struct pipe_ctx *grouped_pipes[])
 {
+	(void)group_index;
 	struct output_pixel_processor *opp;
 	struct timing_generator *tg;
 	int i, width = 0, height = 0;
@@ -2641,6 +2652,7 @@ static void mmhub_read_vm_system_aperture_settings(struct dcn10_hubp *hubp1,
 		struct vm_system_aperture_param *apt,
 		struct dce_hwseq *hws)
 {
+	(void)hubp1;
 	PHYSICAL_ADDRESS_LOC physical_page_number;
 	uint32_t logical_addr_low;
 	uint32_t logical_addr_high;
@@ -2666,6 +2678,7 @@ static void mmhub_read_vm_context0_settings(struct dcn10_hubp *hubp1,
 		struct vm_context0_param *vm0,
 		struct dce_hwseq *hws)
 {
+	(void)hubp1;
 	PHYSICAL_ADDRESS_LOC fb_base;
 	PHYSICAL_ADDRESS_LOC fb_offset;
 	uint32_t fb_base_value;
@@ -2724,6 +2737,7 @@ static void dcn10_enable_plane(
 	struct pipe_ctx *pipe_ctx,
 	struct dc_state *context)
 {
+	(void)context;
 	struct dce_hwseq *hws = dc->hwseq;
 
 	if (dc->debug.sanity_checks) {
@@ -2821,6 +2835,8 @@ void dcn10_program_output_csc(struct dc *dc,
 		uint16_t *matrix,
 		int opp_id)
 {
+	(void)dc;
+	(void)opp_id;
 	if (pipe_ctx->stream->csc_color_matrix.enable_adjustment == true) {
 		if (pipe_ctx->plane_res.dpp->funcs->dpp_set_csc_adjustment != NULL) {
 
@@ -3586,6 +3602,10 @@ bool dcn10_dummy_display_power_gating(
 	struct dc_bios *dcb,
 	enum pipe_gating_control power_gating)
 {
+	(void)dc;
+	(void)controller_id;
+	(void)dcb;
+	(void)power_gating;
 	return true;
 }
 
@@ -4052,6 +4072,7 @@ enum dc_status dcn10_set_clock(struct dc *dc,
 			uint32_t clk_khz,
 			uint32_t stepping)
 {
+	(void)stepping;
 	struct dc_state *context = dc->current_state;
 	struct dc_clock_config clock_cfg = {0};
 	struct dc_clocks *current_clocks = &context->bw_ctx.bw.dcn.clk;
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +9 -0
index a673ab0803a8..288e4edaa9a2 100644
@@ -75,6 +75,7 @@
 void dcn20_log_color_state(struct dc *dc,
 			   struct dc_log_buffer_ctx *log_ctx)
 {
+	(void)log_ctx;
 	struct dc_context *dc_ctx = dc->ctx;
 	struct resource_pool *pool = dc->res_pool;
 	bool is_gamut_remap_available = false;
@@ -379,6 +380,7 @@ void dcn20_program_triple_buffer(
 	struct pipe_ctx *pipe_ctx,
 	bool enable_triple_buffer)
 {
+	(void)dc;
 	if (pipe_ctx->plane_res.hubp && pipe_ctx->plane_res.hubp->funcs) {
 		pipe_ctx->plane_res.hubp->funcs->hubp_enable_tripleBuffer(
 			pipe_ctx->plane_res.hubp,
@@ -1175,6 +1177,8 @@ bool dcn20_set_input_transfer_func(struct dc *dc,
 
 void dcn20_update_odm(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
 {
+	(void)context;
+	(void)dc;
 	struct pipe_ctx *odm_pipe;
 	int opp_cnt = 1;
 	int opp_inst[MAX_PIPES] = { pipe_ctx->stream_res.opp->inst };
@@ -1297,6 +1301,7 @@ static void dcn20_power_on_plane_resources(
 void dcn20_enable_plane(struct dc *dc, struct pipe_ctx *pipe_ctx,
 			       struct dc_state *context)
 {
+	(void)context;
 	//if (dc->debug.sanity_checks) {
 	//	dcn10_verify_allow_pstate_change_high(dc);
 	//}
@@ -2652,6 +2657,7 @@ void dcn20_init_vm_ctx(
 		struct dc_virtual_addr_space_config *va_config,
 		int vmid)
 {
+	(void)hws;
 	struct dcn_hubbub_virt_addr_config config;
 
 	if (vmid == 0) {
@@ -2670,6 +2676,7 @@ void dcn20_init_vm_ctx(
 
 int dcn20_init_sys_ctx(struct dce_hwseq *hws, struct dc *dc, struct dc_phy_addr_space_config *pa_config)
 {
+	(void)hws;
 	struct dcn_hubbub_phys_addr_config config;
 
 	config.system_aperture.fb_top = pa_config->system_aperture.fb_top;
@@ -2799,6 +2806,7 @@ void dcn20_reset_back_end_for_pipe(
 		struct pipe_ctx *pipe_ctx,
 		struct dc_state *context)
 {
+	(void)context;
 	struct dc_link *link = pipe_ctx->stream->link;
 	const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
 	struct dccg *dccg = dc->res_pool->dccg;
@@ -3245,6 +3253,7 @@ void dcn20_set_disp_pattern_generator(const struct dc *dc,
 		const struct tg_color *solid_color,
 		int width, int height, int offset)
 {
+	(void)dc;
 	pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator(pipe_ctx->stream_res.opp, test_pattern,
 			color_space, color_depth, solid_color, width, height, offset);
 }
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +3 -0
index 34d4519b3a17..2aa0f1de8103 100644
@@ -75,6 +75,7 @@
 void dcn30_log_color_state(struct dc *dc,
 			   struct dc_log_buffer_ctx *log_ctx)
 {
+	(void)log_ctx;
 	struct dc_context *dc_ctx = dc->ctx;
 	struct resource_pool *pool = dc->res_pool;
 	bool is_gamut_remap_available = false;
@@ -1183,6 +1184,7 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,
 		const struct tg_color *solid_color,
 		int width, int height, int offset)
 {
+	(void)dc;
 	pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator(pipe_ctx->stream_res.opp, test_pattern,
 			color_space, color_depth, solid_color, width, height, offset);
 }
@@ -1237,6 +1239,7 @@ void dcn30_get_underflow_debug_data(const struct dc *dc,
 	struct timing_generator *tg,
 	struct dc_underflow_debug_data *out_data)
 {
+	(void)tg;
 	struct hubbub *hubbub = dc->res_pool->hubbub;
 
 	if (hubbub) {
drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c +11 -0
index 3bc56ac346f3..6e1877a8682d 100644
@@ -45,20 +45,31 @@
 
 void dcn303_dpp_pg_control(struct dce_hwseq *hws, unsigned int dpp_inst, bool power_on)
 {
+	(void)dpp_inst;
+	(void)hws;
+	(void)power_on;
 	/*DCN303 removes PG registers*/
 }
 
 void dcn303_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool power_on)
 {
+	(void)hubp_inst;
+	(void)hws;
+	(void)power_on;
 	/*DCN303 removes PG registers*/
 }
 
 void dcn303_dsc_pg_control(struct dce_hwseq *hws, unsigned int dsc_inst, bool power_on)
 {
+	(void)dsc_inst;
+	(void)hws;
+	(void)power_on;
 	/*DCN303 removes PG registers*/
 }
 
 void dcn303_enable_power_gating_plane(struct dce_hwseq *hws, bool enable)
 {
+	(void)enable;
+	(void)hws;
 	/*DCN303 removes PG registers*/
 }
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +2 -0
index 1fba44aecdd3..b4afb2bc4493 100644
@@ -484,6 +484,7 @@ void dcn31_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool p
 
 int dcn31_init_sys_ctx(struct dce_hwseq *hws, struct dc *dc, struct dc_phy_addr_space_config *pa_config)
 {
+	(void)hws;
 	struct dcn_hubbub_phys_addr_config config = {0};
 
 	config.system_aperture.fb_top = pa_config->system_aperture.fb_top;
@@ -511,6 +512,7 @@ static void dcn31_reset_back_end_for_pipe(
 		struct pipe_ctx *pipe_ctx,
 		struct dc_state *context)
 {
+	(void)context;
 	struct dc_link *link;
 
 	if (pipe_ctx->stream_res.stream_enc == NULL) {
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c +1 -0
index 3e239124c17d..858a06b03b57 100644
@@ -172,6 +172,7 @@ static unsigned int get_odm_config(struct pipe_ctx *pipe_ctx, unsigned int *opp_
 
 void dcn314_update_odm(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
 {
+	(void)context;
 	struct pipe_ctx *odm_pipe;
 	int opp_cnt = 0;
 	int opp_inst[MAX_PIPES] = {0};
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +2 -0
index ef08c98b11e9..b45ceb570a5c 100644
@@ -570,6 +570,7 @@ bool dcn32_set_output_transfer_func(struct dc *dc,
 				struct pipe_ctx *pipe_ctx,
 				const struct dc_stream_state *stream)
 {
+	(void)dc;
 	int mpcc_id = pipe_ctx->plane_res.hubp->inst;
 	struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
 	const struct pwl_params *params = NULL;
@@ -1143,6 +1144,7 @@ static unsigned int get_odm_config(struct pipe_ctx *pipe_ctx, unsigned int *opp_
 
 void dcn32_update_odm(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
 {
+	(void)context;
 	struct pipe_ctx *odm_pipe;
 	int opp_cnt = 0;
 	int opp_inst[MAX_PIPES] = {0};
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +2 -0
index 7c25911089b8..f133b52ea958 100644
@@ -428,6 +428,7 @@ static unsigned int get_odm_config(struct pipe_ctx *pipe_ctx, unsigned int *opp_
 
 void dcn35_update_odm(struct dc *dc, struct dc_state *context, struct pipe_ctx *pipe_ctx)
 {
+	(void)context;
 	struct pipe_ctx *odm_pipe;
 	int opp_cnt = 0;
 	int opp_inst[MAX_PIPES] = {0};
@@ -816,6 +817,7 @@ void dcn35_init_pipes(struct dc *dc, struct dc_state *context)
 void dcn35_enable_plane(struct dc *dc, struct pipe_ctx *pipe_ctx,
 			       struct dc_state *context)
 {
+	(void)context;
 	struct dpp *dpp = pipe_ctx->plane_res.dpp;
 
 	/* enable DCFCLK current DCHUB */
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +6 -0
index f28a522ea6cd..bf28aa704532 100644
@@ -551,6 +551,7 @@ bool dcn401_set_output_transfer_func(struct dc *dc,
 				struct pipe_ctx *pipe_ctx,
 				const struct dc_stream_state *stream)
 {
+	(void)dc;
 	int mpcc_id = pipe_ctx->plane_res.hubp->inst;
 	struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
 	const struct pwl_params *params = NULL;
@@ -612,6 +613,7 @@ static void enable_stream_timing_calc(
 		struct drr_params *params,
 		unsigned int *event_triggers)
 {
+	(void)dc;
 	struct dc_stream_state *stream = pipe_ctx->stream;
 	int i;
 
@@ -1389,6 +1391,7 @@ void dcn401_dmub_hw_control_lock(struct dc *dc,
 		struct dc_state *context,
 		bool lock)
 {
+	(void)context;
 	/* use always for now */
 	union dmub_inbox0_cmd_lock_hw hw_lock_cmd = { 0 };
 
@@ -1863,6 +1866,7 @@ void dcn401_reset_back_end_for_pipe(
 		struct pipe_ctx *pipe_ctx,
 		struct dc_state *context)
 {
+	(void)context;
 	struct dc_link *link = pipe_ctx->stream->link;
 	const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
 
@@ -3238,6 +3242,7 @@ void dcn401_update_writeback_sequence(
 		struct dc_state *context,
 		struct block_sequence_state *seq_state)
 {
+	(void)context;
 	struct dwbc *dwb;
 	struct mcif_wb *mcif_wb;
 
@@ -3443,6 +3448,7 @@ void dcn401_enable_plane_sequence(struct dc *dc, struct pipe_ctx *pipe_ctx,
 				 struct dc_state *context,
 				 struct block_sequence_state *seq_state)
 {
+	(void)context;
 	struct dce_hwseq *hws = dc->hwseq;
 	uint32_t org_ip_request_cntl = 0;
 
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +2 -0
index ba1813eb3c6c..46f2f9833d9e 100644
@@ -386,6 +386,7 @@ void dcn42_program_cm_hist(
 	struct pipe_ctx *pipe_ctx,
 	const struct dc_plane_state *plane_state)
 {
+	(void)dc;
 	struct dpp *dpp = pipe_ctx->plane_res.dpp;
 
 	if (dpp && dpp->funcs->dpp_cm_hist_control)
@@ -1000,6 +1001,7 @@ void dcn42_root_clock_control(struct dc *dc,
 }
 void dcn42_setup_stereo(struct pipe_ctx *pipe_ctx, struct dc *dc)
 {
+	(void)dc;
 	struct crtc_stereo_flags flags = { 0 };
 	struct dc_stream_state *stream = pipe_ctx->stream;
 
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c +2 -0
index 1994a5f40ee9..65a98400c486 100644
@@ -183,6 +183,7 @@ bool dal_irq_service_dummy_set(struct irq_service *irq_service,
 			       const struct irq_source_info *info,
 			       bool enable)
 {
+	(void)enable;
 	DC_LOG_ERROR("%s: called for non-implemented irq source, src_id=%u, ext_id=%u\n",
 		     __func__, info->src_id, info->ext_id);
 
@@ -328,6 +329,7 @@ enum dc_irq_source to_dal_irq_source_dce110(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
 	switch (src_id) {
 	case VISLANDS30_IV_SRCID_D1_VERTICAL_INTERRUPT0:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c +3 -0
index 8c8fc1c6b4ec..7dff8731f414 100644
@@ -42,6 +42,9 @@ static enum dc_irq_source to_dal_irq_source_dcn10(struct irq_service *irq_servic
 						  uint32_t src_id,
 						  uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c +3 -0
index 59516b6f84a3..34f9e8a9f488 100644
@@ -43,6 +43,9 @@ static enum dc_irq_source to_dal_irq_source_dcn20(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c +3 -0
index 8253a5f7adcb..05f7877d2d6c 100644
@@ -42,6 +42,9 @@ static enum dc_irq_source to_dal_irq_source_dcn21(struct irq_service *irq_servic
 						  uint32_t src_id,
 						  uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c +3 -0
index cd128b6fab73..3a7f76364000 100644
@@ -50,6 +50,9 @@ static enum dc_irq_source to_dal_irq_source_dcn30(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c +3 -0
index adef0e4ae2bb..f4dfc96310c7 100644
@@ -37,6 +37,9 @@
 
 static enum dc_irq_source to_dal_irq_source_dcn302(struct irq_service *irq_service, uint32_t src_id, uint32_t ext_id)
 {
+	(void)ext_id;
+	(void)irq_service;
+	(void)src_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn303/irq_service_dcn303.c +3 -0
index 639d649915e5..fdc7624461ac 100644
@@ -38,6 +38,9 @@ static enum dc_irq_source to_dal_irq_source_dcn303(struct irq_service *irq_servi
 						   uint32_t src_id,
 						   uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn31/irq_service_dcn31.c +3 -0
index 18049aa0dbd2..5fecd03f9499 100644
@@ -40,6 +40,9 @@ static enum dc_irq_source to_dal_irq_source_dcn31(struct irq_service *irq_servic
 						  uint32_t src_id,
 						  uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn314/irq_service_dcn314.c +3 -0
index e86f3c03d4d4..a214f13c5a97 100644
@@ -42,6 +42,9 @@ static enum dc_irq_source to_dal_irq_source_dcn314(struct irq_service *irq_servi
 						   uint32_t src_id,
 						   uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn315/irq_service_dcn315.c +3 -0
index 5f9d90f37ffe..dc2dced7db85 100644
@@ -47,6 +47,9 @@ static enum dc_irq_source to_dal_irq_source_dcn315(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c +3 -0
index 436461730db3..3090ceb66433 100644
@@ -41,6 +41,9 @@ static enum dc_irq_source to_dal_irq_source_dcn32(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c +3 -0
index 8d252ccbb297..27289279b21c 100644
@@ -39,6 +39,9 @@ static enum dc_irq_source to_dal_irq_source_dcn35(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c +3 -0
index 3e2f53308cde..7404b572a4e9 100644
@@ -18,6 +18,9 @@ static enum dc_irq_source to_dal_irq_source_dcn351(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c +3 -0
index 2540e8dc93a0..3dd47a99f568 100644
@@ -17,6 +17,9 @@ static enum dc_irq_source to_dal_irq_source_dcn36(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn401/irq_service_dcn401.c +3 -0
index dcfafcee0587..42d9d42ba0b9 100644
@@ -20,6 +20,9 @@ static enum dc_irq_source to_dal_irq_source_dcn401(
 		uint32_t src_id,
 		uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/irq/dcn42/irq_service_dcn42.c +3 -0
index bdf733d37a76..f4d1ce9079de 100644
@@ -19,6 +19,9 @@ static enum dc_irq_source to_dal_irq_source_dcn42(
 	uint32_t src_id,
 	uint32_t ext_id)
 {
+	(void)irq_service;
+	(void)src_id;
+	(void)ext_id;
 	switch (src_id) {
 	case DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP:
 		return DC_IRQ_SOURCE_VBLANK1;
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +2 -0
index 693d852b1c40..060460abc377 100644
@@ -66,6 +66,7 @@ static void dp_retrain_link_dp_test(struct dc_link *link,
 			struct dc_link_settings *link_setting,
 			bool skip_video_pattern)
 {
+	(void)skip_video_pattern;
 	struct pipe_ctx *pipes[MAX_PIPES];
 	struct dc_state *state = link->dc->current_state;
 	struct dc_stream_update stream_update = { 0 };
@@ -483,6 +484,7 @@ static void set_crtc_test_pattern(struct dc_link *link,
 				enum dp_test_pattern test_pattern,
 				enum dp_test_pattern_color_space test_pattern_color_space)
 {
+	(void)test_pattern_color_space;
 	enum controller_dp_test_pattern controller_test_pattern;
 	enum dc_color_depth color_depth = pipe_ctx->
 		stream->timing.display_color_depth;
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dpia.c +4 -0
index 5d708039c7cf..2a87b23582f3 100644
@@ -81,6 +81,10 @@ static void set_dio_dpia_lane_settings(struct dc_link *link,
 		const struct dc_link_settings *link_settings,
 		const struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX])
 {
+	(void)link;
+	(void)link_res;
+	(void)link_settings;
+	(void)lane_settings;
 }
 
 static void enable_dpia_link_output(struct dc_link *link,
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c +6 -0
index cec68c5dba13..dbbedeeed298 100644
@@ -110,6 +110,8 @@ void enable_hpo_dp_link_output(struct dc_link *link,
 		enum clock_source_id clock_source,
 		const struct dc_link_settings *link_settings)
 {
+	(void)signal;
+	(void)clock_source;
 	if (!link_res->hpo_dp_link_enc) {
 		DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__);
 		return;
@@ -160,6 +162,7 @@ static void set_hpo_dp_lane_settings(struct dc_link *link,
 		const struct dc_link_settings *link_settings,
 		const struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX])
 {
+	(void)link;
 	link_res->hpo_dp_link_enc->funcs->set_ffe(
 			link_res->hpo_dp_link_enc,
 			link_settings,
@@ -170,6 +173,7 @@ void update_hpo_dp_stream_allocation_table(struct dc_link *link,
 		const struct link_resource *link_res,
 		const struct link_mst_stream_allocation_table *table)
 {
+	(void)link;
 	link_res->hpo_dp_link_enc->funcs->update_stream_allocation_table(
 			link_res->hpo_dp_link_enc,
 			table);
@@ -178,6 +182,7 @@ void update_hpo_dp_stream_allocation_table(struct dc_link *link,
 void setup_hpo_dp_audio_output(struct pipe_ctx *pipe_ctx,
 		struct audio_output *audio_output, uint32_t audio_inst)
 {
+	(void)audio_output;
 	pipe_ctx->stream_res.hpo_dp_stream_enc->funcs->dp_audio_setup(
 			pipe_ctx->stream_res.hpo_dp_stream_enc,
 			audio_inst,
@@ -218,6 +223,7 @@ static const struct link_hwss hpo_dp_link_hwss = {
 bool can_use_hpo_dp_link_hwss(const struct dc_link *link,
 		const struct link_resource *link_res)
 {
+	(void)link;
 	return link_res->hpo_dp_link_enc != NULL;
 }
 
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c +1 -0
index 55c5148de800..6d5b7450b205 100644
@@ -74,6 +74,7 @@ static void dp_hpo_fixed_vs_pe_retimer_set_tx_ffe(struct dc_link *link,
 static void dp_hpo_fixed_vs_pe_retimer_program_override_test_pattern(struct dc_link *link,
 		struct encoder_set_dp_phy_pattern_param *tp_params)
 {
+	(void)tp_params;
 	uint8_t clk_src = 0xC4;
 	uint8_t pattern = 0x4F; /* SQ128 */
 
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.c +6 -0
index 64742c24f7e6..3aa1375cec71 100644
@@ -27,20 +27,26 @@
 
 void virtual_setup_stream_encoder(struct pipe_ctx *pipe_ctx)
 {
+	(void)pipe_ctx;
 }
 
 void virtual_setup_stream_attribute(struct pipe_ctx *pipe_ctx)
 {
+	(void)pipe_ctx;
 }
 
 void virtual_reset_stream_encoder(struct pipe_ctx *pipe_ctx)
 {
+	(void)pipe_ctx;
 }
 
 static void virtual_disable_link_output(struct dc_link *link,
 	const struct link_resource *link_res,
 	enum signal_type signal)
 {
+	(void)link;
+	(void)link_res;
+	(void)signal;
 }
 
 static const struct link_hwss virtual_link_hwss = {
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -0
index b761f330311f..59851924bfcd 100644
@@ -823,6 +823,7 @@ static void verify_link_capability_non_destructive(struct dc_link *link)
 static bool should_verify_link_capability_destructively(struct dc_link *link,
 		enum dc_detect_reason reason)
 {
+	(void)reason;
 	bool destrictive = false;
 	struct dc_link_settings max_link_cap;
 	bool is_link_enc_unavailable = false;
drivers/gpu/drm/amd/display/dc/link/link_validation.c +1 -0
index acdc162de535..eb791285ed06 100644
@@ -391,6 +391,7 @@ static const struct dc_tunnel_settings *get_dp_tunnel_settings(const struct dc_s
  */
 enum dc_status link_validate_dp_tunnel_bandwidth(const struct dc *dc, const struct dc_state *new_ctx)
 {
+	(void)dc;
 	struct dc_validation_dpia_set dpia_link_sets[MAX_DPIA_NUM] = { 0 };
 	uint8_t link_count = 0;
 	enum dc_status result = DC_OK;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +2 -0
index 08e2b572e0ff..ddff0db4ce70 100644
@@ -554,6 +554,7 @@ enum link_training_result dp_check_link_loss_status(
 	struct dc_link *link,
 	const struct link_training_settings *link_training_setting)
 {
+	(void)link_training_setting;
 	enum link_training_result status = LINK_TRAINING_SUCCESS;
 	union lane_status lane_status;
 	union lane_align_status_updated dpcd_lane_status_updated;
@@ -1387,6 +1388,7 @@ bool dp_set_hw_training_pattern(
 	enum dc_dp_training_pattern pattern,
 	uint32_t offset)
 {
+	(void)offset;
 	enum dp_test_pattern test_pattern = DP_TEST_PATTERN_UNSUPPORTED;
 
 	switch (pattern) {
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_128b_132b.c +1 -0
index 11565f187ac7..1a6bfc45927d 100644
@@ -158,6 +158,7 @@ static enum link_training_result dp_perform_128b_132b_cds_done_sequence(
 		const struct link_resource *link_res,
 		struct link_training_settings *lt_settings)
 {
+	(void)link_res;
 	/* Assumption: assume hardware has transmitted eq pattern */
 	enum dc_status status = DC_OK;
 	enum link_training_result result = LINK_TRAINING_SUCCESS;
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c +6 -0
index 603537ffd128..34fa76d97b83 100644
@@ -172,6 +172,7 @@ static uint8_t dpia_build_set_config_data(
 		struct dc_link *link,
 		struct link_training_settings *lt_settings)
 {
+	(void)link;
 	union dpia_set_config_data data;
 
 	data.raw = 0;
@@ -290,6 +291,7 @@ static enum link_training_result dpia_training_cr_non_transparent(
 		struct link_training_settings *lt_settings,
 		uint32_t hop)
 {
+	(void)link_res;
 	enum link_training_result result = LINK_TRAINING_CR_FAIL_LANE0;
 	uint8_t repeater_cnt = 0; /* Number of hops/repeaters in display path. */
 	enum dc_status status = DC_ERROR_UNEXPECTED;
@@ -457,6 +459,7 @@ static enum link_training_result dpia_training_cr_transparent(
 		const struct link_resource *link_res,
 		struct link_training_settings *lt_settings)
 {
+	(void)link_res;
 	enum link_training_result result = LINK_TRAINING_CR_FAIL_LANE0;
 	enum dc_status status;
 	uint32_t retries_cr = 0; /* Number of consecutive attempts with same VS or PE. */
@@ -585,6 +588,7 @@ static enum link_training_result dpia_training_eq_non_transparent(
 		struct link_training_settings *lt_settings,
 		uint32_t hop)
 {
+	(void)link_res;
 	enum link_training_result result = LINK_TRAINING_EQ_FAIL_EQ;
 	uint8_t repeater_cnt = 0; /* Number of hops/repeaters in display path. */
 	uint32_t retries_eq = 0;
@@ -730,6 +734,7 @@ static enum link_training_result dpia_training_eq_transparent(
 		const struct link_resource *link_res,
 		struct link_training_settings *lt_settings)
 {
+	(void)link_res;
 	enum link_training_result result = LINK_TRAINING_EQ_FAIL_EQ;
 	uint32_t retries_eq = 0;
 	enum dc_status status;
@@ -991,6 +996,7 @@ enum link_training_result dpia_perform_link_training(
 	const struct dc_link_settings *link_setting,
 	bool skip_video_pattern)
 {
+	(void)skip_video_pattern;
 	enum link_training_result result;
 	struct link_training_settings lt_settings = {0};
 	uint8_t repeater_cnt = 0; /* Number of hops/repeaters in display path. */
drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c +1 -0
index 584b9295a12a..e4c2aa2bc364 100644
@@ -180,6 +180,7 @@ static void dpcd_reduce_address_range(
 		uint8_t * const reduced_data,
 		const uint32_t reduced_size)
 {
+	(void)extended_size;
 	const uint32_t offset = reduced_address - extended_address;
 
 	/*
drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c +4 -0
index 8b398b9a2b6b..4c7bb0522a8c 100644
@@ -117,6 +117,9 @@ void mpc3_set_out_rate_control(
 	bool rate_2x_mode,
 	struct mpc_dwb_flow_control *flow_control)
 {
+	(void)enable;
+	(void)rate_2x_mode;
+	(void)flow_control;
 	struct dcn30_mpc *mpc30 = TO_DCN30_MPC(mpc);
 
 	/* Always disable mpc out rate and flow control.
@@ -908,6 +911,7 @@ static void mpc3_set_3dlut_mode(
 		bool is_lut_size17x17x17,
 		uint32_t rmu_idx)
 {
+	(void)is_color_channel_12bits;
 	uint32_t lut_mode;
 	struct dcn30_mpc *mpc30 = TO_DCN30_MPC(mpc);
 
drivers/gpu/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c +1 -0
index badcef027b84..1f15ada109b6 100644
@@ -884,6 +884,7 @@ void mpc32_set_3dlut_mode(
 		bool is_lut_size17x17x17,
 		uint32_t mpcc_id)
 {
+	(void)is_color_channel_12bits;
 	uint32_t lut_mode;
 	struct dcn30_mpc *mpc30 = TO_DCN30_MPC(mpc);
 
drivers/gpu/drm/amd/display/dc/opp/dcn10/dcn10_opp.c +1 -0
index 45d418636d0c..b49bd155cad4 100644
@@ -250,6 +250,7 @@ void opp1_set_dyn_expansion(
 	enum dc_color_depth color_dpth,
 	enum signal_type signal)
 {
+	(void)color_sp;
 	struct dcn10_opp *oppn10 = TO_DCN10_OPP(opp);
 
 	REG_UPDATE_2(FMT_DYNAMIC_EXP_CNTL,
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c +4 -0
index 6f7b0f816f2a..9e66b9b97c63 100644
@@ -164,6 +164,7 @@ void optc1_program_timing(
 	const enum signal_type signal,
 	bool use_vbios)
 {
+	(void)use_vbios;
 	struct dc_crtc_timing patched_crtc_timing;
 	uint32_t asic_blank_end;
 	uint32_t asic_blank_start;
@@ -855,6 +856,8 @@ void optc1_set_early_control(
 	struct timing_generator *optc,
 	uint32_t early_cntl)
 {
+	(void)optc;
+	(void)early_cntl;
 	/* asic design change, do not need this control
 	 * empty for share caller logic
 	 */
@@ -1249,6 +1252,7 @@ void optc1_get_crtc_scanoutpos(
 static void optc1_enable_stereo(struct timing_generator *optc,
 	const struct dc_crtc_timing *timing, struct crtc_stereo_flags *flags)
 {
+	(void)timing;
 	struct optc *optc1 = DCN10TG_FROM_TG(optc);
 
 	if (flags) {
drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.c +2 -0
index e7a90a437fff..39ce4d4a61a1 100644
@@ -181,6 +181,7 @@ void optc2_set_odm_bypass(struct timing_generator *optc,
 void optc2_set_odm_combine(struct timing_generator *optc, int *opp_id, int opp_cnt,
 		int segment_width, int last_segment_width)
 {
+	(void)last_segment_width;
 	struct optc *optc1 = DCN10TG_FROM_TG(optc);
 	uint32_t memory_mask;
 
@@ -261,6 +262,7 @@ static void optc2_align_vblanks(
 	uint8_t master_clock_divider,
 	uint8_t slave_clock_divider)
 {
+	(void)slave_clock_divider;
 	/* accessing slave OTG registers */
 	struct optc *optc1 = DCN10TG_FROM_TG(optc_slave);
 
drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.c +1 -0
index ee4665aa49e9..d72574db1f07 100644
@@ -218,6 +218,7 @@ void optc3_set_odm_bypass(struct timing_generator *optc,
 void optc3_set_odm_combine(struct timing_generator *optc, int *opp_id, int opp_cnt,
 		int segment_width, int last_segment_width)
 {
+	(void)last_segment_width;
 	struct optc *optc1 = DCN10TG_FROM_TG(optc);
 	uint32_t memory_mask = 0;
 
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c +1 -0
index 893d2aff1f82..5f53f8747812 100644
@@ -43,6 +43,7 @@
 static void optc31_set_odm_combine(struct timing_generator *optc, int *opp_id, int opp_cnt,
 		int segment_width, int last_segment_width)
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c +1 -0
index 43ff957288b2..a7cf34937b2f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c +1 -0
index 3dcb0d0c931c..60e546b69a05 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c +1 -0
index 5aafd0eedf66..a880e4a6d165 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +5 -0
index 82d76e7276a3..f5bbfbf42691 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +6 -0
index 7c09825cd9bd..1971237585e4 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +5 -0
index 294f3f5016b8..2879df2febf5 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +1 -0
index 5dd80d2279d2..88c9bfdc647e 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +1 -0
index bf889f40d9ff..08bd879e00ce 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +3 -0
index 70d7ca0b0f86..691bd31ca087 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +6 -0
index e8d232006dbf..bb7d66b46f61 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +1 -0
index 959001d0a578..10f02d357930 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +1 -0
index 0c70677b4544..f1155a6db96f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +1 -0
index 97b6c4ee8532..969409f8746d 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +1 -0
index bb3edfe86a1f..f87a3c05712e 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +1 -0
index db627b4aa76a..3989a2fd2a55 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +2 -0
index e14b00cba962..295ff6366462 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -0
index ee1d48158d3c..4df38d9c73f8 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -0
index 999fef8879be..63a84b37c854 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +1 -0
index cab523733ce4..66616848ef6c 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c +1 -0
index f5a4e97c40ce..4808c793590f 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +3 -0
index b9532ebcced4..c0d37f00fed9 100644

Lines of this file are not shown. View the raw message.

drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.c +1 -0
index 1c04171b296c..146a6e47934b 100644

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.

#32 lore raw

PATCH v2 27/30 drm/amd/display: Fix Compiler warnings in dmub

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

[Why]
Resolve compiler warnings by marking unused parameters explicitly.

[How]
In .c and .h files, keep parameter names in signatures and add a line with(void)param; inside the function body

Preserved function signatures and avoids breaking code paths that may reference the parameter under conditional compilation.

---
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c  | 2 ++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c  | 1 +
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c  | 2 ++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c  | 2 ++
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c  | 1 +
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c | 1 +
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c  | 1 +
 drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c    | 1 +
 8 files changed, 11 insertions(+)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +2 -0
index 73221ca53b7d..0b152926f75b 100644
@@ -194,6 +194,7 @@ void dmub_dcn20_setup_windows(struct dmub_srv *dmub,
 			      const struct dmub_window *cw6,
 			      const struct dmub_window *region6)
 {
+	(void)region6;
 	union dmub_addr offset;
 	uint64_t fb_base, fb_offset;
 
@@ -396,6 +397,7 @@ union dmub_fw_boot_status dmub_dcn20_get_fw_boot_status(struct dmub_srv *dmub)
 
 void dmub_dcn20_enable_dmub_boot_options(struct dmub_srv *dmub, const struct dmub_srv_hw_params *params)
 {
+	(void)params;
 	union dmub_fw_boot_options boot_options = {0};
 
 	REG_WRITE(DMCUB_SCRATCH14, boot_options.all);
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn30.c +1 -0
index 84a6eb3f677d..23a33db07edc 100644
@@ -127,6 +127,7 @@ void dmub_dcn30_setup_windows(struct dmub_srv *dmub,
 			      const struct dmub_window *cw6,
 			      const struct dmub_window *region6)
 {
+	(void)region6;
 	union dmub_addr offset;
 
 	/* sienna_cichlid  has hardwired virtual addressing for CW2-CW7 */
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +2 -0
index 244244f3df80..478d79a6e246 100644
@@ -195,6 +195,8 @@ void dmub_dcn31_setup_windows(struct dmub_srv *dmub,
 			      const struct dmub_window *cw6,
 			      const struct dmub_window *region6)
 {
+	(void)cw2;
+	(void)region6;
 	union dmub_addr offset;
 
 	offset = cw3->offset;
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +2 -0
index 5d86f649db4b..3f9fb9e05b79 100644
@@ -237,6 +237,8 @@ void dmub_dcn32_setup_windows(struct dmub_srv *dmub,
 		const struct dmub_window *cw6,
 		const struct dmub_window *region6)
 {
+	(void)cw2;
+	(void)region6;
 	union dmub_addr offset;
 
 	offset = cw3->offset;
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +1 -0
index f9b16eb8ef8e..69fb6084232e 100644
@@ -222,6 +222,7 @@ void dmub_dcn35_setup_windows(struct dmub_srv *dmub,
 			      const struct dmub_window *cw6,
 			      const struct dmub_window *region6)
 {
+	(void)cw2;
 	union dmub_addr offset;
 
 	offset = cw3->offset;
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +1 -0
index 3d2307d0ce49..e5a78df80d72 100644
@@ -213,6 +213,7 @@ void dmub_dcn401_setup_windows(struct dmub_srv *dmub,
 		const struct dmub_window *cw6,
 		const struct dmub_window *region6)
 {
+	(void)cw2;
 	union dmub_addr offset;
 
 	offset = cw3->offset;
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c +1 -0
index 7b870b831199..a09aa19ad379 100644
@@ -229,6 +229,7 @@ void dmub_dcn42_setup_windows(struct dmub_srv *dmub,
 			      const struct dmub_window *cw6,
 			      const struct dmub_window *region6)
 {
+	(void)cw2;
 	union dmub_addr offset;
 
 	offset = cw3->offset;
drivers/gpu/drm/amd/display/dmub/src/dmub_reg.c +1 -0
index 94f4931d3d44..b5566ef8d4f3 100644
@@ -45,6 +45,7 @@ static void set_reg_field_values(struct dmub_reg_value_masks *field_value_mask,
 				 uint32_t mask1, uint32_t field_value1,
 				 va_list ap)
 {
+	(void)addr;
 	uint32_t shift, mask, field_value;
 	int i = 1;
 
Signature · 1 line
2.43.0
#33 lore raw

PATCH v2 28/30 drm/amd/display: Silence type conversion warnings in dml2

In reply to ChuanYu Tseng

From: Gaghik Khachatrian <[email protected]>

[Why]
Compiler build generates type conversion warnings throughout dc/dml2_0 where values are implicitly narrowed (e.g. int/uint32_t/uint64_t assigned to uint8_t, unsigned char, char, bool, or dml_bool_t), cluttering build output and masking genuine issues.

[How]
Add explicit casts at each narrowing assignment with ASSERT guards to catch out-of-range values in debug builds:
- uint8_t: otg_inst, num_planes, pipe_idx, vblank_index fields
- unsigned char: pipe_dlg_param.otg_inst from tg->inst
- char: mcache num_pipes from num_dpps_required
- bool/dml_bool_t: INTERLACE bitfield and fams2 enable flag use != 0
- uint64_t: widen min_hardware_refresh_in_uhz to hold div64_u64 result, then cast to unsigned long for min_refresh_uhz with ASSERT

---
 .../dc/dml2_0/dml21/dml21_translation_helper.c | 13 +++++++++----
 .../amd/display/dc/dml2_0/dml21/dml21_utils.c  | 15 +++++++++++----
 .../dc/dml2_0/dml21/dml21_wrapper_fpu.c        |  6 ++++--
 .../display/dc/dml2_0/dml2_dc_resource_mgmt.c  | 18 ++++++++++++------
 .../amd/display/dc/dml2_0/dml2_mall_phantom.c  |  3 ++-
 .../dc/dml2_0/dml2_translation_helper.c        |  2 +-
 .../gpu/drm/amd/display/dc/dml2_0/dml2_utils.c |  3 ++-
 7 files changed, 41 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +9 -4
index eadf84842ca0..2f0e0048bea8 100644
@@ -90,7 +90,8 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
 		struct pipe_ctx *pipe_ctx,
 		struct dml2_context *dml_ctx)
 {
-	unsigned int hblank_start, vblank_start, min_hardware_refresh_in_uhz;
+	unsigned int hblank_start, vblank_start;
+	uint64_t min_hardware_refresh_in_uhz;
 	uint32_t pix_clk_100hz;
 
 	timing->h_active = stream->timing.h_addressable + stream->timing.h_border_left + stream->timing.h_border_right + pipe_ctx->dsc_padding_params.dsc_hactive_padding;
@@ -105,7 +106,7 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
 	timing->h_total = stream->timing.h_total + pipe_ctx->dsc_padding_params.dsc_htotal_padding;
 	timing->v_total = stream->timing.v_total;
 	timing->h_sync_width = stream->timing.h_sync_width;
-	timing->interlaced = stream->timing.flags.INTERLACE;
+	timing->interlaced = (stream->timing.flags.INTERLACE != 0);
 
 	hblank_start = stream->timing.h_total - stream->timing.h_front_porch;
 
@@ -137,7 +138,11 @@ static void populate_dml21_timing_config_from_stream_state(struct dml2_timing_cf
 				(timing->h_total * (long long)calc_max_hardware_v_total(stream)));
 	}
 
-	timing->drr_config.min_refresh_uhz = max(stream->timing.min_refresh_in_uhz, min_hardware_refresh_in_uhz);
+	{
+		uint64_t min_refresh = max((uint64_t)stream->timing.min_refresh_in_uhz, min_hardware_refresh_in_uhz);
+		ASSERT(min_refresh <= ULONG_MAX);
+		timing->drr_config.min_refresh_uhz = (unsigned long)min_refresh;
+	}
 
 	if (dml_ctx->config.callbacks.get_max_flickerless_instant_vtotal_increase &&
 			stream->ctx->dc->config.enable_fpo_flicker_detection == 1)
@@ -697,7 +702,7 @@ unsigned int map_plane_to_dml21_display_cfg(const struct dml2_context *dml_ctx,
 
 	if (!dml21_wrapper_get_plane_id(context, stream_id, plane, &plane_id)) {
 		ASSERT(false);
-		return -1;
+		return UINT_MAX;
 	}
 
 	for (i = 0; i < __DML2_WRAPPER_MAX_STREAMS_PLANES__; i++) {
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +11 -4
index ab7ec24268be..4724b08c77e1 100644
@@ -420,8 +420,12 @@ static unsigned int dml21_build_fams2_stream_programming_v2(const struct dc *dc,
 			type = static_base_state->stream_v1.base.type;
 
 			/* get information from context */
-			static_base_state->stream_v1.base.num_planes = context->stream_status[dc_stream_idx].plane_count;
-			static_base_state->stream_v1.base.otg_inst = context->stream_status[dc_stream_idx].primary_otg_inst;
+			ASSERT(context->stream_status[dc_stream_idx].plane_count >= 0 &&
+					context->stream_status[dc_stream_idx].plane_count <= 0xFF);
+			ASSERT(context->stream_status[dc_stream_idx].primary_otg_inst >= 0 &&
+					context->stream_status[dc_stream_idx].primary_otg_inst <= 0xFF);
+			static_base_state->stream_v1.base.num_planes = (uint8_t)context->stream_status[dc_stream_idx].plane_count;
+			static_base_state->stream_v1.base.otg_inst = (uint8_t)context->stream_status[dc_stream_idx].primary_otg_inst;
 
 			/* populate pipe masks for planes */
 			for (dc_plane_idx = 0; dc_plane_idx < context->stream_status[dc_stream_idx].plane_count; dc_plane_idx++) {
@@ -458,7 +462,9 @@ static unsigned int dml21_build_fams2_stream_programming_v2(const struct dc *dc,
 			switch (dc->debug.fams_version.minor) {
 			case 1:
 			default:
-				static_sub_state->stream_v1.sub_state.subvp.phantom_otg_inst = phantom_status->primary_otg_inst;
+				ASSERT(phantom_status->primary_otg_inst >= 0 &&
+						phantom_status->primary_otg_inst <= 0xFF);
+				static_sub_state->stream_v1.sub_state.subvp.phantom_otg_inst = (uint8_t)phantom_status->primary_otg_inst;
 
 				/* populate pipe masks for phantom planes */
 				for (dc_plane_idx = 0; dc_plane_idx < phantom_status->plane_count; dc_plane_idx++) {
@@ -516,7 +522,8 @@ void dml21_build_fams2_programming(const struct dc *dc,
 		context->bw_ctx.bw.dcn.fams2_global_config.num_streams = num_fams2_streams;
 	}
 
-	context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching = context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable;
+	context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching =
+			(context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable != 0);
 }
 
 bool dml21_is_plane1_enabled(enum dml2_source_format_class source_format)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c +4 -2
index f3abfdbe6805..cc992af6ac9c 100644
@@ -297,7 +297,8 @@ void dml21_prepare_mcache_programming(struct dc *in_dc, struct dc_state *context
 		memset(mcache_config, 0, sizeof(struct dml2_plane_mcache_configuration_descriptor));
 		mcache_config->plane_descriptor = pln_prog->plane_descriptor;
 		mcache_config->mcache_allocation = &context->bw_ctx.bw.dcn.mcache_allocations[dml_prog_idx];
-		mcache_config->num_pipes = pln_prog->num_dpps_required;
+		ASSERT(pln_prog->num_dpps_required <= 0x7F);
+		mcache_config->num_pipes = (char)pln_prog->num_dpps_required;
 		l->build_mcache_programming_params.num_configurations++;
 
 		if (pln_prog->num_dpps_required == 0) {
@@ -324,7 +325,8 @@ void dml21_prepare_mcache_programming(struct dc *in_dc, struct dc_state *context
 			memset(mcache_config, 0, sizeof(struct dml2_plane_mcache_configuration_descriptor));
 			mcache_config->plane_descriptor = pln_prog->plane_descriptor;
 			mcache_config->mcache_allocation = &context->bw_ctx.bw.dcn.mcache_allocations[dml_phantom_prog_idx];
-			mcache_config->num_pipes = pln_prog->num_dpps_required;
+			ASSERT(pln_prog->num_dpps_required <= 0x7F);
+			mcache_config->num_pipes = (char)pln_prog->num_dpps_required;
 			l->build_mcache_programming_params.num_configurations++;
 
 			for (dc_pipe_index = 0; dc_pipe_index < num_pipes; dc_pipe_index++) {
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c +12 -6
index 40f2f1ebab3a..6ef93c6fc1cd 100644
@@ -366,7 +366,8 @@ static bool find_more_pipes_for_stream(struct dml2_context *ctx,
 		if (!is_plane_using_pipe(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = preferred_pipe_candidates[i];
+			ASSERT(preferred_pipe_candidates[i] <= 0xFF);
+			pipe->pipe_idx = (uint8_t)preferred_pipe_candidates[i];
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
@@ -382,7 +383,8 @@ static bool find_more_pipes_for_stream(struct dml2_context *ctx,
 		if (!is_plane_using_pipe(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = i;
+			ASSERT(i >= 0 && i <= 0xFF);
+			pipe->pipe_idx = (uint8_t)i;
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
@@ -393,7 +395,8 @@ static bool find_more_pipes_for_stream(struct dml2_context *ctx,
 		if (!is_plane_using_pipe(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = last_resort_pipe_candidates[i];
+			ASSERT(last_resort_pipe_candidates[i] <= 0xFF);
+			pipe->pipe_idx = (uint8_t)last_resort_pipe_candidates[i];
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
@@ -432,7 +435,8 @@ static bool find_more_free_pipes(struct dml2_context *ctx,
 		if (is_pipe_free(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = preferred_pipe_candidates[i];
+			ASSERT(preferred_pipe_candidates[i] <= 0xFF);
+			pipe->pipe_idx = (uint8_t)preferred_pipe_candidates[i];
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
@@ -448,7 +452,8 @@ static bool find_more_free_pipes(struct dml2_context *ctx,
 		if (is_pipe_free(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = i;
+			ASSERT(i >= 0 && i <= 0xFF);
+			pipe->pipe_idx = (uint8_t)i;
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
@@ -459,7 +464,8 @@ static bool find_more_free_pipes(struct dml2_context *ctx,
 		if (is_pipe_free(pipe)) {
 			pipes_needed--;
 			// TODO: This doens't make sense really, pipe_idx should always be valid
-			pipe->pipe_idx = last_resort_pipe_candidates[i];
+			ASSERT(last_resort_pipe_candidates[i] <= 0xFF);
+			pipe->pipe_idx = (uint8_t)last_resort_pipe_candidates[i];
 			assigned_pipes[(*assigned_pipe_count)++] = pipe->pipe_idx;
 		}
 	}
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c +2 -1
index d56e58ce26c7..9bbe4e058be7 100644
@@ -555,7 +555,8 @@ static bool subvp_vblank_schedulable(struct dml2_context *ctx, struct dc_state *
 
 		if (!found && pipe_mall_type == SUBVP_NONE) {
 			// Found pipe which is not SubVP or Phantom (i.e. the VBLANK pipe).
-			vblank_index = i;
+			ASSERT(i <= 0xFF);
+			vblank_index = (uint8_t)i;
 			found = true;
 		}
 
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c +1 -1
index 57f45b27de1d..cf3a69aba638 100644
@@ -765,7 +765,7 @@ static void populate_dml_timing_cfg_from_stream_state(struct dml_timing_cfg_st *
 		out->PixelClock[location] *= 2;
 	out->HTotal[location] = in->timing.h_total;
 	out->VTotal[location] = in->timing.v_total;
-	out->Interlace[location] = in->timing.flags.INTERLACE;
+	out->Interlace[location] = (in->timing.flags.INTERLACE != 0);
 	hblank_start = in->timing.h_total - in->timing.h_front_porch;
 	out->HBlankEnd[location] = hblank_start
 					- in->timing.h_addressable
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c +2 -1
index 9a33158b63bf..6c7cdf102906 100644
@@ -255,7 +255,8 @@ 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);
 
-	pipe_ctx->pipe_dlg_param.otg_inst = pipe_ctx->stream_res.tg->inst;
+	ASSERT(pipe_ctx->stream_res.tg->inst >= 0 && 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;
 	pipe_ctx->pipe_dlg_param.vactive = vactive;
Signature · 1 line
2.43.0
#34 lore raw

PATCH v2 29/30 drm/amd/display: [FW Promotion] Release 0.1.53.0

In reply to ChuanYu Tseng

From: Taimur Hassan <[email protected]>

[Why]
dmu: Parse freesync mccs vcp code

---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +1 -0
index 8fbd179a4c87..fe9431cea3e5 100644
@@ -6272,6 +6272,7 @@ struct dmub_cmd_edid_cea_amd_vsdb {
 	uint16_t amd_vsdb_version;	/**< AMD VSDB version */
 	uint16_t min_frame_rate;	/**< Maximum frame rate */
 	uint16_t max_frame_rate;	/**< Minimum frame rate */
+	uint8_t freesync_mccs_vcp_code; /**< Freesync MCCS VCP code */
 };
 
 /**
Signature · 1 line
2.43.0
#35 lore raw

PATCH v2 30/30 drm/amd/display: Promote DC to 3.2.376

In reply to ChuanYu Tseng

From: Taimur Hassan <[email protected]>

This version brings along following fixes:

- correct unknown plane state patch
- Revert "Refactor DC update checks"
- Revert "Add 3DLUT DMA broadcast support"
- Remove invalid DPSTREAMCLK mask usage
- enable eDP DSC seamless boot support
- Revert "Rework HDMI link training and YCbCr422 with DSC policy"
- Disable PSR & Replay CRTC disable by default
- Fix Silence Compiler Warnings
- Add link output control for DPIA
- eliminate clock manager code duplication
- Don't set 4to1MPC config dynamically
- Merge pipes for validate
- Fix bounds checking in dml2_0 clock table array
- Avoid turning off the PHY when OTG is running for DVI
- Should support p-state under dcn21
- Enable Replay support for dcn42
- Remove check for DC_DMCUB_ENABLE on DCN42

---
 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
index afc06dfc161f..55ec281db3b7 100644
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;
 struct dcn_optc_reg_state;
 struct dcn_dccg_reg_state;
 
-#define DC_VER "3.2.375"
+#define DC_VER "3.2.376"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0