Skip to contentSkip to conversation

DC Patches October 27, 2025

PATCH In review waynelin 2 participants 22 messages Oct 22, 2025 – Oct 27, 2025

Subsystems (4)
lore
Share & tools
lore

waynelin

author
#0 lore raw

cover DC Patches October 27, 2025

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

- Fix incorrect return of vblank enable on unconfigured crtc
- Add HDR workaround for a specific eDP
- Make observers const-correct
- Add lock descriptor to check_update
- Update cursor offload assignments
- Add dc interface to log pre os firmware information
- Init dispclk from bootup clock for DCN315
- Remove dc param from check_update
- Update link encoder assignment
- Add more DC HW state info to underflow logging
- Rename dml2 to dml2_0 folder
- Fix notification of vtotal to DMU for cursor offload
- Fix wrong index for DCN401 cursor offload
- Add opp count validation to dml2.1
- Fix DMUB reset sequence for DCN32
- Bump minimum for frame_warn_limit

---

Alex Hung (1):
drm/amd/display: Add HDR workaround for a specific eDP

Alvin Lee (1):
drm/amd/display: Update cursor offload assignments

Austin Zheng (3):
drm/amd/display: Add dml2_0 folder drm/amd/display: Update dml2 references to use dml2_0 folder drm/amd/display: Remove dml2 Folder.

Dillon Varone (1):
drm/amd/display: Fix DMUB reset sequence for DCN32

Dmytro Laktyushkin (1):
drm/amd/display: Add opp count validation to dml2.1

Dominik Kaszewski (3):
drm/amd/display: Remove dc param from check_update drm/amd/display: Add lock descriptor to check_update drm/amd/display: Make observers const-correct

Ivan Lipski (1):
drm/amd/display: Fix incorrect return of vblank enable on unconfigured
crtc

Karen Chen (1):
drm/amd/display: Add more DC HW state info to underflow logging

Mario Limonciello (1):
drm/amd/display: Bump minimum for frame_warn_limit

Meenakshikumar Somasundaram (2):
drm/amd/display: update link encoder assignment drm/amd/display: Add dc interface to log pre os firmware information

Nicholas Kazlauskas (2):
drm/amd/display: Fix wrong index for DCN401 cursor offload drm/amd/display: Fix notification of vtotal to DMU for cursor offload

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

Zhongwei Zhang (1):
drm/amd/display: init dispclk from bootup clock for DCN315

 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    |  10 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |   1 +
 drivers/gpu/drm/amd/display/dc/Makefile       |   2 +-
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c        |  87 ++++++-
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.h        |   1 +
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 220 ++++++++++--------
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  45 +++-
 .../gpu/drm/amd/display/dc/core/dc_state.c    |   4 +-
 .../gpu/drm/amd/display/dc/core/dc_stream.c   |   8 +
 drivers/gpu/drm/amd/display/dc/dc.h           |  68 ++++--
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |  21 ++
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h  |   7 +
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  11 +-
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    |  64 ++++-
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.c    | 123 ++++++++++
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.h    |   2 +
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.c  |   3 +-
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.h  |   3 +-
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.c    |   1 +
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.h    |   5 +-
 .../amd/display/dc/dccg/dcn401/dcn401_dccg.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dml2/Makefile  | 141 -----------
 .../gpu/drm/amd/display/dc/dml2_0/Makefile    | 140 +++++++++++
 .../display/dc/{dml2 => dml2_0}/cmntypes.h    |  18 +-
 .../dc/{dml2 => dml2_0}/display_mode_core.c   |   2 +
 .../dc/{dml2 => dml2_0}/display_mode_core.h   |   0
 .../display_mode_core_structs.h               |   3 +-
 .../display_mode_lib_defines.h                |   2 +-
 .../dc/{dml2 => dml2_0}/display_mode_util.c   |   0
 .../dc/{dml2 => dml2_0}/display_mode_util.h   |   2 -
 .../dml21/dml21_translation_helper.c          |   0
 .../dml21/dml21_translation_helper.h          |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_utils.c   |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_utils.h   |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_wrapper.c |   4 +-
 .../dc/{dml2 => dml2_0}/dml21/dml21_wrapper.h |   0
 .../dml21/inc/bounding_boxes/dcn4_soc_bb.h    |   1 -
 .../dml21/inc/dml2_external_lib_deps.h        |   0
 .../dc/{dml2 => dml2_0}/dml21/inc/dml_top.h   |   0
 .../dml21/inc/dml_top_dchub_registers.h       |   0
 .../dml21/inc/dml_top_display_cfg_types.h     |   0
 .../dml21/inc/dml_top_policy_types.h          |   0
 .../dml21/inc/dml_top_soc_parameter_types.h   |   0
 .../dml21/inc/dml_top_types.h                 |   0
 .../dml21/src/dml2_core/dml2_core_dcn4.c      |   1 +
 .../dml21/src/dml2_core/dml2_core_dcn4.h      |   0
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |  29 ++-
 .../src/dml2_core/dml2_core_dcn4_calcs.h      |   0
 .../dml21/src/dml2_core/dml2_core_factory.c   |   0
 .../dml21/src/dml2_core/dml2_core_factory.h   |   0
 .../src/dml2_core/dml2_core_shared_types.h    |   3 +
 .../dml21/src/dml2_core/dml2_core_utils.c     |   0
 .../dml21/src/dml2_core/dml2_core_utils.h     |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c      |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h      |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c   |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.h   |   0
 .../dml21/src/dml2_mcg/dml2_mcg_dcn4.c        |   0
 .../dml21/src/dml2_mcg/dml2_mcg_dcn4.h        |   2 +-
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |   0
 .../dml21/src/dml2_mcg/dml2_mcg_factory.h     |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn3.c        |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn3.h        |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h  |   0
 .../dml21/src/dml2_pmo/dml2_pmo_factory.c     |   0
 .../dml21/src/dml2_pmo/dml2_pmo_factory.h     |   2 +-
 .../lib_float_math.c                          |   0
 .../lib_float_math.h                          |   0
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |   0
 .../dml21/src/dml2_top/dml2_top_legacy.c      |   0
 .../dml21/src/dml2_top/dml2_top_legacy.h      |   0
 .../dml21/src/dml2_top/dml2_top_soc15.c       |   0
 .../dml21/src/dml2_top/dml2_top_soc15.h       |   0
 .../dml21/src/inc/dml2_debug.h                |   0
 .../src/inc/dml2_internal_shared_types.h      |   0
 .../{dml2 => dml2_0}/dml2_dc_resource_mgmt.c  |   0
 .../{dml2 => dml2_0}/dml2_dc_resource_mgmt.h  |   0
 .../dc/{dml2 => dml2_0}/dml2_dc_types.h       |   0
 .../dc/{dml2 => dml2_0}/dml2_internal_types.h |   2 +-
 .../dc/{dml2 => dml2_0}/dml2_mall_phantom.c   |   1 +
 .../dc/{dml2 => dml2_0}/dml2_mall_phantom.h   |   0
 .../display/dc/{dml2 => dml2_0}/dml2_policy.c |   0
 .../display/dc/{dml2 => dml2_0}/dml2_policy.h |   0
 .../dml2_translation_helper.c                 |   3 +
 .../dml2_translation_helper.h                 |   0
 .../display/dc/{dml2 => dml2_0}/dml2_utils.c  |   0
 .../display/dc/{dml2 => dml2_0}/dml2_utils.h  |   0
 .../dc/{dml2 => dml2_0}/dml2_wrapper.c        |   0
 .../dc/{dml2 => dml2_0}/dml2_wrapper.h        |   0
 .../display/dc/{dml2 => dml2_0}/dml_assert.h  |   0
 .../dc/{dml2 => dml2_0}/dml_depedencies.h     |   1 +
 .../dml_display_rq_dlg_calc.c                 |   0
 .../dml_display_rq_dlg_calc.h                 |   0
 .../display/dc/{dml2 => dml2_0}/dml_logging.h |   1 +
 .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h  |   4 +-
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  |  16 ++
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |   2 +
 .../drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c  |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |   1 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c  |   8 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h  |   1 +
 .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c  |   1 +
 .../amd/display/dc/dsc/dcn401/dcn401_dsc.c    |   1 +
 drivers/gpu/drm/amd/display/dc/dsc/dsc.h      |   5 +
 .../display/dc/hubbub/dcn30/dcn30_hubbub.c    |  33 +--
 .../display/dc/hubbub/dcn30/dcn30_hubbub.h    |   6 +-
 .../display/dc/hubbub/dcn31/dcn31_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn32/dcn32_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn35/dcn35_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn401/dcn401_hubbub.c  |   3 +-
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.h    | 136 ++++++++++-
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.h    |   8 +-
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 147 +++++++++---
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.h    |   2 +
 .../amd/display/dc/hubp/dcn31/dcn31_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn32/dcn32_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn35/dcn35_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  |  28 +--
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.h  |   2 +-
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  76 +++---
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |   2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |   4 +-
 .../gpu/drm/amd/display/dc/inc/core_types.h   |   4 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  | 121 +++++++++-
 .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |  12 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h   |  16 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h  |   5 +-
 .../gpu/drm/amd/display/dc/inc/hw/mem_input.h |   2 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h   |  27 +++
 drivers/gpu/drm/amd/display/dc/inc/hw/opp.h   |  13 ++
 .../amd/display/dc/inc/hw/timing_generator.h  | 130 +++++++++++
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c  |  16 ++
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h  |   5 +
 .../drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c  |   1 +
 .../amd/display/dc/mpc/dcn401/dcn401_mpc.c    |   1 +
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.c  |  14 +-
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.h  |   4 +-
 .../amd/display/dc/optc/dcn10/dcn10_optc.h    |  38 ++-
 .../amd/display/dc/optc/dcn31/dcn31_optc.c    | 131 +++++++++++
 .../amd/display/dc/optc/dcn31/dcn31_optc.h    |   2 +
 .../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 +
 .../amd/display/dc/optc/dcn401/dcn401_optc.c  |   1 +
 .../dc/resource/dce100/dce100_resource.c      |   7 +-
 .../dc/resource/dce110/dce110_resource.c      |   5 +-
 .../dc/resource/dce112/dce112_resource.c      |   7 +-
 .../dc/resource/dce120/dce120_resource.c      |   8 +-
 .../dc/resource/dce80/dce80_resource.c        |   8 +-
 .../dc/resource/dcn10/dcn10_resource.c        |   7 +-
 .../dc/resource/dcn20/dcn20_resource.c        |   6 +-
 .../dc/resource/dcn201/dcn201_resource.c      |   6 +-
 .../dc/resource/dcn21/dcn21_resource.c        |   6 +-
 .../dc/resource/dcn30/dcn30_resource.c        |   6 +-
 .../dc/resource/dcn301/dcn301_resource.c      |   6 +-
 .../dc/resource/dcn302/dcn302_resource.c      |   6 +-
 .../dc/resource/dcn303/dcn303_resource.c      |   6 +-
 .../dc/resource/dcn31/dcn31_resource.c        |   6 +-
 .../dc/resource/dcn314/dcn314_resource.c      |   6 +-
 .../dc/resource/dcn315/dcn315_resource.c      |   7 +-
 .../dc/resource/dcn316/dcn316_resource.c      |   6 +-
 .../dc/resource/dcn32/dcn32_resource.c        |   8 +-
 .../dc/resource/dcn321/dcn321_resource.c      |   6 +-
 .../dc/resource/dcn35/dcn35_resource.c        |   8 +-
 .../dc/resource/dcn351/dcn351_resource.c      |   8 +-
 .../dc/resource/dcn36/dcn36_resource.c        |   8 +-
 .../dc/resource/dcn401/dcn401_resource.c      |   8 +-
 .../dcn401/dcn401_soc_and_ip_translator.h     |   2 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  25 ++
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |  12 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c |  50 ++--
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c |  39 ++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.h |   2 +
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  17 +-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |   9 +
 182 files changed, 1920 insertions(+), 530 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/Makefile
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/Makefile
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/cmntypes.h (93%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core_structs.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_lib_defines.h (95%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_util.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_util.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_translation_helper.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_translation_helper.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_utils.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_utils.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_wrapper.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_wrapper.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/bounding_boxes/dcn4_soc_bb.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml2_external_lib_deps.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_dchub_registers.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_display_cfg_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_policy_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_soc_parameter_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4_calcs.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4_calcs.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_factory.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_factory.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_shared_types.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_utils.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_utils.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_factory.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_factory.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_dcn4.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_dcn4.h (97%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_factory.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_factory.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn3.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn3.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_factory.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_factory.h (97%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_standalone_libraries/lib_float_math.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_standalone_libraries/lib_float_math.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_interfaces.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_legacy.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_legacy.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_soc15.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_soc15.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/inc/dml2_debug.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/inc/dml2_internal_shared_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_resource_mgmt.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_resource_mgmt.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_types.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_internal_types.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_mall_phantom.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_mall_phantom.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_policy.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_policy.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_translation_helper.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_translation_helper.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_utils.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_utils.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_wrapper.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_wrapper.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_assert.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_depedencies.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_display_rq_dlg_calc.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_display_rq_dlg_calc.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_logging.h (99%)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 1/20 drm/amd/display: Bump minimum for frame_warn_limit

From: Mario Limonciello <[email protected]>

[Why]
The bigger of CONFIG_FRAME_WARN and frame_warn_limit is used to trigger warnings about large stack frames. The dml_core_mode_support() stack frame has grown to 2056.

[How]
Update frame_warn_limit to 2056 so that CONFIG_FRAME_WARN of 2048 doesn't cause a failure.

---
 drivers/gpu/drm/amd/display/dc/dml2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/Makefile +1 -1
index 4c21ce42054c..4ff0adef233a 100644
@@ -35,7 +35,7 @@ ifneq ($(CONFIG_FRAME_WARN),0)
             frame_warn_limit := 3072
         endif
     else
-        frame_warn_limit := 2048
+        frame_warn_limit := 2056
     endif
 
     ifeq ($(call test-lt, $(CONFIG_FRAME_WARN), $(frame_warn_limit)),y)
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 2/20 drm/amd/display: Fix DMUB reset sequence for DCN32

In reply to waynelin

From: Dillon Varone <[email protected]>

[WHY&HOW]
Backport reset sequence fixes implemented on DCN401 to DCN32 to address stability issues when resetting the DMUB.

---
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c | 50 ++++++++++++-------
 .../drm/amd/display/dmub/src/dmub_dcn401.c    | 17 +++++--
 2 files changed, 45 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn32.c +31 -19
index ce041f6239dc..7e9856289910 100644
@@ -89,50 +89,58 @@ static inline void dmub_dcn32_translate_addr(const union dmub_addr *addr_in,
 void dmub_dcn32_reset(struct dmub_srv *dmub)
 {
 	union dmub_gpint_data_register cmd;
-	const uint32_t timeout = 100000;
-	uint32_t in_reset, is_enabled, scratch, i, pwait_mode;
+	const uint32_t timeout_us = 1 * 1000 * 1000; //1s
+	const uint32_t poll_delay_us = 1; //1us
+	uint32_t i = 0;
+	uint32_t enabled, in_reset, scratch, pwait_mode;
 
-	REG_GET(DMCUB_CNTL2, DMCUB_SOFT_RESET, &in_reset);
-	REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_enabled);
+	REG_GET(DMCUB_CNTL,
+			DMCUB_ENABLE, &enabled);
+	REG_GET(DMCUB_CNTL2,
+			DMCUB_SOFT_RESET, &in_reset);
 
-	if (in_reset == 0 && is_enabled != 0) {
+	if (enabled && in_reset == 0) {
 		cmd.bits.status = 1;
 		cmd.bits.command_code = DMUB_GPINT__STOP_FW;
 		cmd.bits.param = 0;
 
 		dmub->hw_funcs.set_gpint(dmub, cmd);
 
-		for (i = 0; i < timeout; ++i) {
-			if (dmub->hw_funcs.is_gpint_acked(dmub, cmd))
-				break;
-
-			udelay(1);
-		}
-
-		for (i = 0; i < timeout; ++i) {
+		for (; i < timeout_us; i++) {
 			scratch = REG_READ(DMCUB_SCRATCH7);
 			if (scratch == DMUB_GPINT__STOP_FW_RESPONSE)
 				break;
 
-			udelay(1);
+			udelay(poll_delay_us);
 		}
 
-		for (i = 0; i < timeout; ++i) {
+		for (; i < timeout_us; i++) {
 			REG_GET(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS, &pwait_mode);
 			if (pwait_mode & (1 << 0))
 				break;
 
-			udelay(1);
+			udelay(poll_delay_us);
 		}
-		/* Force reset in case we timed out, DMCUB is likely hung. */
 	}
 
-	if (is_enabled) {
+	if (enabled) {
 		REG_UPDATE(DMCUB_CNTL2, DMCUB_SOFT_RESET, 1);
 		udelay(1);
 		REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
 	}
 
+	if (i >= timeout_us) {
+		/* timeout should never occur */
+		BREAK_TO_DEBUGGER();
+	}
+
+	REG_UPDATE(DMCUB_REGION3_CW2_TOP_ADDRESS, DMCUB_REGION3_CW2_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW3_TOP_ADDRESS, DMCUB_REGION3_CW3_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW4_TOP_ADDRESS, DMCUB_REGION3_CW4_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW5_TOP_ADDRESS, DMCUB_REGION3_CW5_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW7_TOP_ADDRESS, DMCUB_REGION3_CW7_ENABLE, 0);
+
 	REG_WRITE(DMCUB_INBOX1_RPTR, 0);
 	REG_WRITE(DMCUB_INBOX1_WPTR, 0);
 	REG_WRITE(DMCUB_OUTBOX1_RPTR, 0);
@@ -141,7 +149,7 @@ void dmub_dcn32_reset(struct dmub_srv *dmub)
 	REG_WRITE(DMCUB_OUTBOX0_WPTR, 0);
 	REG_WRITE(DMCUB_SCRATCH0, 0);
 
-	/* Clear the GPINT command manually so we don't send anything during boot. */
+	/* Clear the GPINT command manually so we don't reset again. */
 	cmd.all = 0;
 	dmub->hw_funcs.set_gpint(dmub, cmd);
 }
@@ -163,7 +171,9 @@ void dmub_dcn32_backdoor_load(struct dmub_srv *dmub,
 
 	dmub_dcn32_get_fb_base_offset(dmub, &fb_base, &fb_offset);
 
+	/* reset and disable DMCUB and MMHUBBUB DMUIF */
 	REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
+	REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
 
 	dmub_dcn32_translate_addr(&cw0->offset, fb_base, fb_offset, &offset);
 
@@ -193,7 +203,9 @@ void dmub_dcn32_backdoor_load_zfb_mode(struct dmub_srv *dmub,
 {
 	union dmub_addr offset;
 
+	/* reset and disable DMCUB and MMHUBBUB DMUIF */
 	REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
+	REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
 
 	offset = cw0->offset;
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +14 -3
index b31adbd0d685..95542299e3b3 100644
@@ -81,7 +81,7 @@ void dmub_dcn401_reset(struct dmub_srv *dmub)
 		dmub->hw_funcs.set_gpint(dmub, cmd);
 
 		for (; i < timeout_us; i++) {
-			scratch = dmub->hw_funcs.get_gpint_response(dmub);
+			scratch = REG_READ(DMCUB_SCRATCH7);
 			if (scratch == DMUB_GPINT__STOP_FW_RESPONSE)
 				break;
 
@@ -97,11 +97,24 @@ void dmub_dcn401_reset(struct dmub_srv *dmub)
 		}
 	}
 
+	if (enabled) {
+		REG_UPDATE(DMCUB_CNTL2, DMCUB_SOFT_RESET, 1);
+		udelay(1);
+		REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
+	}
+
 	if (i >= timeout_us) {
 		/* timeout should never occur */
 		BREAK_TO_DEBUGGER();
 	}
 
+	REG_UPDATE(DMCUB_REGION3_CW2_TOP_ADDRESS, DMCUB_REGION3_CW2_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW3_TOP_ADDRESS, DMCUB_REGION3_CW3_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW4_TOP_ADDRESS, DMCUB_REGION3_CW4_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW5_TOP_ADDRESS, DMCUB_REGION3_CW5_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW6_TOP_ADDRESS, DMCUB_REGION3_CW6_ENABLE, 0);
+	REG_UPDATE(DMCUB_REGION3_CW7_TOP_ADDRESS, DMCUB_REGION3_CW7_ENABLE, 0);
+
 	REG_WRITE(DMCUB_INBOX1_RPTR, 0);
 	REG_WRITE(DMCUB_INBOX1_WPTR, 0);
 	REG_WRITE(DMCUB_OUTBOX1_RPTR, 0);
@@ -134,7 +147,6 @@ void dmub_dcn401_backdoor_load(struct dmub_srv *dmub,
 
 	/* reset and disable DMCUB and MMHUBBUB DMUIF */
 	REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
-	REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
 	REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
 
 	dmub_dcn401_translate_addr(&cw0->offset, fb_base, fb_offset, &offset);
@@ -168,7 +180,6 @@ void dmub_dcn401_backdoor_load_zfb_mode(struct dmub_srv *dmub,
 
 	/* reset and disable DMCUB and MMHUBBUB DMUIF */
 	REG_UPDATE(DMCUB_SEC_CNTL, DMCUB_SEC_RESET, 1);
-	REG_UPDATE(MMHUBBUB_SOFT_RESET, DMUIF_SOFT_RESET, 1);
 	REG_UPDATE(DMCUB_CNTL, DMCUB_ENABLE, 0);
 
 	offset = cw0->offset;
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 3/20 drm/amd/display: Add opp count validation to dml2.1

In reply to waynelin

From: Dmytro Laktyushkin <[email protected]>

Newer asics can have mismatching dpp and opp counts and dml needs to account for this.

---
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c |  1 +
 .../src/dml2_core/dml2_core_dcn4_calcs.c      | 27 ++++++++++++++++---
 .../src/dml2_core/dml2_core_shared_types.h    |  3 +++
 3 files changed, 28 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c +1 -0
index 6ee37386f672..eba948e187c1 100644
@@ -28,6 +28,7 @@ struct dml2_core_ip_params core_dcn4_ip_caps_base = {
 	.writeback_interface_buffer_size_kbytes = 90,
 	//Number of pipes after DCN Pipe harvesting
 	.max_num_dpp = 4,
+	.max_num_opp = 4,
 	.max_num_otg = 4,
 	.max_num_wb = 1,
 	.max_dchub_pscl_bw_pix_per_clk = 4,
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +24 -3
index 4ccdb179b001..f16792f79bef 100644
@@ -4047,7 +4047,9 @@ static bool ValidateODMMode(enum dml2_odm_mode ODMMode,
 	bool UseDSC,
 	unsigned int NumberOfDSCSlices,
 	unsigned int TotalNumberOfActiveDPP,
+	unsigned int TotalNumberOfActiveOPP,
 	unsigned int MaxNumDPP,
+	unsigned int MaxNumOPP,
 	double DISPCLKRequired,
 	unsigned int NumberOfDPPRequired,
 	unsigned int MaxHActiveForDSC,
@@ -4063,7 +4065,7 @@ static bool ValidateODMMode(enum dml2_odm_mode ODMMode,
 
 	if (DISPCLKRequired > MaxDispclk)
 		return false;
-	if ((TotalNumberOfActiveDPP + NumberOfDPPRequired) > MaxNumDPP)
+	if ((TotalNumberOfActiveDPP + NumberOfDPPRequired) > MaxNumDPP || (TotalNumberOfActiveOPP + NumberOfDPPRequired) > MaxNumOPP)
 		return false;
 	if (are_odm_segments_symmetrical) {
 		if (HActive % (NumberOfDPPRequired * pixels_per_clock_cycle))
@@ -4109,7 +4111,9 @@ static noinline_for_stack void CalculateODMMode(
 	double MaxDispclk,
 	bool DSCEnable,
 	unsigned int TotalNumberOfActiveDPP,
+	unsigned int TotalNumberOfActiveOPP,
 	unsigned int MaxNumDPP,
+	unsigned int MaxNumOPP,
 	double PixelClock,
 	unsigned int NumberOfDSCSlices,
 
@@ -4179,7 +4183,9 @@ static noinline_for_stack void CalculateODMMode(
 			UseDSC,
 			NumberOfDSCSlices,
 			TotalNumberOfActiveDPP,
+			TotalNumberOfActiveOPP,
 			MaxNumDPP,
+			MaxNumOPP,
 			DISPCLKRequired,
 			NumberOfDPPRequired,
 			MaxHActiveForDSC,
@@ -8358,6 +8364,7 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 	CalculateSwathAndDETConfiguration(&mode_lib->scratch, CalculateSwathAndDETConfiguration_params);
 
 	mode_lib->ms.TotalNumberOfActiveDPP = 0;
+	mode_lib->ms.TotalNumberOfActiveOPP = 0;
 	mode_lib->ms.support.TotalAvailablePipesSupport = true;
 
 	for (k = 0; k < mode_lib->ms.num_active_planes; ++k) {
@@ -8393,7 +8400,9 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 			mode_lib->ms.max_dispclk_freq_mhz,
 			false, // DSCEnable
 			mode_lib->ms.TotalNumberOfActiveDPP,
+			mode_lib->ms.TotalNumberOfActiveOPP,
 			mode_lib->ip.max_num_dpp,
+			mode_lib->ip.max_num_opp,
 			((double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.pixel_clock_khz / 1000),
 			mode_lib->ms.support.NumberOfDSCSlices[k],
 
@@ -8412,7 +8421,9 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 			mode_lib->ms.max_dispclk_freq_mhz,
 			true, // DSCEnable
 			mode_lib->ms.TotalNumberOfActiveDPP,
+			mode_lib->ms.TotalNumberOfActiveOPP,
 			mode_lib->ip.max_num_dpp,
+			mode_lib->ip.max_num_opp,
 			((double)display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].timing.pixel_clock_khz / 1000),
 			mode_lib->ms.support.NumberOfDSCSlices[k],
 
@@ -8516,20 +8527,23 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 	for (k = 0; k < mode_lib->ms.num_active_planes; ++k) {
 		mode_lib->ms.MPCCombine[k] = false;
 		mode_lib->ms.NoOfDPP[k] = 1;
+		mode_lib->ms.NoOfOPP[k] = 1;
 
 		if (mode_lib->ms.ODMMode[k] == dml2_odm_mode_combine_4to1) {
 			mode_lib->ms.MPCCombine[k] = false;
 			mode_lib->ms.NoOfDPP[k] = 4;
+			mode_lib->ms.NoOfOPP[k] = 4;
 		} else if (mode_lib->ms.ODMMode[k] == dml2_odm_mode_combine_3to1) {
 			mode_lib->ms.MPCCombine[k] = false;
 			mode_lib->ms.NoOfDPP[k] = 3;
+			mode_lib->ms.NoOfOPP[k] = 3;
 		} else if (mode_lib->ms.ODMMode[k] == dml2_odm_mode_combine_2to1) {
 			mode_lib->ms.MPCCombine[k] = false;
 			mode_lib->ms.NoOfDPP[k] = 2;
+			mode_lib->ms.NoOfOPP[k] = 2;
 		} else if (display_cfg->plane_descriptors[k].overrides.mpcc_combine_factor == 2) {
 			mode_lib->ms.MPCCombine[k] = true;
 			mode_lib->ms.NoOfDPP[k] = 2;
-			mode_lib->ms.TotalNumberOfActiveDPP++;
 		} else if (display_cfg->plane_descriptors[k].overrides.mpcc_combine_factor == 1) {
 			mode_lib->ms.MPCCombine[k] = false;
 			mode_lib->ms.NoOfDPP[k] = 1;
@@ -8540,7 +8554,6 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 			if ((mode_lib->ms.MinDPPCLKUsingSingleDPP[k] > mode_lib->ms.max_dppclk_freq_mhz) || !mode_lib->ms.SingleDPPViewportSizeSupportPerSurface[k]) {
 				mode_lib->ms.MPCCombine[k] = true;
 				mode_lib->ms.NoOfDPP[k] = 2;
-				mode_lib->ms.TotalNumberOfActiveDPP++;
 			}
 		}
 #if defined(__DML_VBA_DEBUG__)
@@ -8548,8 +8561,16 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out
 #endif
 	}
 
+	mode_lib->ms.TotalNumberOfActiveDPP = 0;
+	mode_lib->ms.TotalNumberOfActiveOPP = 0;
+	for (k = 0; k < mode_lib->ms.num_active_planes; ++k) {
+		mode_lib->ms.TotalNumberOfActiveDPP += mode_lib->ms.NoOfDPP[k];
+		mode_lib->ms.TotalNumberOfActiveOPP += mode_lib->ms.NoOfOPP[k];
+	}
 	if (mode_lib->ms.TotalNumberOfActiveDPP > (unsigned int)mode_lib->ip.max_num_dpp)
 		mode_lib->ms.support.TotalAvailablePipesSupport = false;
+	if (mode_lib->ms.TotalNumberOfActiveOPP > (unsigned int)mode_lib->ip.max_num_opp)
+		mode_lib->ms.support.TotalAvailablePipesSupport = false;
 
 
 	mode_lib->ms.TotalNumberOfSingleDPPSurfaces = 0;
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h +3 -0
index ff1c47347610..051c31ec2f0e 100644
@@ -36,6 +36,7 @@ struct dml2_core_ip_params {
 	unsigned int max_line_buffer_lines;
 	unsigned int writeback_interface_buffer_size_kbytes;
 	unsigned int max_num_dpp;
+	unsigned int max_num_opp;
 	unsigned int max_num_otg;
 	unsigned int TDLUT_33cube_count;
 	unsigned int max_num_wb;
@@ -570,6 +571,7 @@ struct dml2_core_internal_mode_support {
 	enum dml2_odm_mode ODMMode[DML2_MAX_PLANES];
 	unsigned int SurfaceSizeInMALL[DML2_MAX_PLANES];
 	unsigned int NoOfDPP[DML2_MAX_PLANES];
+	unsigned int NoOfOPP[DML2_MAX_PLANES];
 	bool MPCCombine[DML2_MAX_PLANES];
 	double dcfclk_deepsleep;
 	double MinDPPCLKUsingSingleDPP[DML2_MAX_PLANES];
@@ -580,6 +582,7 @@ struct dml2_core_internal_mode_support {
 	bool PTEBufferSizeNotExceeded[DML2_MAX_PLANES];
 	bool DCCMetaBufferSizeNotExceeded[DML2_MAX_PLANES];
 	unsigned int TotalNumberOfActiveDPP;
+	unsigned int TotalNumberOfActiveOPP;
 	unsigned int TotalNumberOfSingleDPPSurfaces;
 	unsigned int TotalNumberOfDCCActiveDPP;
 	unsigned int Total3dlutActive;
Signature · 1 line
2.43.0
author
#4 lore raw

PATCH 4/20 drm/amd/display: Fix wrong index for DCN401 cursor offload

In reply to waynelin

From: Nicholas Kazlauskas <[email protected]>

[Why]
Payloads are ignored because the wrong index is written as part of the pipe update implementation for DCN401.

[How]
Align it to the DCN35 implementation and ensure the + 1 is added.

---
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -1
index 23ecab4bcbba..b9c357a40707 100644
@@ -2978,7 +2978,7 @@ void dcn401_update_cursor_offload_pipe(struct dc *dc, const struct pipe_ctx *pip
 		return;
 
 	stream_idx = top_pipe->pipe_idx;
-	write_idx = cs->offload_streams[stream_idx].write_idx;
+	write_idx = cs->offload_streams[stream_idx].write_idx + 1; /*  new payload (+1) */
 	payload_idx = write_idx % ARRAY_SIZE(cs->offload_streams[stream_idx].payloads);
 
 	p = &cs->offload_streams[stream_idx].payloads[payload_idx].pipe_data[pipe->pipe_idx].dcn401;
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH 5/20 drm/amd/display: Fix notification of vtotal to DMU for cursor offload

In reply to waynelin

From: Nicholas Kazlauskas <[email protected]>

[Why]
It was placed after the early return and the notification is never sent.

[How]
Place it after .set_drr and before the return.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -3
index 4c964cf28f68..c4ef63011f47 100644
@@ -493,13 +493,14 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
 					1,
 					*adjust);
 			stream->adjust.timing_adjust_pending = false;
+
+			if (dc->hwss.notify_cursor_offload_drr_update)
+				dc->hwss.notify_cursor_offload_drr_update(dc, dc->current_state, stream);
+
 			return true;
 		}
 	}
 
-	if (dc->hwss.notify_cursor_offload_drr_update)
-		dc->hwss.notify_cursor_offload_drr_update(dc, dc->current_state, stream);
-
 	return false;
 }
 
Signature · 1 line
2.43.0
author
#6 lore raw

PATCH 6/20 drm/amd/display: Add dml2_0 folder

In reply to waynelin

From: Austin Zheng <[email protected]>

[Why]
dml2 folder contains all logic for all versions of DML2 This is currently DML2.0 and DML2.1.
Add dml2_0 folder to reflect this better (dml2_0 for DML2.0). dml2_0 folder will eventually replace the dml2 folder

[How]
Copy dml2 folder and rename it as dml2_0

---
 .../gpu/drm/amd/display/dc/dml2_0/Makefile    |   140 +
 .../gpu/drm/amd/display/dc/dml2_0/cmntypes.h  |    94 +
 .../amd/display/dc/dml2_0/display_mode_core.c | 10337 ++++++++++++
 .../amd/display/dc/dml2_0/display_mode_core.h |   204 +
 .../dc/dml2_0/display_mode_core_structs.h     |  2032 +++
 .../dc/dml2_0/display_mode_lib_defines.h      |    79 +
 .../amd/display/dc/dml2_0/display_mode_util.c |   798 +
 .../amd/display/dc/dml2_0/display_mode_util.h |    74 +
 .../dml2_0/dml21/dml21_translation_helper.c   |   929 ++
 .../dml2_0/dml21/dml21_translation_helper.h   |    28 +
 .../amd/display/dc/dml2_0/dml21/dml21_utils.c |   516 +
 .../amd/display/dc/dml2_0/dml21/dml21_utils.h |    50 +
 .../display/dc/dml2_0/dml21/dml21_wrapper.c   |   466 +
 .../display/dc/dml2_0/dml21/dml21_wrapper.h   |   135 +
 .../dml21/inc/bounding_boxes/dcn4_soc_bb.h    |   372 +
 .../dml2_0/dml21/inc/dml2_external_lib_deps.h |    10 +
 .../amd/display/dc/dml2_0/dml21/inc/dml_top.h |    46 +
 .../dml21/inc/dml_top_dchub_registers.h       |   189 +
 .../dml21/inc/dml_top_display_cfg_types.h     |   520 +
 .../dml2_0/dml21/inc/dml_top_policy_types.h   |    13 +
 .../dml21/inc/dml_top_soc_parameter_types.h   |   215 +
 .../dc/dml2_0/dml21/inc/dml_top_types.h       |   750 +
 .../dml21/src/dml2_core/dml2_core_dcn4.c      |   661 +
 .../dml21/src/dml2_core/dml2_core_dcn4.h      |    12 +
 .../src/dml2_core/dml2_core_dcn4_calcs.c      | 13341 ++++++++++++++++
 .../src/dml2_core/dml2_core_dcn4_calcs.h      |    39 +
 .../dml21/src/dml2_core/dml2_core_factory.c   |    39 +
 .../dml21/src/dml2_core/dml2_core_factory.h   |    13 +
 .../src/dml2_core/dml2_core_shared_types.h    |  2335 +++
 .../dml21/src/dml2_core/dml2_core_utils.c     |   786 +
 .../dml21/src/dml2_core/dml2_core_utils.h     |    43 +
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c      |   785 +
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h      |    14 +
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c   |    50 +
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.h   |    13 +
 .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c |   198 +
 .../dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h |    13 +
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |    39 +
 .../dml21/src/dml2_mcg/dml2_mcg_factory.h     |    13 +
 .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.c |   706 +
 .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.h |    22 +
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |  2394 +++
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h  |    33 +
 .../dml21/src/dml2_pmo/dml2_pmo_factory.c     |    83 +
 .../dml21/src/dml2_pmo/dml2_pmo_factory.h     |    13 +
 .../lib_float_math.c                          |   147 +
 .../lib_float_math.h                          |    25 +
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |    49 +
 .../dml21/src/dml2_top/dml2_top_legacy.c      |    10 +
 .../dml21/src/dml2_top/dml2_top_legacy.h      |     9 +
 .../dml21/src/dml2_top/dml2_top_soc15.c       |  1170 ++
 .../dml21/src/dml2_top/dml2_top_soc15.h       |    14 +
 .../dc/dml2_0/dml21/src/inc/dml2_debug.h      |   189 +
 .../src/inc/dml2_internal_shared_types.h      |  1004 ++
 .../display/dc/dml2_0/dml2_dc_resource_mgmt.c |  1174 ++
 .../display/dc/dml2_0/dml2_dc_resource_mgmt.h |    52 +
 .../drm/amd/display/dc/dml2_0/dml2_dc_types.h |    43 +
 .../display/dc/dml2_0/dml2_internal_types.h   |   157 +
 .../amd/display/dc/dml2_0/dml2_mall_phantom.c |   911 ++
 .../amd/display/dc/dml2_0/dml2_mall_phantom.h |    52 +
 .../drm/amd/display/dc/dml2_0/dml2_policy.c   |   311 +
 .../drm/amd/display/dc/dml2_0/dml2_policy.h   |    47 +
 .../dc/dml2_0/dml2_translation_helper.c       |  1528 ++
 .../dc/dml2_0/dml2_translation_helper.h       |    41 +
 .../drm/amd/display/dc/dml2_0/dml2_utils.c    |   560 +
 .../drm/amd/display/dc/dml2_0/dml2_utils.h    |   149 +
 .../drm/amd/display/dc/dml2_0/dml2_wrapper.c  |   704 +
 .../drm/amd/display/dc/dml2_0/dml2_wrapper.h  |   309 +
 .../drm/amd/display/dc/dml2_0/dml_assert.h    |    32 +
 .../amd/display/dc/dml2_0/dml_depedencies.h   |    34 +
 .../dc/dml2_0/dml_display_rq_dlg_calc.c       |   573 +
 .../dc/dml2_0/dml_display_rq_dlg_calc.h       |    63 +
 .../drm/amd/display/dc/dml2_0/dml_logging.h   |    32 +
 73 files changed, 49031 insertions(+)
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/Makefile
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/cmntypes.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core_structs.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_lib_defines.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn4_soc_bb.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml2_external_lib_deps.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_dchub_registers.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_policy_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_legacy.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_legacy.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_debug.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_internal_shared_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_internal_types.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_policy.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_policy.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml_assert.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml_depedencies.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml_display_rq_dlg_calc.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml_display_rq_dlg_calc.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml_logging.h
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile new file +140 -0
new file mode 100644
index 000000000000..97e068b6bf6b
@@ -0,0 +1,140 @@
+# SPDX-License-Identifier: MIT */
+#
+# Copyright 2023 Advanced Micro Devices, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+#
+# Authors: AMD
+#
+# Makefile for dml2.
+
+dml2_ccflags := $(CC_FLAGS_FPU)
+dml2_rcflags := $(CC_FLAGS_NO_FPU)
+
+ifneq ($(CONFIG_FRAME_WARN),0)
+    ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
+        ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_COMPILE_TEST),yy)
+            frame_warn_limit := 4096
+        else
+            frame_warn_limit := 3072
+        endif
+    else
+        frame_warn_limit := 2056
+    endif
+
+    ifeq ($(call test-lt, $(CONFIG_FRAME_WARN), $(frame_warn_limit)),y)
+        frame_warn_flag := -Wframe-larger-than=$(frame_warn_limit)
+    endif
+endif
+
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_core
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_mcg/
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_dpmm/
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_pmo/
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_standalone_libraries/
+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.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)
+
+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.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)
+
+DML2 = display_mode_core.o display_mode_util.o dml2_wrapper.o \
+		dml2_utils.o dml2_policy.o dml2_translation_helper.o dml2_dc_resource_mgmt.o dml2_mall_phantom.o \
+		dml_display_rq_dlg_calc.o
+
+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_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/src/dml21_wrapper.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_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/src/dml21_wrapper.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
+DML21 += src/dml2_core/dml2_core_utils.o
+DML21 += src/dml2_core/dml2_core_factory.o
+DML21 += src/dml2_core/dml2_core_dcn4_calcs.o
+DML21 += src/dml2_dpmm/dml2_dpmm_dcn4.o
+DML21 += src/dml2_dpmm/dml2_dpmm_factory.o
+DML21 += src/dml2_mcg/dml2_mcg_dcn4.o
+DML21 += src/dml2_mcg/dml2_mcg_factory.o
+DML21 += src/dml2_pmo/dml2_pmo_dcn3.o
+DML21 += src/dml2_pmo/dml2_pmo_factory.o
+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_utils.o
+
+AMD_DAL_DML21 = $(addprefix $(AMDDALPATH)/dc/dml2_0/dml21/,$(DML21))
+
+AMD_DISPLAY_FILES += $(AMD_DAL_DML21)
drivers/gpu/drm/amd/display/dc/dml2_0/cmntypes.h new file +94 -0

94 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c new file +10337 -0

2,766 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.h new file +204 -0

204 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core_structs.h new file +2032 -0

2,032 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_lib_defines.h new file +79 -0

79 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c new file +798 -0

798 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.h new file +74 -0

74 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c new file +929 -0

929 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.h new file +28 -0
new file mode 100644
index 000000000000..9880d3e0398e

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c new file +516 -0

516 lines not on this page · raw message

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

50 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c new file +466 -0

466 lines not on this page · raw message

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

135 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn4_soc_bb.h new file +372 -0

372 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml2_external_lib_deps.h new file +10 -0
new file mode 100644
index 000000000000..281d7ad230d8

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top.h new file +46 -0

46 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_dchub_registers.h new file +189 -0

189 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h new file +520 -0

520 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_policy_types.h new file +13 -0
new file mode 100644
index 000000000000..8f624a912e78

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h new file +215 -0

215 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_types.h new file +750 -0

750 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c new file +661 -0

661 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.h new file +12 -0
new file mode 100644
index 000000000000..a68bb001a346

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c new file +13341 -0

13,341 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.h new file +39 -0
new file mode 100644
index 000000000000..27ef0e096b25

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c new file +39 -0
new file mode 100644
index 000000000000..cc4f0663c6d6

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.h new file +13 -0
new file mode 100644
index 000000000000..411c514fe65c

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h new file +2335 -0

2,335 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c new file +786 -0

786 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h new file +43 -0

43 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c new file +785 -0

785 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h new file +14 -0
new file mode 100644
index 000000000000..e7b58f2efda4

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c new file +50 -0

50 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.h new file +13 -0
new file mode 100644
index 000000000000..20ba2e446f1d

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.c new file +198 -0

198 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_dcn4.h new file +13 -0
new file mode 100644
index 000000000000..f54fde8fba90

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c new file +39 -0
new file mode 100644
index 000000000000..c60b8fe90819

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.h new file +13 -0
new file mode 100644
index 000000000000..ad307deca3b0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.c new file +706 -0

706 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn3.h new file +22 -0
new file mode 100644
index 000000000000..f00bd9e72a86

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c new file +2394 -0

2,394 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h new file +33 -0
new file mode 100644
index 000000000000..6baab7ad6ecc

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.c new file +83 -0

83 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.h new file +13 -0
new file mode 100644
index 000000000000..b90f6263cd85

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.c new file +147 -0

147 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/lib_float_math.h new file +25 -0
new file mode 100644
index 000000000000..e13b0c5939b0

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c new file +49 -0

49 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_legacy.c new file +10 -0
new file mode 100644
index 000000000000..5e14d85821e2

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_legacy.h new file +9 -0
new file mode 100644
index 000000000000..14d0ae03dce6

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.c new file +1170 -0

1,170 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_soc15.h new file +14 -0
new file mode 100644
index 000000000000..53bd8602f9ef

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_debug.h new file +189 -0

189 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_internal_shared_types.h new file +1004 -0

1,004 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c new file +1174 -0

1,174 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.h new file +52 -0

52 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_types.h new file +43 -0

43 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_internal_types.h new file +157 -0

157 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.c new file +911 -0

911 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_mall_phantom.h new file +52 -0

52 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_policy.c new file +311 -0

311 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_policy.h new file +47 -0

47 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.c new file +1528 -0

1,528 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_translation_helper.h new file +41 -0

41 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.c new file +560 -0

560 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_utils.h new file +149 -0

149 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c new file +704 -0

704 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.h new file +309 -0

309 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml_assert.h new file +32 -0
new file mode 100644
index 000000000000..17f0972b1af7

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml_depedencies.h new file +34 -0
new file mode 100644
index 000000000000..d459f93cf40b

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

drivers/gpu/drm/amd/display/dc/dml2_0/dml_display_rq_dlg_calc.c new file +573 -0

573 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml_display_rq_dlg_calc.h new file +63 -0

63 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2_0/dml_logging.h new file +32 -0
new file mode 100644
index 000000000000..7fadbe6d7af4

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.

author
#7 lore raw

PATCH 7/20 drm/amd/display: Update dml2 references to use dml2_0 folder

In reply to waynelin

From: Austin Zheng <[email protected]>

[Why & How]
To switch to use dml2_0 folder, change all DML2 references to use the dml2_0 folder instead of the dml2 folder.

---
 drivers/gpu/drm/amd/display/dc/Makefile                       | 2 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c                      | 2 +-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c             | 2 +-
 drivers/gpu/drm/amd/display/dc/core/dc_state.c                | 4 ++--
 drivers/gpu/drm/amd/display/dc/dc.h                           | 2 +-
 drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h      | 2 +-
 drivers/gpu/drm/amd/display/dc/inc/core_types.h               | 4 ++--
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h                  | 4 ++--
 drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h             | 2 +-
 .../gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c    | 2 +-
 .../gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c    | 2 +-
 .../gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c  | 2 +-
 .../gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c    | 2 +-
 .../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c  | 2 +-
 .../dcn401/dcn401_soc_and_ip_translator.h                     | 2 +-
 15 files changed, 18 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/Makefile +1 -1
index dc943abd6dba..7277ed21552f 100644
@@ -36,7 +36,7 @@ DC_LIBS += dcn30
 DC_LIBS += dcn301
 DC_LIBS += dcn31
 DC_LIBS += dml
-DC_LIBS += dml2
+DC_LIBS += dml2_0
 DC_LIBS += soc_and_ip_translator
 endif
 
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index c4ef63011f47..246ea9754810 100644
@@ -83,7 +83,7 @@
 #include "hw_sequencer_private.h"
 
 #if defined(CONFIG_DRM_AMD_DC_FP)
-#include "dml2/dml2_internal_types.h"
+#include "dml2_0/dml2_internal_types.h"
 #include "soc_and_ip_translator.h"
 #endif
 
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
index bc5dedf5f60c..8d0cdbf14e17 100644
@@ -95,7 +95,7 @@
 #define DC_LOGGER \
 	dc->ctx->logger
 #define DC_LOGGER_INIT(logger)
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #define UNABLE_TO_SPLIT -1
 
drivers/gpu/drm/amd/display/dc/core/dc_state.c +2 -2
index c61300a7cb1c..2de8ef4a58ec 100644
@@ -35,8 +35,8 @@
 #include "link_enc_cfg.h"
 
 #if defined(CONFIG_DRM_AMD_DC_FP)
-#include "dml2/dml2_wrapper.h"
-#include "dml2/dml2_internal_types.h"
+#include "dml2_0/dml2_wrapper.h"
+#include "dml2_0/dml2_internal_types.h"
 #endif
 
 #define DC_LOGGER \
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 14fca9dfe272..769b2c2f9d7f 100644
@@ -42,7 +42,7 @@
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
 
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #include "dmub/inc/dmub_cmd.h"
 
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h +1 -1
index fdabbeec8ffa..4570b8016de5 100644
@@ -31,7 +31,7 @@
 #include "dcn30/dcn30_hubp.h"
 #include "dcn31/dcn31_hubp.h"
 #include "dcn32/dcn32_hubp.h"
-#include "dml2/dml21/inc/dml_top_dchub_registers.h"
+#include "dml2_0/dml21/inc/dml_top_dchub_registers.h"
 
 #define HUBP_3DLUT_FL_REG_LIST_DCN401(inst)\
 	SRI_ARR_US(_3DLUT_FL_CONFIG, HUBP, inst),\
drivers/gpu/drm/amd/display/dc/inc/core_types.h +2 -2
index d11893f8c916..3fe590436e74 100644
@@ -58,8 +58,8 @@
 #include "transform.h"
 #include "dpp.h"
 
-#include "dml2/dml21/inc/dml_top_dchub_registers.h"
-#include "dml2/dml21/inc/dml_top_types.h"
+#include "dml2_0/dml21/inc/dml_top_dchub_registers.h"
+#include "dml2_0/dml21/inc/dml_top_types.h"
 
 struct resource_pool;
 struct dc_state;
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +2 -2
index b0c13b506c11..c62c4c1ed7c3 100644
@@ -41,8 +41,8 @@
 #include "mem_input.h"
 #include "cursor_reg_cache.h"
 
-#include "dml2/dml21/inc/dml_top_dchub_registers.h"
-#include "dml2/dml21/inc/dml_top_types.h"
+#include "dml2_0/dml21/inc/dml_top_dchub_registers.h"
+#include "dml2_0/dml21/inc/dml_top_types.h"
 
 #define OPP_ID_INVALID 0xf
 #define MAX_TTU 0xffffff
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h +1 -1
index 42fbc70f7056..d468bc85566a 100644
@@ -29,7 +29,7 @@
 #include "include/grph_object_id.h"
 
 #include "dml/display_mode_structs.h"
-#include "dml2/dml21/inc/dml_top_dchub_registers.h"
+#include "dml2_0/dml21/inc/dml_top_dchub_registers.h"
 
 struct dchub_init_data;
 struct cstate_pstate_watermarks_st {
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -1
index 3965a7f1b64b..4c2e8aa96d1f 100644
@@ -92,7 +92,7 @@
 
 #include "dc_state_priv.h"
 
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #define DC_LOGGER_INIT(logger)
 
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
index fff57f23f4f7..3a83a63d2116 100644
@@ -33,7 +33,7 @@
 #include "resource.h"
 #include "include/irq_service_interface.h"
 #include "dcn35_resource.h"
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #include "dcn20/dcn20_resource.h"
 #include "dcn30/dcn30_resource.h"
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -1
index 0abd163b425e..d00cc4030be3 100644
@@ -83,7 +83,7 @@
 #include "vm_helper.h"
 #include "dcn20/dcn20_vmid.h"
 
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #include "link_enc_cfg.h"
 #define DC_LOGGER_INIT(logger)
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -1
index ca125ee6c2fb..f4b28617b2de 100644
@@ -11,7 +11,7 @@
 #include "resource.h"
 #include "include/irq_service_interface.h"
 #include "dcn36_resource.h"
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #include "dcn20/dcn20_resource.h"
 #include "dcn30/dcn30_resource.h"
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +1 -1
index 1d18807e4749..8e2d3781752c 100644
@@ -73,7 +73,7 @@
 
 #include "dc_state_priv.h"
 
-#include "dml2/dml2_wrapper.h"
+#include "dml2_0/dml2_wrapper.h"
 
 #define DC_LOGGER_INIT(logger)
 
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h +1 -1
index 21d842857601..88c11b6be004 100644
@@ -9,7 +9,7 @@
 #include "dc.h"
 #include "clk_mgr.h"
 #include "soc_and_ip_translator.h"
-#include "dml2/dml21/inc/dml_top_soc_parameter_types.h"
+#include "dml2_0/dml21/inc/dml_top_soc_parameter_types.h"
 
 void dcn401_construct_soc_and_ip_translator(struct soc_and_ip_translator *soc_and_ip_translator);
 
Signature · 1 line
2.43.0
author
#8 lore raw

PATCH 8/20 drm/amd/display: Remove dml2 Folder.

In reply to waynelin

From: Austin Zheng <[email protected]>

[Why/How]
dml2_0 is replacing the dml2 folder. dml2 folder can be removed

---
 drivers/gpu/drm/amd/display/dc/dml2/Makefile  |   141 -
 .../gpu/drm/amd/display/dc/dml2/cmntypes.h    |    94 -
 .../amd/display/dc/dml2/display_mode_core.c   | 10335 ------------
 .../amd/display/dc/dml2/display_mode_core.h   |   204 -
 .../dc/dml2/display_mode_core_structs.h       |  2033 ---
 .../dc/dml2/display_mode_lib_defines.h        |    79 -
 .../amd/display/dc/dml2/display_mode_util.c   |   798 -
 .../amd/display/dc/dml2/display_mode_util.h   |    76 -
 .../dc/dml2/dml21/dml21_translation_helper.c  |   929 --
 .../dc/dml2/dml21/dml21_translation_helper.h  |    28 -
 .../amd/display/dc/dml2/dml21/dml21_utils.c   |   516 -
 .../amd/display/dc/dml2/dml21/dml21_utils.h   |    50 -
 .../amd/display/dc/dml2/dml21/dml21_wrapper.c |   468 -
 .../amd/display/dc/dml2/dml21/dml21_wrapper.h |   135 -
 .../dml21/inc/bounding_boxes/dcn4_soc_bb.h    |   373 -
 .../dml2/dml21/inc/dml2_external_lib_deps.h   |    10 -
 .../amd/display/dc/dml2/dml21/inc/dml_top.h   |    46 -
 .../dml2/dml21/inc/dml_top_dchub_registers.h  |   189 -
 .../dml21/inc/dml_top_display_cfg_types.h     |   520 -
 .../dc/dml2/dml21/inc/dml_top_policy_types.h  |    13 -
 .../dml21/inc/dml_top_soc_parameter_types.h   |   215 -
 .../display/dc/dml2/dml21/inc/dml_top_types.h |   750 -
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c |   661 -
 .../dml2/dml21/src/dml2_core/dml2_core_dcn4.h |    12 -
 .../src/dml2_core/dml2_core_dcn4_calcs.c      | 13339 ----------------
 .../src/dml2_core/dml2_core_dcn4_calcs.h      |    39 -
 .../dml21/src/dml2_core/dml2_core_factory.c   |    39 -
 .../dml21/src/dml2_core/dml2_core_factory.h   |    13 -
 .../src/dml2_core/dml2_core_shared_types.h    |  2335 ---
 .../dml21/src/dml2_core/dml2_core_utils.c     |   786 -
 .../dml21/src/dml2_core/dml2_core_utils.h     |    43 -
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c |   785 -
 .../dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h |    14 -
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c   |    50 -
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.h   |    13 -
 .../dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.c   |   198 -
 .../dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.h   |    13 -
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |    39 -
 .../dml21/src/dml2_mcg/dml2_mcg_factory.h     |    13 -
 .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c   |   706 -
 .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.h   |    22 -
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |  2394 ---
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h  |    33 -
 .../dml21/src/dml2_pmo/dml2_pmo_factory.c     |    83 -
 .../dml21/src/dml2_pmo/dml2_pmo_factory.h     |    13 -
 .../lib_float_math.c                          |   147 -
 .../lib_float_math.h                          |    25 -
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |    49 -
 .../dml2/dml21/src/dml2_top/dml2_top_legacy.c |    10 -
 .../dml2/dml21/src/dml2_top/dml2_top_legacy.h |     9 -
 .../dml2/dml21/src/dml2_top/dml2_top_soc15.c  |  1170 --
 .../dml2/dml21/src/dml2_top/dml2_top_soc15.h  |    14 -
 .../dc/dml2/dml21/src/inc/dml2_debug.h        |   189 -
 .../src/inc/dml2_internal_shared_types.h      |  1004 --
 .../display/dc/dml2/dml2_dc_resource_mgmt.c   |  1174 --
 .../display/dc/dml2/dml2_dc_resource_mgmt.h   |    52 -
 .../drm/amd/display/dc/dml2/dml2_dc_types.h   |    43 -
 .../amd/display/dc/dml2/dml2_internal_types.h |   157 -
 .../amd/display/dc/dml2/dml2_mall_phantom.c   |   910 --
 .../amd/display/dc/dml2/dml2_mall_phantom.h   |    52 -
 .../gpu/drm/amd/display/dc/dml2/dml2_policy.c |   311 -
 .../gpu/drm/amd/display/dc/dml2/dml2_policy.h |    47 -
 .../display/dc/dml2/dml2_translation_helper.c |  1525 --
 .../display/dc/dml2/dml2_translation_helper.h |    41 -
 .../gpu/drm/amd/display/dc/dml2/dml2_utils.c  |   560 -
 .../gpu/drm/amd/display/dc/dml2/dml2_utils.h  |   149 -
 .../drm/amd/display/dc/dml2/dml2_wrapper.c    |   704 -
 .../drm/amd/display/dc/dml2/dml2_wrapper.h    |   309 -
 .../gpu/drm/amd/display/dc/dml2/dml_assert.h  |    32 -
 .../drm/amd/display/dc/dml2/dml_depedencies.h |    33 -
 .../display/dc/dml2/dml_display_rq_dlg_calc.c |   573 -
 .../display/dc/dml2/dml_display_rq_dlg_calc.h |    63 -
 .../gpu/drm/amd/display/dc/dml2/dml_logging.h |    31 -
 73 files changed, 49028 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/Makefile
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/cmntypes.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_core_structs.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_lib_defines.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/bounding_boxes/dcn4_soc_bb.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml2_external_lib_deps.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_dchub_registers.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_display_cfg_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_policy_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_soc_parameter_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_legacy.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_legacy.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_debug.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_internal_shared_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_assert.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_depedencies.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.h
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/dml_logging.h
drivers/gpu/drm/amd/display/dc/dml2/Makefile deleted +0 -141
deleted file mode 100644
index 4ff0adef233a..000000000000
@@ -1,141 +0,0 @@
-# SPDX-License-Identifier: MIT */
-#
-# Copyright 2023 Advanced Micro Devices, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-# Authors: AMD
-#
-# Makefile for dml2.
-
-dml2_ccflags := $(CC_FLAGS_FPU)
-dml2_rcflags := $(CC_FLAGS_NO_FPU)
-
-ifneq ($(CONFIG_FRAME_WARN),0)
-    ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
-        ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_COMPILE_TEST),yy)
-            frame_warn_limit := 4096
-        else
-            frame_warn_limit := 3072
-        endif
-    else
-        frame_warn_limit := 2056
-    endif
-
-    ifeq ($(call test-lt, $(CONFIG_FRAME_WARN), $(frame_warn_limit)),y)
-        frame_warn_flag := -Wframe-larger-than=$(frame_warn_limit)
-    endif
-endif
-
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_core
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_mcg/
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_dpmm/
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_pmo/
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_standalone_libraries/
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/inc
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/inc
-subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/
-
-CFLAGS_$(AMDDALPATH)/dc/dml2/display_mode_core.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2/display_mode_util.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_policy.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_translation_helper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_mall_phantom.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml_display_rq_dlg_calc.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml2_dc_resource_mgmt.o := $(dml2_ccflags)
-
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/display_mode_core.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/display_mode_util.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_policy.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_translation_helper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_mall_phantom.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml_display_rq_dlg_calc.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_dc_resource_mgmt.o := $(dml2_rcflags)
-
-DML2 = display_mode_core.o display_mode_util.o dml2_wrapper.o \
-		dml2_utils.o dml2_policy.o dml2_translation_helper.o dml2_dc_resource_mgmt.o dml2_mall_phantom.o \
-		dml_display_rq_dlg_calc.o
-
-AMD_DAL_DML2 = $(addprefix $(AMDDALPATH)/dc/dml2/,$(DML2))
-
-AMD_DISPLAY_FILES += $(AMD_DAL_DML2)
-
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_ccflags) $(frame_warn_flag)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml21_wrapper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/dml21_translation_helper.o := $(dml2_ccflags)
-CFLAGS_$(AMDDALPATH)/dc/dml2/dml21/dml21_utils.o := $(dml2_ccflags)
-
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_utils.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml21_wrapper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/dml21_translation_helper.o := $(dml2_rcflags)
-CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/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
-DML21 += src/dml2_core/dml2_core_utils.o
-DML21 += src/dml2_core/dml2_core_factory.o
-DML21 += src/dml2_core/dml2_core_dcn4_calcs.o
-DML21 += src/dml2_dpmm/dml2_dpmm_dcn4.o
-DML21 += src/dml2_dpmm/dml2_dpmm_factory.o
-DML21 += src/dml2_mcg/dml2_mcg_dcn4.o
-DML21 += src/dml2_mcg/dml2_mcg_factory.o
-DML21 += src/dml2_pmo/dml2_pmo_dcn3.o
-DML21 += src/dml2_pmo/dml2_pmo_factory.o
-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_utils.o
-
-AMD_DAL_DML21 = $(addprefix $(AMDDALPATH)/dc/dml2/dml21/,$(DML21))
-
-AMD_DISPLAY_FILES += $(AMD_DAL_DML21)
-
drivers/gpu/drm/amd/display/dc/dml2/cmntypes.h deleted +0 -94

94 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c deleted +0 -10335

2,765 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.h deleted +0 -204

204 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_core_structs.h deleted +0 -2033

2,033 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_lib_defines.h deleted +0 -79

79 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.c deleted +0 -798

798 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/display_mode_util.h deleted +0 -76

76 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c deleted +0 -929

929 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.h deleted +0 -28
deleted file mode 100644
index 9880d3e0398e..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.c deleted +0 -516

516 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_utils.h deleted +0 -50

50 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c deleted +0 -468

468 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.h deleted +0 -135

135 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/bounding_boxes/dcn4_soc_bb.h deleted +0 -373

373 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml2_external_lib_deps.h deleted +0 -10
deleted file mode 100644
index 281d7ad230d8..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top.h deleted +0 -46

46 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_dchub_registers.h deleted +0 -189

189 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_display_cfg_types.h deleted +0 -520

520 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_policy_types.h deleted +0 -13
deleted file mode 100644
index 8f624a912e78..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_soc_parameter_types.h deleted +0 -215

215 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/inc/dml_top_types.h deleted +0 -750

750 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c deleted +0 -661

661 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.h deleted +0 -12
deleted file mode 100644
index a68bb001a346..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c deleted +0 -13339

13,339 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.h deleted +0 -39
deleted file mode 100644
index 27ef0e096b25..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c deleted +0 -39
deleted file mode 100644
index cc4f0663c6d6..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.h deleted +0 -13
deleted file mode 100644
index 411c514fe65c..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h deleted +0 -2335

2,335 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c deleted +0 -786

786 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.h deleted +0 -43

43 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c deleted +0 -785

785 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h deleted +0 -14
deleted file mode 100644
index e7b58f2efda4..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c deleted +0 -50

50 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.h deleted +0 -13
deleted file mode 100644
index 20ba2e446f1d..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.c deleted +0 -198

198 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.h deleted +0 -13
deleted file mode 100644
index 02da6f45cbf7..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c deleted +0 -39
deleted file mode 100644
index c60b8fe90819..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.h deleted +0 -13
deleted file mode 100644
index ad307deca3b0..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.c deleted +0 -706

706 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.h deleted +0 -22
deleted file mode 100644
index f00bd9e72a86..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c deleted +0 -2394

2,394 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h deleted +0 -33
deleted file mode 100644
index 6baab7ad6ecc..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c deleted +0 -83

83 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.h deleted +0 -13
deleted file mode 100644
index 7218de1824cc..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.c deleted +0 -147

147 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.h deleted +0 -25
deleted file mode 100644
index e13b0c5939b0..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.c deleted +0 -49

49 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_legacy.c deleted +0 -10
deleted file mode 100644
index 5e14d85821e2..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_legacy.h deleted +0 -9
deleted file mode 100644
index 14d0ae03dce6..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.c deleted +0 -1170

1,170 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.h deleted +0 -14
deleted file mode 100644
index 53bd8602f9ef..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_debug.h deleted +0 -189

189 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml21/src/inc/dml2_internal_shared_types.h deleted +0 -1004

1,004 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c deleted +0 -1174

1,174 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h deleted +0 -52

52 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_types.h deleted +0 -43

43 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h deleted +0 -157

157 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.c deleted +0 -910

910 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_mall_phantom.h deleted +0 -52

52 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c deleted +0 -311

311 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.h deleted +0 -47

47 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c deleted +0 -1525

1,525 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.h deleted +0 -41

41 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c deleted +0 -560

560 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.h deleted +0 -149

149 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c deleted +0 -704

704 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h deleted +0 -309

309 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_assert.h deleted +0 -32
deleted file mode 100644
index 17f0972b1af7..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml_depedencies.h deleted +0 -33
deleted file mode 100644
index f7d30b47beff..000000000000

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

drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.c deleted +0 -573

573 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_display_rq_dlg_calc.h deleted +0 -63

63 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml2/dml_logging.h deleted +0 -31
deleted file mode 100644
index 2a2f84e07ca8..000000000000

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.

author
#9 lore raw

PATCH 9/20 drm/amd/display: Add more DC HW state info to underflow logging

In reply to waynelin

From: Karen Chen <[email protected]>

[Why]
Debugging underflow issues frequently requires knowing the HW state at the time of underflow. To enable capturing this HW state information, interface functions are needed for the various DC HW blocks.

[How]
This change adds the interface functions to read HW state for the following DC HW blocks:
- HUBBUB
- HUBP
- DPP
- MPC
- OPP
- DSC
- OPTC
- DCCG

---
 drivers/gpu/drm/amd/display/dc/dc.h           |  30 ++--
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    |  64 +++++++-
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.c    | 123 +++++++++++++++
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.h    |   2 +
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.c  |   3 +-
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.h  |   3 +-
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.c    |   1 +
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.h    |   5 +-
 .../amd/display/dc/dccg/dcn401/dcn401_dccg.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h  |   4 +-
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  |  16 ++
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |   2 +
 .../drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c  |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |   1 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c  |   8 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h  |   1 +
 .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c  |   1 +
 .../amd/display/dc/dsc/dcn401/dcn401_dsc.c    |   1 +
 drivers/gpu/drm/amd/display/dc/dsc/dsc.h      |   5 +
 .../display/dc/hubbub/dcn30/dcn30_hubbub.c    |  33 +---
 .../display/dc/hubbub/dcn30/dcn30_hubbub.h    |   6 +-
 .../display/dc/hubbub/dcn31/dcn31_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn32/dcn32_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn35/dcn35_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn401/dcn401_hubbub.c  |   3 +-
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.h    | 136 +++++++++++++++-
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.h    |   8 +-
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 147 ++++++++++++++----
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.h    |   2 +
 .../amd/display/dc/hubp/dcn31/dcn31_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn32/dcn32_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn35/dcn35_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  |   4 +-
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  76 ++++-----
 drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  | 121 +++++++++++++-
 .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |  12 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h   |  16 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h  |   1 +
 drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h   |  27 ++++
 drivers/gpu/drm/amd/display/dc/inc/hw/opp.h   |  13 ++
 .../amd/display/dc/inc/hw/timing_generator.h  | 130 ++++++++++++++++
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c  |  16 ++
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h  |   5 +
 .../drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c  |   1 +
 .../amd/display/dc/mpc/dcn401/dcn401_mpc.c    |   1 +
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.c  |  14 +-
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.h  |   4 +-
 .../amd/display/dc/optc/dcn10/dcn10_optc.h    |  38 ++++-
 .../amd/display/dc/optc/dcn31/dcn31_optc.c    | 131 ++++++++++++++++
 .../amd/display/dc/optc/dcn31/dcn31_optc.h    |   2 +
 .../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 +
 .../amd/display/dc/optc/dcn401/dcn401_optc.c  |   1 +
 59 files changed, 1133 insertions(+), 150 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +16 -14
index 769b2c2f9d7f..ea629c06ec53 100644
@@ -54,6 +54,14 @@ struct abm_save_restore;
 struct aux_payload;
 struct set_config_cmd_payload;
 struct dmub_notification;
+struct dcn_hubbub_reg_state;
+struct dcn_hubp_reg_state;
+struct dcn_dpp_reg_state;
+struct dcn_mpc_reg_state;
+struct dcn_opp_reg_state;
+struct dcn_dsc_reg_state;
+struct dcn_optc_reg_state;
+struct dcn_dccg_reg_state;
 
 #define DC_VER "3.2.355"
 
@@ -1831,20 +1839,14 @@ struct dc_surface_update {
 };
 
 struct dc_underflow_debug_data {
-	uint32_t otg_inst;
-	uint32_t otg_underflow;
-	uint32_t h_position;
-	uint32_t v_position;
-	uint32_t otg_frame_count;
-	struct dc_underflow_per_hubp_debug_data {
-		uint32_t hubp_underflow;
-		uint32_t hubp_in_blank;
-		uint32_t hubp_readline;
-		uint32_t det_config_error;
-	} hubps[MAX_PIPES];
-	uint32_t curr_det_sizes[MAX_PIPES];
-	uint32_t target_det_sizes[MAX_PIPES];
-	uint32_t compbuf_config_error;
+	struct dcn_hubbub_reg_state *hubbub_reg_state;
+	struct dcn_hubp_reg_state *hubp_reg_state[MAX_PIPES];
+	struct dcn_dpp_reg_state *dpp_reg_state[MAX_PIPES];
+	struct dcn_mpc_reg_state *mpc_reg_state[MAX_PIPES];
+	struct dcn_opp_reg_state *opp_reg_state[MAX_PIPES];
+	struct dcn_dsc_reg_state *dsc_reg_state[MAX_PIPES];
+	struct dcn_optc_reg_state *optc_reg_state[MAX_PIPES];
+	struct dcn_dccg_reg_state *dccg_reg_state[MAX_PIPES];
 };
 
 /*
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h +63 -1

70 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c +123 -0

135 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.h +2 -0
index cd261051dc2c..bf659920d4cc 100644
@@ -236,4 +236,6 @@ void dccg31_disable_dscclk(struct dccg *dccg, int inst);
 
 void dccg31_enable_dscclk(struct dccg *dccg, int inst);
 
+void dccg31_read_reg_state(struct dccg *dccg, struct dcn_dccg_reg_state *dccg_reg_state);
+
 #endif //__DCN31_DCCG_H__
drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c +2 -1
index 8f6edd8e9beb..ef3db6beba25 100644
@@ -377,7 +377,8 @@ static const struct dccg_funcs dccg314_funcs = {
 	.get_pixel_rate_div = dccg314_get_pixel_rate_div,
 	.trigger_dio_fifo_resync = dccg314_trigger_dio_fifo_resync,
 	.set_valid_pixel_rate = dccg314_set_valid_pixel_rate,
-	.set_dtbclk_p_src = dccg314_set_dtbclk_p_src
+	.set_dtbclk_p_src = dccg314_set_dtbclk_p_src,
+	.dccg_read_reg_state = dccg31_read_reg_state
 };
 
 struct dccg *dccg314_create(
drivers/gpu/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.h +1 -2
index 60ea1d248deb..a609635f35db 100644
@@ -74,8 +74,7 @@
 	SR(DCCG_GATE_DISABLE_CNTL3),\
 	SR(HDMISTREAMCLK0_DTO_PARAM),\
 	SR(OTG_PIXEL_RATE_DIV),\
-	SR(DTBCLK_P_CNTL),\
-	SR(DCCG_AUDIO_DTO_SOURCE)
+	SR(DTBCLK_P_CNTL)
 
 #define DCCG_MASK_SH_LIST_DCN314_COMMON(mask_sh) \
 	DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 0, mask_sh),\
drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c +1 -0
index 0aa41759f79d..bd2f528137b2 100644
@@ -2453,6 +2453,7 @@ static const struct dccg_funcs dccg35_funcs = {
 	.disable_symclk_se = dccg35_disable_symclk_se,
 	.set_dtbclk_p_src = dccg35_set_dtbclk_p_src,
 	.dccg_root_gate_disable_control = dccg35_root_gate_disable_control,
+	.dccg_read_reg_state = dccg31_read_reg_state,
 };
 
 struct dccg *dccg35_create(
drivers/gpu/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.h +3 -2
index ad7a5850d31b..7b9c36456cd9 100644
@@ -41,8 +41,9 @@
 	SR(SYMCLKA_CLOCK_ENABLE),\
 	SR(SYMCLKB_CLOCK_ENABLE),\
 	SR(SYMCLKC_CLOCK_ENABLE),\
-	SR(SYMCLKD_CLOCK_ENABLE),\
-	SR(SYMCLKE_CLOCK_ENABLE)
+	SR(SYMCLKD_CLOCK_ENABLE), \
+	SR(SYMCLKE_CLOCK_ENABLE),\
+	SR(SYMCLK_PSP_CNTL)
 
 #define DCCG_MASK_SH_LIST_DCN35(mask_sh) \
 	DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 0, mask_sh),\
drivers/gpu/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c +1 -0
index 0b8ed9b94d3c..663a18ee5162 100644
@@ -886,6 +886,7 @@ static const struct dccg_funcs dccg401_funcs = {
 	.enable_symclk_se = dccg401_enable_symclk_se,
 	.disable_symclk_se = dccg401_disable_symclk_se,
 	.set_dtbclk_p_src = dccg401_set_dtbclk_p_src,
+	.dccg_read_reg_state = dccg31_read_reg_state
 };
 
 struct dccg *dccg401_create(
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h +2 -2
index f466182963f7..b12f34345a58 100644
@@ -1348,7 +1348,8 @@ struct dcn_dpp_mask {
 	uint32_t CURSOR0_COLOR1; \
 	uint32_t DPP_CONTROL; \
 	uint32_t CM_HDR_MULT_COEF; \
-	uint32_t CURSOR0_FP_SCALE_BIAS;
+	uint32_t CURSOR0_FP_SCALE_BIAS; \
+	uint32_t OBUF_CONTROL;
 
 struct dcn_dpp_registers {
 	DPP_COMMON_REG_VARIABLE_LIST
@@ -1450,7 +1451,6 @@ void dpp1_set_degamma(
 void dpp1_set_degamma_pwl(struct dpp *dpp_base,
 		const struct pwl_params *params);
 
-
 void dpp_read_state(struct dpp *dpp_base,
 		struct dcn_dpp_state *s);
 
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +16 -0
index 94d0dc3461d2..fdc8789bb5d4 100644
@@ -84,6 +84,22 @@ void dpp30_read_state(struct dpp *dpp_base, struct dcn_dpp_state *s)
 	}
 }
 
+void dpp30_read_reg_state(struct dpp *dpp_base, struct dcn_dpp_reg_state *dpp_reg_state)
+{
+	struct dcn3_dpp *dpp = TO_DCN30_DPP(dpp_base);
+
+	dpp_reg_state->recout_start = REG_READ(RECOUT_START);
+	dpp_reg_state->recout_size = REG_READ(RECOUT_SIZE);
+	dpp_reg_state->scl_horz_filter_scale_ratio = REG_READ(SCL_HORZ_FILTER_SCALE_RATIO);
+	dpp_reg_state->scl_vert_filter_scale_ratio = REG_READ(SCL_VERT_FILTER_SCALE_RATIO);
+	dpp_reg_state->scl_mode = REG_READ(SCL_MODE);
+	dpp_reg_state->cm_control = REG_READ(CM_CONTROL);
+	dpp_reg_state->dpp_control = REG_READ(DPP_CONTROL);
+	dpp_reg_state->dscl_control = REG_READ(DSCL_CONTROL);
+	dpp_reg_state->obuf_control = REG_READ(OBUF_CONTROL);
+	dpp_reg_state->mpc_size = REG_READ(MPC_SIZE);
+}
+
 /*program post scaler scs block in dpp CM*/
 void dpp3_program_post_csc(
 		struct dpp *dpp_base,
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h +2 -0
index f236824126e9..d4a70b4379ea 100644
@@ -594,6 +594,8 @@ void dpp3_program_CM_dealpha(
 void dpp30_read_state(struct dpp *dpp_base,
 		struct dcn_dpp_state *s);
 
+void dpp30_read_reg_state(struct dpp *dpp_base, struct dcn_dpp_reg_state *dpp_reg_state);
+
 bool dpp3_get_optimal_number_of_taps(
 		struct dpp *dpp,
 		struct scaler_data *scl_data,
drivers/gpu/drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c +1 -0
index fa67e54bf94e..8a5aa5e86850 100644
@@ -134,6 +134,7 @@ static struct dpp_funcs dcn32_dpp_funcs = {
 	.dpp_dppclk_control			= dpp1_dppclk_control,
 	.dpp_set_hdr_multiplier		= dpp3_set_hdr_multiplier,
 	.dpp_get_gamut_remap		= dpp3_cm_get_gamut_remap,
+	.dpp_read_reg_state			= dpp30_read_reg_state,
 };
 
 
drivers/gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c +1 -0
index f7a373a3d70a..977d83bf7741 100644
@@ -95,6 +95,7 @@ void dpp35_program_bias_and_scale_fcnv(
 static struct dpp_funcs dcn35_dpp_funcs = {
 	.dpp_program_gamcor_lut		= dpp3_program_gamcor_lut,
 	.dpp_read_state				= dpp30_read_state,
+	.dpp_read_reg_state			= dpp30_read_reg_state,
 	.dpp_reset					= dpp_reset,
 	.dpp_set_scaler				= dpp1_dscl_set_scaler_manual_scale,
 	.dpp_get_optimal_number_of_taps	= dpp3_get_optimal_number_of_taps,
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c +1 -0
index 36187f890d5d..96c2c853de42 100644
@@ -248,6 +248,7 @@ static struct dpp_funcs dcn401_dpp_funcs = {
 	.set_optional_cursor_attributes	= dpp401_set_optional_cursor_attributes,
 	.dpp_dppclk_control			= dpp1_dppclk_control,
 	.dpp_set_hdr_multiplier		= dpp3_set_hdr_multiplier,
+	.dpp_read_reg_state			= dpp30_read_reg_state,
 	.set_cursor_matrix			= dpp401_set_cursor_matrix,
 };
 
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c +8 -0
index ee8c11e085cd..242f1e6f0d8f 100644
@@ -35,6 +35,7 @@ static void dsc_write_to_registers(struct display_stream_compressor *dsc, const
 static const struct dsc_funcs dcn20_dsc_funcs = {
 	.dsc_get_enc_caps = dsc2_get_enc_caps,
 	.dsc_read_state = dsc2_read_state,
+	.dsc_read_reg_state = dsc2_read_reg_state,
 	.dsc_validate_stream = dsc2_validate_stream,
 	.dsc_set_config = dsc2_set_config,
 	.dsc_get_packed_pps = dsc2_get_packed_pps,
@@ -155,6 +156,13 @@ void dsc2_read_state(struct display_stream_compressor *dsc, struct dcn_dsc_state
 		DSCRM_DSC_OPP_PIPE_SOURCE, &s->dsc_opp_source);
 }
 
+void dsc2_read_reg_state(struct display_stream_compressor *dsc, struct dcn_dsc_reg_state *dccg_reg_state)
+{
+	struct dcn20_dsc *dsc20 = TO_DCN20_DSC(dsc);
+
+	dccg_reg_state->dsc_top_control = REG_READ(DSC_TOP_CONTROL);
+	dccg_reg_state->dscc_interrupt_control_status = REG_READ(DSCC_INTERRUPT_CONTROL_STATUS);
+}
 
 bool dsc2_validate_stream(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg)
 {
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h +1 -0
index a9c04fc95bd1..2337c3a97235 100644
@@ -606,6 +606,7 @@ bool dsc2_get_packed_pps(struct display_stream_compressor *dsc,
 		uint8_t *dsc_packed_pps);
 
 void dsc2_read_state(struct display_stream_compressor *dsc, struct dcn_dsc_state *s);
+void dsc2_read_reg_state(struct display_stream_compressor *dsc, struct dcn_dsc_reg_state *dccg_reg_state);
 bool dsc2_validate_stream(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg);
 void dsc2_set_config(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg,
 		struct dsc_optc_config *dsc_optc_cfg);
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c +1 -0
index 6f4f5a3c4861..f9c6377ac66c 100644
@@ -32,6 +32,7 @@ static void dsc35_enable(struct display_stream_compressor *dsc, int opp_pipe);
 static const struct dsc_funcs dcn35_dsc_funcs = {
 	.dsc_get_enc_caps = dsc2_get_enc_caps,
 	.dsc_read_state = dsc2_read_state,
+	.dsc_read_reg_state = dsc2_read_reg_state,
 	.dsc_validate_stream = dsc2_validate_stream,
 	.dsc_set_config = dsc2_set_config,
 	.dsc_get_packed_pps = dsc2_get_packed_pps,
drivers/gpu/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c +1 -0
index 7bd92ae8b13e..c1bdbb38c690 100644
@@ -26,6 +26,7 @@ static const struct dsc_funcs dcn401_dsc_funcs = {
 	.dsc_disconnect = dsc401_disconnect,
 	.dsc_wait_disconnect_pending_clear = dsc401_wait_disconnect_pending_clear,
 	.dsc_get_single_enc_caps = dsc401_get_single_enc_caps,
+	.dsc_read_reg_state = dsc2_read_reg_state
 };
 
 /* Macro definitios for REG_SET macros*/
drivers/gpu/drm/amd/display/dc/dsc/dsc.h +5 -0
index b433e16842bf..81c83d5fe042 100644
@@ -66,6 +66,10 @@ struct dcn_dsc_state {
 	uint32_t dsc_opp_source;
 };
 
+struct dcn_dsc_reg_state {
+	uint32_t dsc_top_control;
+	uint32_t dscc_interrupt_control_status;
+};
 
 /* DSC encoder capabilities
  * They differ from the DPCD DSC caps because they are based on AMD DSC encoder caps.
@@ -100,6 +104,7 @@ struct dsc_enc_caps {
 struct dsc_funcs {
 	void (*dsc_get_enc_caps)(struct dsc_enc_caps *dsc_enc_caps, int pixel_clock_100Hz);
 	void (*dsc_read_state)(struct display_stream_compressor *dsc, struct dcn_dsc_state *s);
+	void (*dsc_read_reg_state)(struct display_stream_compressor *dsc, struct dcn_dsc_reg_state *dccg_reg_state);
 	bool (*dsc_validate_stream)(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg);
 	void (*dsc_set_config)(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg,
 			struct dsc_optc_config *dsc_optc_cfg);
drivers/gpu/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c +7 -26
index e7e5f6d4778e..181a93dc46e6 100644
@@ -440,33 +440,15 @@ void hubbub3_init_watermarks(struct hubbub *hubbub)
 	REG_WRITE(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D, reg);
 }
 
-void hubbub3_get_det_sizes(struct hubbub *hubbub, uint32_t *curr_det_sizes, uint32_t *target_det_sizes)
+void hubbub3_read_reg_state(struct hubbub *hubbub, struct dcn_hubbub_reg_state *hubbub_reg_state)
 {
 	struct dcn20_hubbub *hubbub1 = TO_DCN20_HUBBUB(hubbub);
 
-	REG_GET_2(DCHUBBUB_DET0_CTRL, DET0_SIZE_CURRENT, &curr_det_sizes[0],
-		DET0_SIZE, &target_det_sizes[0]);
-
-	REG_GET_2(DCHUBBUB_DET1_CTRL, DET1_SIZE_CURRENT, &curr_det_sizes[1],
-		DET1_SIZE, &target_det_sizes[1]);
-
-	REG_GET_2(DCHUBBUB_DET2_CTRL, DET2_SIZE_CURRENT, &curr_det_sizes[2],
-		DET2_SIZE, &target_det_sizes[2]);
-
-	REG_GET_2(DCHUBBUB_DET3_CTRL, DET3_SIZE_CURRENT, &curr_det_sizes[3],
-		DET3_SIZE, &target_det_sizes[3]);
-
-}
-
-uint32_t hubbub3_compbuf_config_error(struct hubbub *hubbub)
-{
-	struct dcn20_hubbub *hubbub1 = TO_DCN20_HUBBUB(hubbub);
-	uint32_t compbuf_config_error = 0;
-
-	REG_GET(DCHUBBUB_COMPBUF_CTRL, CONFIG_ERROR,
-		&compbuf_config_error);
-
-	return compbuf_config_error;
+	hubbub_reg_state->det0_ctrl = REG_READ(DCHUBBUB_DET0_CTRL);
+	hubbub_reg_state->det1_ctrl = REG_READ(DCHUBBUB_DET1_CTRL);
+	hubbub_reg_state->det2_ctrl = REG_READ(DCHUBBUB_DET2_CTRL);
+	hubbub_reg_state->det3_ctrl = REG_READ(DCHUBBUB_DET3_CTRL);
+	hubbub_reg_state->compbuf_ctrl = REG_READ(DCHUBBUB_COMPBUF_CTRL);
 }
 
 static const struct hubbub_funcs hubbub30_funcs = {
@@ -486,8 +468,7 @@ static const struct hubbub_funcs hubbub30_funcs = {
 	.force_pstate_change_control = hubbub3_force_pstate_change_control,
 	.init_watermarks = hubbub3_init_watermarks,
 	.hubbub_read_state = hubbub2_read_state,
-	.get_det_sizes = hubbub3_get_det_sizes,
-	.compbuf_config_error = hubbub3_compbuf_config_error,
+	.hubbub_read_reg_state = hubbub3_read_reg_state
 };
 
 void hubbub3_construct(struct dcn20_hubbub *hubbub3,
drivers/gpu/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.h +1 -5
index 49a469969d36..9e14de3ccaee 100644
@@ -133,10 +133,6 @@ void hubbub3_force_pstate_change_control(struct hubbub *hubbub,
 
 void hubbub3_init_watermarks(struct hubbub *hubbub);
 
-void hubbub3_get_det_sizes(struct hubbub *hubbub,
-	uint32_t *curr_det_sizes,
-	uint32_t *target_det_sizes);
-
-uint32_t hubbub3_compbuf_config_error(struct hubbub *hubbub);
+void hubbub3_read_reg_state(struct hubbub *hubbub, struct dcn_hubbub_reg_state *hubbub_reg_state);
 
 #endif
drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c +1 -2
index cdb20251a154..d1aaa58b7db3 100644
@@ -1071,8 +1071,7 @@ static const struct hubbub_funcs hubbub31_funcs = {
 	.program_compbuf_size = dcn31_program_compbuf_size,
 	.init_crb = dcn31_init_crb,
 	.hubbub_read_state = hubbub2_read_state,
-	.get_det_sizes = hubbub3_get_det_sizes,
-	.compbuf_config_error = hubbub3_compbuf_config_error,
+	.hubbub_read_reg_state = hubbub3_read_reg_state
 };
 
 void hubbub31_construct(struct dcn20_hubbub *hubbub31,
drivers/gpu/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c +1 -2
index 4d4ca6d77bbd..237331b35378 100644
@@ -1037,8 +1037,7 @@ static const struct hubbub_funcs hubbub32_funcs = {
 	.force_usr_retraining_allow = hubbub32_force_usr_retraining_allow,
 	.set_request_limit = hubbub32_set_request_limit,
 	.get_mall_en = hubbub32_get_mall_en,
-	.get_det_sizes = hubbub3_get_det_sizes,
-	.compbuf_config_error = hubbub3_compbuf_config_error,
+	.hubbub_read_reg_state = hubbub3_read_reg_state
 };
 
 void hubbub32_construct(struct dcn20_hubbub *hubbub2,
drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c +1 -2
index a443722a8632..1b7746a6549a 100644
@@ -589,8 +589,7 @@ static const struct hubbub_funcs hubbub35_funcs = {
 	.hubbub_read_state = hubbub2_read_state,
 	.force_usr_retraining_allow = hubbub32_force_usr_retraining_allow,
 	.dchubbub_init = hubbub35_init,
-	.get_det_sizes = hubbub3_get_det_sizes,
-	.compbuf_config_error = hubbub3_compbuf_config_error,
+	.hubbub_read_reg_state = hubbub3_read_reg_state
 };
 
 void hubbub35_construct(struct dcn20_hubbub *hubbub2,
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c +1 -2
index a36273a52880..d11afd1ce72a 100644
@@ -1247,8 +1247,7 @@ static const struct hubbub_funcs hubbub4_01_funcs = {
 	.program_compbuf_segments = dcn401_program_compbuf_segments,
 	.wait_for_det_update = dcn401_wait_for_det_update,
 	.program_arbiter = dcn401_program_arbiter,
-	.get_det_sizes = hubbub3_get_det_sizes,
-	.compbuf_config_error = hubbub3_compbuf_config_error,
+	.hubbub_read_reg_state = hubbub3_read_reg_state
 };
 
 void hubbub401_construct(struct dcn20_hubbub *hubbub2,
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h +133 -3

160 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h +6 -2
index f325db555102..7062e6653062 100644
@@ -145,7 +145,8 @@
 	uint32_t FLIP_PARAMETERS_2;\
 	uint32_t DCN_CUR1_TTU_CNTL0;\
 	uint32_t DCN_CUR1_TTU_CNTL1;\
-	uint32_t VMID_SETTINGS_0
+	uint32_t VMID_SETTINGS_0;\
+	uint32_t DST_Y_DELTA_DRQ_LIMIT
 
 /*shared with dcn3.x*/
 #define DCN21_HUBP_REG_COMMON_VARIABLE_LIST \
@@ -176,7 +177,10 @@
 	uint32_t HUBP_3DLUT_CONTROL;\
 	uint32_t HUBP_3DLUT_DLG_PARAM;\
 	uint32_t DCSURF_VIEWPORT_MCACHE_SPLIT_COORDINATE;\
-	uint32_t DCHUBP_MCACHEID_CONFIG
+	uint32_t DCHUBP_MCACHEID_CONFIG;\
+	uint32_t DCHUBP_MALL_SUB_VP;\
+	uint32_t DCHUBP_ADDR_CONFIG;\
+	uint32_t HUBP_MALL_STATUS
 
 #define DCN2_HUBP_REG_FIELD_VARIABLE_LIST(type) \
 	DCN_HUBP_REG_FIELD_BASE_LIST(type); \
drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c +121 -26

165 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h +2 -0
index 842f4eb72cc8..c767e9f4f9b3 100644
@@ -296,6 +296,8 @@ void hubp3_dmdata_set_attributes(
 
 void hubp3_read_state(struct hubp *hubp);
 
+void hubp3_read_reg_state(struct hubp *hubp, struct dcn_hubp_reg_state *reg_state);
+
 void hubp3_init(struct hubp *hubp);
 
 void hubp3_clear_tiling(struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c +1 -3
index 47101847c2b7..189045f85039 100644
@@ -110,9 +110,7 @@ static struct hubp_funcs dcn31_hubp_funcs = {
 	.hubp_in_blank = hubp1_in_blank,
 	.program_extended_blank = hubp31_program_extended_blank,
 	.hubp_clear_tiling = hubp3_clear_tiling,
-	.hubp_get_underflow_status = hubp3_get_underflow_status,
-	.hubp_get_current_read_line = hubp3_get_current_read_line,
-	.hubp_get_det_config_error = hubp31_get_det_config_error,
+	.hubp_read_reg_state = hubp3_read_reg_state,
 };
 
 bool hubp31_construct(
drivers/gpu/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c +1 -3
index 41c8f78efdc3..a781085b046b 100644
@@ -222,9 +222,7 @@ static struct hubp_funcs dcn32_hubp_funcs = {
 	.hubp_update_mall_sel = hubp32_update_mall_sel,
 	.hubp_prepare_subvp_buffering = hubp32_prepare_subvp_buffering,
 	.hubp_clear_tiling = hubp3_clear_tiling,
-	.hubp_get_underflow_status = hubp3_get_underflow_status,
-	.hubp_get_current_read_line = hubp3_get_current_read_line,
-	.hubp_get_det_config_error = hubp31_get_det_config_error,
+	.hubp_read_reg_state = hubp3_read_reg_state
 };
 
 bool hubp32_construct(
drivers/gpu/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c +1 -3
index b140808f21af..79c583e258c7 100644
@@ -209,6 +209,7 @@ static struct hubp_funcs dcn35_hubp_funcs = {
 	.dmdata_load = hubp2_dmdata_load,
 	.dmdata_status_done = hubp2_dmdata_status_done,
 	.hubp_read_state = hubp3_read_state,
+	.hubp_read_reg_state = hubp3_read_reg_state,
 	.hubp_clear_underflow = hubp2_clear_underflow,
 	.hubp_set_flip_control_surface_gsl = hubp2_set_flip_control_surface_gsl,
 	.hubp_init = hubp35_init,
@@ -218,9 +219,6 @@ static struct hubp_funcs dcn35_hubp_funcs = {
 	.hubp_in_blank = hubp1_in_blank,
 	.program_extended_blank = hubp31_program_extended_blank_value,
 	.hubp_clear_tiling = hubp3_clear_tiling,
-	.hubp_get_underflow_status = hubp3_get_underflow_status,
-	.hubp_get_current_read_line = hubp3_get_current_read_line,
-	.hubp_get_det_config_error = hubp31_get_det_config_error,
 };
 
 bool hubp35_construct(
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +1 -3
index 0fcbc6a35be6..3a2e0848173e 100644
@@ -1071,9 +1071,7 @@ static struct hubp_funcs dcn401_hubp_funcs = {
 	.hubp_get_3dlut_fl_done = hubp401_get_3dlut_fl_done,
 	.hubp_clear_tiling = hubp401_clear_tiling,
 	.hubp_program_3dlut_fl_config = hubp401_program_3dlut_fl_config,
-	.hubp_get_underflow_status = hubp3_get_underflow_status,
-	.hubp_get_current_read_line = hubp3_get_current_read_line,
-	.hubp_get_det_config_error = hubp31_get_det_config_error,
+	.hubp_read_reg_state = hubp3_read_reg_state
 };
 
 bool hubp401_construct(
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +40 -36

91 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h +120 -1

139 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h +10 -2
index 2ce47c403840..dafc8490efb5 100644
@@ -137,6 +137,14 @@ struct dcn_hubbub_state {
 	uint32_t dram_state_cntl;
 };
 
+struct dcn_hubbub_reg_state {
+	uint32_t det0_ctrl;
+	uint32_t det1_ctrl;
+	uint32_t det2_ctrl;
+	uint32_t det3_ctrl;
+	uint32_t compbuf_ctrl;
+};
+
 struct hubbub_system_latencies {
 	uint32_t max_latency_ns;
 	uint32_t avg_latency_ns;
@@ -216,6 +224,8 @@ struct hubbub_funcs {
 
 	void (*init_watermarks)(struct hubbub *hubbub);
 
+	void (*hubbub_read_reg_state)(struct hubbub *hubbub, struct dcn_hubbub_reg_state *hubbub_reg_state);
+
 	/**
 	 * @program_det_size:
 	 *
@@ -242,8 +252,6 @@ struct hubbub_funcs {
 	void (*program_compbuf_segments)(struct hubbub *hubbub, unsigned compbuf_size_seg, bool safe_to_increase);
 	void (*wait_for_det_update)(struct hubbub *hubbub, int hubp_inst);
 	bool (*program_arbiter)(struct hubbub *hubbub, struct dml2_display_arb_regs *arb_regs, bool safe_to_lower);
-	void (*get_det_sizes)(struct hubbub *hubbub, uint32_t *curr_det_sizes, uint32_t *target_det_sizes);
-	uint32_t (*compbuf_config_error)(struct hubbub *hubbub);
 	struct hubbub_perfmon_funcs {
 		void (*reset)(struct hubbub *hubbub);
 		void (*start_measuring_max_memory_latency_ns)(
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h +15 -1
index 09c224691618..d88b57d4f512 100644
@@ -65,7 +65,6 @@ union defer_reg_writes {
 	} bits;
 	uint32_t raw;
 };
-
 struct dpp {
 	const struct dpp_funcs *funcs;
 	struct dc_context *ctx;
@@ -203,6 +202,19 @@ struct dcn_dpp_state {
 	uint32_t gamcor_mode;
 };
 
+struct dcn_dpp_reg_state {
+	uint32_t recout_start;
+	uint32_t recout_size;
+	uint32_t scl_horz_filter_scale_ratio;
+	uint32_t scl_vert_filter_scale_ratio;
+	uint32_t scl_mode;
+	uint32_t cm_control;
+	uint32_t dpp_control;
+	uint32_t dscl_control;
+	uint32_t obuf_control;
+	uint32_t mpc_size;
+};
+
 struct CM_bias_params {
 	uint32_t cm_bias_cr_r;
 	uint32_t cm_bias_y_g;
@@ -226,6 +238,8 @@ struct dpp_funcs {
 
 	void (*dpp_read_state)(struct dpp *dpp, struct dcn_dpp_state *s);
 
+	void (*dpp_read_reg_state)(struct dpp *dpp, struct dcn_dpp_reg_state *dpp_reg_state);
+
 	void (*dpp_reset)(struct dpp *dpp);
 
 	void (*dpp_set_scaler)(struct dpp *dpp,
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +1 -0
index c62c4c1ed7c3..a79019365af8 100644
@@ -238,6 +238,7 @@ struct hubp_funcs {
 	void (*hubp_clk_cntl)(struct hubp *hubp, bool enable);
 	void (*hubp_vtg_sel)(struct hubp *hubp, uint32_t otg_inst);
 	void (*hubp_read_state)(struct hubp *hubp);
+	void (*hubp_read_reg_state)(struct hubp *hubp, struct dcn_hubp_reg_state *reg_state);
 	void (*hubp_clear_underflow)(struct hubp *hubp);
 	void (*hubp_disable_control)(struct hubp *hubp, bool disable_hubp);
 	unsigned int (*hubp_get_underflow_status)(struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +27 -0
index 22960ee03dee..a8d1abe20f62 100644
@@ -350,6 +350,15 @@ struct mpcc_state {
 	struct mpc_rmcm_regs rmcm_regs;
 };
 
+struct dcn_mpc_reg_state {
+	uint32_t mpcc_bot_sel;
+	uint32_t mpcc_control;
+	uint32_t mpcc_status;
+	uint32_t mpcc_top_sel;
+	uint32_t mpcc_opp_id;
+	uint32_t mpcc_ogam_control;
+};
+
 /**
  * struct mpc_funcs - funcs
  */
@@ -373,6 +382,24 @@ struct mpc_funcs {
 			struct mpc *mpc,
 			int mpcc_inst,
 			struct mpcc_state *s);
+	/**
+    * @mpc_read_reg_state:
+    *
+    * Read MPC register state for debugging underflow purposes.
+    *
+    * Parameters:
+    *
+    * - [in] mpc - MPC context
+    * - [out] reg_state - MPC register state structure
+    *
+    * Return:
+    *
+    * void
+    */
+	void (*mpc_read_reg_state)(
+			struct mpc *mpc,
+			int mpcc_inst,
+			struct dcn_mpc_reg_state *mpc_reg_state);
 
 	/**
 	* @insert_plane:
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +13 -0
index 747679cb4944..e1428a83ecbc 100644
@@ -297,6 +297,16 @@ struct oppbuf_params {
 	uint32_t num_segment_padded_pixels;
 };
 
+struct dcn_opp_reg_state {
+	uint32_t dpg_control;
+	uint32_t fmt_control;
+	uint32_t oppbuf_control;
+	uint32_t opp_pipe_control;
+	uint32_t opp_pipe_crc_control;
+	uint32_t opp_abm_control;
+	uint32_t dscrm_dsc_forward_config;
+};
+
 struct opp_funcs {
 
 
@@ -368,6 +378,9 @@ struct opp_funcs {
 			struct output_pixel_processor *opp,
 			enum dc_pixel_encoding pixel_encoding,
 			bool is_primary);
+
+	void (*opp_read_reg_state)(
+			struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state);
 };
 
 #endif
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h +130 -0

142 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c +16 -0
index 85298b8a1b5e..6bfd2c1294e5 100644
@@ -1514,6 +1514,21 @@ static void mpc3_read_mpcc_state(
 		  MPCC_OGAM_SELECT_CURRENT, &s->rgam_lut);
 }
 
+void mpc3_read_reg_state(
+		struct mpc *mpc,
+		int mpcc_inst, struct dcn_mpc_reg_state *mpc_reg_state)
+{
+	struct dcn30_mpc *mpc30 = TO_DCN30_MPC(mpc);
+
+	mpc_reg_state->mpcc_bot_sel = REG_READ(MPCC_BOT_SEL[mpcc_inst]);
+	mpc_reg_state->mpcc_control = REG_READ(MPCC_CONTROL[mpcc_inst]);
+	mpc_reg_state->mpcc_ogam_control = REG_READ(MPCC_OGAM_CONTROL[mpcc_inst]);
+	mpc_reg_state->mpcc_opp_id = REG_READ(MPCC_OPP_ID[mpcc_inst]);
+	mpc_reg_state->mpcc_status = REG_READ(MPCC_STATUS[mpcc_inst]);
+	mpc_reg_state->mpcc_top_sel = REG_READ(MPCC_TOP_SEL[mpcc_inst]);
+
+}
+
 static const struct mpc_funcs dcn30_mpc_funcs = {
 	.read_mpcc_state = mpc3_read_mpcc_state,
 	.insert_plane = mpc1_insert_plane,
@@ -1544,6 +1559,7 @@ static const struct mpc_funcs dcn30_mpc_funcs = {
 	.release_rmu = mpcc3_release_rmu,
 	.power_on_mpc_mem_pwr = mpc3_power_on_ogam_lut,
 	.get_mpc_out_mux = mpc1_get_mpc_out_mux,
+	.mpc_read_reg_state = mpc3_read_reg_state,
 	.set_bg_color = mpc1_set_bg_color,
 	.set_mpc_mem_lp_mode = mpc3_set_mpc_mem_lp_mode,
 };
drivers/gpu/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h +5 -0
index 103f29900a2c..e2f147d17178 100644
@@ -1096,6 +1096,11 @@ void mpc3_power_on_ogam_lut(
 	struct mpc *mpc, int mpcc_id,
 	bool power_on);
 
+void mpc3_read_reg_state(
+		struct mpc *mpc,
+		int mpcc_inst,
+		struct dcn_mpc_reg_state *mpc_reg_state);
+
 void mpc3_init_mpcc(struct mpcc *mpcc, int mpcc_inst);
 
 enum dc_lut_mode mpc3_get_ogam_current(
drivers/gpu/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c +1 -0
index 6f0e017a8ae2..83bbbf34bcac 100644
@@ -1020,6 +1020,7 @@ static const struct mpc_funcs dcn32_mpc_funcs = {
 	.release_rmu = NULL,
 	.power_on_mpc_mem_pwr = mpc3_power_on_ogam_lut,
 	.get_mpc_out_mux = mpc1_get_mpc_out_mux,
+	.mpc_read_reg_state = mpc3_read_reg_state,
 	.set_bg_color = mpc1_set_bg_color,
 };
 
drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c +1 -0
index e1a0308dee57..eeac13fdd6f5 100644
@@ -598,6 +598,7 @@ static const struct mpc_funcs dcn401_mpc_funcs = {
 	.release_rmu = NULL,
 	.power_on_mpc_mem_pwr = mpc3_power_on_ogam_lut,
 	.get_mpc_out_mux = mpc1_get_mpc_out_mux,
+	.mpc_read_reg_state = mpc3_read_reg_state,
 	.set_bg_color = mpc1_set_bg_color,
 	.set_movable_cm_location = mpc401_set_movable_cm_location,
 	.update_3dlut_fast_load_select = mpc401_update_3dlut_fast_load_select,
drivers/gpu/drm/amd/display/dc/opp/dcn10/dcn10_opp.c +13 -1
index 71e9288d60ed..45d418636d0c 100644
@@ -372,6 +372,17 @@ void opp1_pipe_clock_control(struct output_pixel_processor *opp, bool enable)
 	REG_UPDATE(OPP_PIPE_CONTROL, OPP_PIPE_CLOCK_EN, regval);
 }
 
+
+void opp1_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state)
+{
+	struct dcn10_opp *oppn10 = TO_DCN10_OPP(opp);
+
+	opp_reg_state->fmt_control = REG_READ(FMT_CONTROL);
+	opp_reg_state->opp_pipe_control = REG_READ(OPP_PIPE_CONTROL);
+	opp_reg_state->opp_pipe_crc_control = REG_READ(OPP_PIPE_CRC_CONTROL);
+	opp_reg_state->oppbuf_control = REG_READ(OPPBUF_CONTROL);
+}
+
 /*****************************************/
 /* Constructor, Destructor               */
 /*****************************************/
@@ -392,7 +403,8 @@ static const struct opp_funcs dcn10_opp_funcs = {
 		.opp_program_dpg_dimensions = NULL,
 		.dpg_is_blanked = NULL,
 		.dpg_is_pending = NULL,
-		.opp_destroy = opp1_destroy
+		.opp_destroy = opp1_destroy,
+		.opp_read_reg_state = opp1_read_reg_state
 };
 
 void dcn10_opp_construct(struct dcn10_opp *oppn10,
drivers/gpu/drm/amd/display/dc/opp/dcn10/dcn10_opp.h +4 -2
index c87de68a509e..38d0d530a9b7 100644
@@ -63,7 +63,8 @@
 	uint32_t OPPBUF_CONTROL1; \
 	uint32_t OPPBUF_3D_PARAMETERS_0; \
 	uint32_t OPPBUF_3D_PARAMETERS_1; \
-	uint32_t OPP_PIPE_CONTROL
+	uint32_t OPP_PIPE_CONTROL; \
+	uint32_t OPP_PIPE_CRC_CONTROL
 
 #define OPP_MASK_SH_LIST_DCN(mask_sh) \
 	OPP_SF(FMT0_FMT_BIT_DEPTH_CONTROL, FMT_TRUNCATE_EN, mask_sh), \
@@ -153,7 +154,6 @@ struct dcn10_opp {
 	const struct dcn10_opp_registers *regs;
 	const struct dcn10_opp_shift *opp_shift;
 	const struct dcn10_opp_mask *opp_mask;
-
 	bool is_write_to_ram_a_safe;
 };
 
@@ -188,4 +188,6 @@ void opp1_pipe_clock_control(struct output_pixel_processor *opp, bool enable);
 
 void opp1_destroy(struct output_pixel_processor **opp);
 
+void opp1_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state);
+
 #endif
drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.c +13 -0
index f5fe0cac7cb0..ce826a5be4c7 100644
@@ -377,6 +377,18 @@ uint32_t opp2_get_left_edge_extra_pixel_count(struct output_pixel_processor *opp
 		return 0;
 }
 
+void opp2_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state)
+{
+	struct dcn20_opp *oppn20 = TO_DCN20_OPP(opp);
+
+	opp_reg_state->dpg_control = REG_READ(DPG_CONTROL);
+	opp_reg_state->fmt_control = REG_READ(FMT_CONTROL);
+	opp_reg_state->opp_pipe_control = REG_READ(OPP_PIPE_CONTROL);
+	opp_reg_state->opp_pipe_crc_control = REG_READ(OPP_PIPE_CRC_CONTROL);
+	opp_reg_state->oppbuf_control = REG_READ(OPPBUF_CONTROL);
+	opp_reg_state->dscrm_dsc_forward_config = REG_READ(DSCRM_DSC_FORWARD_CONFIG);
+}
+
 /*****************************************/
 /* Constructor, Destructor               */
 /*****************************************/
@@ -395,6 +407,7 @@ static struct opp_funcs dcn20_opp_funcs = {
 		.opp_destroy = opp1_destroy,
 		.opp_program_left_edge_extra_pixel = opp2_program_left_edge_extra_pixel,
 		.opp_get_left_edge_extra_pixel_count = opp2_get_left_edge_extra_pixel_count,
+		.opp_read_reg_state = opp2_read_reg_state
 };
 
 void dcn20_opp_construct(struct dcn20_opp *oppn20,
drivers/gpu/drm/amd/display/dc/opp/dcn20/dcn20_opp.h +5 -1
index 34936e6c49f3..fb0c047c1788 100644
@@ -59,7 +59,8 @@
 	uint32_t DPG_COLOUR_G_Y; \
 	uint32_t DPG_COLOUR_R_CR; \
 	uint32_t DPG_RAMP_CONTROL; \
-	uint32_t DPG_STATUS
+	uint32_t DPG_STATUS; \
+	uint32_t DSCRM_DSC_FORWARD_CONFIG
 
 #define OPP_DPG_MASK_SH_LIST(mask_sh) \
 	OPP_SF(DPG0_DPG_CONTROL, DPG_EN, mask_sh), \
@@ -171,4 +172,7 @@ void opp2_program_left_edge_extra_pixel (
 
 uint32_t opp2_get_left_edge_extra_pixel_count(struct output_pixel_processor *opp,
 		enum dc_pixel_encoding pixel_encoding, bool is_primary);
+
+void opp2_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state);
+
 #endif
drivers/gpu/drm/amd/display/dc/opp/dcn35/dcn35_opp.c +13 -0
index 3542b51c9aac..e11c4e16402f 100644
@@ -51,3 +51,16 @@ void dcn35_opp_set_fgcg(struct dcn20_opp *oppn20, bool enable)
 {
 	REG_UPDATE(OPP_TOP_CLK_CONTROL, OPP_FGCG_REP_DIS, !enable);
 }
+
+void dcn35_opp_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state)
+{
+	struct dcn20_opp *oppn20 = TO_DCN20_OPP(opp);
+
+	opp_reg_state->dpg_control = REG_READ(DPG_CONTROL);
+	opp_reg_state->fmt_control = REG_READ(FMT_CONTROL);
+	opp_reg_state->opp_abm_control = REG_READ(OPP_ABM_CONTROL);
+	opp_reg_state->opp_pipe_control = REG_READ(OPP_PIPE_CONTROL);
+	opp_reg_state->opp_pipe_crc_control = REG_READ(OPP_PIPE_CRC_CONTROL);
+	opp_reg_state->oppbuf_control = REG_READ(OPPBUF_CONTROL);
+	opp_reg_state->dscrm_dsc_forward_config = REG_READ(DSCRM_DSC_FORWARD_CONFIG);
+}
drivers/gpu/drm/amd/display/dc/opp/dcn35/dcn35_opp.h +3 -1
index a9a413527801..c6cace90e8f2 100644
@@ -31,7 +31,8 @@
 
 #define OPP_REG_VARIABLE_LIST_DCN3_5  \
 	OPP_REG_VARIABLE_LIST_DCN2_0; \
-	uint32_t OPP_TOP_CLK_CONTROL
+	uint32_t OPP_TOP_CLK_CONTROL; \
+	uint32_t OPP_ABM_CONTROL
 
 #define OPP_MASK_SH_LIST_DCN35(mask_sh)  \
 	OPP_MASK_SH_LIST_DCN20(mask_sh), \
@@ -64,4 +65,5 @@ void dcn35_opp_construct(struct dcn20_opp *oppn20,
 
 void dcn35_opp_set_fgcg(struct dcn20_opp *oppn20, bool enable);
 
+void dcn35_opp_read_reg_state(struct output_pixel_processor *opp, struct dcn_opp_reg_state *opp_reg_state);
 #endif
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h +37 -1
index 8b2a8455eb56..803bcc25601c 100644
@@ -209,7 +209,43 @@
 	uint32_t OPTC_WIDTH_CONTROL2; \
 	uint32_t OTG_PSTATE_REGISTER; \
 	uint32_t OTG_PIPE_UPDATE_STATUS; \
-	uint32_t INTERRUPT_DEST
+	uint32_t INTERRUPT_DEST; \
+	uint32_t OPTC_INPUT_SPARE_REGISTER; \
+	uint32_t OPTC_RSMU_UNDERFLOW; \
+	uint32_t OPTC_UNDERFLOW_THRESHOLD; \
+	uint32_t OTG_COUNT_CONTROL; \
+	uint32_t OTG_COUNT_RESET; \
+	uint32_t OTG_CRC_SIG_BLUE_CONTROL_MASK; \
+	uint32_t OTG_CRC_SIG_RED_GREEN_MASK; \
+	uint32_t OTG_DLPC_CONTROL; \
+	uint32_t OTG_DRR_CONTROL2; \
+	uint32_t OTG_DRR_TIMING_INT_STATUS; \
+	uint32_t OTG_GLOBAL_CONTROL3; \
+	uint32_t OTG_GLOBAL_SYNC_STATUS; \
+	uint32_t OTG_GSL_VSYNC_GAP; \
+	uint32_t OTG_INTERLACE_STATUS; \
+	uint32_t OTG_INTERRUPT_CONTROL; \
+	uint32_t OTG_LONG_VBLANK_STATUS; \
+	uint32_t OTG_MANUAL_FORCE_VSYNC_NEXT_LINE; \
+	uint32_t OTG_MASTER_EN; \
+	uint32_t OTG_PIXEL_DATA_READBACK0; \
+	uint32_t OTG_PIXEL_DATA_READBACK1; \
+	uint32_t OTG_REQUEST_CONTROL; \
+	uint32_t OTG_SNAPSHOT_CONTROL; \
+	uint32_t OTG_SNAPSHOT_FRAME; \
+	uint32_t OTG_SNAPSHOT_POSITION; \
+	uint32_t OTG_SNAPSHOT_STATUS; \
+	uint32_t OTG_SPARE_REGISTER; \
+	uint32_t OTG_STATUS_HV_COUNT; \
+	uint32_t OTG_STATUS_VF_COUNT; \
+	uint32_t OTG_STEREO_FORCE_NEXT_EYE; \
+	uint32_t OTG_TRIG_MANUAL_CONTROL; \
+	uint32_t OTG_TRIGB_CNTL; \
+	uint32_t OTG_TRIGB_MANUAL_TRIG; \
+	uint32_t OTG_UPDATE_LOCK; \
+	uint32_t OTG_V_TOTAL_INT_STATUS; \
+	uint32_t OTG_VSYNC_NOM_INT_STATUS
+
 
 struct dcn_optc_registers {
 	OPTC_REG_VARIABLE_LIST_DCN;
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c +131 -0

143 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.h +2 -0
index 0f72c274f40b..98f7d2e299c5 100644
@@ -274,4 +274,6 @@ void optc3_init_odm(struct timing_generator *optc);
 void optc31_read_otg_state(struct timing_generator *optc,
 		struct dcn_otg_state *s);
 
+void optc31_read_reg_state(struct timing_generator *optc, struct dcn_optc_reg_state *optc_reg_state);
+
 #endif /* __DC_OPTC_DCN31_H__ */
drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c +1 -0
index 4a2caca37255..43ff957288b2 100644
@@ -256,6 +256,7 @@ static const struct timing_generator_funcs dcn314_tg_funcs = {
 		.set_h_timing_div_manual_mode = optc314_set_h_timing_div_manual_mode,
 		.is_two_pixels_per_container = optc1_is_two_pixels_per_container,
 		.read_otg_state = optc31_read_otg_state,
+		.optc_read_reg_state = optc31_read_reg_state,
 };
 
 void dcn314_timing_generator_init(struct optc *optc1)
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c +1 -0
index b2b226bcd871..3dcb0d0c931c 100644
@@ -365,6 +365,7 @@ static const struct timing_generator_funcs dcn32_tg_funcs = {
 		.get_otg_double_buffer_pending = optc3_get_otg_update_pending,
 		.get_pipe_update_pending = optc3_get_pipe_update_pending,
 		.read_otg_state = optc31_read_otg_state,
+		.optc_read_reg_state = optc31_read_reg_state,
 };
 
 void dcn32_timing_generator_init(struct optc *optc1)
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c +1 -0
index 52d5ea98c86b..f699e95059f3 100644
@@ -511,6 +511,7 @@ static const struct timing_generator_funcs dcn35_tg_funcs = {
 		.set_long_vtotal = optc35_set_long_vtotal,
 		.is_two_pixels_per_container = optc1_is_two_pixels_per_container,
 		.read_otg_state = optc31_read_otg_state,
+		.optc_read_reg_state = optc31_read_reg_state,
 };
 
 void dcn35_timing_generator_init(struct optc *optc1)
drivers/gpu/drm/amd/display/dc/optc/dcn401/dcn401_optc.c +1 -0
index 5af13706e601..a8e978d1fae8 100644
@@ -533,6 +533,7 @@ static const struct timing_generator_funcs dcn401_tg_funcs = {
 		.set_vupdate_keepout = optc401_set_vupdate_keepout,
 		.wait_update_lock_status = optc401_wait_update_lock_status,
 		.read_otg_state = optc31_read_otg_state,
+		.optc_read_reg_state = optc31_read_reg_state,
 };
 
 void dcn401_timing_generator_init(struct optc *optc1)
Signature · 1 line
2.43.0
author
#10 lore raw

PATCH 10/20 drm/amd/display: update link encoder assignment

In reply to waynelin

From: Meenakshikumar Somasundaram <[email protected]>

[Why]
Map a link encoder instance matching stream encoder instance if possible.

[How]
Get the stream encoder instance and assign the same link encoder instance if available.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 43 ++++++++++++++-----
 1 file changed, 33 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +33 -10
index 8d0cdbf14e17..89fe72820f6a 100644
@@ -2690,17 +2690,40 @@ static inline int find_fixed_dio_link_enc(const struct dc_link *link)
 }
 
 static inline int find_free_dio_link_enc(const struct resource_context *res_ctx,
-		const struct dc_link *link, const struct resource_pool *pool)
+		const struct dc_link *link, const struct resource_pool *pool, struct dc_stream_state *stream)
 {
-	int i;
+	int i, j = -1;
+	int stream_enc_inst = -1;
 	int enc_count = pool->dig_link_enc_count;
 
-	/* for dpia, check preferred encoder first and then the next one */
-	for (i = 0; i < enc_count; i++)
-		if (res_ctx->dio_link_enc_ref_cnts[(link->dpia_preferred_eng_id + i) % enc_count] == 0)
-			break;
+	/* Find stream encoder instance for the stream */
+	if (stream) {
+		for (i = 0; i < pool->pipe_count; i++) {
+			if ((res_ctx->pipe_ctx[i].stream == stream) &&
+				(res_ctx->pipe_ctx[i].stream_res.stream_enc != NULL)) {
+				stream_enc_inst = res_ctx->pipe_ctx[i].stream_res.stream_enc->id;
+				break;
+			}
+		}
+	}
 
-	return (i >= 0 && i < enc_count) ? (link->dpia_preferred_eng_id + i) % enc_count : -1;
+	/* Assign dpia preferred > stream enc instance > available */
+	for (i = 0; i < enc_count; i++) {
+		if (res_ctx->dio_link_enc_ref_cnts[i] == 0) {
+			if (j == -1)
+				j = i;
+
+			if (link->dpia_preferred_eng_id == i) {
+				j = i;
+				break;
+			}
+
+			if (stream_enc_inst == i) {
+				j = stream_enc_inst;
+			}
+		}
+	}
+	return j;
 }
 
 static inline void acquire_dio_link_enc(
@@ -2781,7 +2804,7 @@ static bool add_dio_link_enc_to_ctx(const struct dc *dc,
 		retain_dio_link_enc(res_ctx, enc_index);
 	} else {
 		if (stream->link->is_dig_mapping_flexible)
-			enc_index = find_free_dio_link_enc(res_ctx, stream->link, pool);
+			enc_index = find_free_dio_link_enc(res_ctx, stream->link, pool, stream);
 		else {
 			int link_index = 0;
 
@@ -2791,7 +2814,7 @@ static bool add_dio_link_enc_to_ctx(const struct dc *dc,
 			 * one into the acquiring link.
 			 */
 			if (enc_index >= 0 && is_dio_enc_acquired_by_other_link(stream->link, enc_index, &link_index)) {
-				int new_enc_index = find_free_dio_link_enc(res_ctx, dc->links[link_index], pool);
+				int new_enc_index = find_free_dio_link_enc(res_ctx, dc->links[link_index], pool, stream);
 
 				if (new_enc_index >= 0)
 					swap_dio_link_enc_to_muxable_ctx(context, pool, new_enc_index, enc_index);
@@ -5201,7 +5224,7 @@ struct link_encoder *get_temp_dio_link_enc(
 		enc_index = link->eng_id;
 
 	if (enc_index < 0)
-		enc_index = find_free_dio_link_enc(res_ctx, link, pool);
+		enc_index = find_free_dio_link_enc(res_ctx, link, pool, NULL);
 
 	if (enc_index >= 0)
 		link_enc = pool->link_encoders[enc_index];
Signature · 1 line
2.43.0
author
#11 lore raw

PATCH 11/20 drm/amd/display: Remove dc param from check_update

In reply to waynelin

From: Dominik Kaszewski <[email protected]>

[Why]
dc_check_update_surfaces_for_stream should not have access to entire DC, especially not a mutable one. Concurrent checks should be able to run independently of one another, without risk of changing state.

[How]
* Replace dc and stream_status structs with new dc_check_config.
* Move required fields from dc_debug and dc_caps to dc_check_config.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 51 +++++++++----------
 drivers/gpu/drm/amd/display/dc/dc.h           | 17 ++++---
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  5 +-
 .../dc/resource/dce100/dce100_resource.c      |  7 ++-
 .../dc/resource/dce110/dce110_resource.c      |  5 +-
 .../dc/resource/dce112/dce112_resource.c      |  7 ++-
 .../dc/resource/dce120/dce120_resource.c      |  8 ++-
 .../dc/resource/dce80/dce80_resource.c        |  8 ++-
 .../dc/resource/dcn10/dcn10_resource.c        |  7 ++-
 .../dc/resource/dcn20/dcn20_resource.c        |  6 ++-
 .../dc/resource/dcn201/dcn201_resource.c      |  6 ++-
 .../dc/resource/dcn21/dcn21_resource.c        |  6 ++-
 .../dc/resource/dcn30/dcn30_resource.c        |  6 ++-
 .../dc/resource/dcn301/dcn301_resource.c      |  6 ++-
 .../dc/resource/dcn302/dcn302_resource.c      |  6 ++-
 .../dc/resource/dcn303/dcn303_resource.c      |  6 ++-
 .../dc/resource/dcn31/dcn31_resource.c        |  6 ++-
 .../dc/resource/dcn314/dcn314_resource.c      |  6 ++-
 .../dc/resource/dcn315/dcn315_resource.c      |  6 ++-
 .../dc/resource/dcn316/dcn316_resource.c      |  6 ++-
 .../dc/resource/dcn32/dcn32_resource.c        |  6 ++-
 .../dc/resource/dcn321/dcn321_resource.c      |  6 ++-
 .../dc/resource/dcn35/dcn35_resource.c        |  6 ++-
 .../dc/resource/dcn351/dcn351_resource.c      |  6 ++-
 .../dc/resource/dcn36/dcn36_resource.c        |  6 ++-
 .../dc/resource/dcn401/dcn401_resource.c      |  6 ++-
 26 files changed, 152 insertions(+), 65 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +23 -28
index 246ea9754810..2eb02345dadd 100644
@@ -1148,8 +1148,8 @@ static bool dc_construct(struct dc *dc,
 	/* set i2c speed if not done by the respective dcnxxx__resource.c */
 	if (dc->caps.i2c_speed_in_khz_hdcp == 0)
 		dc->caps.i2c_speed_in_khz_hdcp = dc->caps.i2c_speed_in_khz;
-	if (dc->caps.max_optimizable_video_width == 0)
-		dc->caps.max_optimizable_video_width = 5120;
+	if (dc->check_config.max_optimizable_video_width == 0)
+		dc->check_config.max_optimizable_video_width = 5120;
 	dc->clk_mgr = dc_clk_mgr_create(dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg);
 	if (!dc->clk_mgr)
 		goto fail;
@@ -2656,7 +2656,7 @@ static bool is_surface_in_context(
 	return false;
 }
 
-static enum surface_update_type get_plane_info_update_type(const struct dc *dc, const struct dc_surface_update *u)
+static enum surface_update_type get_plane_info_update_type(const struct dc_surface_update *u)
 {
 	union surface_update_flags *update_flags = &u->surface->update_flags;
 	enum surface_update_type update_type = UPDATE_TYPE_FAST;
@@ -2760,7 +2760,7 @@ static enum surface_update_type get_plane_info_update_type(const struct dc *dc,
 }
 
 static enum surface_update_type get_scaling_info_update_type(
-		const struct dc *dc,
+		const struct dc_check_config *check_config,
 		const struct dc_surface_update *u)
 {
 	union surface_update_flags *update_flags = &u->surface->update_flags;
@@ -2790,7 +2790,7 @@ static enum surface_update_type get_scaling_info_update_type(
 			/* Making dst rect smaller requires a bandwidth change */
 			update_flags->bits.bandwidth_change = 1;
 
-		if (u->scaling_info->src_rect.width > dc->caps.max_optimizable_video_width &&
+		if (u->scaling_info->src_rect.width > check_config->max_optimizable_video_width &&
 			(u->scaling_info->clip_rect.width > u->surface->clip_rect.width ||
 			 u->scaling_info->clip_rect.height > u->surface->clip_rect.height))
 			 /* Changing clip size of a large surface may result in MPC slice count change */
@@ -2817,7 +2817,8 @@ static enum surface_update_type get_scaling_info_update_type(
 	return UPDATE_TYPE_FAST;
 }
 
-static enum surface_update_type det_surface_update(const struct dc *dc,
+static enum surface_update_type det_surface_update(
+		const struct dc_check_config *check_config,
 		const struct dc_surface_update *u)
 {
 	enum surface_update_type type;
@@ -2831,10 +2832,10 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
 
 	update_flags->raw = 0; // Reset all flags
 
-	type = get_plane_info_update_type(dc, u);
+	type = get_plane_info_update_type(u);
 	elevate_update_type(&overall_type, type);
 
-	type = get_scaling_info_update_type(dc, u);
+	type = get_scaling_info_update_type(check_config, u);
 	elevate_update_type(&overall_type, type);
 
 	if (u->flip_addr) {
@@ -2911,7 +2912,7 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
 		elevate_update_type(&overall_type, type);
 	}
 
-	if (dc->debug.enable_legacy_fast_update &&
+	if (check_config->enable_legacy_fast_update &&
 			(update_flags->bits.gamma_change ||
 			update_flags->bits.gamut_remap_change ||
 			update_flags->bits.input_csc_change ||
@@ -2946,11 +2947,11 @@ static void force_immediate_gsl_plane_flip(struct dc *dc, struct dc_surface_upda
 }
 
 static enum surface_update_type check_update_surfaces_for_stream(
-		struct dc *dc,
+		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		const struct dc_stream_status *stream_status)
+		struct dc_stream_update *stream_update
+)
 {
 	int i;
 	enum surface_update_type overall_type = UPDATE_TYPE_FAST;
@@ -2972,7 +2973,7 @@ static enum surface_update_type check_update_surfaces_for_stream(
 			stream_update->integer_scaling_update)
 			su_flags->bits.scaling = 1;
 
-		if (dc->debug.enable_legacy_fast_update && stream_update->out_transfer_func)
+		if (check_config->enable_legacy_fast_update && stream_update->out_transfer_func)
 			su_flags->bits.out_tf = 1;
 
 		if (stream_update->abm_level)
@@ -3016,13 +3017,13 @@ static enum surface_update_type check_update_surfaces_for_stream(
 		/* Output transfer function changes do not require bandwidth recalculation,
 		 * so don't trigger a full update
 		 */
-		if (!dc->debug.enable_legacy_fast_update && stream_update->out_transfer_func)
+		if (!check_config->enable_legacy_fast_update && stream_update->out_transfer_func)
 			su_flags->bits.out_tf = 1;
 	}
 
 	for (i = 0 ; i < surface_count; i++) {
 		enum surface_update_type type =
-				det_surface_update(dc, &updates[i]);
+				det_surface_update(check_config, &updates[i]);
 
 		elevate_update_type(&overall_type, type);
 	}
@@ -3036,22 +3037,17 @@ static enum surface_update_type check_update_surfaces_for_stream(
  * See :c:type:`enum surface_update_type <surface_update_type>` for explanation of update types
  */
 enum surface_update_type dc_check_update_surfaces_for_stream(
-		struct dc *dc,
+		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		const struct dc_stream_status *stream_status)
+		struct dc_stream_update *stream_update)
 {
-	int i;
-	enum surface_update_type type;
-
 	if (stream_update)
 		stream_update->stream->update_flags.raw = 0;
-	for (i = 0; i < surface_count; i++)
+	for (size_t i = 0; i < surface_count; i++)
 		updates[i].surface->update_flags.raw = 0;
 
-	type = check_update_surfaces_for_stream(dc, updates, surface_count, stream_update, stream_status);
-	return type;
+	return check_update_surfaces_for_stream(check_config, updates, surface_count, stream_update);
 }
 
 static struct dc_stream_status *stream_get_status(
@@ -3472,8 +3468,7 @@ static bool update_planes_and_stream_state(struct dc *dc,
 
 	context = dc->current_state;
 	update_type = dc_check_update_surfaces_for_stream(
-			dc, srf_updates, surface_count, stream_update, stream_status);
-
+			&dc->check_config, srf_updates, surface_count, stream_update);
 	if (full_update_required_weak(dc, srf_updates, surface_count, stream_update, stream))
 		update_type = UPDATE_TYPE_FULL;
 
@@ -5208,7 +5203,7 @@ static bool update_planes_and_stream_v2(struct dc *dc,
 		commit_minimal_transition_state_in_dc_update(dc, context, stream,
 				srf_updates, surface_count);
 
-	if (is_fast_update_only && !dc->debug.enable_legacy_fast_update) {
+	if (is_fast_update_only && !dc->check_config.enable_legacy_fast_update) {
 		commit_planes_for_stream_fast(dc,
 				srf_updates,
 				surface_count,
@@ -5251,7 +5246,7 @@ static void commit_planes_and_stream_update_on_current_context(struct dc *dc,
 			stream_update);
 	if (fast_update_only(dc, fast_update, srf_updates, surface_count,
 			stream_update, stream) &&
-			!dc->debug.enable_legacy_fast_update)
+			!dc->check_config.enable_legacy_fast_update)
 		commit_planes_for_stream_fast(dc,
 				srf_updates,
 				surface_count,
drivers/gpu/drm/amd/display/dc/dc.h +10 -7
index ea629c06ec53..b80bcbf7ae13 100644
@@ -286,6 +286,15 @@ struct dc_scl_caps {
 	bool sharpener_support;
 };
 
+struct dc_check_config {
+	/**
+	 * max video plane width that can be safely assumed to be always
+	 * supported by single DPP pipe.
+	 */
+	unsigned int max_optimizable_video_width;
+	bool enable_legacy_fast_update;
+};
+
 struct dc_caps {
 	uint32_t max_streams;
 	uint32_t max_links;
@@ -301,11 +310,6 @@ struct dc_caps {
 	unsigned int max_cursor_size;
 	unsigned int max_buffered_cursor_size;
 	unsigned int max_video_width;
-	/*
-	 * max video plane width that can be safely assumed to be always
-	 * supported by single DPP pipe.
-	 */
-	unsigned int max_optimizable_video_width;
 	unsigned int min_horizontal_blanking_period;
 	int linear_pitch_alignment;
 	bool dcc_const_color;
@@ -1128,7 +1132,6 @@ struct dc_debug_options {
 	uint32_t fpo_vactive_min_active_margin_us;
 	uint32_t fpo_vactive_max_blank_us;
 	bool enable_hpo_pg_support;
-	bool enable_legacy_fast_update;
 	bool disable_dc_mode_overwrite;
 	bool replay_skip_crtc_disabled;
 	bool ignore_pg;/*do nothing, let pmfw control it*/
@@ -1160,7 +1163,6 @@ struct dc_debug_options {
 	bool enable_ips_visual_confirm;
 	unsigned int sharpen_policy;
 	unsigned int scale_to_sharpness_policy;
-	bool skip_full_updated_if_possible;
 	unsigned int enable_oled_edp_power_up_opt;
 	bool enable_hblank_borrow;
 	bool force_subvp_df_throttle;
@@ -1711,6 +1713,7 @@ struct dc {
 	struct dc_debug_options debug;
 	struct dc_versions versions;
 	struct dc_caps caps;
+	struct dc_check_config check_config;
 	struct dc_cap_funcs cap_funcs;
 	struct dc_config config;
 	struct dc_bounding_box_overrides bb_overrides;
drivers/gpu/drm/amd/display/dc/dc_stream.h +2 -3
index 76cf9fdedab0..c68153c77972 100644
@@ -474,11 +474,10 @@ void dc_enable_stereo(
 void dc_trigger_sync(struct dc *dc, struct dc_state *context);
 
 enum surface_update_type dc_check_update_surfaces_for_stream(
-		struct dc *dc,
+		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		const struct dc_stream_status *stream_status);
+		struct dc_stream_update *stream_update);
 
 /**
  * Create a new default stream for the requested sink
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +5 -2
index c4b4dc3ad8c9..550466de1a66 100644
@@ -402,8 +402,10 @@ static const struct dc_plane_cap plane_cap = {
 	}
 };
 
-static const struct dc_debug_options debug_defaults = {
-		.enable_legacy_fast_update = true,
+static const struct dc_debug_options debug_defaults = { 0 };
+
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
 };
 
 #define CTX  ctx
@@ -1093,6 +1095,7 @@ static bool dce100_resource_construct(
 	dc->caps.disable_dp_clk_share = true;
 	dc->caps.extended_aux_timeout_support = false;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	for (i = 0; i < pool->base.pipe_count; i++) {
 		pool->base.timing_generators[i] =
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c +4 -1
index cccde5a6f3cd..9e14ffb3c942 100644
@@ -424,7 +424,9 @@ static const struct dc_plane_cap plane_cap = {
 		64
 };
 
-static const struct dc_debug_options debug_defaults = {
+static const struct dc_debug_options debug_defaults = { 0 };
+
+static const struct dc_check_config config_defaults = {
 		.enable_legacy_fast_update = true,
 };
 
@@ -1376,6 +1378,7 @@ static bool dce110_resource_construct(
 	dc->caps.is_apu = true;
 	dc->caps.extended_aux_timeout_support = false;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	/*************************************************
 	 *  Create resources                             *
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c +5 -2
index 869a8e515fc0..62977bcdeaa0 100644
@@ -429,8 +429,10 @@ static const struct dc_plane_cap plane_cap = {
 	64
 };
 
-static const struct dc_debug_options debug_defaults = {
-		.enable_legacy_fast_update = true,
+static const struct dc_debug_options debug_defaults = { 0 };
+
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
 };
 
 #define CTX  ctx
@@ -1247,6 +1249,7 @@ static bool dce112_resource_construct(
 	dc->caps.dual_link_dvi = true;
 	dc->caps.extended_aux_timeout_support = false;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	/*************************************************
 	 *  Create resources                             *
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +6 -2
index 540e04ec1e2d..0770ea37183f 100644
@@ -526,8 +526,11 @@ static const struct dc_plane_cap plane_cap = {
 };
 
 static const struct dc_debug_options debug_defaults = {
-		.disable_clock_gate = true,
-		.enable_legacy_fast_update = true,
+	.disable_clock_gate = true,
+};
+
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
 };
 
 static struct clock_source *dce120_clock_source_create(
@@ -1089,6 +1092,7 @@ static bool dce120_resource_construct(
 	dc->caps.psp_setup_panel_mode = true;
 	dc->caps.extended_aux_timeout_support = false;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	/*************************************************
 	 *  Create resources                             *
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +6 -2
index 5b7769745202..c4a56ec60b82 100644
@@ -418,8 +418,10 @@ static const struct dc_plane_cap plane_cap = {
 	}
 };
 
-static const struct dc_debug_options debug_defaults = {
-		.enable_legacy_fast_update = true,
+static const struct dc_debug_options debug_defaults = { 0 };
+
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
 };
 
 static const struct dce_dmcu_registers dmcu_regs = {
@@ -919,6 +921,7 @@ static bool dce80_construct(
 	dc->caps.dual_link_dvi = true;
 	dc->caps.extended_aux_timeout_support = false;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	/*************************************************
 	 *  Create resources                             *
@@ -1320,6 +1323,7 @@ static bool dce83_construct(
 	dc->caps.min_horizontal_blanking_period = 80;
 	dc->caps.is_apu = true;
 	dc->debug = debug_defaults;
+	dc->check_config = config_defaults;
 
 	/*************************************************
 	 *  Create resources                             *
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +6 -1
index 652c05c35494..f12367adf145 100644
@@ -556,10 +556,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.recovery_enabled = false, /*enable this by default after testing.*/
 		.max_downscale_src_width = 3840,
 		.underflow_assert_delay_us = 0xFFFFFFFF,
-		.enable_legacy_fast_update = true,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = true,
+};
+
 static void dcn10_dpp_destroy(struct dpp **dpp)
 {
 	kfree(TO_DCN10_DPP(*dpp));
@@ -1395,6 +1398,8 @@ static bool dcn10_resource_construct(
 	dc->caps.color.mpc.ogam_rom_caps.pq = 0;
 	dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
 	dc->caps.color.mpc.ocsc = 0;
+	dc->debug = debug_defaults_drv;
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +5 -1
index 30f155dc54e5..6679c1a14f2f 100644
@@ -718,10 +718,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.scl_reset_length10 = true,
 		.sanity_checks = false,
 		.underflow_assert_delay_us = 0xFFFFFFFF,
-		.enable_legacy_fast_update = true,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = true,
+};
+
 void dcn20_dpp_destroy(struct dpp **dpp)
 {
 	kfree(TO_DCN20_DPP(*dpp));
@@ -2471,6 +2474,7 @@ static bool dcn20_resource_construct(
 	dc->caps.color.mpc.ocsc = 1;
 
 	dc->caps.dp_hdmi21_pcon_support = true;
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c +5 -1
index 9a80bebcee48..055107843a70 100644
@@ -614,10 +614,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.sanity_checks = false,
 		.underflow_assert_delay_us = 0xFFFFFFFF,
 		.enable_tri_buf = true,
-		.enable_legacy_fast_update = true,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = true,
+};
+
 static void dcn201_dpp_destroy(struct dpp **dpp)
 {
 	kfree(TO_DCN201_DPP(*dpp));
@@ -1151,6 +1154,7 @@ static bool dcn201_resource_construct(
 	dc->caps.color.mpc.ocsc = 1;
 
 	dc->debug = debug_defaults_drv;
+	dc->check_config = config_defaults;
 
 	/*a0 only, remove later*/
 	dc->work_arounds.no_connect_phy_config  = true;
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +5 -1
index 918742a42ded..2060acd5ae09 100644
@@ -626,10 +626,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.usbc_combo_phy_reset_wa = true,
 		.dmub_command_table = true,
 		.use_max_lb = true,
-		.enable_legacy_fast_update = true,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 		.psr = {
 			.disable_psr = false,
@@ -1458,6 +1461,7 @@ static bool dcn21_resource_construct(
 	dc->caps.color.mpc.ocsc = 1;
 
 	dc->caps.dp_hdmi21_pcon_support = true;
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +5 -1
index ff63f59ff928..d0ebb733e802 100644
@@ -727,10 +727,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.dmub_command_table = true,
 	.use_max_lb = true,
 	.exit_idle_opt_for_cursor_updates = true,
-	.enable_legacy_fast_update = false,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = false,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -2374,6 +2377,7 @@ static bool dcn30_resource_construct(
 			dc->caps.vbios_lttpr_aware = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +5 -1
index 82a205a7c25c..3ad6a3d4858e 100644
@@ -701,10 +701,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.dmub_command_table = true,
 	.use_max_lb = false,
 	.exit_idle_opt_for_cursor_updates = true,
-	.enable_legacy_fast_update = true,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static void dcn301_dpp_destroy(struct dpp **dpp)
 {
 	kfree(TO_DCN20_DPP(*dpp));
@@ -1498,6 +1501,7 @@ static bool dcn301_resource_construct(
 		bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios, &is_vbios_interop_enabled);
 		dc->caps.vbios_lttpr_aware = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +5 -1
index 61623cb518d9..c0d4a1dc94f8 100644
@@ -98,10 +98,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.dmub_command_table = true,
 		.use_max_lb = true,
 		.exit_idle_opt_for_cursor_updates = true,
-		.enable_legacy_fast_update = false,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = false,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 		.psr = {
 			.disable_psr = false,
@@ -1290,6 +1293,7 @@ static bool dcn302_resource_construct(
 				&is_vbios_interop_enabled);
 		dc->caps.vbios_lttpr_aware = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +5 -1
index 02b9a84f2db3..75e09c2c283e 100644
@@ -98,10 +98,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 		.dmub_command_table = true,
 		.use_max_lb = true,
 		.exit_idle_opt_for_cursor_updates = true,
-		.enable_legacy_fast_update = false,
 		.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+		.enable_legacy_fast_update = false,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 		.psr = {
 			.disable_psr = false,
@@ -1234,6 +1237,7 @@ static bool dcn303_resource_construct(
 		bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios, &is_vbios_interop_enabled);
 		dc->caps.vbios_lttpr_aware = (bp_query_result == BP_RESULT_OK) && !!is_vbios_interop_enabled;
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +5 -1
index 3ed7f50554e2..0d667b54ccf8 100644
@@ -888,12 +888,15 @@ static const struct dc_debug_options debug_defaults_drv = {
 		}
 	},
 	.disable_z10 = true,
-	.enable_legacy_fast_update = true,
 	.enable_z9_disable_interface = true, /* Allow support for the PMFW interface for disable Z9*/
 	.dml_hostvm_override = DML_HOSTVM_OVERRIDE_FALSE,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1978,6 +1981,7 @@ static bool dcn31_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +5 -1
index d4917a35b991..3ccde75a4ecb 100644
@@ -924,12 +924,15 @@ static const struct dc_debug_options debug_defaults_drv = {
 	},
 
 	.seamless_boot_odm_combine = true,
-	.enable_legacy_fast_update = true,
 	.using_dml2 = false,
 	.disable_dsc_power_gate = true,
 	.min_disp_clk_khz = 100000,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1910,6 +1913,7 @@ static bool dcn314_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +5 -1
index 82cc78c291d8..38f6328cda92 100644
@@ -887,11 +887,14 @@ static const struct dc_debug_options debug_defaults_drv = {
 			.afmt = true,
 		}
 	},
-	.enable_legacy_fast_update = true,
 	.psr_power_use_phy_fsm = 0,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1939,6 +1942,7 @@ static bool dcn315_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +5 -1
index 636110e48d01..5a95dd54cb42 100644
@@ -882,10 +882,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 			.afmt = true,
 		}
 	},
-	.enable_legacy_fast_update = true,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1815,6 +1818,7 @@ static bool dcn316_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +5 -1
index 4c2e8aa96d1f..81e64e17d0cb 100644
@@ -738,10 +738,13 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.disable_dp_plus_plus_wa = true,
 	.fpo_vactive_min_active_margin_us = 200,
 	.fpo_vactive_max_blank_us = 1000,
-	.enable_legacy_fast_update = false,
 	.disable_stutter_for_wm_program = true
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = false,
+};
+
 static struct dce_aux *dcn32_aux_engine_create(
 	struct dc_context *ctx,
 	uint32_t inst)
@@ -2294,6 +2297,7 @@ static bool dcn32_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +5 -1
index ad214986f7ac..3466ca34c93f 100644
@@ -731,11 +731,14 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.disable_subvp_high_refresh = false,
 	.fpo_vactive_min_active_margin_us = 200,
 	.fpo_vactive_max_blank_us = 1000,
-	.enable_legacy_fast_update = false,
 	.disable_dc_mode_overwrite = true,
 	.using_dml2 = false,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = false,
+};
+
 static struct dce_aux *dcn321_aux_engine_create(
 	struct dc_context *ctx,
 	uint32_t inst)
@@ -1797,6 +1800,7 @@ static bool dcn321_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +5 -1
index 3a83a63d2116..ef69898d2cc5 100644
@@ -767,7 +767,6 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.using_dml2 = true,
 	.support_eDP1_5 = true,
 	.enable_hpo_pg_support = false,
-	.enable_legacy_fast_update = true,
 	.enable_single_display_2to1_odm_policy = true,
 	.disable_idle_power_optimizations = false,
 	.dmcub_emulation = false,
@@ -788,6 +787,10 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.min_disp_clk_khz = 50000,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1946,6 +1949,7 @@ static bool dcn35_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +5 -1
index d00cc4030be3..f3c614c4490c 100644
@@ -747,7 +747,6 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.using_dml2 = true,
 	.support_eDP1_5 = true,
 	.enable_hpo_pg_support = false,
-	.enable_legacy_fast_update = true,
 	.enable_single_display_2to1_odm_policy = true,
 	.disable_idle_power_optimizations = false,
 	.dmcub_emulation = false,
@@ -768,6 +767,10 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.min_disp_clk_khz = 50000,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1917,6 +1920,7 @@ static bool dcn351_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +5 -1
index f4b28617b2de..6469d5fe2e6d 100644
@@ -748,7 +748,6 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.using_dml2 = true,
 	.support_eDP1_5 = true,
 	.enable_hpo_pg_support = false,
-	.enable_legacy_fast_update = true,
 	.enable_single_display_2to1_odm_policy = true,
 	.disable_idle_power_optimizations = false,
 	.dmcub_emulation = false,
@@ -769,6 +768,10 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.min_disp_clk_khz = 50000,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = true,
+};
+
 static const struct dc_panel_config panel_config_defaults = {
 	.psr = {
 		.disable_psr = false,
@@ -1918,6 +1921,7 @@ static bool dcn36_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +5 -1
index 8e2d3781752c..130058d7a70c 100644
@@ -721,7 +721,6 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.alloc_extra_way_for_cursor = true,
 	.min_prefetch_in_strobe_ns = 60000, // 60us
 	.disable_unbounded_requesting = false,
-	.enable_legacy_fast_update = false,
 	.dcc_meta_propagation_delay_us = 10,
 	.fams_version = {
 		.minor = 1,
@@ -737,6 +736,10 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.force_cositing = CHROMA_COSITING_NONE + 1,
 };
 
+static const struct dc_check_config config_defaults = {
+	.enable_legacy_fast_update = false,
+};
+
 static struct dce_aux *dcn401_aux_engine_create(
 	struct dc_context *ctx,
 	uint32_t inst)
@@ -1995,6 +1998,7 @@ static bool dcn401_resource_construct(
 			dc->caps.vbios_lttpr_aware = true;
 		}
 	}
+	dc->check_config = config_defaults;
 
 	if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
 		dc->debug = debug_defaults_drv;
Signature · 1 line
2.43.0
author
#12 lore raw

PATCH 12/20 drm/amd/display: init dispclk from bootup clock for DCN315

In reply to waynelin

From: Zhongwei Zhang <[email protected]>

[Why]
Driver does not pick up and save vbios's clocks during init clocks, the dispclk in clk_mgr will keep 0.
OS might change the timing (lower the pixel clock) after boot. Then driver will set the dispclk to lower when safe_to_lower is false, for in clk_mgr dispclk is zero, it's illegal and causes garbage.

[How]
Dump and save the vbios's clocks, and init the dispclk in dcn315_init_clocks.

---
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c        | 87 ++++++++++++++++++-
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.h        |  1 +
 .../dc/resource/dcn315/dcn315_resource.c      |  1 +
 3 files changed, 87 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +85 -2
index b315ed91e010..3a881451e9da 100644
@@ -40,7 +40,7 @@
 #include "dm_helpers.h"
 
 #include "dc_dmub_srv.h"
-
+#include "reg_helper.h"
 #include "logger_types.h"
 #undef DC_LOGGER
 #define DC_LOGGER \
@@ -48,9 +48,43 @@
 
 #include "link_service.h"
 
+#define MAX_INSTANCE                                        7
+#define MAX_SEGMENT                                         8
+
+struct IP_BASE_INSTANCE {
+	unsigned int segment[MAX_SEGMENT];
+};
+
+struct IP_BASE {
+	struct IP_BASE_INSTANCE instance[MAX_INSTANCE];
+};
+
+static const struct IP_BASE CLK_BASE = { { { { 0x00016C00, 0x02401800, 0, 0, 0, 0, 0, 0 } },
+					{ { 0x00016E00, 0x02401C00, 0, 0, 0, 0, 0, 0 } },
+					{ { 0x00017000, 0x02402000, 0, 0, 0, 0, 0, 0 } },
+					{ { 0x00017200, 0x02402400, 0, 0, 0, 0, 0, 0 } },
+					{ { 0x0001B000, 0x0242D800, 0, 0, 0, 0, 0, 0 } },
+					{ { 0x0001B200, 0x0242DC00, 0, 0, 0, 0, 0, 0 } } } };
+
+#define regCLK1_CLK0_CURRENT_CNT			0x0314
+#define regCLK1_CLK0_CURRENT_CNT_BASE_IDX	0
+#define regCLK1_CLK1_CURRENT_CNT			0x0315
+#define regCLK1_CLK1_CURRENT_CNT_BASE_IDX	0
+#define regCLK1_CLK2_CURRENT_CNT			0x0316
+#define regCLK1_CLK2_CURRENT_CNT_BASE_IDX	0
+#define regCLK1_CLK3_CURRENT_CNT			0x0317
+#define regCLK1_CLK3_CURRENT_CNT_BASE_IDX	0
+#define regCLK1_CLK4_CURRENT_CNT			0x0318
+#define regCLK1_CLK4_CURRENT_CNT_BASE_IDX	0
+#define regCLK1_CLK5_CURRENT_CNT			0x0319
+#define regCLK1_CLK5_CURRENT_CNT_BASE_IDX	0
+
 #define TO_CLK_MGR_DCN315(clk_mgr)\
 	container_of(clk_mgr, struct clk_mgr_dcn315, base)
 
+#define REG(reg_name) \
+	(CLK_BASE.instance[0].segment[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
+
 #define UNSUPPORTED_DCFCLK 10000000
 #define MIN_DPP_DISP_CLK     100000
 
@@ -245,9 +279,38 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
 	dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
 }
 
+static void dcn315_dump_clk_registers_internal(struct dcn35_clk_internal *internal, struct clk_mgr *clk_mgr_base)
+{
+	struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
+
+	// read dtbclk
+	internal->CLK1_CLK4_CURRENT_CNT = REG_READ(CLK1_CLK4_CURRENT_CNT);
+
+	// read dcfclk
+	internal->CLK1_CLK3_CURRENT_CNT = REG_READ(CLK1_CLK3_CURRENT_CNT);
+
+	// read dppclk
+	internal->CLK1_CLK1_CURRENT_CNT = REG_READ(CLK1_CLK1_CURRENT_CNT);
+
+	// read dprefclk
+	internal->CLK1_CLK2_CURRENT_CNT = REG_READ(CLK1_CLK2_CURRENT_CNT);
+
+	// read dispclk
+	internal->CLK1_CLK0_CURRENT_CNT = REG_READ(CLK1_CLK0_CURRENT_CNT);
+}
+
 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)
 {
+	struct dcn35_clk_internal internal = {0};
+
+	dcn315_dump_clk_registers_internal(&internal, clk_mgr_base);
+
+	regs_and_bypass->dcfclk = internal.CLK1_CLK3_CURRENT_CNT / 10;
+	regs_and_bypass->dprefclk = internal.CLK1_CLK2_CURRENT_CNT / 10;
+	regs_and_bypass->dispclk = internal.CLK1_CLK0_CURRENT_CNT / 10;
+	regs_and_bypass->dppclk = internal.CLK1_CLK1_CURRENT_CNT / 10;
+	regs_and_bypass->dtbclk = internal.CLK1_CLK4_CURRENT_CNT / 10;
 	return;
 }
 
@@ -594,13 +657,32 @@ static struct clk_mgr_funcs dcn315_funcs = {
 	.get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz,
 	.get_dtb_ref_clk_frequency = dcn31_get_dtb_ref_freq_khz,
 	.update_clocks = dcn315_update_clocks,
-	.init_clocks = dcn31_init_clocks,
+	.init_clocks = dcn315_init_clocks,
 	.enable_pme_wa = dcn315_enable_pme_wa,
 	.are_clock_states_equal = dcn31_are_clock_states_equal,
 	.notify_wm_ranges = dcn315_notify_wm_ranges
 };
 extern struct clk_mgr_funcs dcn3_fpga_funcs;
 
+void dcn315_init_clocks(struct clk_mgr *clk_mgr)
+{
+	struct clk_mgr_internal *clk_mgr_int = TO_CLK_MGR_INTERNAL(clk_mgr);
+	uint32_t ref_dtbclk = clk_mgr->clks.ref_dtbclk_khz;
+	struct clk_mgr_dcn315 *clk_mgr_dcn315 = TO_CLK_MGR_DCN315(clk_mgr_int);
+	struct clk_log_info log_info = {0};
+
+	memset(&(clk_mgr->clks), 0, sizeof(struct dc_clocks));
+	// Assumption is that boot state always supports pstate
+	clk_mgr->clks.ref_dtbclk_khz = ref_dtbclk;	// restore ref_dtbclk
+	clk_mgr->clks.p_state_change_support = true;
+	clk_mgr->clks.prev_p_state_change_support = true;
+	clk_mgr->clks.pwr_state = DCN_PWR_STATE_UNKNOWN;
+	clk_mgr->clks.zstate_support = DCN_ZSTATE_SUPPORT_UNKNOWN;
+
+	dcn315_dump_clk_registers(&clk_mgr->boot_snapshot, &clk_mgr_dcn315->base.base, &log_info);
+	clk_mgr->clks.dispclk_khz =  clk_mgr->boot_snapshot.dispclk * 1000;
+}
+
 void dcn315_clk_mgr_construct(
 		struct dc_context *ctx,
 		struct clk_mgr_dcn315 *clk_mgr,
@@ -661,6 +743,7 @@ void dcn315_clk_mgr_construct(
 	/* Saved clocks configured at boot for debug purposes */
 	dcn315_dump_clk_registers(&clk_mgr->base.base.boot_snapshot,
 				  &clk_mgr->base.base, &log_info);
+	clk_mgr->base.base.clks.dispclk_khz =  clk_mgr->base.base.boot_snapshot.dispclk * 1000;
 
 	clk_mgr->base.base.dprefclk_khz = 600000;
 	clk_mgr->base.base.dprefclk_khz = dcn315_smu_get_dpref_clk(&clk_mgr->base);
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.h +1 -0
index ac36ddf5dd1a..642ae3d4a790 100644
@@ -44,6 +44,7 @@ void dcn315_clk_mgr_construct(struct dc_context *ctx,
 		struct pp_smu_funcs *pp_smu,
 		struct dccg *dccg);
 
+void dcn315_init_clocks(struct clk_mgr *clk_mgr);
 void dcn315_clk_mgr_destroy(struct clk_mgr_internal *clk_mgr_int);
 
 #endif //__DCN315_CLK_MGR_H__
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -0
index 38f6328cda92..4e962f522f1b 100644
@@ -889,6 +889,7 @@ static const struct dc_debug_options debug_defaults_drv = {
 	},
 	.psr_power_use_phy_fsm = 0,
 	.using_dml2 = false,
+	.min_disp_clk_khz = 100000,
 };
 
 static const struct dc_check_config config_defaults = {
Signature · 1 line
2.43.0
author
#13 lore raw

PATCH 13/20 drm/amd/display: Add dc interface to log pre os firmware information

In reply to waynelin

From: Meenakshikumar Somasundaram <[email protected]>

[Why]
Pre os firmware information is useful to debug pre os to post os fw transition issues.

[How]
Add dc interface dc_log_preos_dmcub_info() to log pre os firmware information.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  5 +++
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  | 21 ++++++++++
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h  |  7 ++++
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   | 25 ++++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 39 +++++++++++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.h |  2 +
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  9 +++++
 8 files changed, 110 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
index 2eb02345dadd..6ef9dd9ab7a3 100644
@@ -6401,3 +6401,8 @@ void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst,
 	if (dc->hwss.get_underflow_debug_data)
 		dc->hwss.get_underflow_debug_data(dc, tg, out_data);
 }
+
+void dc_log_preos_dmcub_info(const struct dc *dc)
+{
+	dc_dmub_srv_log_preos_dmcub_info(dc->ctx->dmub_srv);
+}
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
index b80bcbf7ae13..82ce1fbec7d8 100644
@@ -2727,6 +2727,8 @@ unsigned int dc_get_det_buffer_size_from_state(const struct dc_state *context);
 
 bool dc_get_host_router_index(const struct dc_link *link, unsigned int *host_router_index);
 
+void dc_log_preos_dmcub_info(const struct dc *dc);
+
 /* DSC Interfaces */
 #include "dc_dsc.h"
 
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +21 -0
index 4b20c01bf646..fffbf1983143 100644
@@ -2344,3 +2344,24 @@ void dc_dmub_srv_release_hw(const struct dc *dc)
 
 	dm_execute_dmub_cmd(dc->ctx, &cmd,  DM_DMUB_WAIT_TYPE_WAIT);
 }
+
+void dc_dmub_srv_log_preos_dmcub_info(struct dc_dmub_srv *dc_dmub_srv)
+{
+	struct dmub_srv *dmub;
+
+	if (!dc_dmub_srv || !dc_dmub_srv->dmub)
+		return;
+
+	dmub = dc_dmub_srv->dmub;
+
+	if (dmub_srv_get_preos_info(dmub)) {
+		DC_LOG_DEBUG("%s: PreOS DMCUB Info", __func__);
+		DC_LOG_DEBUG("fw_version				: 0x%08x", dmub->preos_info.fw_version);
+		DC_LOG_DEBUG("boot_options				: 0x%08x", dmub->preos_info.boot_options);
+		DC_LOG_DEBUG("boot_status				: 0x%08x", dmub->preos_info.boot_status);
+		DC_LOG_DEBUG("trace_buffer_phy_addr		: 0x%016llx", dmub->preos_info.trace_buffer_phy_addr);
+		DC_LOG_DEBUG("trace_buffer_size_bytes	: 0x%08x", dmub->preos_info.trace_buffer_size);
+		DC_LOG_DEBUG("fb_base					: 0x%016llx", dmub->preos_info.fb_base);
+		DC_LOG_DEBUG("fb_offset					: 0x%016llx", dmub->preos_info.fb_offset);
+	}
+}
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +7 -0
index 9bb00d48fd5e..72e0a41f39f0 100644
@@ -367,4 +367,11 @@ bool dc_dmub_srv_is_cursor_offload_enabled(const struct dc *dc);
  * @dc - pointer to DC object
  */
 void dc_dmub_srv_release_hw(const struct dc *dc);
+
+/**
+ * dc_dmub_srv_log_preos_dmcub_info() - Logs preos dmcub fw info.
+ *
+ * @dc - pointer to DC object
+ */
+void dc_dmub_srv_log_preos_dmcub_info(struct dc_dmub_srv *dc_dmub_srv);
 #endif /* _DMUB_DC_SRV_H_ */
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +25 -0
index f25c2fc2f98f..9d0168986fe7 100644
@@ -363,6 +363,19 @@ struct dmub_diagnostic_data {
 	uint8_t is_pwait : 1;
 };
 
+/**
+ * struct dmub_preos_info - preos fw info before loading post os fw.
+ */
+struct dmub_preos_info {
+	uint64_t fb_base;
+	uint64_t fb_offset;
+	uint64_t trace_buffer_phy_addr;
+	uint32_t trace_buffer_size;
+	uint32_t fw_version;
+	uint32_t boot_status;
+	uint32_t boot_options;
+};
+
 struct dmub_srv_inbox {
 	/* generic status */
 	uint64_t num_submitted;
@@ -488,6 +501,7 @@ struct dmub_srv_hw_funcs {
 	uint32_t (*get_current_time)(struct dmub_srv *dmub);
 
 	void (*get_diagnostic_data)(struct dmub_srv *dmub);
+	bool (*get_preos_fw_info)(struct dmub_srv *dmub);
 
 	bool (*should_detect)(struct dmub_srv *dmub);
 	void (*init_reg_offsets)(struct dmub_srv *dmub, struct dc_context *ctx);
@@ -588,6 +602,7 @@ struct dmub_srv {
 	enum dmub_srv_power_state_type power_state;
 	struct dmub_diagnostic_data debug;
 	struct dmub_fb lsdma_rb_fb;
+	struct dmub_preos_info preos_info;
 };
 
 /**
@@ -1073,4 +1088,14 @@ enum dmub_status dmub_srv_wait_for_inbox_free(struct dmub_srv *dmub,
  */
 enum dmub_status dmub_srv_update_inbox_status(struct dmub_srv *dmub);
 
+/**
+ * dmub_srv_get_preos_info() - retrieves preos fw info
+ * @dmub: the dmub service
+ *
+ * Return:
+ *   true - preos fw info retrieved successfully
+ *   false - preos fw info not retrieved successfully
+ */
+bool dmub_srv_get_preos_info(struct dmub_srv *dmub);
+
 #endif /* _DMUB_SRV_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +39 -0
index b40482dbd6ad..e13557ed97be 100644
@@ -521,6 +521,45 @@ void dmub_dcn35_get_diagnostic_data(struct dmub_srv *dmub)
 
 	dmub->debug.gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
 }
+
+bool dmub_dcn35_get_preos_fw_info(struct dmub_srv *dmub)
+{
+	uint64_t region3_cw5_offset;
+	uint32_t top_addr, top_addr_enable, offset_low;
+	uint32_t offset_high, base_addr, fw_version;
+	bool is_vbios_fw = false;
+
+	memset(&dmub->preos_info, 0, sizeof(dmub->preos_info));
+
+	fw_version = REG_READ(DMCUB_SCRATCH1);
+	is_vbios_fw = ((fw_version >> 6) & 0x01) ? true : false;
+	if (!is_vbios_fw)
+		return false;
+
+	dmub->preos_info.boot_status = REG_READ(DMCUB_SCRATCH0);
+	dmub->preos_info.fw_version = REG_READ(DMCUB_SCRATCH1);
+	dmub->preos_info.boot_options = REG_READ(DMCUB_SCRATCH14);
+	REG_GET(DMCUB_REGION3_CW5_TOP_ADDRESS,
+		DMCUB_REGION3_CW5_ENABLE, &top_addr_enable);
+	if (top_addr_enable) {
+		dmub_dcn35_get_fb_base_offset(dmub,
+			&dmub->preos_info.fb_base, &dmub->preos_info.fb_offset);
+		offset_low = REG_READ(DMCUB_REGION3_CW5_OFFSET);
+		offset_high = REG_READ(DMCUB_REGION3_CW5_OFFSET_HIGH);
+		region3_cw5_offset = ((uint64_t)offset_high << 32) | offset_low;
+		dmub->preos_info.trace_buffer_phy_addr = region3_cw5_offset
+			- dmub->preos_info.fb_base + dmub->preos_info.fb_offset;
+
+		REG_GET(DMCUB_REGION3_CW5_TOP_ADDRESS,
+			DMCUB_REGION3_CW5_TOP_ADDRESS, &top_addr);
+		base_addr = REG_READ(DMCUB_REGION3_CW5_BASE_ADDRESS) & 0x1FFFFFFF;
+		dmub->preos_info.trace_buffer_size =
+			(top_addr > base_addr) ? (top_addr - base_addr + 1) : 0;
+	}
+
+	return true;
+}
+
 void dmub_dcn35_configure_dmub_in_system_memory(struct dmub_srv *dmub)
 {
 	/* DMCUB_REGION3_TMR_AXI_SPACE values:
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.h +2 -0
index 39fcb7275da5..92e6695a2c9b 100644
@@ -285,4 +285,6 @@ bool dmub_dcn35_is_hw_powered_up(struct dmub_srv *dmub);
 
 void dmub_srv_dcn35_regs_init(struct dmub_srv *dmub, struct dc_context *ctx);
 
+bool dmub_dcn35_get_preos_fw_info(struct dmub_srv *dmub);
+
 #endif /* _DMUB_DCN35_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +9 -0
index 0244c9b44ecc..a657efda89ce 100644
@@ -359,6 +359,7 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
 
 			funcs->get_current_time = dmub_dcn35_get_current_time;
 			funcs->get_diagnostic_data = dmub_dcn35_get_diagnostic_data;
+			funcs->get_preos_fw_info = dmub_dcn35_get_preos_fw_info;
 
 			funcs->init_reg_offsets = dmub_srv_dcn35_regs_init;
 			if (asic == DMUB_ASIC_DCN351)
@@ -1372,3 +1373,11 @@ enum dmub_status dmub_srv_update_inbox_status(struct dmub_srv *dmub)
 
 	return DMUB_STATUS_OK;
 }
+
+bool dmub_srv_get_preos_info(struct dmub_srv *dmub)
+{
+	if (!dmub || !dmub->hw_funcs.get_preos_fw_info)
+		return false;
+
+	return dmub->hw_funcs.get_preos_fw_info(dmub);
+}
Signature · 1 line
2.43.0
author
#14 lore raw

PATCH 14/20 drm/amd/display: Update cursor offload assignments

In reply to waynelin

From: Alvin Lee <[email protected]>

[Why & How]
- Cursor lines per chunk must be assigned from hubp->att and not hubp->pos (the one in hubp->pos is unassigned)
- In DCN401 DPP, cur0_enable in attribute struct must be assigned as this is the field passed to DMU
- DCN401 should not program position in driver if offload is enabled

---
 .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |  1 +
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  | 24 ++++++++++---------
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  2 +-
 4 files changed, 16 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c +1 -0
index 3adc17f2fc35..62bf7cea21d8 100644
@@ -141,6 +141,7 @@ void dpp401_set_cursor_position(
 	}
 
 	dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en;
+	dpp_base->att.cur0_ctl.bits.cur0_enable = cur_en;
 }
 
 void dpp401_set_optional_cursor_attributes(
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +13 -11
index 3a2e0848173e..f01eae50d02f 100644
@@ -783,21 +783,23 @@ void hubp401_cursor_set_position(
 		if (cur_en && REG_READ(CURSOR_SURFACE_ADDRESS) == 0)
 			hubp->funcs->set_cursor_attributes(hubp, &hubp->curs_attr);
 
-		REG_UPDATE(CURSOR_CONTROL,
-			CURSOR_ENABLE, cur_en);
+		if (!hubp->cursor_offload)
+			REG_UPDATE(CURSOR_CONTROL,
+				CURSOR_ENABLE, cur_en);
 	}
 
-	REG_SET_2(CURSOR_POSITION, 0,
-		CURSOR_X_POSITION, x_pos,
-		CURSOR_Y_POSITION, y_pos);
+	if (!hubp->cursor_offload) {
+		REG_SET_2(CURSOR_POSITION, 0,
+			CURSOR_X_POSITION, x_pos,
+			CURSOR_Y_POSITION, y_pos);
 
-	REG_SET_2(CURSOR_HOT_SPOT, 0,
-		CURSOR_HOT_SPOT_X, pos->x_hotspot,
-		CURSOR_HOT_SPOT_Y, pos->y_hotspot);
-
-	REG_SET(CURSOR_DST_OFFSET, 0,
-		CURSOR_DST_X_OFFSET, dst_x_offset);
+		REG_SET_2(CURSOR_HOT_SPOT, 0,
+			CURSOR_HOT_SPOT_X, pos->x_hotspot,
+			CURSOR_HOT_SPOT_Y, pos->y_hotspot);
 
+		REG_SET(CURSOR_DST_OFFSET, 0,
+			CURSOR_DST_X_OFFSET, dst_x_offset);
+	}
 	/* Cursor Position Register Config */
 	hubp->pos.cur_ctl.bits.cur_enable = cur_en;
 	hubp->pos.position.bits.x_pos = pos->x;
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -1
index 9333b7fde3bc..7aa0f452e8f7 100644
@@ -1699,7 +1699,7 @@ void dcn35_update_cursor_offload_pipe(struct dc *dc, const struct pipe_ctx *pipe
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_MODE = hubp->att.cur_ctl.bits.mode;
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_2X_MAGNIFY = hubp->pos.cur_ctl.bits.cur_2x_magnify;
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_PITCH = hubp->att.cur_ctl.bits.pitch;
-	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK = hubp->pos.cur_ctl.bits.line_per_chunk;
+	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK = hubp->att.cur_ctl.bits.line_per_chunk;
 
 	p->CNVC_CUR0_CURSOR0_CONTROL__CUR0_ENABLE = dpp->att.cur0_ctl.bits.cur0_enable;
 	p->CNVC_CUR0_CURSOR0_CONTROL__CUR0_MODE = dpp->att.cur0_ctl.bits.mode;
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +1 -1
index b9c357a40707..f02edc9371b0 100644
@@ -2996,7 +2996,7 @@ void dcn401_update_cursor_offload_pipe(struct dc *dc, const struct pipe_ctx *pip
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_MODE = hubp->att.cur_ctl.bits.mode;
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_2X_MAGNIFY = hubp->pos.cur_ctl.bits.cur_2x_magnify;
 	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_PITCH = hubp->att.cur_ctl.bits.pitch;
-	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK = hubp->pos.cur_ctl.bits.line_per_chunk;
+	p->CURSOR0_0_CURSOR_CONTROL__CURSOR_LINES_PER_CHUNK = hubp->att.cur_ctl.bits.line_per_chunk;
 
 	p->CM_CUR0_CURSOR0_CONTROL__CUR0_ENABLE = dpp->att.cur0_ctl.bits.cur0_enable;
 	p->CM_CUR0_CURSOR0_CONTROL__CUR0_MODE = dpp->att.cur0_ctl.bits.mode;
Signature · 1 line
2.43.0
author
#15 lore raw

PATCH 15/20 drm/amd/display: Add lock descriptor to check_update

In reply to waynelin

From: Dominik Kaszewski <[email protected]>

[Why]
DM locks the global DC lock during all updates, even if multiple updates touch different resources and could be run in parallel.

[How]
Add extra enum specifying which kind of resources should be locked.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c   | 125 +++++++++++----------
 drivers/gpu/drm/amd/display/dc/dc.h        |  13 +++
 drivers/gpu/drm/amd/display/dc/dc_stream.h |   2 +-
 3 files changed, 82 insertions(+), 58 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +68 -57
index 6ef9dd9ab7a3..1851a35f629f 100644
@@ -148,10 +148,16 @@ static const char DC_BUILD_ID[] = "production-build";
 
 /* Private functions */
 
-static inline void elevate_update_type(enum surface_update_type *original, enum surface_update_type new)
+static inline void elevate_update_type(
+		struct surface_update_descriptor *descriptor,
+		enum surface_update_type new_type,
+		enum dc_lock_descriptor new_locks
+)
 {
-	if (new > *original)
-		*original = new;
+	if (new_type > descriptor->update_type)
+		descriptor->update_type = new_type;
+
+	descriptor->lock_descriptor |= new_locks;
 }
 
 static void destroy_links(struct dc *dc)
@@ -2656,47 +2662,49 @@ static bool is_surface_in_context(
 	return false;
 }
 
-static enum surface_update_type get_plane_info_update_type(const struct dc_surface_update *u)
+static struct surface_update_descriptor get_plane_info_update_type(const struct dc_surface_update *u)
 {
 	union surface_update_flags *update_flags = &u->surface->update_flags;
-	enum surface_update_type update_type = UPDATE_TYPE_FAST;
+	struct surface_update_descriptor update_type = { UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_NONE };
 
 	if (!u->plane_info)
-		return UPDATE_TYPE_FAST;
+		return update_type;
+
+	elevate_update_type(&update_type, UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_PLANE);
 
 	if (u->plane_info->color_space != u->surface->color_space) {
 		update_flags->bits.color_space_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->horizontal_mirror != u->surface->horizontal_mirror) {
 		update_flags->bits.horizontal_mirror_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->rotation != u->surface->rotation) {
 		update_flags->bits.rotation_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->format != u->surface->format) {
 		update_flags->bits.pixel_format_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->stereo_format != u->surface->stereo_format) {
 		update_flags->bits.stereo_format_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->per_pixel_alpha != u->surface->per_pixel_alpha) {
 		update_flags->bits.per_pixel_alpha_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->global_alpha_value != u->surface->global_alpha_value) {
 		update_flags->bits.global_alpha_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->dcc.enable != u->surface->dcc.enable
@@ -2708,7 +2716,7 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
 		 * recalculate stutter period.
 		 */
 		update_flags->bits.dcc_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (resource_pixel_format_to_bpp(u->plane_info->format) !=
@@ -2717,33 +2725,33 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
 		 * and DML calculation
 		 */
 		update_flags->bits.bpp_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (u->plane_info->plane_size.surface_pitch != u->surface->plane_size.surface_pitch
 			|| u->plane_info->plane_size.chroma_pitch != u->surface->plane_size.chroma_pitch) {
 		update_flags->bits.plane_size_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	const struct dc_tiling_info *tiling = &u->plane_info->tiling_info;
 
 	if (memcmp(tiling, &u->surface->tiling_info, sizeof(*tiling)) != 0) {
 		update_flags->bits.swizzle_change = 1;
-		elevate_update_type(&update_type, UPDATE_TYPE_MED);
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 
 		switch (tiling->gfxversion) {
 		case DcGfxVersion9:
 		case DcGfxVersion10:
 		case DcGfxVersion11:
 			if (tiling->gfx9.swizzle != DC_SW_LINEAR) {
-				elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+				elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 				update_flags->bits.bandwidth_change = 1;
 			}
 			break;
 		case DcGfxAddr3:
 			if (tiling->gfx_addr3.swizzle != DC_ADDR3_SW_LINEAR) {
-				elevate_update_type(&update_type, UPDATE_TYPE_FULL);
+				elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 				update_flags->bits.bandwidth_change = 1;
 			}
 			break;
@@ -2759,14 +2767,17 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
 	return update_type;
 }
 
-static enum surface_update_type get_scaling_info_update_type(
+static struct surface_update_descriptor get_scaling_info_update_type(
 		const struct dc_check_config *check_config,
 		const struct dc_surface_update *u)
 {
 	union surface_update_flags *update_flags = &u->surface->update_flags;
+	struct surface_update_descriptor update_type = { UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_NONE };
 
 	if (!u->scaling_info)
-		return UPDATE_TYPE_FAST;
+		return update_type;
+
+	elevate_update_type(&update_type, UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_PLANE);
 
 	if (u->scaling_info->src_rect.width != u->surface->src_rect.width
 			|| u->scaling_info->src_rect.height != u->surface->src_rect.height
@@ -2809,40 +2820,41 @@ static enum surface_update_type get_scaling_info_update_type(
 	if (update_flags->bits.clock_change
 			|| update_flags->bits.bandwidth_change
 			|| update_flags->bits.scaling_change)
-		return UPDATE_TYPE_FULL;
+		elevate_update_type(&update_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 
 	if (update_flags->bits.position_change)
-		return UPDATE_TYPE_MED;
+		elevate_update_type(&update_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 
-	return UPDATE_TYPE_FAST;
+	return update_type;
 }
 
-static enum surface_update_type det_surface_update(
+static struct surface_update_descriptor det_surface_update(
 		const struct dc_check_config *check_config,
-		const struct dc_surface_update *u)
+		struct dc_surface_update *u)
 {
-	enum surface_update_type type;
-	enum surface_update_type overall_type = UPDATE_TYPE_FAST;
+	struct surface_update_descriptor overall_type = { UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_NONE };
 	union surface_update_flags *update_flags = &u->surface->update_flags;
 
 	if (u->surface->force_full_update) {
 		update_flags->raw = 0xFFFFFFFF;
-		return UPDATE_TYPE_FULL;
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
+		return overall_type;
 	}
 
 	update_flags->raw = 0; // Reset all flags
 
-	type = get_plane_info_update_type(u);
-	elevate_update_type(&overall_type, type);
+	struct surface_update_descriptor inner_type = get_plane_info_update_type(u);
 
-	type = get_scaling_info_update_type(check_config, u);
-	elevate_update_type(&overall_type, type);
+	elevate_update_type(&overall_type, inner_type.update_type, inner_type.lock_descriptor);
+
+	inner_type = get_scaling_info_update_type(check_config, u);
+	elevate_update_type(&overall_type, inner_type.update_type, inner_type.lock_descriptor);
 
 	if (u->flip_addr) {
 		update_flags->bits.addr_update = 1;
 		if (u->flip_addr->address.tmz_surface != u->surface->address.tmz_surface) {
 			update_flags->bits.tmz_changed = 1;
-			elevate_update_type(&overall_type, UPDATE_TYPE_FULL);
+			elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 		}
 	}
 	if (u->in_transfer_func)
@@ -2878,13 +2890,15 @@ static enum surface_update_type det_surface_update(
 	if (u->hdr_mult.value)
 		if (u->hdr_mult.value != u->surface->hdr_mult.value) {
 			update_flags->bits.hdr_mult = 1;
-			elevate_update_type(&overall_type, UPDATE_TYPE_MED);
+			// TODO: Should be fast?
+			elevate_update_type(&overall_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 		}
 
 	if (u->sdr_white_level_nits)
 		if (u->sdr_white_level_nits != u->surface->sdr_white_level_nits) {
 			update_flags->bits.sdr_white_level_nits = 1;
-			elevate_update_type(&overall_type, UPDATE_TYPE_FULL);
+			// TODO: Should be fast?
+			elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 		}
 
 	if (u->cm2_params) {
@@ -2898,18 +2912,16 @@ static enum surface_update_type det_surface_update(
 			update_flags->bits.mcm_transfer_function_enable_change = 1;
 	}
 	if (update_flags->bits.in_transfer_func_change) {
-		type = UPDATE_TYPE_MED;
-		elevate_update_type(&overall_type, type);
+		// TODO: Fast?
+		elevate_update_type(&overall_type, UPDATE_TYPE_MED, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (update_flags->bits.lut_3d &&
 			u->surface->mcm_luts.lut3d_data.lut3d_src != DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM) {
-		type = UPDATE_TYPE_FULL;
-		elevate_update_type(&overall_type, type);
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 	if (update_flags->bits.mcm_transfer_function_enable_change) {
-		type = UPDATE_TYPE_FULL;
-		elevate_update_type(&overall_type, type);
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (check_config->enable_legacy_fast_update &&
@@ -2917,8 +2929,7 @@ static enum surface_update_type det_surface_update(
 			update_flags->bits.gamut_remap_change ||
 			update_flags->bits.input_csc_change ||
 			update_flags->bits.coeff_reduction_change)) {
-		type = UPDATE_TYPE_FULL;
-		elevate_update_type(&overall_type, type);
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 	return overall_type;
 }
@@ -2946,28 +2957,28 @@ static void force_immediate_gsl_plane_flip(struct dc *dc, struct dc_surface_upda
 	}
 }
 
-static enum surface_update_type check_update_surfaces_for_stream(
+static struct surface_update_descriptor check_update_surfaces_for_stream(
 		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
-		struct dc_stream_update *stream_update
-)
+		struct dc_stream_update *stream_update)
 {
-	int i;
-	enum surface_update_type overall_type = UPDATE_TYPE_FAST;
+	struct surface_update_descriptor overall_type = { UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_NONE };
 
 	if (stream_update && stream_update->pending_test_pattern) {
-		overall_type = UPDATE_TYPE_FULL;
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	if (stream_update && stream_update->hw_cursor_req) {
-		overall_type = UPDATE_TYPE_FULL;
+		elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 	}
 
 	/* some stream updates require passive update */
 	if (stream_update) {
 		union stream_update_flags *su_flags = &stream_update->stream->update_flags;
 
+		elevate_update_type(&overall_type, UPDATE_TYPE_FAST, LOCK_DESCRIPTOR_STREAM);
+
 		if ((stream_update->src.height != 0 && stream_update->src.width != 0) ||
 			(stream_update->dst.height != 0 && stream_update->dst.width != 0) ||
 			stream_update->integer_scaling_update)
@@ -3009,7 +3020,7 @@ static enum surface_update_type check_update_surfaces_for_stream(
 			su_flags->bits.out_csc = 1;
 
 		if (su_flags->raw != 0)
-			overall_type = UPDATE_TYPE_FULL;
+			elevate_update_type(&overall_type, UPDATE_TYPE_FULL, LOCK_DESCRIPTOR_STATE);
 
 		if (stream_update->output_csc_transform)
 			su_flags->bits.out_csc = 1;
@@ -3021,11 +3032,11 @@ static enum surface_update_type check_update_surfaces_for_stream(
 			su_flags->bits.out_tf = 1;
 	}
 
-	for (i = 0 ; i < surface_count; i++) {
-		enum surface_update_type type =
+	for (int i = 0 ; i < surface_count; i++) {
+		struct surface_update_descriptor inner_type =
 				det_surface_update(check_config, &updates[i]);
 
-		elevate_update_type(&overall_type, type);
+		elevate_update_type(&overall_type, inner_type.update_type, inner_type.lock_descriptor);
 	}
 
 	return overall_type;
@@ -3036,7 +3047,7 @@ static enum surface_update_type check_update_surfaces_for_stream(
  *
  * See :c:type:`enum surface_update_type <surface_update_type>` for explanation of update types
  */
-enum surface_update_type dc_check_update_surfaces_for_stream(
+struct surface_update_descriptor dc_check_update_surfaces_for_stream(
 		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
@@ -3468,7 +3479,7 @@ static bool update_planes_and_stream_state(struct dc *dc,
 
 	context = dc->current_state;
 	update_type = dc_check_update_surfaces_for_stream(
-			&dc->check_config, srf_updates, surface_count, stream_update);
+			&dc->check_config, srf_updates, surface_count, stream_update).update_type;
 	if (full_update_required_weak(dc, srf_updates, surface_count, stream_update, stream))
 		update_type = UPDATE_TYPE_FULL;
 
drivers/gpu/drm/amd/display/dc/dc.h +13 -0
index 82ce1fbec7d8..f302d57f7ba8 100644
@@ -467,6 +467,19 @@ enum surface_update_type {
 	UPDATE_TYPE_FULL, /* may need to shuffle resources */
 };
 
+enum dc_lock_descriptor {
+	LOCK_DESCRIPTOR_NONE = 0x0,
+	LOCK_DESCRIPTOR_STATE = 0x1,
+	LOCK_DESCRIPTOR_LINK = 0x2,
+	LOCK_DESCRIPTOR_STREAM = 0x4,
+	LOCK_DESCRIPTOR_PLANE = 0x8,
+};
+
+struct surface_update_descriptor {
+	enum surface_update_type update_type;
+	enum dc_lock_descriptor lock_descriptor;
+};
+
 /* Forward declaration*/
 struct dc;
 struct dc_plane_state;
drivers/gpu/drm/amd/display/dc/dc_stream.h +1 -1
index c68153c77972..75869eed1d3a 100644
@@ -473,7 +473,7 @@ void dc_enable_stereo(
 /* Triggers multi-stream synchronization. */
 void dc_trigger_sync(struct dc *dc, struct dc_state *context);
 
-enum surface_update_type dc_check_update_surfaces_for_stream(
+struct surface_update_descriptor dc_check_update_surfaces_for_stream(
 		const struct dc_check_config *check_config,
 		struct dc_surface_update *updates,
 		int surface_count,
Signature · 1 line
2.43.0
author
#16 lore raw

PATCH 16/20 drm/amd/display: Make observers const-correct

In reply to waynelin

From: Dominik Kaszewski <[email protected]>

[Why]
Observers which do not modify their pointer arguments should take them as const. This clearly signals their intent to the caller, making it clear that the function is safe to call multiple times, or remove the call if the result is no longer necessary.

[How]
Made const-correct all of the functions below:
* full_update_required[_weak]
* fast_updates_exist
* fast_update_only
* dc_can_clear_cursor_limit
* dc_stream_get_status (added const named overload)

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 44 ++++++++++---------
 .../gpu/drm/amd/display/dc/core/dc_stream.c   |  8 ++++
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  4 +-
 4 files changed, 35 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +24 -20
index 1851a35f629f..b720e007c654 100644
@@ -3427,11 +3427,12 @@ static void update_seamless_boot_flags(struct dc *dc,
 	}
 }
 
-static bool full_update_required_weak(struct dc *dc,
-		struct dc_surface_update *srf_updates,
+static bool full_update_required_weak(
+		const struct dc *dc,
+		const struct dc_surface_update *srf_updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		struct dc_stream_state *stream);
+		const struct dc_stream_update *stream_update,
+		const struct dc_stream_state *stream);
 
 /**
  * update_planes_and_stream_state() - The function takes planes and stream
@@ -5015,7 +5016,7 @@ void populate_fast_updates(struct dc_fast_update *fast_update,
 	}
 }
 
-static bool fast_updates_exist(struct dc_fast_update *fast_update, int surface_count)
+static bool fast_updates_exist(const struct dc_fast_update *fast_update, int surface_count)
 {
 	int i;
 
@@ -5056,11 +5057,12 @@ bool fast_nonaddr_updates_exist(struct dc_fast_update *fast_update, int surface_
 	return false;
 }
 
-static bool full_update_required_weak(struct dc *dc,
-		struct dc_surface_update *srf_updates,
+static bool full_update_required_weak(
+		const struct dc *dc,
+		const struct dc_surface_update *srf_updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		struct dc_stream_state *stream)
+		const struct dc_stream_update *stream_update,
+		const struct dc_stream_state *stream)
 {
 	const struct dc_state *context = dc->current_state;
 	if (srf_updates)
@@ -5069,7 +5071,7 @@ static bool full_update_required_weak(struct dc *dc,
 				return true;
 
 	if (stream) {
-		const struct dc_stream_status *stream_status = dc_stream_get_status(stream);
+		const struct dc_stream_status *stream_status = dc_stream_get_status_const(stream);
 		if (stream_status == NULL || stream_status->plane_count != surface_count)
 			return true;
 	}
@@ -5082,11 +5084,12 @@ static bool full_update_required_weak(struct dc *dc,
 	return false;
 }
 
-static bool full_update_required(struct dc *dc,
-		struct dc_surface_update *srf_updates,
+static bool full_update_required(
+		const struct dc *dc,
+		const struct dc_surface_update *srf_updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		struct dc_stream_state *stream)
+		const struct dc_stream_update *stream_update,
+		const struct dc_stream_state *stream)
 {
 	if (full_update_required_weak(dc, srf_updates, surface_count, stream_update, stream))
 		return true;
@@ -5146,12 +5149,13 @@ static bool full_update_required(struct dc *dc,
 	return false;
 }
 
-static bool fast_update_only(struct dc *dc,
-		struct dc_fast_update *fast_update,
-		struct dc_surface_update *srf_updates,
+static bool fast_update_only(
+		const struct dc *dc,
+		const struct dc_fast_update *fast_update,
+		const struct dc_surface_update *srf_updates,
 		int surface_count,
-		struct dc_stream_update *stream_update,
-		struct dc_stream_state *stream)
+		const struct dc_stream_update *stream_update,
+		const struct dc_stream_state *stream)
 {
 	return fast_updates_exist(fast_update, surface_count)
 			&& !full_update_required(dc, srf_updates, surface_count, stream_update, stream);
@@ -6383,7 +6387,7 @@ bool dc_is_cursor_limit_pending(struct dc *dc)
 	return false;
 }
 
-bool dc_can_clear_cursor_limit(struct dc *dc)
+bool dc_can_clear_cursor_limit(const struct dc *dc)
 {
 	uint32_t i;
 
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +8 -0
index 096fbb8ad24c..6d309c320253 100644
@@ -224,6 +224,14 @@ struct dc_stream_status *dc_stream_get_status(
 	return dc_state_get_stream_status(dc->current_state, stream);
 }
 
+const struct dc_stream_status *dc_stream_get_status_const(
+	const struct dc_stream_state *stream)
+{
+	struct dc *dc = stream->ctx->dc;
+
+	return dc_state_get_stream_status(dc->current_state, stream);
+}
+
 void program_cursor_attributes(
 	struct dc *dc,
 	struct dc_stream_state *stream)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index f302d57f7ba8..811098b5d7e4 100644
@@ -2757,7 +2757,7 @@ bool dc_is_timing_changed(struct dc_stream_state *cur_stream,
 		       struct dc_stream_state *new_stream);
 
 bool dc_is_cursor_limit_pending(struct dc *dc);
-bool dc_can_clear_cursor_limit(struct dc *dc);
+bool dc_can_clear_cursor_limit(const struct dc *dc);
 
 /**
  * dc_get_underflow_debug_data_for_otg() - Retrieve underflow debug data.
drivers/gpu/drm/amd/display/dc/dc_stream.h +2 -2
index 75869eed1d3a..321cfe92d799 100644
@@ -491,8 +491,8 @@ void update_stream_signal(struct dc_stream_state *stream, struct dc_sink *sink);
 void dc_stream_retain(struct dc_stream_state *dc_stream);
 void dc_stream_release(struct dc_stream_state *dc_stream);
 
-struct dc_stream_status *dc_stream_get_status(
-	struct dc_stream_state *dc_stream);
+struct dc_stream_status *dc_stream_get_status(struct dc_stream_state *dc_stream);
+const struct dc_stream_status *dc_stream_get_status_const(const struct dc_stream_state *dc_stream);
 
 /*******************************************************************************
  * Cursor interfaces - To manages the cursor within a stream
Signature · 1 line
2.43.0
author
#17 lore raw

PATCH 17/20 drm/amd/display: Add HDR workaround for a specific eDP

In reply to waynelin

From: Alex Hung <[email protected]>

[WHY & HOW]
Some eDP panels suffer from flicking when HDR is enabled in KDE or Gnome.

This add another quirk to worksaround to skip VSC that is incompatible with an eDP panel.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 -0
index fe100e4c9801..cc21337a182f 100644
@@ -83,6 +83,7 @@ static void apply_edid_quirks(struct drm_device *dev, struct edid *edid, struct
 		edid_caps->panel_patch.remove_sink_ext_caps = true;
 		break;
 	case drm_edid_encode_panel_id('S', 'D', 'C', 0x4154):
+	case drm_edid_encode_panel_id('S', 'D', 'C', 0x4171):
 		drm_dbg_driver(dev, "Disabling VSC on monitor with panel id %X\n", panel_id);
 		edid_caps->panel_patch.disable_colorimetry = true;
 		break;
Signature · 1 line
2.43.0
author
#18 lore raw

PATCH 18/20 drm/amd/display: Fix incorrect return of vblank enable on unconfigured crtc

In reply to waynelin

From: Ivan Lipski <[email protected]>

[Why&How]
Return -EINVAL when userspace asks us to enable vblank on a crtc that is not yet enabled.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +7 -3
index f08121a2b838..38f9ea313dcb 100644
@@ -308,8 +308,12 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
 	int irq_type;
 	int rc = 0;
 
-	if (acrtc->otg_inst == -1)
-		goto skip;
+	if (enable && !acrtc->base.enabled) {
+		drm_dbg_vbl(crtc->dev,
+				"Reject vblank enable on unconfigured CRTC %d (enabled=%d)\n",
+				acrtc->crtc_id, acrtc->base.enabled);
+		return -EINVAL;
+	}
 
 	irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
 
@@ -394,7 +398,7 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
 			return rc;
 	}
 #endif
-skip:
+
 	if (amdgpu_in_reset(adev))
 		return 0;
 
Signature · 1 line
2.43.0
author
#19 lore raw

PATCH 19/20 drm/amd/display: [FW Promotion] Release 0.1.33.0

In reply to waynelin

From: Taimur Hassan <[email protected]>

[Why & How]
- Extend reply debug flags, define a new bit as debug_log_enabled
- Replace the padding to frame_skip_number in struct dmub_cmd_replay_set_coasting_vtotal_data

---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +9 -3
index c0a833ae606b..ae6e17a26bbb 100644
@@ -485,7 +485,13 @@ union replay_debug_flags {
 		 */
 		uint32_t enable_visual_confirm_debug : 1;
 
-		uint32_t reserved : 18;
+		/**
+		 * 0x4000 (bit 14)
+		 * @debug_log_enabled: Debug Log Enabled
+		 */
+		uint32_t debug_log_enabled : 1;
+
+		uint32_t reserved : 17;
 	} bitfields;
 
 	uint32_t u32All;
@@ -4620,9 +4626,9 @@ struct dmub_cmd_replay_set_coasting_vtotal_data {
 	 */
 	uint16_t coasting_vtotal_high;
 	/**
-	 * Explicit padding to 4 byte boundary.
+	 * frame skip number.
 	 */
-	uint8_t pad[2];
+	uint16_t frame_skip_number;
 };
 
 /**
Signature · 1 line
2.43.0
author
#20 lore raw

PATCH 20/20 drm/amd/display: Promote DC to 3.2.356

In reply to waynelin

From: Taimur Hassan <[email protected]>

This version brings along following update:

- Fix incorrect return of vblank enable on unconfigured crtc
- Add HDR workaround for a specific eDP
- Make observers const-correct
- Add lock descriptor to check_update
- Update cursor offload assignments
- Add dc interface to log pre os firmware information
- Init dispclk from bootup clock for DCN315
- Remove dc param from check_update
- Update link encoder assignment
- Add more DC HW state info to underflow logging
- Rename dml2 to dml2_0 folder
- Fix notification of vtotal to DMU for cursor offload
- Fix wrong index for DCN401 cursor offload
- Add opp count validation to dml2.1
- Fix DMUB reset sequence for DCN32
- Bump minimum for frame_warn_limit

---
 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 811098b5d7e4..75c7339bfb5b 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.355"
+#define DC_VER "3.2.356"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0
Tested-by on the v1 series
#21 lore raw
In reply to waynelin

[Public]

Hi all,

This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.

APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.

DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)

The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)

Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing

The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP

The patchset consists of the amd-staging-drm-next branch (Head commit - 46dd134bb2493e78fdc83622d8f9e2ed41c81518 -> drm/amdgpu: clear bad page info of ras module) with new patches added on top of it.

Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.

Thank you,

Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com

-----Original Message-----
From: waynelin <[email protected]>
Sent: Wednesday, October 22, 2025 3:30 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Lin, Wayne <[email protected]>
Subject: [PATCH 00/20] DC Patches October 27, 2025

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

- Fix incorrect return of vblank enable on unconfigured crtc
- Add HDR workaround for a specific eDP
- Make observers const-correct
- Add lock descriptor to check_update
- Update cursor offload assignments
- Add dc interface to log pre os firmware information
- Init dispclk from bootup clock for DCN315
- Remove dc param from check_update
- Update link encoder assignment
- Add more DC HW state info to underflow logging
- Rename dml2 to dml2_0 folder
- Fix notification of vtotal to DMU for cursor offload
- Fix wrong index for DCN401 cursor offload
- Add opp count validation to dml2.1
- Fix DMUB reset sequence for DCN32
- Bump minimum for frame_warn_limit

---

Alex Hung (1):
drm/amd/display: Add HDR workaround for a specific eDP

Alvin Lee (1):
drm/amd/display: Update cursor offload assignments

Austin Zheng (3):
drm/amd/display: Add dml2_0 folder drm/amd/display: Update dml2 references to use dml2_0 folder drm/amd/display: Remove dml2 Folder.

Dillon Varone (1):
drm/amd/display: Fix DMUB reset sequence for DCN32

Dmytro Laktyushkin (1):
drm/amd/display: Add opp count validation to dml2.1

Dominik Kaszewski (3):
drm/amd/display: Remove dc param from check_update drm/amd/display: Add lock descriptor to check_update drm/amd/display: Make observers const-correct

Ivan Lipski (1):
drm/amd/display: Fix incorrect return of vblank enable on unconfigured
crtc

Karen Chen (1):
drm/amd/display: Add more DC HW state info to underflow logging

Mario Limonciello (1):
drm/amd/display: Bump minimum for frame_warn_limit

Meenakshikumar Somasundaram (2):
drm/amd/display: update link encoder assignment drm/amd/display: Add dc interface to log pre os firmware information

Nicholas Kazlauskas (2):
drm/amd/display: Fix wrong index for DCN401 cursor offload drm/amd/display: Fix notification of vtotal to DMU for cursor offload

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

Zhongwei Zhang (1):
drm/amd/display: init dispclk from bootup clock for DCN315

 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    |  10 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |   1 +
 drivers/gpu/drm/amd/display/dc/Makefile       |   2 +-
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.c        |  87 ++++++-
 .../dc/clk_mgr/dcn315/dcn315_clk_mgr.h        |   1 +
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 220 ++++++++++--------
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  45 +++-
 .../gpu/drm/amd/display/dc/core/dc_state.c    |   4 +-
 .../gpu/drm/amd/display/dc/core/dc_stream.c   |   8 +
 drivers/gpu/drm/amd/display/dc/dc.h           |  68 ++++--
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |  21 ++
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h  |   7 +
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  11 +-
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    |  64 ++++-
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.c    | 123 ++++++++++
 .../amd/display/dc/dccg/dcn31/dcn31_dccg.h    |   2 +
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.c  |   3 +-
 .../amd/display/dc/dccg/dcn314/dcn314_dccg.h  |   3 +-
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.c    |   1 +
 .../amd/display/dc/dccg/dcn35/dcn35_dccg.h    |   5 +-
 .../amd/display/dc/dccg/dcn401/dcn401_dccg.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dml2/Makefile  | 141 -----------
 .../gpu/drm/amd/display/dc/dml2_0/Makefile    | 140 +++++++++++
 .../display/dc/{dml2 => dml2_0}/cmntypes.h    |  18 +-
 .../dc/{dml2 => dml2_0}/display_mode_core.c   |   2 +
 .../dc/{dml2 => dml2_0}/display_mode_core.h   |   0
 .../display_mode_core_structs.h               |   3 +-
 .../display_mode_lib_defines.h                |   2 +-
 .../dc/{dml2 => dml2_0}/display_mode_util.c   |   0
 .../dc/{dml2 => dml2_0}/display_mode_util.h   |   2 -
 .../dml21/dml21_translation_helper.c          |   0
 .../dml21/dml21_translation_helper.h          |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_utils.c   |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_utils.h   |   0
 .../dc/{dml2 => dml2_0}/dml21/dml21_wrapper.c |   4 +-
 .../dc/{dml2 => dml2_0}/dml21/dml21_wrapper.h |   0
 .../dml21/inc/bounding_boxes/dcn4_soc_bb.h    |   1 -
 .../dml21/inc/dml2_external_lib_deps.h        |   0
 .../dc/{dml2 => dml2_0}/dml21/inc/dml_top.h   |   0
 .../dml21/inc/dml_top_dchub_registers.h       |   0
 .../dml21/inc/dml_top_display_cfg_types.h     |   0
 .../dml21/inc/dml_top_policy_types.h          |   0
 .../dml21/inc/dml_top_soc_parameter_types.h   |   0
 .../dml21/inc/dml_top_types.h                 |   0
 .../dml21/src/dml2_core/dml2_core_dcn4.c      |   1 +
 .../dml21/src/dml2_core/dml2_core_dcn4.h      |   0
 .../src/dml2_core/dml2_core_dcn4_calcs.c      |  29 ++-
 .../src/dml2_core/dml2_core_dcn4_calcs.h      |   0
 .../dml21/src/dml2_core/dml2_core_factory.c   |   0
 .../dml21/src/dml2_core/dml2_core_factory.h   |   0
 .../src/dml2_core/dml2_core_shared_types.h    |   3 +
 .../dml21/src/dml2_core/dml2_core_utils.c     |   0
 .../dml21/src/dml2_core/dml2_core_utils.h     |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c      |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h      |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c   |   0
 .../dml21/src/dml2_dpmm/dml2_dpmm_factory.h   |   0
 .../dml21/src/dml2_mcg/dml2_mcg_dcn4.c        |   0
 .../dml21/src/dml2_mcg/dml2_mcg_dcn4.h        |   2 +-
 .../dml21/src/dml2_mcg/dml2_mcg_factory.c     |   0
 .../dml21/src/dml2_mcg/dml2_mcg_factory.h     |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn3.c        |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn3.h        |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |   0
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h  |   0
 .../dml21/src/dml2_pmo/dml2_pmo_factory.c     |   0
 .../dml21/src/dml2_pmo/dml2_pmo_factory.h     |   2 +-
 .../lib_float_math.c                          |   0
 .../lib_float_math.h                          |   0
 .../dml21/src/dml2_top/dml2_top_interfaces.c  |   0
 .../dml21/src/dml2_top/dml2_top_legacy.c      |   0
 .../dml21/src/dml2_top/dml2_top_legacy.h      |   0
 .../dml21/src/dml2_top/dml2_top_soc15.c       |   0
 .../dml21/src/dml2_top/dml2_top_soc15.h       |   0
 .../dml21/src/inc/dml2_debug.h                |   0
 .../src/inc/dml2_internal_shared_types.h      |   0
 .../{dml2 => dml2_0}/dml2_dc_resource_mgmt.c  |   0
 .../{dml2 => dml2_0}/dml2_dc_resource_mgmt.h  |   0
 .../dc/{dml2 => dml2_0}/dml2_dc_types.h       |   0
 .../dc/{dml2 => dml2_0}/dml2_internal_types.h |   2 +-
 .../dc/{dml2 => dml2_0}/dml2_mall_phantom.c   |   1 +
 .../dc/{dml2 => dml2_0}/dml2_mall_phantom.h   |   0
 .../display/dc/{dml2 => dml2_0}/dml2_policy.c |   0
 .../display/dc/{dml2 => dml2_0}/dml2_policy.h |   0
 .../dml2_translation_helper.c                 |   3 +
 .../dml2_translation_helper.h                 |   0
 .../display/dc/{dml2 => dml2_0}/dml2_utils.c  |   0
 .../display/dc/{dml2 => dml2_0}/dml2_utils.h  |   0
 .../dc/{dml2 => dml2_0}/dml2_wrapper.c        |   0
 .../dc/{dml2 => dml2_0}/dml2_wrapper.h        |   0
 .../display/dc/{dml2 => dml2_0}/dml_assert.h  |   0
 .../dc/{dml2 => dml2_0}/dml_depedencies.h     |   1 +
 .../dml_display_rq_dlg_calc.c                 |   0
 .../dml_display_rq_dlg_calc.h                 |   0
 .../display/dc/{dml2 => dml2_0}/dml_logging.h |   1 +
 .../drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h  |   4 +-
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  |  16 ++
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |   2 +
 .../drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c  |   1 +
 .../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c  |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |   1 +
 .../amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c |   1 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c  |   8 +
 .../drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h  |   1 +
 .../drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c  |   1 +
 .../amd/display/dc/dsc/dcn401/dcn401_dsc.c    |   1 +
 drivers/gpu/drm/amd/display/dc/dsc/dsc.h      |   5 +
 .../display/dc/hubbub/dcn30/dcn30_hubbub.c    |  33 +--
 .../display/dc/hubbub/dcn30/dcn30_hubbub.h    |   6 +-
 .../display/dc/hubbub/dcn31/dcn31_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn32/dcn32_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn35/dcn35_hubbub.c    |   3 +-
 .../display/dc/hubbub/dcn401/dcn401_hubbub.c  |   3 +-
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.h    | 136 ++++++++++-
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.h    |   8 +-
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 147 +++++++++---
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.h    |   2 +
 .../amd/display/dc/hubp/dcn31/dcn31_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn32/dcn32_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn35/dcn35_hubp.c    |   4 +-
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.c  |  28 +--
 .../amd/display/dc/hubp/dcn401/dcn401_hubp.h  |   2 +-
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  76 +++---
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |   2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |   4 +-
 .../gpu/drm/amd/display/dc/inc/core_types.h   |   4 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  | 121 +++++++++-  .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |  12 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h   |  16 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h  |   5 +-
 .../gpu/drm/amd/display/dc/inc/hw/mem_input.h |   2 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h   |  27 +++
 drivers/gpu/drm/amd/display/dc/inc/hw/opp.h   |  13 ++
 .../amd/display/dc/inc/hw/timing_generator.h  | 130 +++++++++++  .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c  |  16 ++
 .../drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h  |   5 +
 .../drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c  |   1 +
 .../amd/display/dc/mpc/dcn401/dcn401_mpc.c    |   1 +
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.c  |  14 +-
 .../drm/amd/display/dc/opp/dcn10/dcn10_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn20/dcn20_opp.h  |   6 +-
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.c  |  13 ++
 .../drm/amd/display/dc/opp/dcn35/dcn35_opp.h  |   4 +-
 .../amd/display/dc/optc/dcn10/dcn10_optc.h    |  38 ++-
 .../amd/display/dc/optc/dcn31/dcn31_optc.c    | 131 +++++++++++
 .../amd/display/dc/optc/dcn31/dcn31_optc.h    |   2 +
 .../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 +
 .../amd/display/dc/optc/dcn401/dcn401_optc.c  |   1 +
 .../dc/resource/dce100/dce100_resource.c      |   7 +-
 .../dc/resource/dce110/dce110_resource.c      |   5 +-
 .../dc/resource/dce112/dce112_resource.c      |   7 +-
 .../dc/resource/dce120/dce120_resource.c      |   8 +-
 .../dc/resource/dce80/dce80_resource.c        |   8 +-
 .../dc/resource/dcn10/dcn10_resource.c        |   7 +-
 .../dc/resource/dcn20/dcn20_resource.c        |   6 +-
 .../dc/resource/dcn201/dcn201_resource.c      |   6 +-
 .../dc/resource/dcn21/dcn21_resource.c        |   6 +-
 .../dc/resource/dcn30/dcn30_resource.c        |   6 +-
 .../dc/resource/dcn301/dcn301_resource.c      |   6 +-
 .../dc/resource/dcn302/dcn302_resource.c      |   6 +-
 .../dc/resource/dcn303/dcn303_resource.c      |   6 +-
 .../dc/resource/dcn31/dcn31_resource.c        |   6 +-
 .../dc/resource/dcn314/dcn314_resource.c      |   6 +-
 .../dc/resource/dcn315/dcn315_resource.c      |   7 +-
 .../dc/resource/dcn316/dcn316_resource.c      |   6 +-
 .../dc/resource/dcn32/dcn32_resource.c        |   8 +-
 .../dc/resource/dcn321/dcn321_resource.c      |   6 +-
 .../dc/resource/dcn35/dcn35_resource.c        |   8 +-
 .../dc/resource/dcn351/dcn351_resource.c      |   8 +-
 .../dc/resource/dcn36/dcn36_resource.c        |   8 +-
 .../dc/resource/dcn401/dcn401_resource.c      |   8 +-
 .../dcn401/dcn401_soc_and_ip_translator.h     |   2 +-
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  25 ++
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |  12 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn32.c |  50 ++--  .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c |  39 ++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn35.h |   2 +
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  17 +-
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |   9 +
 182 files changed, 1920 insertions(+), 530 deletions(-)  delete mode 100644 drivers/gpu/drm/amd/display/dc/dml2/Makefile
 create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/Makefile
 rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/cmntypes.h (93%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_core_structs.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_lib_defines.h (95%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_util.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/display_mode_util.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_translation_helper.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_translation_helper.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_utils.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_utils.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_wrapper.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/dml21_wrapper.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/bounding_boxes/dcn4_soc_bb.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml2_external_lib_deps.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_dchub_registers.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_display_cfg_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_policy_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_soc_parameter_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/inc/dml_top_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4_calcs.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_dcn4_calcs.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_factory.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_factory.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_shared_types.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_utils.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_core/dml2_core_utils.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_factory.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_dpmm/dml2_dpmm_factory.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_dcn4.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_dcn4.h (97%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_factory.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_mcg/dml2_mcg_factory.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn3.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn3.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_factory.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_pmo/dml2_pmo_factory.h (97%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_standalone_libraries/lib_float_math.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_standalone_libraries/lib_float_math.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_interfaces.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_legacy.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_legacy.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_soc15.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/dml2_top/dml2_top_soc15.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/inc/dml2_debug.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml21/src/inc/dml2_internal_shared_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_resource_mgmt.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_resource_mgmt.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_dc_types.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_internal_types.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_mall_phantom.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_mall_phantom.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_policy.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_policy.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_translation_helper.c (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_translation_helper.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_utils.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_utils.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_wrapper.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml2_wrapper.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_assert.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_depedencies.h (99%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_display_rq_dlg_calc.c (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_display_rq_dlg_calc.h (100%)  rename drivers/gpu/drm/amd/display/dc/{dml2 => dml2_0}/dml_logging.h (99%)

--
2.43.0