DC Patches July 31, 2026
cover DC Patches July 31, 2026
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
- Add KUnit tests for crtc functions
- Enable DCN6
- Fix ABM, CRC engine, MCM, writeback issues
- Refactor stream validation.
Alex Hung (2):
drm/amd/display: Fix wb_info leak and NULL deref in writeback drm/amd/display: Fix more KUnit connector use-after-free bugs
Alvin Lee (1):
drm/amd/display: Update BW bounding box unconditionally for DCN6
Aurabindo Pillai (5):
drm/amd: Add DCN6 register headers drm/amd/display: Add new sources for DCN6 drm/amd/display: Enable DCN6 init drm/amd/display: Dependent changes for DCN6 drm/amd/display: Enable DCN6 sources compilation
Bhawanpreet Lakha (12):
drm/amd/display: Add KUnit tests for more crtc functions drm/amd/display: Add vblank handling tests for crtc drm/amd/display: Add idle worker tests for crtc drm/amd/display: Add active plane count tests for crtc drm/amd/display: Add KUnit test for crtc vblank event completion drm/amd/display: Add KUnit tests for crtc set_vupdate_irq drm/amd/display: Add KUnit tests for crtc set_static_screen_optimze drm/amd/display: Add KUnit tests for crtc set_vblank drm/amd/display: Cover crtc set_vblank workqueue branch drm/amd/display: Cover crtc vblank IPS self-refresh restore drm/amd/display: Cover crtc vblank restore replay-supported path drm/amd/display: Cover crtc destroy_state stream release
Charlene Liu (1):
drm/amd/display: Ensure dtbclk is enabled
Fangzhi Zuo (1):
drm/amd/display: Gate HDMI FRL status polling on active FRL link rate
Harry VanZyllDeJong (1):
drm/amd/display: Update VRR info packet to support 12-bit refresh
rates
Harry Wentland (2):
drm/amd/display: Resize MST HDCP per-connector arrays to 32 drm/amd/display: Bounds-check connector->index in dm_dp_mst_get_modes
Iswara Nagulendran (1):
drm/amd/display: Fix ABM over VABC
Ivan Lipski (3):
drm/amd/display: Refactor stream validation drm/amd/display: Unify force_yuv debugfs into force_yuv_pixel_format drm/amd/display: Align connector KUnit tests with stream validation
refactor
Karthi Kandasamy (1):
drm/amd/display: Fix seamless mode switch not triggering for HDR to
SDR transition
Matthew Stewart (1):
drm/amd/display: Add missing DCN42B register defines
Rafal Ostrowski (1):
drm/amd/display: Migrate color manager HW and fix MCM blend LUT issues
Relja Vojvodic (2):
drm/amd/display: switch max FFE level cap based on FRL link rate drm/amd/display: Add FFE level defaults
Roman Li (1):
drm/amd/display: Remove duplicate in tests/Makefile
Sung-huai Wang (1):
drm/amd/display: Increase fclk change latency on dcn351
Taimur Hassan (2):
drm/amd/display: Add missing DMUB CACP and PR definitions drm/amd/display: Promote DC to 3.2.392
Wayne Lin (3):
drm/amd/display: Add missing OTG_CRC1_SELECT mask for DCN3.2 drm/amd/display: Fix CRC engine 1 enable/disable on DCN3.1.2+ drm/amd/display: Configure all CRC engines in pipe CRC source path
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../amd/display/amdgpu_dm/amdgpu_dm_audio.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_connector.c | 289 +- .../display/amdgpu_dm/amdgpu_dm_connector.h | 8 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 13 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 25 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 9 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 57 +- .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 10 + .../amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 +- .../drm/amd/display/amdgpu_dm/tests/Makefile | 1 - .../tests/amdgpu_dm_connector_test.c | 163 +- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 1436 + .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c | 29 + .../tests/amdgpu_dm_kunit_test_helpers.h | 3 + .../display/dc/bios/command_table_helper2.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 28 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 1 + .../drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h | 389 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 1673 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h | 150 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c | 369 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h | 35 + drivers/gpu/drm/amd/display/dc/core/dc.c | 76 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 428 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 47 + .../gpu/drm/amd/display/dc/core/dc_state.c | 12 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 27 +- drivers/gpu/drm/amd/display/dc/dc.h | 41 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 23 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 53 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 32 +- .../gpu/drm/amd/display/dc/dc_state_priv.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 + drivers/gpu/drm/amd/display/dc/dc_types.h | 13 +- drivers/gpu/drm/amd/display/dc/dccg/Makefile | 8 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 10 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.c | 187 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.h | 182 + .../drm/amd/display/dc/dce/dce_clock_source.c | 28 + .../drm/amd/display/dc/dce/dce_clock_source.h | 9 + drivers/gpu/drm/amd/display/dc/dio/Makefile | 8 + .../display/dc/dio/dcn10/dcn10_link_encoder.h | 16 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 15 + .../dc/dio/dcn401/dcn401_dio_link_encoder.h | 10 + .../dc/dio/dcn60/dcn60_dio_link_encoder.c | 373 + .../dc/dio/dcn60/dcn60_dio_link_encoder.h | 43 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.c | 538 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.h | 181 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 8 + .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 +- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 25 + .../dml2_0/dml21/dml21_translation_helper.c | 57 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 129 +- .../dml21/inc/bounding_boxes/dcn5_soc_bb.h | 36 + .../dml21/inc/bounding_boxes/dcn6_soc_bb.h | 229 + .../bounding_boxes/utm_qos_model_dchub_v1.h | 109 + .../bounding_boxes/utm_qos_model_dchub_v2.h | 122 + .../bounding_boxes/utm_qos_model_dchub_v3.h | 53 + .../inc/bounding_boxes/utm_qos_model_types.h | 51 + .../dc/dml2_0/dml21/inc/dml_dmub_cmd.h | 502 + .../dml21/inc/dml_top_display_cfg_types.h | 10 + .../dml21/inc/dml_top_soc_parameter_types.h | 2 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 45 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c | 152 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h | 9 + .../dml21/src/dml2_cga/dml2_cga_factory.c | 38 + .../dml21/src/dml2_cga/dml2_cga_factory.h | 9 + .../dml2_core_calcs_dsc_shared_types.h | 32 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 1 + .../dml2_core/dml2_core_dcn5_calcs_dchub.c | 5893 ++ .../dml2_core/dml2_core_dcn5_calcs_dchub.h | 426 + .../dml2_core_dcn5_calcs_display_pipe.c | 1029 + .../dml2_core_dcn5_calcs_display_pipe.h | 151 + .../dml2_core_dcn5_calcs_dsc_latency.c | 501 + .../dml2_core_dcn5_calcs_dsc_latency.h | 23 + .../dml2_core_dcn5_funcs_initialize.c | 78 + .../dml2_core_dcn5_funcs_initialize.h | 12 + .../dml2_core_dcn5_funcs_mode_programming.c | 1791 + .../dml2_core_dcn5_funcs_mode_programming.h | 11 + .../dml2_core_dcn5_funcs_mode_support.c | 2957 + .../dml2_core_dcn5_funcs_mode_support.h | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.c | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.h | 8 + .../dml2_core/dml2_core_dcn6_calcs_dchub.c | 1951 + .../dml2_core/dml2_core_dcn6_calcs_dchub.h | 101 + .../dml2_core_dcn6_funcs_initialize.c | 165 + .../dml2_core_dcn6_funcs_initialize.h | 12 + .../dml2_core_dcn6_funcs_mode_programming.c | 1389 + .../dml2_core_dcn6_funcs_mode_programming.h | 11 + .../dml2_core_dcn6_funcs_mode_support.c | 4277 ++ .../dml2_core_dcn6_funcs_mode_support.h | 11 + .../dml21/src/dml2_core/dml2_core_factory.c | 25 + .../src/dml2_core/dml2_core_shared_types.h | 160 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c | 449 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h | 19 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 57 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c | 522 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h | 21 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c | 2228 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h | 97 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c | 506 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h | 22 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c | 1789 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h | 17 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 34 + .../alternate_pstate_shared_lib.c | 1078 + .../alternate_pstate_shared_lib.h | 109 + .../dml21/src/dml2_top/dml2_top_interfaces.c | 7 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 394 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.h | 9 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c | 144 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h | 11 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c | 405 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h | 12 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c | 29 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h | 11 + .../src/inc/dml2_internal_shared_types.h | 485 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.h | 8 + drivers/gpu/drm/amd/display/dc/dpp/Makefile | 17 + .../amd/display/dc/dpp/dcn401/dcn401_dpp.h | 41 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 26 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 7 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h | 6 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c | 391 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h | 86 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c | 346 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h | 525 + .../amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c | 315 + drivers/gpu/drm/amd/display/dc/dsc/Makefile | 7 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c | 447 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h | 248 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 10 + .../display/dc/gpio/dcn60/hw_factory_dcn60.c | 228 + .../display/dc/gpio/dcn60/hw_factory_dcn60.h | 11 + .../dc/gpio/dcn60/hw_translate_dcn60.c | 168 + .../dc/gpio/dcn60/hw_translate_dcn60.h | 13 + .../gpu/drm/amd/display/dc/gpio/ddc_regs.h | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 302 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 28 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 + .../drm/amd/display/dc/gpio/hw_translate.c | 4 + .../gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 + drivers/gpu/drm/amd/display/dc/hpo/Makefile | 8 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.h | 47 - .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c | 114 + .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h | 18 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.c | 358 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.h | 32 + .../gpu/drm/amd/display/dc/hubbub/Makefile | 8 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 108 + .../display/dc/hubbub/dcn60/dcn60_hubbub.c | 1816 + .../display/dc/hubbub/dcn60/dcn60_hubbub.h | 207 + drivers/gpu/drm/amd/display/dc/hubp/Makefile | 16 + .../amd/display/dc/hubp/dcn20/dcn20_hubp.h | 29 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 78 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 10 +- .../amd/display/dc/hubp/dcn50/dcn50_hubp.c | 532 + .../amd/display/dc/hubp/dcn50/dcn50_hubp.h | 48 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.c | 472 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.h | 272 + drivers/gpu/drm/amd/display/dc/hwss/Makefile | 16 + .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 9 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 5 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 483 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 488 +- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 6 - .../amd/display/dc/hwss/dcn42/dcn42_init.c | 2 - .../amd/display/dc/hwss/dcn50/dcn50_hwseq.c | 759 + .../amd/display/dc/hwss/dcn50/dcn50_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 1164 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_init.c | 181 + .../amd/display/dc/hwss/dcn60/dcn60_init.h | 12 + .../drm/amd/display/dc/hwss/hw_sequencer.h | 19 +- .../display/dc/hwss/hw_sequencer_private.h | 5 - .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + .../amd/display/dc/inc/hw/clk_mgr_internal.h | 22 + .../amd/display/dc/inc/hw/cursor_reg_cache.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 35 +- .../drm/amd/display/dc/inc/hw/link_encoder.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 +- .../gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 9 + .../display/dc/irq/dcn60/irq_service_dcn60.c | 417 + .../display/dc/irq/dcn60/irq_service_dcn60.h | 12 + .../drm/amd/display/dc/link/link_detection.c | 29 + .../drm/amd/display/dc/link/link_factory.c | 5 + .../amd/display/dc/link/protocols/link_ddc.c | 8 + .../display/dc/link/protocols/link_hdmi_frl.c | 23 +- drivers/gpu/drm/amd/display/dc/mpc/Makefile | 8 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 405 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 55 +- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c | 330 + .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h | 472 + drivers/gpu/drm/amd/display/dc/opp/Makefile | 8 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.c | 25 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.h | 64 + drivers/gpu/drm/amd/display/dc/optc/Makefile | 9 + .../amd/display/dc/optc/dcn10/dcn10_optc.c | 36 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 3 +- .../amd/display/dc/optc/dcn31/dcn31_optc.h | 4 + .../amd/display/dc/optc/dcn314/dcn314_optc.h | 1 + .../amd/display/dc/optc/dcn32/dcn32_optc.h | 2 + .../amd/display/dc/optc/dcn35/dcn35_optc.c | 26 +- .../amd/display/dc/optc/dcn401/dcn401_optc.h | 1 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 9 +- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 4 + .../amd/display/dc/optc/dcn60/dcn60_optc.c | 107 + .../amd/display/dc/optc/dcn60/dcn60_optc.h | 178 + .../gpu/drm/amd/display/dc/resource/Makefile | 10 + .../dc/resource/dcn10/dcn10_resource.c | 1 + .../dc/resource/dcn20/dcn20_resource.c | 1 + .../dc/resource/dcn201/dcn201_resource.c | 1 + .../dc/resource/dcn21/dcn21_resource.c | 1 + .../dc/resource/dcn30/dcn30_resource.c | 2 + .../dc/resource/dcn301/dcn301_resource.c | 1 + .../dc/resource/dcn302/dcn302_resource.c | 2 + .../dc/resource/dcn303/dcn303_resource.c | 2 + .../dc/resource/dcn31/dcn31_resource.c | 1 + .../dc/resource/dcn314/dcn314_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 6 +- .../dc/resource/dcn316/dcn316_resource.c | 5 +- .../dc/resource/dcn32/dcn32_resource.c | 2 + .../dc/resource/dcn321/dcn321_resource.c | 2 + .../dc/resource/dcn35/dcn35_resource.c | 2 + .../dc/resource/dcn351/dcn351_resource.c | 2 + .../dc/resource/dcn36/dcn36_resource.c | 2 + .../dc/resource/dcn401/dcn401_resource.c | 34 +- .../dc/resource/dcn401/dcn401_resource.h | 4 + .../dc/resource/dcn42/dcn42_resource.c | 3 + .../dc/resource/dcn42b/dcn42b_resource.c | 20 +- .../dc/resource/dcn60/dcn60_resource.c | 2377 + .../dc/resource/dcn60/dcn60_resource.h | 676 + .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn60/dcn60_soc_and_ip_translator.c | 117 + .../dcn60/dcn60_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 229 +- drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c | 732 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h | 303 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 52 + .../gpu/drm/amd/display/include/dal_asic_id.h | 18 + .../gpu/drm/amd/display/include/dal_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 8 +- .../drm/amd/display/modules/power/power_abm.c | 215 +- .../amd/display/modules/power/power_helpers.h | 9 + .../drm/amd/display/modules/power/power_psr.c | 7 + .../amd/display/modules/power/power_replay.c | 7 + .../include/asic_reg/dcn/dcn_6_0_0_offset.h | 15799 +++++ .../include/asic_reg/dcn/dcn_6_0_0_sh_mask.h | 58556 ++++++++++++++++ .../include/asic_reg/dpcs/dpcs_6_0_0_offset.h | 47 + .../asic_reg/dpcs/dpcs_6_0_0_sh_mask.h | 55 + .../asic_reg/mmhub/mmhub_5_0_1_offset.h | 17 + .../asic_reg/mmhub/mmhub_5_0_1_sh_mask.h | 17 + 286 files changed, 129427 insertions(+), 1800 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.c create mode 100644 drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn5_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn6_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v1.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_types.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_dmub_cmd.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_calcs_dsc_shared_types.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c create mode 100644 drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c create mode 100644 drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c create mode 100644 drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h create mode 100644 drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.c create mode 100644 drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.h create mode 100644 drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.c create mode 100644 drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.h create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_sh_mask.h
Signature · 1 line
2.34.1
PATCH 3/41 drm/amd/display: Enable DCN6 init
From: Aurabindo Pillai <[email protected]>
Add hooks in various entry points to perform hw/sw init for DCN6 asic
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++++------ .../drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 10 ++++++++++ .../drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 1 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 +++++++-- .../amd/display/dc/bios/command_table_helper2.c | 1 + drivers/gpu/drm/amd/display/include/dal_types.h | 1 + 7 files changed, 30 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -2658,6 +2658,7 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (4 ,1 ,0 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ):/* TODO: Fix IP version. DC code expects version 4.0.1 */ if (adev->ip_versions[DCE_HWIP ][0 ] ==IP_VERSION (4 ,1 ,0 )) adev->ip_versions[DCE_HWIP ][0 ] =IP_VERSION (4 ,0 ,1 );
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +9 -6
@@ -1011,6 +1011,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)case IP_VERSION (4 ,0 ,1 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ):return 0 ;default :break ;
@@ -2410,6 +2411,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case IP_VERSION (4 ,0 ,1 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ):if (amdgpu_dm_register_outbox_irq_handlers (dm->adev)) {drm_err (adev_to_drm (adev),"DM: Failed to initialize IRQ\n" ); goto fail;
@@ -2436,6 +2438,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case IP_VERSION (4 ,0 ,1 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ): psr_feature_enabled = true;break ;default :
@@ -2455,6 +2458,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case IP_VERSION (3 ,6 ,0 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ): replay_feature_enabled = true;break ;
@@ -2617,6 +2621,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case IP_VERSION (4 ,0 ,1 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ):if (amdgpu_dm_dcn10_register_irq_handlers (dm->adev)) {drm_err (adev_to_drm (adev),"DM: Failed to initialize IRQ\n" ); goto fail;
@@ -2829,6 +2834,7 @@ static int dm_early_init(struct amdgpu_ip_block *ip_block)case IP_VERSION (4 ,0 ,1 ):case IP_VERSION (4 ,2 ,0 ):case IP_VERSION (4 ,2 ,1 ): +case IP_VERSION (6 ,0 ,0 ): adev->mode_info.num_crtc =4 ; adev->mode_info.num_hpd =4 ; adev->mode_info.num_dig =4 ;
@@ -6320,12 +6326,9 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,if (dm_new_crtc_state->cursor_mode ==DM_CURSOR_OVERLAY_MODE )continue ; -/* Check if rotation or scaling is enabled on DCN401 */ -if ((drm_plane_mask (crtc->cursor) & - new_crtc_state->plane_mask) && - (amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (4 ,2 ,1 ) || -amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (4 ,2 ,0 ) || -amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (4 ,0 ,1 ))) { +/* Check if rotation or scaling is enabled on DCN 4x and above */ +if ((drm_plane_mask (crtc->cursor) & new_crtc_state->plane_mask) && + (amdgpu_ip_version (adev,DCE_HWIP ,0 ) >=IP_VERSION (4 ,0 ,1 ))) { new_cursor_state =drm_atomic_get_new_plane_state (state, crtc->cursor); is_rotated = new_cursor_state &&
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c +10 -0
@@ -63,6 +63,7 @@ MODULE_FIRMWARE(FIRMWARE_DCN_36_DMUB);MODULE_FIRMWARE (FIRMWARE_DCN_401_DMUB );MODULE_FIRMWARE (FIRMWARE_DCN_42_DMUB );MODULE_FIRMWARE (FIRMWARE_DCN_42B_DMUB ); +MODULE_FIRMWARE (FIRMWARE_DCN_60_DMUB );/** * dm_dmub_aux_setconfig_callback - Callback for AUX or SET_CONFIG command.
@@ -408,6 +409,9 @@ STATIC_IFN_KUNIT void *dm_dmub_get_vbios_bounding_box(struct amdgpu_device *adevcase IP_VERSION (4 ,2 ,1 ): bb_size =sizeof (struct dml2_soc_bb );break ; +case IP_VERSION (6 ,0 ,0 ): + bb_size =sizeof (struct dmub_soc_bb_params ); +break ;default :return NULL ; }
@@ -560,6 +564,9 @@ int dm_dmub_sw_init(struct amdgpu_device *adev)case IP_VERSION (4 ,2 ,1 ): dmub_asic =DMUB_ASIC_DCN42B ;break ; +case IP_VERSION (6 ,0 ,0 ): + dmub_asic =DMUB_ASIC_DCN60 ; +break ;default :/* ASIC doesn't support DMUB. */ return 0 ;
@@ -752,6 +759,9 @@ int dm_init_microcode(struct amdgpu_device *adev)case IP_VERSION (4 ,2 ,1 ): fw_name_dmub =FIRMWARE_DCN_42B_DMUB ;break ; +case IP_VERSION (6 ,0 ,0 ): + fw_name_dmub =FIRMWARE_DCN_60_DMUB ; +break ;default :/* ASIC doesn't support DMUB. */ return 0 ;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.h +1 -0
@@ -62,6 +62,7 @@ int dm_init_microcode(struct amdgpu_device *adev);#define FIRMWARE_DCN_401_DMUB "amdgpu/dcn_4_0_1_dmcub.bin"#define FIRMWARE_DCN_42_DMUB "amdgpu/dcn_4_2_dmcub.bin"#define FIRMWARE_DCN_42B_DMUB "amdgpu/dcn_4_2_1_dmcub.bin" +#define FIRMWARE_DCN_60_DMUB "amdgpu/dcn_6_0_0_dmcub.bin"#define FIRMWARE_RAVEN_DMCU "amdgpu/raven_dmcu.bin"#define FIRMWARE_NAVI12_DMCU "amdgpu/navi12_dmcu.bin"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +7 -2
@@ -144,7 +144,8 @@ void amdgpu_dm_plane_fill_blending_from_plane_state(const struct drm_plane_state* other ASICs use an 8-bit field. The DRM plane alpha is * 16-bit, so scale it down to the width the hardware expects. */ -if (amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (4 ,2 ,0 )) +if (amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (4 ,2 ,0 ) + ||amdgpu_ip_version (adev,DCE_HWIP ,0 ) ==IP_VERSION (6 ,0 ,0 )) *global_alpha_value = plane_state->alpha >>4 ;else *global_alpha_value = plane_state->alpha >>8 ;
@@ -316,6 +317,7 @@ STATIC_IFN_KUNIT int amdgpu_dm_plane_validate_dcc(struct amdgpu_device *adev,return 0 ;if (adev->family !=AMDGPU_FAMILY_GC_12_0_0 && + adev->family !=AMDGPU_FAMILY_GC_13_0_1 && format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN )return -EINVAL ;
@@ -1047,6 +1049,8 @@ STATIC_IFN_KUNIT int amdgpu_dm_plane_get_plane_modifiers(struct amdgpu_device *aamdgpu_dm_plane_add_gfx11_modifiers (adev, mods, &size, &capacity);break ;case AMDGPU_FAMILY_GC_12_0_0 : +case AMDGPU_FAMILY_GC_13_0_1 : +/* GFX13 (DCN6) shares the GFX12 tiling/DCC binary modifier format. */ amdgpu_dm_plane_add_gfx12_modifiers (adev, mods, &size, &capacity);break ; }
@@ -1187,7 +1191,8 @@ int amdgpu_dm_plane_fill_plane_buffer_attributes(struct amdgpu_device *adev,upper_32_bits (chroma_addr); } -if (adev->family ==AMDGPU_FAMILY_GC_12_0_0 ) { +if (adev->family ==AMDGPU_FAMILY_GC_12_0_0 + || adev->family ==AMDGPU_FAMILY_GC_13_0_1 ) { ret = amdgpu_dm_plane_fill_gfx12_attrs_from_modifiers(adev, afb, format, rotation, plane_size, tiling_info, dcc,
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +1 -0
@@ -86,6 +86,7 @@ bool dal_bios_parser_init_cmd_tbl_helper2(case DCN_VERSION_4_01 :case DCN_VERSION_4_2 :case DCN_VERSION_4_2B : +case DCN_VERSION_6_0 : *h =dal_cmd_tbl_helper_dce112_get_table2 ();return true;
drivers/gpu/drm/amd/display/include/dal_types.h +1 -0
@@ -67,6 +67,7 @@ enum dce_version {DCN_VERSION_4_01 ,DCN_VERSION_4_2 ,DCN_VERSION_4_2B , +DCN_VERSION_6_0 , DCN_VERSION_MAX };
Signature · 1 line
2.34.1
PATCH 4/41 drm/amd/display: Dependent changes for DCN6
In reply to [email protected]From: Aurabindo Pillai <[email protected]>
changes needed to enable DCN6 asic
--- .../amd/display/amdgpu_dm/amdgpu_dm_audio.h | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 + drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 410 +++++++++++++++ .../gpu/drm/amd/display/dc/core/dc_resource.c | 47 ++ .../gpu/drm/amd/display/dc/core/dc_state.c | 12 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 24 + drivers/gpu/drm/amd/display/dc/dc.h | 26 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 ++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 23 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 53 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 32 +- .../gpu/drm/amd/display/dc/dc_state_priv.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 + drivers/gpu/drm/amd/display/dc/dc_types.h | 10 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 10 + .../drm/amd/display/dc/dce/dce_clock_source.c | 24 + .../drm/amd/display/dc/dce/dce_clock_source.h | 9 + .../display/dc/dio/dcn10/dcn10_link_encoder.h | 16 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 15 + .../dc/dio/dcn401/dcn401_dio_link_encoder.h | 10 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 8 + .../dml2_0/dml21/dml21_translation_helper.c | 57 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 129 ++++- .../dml21/inc/dml_top_display_cfg_types.h | 10 + .../dml21/inc/dml_top_soc_parameter_types.h | 2 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 45 ++ .../src/dml2_core/dml2_core_dcn4_calcs.c | 1 + .../dml21/src/dml2_core/dml2_core_factory.c | 25 + .../src/dml2_core/dml2_core_shared_types.h | 160 ++++++ .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 57 ++ .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 34 ++ .../dml21/src/dml2_top/dml2_top_interfaces.c | 7 + .../src/inc/dml2_internal_shared_types.h | 485 ++++++++++++++++++ .../drm/amd/display/dc/dml2_0/dml2_wrapper.h | 8 + .../amd/display/dc/dpp/dcn401/dcn401_dpp.h | 41 ++ .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 26 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 7 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h | 6 + .../gpu/drm/amd/display/dc/gpio/ddc_regs.h | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 302 +++++++++++ drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 28 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 + .../drm/amd/display/dc/gpio/hw_translate.c | 4 + .../gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 108 ++++ .../amd/display/dc/hubp/dcn20/dcn20_hubp.h | 29 ++ .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 9 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 11 + .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 5 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 32 ++ .../drm/amd/display/dc/hwss/hw_sequencer.h | 17 + .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../amd/display/dc/inc/hw/clk_mgr_internal.h | 22 + .../amd/display/dc/inc/hw/cursor_reg_cache.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 7 + .../drm/amd/display/dc/inc/hw/link_encoder.h | 6 + .../gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + .../drm/amd/display/dc/link/link_detection.c | 29 ++ .../drm/amd/display/dc/link/link_factory.c | 5 + .../amd/display/dc/link/protocols/link_ddc.c | 8 + .../display/dc/link/protocols/link_hdmi_frl.c | 5 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 4 +- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 2 + .../dc/resource/dcn10/dcn10_resource.c | 1 + .../dc/resource/dcn20/dcn20_resource.c | 1 + .../dc/resource/dcn201/dcn201_resource.c | 1 + .../dc/resource/dcn21/dcn21_resource.c | 1 + .../dc/resource/dcn30/dcn30_resource.c | 1 + .../dc/resource/dcn301/dcn301_resource.c | 1 + .../dc/resource/dcn302/dcn302_resource.c | 1 + .../dc/resource/dcn303/dcn303_resource.c | 1 + .../dc/resource/dcn314/dcn314_resource.c | 1 + .../dc/resource/dcn315/dcn315_resource.c | 1 + .../dc/resource/dcn32/dcn32_resource.c | 1 + .../dc/resource/dcn321/dcn321_resource.c | 1 + .../dc/resource/dcn35/dcn35_resource.c | 1 + .../dc/resource/dcn351/dcn351_resource.c | 1 + .../dc/resource/dcn36/dcn36_resource.c | 1 + .../dc/resource/dcn401/dcn401_resource.c | 33 +- .../dc/resource/dcn401/dcn401_resource.h | 4 + .../dc/resource/dcn42/dcn42_resource.c | 1 + .../soc_and_ip_translator.c | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 175 ++++++- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 52 ++ .../gpu/drm/amd/display/include/dal_asic_id.h | 18 + 96 files changed, 2871 insertions(+), 45 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_audio.h +1 -1
@@ -28,7 +28,7 @@struct amdgpu_device ;struct drm_device ; -struct drm_atomic_state ; +struct drm_atomic_commit ;struct drm_connector ;struct audio_info ;struct dc_sink ;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +6 -0
@@ -1903,3 +1903,9 @@ void dm_helpers_mccs_vcp_set(struct dc_context *ctx, struct dc_link *link, }EXPORT_IF_KUNIT (dm_helpers_mccs_vcp_set); +bool dm_helpers_submit_i2c_over_aux (struct ddc_service *ddc,uint32_t address,uint8_t offset, +uint8_t *cmdBuffer,uint32_t len,bool read) +{ +//TODO: Implement this +return false; +}
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +15 -0
@@ -50,6 +50,7 @@#include "dcn401/dcn401_clk_mgr.h" #include "dcn42/dcn42_clk_mgr.h" #include "dcn42b/dcn42b_clk_mgr.h" +#include "dcn60/dcn60_clk_mgr.h" int clk_mgr_helper_get_active_display_cnt( struct dc *dc,
@@ -387,6 +388,17 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p return &clk_mgr->base.base; }break ; +case AMDGPU_FAMILY_GC_13_0_1 : { +struct clk_mgr_internal *clk_mgr =dcn60_clk_mgr_construct (ctx, dccg); + +if (clk_mgr ==NULL ) { +BREAK_TO_DEBUGGER (); +return NULL ; + } + +return &clk_mgr->base; + } +#endif /* CONFIG_DRM_AMD_DC_FP */ default :ASSERT (0 );/* Unknown Asic */
@@ -451,6 +463,9 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)case AMDGPU_FAMILY_GC_11_5_4 :dcn42_clk_mgr_destroy (clk_mgr);break ; +case AMDGPU_FAMILY_GC_13_0_1 : +dcn60_clk_mgr_destroy (clk_mgr); +break ;default :break ;
drivers/gpu/drm/amd/display/dc/core/dc.c +9 -1
@@ -3099,7 +3099,8 @@ static struct dc_update_descriptor det_surface_update( update_bits->gamut_remap_change || update_bits->input_csc_change || update_bits->cm_hist_change || - update_bits->coeff_reduction_change)) { + update_bits->coeff_reduction_change || + update_bits->cursor_csc_color_matrix_change)) {elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); }return overall_type;
@@ -3403,6 +3404,10 @@ static void copy_surface_update_to_plane( srf_update->plane_info->dcc; surface->layer_index = srf_update->plane_info->layer_index; + surface->scaling_linearity = + srf_update->plane_info->scaling_linearity; + surface->cositing = + srf_update->plane_info->cositing; }if (srf_update->gamma) {
@@ -3658,6 +3663,9 @@ static void copy_stream_update_to_stream(struct dc *dc,if (update->sharpening_required) stream->sharpening_required = *update->sharpening_required; +if (update->blending_linearity) + stream->blending_linearity = *update->blending_linearity; +if (update->drr_trigger_mode) { stream->drr_trigger_mode = *update->drr_trigger_mode; }
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +410 -0
440 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +47 -0
83 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_state.c +12 -0
@@ -1155,3 +1155,15 @@ bool dc_state_is_subvp_in_use(struct dc_state *state)return false; } +bool dc_state_is_alt_in_use (const struct dc *dc,const struct dc_state *state) +{ +uint32_t i; +const struct pipe_ctx *pipe; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) { + pipe = &state->res_ctx.pipe_ctx[i]; +if (pipe->p_state_type ==P_STATE_ALT ) +return true; + } +return false; +}
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +24 -0
@@ -405,6 +405,7 @@ bool dc_stream_program_cursor_attributes( {struct dc *dc;bool reset_idle_optimizations = false; +bool should_release_dmub_hw_control_lock = false;if (!stream)return false;
@@ -413,6 +414,13 @@ bool dc_stream_program_cursor_attributes(if (dc_stream_set_cursor_attributes (stream, attributes)) {dc_z10_restore (dc); +if (dc->hwss.dmub_hw_control_lock) { +if (dc_state_is_alt_in_use (dc, dc->current_state) && + !dc_dmub_srv_is_cursor_offload_enabled (dc)) { + dc->hwss.dmub_hw_control_lock (dc, dc->current_state, true); + should_release_dmub_hw_control_lock = true; + } + }/* disable idle optimizations while updating cursor */ if (dc->idle_optimizations_allowed) {dc_allow_idle_optimizations (dc, false);
@@ -425,6 +433,10 @@ bool dc_stream_program_cursor_attributes(if (reset_idle_optimizations && !dc->debug.disable_dmub_reallow_idle)dc_allow_idle_optimizations (dc, true); +if (dc->hwss.dmub_hw_control_lock) { +if (should_release_dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, dc->current_state, false); + }return true; }
@@ -507,6 +519,7 @@ bool dc_stream_program_cursor_position(struct dc *dc;bool reset_idle_optimizations = false;const struct dc_cursor_position *old_position; +bool should_release_dmub_hw_control_lock = false;if (!stream)return false;
@@ -517,6 +530,13 @@ bool dc_stream_program_cursor_position(if (dc_stream_set_cursor_position (stream, position)) {dc_z10_restore (dc); +if (dc->hwss.dmub_hw_control_lock) { +if (dc_state_is_alt_in_use (dc, dc->current_state) && + !dc_dmub_srv_is_cursor_offload_enabled (dc)) { + dc->hwss.dmub_hw_control_lock (dc, dc->current_state, true); + should_release_dmub_hw_control_lock = true; + } + }/* disable idle optimizations if enabling cursor */ if (dc->idle_optimizations_allowed && (!old_position->enable || dc->debug.exit_idle_opt_for_cursor_updates) &&
@@ -567,6 +587,10 @@ bool dc_stream_program_cursor_position( } } +if (dc->hwss.dmub_hw_control_lock) { +if (should_release_dmub_hw_control_lock) + dc->hwss.dmub_hw_control_lock (dc, dc->current_state, false); + }return true; }
drivers/gpu/drm/amd/display/dc/dc.h +25 -1
@@ -174,6 +174,13 @@ struct dc_plane_cap { uint32_t fp16 : 1; uint32_t p010 : 1; uint32_t ayuv : 1; + uint32_t yuy2 : 1; // Packed 422 8bpc + uint32_t y210 : 1; // Packed 422 10bpc + uint32_t y212 : 1; // Packed 422 12bpc + uint32_t p208 : 1; // Planar 422 8bpc + uint32_t p210 : 1; // Planar 422 10bpc + uint32_t p212 : 1; // Planar 422 12bpc +/* Not all caps will be used/supported */ } pixel_format_support;// max upscaling factor x1000 // upscaling factors are always >= 1
@@ -240,6 +247,7 @@ struct rom_curve_caps {* @ogam_ram: programmable out/blend gamma LUT * @ocsc: output color space conversion * @dgam_rom_for_yuv: pre-defined degamma LUT for YUV planes +* @upsp_pre_scaler: Ability to upsample 420/422 before scaling * @dgam_rom_caps: pre-definied curve caps for degamma 1D LUT * @ogam_rom_caps: pre-definied curve caps for regamma 1D LUT *
@@ -256,6 +264,7 @@ struct dpp_color_caps { uint16_t ogam_ram : 1; uint16_t ocsc : 1; uint16_t dgam_rom_for_yuv : 1; + uint16_t upsp_pre_scaler : 1;struct rom_curve_caps dgam_rom_caps;struct rom_curve_caps ogam_rom_caps; };
@@ -617,6 +626,7 @@ struct dc_config {bool unify_link_enc_assignment;bool enable_cursor_offload;bool dp_connector_no_native_i2c; +unsigned int link_index_with_no_ddc;bool frame_update_cmd_version2;struct spl_sharpness_range dcn_sharpness_range;struct spl_sharpness_range dcn_override_sharpness_range;
@@ -785,6 +795,7 @@ struct dc_clocks {*/ bool fw_based_mclk_switching;bool fw_based_mclk_switching_shut_down; +bool alt_ch_pstate_switch;int prev_num_ways;enum dtm_pstate dtm_level;int max_supported_dppclk_khz;
@@ -795,6 +806,18 @@ struct dc_clocks {int idle_fclk_khz;int subvp_prefetch_dramclk_khz;int subvp_prefetch_fclk_khz; +/* deprecated: use _KBps variants — will be removed after DML update */ +unsigned int utm_urgent_bandwidth_lb_Kbps; +unsigned int utm_nominal_bandwidth_lb_Kbps; +unsigned int utm_urgent_bandwidth_lb_KBps; +unsigned int utm_nominal_bandwidth_lb_KBps; +unsigned int utm_latency_ub_index; +unsigned int utm_lsdma_bandwidth_lb_KBps; +unsigned int utm_nominal_max_latency_ub_ns; +unsigned int utm_nominal_avg_latency_ub_ns; +/* deprecated: use _KBps variant — will be removed after DML update */ +unsigned int required_avg_active_bandwidth_Kbps; +unsigned int required_avg_active_bandwidth_KBps;/* Stutter efficiency is technically not clock values * but stored here so the values are part of the update_clocks call similar to num_ways
@@ -1739,7 +1762,7 @@ struct dc_plane_state {bool adaptive_sharpness_en;int adaptive_sharpness_policy;unsigned int sharpness_level; -enum linear_light_scaling linear_light_scaling; +enum dc_scaling_linearity scaling_linearity;unsigned int sdr_white_level_nits;struct cm_hist_control cm_hist_control;struct spl_sharpness_range sharpness_range;
@@ -1763,6 +1786,7 @@ struct dc_plane_info {bool input_csc_enabled;unsigned int layer_index;enum chroma_cositing cositing; +enum dc_scaling_linearity scaling_linearity; };#include "dc_stream.h"
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +44 -0
47 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +23 -0
@@ -401,4 +401,27 @@ void dc_dmub_srv_release_hw(const struct dc *dc);* @dc - pointer to DC object */ void dc_dmub_srv_log_preos_dmcub_info (struct dc_dmub_srv *dc_dmub_srv); + +/** +* dc_dmub_srv_ihc_set_dig_hdcp_interrupt_dest() - Configure IHC interrupt destination. +* @dc_dmub_srv: DMUB service handle +* @dig_id: DIG engine ID (0-3) +* @to_dmu: Route interrupt to DMU (true) or not (false) +* +* Sends command to DMUB firmware to configure IHC interrupt routing +* for HDCP I2C transfer requests. +* +* Return: true on success, false on failure +*/ +bool dc_dmub_srv_ihc_set_dig_hdcp_interrupt_dest ( +struct dc_dmub_srv *dc_dmub_srv, +uint8_t dig_id, +bool to_dmu); + +/** +* dc_dmub_srv_get_fams2_debug_meta() - Queries for FAMS2 debug metadata from DMUB and logs it. +* +* @dc_dmub_srv - pointer to DMUB service object +*/ +void dc_dmub_srv_get_fams2_debug_meta (struct dc_dmub_srv *dc_dmub_srv);#endif /* _DMUB_DC_SRV_H_ */
drivers/gpu/drm/amd/display/dc/dc_helper.c +2 -0
@@ -530,6 +530,8 @@ char *dce_version_to_string(const int version)return "DCN 4.2" ;case DCN_VERSION_4_2B :return "DCN 4.2B" ; +case DCN_VERSION_6_0 : +return "DCN 6.0" ;default :return "Unknown" ; }
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +52 -1
85 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc_spl_translate.c +31 -1
@@ -16,6 +16,9 @@ static struct spl_callbacks dcn32_spl_callbacks = {static struct spl_callbacks dcn401_spl_callbacks = { .spl_calc_lb_num_partitions = dscl401_spl_calc_lb_num_partitions, }; +static struct spl_callbacks dcn50_spl_callbacks = { + .spl_calc_lb_num_partitions = dscl401_spl_calc_lb_num_partitions, +};static void populate_splrect_from_rect (struct spl_rect *spl_rect,const struct rect *rect) { spl_rect->x = rect->x;
@@ -71,6 +74,23 @@ static void populate_splformat_from_format(enum spl_pixel_format *spl_pixel_formelse *spl_pixel_format =SPL_PIXEL_FORMAT_INVALID ; } +static void set_linear_light_scaling_preference (const struct dc_plane_state *plane_state,struct spl_in *spl_in) +{ +if (plane_state !=NULL ) { +switch (plane_state->scaling_linearity) { +case DC_SCALING_LINEARITY_LINEAR : + spl_in->lls_pref =LLS_PREF_YES ; +break ; +case DC_SCALING_LINEARITY_SOURCE : + spl_in->lls_pref =LLS_PREF_NO ; +break ; +default : + spl_in->lls_pref =LLS_PREF_DONT_CARE ; +break ; + } + }else + spl_in->lls_pref =LLS_PREF_DONT_CARE ; +}/// @brief Translate SPL input parameters from pipe context /// @param pipe_ctx /// @param spl_in
@@ -94,6 +114,9 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct splcase DCN_VERSION_4_2B : spl_in->callbacks = dcn401_spl_callbacks;break ; +case DCN_VERSION_6_0 : + spl_in->callbacks = dcn50_spl_callbacks; +break ;default : spl_in->callbacks = dcn2_spl_callbacks; }
@@ -189,7 +212,14 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct splif (pipe_ctx->stream->ctx->dc->debug.force_lls >0 ) spl_in->lls_pref = pipe_ctx->stream->ctx->dc->debug.force_lls;else - spl_in->lls_pref = plane_state->linear_light_scaling; +if ((plane_state->ctx->dce_version ==DCN_VERSION_4_01 ) || + (plane_state->ctx->dce_version ==DCN_VERSION_4_2 ) || + (plane_state->ctx->dce_version ==DCN_VERSION_4_2B )) + spl_in->lls_pref =LLS_PREF_DONT_CARE ; +else +set_linear_light_scaling_preference (plane_state, spl_in); +/* Translate upsampling mode*/ + spl_in->upsp_mode = pipe_ctx->plane_res.scl_data.upsp;/* Translate chroma subsampling offset ( cositing ) */ if (pipe_ctx->stream->ctx->dc->debug.force_cositing) spl_in->basic_in.cositing = pipe_ctx->stream->ctx->dc->debug.force_cositing -1 ;
drivers/gpu/drm/amd/display/dc/dc_state_priv.h +1 -0
@@ -125,4 +125,5 @@ bool dc_state_can_clear_stream_cursor_subvp_limit(const struct dc_stream_state *bool dc_state_is_subvp_in_use (struct dc_state *state); +bool dc_state_is_alt_in_use (const struct dc *dc,const struct dc_state *state);#endif /* _DC_STATE_PRIV_H_ */
drivers/gpu/drm/amd/display/dc/dc_stream.h +5 -0
@@ -329,6 +329,9 @@ struct dc_stream_state {enum dc_drr_trigger_mode drr_trigger_mode; + +enum dc_blending_linearity blending_linearity; +struct dc_update_scratch_space *update_scratch;bool firmware_controlled_hdr_info_packet; };
@@ -380,6 +383,8 @@ struct dc_stream_update {bool *scaler_sharpener_update;bool *sharpening_required; +enum dc_blending_linearity *blending_linearity; +enum dc_drr_trigger_mode *drr_trigger_mode; };
drivers/gpu/drm/amd/display/dc/dc_types.h +10 -0
@@ -389,6 +389,16 @@ struct dc_csc_adjustments {struct fixed31_32 hue; }; +enum dc_scaling_linearity { +DC_SCALING_LINEARITY_LINEAR , +DC_SCALING_LINEARITY_SOURCE , +}; + +enum dc_blending_linearity { +DC_BLENDING_LINEARITY_LINEAR , +DC_BLENDING_LINEARITY_SOURCE , +}; +/* Scaling format */ enum scaling_transformation {SCALING_TRANSFORMATION_UNINITIALIZED ,
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h +10 -0
@@ -377,6 +377,13 @@type OTG3_DROP_PIXEL ;\type RESYNC_FIFO_LEVEL_ADJUST_EN ; +#define DCCG60_REG_FIELD_LIST (type) \ + type OTG_ADD_DROP_PIXEL_DONE;\ + type DSCCLK0_SRC_SEL;\ + type DSCCLK1_SRC_SEL;\ + type DSCCLK2_SRC_SEL;\ + type DSCCLK3_SRC_SEL; +struct dccg_shift {DCCG_REG_FIELD_LIST (uint8_t ) DCCG3_REG_FIELD_LIST(uint8_t )
@@ -386,6 +393,7 @@ struct dccg_shift {DCCG35_REG_FIELD_LIST (uint8_t )DCCG401_REG_FIELD_LIST (uint8_t )DCCG42_REG_FIELD_LIST (uint8_t) +DCCG60_REG_FIELD_LIST (uint8_t) }; struct dccg_mask {
@@ -397,6 +405,7 @@ struct dccg_mask { DCCG35_REG_FIELD_LIST(uint32_t) DCCG401_REG_FIELD_LIST(uint32_t) DCCG42_REG_FIELD_LIST(uint32_t) + DCCG60_REG_FIELD_LIST(uint32_t) };#define DCCG_REG_VARIABLE_LIST \
@@ -511,6 +520,7 @@ struct dccg_mask {struct dccg_registers {DCCG_REG_VARIABLE_LIST ;uint32_t OTG_ADD_DROP_PIXEL_CNTL; +uint32_t DSCCLK_SRC_SEL; };struct dcn_dccg {
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +24 -0
@@ -1496,6 +1496,13 @@ static const struct clock_source_funcs dcn401_clk_src_funcs = { .get_dp_dto_frequency_100hz = dcn401_get_dp_dto_frequency_100hz }; +static const struct clock_source_funcs dcn50_clk_src_funcs = { + .cs_power_down = dce110_clock_source_power_down, + .program_pix_clk = dcn401_program_pix_clk, + .get_pix_clk_dividers = dcn3_get_pix_clk_dividers, + .get_dp_dto_frequency_100hz = dcn401_get_dp_dto_frequency_100hz +}; +/*****************************************/ /* Constructor */ /*****************************************/
@@ -1924,6 +1931,23 @@ bool dcn401_clk_src_construct(return ret; } + +bool dcn50_clk_src_construct ( +struct dce110_clk_src *clk_src, +struct dc_context *ctx, +struct dc_bios *bios, +enum clock_source_id id, +const struct dce110_clk_src_regs *regs, +const struct dce110_clk_src_shift *cs_shift, +const struct dce110_clk_src_mask *cs_mask) +{ +bool ret =dce112_clk_src_construct (clk_src, ctx, bios, id, regs, cs_shift, cs_mask); + + clk_src->base.funcs = &dcn50_clk_src_funcs; + +return ret; +} + bool dcn301_clk_src_construct( struct dce110_clk_src *clk_src, struct dc_context *ctx,
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h +9 -0
@@ -339,6 +339,15 @@ bool dcn401_clk_src_construct(const struct dce110_clk_src_regs *regs, const struct dce110_clk_src_shift *cs_shift, const struct dce110_clk_src_mask *cs_mask); +bool dcn50_clk_src_construct ( +struct dce110_clk_src *clk_src, +struct dc_context *ctx, +struct dc_bios *bios, +enum clock_source_id id, +const struct dce110_clk_src_regs *regs, +const struct dce110_clk_src_shift *cs_shift, +const struct dce110_clk_src_mask *cs_mask); +/* this table is use to find *1.001 and /1.001 pixel rates from non-precise pixel rate */ struct pixel_rate_range_table_entry {unsigned int range_min_khz;
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.h +16 -0
@@ -75,12 +75,14 @@ struct dcn10_link_enc_aux_registers {uint32_t AUX_DPHY_RX_CONTROL0 ;uint32_t AUX_DPHY_TX_CONTROL ;uint32_t AUX_DPHY_RX_CONTROL1 ; +uint32_t DC_GPIO_DDC ; };struct dcn10_link_enc_hpd_registers {uint32_t DC_HPD_CONTROL;uint32_t DC_HPD_INT_STATUS;uint32_t DC_HPD_TOGGLE_FILT_CNTL; +uint32_t HPD_CTRL; };struct dcn10_link_enc_registers {
@@ -171,6 +173,8 @@ struct dcn10_link_enc_registers {uint32_t DIO_LINKF_CNTL ;uint32_t DIO_CLK_CNTL ;uint32_t DIG_BE_CLK_CNTL ; +uint32_t HDCP_I2C_CONTROL_0 ; +uint32_t HDCP_INT_CONTROL ; };#define LE_SF (reg_name, field_name, post_fix)\
@@ -508,12 +512,23 @@ struct dcn10_link_enc_registers {type SYMCLKF_G_HDCP_GATE_DIS ;\ type SYMCLKG_G_HDCP_GATE_DIS +#define DCN60_LINK_ENCODER_REG_FIELD_LIST (type) \ + type HDCP_I2C_DISABLE;\ + type HDCP_I2C_DDC_SELECT;\ + type HDCP_I2C_XFER_REQ_MASK;\ + type AUX_PAD1_MODE;\ + type HPD1_Y_POL_INVERT;\ + type HPD2_Y_POL_INVERT;\ + type HPD3_Y_POL_INVERT;\ + type HPD4_Y_POL_INVERT +struct dcn10_link_enc_shift {DCN_LINK_ENCODER_REG_FIELD_LIST (uint8_t );DCN20_LINK_ENCODER_REG_FIELD_LIST (uint8_t );DCN30_LINK_ENCODER_REG_FIELD_LIST (uint8_t );DCN31_LINK_ENCODER_REG_FIELD_LIST (uint8_t );DCN35_LINK_ENCODER_REG_FIELD_LIST (uint8_t ); +DCN60_LINK_ENCODER_REG_FIELD_LIST (uint8_t ); };struct dcn10_link_enc_mask {
@@ -522,6 +537,7 @@ struct dcn10_link_enc_mask {DCN30_LINK_ENCODER_REG_FIELD_LIST (uint32_t);DCN31_LINK_ENCODER_REG_FIELD_LIST (uint32_t);DCN35_LINK_ENCODER_REG_FIELD_LIST (uint32_t); +DCN60_LINK_ENCODER_REG_FIELD_LIST (uint32_t); };struct dcn10_link_encoder {
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c +15 -0
@@ -384,6 +384,20 @@ enum signal_type dcn401_get_dig_mode( } } +void dcn401_setup_ri_pj_check_in_sw_or_hw_mode ( +struct link_encoder *enc, +unsigned char aux_or_ddc_instance, +bool enable_sw_mode) +{ +struct dcn10_link_encoder *enc10 =TO_DCN10_LINK_ENC (enc); + +REG_UPDATE_2 (HDCP_I2C_CONTROL_0 , +HDCP_I2C_DISABLE , enable_sw_mode, +HDCP_I2C_DDC_SELECT , aux_or_ddc_instance); + +REG_UPDATE (HDCP_INT_CONTROL ,HDCP_I2C_XFER_REQ_MASK , enable_sw_mode); +} +static const struct link_encoder_funcs dcn401_link_enc_funcs = { .read_state = link_enc2_read_state, .validate_output_with_stream =
@@ -423,6 +437,7 @@ static const struct link_encoder_funcs dcn401_link_enc_funcs = { .get_txffe = dpcs401_get_txffe, .set_txffe = dpcs401_set_txffe, .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, + .setup_ri_pj_check_in_sw_or_hw_mode = dcn401_setup_ri_pj_check_in_sw_or_hw_mode, .get_hpd_state = dcn10_get_hpd_state, .program_hpd_filter = dcn10_program_hpd_filter, };
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.h +10 -0
@@ -104,6 +104,11 @@LE_SF (DP_AUX0_AUX_DPHY_RX_CONTROL1 ,AUX_RX_TIMEOUT_LEN , mask_sh),\ LE_SF(DP_AUX0_AUX_DPHY_RX_CONTROL1, AUX_RX_TIMEOUT_LEN_MUL, mask_sh) +#define LINK_ENCODER_MASK_SH_LIST_DCN60_ON_DCN401 (mask_sh) \ + LE_SF(DIG0_HDCP_I2C_CONTROL_0, HDCP_I2C_DISABLE, mask_sh),\ + LE_SF(DIG0_HDCP_I2C_CONTROL_0, HDCP_I2C_DDC_SELECT, mask_sh),\ + LE_SF(DIG0_HDCP_INT_CONTROL, HDCP_I2C_XFER_REQ_MASK, mask_sh) + void dcn401_link_encoder_construct( struct dcn20_link_encoder *enc20, const struct encoder_init_data *init_data,
@@ -147,4 +152,9 @@ enum signal_type dcn401_get_dig_mode(bool dcn401_is_dig_enabled (struct link_encoder *enc);enum signal_type dcn401_get_dig_mode (struct link_encoder *enc); + +void dcn401_setup_ri_pj_check_in_sw_or_hw_mode ( +struct link_encoder *enc, +unsigned char aux_or_ddc_instance, +bool enable_sw_mode);#endif /* __DC_LINK_ENCODER__DCN401_H__ */
drivers/gpu/drm/amd/display/dc/dm_helpers.h +8 -0
@@ -203,6 +203,14 @@ void dm_helpers_mccs_vcp_set(#define EXPORT_IF_KUNIT (symbol)#endif +bool dm_helpers_submit_i2c_over_aux ( +struct ddc_service *ddc, +uint32_t address, +uint8_t offset, +uint8_t *cmdBuffer, +uint32_t len, +bool read); + bool dm_helpers_dp_handle_test_pattern_request( struct dc_context *ctx, const struct dc_link *link,
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_translation_helper.c +53 -4
125 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_utils.c +128 -1
147 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_display_cfg_types.h +10 -0
@@ -102,6 +102,7 @@ enum dml2_uclk_pstate_change_strategy { dml2_uclk_pstate_change_strategy_force_drr =3 , dml2_uclk_pstate_change_strategy_force_mall_svp =4 , dml2_uclk_pstate_change_strategy_force_mall_full_frame =5 , + dml2_uclk_pstate_change_strategy_force_alternate = 6, }; enum dml2_svp_mode_override {
@@ -474,6 +475,15 @@ struct dml2_display_cfg {bool value; } force_nom_det_size_kbytes; +struct { +bool enable;// So copy time can be forced to 0 +unsigned int copy_time_us; + } force_alt_chan_copy_time; + +struct { +bool enable;// So fw delay can be forced to 0 +unsigned int fw_delay_us; + } force_alt_chan_fw_delay;bool mode_support_check_disable;bool mcache_admissibility_check_disable;bool surface_viewport_size_check_disable;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_soc_parameter_types.h +2 -0
@@ -117,6 +117,7 @@ struct dml2_soc_power_management_parameters {double g6_temp_read_blackout_us[DML_MAX_CLK_TABLE_SIZE ];double type_b_dram_clk_change_blackout_us;double type_b_ppt_blackout_us; +unsigned int alternate_dram_carveout_size_mb;// size per aperture - assumed same for both apertures for now };struct dml2_clk_table {
@@ -213,6 +214,7 @@ struct dml2_ip_capabilities {unsigned int ppt_max_allow_delay_us;unsigned int temp_read_max_allow_delay_us;unsigned int dummy_pstate_max_allow_delay_us; +unsigned int vblank_nom_default_us;/* FAMS2 delays */ struct {unsigned int max_allow_delay_us;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_top_types.h +45 -0
87 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +1 -0
@@ -13094,6 +13094,7 @@ void dml2_core_calcs_get_stream_fams2_programming(const struct dml2_core_interna (uint16_t )stream_pstate_meta->method_subvp.common.allow_end_otg_vline; base_programming->config.bits.clamp_vtotal_min = true;break ; +case dml2_pstate_method_alternate:case dml2_pstate_method_reserved_hw:case dml2_pstate_method_reserved_fw:case dml2_pstate_method_reserved_fw_drr_clamped:
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c +25 -0
@@ -4,6 +4,12 @@#include "dml2_core_factory.h" #include "dml2_core_dcn4.h" +#include "dml2_core_dcn5_funcs_initialize.h" +#include "dml2_core_dcn5_funcs_mode_support.h" +#include "dml2_core_dcn5_funcs_mode_programming.h" +#include "dml2_core_dcn6_funcs_initialize.h" +#include "dml2_core_dcn6_funcs_mode_support.h" +#include "dml2_core_dcn6_funcs_mode_programming.h" #include "dml2_external_lib_deps.h" bool dml2_core_create (enum dml2_project_id project_id,struct dml2_core_instance *out)
@@ -36,6 +42,25 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation; result = true;break ; +case dml2_project_dcn5x_utm: + out->initialize = &dml2_core_dcn5_funcs_initialize; + out->validate_solution = &dml2_core_dcn5_funcs_validate_solution; + out->populate_programming = &dml2_core_dcn5_funcs_populate_programming; + out->populate_informative = &core_dcn4_populate_informative; + out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation; + result = true; +break ; +case dml2_project_dcn6x_soc_var_a: +case dml2_project_dcn6x_soc_var_b: + out->initialize = &dml2_core_dcn6_funcs_initialize; + out->validate_solution = &dml2_core_dcn6_funcs_validate_solution; + out->populate_programming = &dml2_core_dcn6_funcs_populate_programming; + out->populate_informative = &core_dcn4_populate_informative; + out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation; + result = true; +break ; +case dml2_project_dcn4x_utm: +case dml2_project_dcn5x:case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_shared_types.h +160 -0
250 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_factory.c +12 -0
@@ -5,6 +5,7 @@#include "dml2_dpmm_factory.h" #include "dml2_dpmm_dcn4.h" #include "dml2_external_lib_deps.h" +#include "dml2_dpmm_dcn5.h" static bool dummy_map_mode_to_soc_dpm (struct dml2_dpmm_map_mode_to_soc_dpm_params_in_out *in_out) {
@@ -48,6 +49,17 @@ bool dml2_dpmm_create(enum dml2_project_id project_id, struct dml2_dpmm_instance out->map_watermarks = &dpmm_dcn42_map_watermarks; result = true;break ; +case dml2_project_dcn5x_utm: + out->map_mode_to_soc_dpm = &dpmm_dcn5_map_mode_to_soc_dpm; + result = true; +break ; +case dml2_project_dcn6x_soc_var_a: +case dml2_project_dcn6x_soc_var_b: +/* dpmm is deprecated */ + result = true; +break ; +case dml2_project_dcn4x_utm: +case dml2_project_dcn5x:case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_mcg/dml2_mcg_factory.c +5 -0
@@ -36,6 +36,11 @@ bool dml2_mcg_create(enum dml2_project_id project_id, struct dml2_mcg_instance * out->build_min_clock_table = &mcg_dcn42_build_min_clock_table; result = true;break ; +case dml2_project_dcn4x_utm: +case dml2_project_dcn5x: +case dml2_project_dcn5x_utm: +case dml2_project_dcn6x_soc_var_a: +case dml2_project_dcn6x_soc_var_b:case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +57 -0
141 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_factory.c +34 -0
@@ -7,6 +7,8 @@#include "dml2_pmo_dcn3.h" #include "dml2_pmo_dcn42.h" #include "dml2_external_lib_deps.h" +#include "dml2_pmo_dcn5.h" +#include "dml2_pmo_dcn6.h" static bool dummy_init_for_stutter (struct dml2_pmo_init_for_stutter_in_out *in_out) {
@@ -94,6 +96,38 @@ bool dml2_pmo_create(enum dml2_project_id project_id, struct dml2_pmo_instance * out->optimize_for_stutter = pmo_dcn4_fams2_optimize_for_stutter; result = true;break ; +case dml2_project_dcn5x_utm: + out->initialize = dml2_pmo_dcn5_initialize; + out->get_ordered_mandatory_stage_optimizers = dml2_pmo_dcn5_get_ordered_mandatory_stage_optimizers; + out->get_ordered_optional_stage_optimizers = dml2_pmo_dcn5_get_ordered_optional_stages_optimizers; + out->initialize_worksheet = dml2_pmo_dcn5_initialize_worksheet; + out->optional_sanity_check = dml2_pmo_dcn5_sanity_check; + out->convert_worksheet_to_solution = dml2_pmo_dcn5_convert_worksheet_to_solution; + out->clear_pre_validation_states = dml2_pmo_dcn5_clear_pre_validation_states; + result = true; +break ; +case dml2_project_dcn6x_soc_var_a: + out->initialize = dml2_pmo_dcn6a_initialize; + out->get_ordered_mandatory_stage_optimizers = dml2_pmo_dcn6a_get_ordered_mandatory_stage_optimizers; + out->get_ordered_optional_stage_optimizers = dml2_pmo_dcn6a_get_ordered_optional_stages_optimizers; + out->initialize_worksheet = dml2_pmo_dcn5_initialize_worksheet; + out->optional_sanity_check = dml2_pmo_dcn5_sanity_check; + out->convert_worksheet_to_solution = dml2_pmo_dcn6_convert_worksheet_to_solution; + out->clear_pre_validation_states = dml2_pmo_dcn5_clear_pre_validation_states; + result = true; +break ; +case dml2_project_dcn6x_soc_var_b: + out->initialize = dml2_pmo_dcn6b_initialize; + out->get_ordered_mandatory_stage_optimizers = dml2_pmo_dcn6b_get_ordered_mandatory_stage_optimizers; + out->get_ordered_optional_stage_optimizers = dml2_pmo_dcn6b_get_ordered_optional_stages_optimizers; + out->initialize_worksheet = dml2_pmo_dcn5_initialize_worksheet; + out->optional_sanity_check = dml2_pmo_dcn5_sanity_check; + out->convert_worksheet_to_solution = dml2_pmo_dcn6_convert_worksheet_to_solution; + out->clear_pre_validation_states = dml2_pmo_dcn5_clear_pre_validation_states; + result = true; +break ; +case dml2_project_dcn4x_utm: +case dml2_project_dcn5x:case dml2_project_invalid:default :break ;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c +7 -0
@@ -5,6 +5,7 @@#include "dml_top.h" #include "dml2_internal_shared_types.h" #include "dml2_top_soc15.h" +#include "dml2_top_utm.h" unsigned int dml2_get_instance_size_bytes (void ) {
@@ -19,6 +20,12 @@ bool dml2_initialize_instance(struct dml2_initialize_instance_in_out *in_out)case dml2_project_dcn4x_stage2_auto_drr_svp:case dml2_project_dcn42:return dml2_top_soc15_initialize_instance (in_out); +case dml2_project_dcn5x_utm: +case dml2_project_dcn6x_soc_var_a: +case dml2_project_dcn6x_soc_var_b: +return dml2_top_utm_initialize_instance (in_out); +case dml2_project_dcn4x_utm: +case dml2_project_dcn5x:case dml2_project_invalid:default :return false;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_internal_shared_types.h +485 -0
619 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.h +8 -0
@@ -55,6 +55,12 @@ struct dml2_soc_mall_info {unsigned int mblk_height_8bpe_pixels; }; +struct dml2_soc_alt_ch_info { +unsigned int region_size_bytes[2 ]; +/* bits 47:16 of the base address */ +unsigned int region_base_addr_47_16[2 ]; +}; +// Output of DML2 for clock requirements struct dml2_dcn_clocks {unsigned int dispclk_khz;
@@ -204,6 +210,7 @@ enum dml2_force_pstate_methods { dml2_force_pstate_method_vblank, dml2_force_pstate_method_drr, dml2_force_pstate_method_subvp, + dml2_force_pstate_method_alternate, }; struct dml2_configuration_options {
@@ -226,6 +233,7 @@ struct dml2_configuration_options {struct dml2_dc_svp_callbacks callbacks; } svp_pstate;struct dml2_soc_mall_info mall_cfg; +struct dml2_soc_alt_ch_info alt_ch_cfg;struct dml2_soc_bbox_overrides bbox_overrides;unsigned int max_segments_per_hubp;unsigned int det_segment_size;
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.h +41 -0
45 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c +13 -13
@@ -112,7 +112,7 @@ static bool dpp401_dscl_is_420_format(enum dc_pixel_format format)return false; } -static enum dcn401_dscl_mode_sel dpp401_dscl_get_dscl_mode ( +enum dcn401_dscl_mode_sel dpp401_dscl_get_dscl_mode (struct dpp *dpp_base,const struct scaler_data *data,bool dbg_always_scale)
@@ -146,7 +146,7 @@ static enum dcn401_dscl_mode_sel dpp401_dscl_get_dscl_mode(return DCN401_DSCL_MODE_SCALING_420_YCBCR_ENABLE ; } -static void dpp401_power_on_dscl ( +void dpp401_power_on_dscl (struct dpp *dpp_base,bool power_on) {
@@ -273,7 +273,7 @@ static void dpp401_dscl_set_scaler_filter( } -static void dpp401_dscl_set_scl_filter( +void dpp401_dscl_set_scl_filter( struct dcn401_dpp *dpp, const struct scaler_data *scl_data, bool chroma_coef_mode,
@@ -468,7 +468,7 @@ static bool dpp401_dscl_is_lb_conf_valid(int ceil_vratio, int num_partitions, in }/*find first match configuration which meets the min required lb size*/ -static enum lb_memory_config dpp401_dscl_find_lb_memory_config (struct dcn401_dpp *dpp, +enum lb_memory_config dpp401_dscl_find_lb_memory_config (struct dcn401_dpp *dpp,const struct scaler_data *scl_data) {int num_part_y, num_part_c;
@@ -637,8 +637,8 @@ static void dpp401_dscl_set_manual_ratio_init(* * Note: This function only have effect if AutoCal is disabled. */ -static void dpp401_dscl_set_recout (struct dcn401_dpp *dpp, -const struct rect *recout) +void dpp401_dscl_set_recout (struct dcn401_dpp *dpp, +const struct rect *recout) { REG_SET_2(RECOUT_START, 0,/* First pixel of RECOUT in the active OTG area */
@@ -881,7 +881,7 @@ static void dpp401_dscl_program_easf_h(struct dpp *dpp_base, const struct scaler* This is the primary function to program EASF * */ -static void dpp401_dscl_program_easf (struct dpp *dpp_base,const struct scaler_data *scl_data) +void dpp401_dscl_program_easf (struct dpp *dpp_base,const struct scaler_data *scl_data) {struct dcn401_dpp *dpp =TO_DCN401_DPP (dpp_base);
@@ -910,7 +910,7 @@ static void dpp401_dscl_program_easf(struct dpp *dpp_base, const struct scaler_d* When we have 1:1 scaling, we need to disable EASF * */ -static void dpp401_dscl_disable_easf (struct dpp *dpp_base,const struct scaler_data *scl_data) +void dpp401_dscl_disable_easf (struct dpp *dpp_base,const struct scaler_data *scl_data) {struct dcn401_dpp *dpp =TO_DCN401_DPP (dpp_base);
@@ -923,7 +923,7 @@ static void dpp401_dscl_disable_easf(struct dpp *dpp_base, const struct scaler_d SCL_EASF_H_EN, scl_data->dscl_prog_data.easf_h_en);PERF_TRACE (); } -static void dpp401_dscl_set_isharp_filter ( +void dpp401_dscl_set_isharp_filter (struct dcn401_dpp *dpp,const uint32_t *filter) {int level;
@@ -953,10 +953,10 @@ static void dpp401_dscl_set_isharp_filter(* This is the primary function to program isharp * */ -static void dpp401_dscl_program_isharp (struct dpp *dpp_base, -const struct scaler_data *scl_data, -bool program_isharp_1dlut, -bool *bs_coeffs_updated) +void dpp401_dscl_program_isharp (struct dpp *dpp_base, +const struct scaler_data *scl_data, +bool program_isharp_1dlut, +bool *bs_coeffs_updated) {struct dcn401_dpp *dpp =TO_DCN401_DPP (dpp_base); *bs_coeffs_updated = false;
drivers/gpu/drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c +2 -5
@@ -35,10 +35,7 @@ static const uint32_t *get_hist_rgb_luma_coefs(enum dc_color_space color_space) } } -static void dpp42_dpp_cm_hist_control ( -struct dpp *dpp_base, -struct cm_hist_control cntl, -enum dc_color_space color_space) +void dpp42_dpp_cm_hist_control (struct dpp *dpp_base,struct cm_hist_control cntl,enum dc_color_space color_space) {struct dcn42_dpp *dpp =TO_DCN42_DPP (dpp_base);
@@ -68,7 +65,7 @@ static void dpp42_dpp_cm_hist_control( } } -static bool dpp42_dpp_cm_hist_read (struct dpp *dpp_base,struct cm_hist *hist_out) +bool dpp42_dpp_cm_hist_read (struct dpp *dpp_base,struct cm_hist *hist_out) {struct dcn42_dpp *dpp =TO_DCN42_DPP (dpp_base);uint32_t channel_mask =0 ;
drivers/gpu/drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h +6 -0
@@ -465,5 +465,11 @@ bool dpp42_construct(struct dcn42_dpp *dpp42,const struct dcn42_dpp_shift *tf_shift, const struct dcn42_dpp_mask *tf_mask); +void dpp42_dpp_cm_hist_control (struct dpp *dpp_base, +struct cm_hist_control cntl, +enum dc_color_space color_space); + +bool dpp42_dpp_cm_hist_read (struct dpp *dpp_base, +struct cm_hist *hist_out);#endif /* __DCN42_DPP_H__ */
drivers/gpu/drm/amd/display/dc/gpio/ddc_regs.h +15 -0
@@ -125,6 +125,8 @@ struct ddc_registers {uint32_t ddc_setup;uint32_t phy_aux_cntl;uint32_t dc_gpio_aux_ctrl_5; +uint32_t dc_i3cpad_control0; +uint32_t dc_i3cpad_control1; };struct ddc_sh_mask {
@@ -142,6 +144,19 @@ struct ddc_sh_mask {//phy_aux_cntl uint32_t AUX_PAD_RXSEL ;uint32_t DDC_PAD_I2CMODE ; +//dc_i3cpad_control0 +uint32_t DC_I3CPAD_DDCCLK_MASK ; +uint32_t DC_I3CPAD_DDCDATA_MASK ; +uint32_t DC_I3CPAD_PD_EN ; +uint32_t DC_I3CPAD_CLK_A ; +uint32_t DC_I3CPAD_DATA_A ; +uint32_t DC_I3CPAD_CLK_EN ; +uint32_t DC_I3CPAD_DATA_EN ; +uint32_t DC_I3CPAD_CLK_Y ; +uint32_t DC_I3CPAD_DATA_Y ; +//dc_i3cpad_control1 +uint32_t DC_I3CPAD_STR ; +uint32_t DC_I3CPAD_RXSEL ; };
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c +302 -0
34 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h +28 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c +9 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h +108 -0
108 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h +29 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.h +9 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +11 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +4 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +32 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +17 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h +22 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/cursor_reg_cache.h +2 -1
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h +7 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +6 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/hw/transform.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/inc/resource.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/link/link_detection.c +29 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/link/link_factory.c +5 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/link/protocols/link_ddc.c +8 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c +5 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +24 -9
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h +4 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +5 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +174 -1
175 lines not on this page · raw message
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +52 -0
52 lines not on this page · raw message
drivers/gpu/drm/amd/display/include/dal_asic_id.h +18 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
PATCH 5/41 drm/amd/display: Enable DCN6 sources compilation
In reply to [email protected]From: Aurabindo Pillai <[email protected]>
Update the Makefiles so that DCN6 related newly added sources are compiled
--- .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 +++++++ drivers/gpu/drm/amd/display/dc/dccg/Makefile | 8 ++++++ drivers/gpu/drm/amd/display/dc/dio/Makefile | 8 ++++++ .../gpu/drm/amd/display/dc/dml2_0/Makefile | 25 +++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dpp/Makefile | 17 +++++++++++++ drivers/gpu/drm/amd/display/dc/dsc/Makefile | 7 ++++++ drivers/gpu/drm/amd/display/dc/gpio/Makefile | 10 ++++++++ drivers/gpu/drm/amd/display/dc/hpo/Makefile | 8 ++++++ .../gpu/drm/amd/display/dc/hubbub/Makefile | 8 ++++++ drivers/gpu/drm/amd/display/dc/hubp/Makefile | 16 ++++++++++++ drivers/gpu/drm/amd/display/dc/hwss/Makefile | 16 ++++++++++++ drivers/gpu/drm/amd/display/dc/irq/Makefile | 9 +++++++ drivers/gpu/drm/amd/display/dc/mpc/Makefile | 8 ++++++ drivers/gpu/drm/amd/display/dc/opp/Makefile | 8 ++++++ drivers/gpu/drm/amd/display/dc/optc/Makefile | 9 +++++++ .../gpu/drm/amd/display/dc/resource/Makefile | 10 ++++++++ .../display/dc/soc_and_ip_translator/Makefile | 3 +++ drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + 18 files changed, 180 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile +9 -0
@@ -195,4 +195,13 @@ AMD_DAL_CLK_MGR_DCN42B = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn42b/,$(CLK_MGR_ AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN42B) + +############################################################################### +# DCN60 +############################################################################### +CLK_MGR_DCN60 = dcn60_clk_mgr.o dcn60_clk_mgr_smu_msg.o + +AMD_DAL_CLK_MGR_DCN60 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn60/,$(CLK_MGR_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN60) endif
drivers/gpu/drm/amd/display/dc/dccg/Makefile +8 -0
@@ -109,4 +109,12 @@ DCCG_DCN42 = dcn42_dccg.o AMD_DAL_DCCG_DCN42 = $(addprefix $(AMDDALPATH)/dc/dccg/dcn42/,$(DCCG_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_DCCG_DCN42) +############################################################################### +# DCN60 +############################################################################### +DCCG_DCN60 = dcn60_dccg.o + +AMD_DAL_DCCG_DCN60 = $(addprefix $(AMDDALPATH)/dc/dccg/dcn60/,$(DCCG_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DCCG_DCN60) endif
drivers/gpu/drm/amd/display/dc/dio/Makefile +8 -0
@@ -132,4 +132,12 @@ DIO_DCN42 = dcn42_dio_link_encoder.o dcn42_dio_stream_encoder.o AMD_DAL_DIO_DCN42 = $(addprefix $(AMDDALPATH)/dc/dio/dcn42/,$(DIO_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_DIO_DCN42) +############################################################################### +# DCN60 +############################################################################### +DIO_DCN60 = dcn60_dio_link_encoder.o dcn60_dio_stream_encoder.o + +AMD_DAL_DIO_DCN60 = $(addprefix $(AMDDALPATH)/dc/dio/dcn60/,$(DIO_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DIO_DCN60) endif
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile +25 -0
@@ -52,6 +52,9 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_standalo 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/ +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/inc/bounding_boxes/ +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_utm_soc_bb/ +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2_0/dml21/src/dml2_cga/ # Add FPU flags to all dml2 files by default, remove NO_FPU flags. # FPU flags step 1: Find all .c files in dal/dc/dml2_0 and it's subfolders
@@ -107,6 +110,28 @@ DML21 += src/dml2_pmo/dml2_pmo_dcn4_fams2.o DML21 += src/dml2_pmo/dml2_pmo_dcn42.o DML21 += src/dml2_standalone_libraries/lib_float_math.o DML21 += src/dml2_standalone_libraries/lib_frl_cap_check.o +DML21 += src/dml2_top/dml2_top_utm.o +DML21 += src/dml2_core/dml2_core_dcn5_calcs_dchub.o +DML21 += src/dml2_core/dml2_core_dcn5_calcs_display_pipe.o +DML21 += src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.o +DML21 += src/dml2_core/dml2_core_dcn5_funcs_initialize.o +DML21 += src/dml2_core/dml2_core_dcn5_funcs_mode_programming.o +DML21 += src/dml2_core/dml2_core_dcn5_funcs_mode_support.o +DML21 += src/dml2_dpmm/dml2_dpmm_dcn5.o +DML21 += src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.o +DML21 += src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.o +DML21 += src/dml2_cga/dml2_cga_dcn6.o +DML21 += src/dml2_cga/dml2_cga_factory.o +DML21 += src/dml2_core/dml2_core_dcn6_calcs_dchub.o +DML21 += src/dml2_core/dml2_core_dcn6_funcs_initialize.o +DML21 += src/dml2_core/dml2_core_dcn6_funcs_mode_programming.o +DML21 += src/dml2_core/dml2_core_dcn6_funcs_mode_support.o +DML21 += src/dml2_pmo/dml2_pmo_dcn5.o +DML21 += src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.o +DML21 += src/dml2_pmo/dml2_pmo_dcn6.o +DML21 += src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.o +DML21 += src/dml2_standalone_libraries/alternate_pstate_shared_lib.o +DML21 += src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.o DML21 += dml21_translation_helper.o DML21 += dml21_wrapper.o DML21 += dml21_wrapper_fpu.o
drivers/gpu/drm/amd/display/dc/dpp/Makefile +17 -0
@@ -88,4 +88,21 @@ DPP_DCN42 = dcn42_dpp.o AMD_DAL_DPP_DCN42 = $(addprefix $(AMDDALPATH)/dc/dpp/dcn42/,$(DPP_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_DPP_DCN42) + +############################################################################### + +DPP_DCN50 = dcn50_dpp.o + +AMD_DAL_DPP_DCN50 = $(addprefix $(AMDDALPATH)/dc/dpp/dcn50/,$(DPP_DCN50)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DPP_DCN50) + +############################################################################### + +DPP_DCN60 = dcn60_dpp.o dcn60_dpp_dscl.o + +AMD_DAL_DPP_DCN60 = $(addprefix $(AMDDALPATH)/dc/dpp/dcn60/,$(DPP_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DPP_DCN60) + endif
drivers/gpu/drm/amd/display/dc/dsc/Makefile +7 -0
@@ -29,6 +29,13 @@ DSC_DCN401 += dcn401_dsc.o AMD_DISPLAY_FILES += $(addprefix $(AMDDALPATH)/dc/dsc/dcn401/,$(DSC_DCN401)) +############################################################################### +# DCN60 +############################################################################### + +DSC_DCN60 += dcn60_dsc.o + +AMD_DISPLAY_FILES += $(addprefix $(AMDDALPATH)/dc/dsc/dcn60/,$(DSC_DCN60)) endif DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o
drivers/gpu/drm/amd/display/dc/gpio/Makefile +10 -0
@@ -151,3 +151,13 @@ GPIO_DCN42B = hw_translate_dcn42b.o hw_factory_dcn42b.o AMD_DAL_GPIO_DCN42B = $(addprefix $(AMDDALPATH)/dc/gpio/dcn42b/,$(GPIO_DCN42B)) AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN42B) + +############################################################################### +# DCN 6.0 +############################################################################### + +GPIO_DCN60 = hw_translate_dcn60.o hw_factory_dcn60.o + +AMD_DAL_GPIO_DCN60 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn60/,$(GPIO_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN60)
drivers/gpu/drm/amd/display/dc/hpo/Makefile +8 -0
@@ -66,4 +66,12 @@ HPO_DCN42 += dcn42_hpo_frl_stream_encoder.o AMD_DAL_HPO_DCN42 = $(addprefix $(AMDDALPATH)/dc/hpo/dcn42/,$(HPO_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_HPO_DCN42) +############################################################################### +# DCN60 +############################################################################### +HPO_DCN60 = dcn60_hpo_frl_stream_encoder.o dcn60_hpo_frl_link_encoder.o + +AMD_DAL_HPO_DCN60 = $(addprefix $(AMDDALPATH)/dc/hpo/dcn60/,$(HPO_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HPO_DCN60) endif
drivers/gpu/drm/amd/display/dc/hubbub/Makefile +8 -0
@@ -109,4 +109,12 @@ AMD_DAL_HUBBUB_DCN42 = $(addprefix $(AMDDALPATH)/dc/hubbub/dcn42/,$(HUBBUB_DCN42 AMD_DISPLAY_FILES += $(AMD_DAL_HUBBUB_DCN42) +############################################################################### +HUBBUB_DCN60 = dcn60_hubbub.o + +AMD_DAL_HUBBUB_DCN60 = $(addprefix $(AMDDALPATH)/dc/hubbub/dcn60/,$(HUBBUB_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBBUB_DCN60) + + endif
drivers/gpu/drm/amd/display/dc/hubp/Makefile +16 -0
@@ -96,10 +96,26 @@ AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN401) ############################################################################### +HUBP_DCN50 = dcn50_hubp.o + +AMD_DAL_HUBP_DCN50 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn50/,$(HUBP_DCN50)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN50) + +############################################################################### + HUBP_DCN42 = dcn42_hubp.o AMD_DAL_HUBP_DCN42 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn42/,$(HUBP_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN42) +############################################################################### + +HUBP_DCN60 = dcn60_hubp.o + +AMD_DAL_HUBP_DCN60 = $(addprefix $(AMDDALPATH)/dc/hubp/dcn60/,$(HUBP_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HUBP_DCN60) + endif
drivers/gpu/drm/amd/display/dc/hwss/Makefile +16 -0
@@ -201,6 +201,14 @@ AMD_DISPLAY_FILES += $(AMD_DAL_HWSS_DCN401) ############################################################################### +HWSS_DCN50 = dcn50_hwseq.o + +AMD_DAL_HWSS_DCN50 = $(addprefix $(AMDDALPATH)/dc/hwss/dcn50/,$(HWSS_DCN50)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HWSS_DCN50) + +############################################################################### + HWSS_DCN42 = dcn42_hwseq.o dcn42_init.o AMD_DAL_HWSS_DCN42 = $(addprefix $(AMDDALPATH)/dc/hwss/dcn42/,$(HWSS_DCN42))
@@ -215,4 +223,12 @@ AMD_DAL_HWSS_DCN42B = $(addprefix $(AMDDALPATH)/dc/hwss/dcn42b/,$(HWSS_DCN42B)) AMD_DISPLAY_FILES += $(AMD_DAL_HWSS_DCN42B) +############################################################################### + +HWSS_DCN60 = dcn60_hwseq.o dcn60_init.o + +AMD_DAL_HWSS_DCN60 = $(addprefix $(AMDDALPATH)/dc/hwss/dcn60/,$(HWSS_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_HWSS_DCN60) + endif
drivers/gpu/drm/amd/display/dc/irq/Makefile +9 -0
@@ -207,3 +207,12 @@ IRQ_DCN42 = irq_service_dcn42.o AMD_DAL_IRQ_DCN42= $(addprefix $(AMDDALPATH)/dc/irq/dcn42/,$(IRQ_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN42) + +############################################################################### +# DCN 60 +############################################################################### +IRQ_DCN60 = irq_service_dcn60.o + +AMD_DAL_IRQ_DCN60 = $(addprefix $(AMDDALPATH)/dc/irq/dcn60/,$(IRQ_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN60)
drivers/gpu/drm/amd/display/dc/mpc/Makefile +8 -0
@@ -77,4 +77,12 @@ MPC_DCN42 = dcn42_mpc.o AMD_DAL_MPC_DCN42 = $(addprefix $(AMDDALPATH)/dc/mpc/dcn42/,$(MPC_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_MPC_DCN42) +############################################################################### +# DCN60 +############################################################################### +MPC_DCN60 = dcn60_mpc.o + +AMD_DAL_MPC_DCN60 = $(addprefix $(AMDDALPATH)/dc/mpc/dcn60/,$(MPC_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_MPC_DCN60) endif
drivers/gpu/drm/amd/display/dc/opp/Makefile +8 -0
@@ -48,4 +48,12 @@ OPP_DCN35 = dcn35_opp.o AMD_DAL_OPP_DCN35 = $(addprefix $(AMDDALPATH)/dc/opp/dcn35/,$(OPP_DCN35)) AMD_DISPLAY_FILES += $(AMD_DAL_OPP_DCN35) +############################################################################### +# DCN60 +############################################################################### +OPP_DCN60 = dcn60_opp.o + +AMD_DAL_OPP_DCN60 = $(addprefix $(AMDDALPATH)/dc/opp/dcn60/,$(OPP_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_OPP_DCN60) endif
drivers/gpu/drm/amd/display/dc/optc/Makefile +9 -0
@@ -118,5 +118,14 @@ AMD_DAL_OPTC_DCN42 = $(addprefix $(AMDDALPATH)/dc/optc/dcn42/,$(OPTC_DCN42)) AMD_DISPLAY_FILES += $(AMD_DAL_OPTC_DCN42) +############################################################################### + +OPTC_DCN60 = dcn60_optc.o + +AMD_DAL_OPTC_DCN60 = $(addprefix $(AMDDALPATH)/dc/optc/dcn60/,$(OPTC_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_OPTC_DCN60) + +############################################################################### endif
drivers/gpu/drm/amd/display/dc/resource/Makefile +10 -0
@@ -246,5 +246,15 @@ RESOURCE_DCN42B = dcn42b_resource.o AMD_DAL_RESOURCE_DCN42B = $(addprefix $(AMDDALPATH)/dc/resource/dcn42b/,$(RESOURCE_DCN42B)) AMD_DISPLAY_FILES += $(AMD_DAL_RESOURCE_DCN42B) + + +############################################################################### + +RESOURCE_DCN60 = dcn60_resource.o + +AMD_DAL_RESOURCE_DCN60 = $(addprefix $(AMDDALPATH)/dc/resource/dcn60/,$(RESOURCE_DCN60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_RESOURCE_DCN60) +############################################################################### endif
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/Makefile +3 -0
@@ -10,15 +10,18 @@ soc_and_ip_translator_rcflags := $(CC_FLAGS_NO_FPU) CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42b/dcn42b_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) +CFLAGS_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.o := $(soc_and_ip_translator_ccflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn42b/dcn42b_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) +CFLAGS_REMOVE_$(AMDDALPATH)/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.o := $(soc_and_ip_translator_rcflags) soc_and_ip_translator := soc_and_ip_translator.o soc_and_ip_translator += dcn401/dcn401_soc_and_ip_translator.o soc_and_ip_translator += dcn42/dcn42_soc_and_ip_translator.o soc_and_ip_translator += dcn42b/dcn42b_soc_and_ip_translator.o +soc_and_ip_translator += dcn60/dcn60_soc_and_ip_translator.o AMD_DAL_soc_and_ip_translator := $(addprefix $(AMDDALPATH)/dc/soc_and_ip_translator/, $(soc_and_ip_translator))
drivers/gpu/drm/amd/display/dmub/src/Makefile +1 -0
@@ -30,6 +30,7 @@ DMUB += dmub_dcn36.o DMUB += dmub_dcn401.o DMUB += dmub_dcn42.o DMUB += dmub_dcn42b.o +DMUB += dmub_dcn60.o AMD_DAL_DMUB = $(addprefix $(AMDDALPATH)/dmub/src/,$(DMUB))
Signature · 1 line
2.34.1
PATCH 6/41 drm/amd/display: Remove duplicate in tests/Makefile
In reply to [email protected]From: Roman Li <[email protected]>
The duplicate amdgpu_dm_plane_test.o entry causes linker errors during the arm-64 build.
--- drivers/gpu/drm/amd/display/amdgpu_dm/tests/Makefile | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/Makefile +0 -1
@@ -35,4 +35,3 @@ obj-$(CONFIG_DRM_AMD_DC_KUNIT_TEST) += amdgpu_dm_crtc_test.o obj-$(CONFIG_DRM_AMD_DC_KUNIT_TEST) += amdgpu_dm_services_test.o obj-$(CONFIG_DRM_AMD_DC_KUNIT_TEST) += amdgpu_dm_helpers_test.o obj-$(CONFIG_DRM_AMD_DC_KUNIT_TEST) += amdgpu_dm_quirks_test.o -obj-$(CONFIG_DRM_AMD_DC_KUNIT_TEST) += amdgpu_dm_plane_test.o
Signature · 1 line
2.34.1
PATCH 7/41 drm/amd/display: Resize MST HDCP per-connector arrays to 32
In reply to [email protected]From: Harry Wentland <[email protected]>
AMDGPU_DM_MAX_DISPLAY_INDEX is 31. It suggest a maximum number of 32 connectors. But the way it's used is like MAX_DISPLAY_COUNT. Hence we're off by one with DRM core, which supports a max of 32 connectors.
Rename AMDGPU_DM_MAX_DISPLAY_INDEX to AMDGPU_DM_MAX_DISPLAY_COUNT to match its actual use, and increase the size to 32 to match the originally intended size.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +++++----- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +5 -5
@@ -365,7 +365,7 @@ void hdcp_reset_display(struct hdcp_workqueue *hdcp_work, unsigned int link_indecancel_delayed_work (&hdcp_w->property_validate_dwork); -for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_INDEX ; conn_index++) { +for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_COUNT ; conn_index++) { hdcp_w->encryption_status[conn_index] =MOD_HDCP_ENCRYPTION_STATUS_HDCP_OFF ;if (hdcp_w->aconnector[conn_index]) {
@@ -418,7 +418,7 @@ void event_property_update(struct work_struct *work)struct drm_connector *connector;struct drm_connector_state *conn_state; -for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_INDEX ; conn_index++) { +for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_COUNT ; conn_index++) { aconnector = hdcp_work->aconnector[conn_index];if (!aconnector)
@@ -478,7 +478,7 @@ void event_property_validate(struct work_struct *work)guard (mutex)(&hdcp_work->mutex); -for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_INDEX ; +for (conn_index =0 ; conn_index <AMDGPU_DM_MAX_DISPLAY_COUNT ; conn_index++) { aconnector = hdcp_work->aconnector[conn_index];
@@ -897,10 +897,10 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev,memset (hdcp_work[i].aconnector,0 ,sizeof (struct amdgpu_dm_connector *) * -AMDGPU_DM_MAX_DISPLAY_INDEX ); +AMDGPU_DM_MAX_DISPLAY_COUNT );memset (hdcp_work[i].encryption_status,0 ,sizeof (enum mod_hdcp_encryption_status ) * -AMDGPU_DM_MAX_DISPLAY_INDEX ); +AMDGPU_DM_MAX_DISPLAY_COUNT ); } cp_psp->funcs.update_stream_config = update_config;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.h +5 -5
@@ -36,7 +36,7 @@* Minimal declarations needed by this header. * Full amdgpu/DM definitions come from amdgpu_dm.h included by each .c file. */ -#define AMDGPU_DM_MAX_DISPLAY_INDEX 31 +#define AMDGPU_DM_MAX_DISPLAY_COUNT 32struct amdgpu_dm_connector ;struct mod_hdcp ;
@@ -57,7 +57,7 @@ struct hdcp_workqueue {struct delayed_work callback_dwork;struct delayed_work watchdog_timer_dwork;struct delayed_work property_validate_dwork; -struct amdgpu_dm_connector *aconnector[AMDGPU_DM_MAX_DISPLAY_INDEX ]; +struct amdgpu_dm_connector *aconnector[AMDGPU_DM_MAX_DISPLAY_COUNT ];struct mutex mutex;struct mod_hdcp hdcp;
@@ -65,7 +65,7 @@ struct hdcp_workqueue {struct mod_hdcp_display display;struct mod_hdcp_link link; -enum mod_hdcp_encryption_status encryption_status[AMDGPU_DM_MAX_DISPLAY_INDEX ]; +enum mod_hdcp_encryption_status encryption_status[AMDGPU_DM_MAX_DISPLAY_COUNT ];/* when display is unplugged from mst hub, connctor will be * destroyed within dm_dp_mst_connector_destroy. connector * hdcp perperties, like type, undesired, desired, enabled,
@@ -75,9 +75,9 @@ struct hdcp_workqueue {* will be retrieved from hdcp_work within dm_dp_mst_get_modes */ /* un-desired, desired, enabled */ -unsigned int content_protection[AMDGPU_DM_MAX_DISPLAY_INDEX ]; +unsigned int content_protection[AMDGPU_DM_MAX_DISPLAY_COUNT ];/* hdcp1.x, hdcp2.x */ -unsigned int hdcp_content_type[AMDGPU_DM_MAX_DISPLAY_INDEX ]; +unsigned int hdcp_content_type[AMDGPU_DM_MAX_DISPLAY_COUNT ];uint8_t max_link;
Signature · 1 line
2.34.1
PATCH 8/41 drm/amd/display: Bounds-check connector->index in dm_dp_mst_get_modes
In reply to [email protected]From: Harry Wentland <[email protected]>
dm_dp_mst_get_modes() uses drm_connector->index to index the per-connector HDCP arrays in struct hdcp_workqueue. Those arrays are sized to AMDGPU_DM_MAX_DISPLAY_COUNT, which matches the DRM connector index range (0..31). Add a defensive bounds check so that, should the DRM connector index range ever grow beyond the array size, the access is skipped instead of reading and writing out of bounds.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +2 -1
@@ -485,7 +485,8 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)struct drm_device *dev = connector->dev;struct amdgpu_device *adev =drm_to_adev (dev); -if (adev->dm.hdcp_workqueue) { +if (adev->dm.hdcp_workqueue && + connector->index <AMDGPU_DM_MAX_DISPLAY_COUNT ) {struct hdcp_workqueue *hdcp_work = adev->dm.hdcp_workqueue;struct hdcp_workqueue *hdcp_w = &hdcp_work[aconnector->dc_link->link_index];
Signature · 1 line
2.34.1
PATCH 9/41 drm/amd/display: Ensure dtbclk is enabled
In reply to [email protected]From: Charlene Liu <[email protected]>
[why]
ensure dtbclk is enabled before hdmistreamclk_en
pmfw could stop dtbclk on idle.
driver needs to ensure dtbclk enabled is enabled before hdmistreamclk_en also disable debounce timer on dcn42.
--- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 28 +++++++++++++++++-- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 1 + .../drm/amd/display/dc/dce/dce_clock_source.c | 4 +++ .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + .../display/dc/link/protocols/link_hdmi_frl.c | 18 ++++++++++-- 5 files changed, 46 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c +25 -3
@@ -220,6 +220,7 @@ void dcn42_update_clocks(struct clk_mgr *clk_mgr_base,bool update_dispclk = false;bool dpp_clock_lowered = false;bool has_active_display; +int actual_dtbclk =0 ;if (dc->work_arounds.skip_clock_update)return ;
@@ -260,8 +261,9 @@ void dcn42_update_clocks(struct clk_mgr *clk_mgr_base,* For dcn42b (no dtbclk hardware), init_clk_states sets dtbclk_en=false and * new_clocks->dtbclk_en should always be false, so this block never executes. */ -if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) { -int actual_dtbclk =0 ; + actual_dtbclk =dcn42_get_clock_freq_from_clkip (clk_mgr_base, clock_type_dtbclk); + +if (new_clocks->dtbclk_en && actual_dtbclk <590000 ) {dcn42_update_clocks_update_dtb_dto (clk_mgr, context, new_clocks->ref_dtbclk_khz);dcn42_smu_set_dtbclk (clk_mgr, true);
@@ -343,7 +345,6 @@ void dcn42_update_clocks(struct clk_mgr *clk_mgr_base,dcn42_update_clocks_update_dtb_dto (clk_mgr, context, new_clocks->ref_dtbclk_khz); clk_mgr_base->clks.ref_dtbclk_khz = new_clocks->ref_dtbclk_khz; } -if (dpp_clock_lowered) {// increase per DPP DTO before lowering global dppclk dcn42_update_clocks_update_dpp_dto (clk_mgr, context, safe_to_lower);
@@ -1051,7 +1052,27 @@ void dcn42_get_smu_clocks(struct clk_mgr_internal *clk_mgr_int)dm_helpers_free_gpu_mem (clk_mgr_base->ctx,DC_MEM_ALLOC_TYPE_GART , smu_dpm_clks.dpm_clks); } +void dcn42_request_dtbclk (struct clk_mgr *clk_mgr_base,bool enable) +{ +struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base); + +/*pmfw might turn off dtblck based on allow_dtbstop*/ + clk_mgr_base->clks.dtbclk_en = false; +if (enable) { +int actual_dtbclk =0 ; + +dcn42_smu_set_dtbclk (clk_mgr, true); + actual_dtbclk =dcn42_get_clock_freq_from_clkip (clk_mgr_base, clock_type_dtbclk); +if (actual_dtbclk >590000 ) { + clk_mgr_base->clks.ref_dtbclk_khz = actual_dtbclk; + clk_mgr_base->clks.dtbclk_en = true; + } + }else { + clk_mgr_base->clks.dtbclk_en = false; +dcn42_smu_set_dtbclk (clk_mgr, false); + } +}static struct clk_mgr_funcs dcn42_funcs = { .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz, .get_dtb_ref_clk_frequency = dcn31_get_dtb_ref_freq_khz,
@@ -1065,6 +1086,7 @@ static struct clk_mgr_funcs dcn42_funcs = { .get_max_clock_khz = dcn42_get_max_clock_khz, .get_dispclk_from_dentist = dcn42_get_dispclk_from_dentist, .is_smu_present = dcn42_is_smu_present, + .request_dtbclk = dcn42_request_dtbclk, .notify_cstate_disable = dcn42_notify_cstate_disable, };
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h +1 -0
@@ -84,4 +84,5 @@ void dcn42_get_dpm_table_from_smu(struct clk_mgr_internal *clk_mgr, struct dcn42void dcn42_get_smu_clocks (struct clk_mgr_internal *clk_mgr_int);void dcn42_update_clocks_fpga (struct clk_mgr *clk_mgr,struct dc_state *context,bool safe_to_lower);int dcn42_get_dispclk_from_dentist (struct clk_mgr *clk_mgr_base); +void dcn42_request_dtbclk (struct clk_mgr *clk_mgr_base,bool enable);#endif //__DCN42_CLK_MGR_H__
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +4 -0
@@ -1118,6 +1118,10 @@ static bool dcn401_program_pix_clk(if (clock_source->ctx->dc->caps.is_apu && pix_clk_params->requested_pix_clk_100hz &&dc_is_hdmi_frl_signal (pix_clk_params->signal_type)) { +//make sure dtbclk is enabled +if (clock_source->ctx->dc->clk_mgr->funcs->request_dtbclk) + clock_source->ctx->dc->clk_mgr->funcs->request_dtbclk ( + clock_source->ctx->dc->clk_mgr, true);/*need hdmistreamclk before vpg block register access*/ clock_source->ctx->dc->res_pool->dccg->funcs->set_hdmistreamclk( clock_source->ctx->dc->res_pool->dccg,
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h +1 -0
@@ -427,6 +427,7 @@ struct clk_mgr_funcs { struct block_sequence_state *seq_state);void (*execute_clk_mgr_block_sequence)(struct clk_mgr *clk_mgr); +void (*request_dtbclk)(struct clk_mgr *clk_mgr_base,bool enable); };struct clk_mgr {
drivers/gpu/drm/amd/display/dc/link/protocols/link_hdmi_frl.c +15 -3
@@ -415,6 +415,18 @@ void hdmi_frl_LTS_clear_Link_Setting(struct ddc_service *ddc_service) } +static uint8_t hdmi_frl_get_max_ffe_level (struct dc_link *link, +struct dc_hdmi_frl_link_settings *link_settings) +{ +uint8_t max_ffe_level = + (link_settings->frl_link_rate >HDMI_FRL_LINK_RATE_12GBPS ) ?7 :3 ; + +if ((uint8_t )link->dc->debug.limit_ffe < max_ffe_level) + max_ffe_level = (uint8_t )link->dc->debug.limit_ffe; + +return max_ffe_level; +} +static enum link_result hdmi_frl_perform_link_training (struct ddc_service *ddc_service,struct dc_hdmi_frl_link_settings *link_settings) {
@@ -436,7 +448,7 @@ static enum link_result hdmi_frl_perform_link_training(struct ddc_service *ddc_sstruct hpo_frl_link_encoder *hpo_frl_link_enc = ddc_service->link->hpo_frl_link_enc;struct link_encoder *dio_link_enc = ddc_service->link->link_enc;uint8_t sink_version =0 ; -uint8_t FFE_Levels = (uint8_t )ddc_service->link->dc->debug.limit_ffe; +uint8_t FFE_Levels =hdmi_frl_get_max_ffe_level (ddc_service->link, link_settings);uint8_t current_FFE =0 ;bool override_FFE = false;bool flt_no_timeout = false;
@@ -616,7 +628,7 @@ static enum link_result hdmi_frl_perform_link_training(struct ddc_service *ddc_s } current_FFE++; override_FFE = true; -if (current_FFE >3 ) +if (current_FFE > FFE_Levels) current_FFE =0 ;if (flt_no_timeout) current_FFE =0 ;
@@ -642,7 +654,7 @@ static enum link_result hdmi_frl_perform_link_training(struct ddc_service *ddc_s } current_FFE++; override_FFE = true; -if (current_FFE >3 ) +if (current_FFE > FFE_Levels) current_FFE =0 ;if (flt_no_timeout) current_FFE =0 ;
Signature · 1 line
2.34.1
PATCH 10/41 drm/amd/display: Update VRR info packet to support 12-bit refresh rates
In reply to [email protected]From: Harry VanZyllDeJong <[email protected]>
[Why]
VRR info packet previously only supported up to 10-bit refresh rate values limiting the range of FreeSync minimum and maximum refresh rates that could be encoded.
[How]
Expanded the bit masking in PB11/PB12 from 2 to 4 bits to capture bits 11:8 of the minimum and maximum FreeSync refresh rates, enabling the VRR info packet to encode 12-bit refresh rate values.
--- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +4 -4
@@ -684,11 +684,11 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,/* PB8 = FreeSync Maximum refresh rate (Hz) */ infopacket->sb[8 ] = max_refresh &0xFF ; -/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 9:8 */ - infopacket->sb[11 ] = (min_programmed >>8 ) &0x03 ; +/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 11:8 */ + infopacket->sb[11 ] = (min_programmed >>8 ) &0x0F ; -/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 9:8 */ - infopacket->sb[12 ] = (max_refresh >>8 ) &0x03 ; +/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 11:8 */ + infopacket->sb[12 ] = (max_refresh >>8 ) &0x0F ;/* PB16 : Reserved bits 7:1, FixedRate bit 0 */ infopacket->sb[16 ] = (vrr->state ==VRR_STATE_ACTIVE_FIXED ) ?1 :0 ;
Signature · 1 line
2.34.1
PATCH 11/41 drm/amd/display: Gate HDMI FRL status polling on active FRL link rate
In reply to [email protected]From: Fangzhi Zuo <[email protected]>
[Why]hdmi_frl_status_polling_work() skipped any link whose connector_signal was not SIGNAL_TYPE_HDMI_FRL. connector_signal is not reliably set to SIGNAL_TYPE_HDMI_FRL while a link is actually running FRL, so links that were operating in FRL mode were skipped and their status flags never got polled, missing link-retrain events.
[How]
Use frl_link_settings.frl_link_rate to decide whether a link is running FRL. A non-zero rate means FRL is active, so only links with a zero rate are skipped. This ensures every link actually operating in FRL mode is polled for status changes.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +1 -1
@@ -3009,7 +3009,7 @@ static void hdmi_frl_status_polling_work(struct work_struct *work)if (!dc_is_hdmi_signal (dc_link->connector_signal))continue ; -if (dc_link->connector_signal !=SIGNAL_TYPE_HDMI_FRL ) +if (dc_link->frl_link_settings.frl_link_rate ==0 )continue ; link_update =dc_link_frl_poll_status_flag (dc_link);
Signature · 1 line
2.34.1
PATCH 12/41 drm/amd/display: Fix wb_info leak and NULL deref in writeback
In reply to [email protected]From: Alex Hung <[email protected]>
[WHAT]dc_stream_add_writeback() copies wb_info by value, so free it on all paths via a single cleanup label. Also bail out early when no pipe_ctx matches the stream to avoid a NULL pointer dereference.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +11 -5
@@ -4647,21 +4647,19 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm, wb_info =kzalloc_obj (*wb_info);if (!wb_info) {drm_err (adev_to_drm (adev),"Failed to allocate wb_info\n" ); -return ; + goto cleanup; } acrtc =to_amdgpu_crtc (wb_conn->encoder.crtc);if (!acrtc) {drm_err (adev_to_drm (adev),"no amdgpu_crtc found\n" ); -kfree (wb_info); -return ; + goto cleanup; } afb =to_amdgpu_framebuffer (new_con_state->writeback_job->fb);if (!afb) {drm_err (adev_to_drm (adev),"No amdgpu_framebuffer found\n" ); -kfree (wb_info); -return ; + goto cleanup; }for (i =0 ; i <MAX_PIPES ; i++) {
@@ -4671,6 +4669,11 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm, } } +if (!pipe) { +drm_err (adev_to_drm (adev),"No pipe found for stream\n" ); + goto cleanup; + } +/* fill in wb_info */ wb_info->wb_enabled = true;
@@ -4744,6 +4747,9 @@ static void dm_set_writeback(struct amdgpu_display_manager *dm,WARN_ON (drm_crtc_vblank_get (&acrtc->base)); acrtc->wb_frame_done = false; acrtc->wb_pending = true; + +cleanup: +kfree (wb_info); }static void amdgpu_dm_update_hdcp (struct drm_atomic_commit *state)
Signature · 1 line
2.34.1
PATCH 13/41 drm/amd/display: Fix seamless mode switch not triggering for HDR to SDR transition
In reply to [email protected]From: Karthi Kandasamy <[email protected]>
[Why]
The seamless mode switch was not getting triggered during HDR to SDR transitions, and no DPCD write was observed. Root cause analysis revealed that incorrect panel capabilities were being reported for PSR SU panels. Due to the wrong capabilities, the OS was not invoking the seamless mode switch API, resulting in no DPCD communication and also gated eDP teardown across the seamless mode switch hold.
[How]
Fixed by setting the correct power panel capabilities for PSR SU panels. This ensures the OS receives accurate panel capability information and triggers the seamless mode switch API as expected, restoring proper DPCD writes during HDR to SDR transitions.
The DC commit sequence was tearing the eDP down anyway -- backlight off, ABM disable, DPMS off, PSR/Replay enable state cleared, PHY TX off, OTG/OPTC off; all these actions are blocked now with the skip_implict_edp_power_control
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 10 ++++++-- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 21 ++++++++++++----- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 7 ++++-- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 23 ++++++++++++++----- .../drm/amd/display/modules/power/power_psr.c | 7 ++++++ .../amd/display/modules/power/power_replay.c | 7 ++++++ 7 files changed, 60 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -1994,6 +1994,7 @@ struct dc_scratch_space {// BW ALLOCATON USB4 ONLY struct dc_dpia_bw_alloc dpia_bw_alloc_config;bool skip_implict_edp_power_control; +bool forced_psr_active;enum backlight_control_type backlight_control_type; };
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +8 -2
@@ -1286,6 +1286,8 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)return ;if (link->local_sink && link->local_sink->sink_signal ==SIGNAL_TYPE_EDP ) { +if (link->forced_psr_active) +return ;if (!link->skip_implict_edp_power_control && hws) hws->funcs.edp_backlight_control (link, false); link->dc->hwss.set_abm_immediate_disable (pipe_ctx);
@@ -1811,7 +1813,9 @@ enum dc_status dce110_apply_single_controller_ctx_to_hw( dc->link_srv->set_dsc_enable (pipe_ctx, true); } -if (!stream->dpms_off) +if (!stream->dpms_off && + !(link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) dc->link_srv->set_dpms_on (context, pipe_ctx);/* DCN3.1 FPGA Workaround
@@ -1830,7 +1834,9 @@ enum dc_status dce110_apply_single_controller_ctx_to_hw(* is constructed with the same sink). Make sure not to override * and link programming on the main. */ -if (dc_state_get_pipe_subvp_type (context, pipe_ctx) !=SUBVP_PHANTOM ) { +if (dc_state_get_pipe_subvp_type (context, pipe_ctx) !=SUBVP_PHANTOM && + !(link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) { pipe_ctx->stream->link->psr_settings.psr_feature_enabled = false; pipe_ctx->stream->link->replay_settings.replay_feature_enabled = false; }
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +15 -6
@@ -537,10 +537,12 @@ static void dcn31_reset_back_end_for_pipe( }ASSERT (!pipe_ctx->top_pipe); - dc->hwss.set_abm_immediate_disable (pipe_ctx); - link = pipe_ctx->stream->link; +if (!(link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) + dc->hwss.set_abm_immediate_disable (pipe_ctx); +if (dc->hwseq) dc->hwseq->wa_state.skip_blank_stream = false;
@@ -555,9 +557,11 @@ static void dcn31_reset_back_end_for_pipe( pipe_ctx->stream_res.tg, OPTC_DSC_DISABLED, 0, 0); - pipe_ctx->stream_res.tg->funcs->disable_crtc (pipe_ctx->stream_res.tg); - - pipe_ctx->stream_res.tg->funcs->enable_optc_clock (pipe_ctx->stream_res.tg, false); +if (!(link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) { + pipe_ctx->stream_res.tg->funcs->disable_crtc (pipe_ctx->stream_res.tg); + pipe_ctx->stream_res.tg->funcs->enable_optc_clock (pipe_ctx->stream_res.tg, false); + }if (pipe_ctx->stream_res.tg->funcs->set_odm_bypass) pipe_ctx->stream_res.tg->funcs->set_odm_bypass ( pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing);
@@ -586,7 +590,12 @@ static void dcn31_reset_back_end_for_pipe(* screen only, the dpms_off would be true but * VBIOS lit up eDP, so check link status too. */ -if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) +if (link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active) { +/* forced psr is active for seamless switch; skip dpms-off. */ +if (pipe_ctx->stream_res.audio) + dc->hwss.disable_audio_stream (pipe_ctx); + }else if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) dc->link_srv->set_dpms_off (pipe_ctx);else if (pipe_ctx->stream_res.audio) dc->hwss.disable_audio_stream (pipe_ctx);
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +5 -2
@@ -1819,8 +1819,11 @@ void dcn35_disable_link_output(struct dc_link *link,disable_link_output_symclk_on_tx_off (link,DP_UNKNOWN_ENCODING ); link->phy_state.symclk_state =SYMCLK_ON_TX_OFF ; }else { - link_hwss->disable_link_output (link, link_res, signal); - link->phy_state.symclk_state =SYMCLK_OFF_TX_OFF ; +if (!(signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) { + link_hwss->disable_link_output (link, link_res, signal); + link->phy_state.symclk_state =SYMCLK_OFF_TX_OFF ; + } }/* * Add the logic to extract BOTH power up and power down sequences
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +17 -6
@@ -1113,8 +1113,11 @@ void dcn401_disable_link_output(struct dc_link *link,disable_link_output_symclk_on_tx_off (link,DP_UNKNOWN_ENCODING ); link->phy_state.symclk_state =SYMCLK_ON_TX_OFF ; }else { - link_hwss->disable_link_output (link, link_res, signal); - link->phy_state.symclk_state =SYMCLK_OFF_TX_OFF ; +if (!(signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) { + link_hwss->disable_link_output (link, link_res, signal); + link->phy_state.symclk_state =SYMCLK_OFF_TX_OFF ; + } } if (signal == SIGNAL_TYPE_EDP &&
@@ -2162,7 +2165,12 @@ void dcn401_reset_back_end_for_pipe(* screen only, the dpms_off would be true but * VBIOS lit up eDP, so check link status too. */ -if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) +if (link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active) { +/* Forced psr is active for seamless switch; skip dpms-off. */ +if (pipe_ctx->stream_res.audio) + dc->hwss.disable_audio_stream (pipe_ctx); + }else if (!pipe_ctx->stream->dpms_off || link->link_status.link_active) dc->link_srv->set_dpms_off (pipe_ctx);else if (pipe_ctx->stream_res.audio) dc->hwss.disable_audio_stream (pipe_ctx);
@@ -2187,12 +2195,15 @@ void dcn401_reset_back_end_for_pipe(* parent pipe. */ if (pipe_ctx->top_pipe ==NULL ) { +if (!(link->connector_signal ==SIGNAL_TYPE_EDP && + link->forced_psr_active)) { - dc->hwss.set_abm_immediate_disable (pipe_ctx); + dc->hwss.set_abm_immediate_disable (pipe_ctx); - pipe_ctx->stream_res.tg->funcs->disable_crtc (pipe_ctx->stream_res.tg); + pipe_ctx->stream_res.tg->funcs->disable_crtc (pipe_ctx->stream_res.tg); - pipe_ctx->stream_res.tg->funcs->enable_optc_clock (pipe_ctx->stream_res.tg, false); + pipe_ctx->stream_res.tg->funcs->enable_optc_clock (pipe_ctx->stream_res.tg, false); + }if (pipe_ctx->stream_res.tg->funcs->set_odm_bypass) pipe_ctx->stream_res.tg->funcs->set_odm_bypass ( pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing);
drivers/gpu/drm/amd/display/modules/power/power_psr.c +7 -0
@@ -58,6 +58,13 @@ bool mod_power_psr_notify_mode_change(struct mod_power *mod_power,// stream_index is passed as validated parameter active_psr_events = core_power->map[stream_index].psr_events; +/* forced psr is active for seamless switch. +* Re-running edp_setup_psr would disturb the freeze, +* so skip the PSR re-setup until forced psr releases the override. +*/ +if (active_psr_events & psr_event_os_override_hold) +return false; +/* Calculate PSR configurations */ mod_power_calc_psr_configs (&psr_config, link, stream);
drivers/gpu/drm/amd/display/modules/power/power_replay.c +7 -0
@@ -805,6 +805,13 @@ void mod_power_replay_notify_mode_change(struct mod_power *mod_power, core_power =MOD_POWER_TO_CORE (mod_power); active_replay_events = core_power->map[stream_index].replay_events; +/* forced psr is active for seamless switch. +* Re-running edp_setup_psr would disturb the freeze, +* so skip the PSR re-setup until forced psr releases the override. +*/ +if (active_replay_events & replay_event_os_override_hold) +return ; + link->replay_settings.replay_smu_opt_enable = (link->replay_settings.config.replay_smu_opt_supported &&mod_power_only_edp (dc->current_state, stream));
Signature · 1 line
2.34.1
PATCH 14/41 drm/amd/display: Add KUnit tests for more crtc functions
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Expand KUnit coverage for amdgpu_dm_crtc.c with tests for functions that are easy to exercise in isolation:
- amdgpu_dm_crtc_set_static_screen_optimze(): the !allow_sr_entry early return.
- amdgpu_dm_crtc_enable_vblank(): rejection with -EINVAL when enabling vblank on an unconfigured CRTC.
- amdgpu_dm_crtc_update_crtc_active_planes(): the no-stream branch that resets active_planes to zero.
- amdgpu_dm_crtc_duplicate_state(): DM-specific fields are carried over.
- amdgpu_dm_crtc_reset_state(): a fresh state is allocated and installed.
- amdgpu_dm_crtc_destroy_state(): a stream-less state is freed cleanly.
Expose amdgpu_dm_crtc_destroy_state(), amdgpu_dm_crtc_duplicate_state(), amdgpu_dm_crtc_reset_state() and amdgpu_dm_crtc_update_crtc_active_planes() to the tests via STATIC_IFN_KUNIT/EXPORT_IF_KUNIT.
--- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 14 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 6 + .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 177 ++++++++++++++++++ 3 files changed, 193 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +10 -4
@@ -134,6 +134,7 @@ void amdgpu_dm_crtc_set_static_screen_optimze(amdgpu_dm_psr_set_event (dm, stream, set_vsync_event, psr_event_vsync, set_vsync_event); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_set_static_screen_optimze);bool amdgpu_dm_is_headless (struct amdgpu_device *adev) {
@@ -393,13 +394,14 @@ int amdgpu_dm_crtc_enable_vblank(struct drm_crtc *crtc) {return amdgpu_dm_crtc_set_vblank (crtc, true); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_enable_vblank);void amdgpu_dm_crtc_disable_vblank (struct drm_crtc *crtc) {amdgpu_dm_crtc_set_vblank (crtc, false); } -static void amdgpu_dm_crtc_destroy_state (struct drm_crtc *crtc, +STATIC_IFN_KUNIT void amdgpu_dm_crtc_destroy_state(struct drm_crtc *crtc,struct drm_crtc_state *state) {struct dm_crtc_state *cur =to_dm_crtc_state (state);
@@ -414,8 +416,9 @@ static void amdgpu_dm_crtc_destroy_state(struct drm_crtc *crtc,kfree (state); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_destroy_state); -static struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state (struct drm_crtc *crtc) +STATIC_IFN_KUNIT struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state(struct drm_crtc *crtc) {struct dm_crtc_state *state, *cur;
@@ -450,6 +453,7 @@ static struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state(struct drm_crtc *crreturn &state->base; } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_duplicate_state);static void amdgpu_dm_crtc_destroy (struct drm_crtc *crtc) {
@@ -463,7 +467,7 @@ static void amdgpu_dm_crtc_destroy(struct drm_crtc *crtc)kfree (crtc); } -static void amdgpu_dm_crtc_reset_state (struct drm_crtc *crtc) +STATIC_IFN_KUNIT void amdgpu_dm_crtc_reset_state(struct drm_crtc *crtc) {struct dm_crtc_state *state;
@@ -476,6 +480,7 @@ static void amdgpu_dm_crtc_reset_state(struct drm_crtc *crtc)__drm_atomic_helper_crtc_reset (crtc, &state->base); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_reset_state);#ifdef CONFIG_DEBUG_FS static int amdgpu_dm_crtc_late_register (struct drm_crtc *crtc)
@@ -610,7 +615,7 @@ static int amdgpu_dm_crtc_count_crtc_active_planes(struct drm_crtc_state *new_crreturn num_active; } -static void amdgpu_dm_crtc_update_crtc_active_planes (struct drm_crtc *crtc, +STATIC_IFN_KUNIT void amdgpu_dm_crtc_update_crtc_active_planes(struct drm_crtc *crtc,struct drm_crtc_state *new_crtc_state) { struct dm_crtc_state *dm_new_crtc_state =
@@ -624,6 +629,7 @@ static void amdgpu_dm_crtc_update_crtc_active_planes(struct drm_crtc *crtc, dm_new_crtc_state->active_planes =amdgpu_dm_crtc_count_crtc_active_planes (new_crtc_state); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_update_crtc_active_planes); STATIC_IFN_KUNIT bool amdgpu_dm_crtc_helper_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h +6 -0
@@ -46,6 +46,12 @@ bool amdgpu_dm_crtc_vrr_active_irq(struct amdgpu_crtc *acrtc);bool amdgpu_dm_crtc_helper_mode_fixup (struct drm_crtc *crtc,const struct drm_display_mode *mode,struct drm_display_mode *adjusted_mode); +void amdgpu_dm_crtc_destroy_state (struct drm_crtc *crtc, +struct drm_crtc_state *state); +struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state (struct drm_crtc *crtc); +void amdgpu_dm_crtc_reset_state (struct drm_crtc *crtc); +void amdgpu_dm_crtc_update_crtc_active_planes (struct drm_crtc *crtc, +struct drm_crtc_state *new_crtc_state);#endif bool amdgpu_dm_crtc_vrr_active (const struct dm_crtc_state *dm_state);
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +177 -0
189 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 15/41 drm/amd/display: Add vblank handling tests for crtc
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add KUnit coverage for the CRTC vblank paths:
- amdgpu_dm_crtc_handle_vblank: no-event completion and the AMDGPU_FLIP_SUBMITTED guard that keeps a pending event pending.
- amdgpu_dm_crtc_vblank_control_worker: enable increments, disable decrements, and disable clamps the active vblank IRQ count at zero.
- amdgpu_dm_crtc_disable_vblank: disable path returns cleanly when the IRQ subsystem is not installed.
Expose amdgpu_dm_crtc_vblank_control_worker for KUnit via STATIC_IFN_KUNIT/EXPORT_IF_KUNIT and declare it in the header.
--- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 5 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 1 + .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 213 ++++++++++++++++++ 3 files changed, 218 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +4 -1
@@ -59,6 +59,7 @@ void amdgpu_dm_crtc_handle_vblank(struct amdgpu_crtc *acrtc)spin_unlock_irqrestore (&dev->event_lock, flags); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_handle_vblank); bool amdgpu_dm_crtc_modeset_required(struct drm_crtc_state *crtc_state, struct dc_stream_state *new_stream,
@@ -216,7 +217,7 @@ struct idle_workqueue *idle_create_workqueue(struct amdgpu_device *adev) }EXPORT_IF_KUNIT (idle_create_workqueue); -static void amdgpu_dm_crtc_vblank_control_worker (struct work_struct *work) +STATIC_IFN_KUNIT void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work) {struct vblank_control_work *vblank_work = container_of(work, struct vblank_control_work, work);
@@ -241,6 +242,7 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)kfree (vblank_work); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_vblank_control_worker);static inline int amdgpu_dm_crtc_set_vblank (struct drm_crtc *crtc,bool enable) {
@@ -400,6 +402,7 @@ void amdgpu_dm_crtc_disable_vblank(struct drm_crtc *crtc) {amdgpu_dm_crtc_set_vblank (crtc, false); } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_disable_vblank); STATIC_IFN_KUNIT void amdgpu_dm_crtc_destroy_state(struct drm_crtc *crtc,struct drm_crtc_state *state)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h +1 -0
@@ -52,6 +52,7 @@ struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state(struct drm_crtc *crtc);void amdgpu_dm_crtc_reset_state (struct drm_crtc *crtc);void amdgpu_dm_crtc_update_crtc_active_planes (struct drm_crtc *crtc,struct drm_crtc_state *new_crtc_state); +void amdgpu_dm_crtc_vblank_control_worker (struct work_struct *work);#endif bool amdgpu_dm_crtc_vrr_active (const struct dm_crtc_state *dm_state);
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +213 -0
231 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 16/41 drm/amd/display: Add idle worker tests for crtc
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Expose amdgpu_dm_idle_worker() for KUnit and add tests covering the disabled exit, both loop break paths, and the enable-body path. Add dm_kunit_alloc_dc_state() and dm_kunit_alloc_clk_mgr() helpers to support the new tests.
--- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 1 + .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 181 ++++++++++++++++++ .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c | 29 +++ .../tests/amdgpu_dm_kunit_test_helpers.h | 3 + 5 files changed, 216 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +2 -1
@@ -165,7 +165,7 @@ bool amdgpu_dm_is_headless(struct amdgpu_device *adev) }EXPORT_IF_KUNIT (amdgpu_dm_is_headless); -static void amdgpu_dm_idle_worker (struct work_struct *work) +STATIC_IFN_KUNIT void amdgpu_dm_idle_worker(struct work_struct *work) {struct idle_workqueue *idle_work;
@@ -199,6 +199,7 @@ static void amdgpu_dm_idle_worker(struct work_struct *work) } idle_work->dm->idle_workqueue->running = false; } +EXPORT_IF_KUNIT (amdgpu_dm_idle_worker);struct idle_workqueue *idle_create_workqueue (struct amdgpu_device *adev) {
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h +1 -0
@@ -53,6 +53,7 @@ void amdgpu_dm_crtc_reset_state(struct drm_crtc *crtc);void amdgpu_dm_crtc_update_crtc_active_planes (struct drm_crtc *crtc,struct drm_crtc_state *new_crtc_state);void amdgpu_dm_crtc_vblank_control_worker (struct work_struct *work); +void amdgpu_dm_idle_worker (struct work_struct *work);#endif bool amdgpu_dm_crtc_vrr_active (const struct dm_crtc_state *dm_state);
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +181 -0
193 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c +29 -0
@@ -12,6 +12,7 @@#include "dc.h" #include "core_types.h" +#include "clk_mgr.h" #include "amdgpu.h" #include "amdgpu_mode.h" #include "amdgpu_dm.h"
@@ -114,6 +115,34 @@ struct dc_stream_state *dm_kunit_alloc_stream(struct kunit *test, }EXPORT_SYMBOL (dm_kunit_alloc_stream); +struct dc_state *dm_kunit_alloc_dc_state (struct kunit *test) +{ +struct dc_state *state; + + state =kunit_kzalloc (test,sizeof (*state),GFP_KERNEL ); +KUNIT_ASSERT_NOT_NULL (test, state); + +return state; +} +EXPORT_SYMBOL (dm_kunit_alloc_dc_state); + +struct clk_mgr *dm_kunit_alloc_clk_mgr (struct kunit *test) +{ +struct clk_mgr *clk_mgr; +struct clk_mgr_funcs *funcs; + + clk_mgr =kunit_kzalloc (test,sizeof (*clk_mgr),GFP_KERNEL ); +KUNIT_ASSERT_NOT_NULL (test, clk_mgr); + + funcs =kunit_kzalloc (test,sizeof (*funcs),GFP_KERNEL ); +KUNIT_ASSERT_NOT_NULL (test, funcs); + + clk_mgr->funcs = funcs; + +return clk_mgr; +} +EXPORT_SYMBOL (dm_kunit_alloc_clk_mgr); +void dm_kunit_add_stream_to_state (struct kunit *test,struct dc_state *state,unsigned int index,struct dc_link *link) {
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_kunit_test_helpers.h +3 -0
@@ -13,6 +13,7 @@struct amdgpu_device ;struct amdgpu_display_manager ;struct amdgpu_dm_connector ; +struct clk_mgr ;struct dc ;struct dc_link ;struct dc_state ;
@@ -25,6 +26,8 @@ struct dc_link *dm_kunit_alloc_link(struct kunit *test);struct dc_link *dm_kunit_alloc_link_with_ctx (struct kunit *test);struct amdgpu_display_manager *dm_kunit_alloc_dm (struct kunit *test);struct drm_device *dm_kunit_alloc_drm_with_connector_list (struct kunit *test); +struct dc_state *dm_kunit_alloc_dc_state (struct kunit *test); +struct clk_mgr *dm_kunit_alloc_clk_mgr (struct kunit *test);struct dc_stream_state *dm_kunit_alloc_stream (struct kunit *test,struct dc_link *link); void dm_kunit_add_stream_to_state(struct kunit *test, struct dc_state *state,
Signature · 1 line
2.34.1
PATCH 17/41 drm/amd/display: Add active plane count tests for crtc
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Expose amdgpu_dm_crtc_count_crtc_active_planes() for KUnit and add tests covering the empty plane list and the mixed case exercising the mask filter, cursor skip, missing plane state, and framebuffer presence branches.
--- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 1 + .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 115 ++++++++++++++++++ 3 files changed, 118 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +2 -1
@@ -587,7 +587,7 @@ static void amdgpu_dm_crtc_helper_disable(struct drm_crtc *crtc) { } -static int amdgpu_dm_crtc_count_crtc_active_planes (struct drm_crtc_state *new_crtc_state) +STATIC_IFN_KUNIT int amdgpu_dm_crtc_count_crtc_active_planes(struct drm_crtc_state *new_crtc_state) {struct drm_atomic_commit *state = new_crtc_state->state;struct drm_plane *plane;
@@ -618,6 +618,7 @@ static int amdgpu_dm_crtc_count_crtc_active_planes(struct drm_crtc_state *new_crreturn num_active; } +EXPORT_IF_KUNIT (amdgpu_dm_crtc_count_crtc_active_planes); STATIC_IFN_KUNIT void amdgpu_dm_crtc_update_crtc_active_planes(struct drm_crtc *crtc,struct drm_crtc_state *new_crtc_state)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.h +1 -0
@@ -50,6 +50,7 @@ void amdgpu_dm_crtc_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *state);struct drm_crtc_state *amdgpu_dm_crtc_duplicate_state (struct drm_crtc *crtc);void amdgpu_dm_crtc_reset_state (struct drm_crtc *crtc); +int amdgpu_dm_crtc_count_crtc_active_planes (struct drm_crtc_state *new_crtc_state);void amdgpu_dm_crtc_update_crtc_active_planes (struct drm_crtc *crtc,struct drm_crtc_state *new_crtc_state);void amdgpu_dm_crtc_vblank_control_worker (struct work_struct *work);
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +115 -0
127 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 18/41 drm/amd/display: Add KUnit test for crtc vblank event completion
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_handle_vblank_completes_cursor_only to cover the previously untested branch in amdgpu_dm_crtc_handle_vblank() where a pending event with pflip_status != AMDGPU_FLIP_SUBMITTED (a cursor-only commit) is signalled: the vblank event is sent, the vblank reference is dropped, and acrtc->event is cleared.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +45 -0
@@ -971,6 +971,50 @@ static void dm_test_crtc_handle_vblank_skips_when_flip_submitted(struct kunit *tKUNIT_EXPECT_PTR_EQ (test, acrtc->event, event); } +/** +* dm_test_crtc_handle_vblank_completes_cursor_only - Test event sent on vblank +* @test: The KUnit test context +* +* A pending event whose flip is not AMDGPU_FLIP_SUBMITTED (a cursor-only commit) +* must be signalled on vblank: the vblank event is sent, the vblank reference is +* dropped and acrtc->event is cleared. +*/ +static void dm_test_crtc_handle_vblank_completes_cursor_only (struct kunit *test) +{ +struct drm_pending_vblank_event *event; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + +KUNIT_ASSERT_EQ (test,drm_vblank_init (&adev->ddev,1 ),0 ); + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + +/* drm_crtc_send_vblank_event() consumes (kfree()s) the event. */ + event =kzalloc_obj (*event,GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, event); + + acrtc->base.dev = &adev->ddev; + acrtc->event = event; + acrtc->pflip_status =AMDGPU_FLIP_NONE ; + +/* +* Take a vblank reference so the handler's drm_crtc_vblank_put() does not +* underflow. Mark vblank enabled so the get succeeds without a hardware +* enable hook. +*/ + adev->ddev.vblank[0 ].enabled = true; +KUNIT_ASSERT_EQ (test,drm_crtc_vblank_get (&acrtc->base),0 ); + +amdgpu_dm_crtc_handle_vblank (acrtc); + +/* Cursor-only commit: event was signalled and cleared. */ +KUNIT_EXPECT_NULL (test, acrtc->event); +} +/** * dm_test_vblank_control_worker_setup - Build a vblank_control_work for the worker * @test: The KUnit test context
@@ -1168,6 +1212,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {/* amdgpu_dm_crtc_handle_vblank */ KUNIT_CASE (dm_test_crtc_handle_vblank_no_event),KUNIT_CASE (dm_test_crtc_handle_vblank_skips_when_flip_submitted), +KUNIT_CASE (dm_test_crtc_handle_vblank_completes_cursor_only),/* amdgpu_dm_crtc_vblank_control_worker */ KUNIT_CASE (dm_test_vblank_control_worker_enable_increments), KUNIT_CASE(dm_test_vblank_control_worker_disable_decrements),
Signature · 1 line
2.34.1
PATCH 19/41 drm/amd/display: Add KUnit tests for crtc set_vupdate_irq
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_set_vupdate_irq_dc_busy and dm_test_crtc_set_vupdate_irq_enable to cover the previously untested paths in amdgpu_dm_crtc_set_vupdate_irq() where an OTG instance is
assigned: dc_interrupt_set() failing (returns -EBUSY) and succeeding via a mock IRQ service (returns 0 for enable and disable).
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +99 -0
@@ -12,6 +12,8 @@#include <drm/drm_vblank.h> #include "dc.h" +#include "inc/core_types.h" +#include "irq/irq_service.h" #include "amdgpu.h" #include "amdgpu_mode.h" #include "amdgpu_dm.h"
@@ -430,6 +432,101 @@ static void dm_test_crtc_set_vupdate_irq_no_otg(struct kunit *test)KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_set_vupdate_irq (&acrtc->base, false),0 ); } +/** +* dm_test_crtc_set_vupdate_irq_dc_busy - Test vupdate irq when DC rejects request +* @test: The KUnit test context +* +* With an OTG instance assigned but no DC attached, dc_interrupt_set() returns +* false and the function must report the request as busy (-EBUSY). +*/ +static void dm_test_crtc_set_vupdate_irq_dc_busy (struct kunit *test) +{ +struct amdgpu_crtc *acrtc; +struct amdgpu_device *adev; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + + acrtc->base.dev = &adev->ddev; + acrtc->otg_inst =0 ; + +/* adev->dm.dc is NULL, so dc_interrupt_set() returns false. */ +KUNIT_EXPECT_EQ (test, +amdgpu_dm_crtc_set_vupdate_irq (&acrtc->base, true), -EBUSY ); +} + +/* Per-source funcs let dc_interrupt_set() succeed without register access. */ +static bool dm_test_vupdate_irq_src_set (struct irq_service *irq_service, +const struct irq_source_info *info, +bool enable) +{ +return true; +} + +static bool dm_test_vupdate_irq_src_ack (struct irq_service *irq_service, +const struct irq_source_info *info) +{ +return true; +} + +static struct irq_source_info_funcs dm_test_vupdate_irq_src_funcs = { + .set = dm_test_vupdate_irq_src_set, + .ack = dm_test_vupdate_irq_src_ack, +}; + +/** +* dm_test_crtc_set_vupdate_irq_enable - Test vupdate irq enable/disable success +* @test: The KUnit test context +* +* With an OTG instance assigned and a DC whose IRQ service accepts the request, +* enabling and disabling the vupdate IRQ must both succeed (return 0). +*/ +static void dm_test_crtc_set_vupdate_irq_enable (struct kunit *test) +{ +struct irq_source_info *info; +struct resource_pool *res_pool; +struct irq_service *irqs; +struct amdgpu_crtc *acrtc; +struct amdgpu_device *adev; +struct dc *dc; +int i; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + + dc =dm_kunit_alloc_dc_with_ctx (test); + res_pool =kunit_kzalloc (test,sizeof (*res_pool),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, res_pool); + irqs =kunit_kzalloc (test,sizeof (*irqs),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, irqs); + +/* Populate the per-source info table so dc_interrupt_set() succeeds. */ + info =kunit_kzalloc (test,sizeof (*info) *DAL_IRQ_SOURCES_NUMBER , +GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, info); +for (i =0 ; i <DAL_IRQ_SOURCES_NUMBER ; i++) + info[i].funcs = &dm_test_vupdate_irq_src_funcs; + + irqs->info = info; + res_pool->irqs = irqs; + dc->res_pool = res_pool; + adev->dm.dc = dc; + + acrtc->base.dev = &adev->ddev; + acrtc->otg_inst =0 ; + +KUNIT_EXPECT_EQ (test, +amdgpu_dm_crtc_set_vupdate_irq (&acrtc->base, true),0 ); +KUNIT_EXPECT_EQ (test, +amdgpu_dm_crtc_set_vupdate_irq (&acrtc->base, false),0 ); +} +/* Tests for idle_create_workqueue() */ /**
@@ -1187,6 +1284,8 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_helper_mode_fixup_returns_true),/* amdgpu_dm_crtc_set_vupdate_irq */ KUNIT_CASE (dm_test_crtc_set_vupdate_irq_no_otg), +KUNIT_CASE (dm_test_crtc_set_vupdate_irq_dc_busy), +KUNIT_CASE (dm_test_crtc_set_vupdate_irq_enable),/* idle_create_workqueue */ KUNIT_CASE(dm_test_idle_create_workqueue),/* amdgpu_dm_idle_worker */
Signature · 1 line
2.34.1
PATCH 20/41 drm/amd/display: Add KUnit tests for crtc set_static_screen_optimze
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_set_static_screen_optimze_sr_entry_psr and dm_test_crtc_set_static_screen_optimze_psr_su_skips to cover the allow_sr_entry == true path of amdgpu_dm_crtc_set_static_screen_optimze():
the replay/PSR event updates when psr_version < DC_PSR_VERSION_SU_1, and skipping the PSR event update when psr_version is DC_PSR_VERSION_SU_1.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +55 -0
@@ -756,6 +756,59 @@ static void dm_test_crtc_set_static_screen_optimze_no_sr_entry(struct kunit *tesamdgpu_dm_crtc_set_static_screen_optimze (dm, stream, false, false); } +/** +* dm_test_crtc_set_static_screen_optimze_sr_entry_psr - Test SSO toggle drives PSR +* @test: The KUnit test context +* +* With self-refresh entry allowed and a PSR version below DC_PSR_VERSION_SU_1, +* the function must run both the replay and PSR event updates. The link has no +* replay/PSR feature enabled, so both event helpers short-circuit safely. Both +* SSO states are exercised to cover the set_vsync_event computation. +*/ +static void dm_test_crtc_set_static_screen_optimze_sr_entry_psr (struct kunit *test) +{ +struct amdgpu_display_manager *dm; +struct dc_link *link; +struct dc_stream_state *stream; + + dm =kunit_kzalloc (test,sizeof (*dm),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, dm); + + link =dm_kunit_alloc_link (test); + stream =dm_kunit_alloc_stream (test, link); + +/* psr_version < DC_PSR_VERSION_SU_1 -> PSR event branch is taken. */ + link->psr_settings.psr_version =DC_PSR_VERSION_1 ; + +amdgpu_dm_crtc_set_static_screen_optimze (dm, stream, true, true); +amdgpu_dm_crtc_set_static_screen_optimze (dm, stream, false, true); +} + +/** +* dm_test_crtc_set_static_screen_optimze_psr_su_skips - Test PSR SU skips PSR event +* @test: The KUnit test context +* +* With self-refresh entry allowed and a PSR version of DC_PSR_VERSION_SU_1, the +* function must update the replay event but skip the PSR event update. +*/ +static void dm_test_crtc_set_static_screen_optimze_psr_su_skips (struct kunit *test) +{ +struct amdgpu_display_manager *dm; +struct dc_link *link; +struct dc_stream_state *stream; + + dm =kunit_kzalloc (test,sizeof (*dm),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, dm); + + link =dm_kunit_alloc_link (test); + stream =dm_kunit_alloc_stream (test, link); + +/* psr_version >= DC_PSR_VERSION_SU_1 -> PSR event branch is skipped. */ + link->psr_settings.psr_version =DC_PSR_VERSION_SU_1 ; + +amdgpu_dm_crtc_set_static_screen_optimze (dm, stream, true, true); +} +/* Tests for amdgpu_dm_crtc_enable_vblank() */ /**
@@ -1295,6 +1348,8 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_idle_worker_enabled_runs_body),/* amdgpu_dm_crtc_set_static_screen_optimze */ KUNIT_CASE (dm_test_crtc_set_static_screen_optimze_no_sr_entry), +KUNIT_CASE (dm_test_crtc_set_static_screen_optimze_sr_entry_psr), +KUNIT_CASE (dm_test_crtc_set_static_screen_optimze_psr_su_skips),/* amdgpu_dm_crtc_enable_vblank */ KUNIT_CASE(dm_test_crtc_enable_vblank_rejects_unconfigured),/* amdgpu_dm_crtc_update_crtc_active_planes */
Signature · 1 line
2.34.1
PATCH 21/41 drm/amd/display: Refactor stream validation
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why]amdgpu_dm_create_validate_stream_for_sink() drove its RGB -> YUV422 -> YUV420 chroma fallback by recursing and toggling the shared aconnector->force_yuv420_output / force_yuv422_output fields, resetting them after each recursive call. Those fields have no locking and the function runs concurrently on the same connector from two paths: the connector probe worker (->mode_valid) and a compositor's atomic check (dm_update_crtc_state). When both run at once, one thread can clear the override just before the other tests its exit condition, so the exit is missed and validation loops indefinitely, hanging the modeset path.
[How]
- Replace the recursion with an explicit loop over the chroma encodings wrapping the existing bpc walk.
- Carry the encoding/bpc selection on the stack, passed by value into create_stream_for_sink() / fill_stream_properties_from_drm_display_mode(), instead of mutating shared connector state.
- Derive the supported encodings and bit depths into bitmaps and drive validation from them, gating each candidate on the sink's advertised capability so unsupported encodings are never retried.
- Move encoding selection entirely to the caller and pass the chosen dc_pixel_encoding into fill_stream_properties_from_drm_display_mode().
--- .../display/amdgpu_dm/amdgpu_dm_connector.c | 280 ++++++++++++------ .../display/amdgpu_dm/amdgpu_dm_connector.h | 8 +- 2 files changed, 189 insertions(+), 99 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +183 -97
@@ -855,7 +855,9 @@ STATIC_IFN_KUNIT void fill_stream_properties_from_drm_display_mode(const struct drm_connector *connector, const struct drm_connector_state *connector_state, const struct dc_stream_state *old_stream, - int requested_bpc) + int requested_bpc, + enum dc_pixel_encoding requested_encoding, + bool is_hdmi_ep) { struct dc_crtc_timing *timing_out = &stream->timing;const struct drm_display_info *info = &connector->display_info;
@@ -874,26 +876,14 @@ STATIC_IFN_KUNIT void fill_stream_properties_from_drm_display_mode( timing_out->h_border_right =0 ; timing_out->v_border_top =0 ; timing_out->v_border_bottom =0 ; -/* TODO: un-hardcode */ -if (drm_mode_is_420_only (info, mode_in) || - (aconnector && - (aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR420 || - aconnector->force_yuv420_output) && -drm_mode_is_420_also (info, mode_in))) - timing_out->pixel_encoding =PIXEL_ENCODING_YCBCR420 ; -else if ((connector->display_info.color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR422 )) - && aconnector - && (aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR422 - || aconnector->force_yuv422_output)) - timing_out->pixel_encoding =PIXEL_ENCODING_YCBCR422 ; -else if ((connector->display_info.color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR444 )) - && (stream->signal ==SIGNAL_TYPE_HDMI_TYPE_A || - stream->signal ==SIGNAL_TYPE_HDMI_FRL ) - && aconnector - && aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR444 ) - timing_out->pixel_encoding =PIXEL_ENCODING_YCBCR444 ; -else - timing_out->pixel_encoding =PIXEL_ENCODING_RGB ; + +/* +* The pixel encoding to use is decided entirely by the caller (see +* amdgpu_dm_create_validate_stream_for_sink()), which enumerates only +* the encodings the sink actually advertises. This helper must not +* second-guess that choice; it simply applies it. +*/ + timing_out->pixel_encoding = requested_encoding; timing_out->timing_3d_format =TIMING_3D_FORMAT_NONE ; timing_out->display_color_depth = amdgpu_dm_convert_color_depth_from_display_info(
@@ -959,14 +949,15 @@ STATIC_IFN_KUNIT void fill_stream_properties_from_drm_display_mode( stream->out_transfer_func.type =TF_TYPE_PREDEFINED ; stream->out_transfer_func.tf =TRANSFER_FUNCTION_SRGB ; -if (stream->signal ==SIGNAL_TYPE_HDMI_TYPE_A ) { -if (!adjust_colour_depth_from_display_info (timing_out, info) && -drm_mode_is_420_also (info, mode_in) && - timing_out->pixel_encoding !=PIXEL_ENCODING_YCBCR420 ) { - timing_out->pixel_encoding =PIXEL_ENCODING_YCBCR420 ; -adjust_colour_depth_from_display_info (timing_out, info); - } - } + +/* Clamp the HDMI colour depth to what the sink's max TMDS clock +* allows. The pixel encoding is fixed by the caller and must not be +* changed here: the caller already enumerates YCbCr420 as its own +* candidate, so silently switching to it would hide an enumeration +* bug and produce a stream the caller never asked to validate. +*/ +if (is_hdmi_ep) +adjust_colour_depth_from_display_info (timing_out, info); stream->output_color_space =amdgpu_dm_get_output_color_space (timing_out, connector_state); stream->content_type =get_output_content_type (connector_state);
@@ -1433,7 +1424,9 @@ create_stream_for_sink(struct drm_connector *connector,const struct drm_display_mode *drm_mode, const struct dm_connector_state *dm_state, const struct dc_stream_state *old_stream, - int requested_bpc) + int requested_bpc, + enum dc_pixel_encoding requested_encoding, + bool is_hdmi_ep) { struct drm_device *dev = connector->dev;struct amdgpu_dm_connector *aconnector =NULL ;
@@ -1544,11 +1537,11 @@ create_stream_for_sink(struct drm_connector *connector,if (!scale || mode_refresh != preferred_refresh)fill_stream_properties_from_drm_display_mode ( stream, &mode, connector, con_state,NULL , - requested_bpc); + requested_bpc, requested_encoding, is_hdmi_ep);else fill_stream_properties_from_drm_display_mode ( stream, &mode, connector, con_state, old_stream, - requested_bpc); + requested_bpc, requested_encoding, is_hdmi_ep);/* The rest isn't needed for writeback connectors */ if (!aconnector)
@@ -2221,13 +2214,31 @@ amdgpu_dm_create_validate_stream_for_sink(struct drm_connector *connector, const struct dm_connector_state *dm_state, const struct dc_stream_state *old_stream) { +/* +* Ordered lists of the encodings and bit depths we are willing to +* validate, best quality/bandwidth first. The per-sink masks built +* below gate which of these entries are actually attempted. +*/ +static const enum dc_pixel_encoding encoding_order[] = { +PIXEL_ENCODING_YCBCR444 , +PIXEL_ENCODING_RGB , +PIXEL_ENCODING_YCBCR422 , +PIXEL_ENCODING_YCBCR420 , + }; +static const u8 bpc_order[] = {16 ,12 ,10 ,8 ,6 }; +struct amdgpu_dm_connector *aconnector =NULL ;struct amdgpu_device *adev =drm_to_adev (connector->dev); -struct dc_stream_state *stream; +const struct drm_display_info *info = &connector->display_info; +struct dc_stream_state *stream =NULL ;const struct drm_connector_state *drm_state = dm_state ? &dm_state->base :NULL ;int requested_bpc = drm_state ? drm_state->max_requested_bpc :8 ;enum dc_status dc_result =DC_OK ; -uint8_t bpc_limit =6 ; +enum signal_type signal =SIGNAL_TYPE_NONE ; +u32 encoding_mask =0 ; +u32 bpc_mask =0 ; +bool is_hdmi_ep = false; +unsigned int i, j;if (!dm_state)return NULL ;
@@ -2235,87 +2246,162 @@ amdgpu_dm_create_validate_stream_for_sink(struct drm_connector *connector,if (connector->connector_type !=DRM_MODE_CONNECTOR_WRITEBACK ) aconnector =to_amdgpu_dm_connector (connector); -if (aconnector && - (aconnector->dc_link->connector_signal ==SIGNAL_TYPE_HDMI_TYPE_A || - aconnector->dc_link->connector_signal ==SIGNAL_TYPE_HDMI_FRL || - aconnector->dc_link->dpcd_caps.dongle_type ==DISPLAY_DONGLE_DP_HDMI_CONVERTER )) - bpc_limit =8 ; - -do { -drm_dbg_kms (connector->dev,"Trying with %d bpc\n" , requested_bpc); - stream =create_stream_for_sink (connector, drm_mode, - dm_state, old_stream, - requested_bpc); -if (stream ==NULL ) { +/* +* Writeback connectors have no sink EDID to enumerate against. They +* only ever use RGB at the requested depth, so build and validate a +* single stream directly and return it (dc_validate_stream() is not +* meaningful for the writeback path). +*/ +if (!aconnector) { + stream =create_stream_for_sink (connector, drm_mode, dm_state, + old_stream, requested_bpc, +PIXEL_ENCODING_RGB , is_hdmi_ep); +if (!stream)drm_err (adev_to_drm (adev),"Failed to create stream for sink!\n" ); -break ; - } +return stream; + } - dc_result =dc_validate_stream (adev->dm.dc, stream); + signal = aconnector->dc_link->connector_signal; -if (!aconnector)/* writeback connector */ -return stream; +/* +* Determine whether this is a native HDMI sink or a DP->HDMI dongle. +* Since we check for it a few times below, cache the result. +*/ + is_hdmi_ep = (signal ==SIGNAL_TYPE_HDMI_TYPE_A || + signal ==SIGNAL_TYPE_HDMI_FRL || + aconnector->dc_link->dpcd_caps.dongle_type == +DISPLAY_DONGLE_DP_HDMI_CONVERTER ); + +/* +* Build the set of pixel encodings this sink advertises, so we only +* ever validate combinations the display can actually accept. Ordered +* best-first: RGB / YCbCr444 (full bandwidth) -> YCbCr422 -> YCbCr420. +* +* - RGB is the mandatory baseline and always available. +* - YCbCr444 is only meaningful for native HDMI sinks. +* - A 420-only mode collapses the mask to YCbCr420 alone. +* - The debugfs force_yuv420_output / force_yuv422_output overrides +* pin the encoding to a single value when set. An explicit YCbCr420 +* force is honoured even on modes the sink only lists as RGB/4:4:4 +* capable (drm_mode_is_420_also() clear), as required for HDMI +* compliance testing; dc_validate_stream() still rejects anything +* the link genuinely cannot carry. The YCbCr422 force stays gated on +* the sink's advertised caps. +*/ +if (drm_mode_is_420_only (info, drm_mode) || + aconnector->force_yuv420_output) { + encoding_mask =BIT (PIXEL_ENCODING_YCBCR420 ); + }else if (aconnector->force_yuv422_output && + (info->color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR422 ))) { + encoding_mask =BIT (PIXEL_ENCODING_YCBCR422 ); + }else { + encoding_mask =BIT (PIXEL_ENCODING_RGB ); + +if ((info->color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR444 )) && + is_hdmi_ep) + encoding_mask |=BIT (PIXEL_ENCODING_YCBCR444 ); + +if (info->color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR422 )) + encoding_mask |=BIT (PIXEL_ENCODING_YCBCR422 ); + +if (drm_mode_is_420_also (info, drm_mode)) + encoding_mask |=BIT (PIXEL_ENCODING_YCBCR420 ); + } + +/* +* Build the set of bit depths to try, high-to-low. Start from the +* atomic-requested cap and clear anything the sink cannot do: +* +* - Never exceed the requested bpc. +* - HDMI/FRL and DP->HDMI dongles have no defined 6 bpc mode. +* - Any depth above the EDID-reported bpc is dropped. +* +* amdgpu_dm_convert_color_depth_from_display_info() applies the final +* per-encoding cap (e.g. YCbCr420 deep-colour limits) when the stream +* is built, so this mask only needs the coarse sink limits. +*/ +for (j =0 ; j <ARRAY_SIZE (bpc_order); j++) { +u8 bpc = bpc_order[j]; + +if (requested_bpc >0 && bpc > requested_bpc) +continue ; + +if (bpc ==6 && is_hdmi_ep) +continue ; + +if (info->bpc && bpc > info->bpc) +continue ; + + bpc_mask |=BIT (bpc); + } + +/* +* Enumerate the supported (encoding, bpc) combinations in priority +* order and return the first that validates. Because the masks only +* contain sink-supported entries, this is generic across connector +* types and needs no encoding-specific fallback afterwards. +* +* The selection lives entirely on the stack and is passed by value to +* create_stream_for_sink(); no shared connector state is mutated. This +* matters because this helper runs concurrently from the connector +* probe worker (->mode_valid) and from a compositor's atomic check on +* the same connector. +*/ +for (i =0 ; i <ARRAY_SIZE (encoding_order); i++) { +enum dc_pixel_encoding enc = encoding_order[i]; + +if (!(encoding_mask &BIT (enc))) +continue ; + +for (j =0 ; j <ARRAY_SIZE (bpc_order); j++) { +u8 bpc = bpc_order[j]; -if (dc_result ==DC_OK && stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST ) - dc_result =dm_dp_mst_is_port_support_mode (aconnector, stream); +if (!(bpc_mask &BIT (bpc))) +continue ; -if (dc_result ==DC_OK ) - dc_result =dm_validate_stream_and_context (adev->dm.dc, stream); +drm_dbg_kms (connector->dev, +"Trying %s with %d bpc (encoding_mask=0x%x bpc_mask=0x%x requested_bpc=%d drm max_bpc)\n" , +dc_pixel_encoding_to_str (enc), bpc, + encoding_mask, bpc_mask, requested_bpc); -if (dc_result !=DC_OK ) { -drm_dbg_kms (connector->dev,"Pruned mode %d x %d (clk %d) %s %s -- %s\n" , + stream =create_stream_for_sink (connector, drm_mode, + dm_state, old_stream, + bpc, enc, is_hdmi_ep); +if (stream ==NULL ) { +drm_err (adev_to_drm (adev),"Failed to create stream for sink!\n" ); +return NULL ; + } + + dc_result =dc_validate_stream (adev->dm.dc, stream); + +if (dc_result ==DC_OK && + stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST ) + dc_result =dm_dp_mst_is_port_support_mode (aconnector, stream); + +if (dc_result ==DC_OK ) + dc_result =dm_validate_stream_and_context (adev->dm.dc, stream); + +if (dc_result ==DC_OK ) +return stream; + +drm_dbg_kms (connector->dev,"Pruned mode %d x %d (refresh rate %d) %s %s -- %s\n" , drm_mode->hdisplay, drm_mode->vdisplay, - drm_mode->clock, +drm_mode_vrefresh (drm_mode),dc_pixel_encoding_to_str (stream->timing.pixel_encoding),dc_color_depth_to_str (stream->timing.display_color_depth),dc_status_to_str (dc_result));dc_stream_release (stream); stream =NULL ; - requested_bpc -=2 ;/* lower bpc to retry validation */ } + } - }while (stream ==NULL && requested_bpc >= bpc_limit); - -switch (dc_result) {/* -* If we failed to validate DP bandwidth stream with the requested RGB color depth, -* we try to fallback and configure in order: -* YUV422 (8bpc, 6bpc) -* YUV420 (8bpc, 6bpc) +* Every sink-supported combination was exhausted without validating; +* the mode is genuinely unsupported on this link. */ -case DC_FAIL_ENC_VALIDATE : -case DC_EXCEED_DONGLE_CAP : -case DC_NO_DP_LINK_BANDWIDTH : -/* recursively entered twice and already tried both YUV422 and YUV420 */ -if (aconnector->force_yuv422_output && aconnector->force_yuv420_output) -break ; -/* first failure; try YUV422 */ -if (!aconnector->force_yuv422_output) { -drm_dbg_kms (connector->dev,"%s:%d Validation failed with %d, retrying w/ YUV422\n" , - __func__, __LINE__, dc_result); - aconnector->force_yuv422_output = true; -/* recursively entered and YUV422 failed, try YUV420 */ - }else if (!aconnector->force_yuv420_output) { -drm_dbg_kms (connector->dev,"%s:%d Validation failed with %d, retrying w/ YUV420\n" , - __func__, __LINE__, dc_result); - aconnector->force_yuv420_output = true; - } - stream =amdgpu_dm_create_validate_stream_for_sink (connector, drm_mode, - dm_state, old_stream); - aconnector->force_yuv422_output = false; - aconnector->force_yuv420_output = false; -break ; -case DC_OK : -break ; -default : -drm_dbg_kms (connector->dev,"%s:%d Unhandled validation failure %d\n" , - __func__, __LINE__, dc_result); -break ; - } - -return stream; +return NULL ; }EXPORT_IF_KUNIT (amdgpu_dm_create_validate_stream_for_sink);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h +6 -2
@@ -189,13 +189,17 @@ void fill_stream_properties_from_drm_display_mode(const struct drm_connector *connector, const struct drm_connector_state *connector_state, const struct dc_stream_state *old_stream, - int requested_bpc); + int requested_bpc, + enum dc_pixel_encoding requested_encoding, + bool is_hdmi_ep);struct dc_stream_state *create_stream_for_sink (struct drm_connector *connector,const struct drm_display_mode *drm_mode,const struct dm_connector_state *dm_state,const struct dc_stream_state *old_stream, -int requested_bpc); +int requested_bpc, +enum dc_pixel_encoding requested_encoding, +bool is_hdmi_ep);enum drm_connector_status amdgpu_dm_connector_poll (struct amdgpu_dm_connector *aconnector,bool force);enum drm_connector_status
Signature · 1 line
2.34.1
PATCH 22/41 drm/amd/display: Unify force_yuv debugfs into force_yuv_pixel_format
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why]
The connector exposed a single force_yuv420_output boolean debugfs and carried force_yuv420_output / force_yuv422_output boolean fields to force a chroma encoding. This cannot express "force RGB" or "force YCbCr444", and diverges from the upstream amdgpu_dm which uses a single force_yuv_pixel_format field keyed on enum dc_pixel_encoding.
[How]
- Replace the two boolean fields with a single uint8_t force_yuv_pixel_format holding an enum dc_pixel_encoding value (PIXEL_ENCODING_UNDEFINED == no override).
- Replace the force_yuv420_output boolean debugfs with a read/write force_yuv_pixel_format file that takes the encoding directly (1=RGB, 2=YCbCr422, 3=YCbCr444, 4=YCbCr420), validated against PIXEL_ENCODING_COUNT.
- Convert the existing readers/writers in amdgpu_dm_connector.c to the new field, preserving current behaviour.
- Add YCbCr444 force support now that the field can express it.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../display/amdgpu_dm/amdgpu_dm_connector.c | 23 +++++--- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 57 +++++++------------ 3 files changed, 34 insertions(+), 48 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +0 -2
@@ -857,8 +857,6 @@ struct amdgpu_dm_connector {struct mutex hpd_lock;bool fake_enable; -bool force_yuv420_output; -bool force_yuv422_output;uint8_t force_yuv_pixel_format;struct dsc_preferred_settings dsc_settings;struct psr_caps psr_caps;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +14 -9
@@ -147,7 +147,7 @@ STATIC_IFN_KUNIT int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,int max_bpc = conn_state->max_requested_bpc; is_y420 =drm_mode_is_420_also (&connector->display_info, adjusted_mode) && - aconnector->force_yuv420_output; + aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR420 ; color_depth =amdgpu_dm_convert_color_depth_from_display_info (connector, is_y420, max_bpc);
@@ -2280,20 +2280,25 @@ amdgpu_dm_create_validate_stream_for_sink(struct drm_connector *connector,* - RGB is the mandatory baseline and always available. * - YCbCr444 is only meaningful for native HDMI sinks. * - A 420-only mode collapses the mask to YCbCr420 alone. -* - The debugfs force_yuv420_output / force_yuv422_output overrides -* pin the encoding to a single value when set. An explicit YCbCr420 -* force is honoured even on modes the sink only lists as RGB/4:4:4 -* capable (drm_mode_is_420_also() clear), as required for HDMI -* compliance testing; dc_validate_stream() still rejects anything -* the link genuinely cannot carry. The YCbCr422 force stays gated on +* - The debugfs force_yuv_pixel_format override pins the encoding to a +* single dc_pixel_encoding when set (PIXEL_ENCODING_UNDEFINED means +* "no override"). An explicit YCbCr420 force is honoured even on +* modes the sink only lists as RGB/4:4:4 capable +* (drm_mode_is_420_also() clear), as required for HDMI compliance +* testing; dc_validate_stream() still rejects anything the link +* genuinely cannot carry. The YCbCr422/YCbCr444 forces stay gated on * the sink's advertised caps. */ if (drm_mode_is_420_only (info, drm_mode) || - aconnector->force_yuv420_output) { + aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR420 ) { encoding_mask =BIT (PIXEL_ENCODING_YCBCR420 ); - }else if (aconnector->force_yuv422_output && + }else if (aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR422 && (info->color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR422 ))) { encoding_mask =BIT (PIXEL_ENCODING_YCBCR422 ); + }else if (aconnector->force_yuv_pixel_format ==PIXEL_ENCODING_YCBCR444 && + (info->color_formats &BIT (DRM_OUTPUT_COLOR_FORMAT_YCBCR444 )) && + is_hdmi_ep) { + encoding_mask =BIT (PIXEL_ENCODING_YCBCR444 ); }else { encoding_mask =BIT (PIXEL_ENCODING_RGB );
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +20 -37
86 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 23/41 drm/amd/display: Align connector KUnit tests with stream validation refactor
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why&How]
Update the amdgpu_dm_connector KUnit tests for the new fill_stream_properties_from_drm_display_mode() and create_stream_for_sink() signatures, which now take an explicit pixel encoding and an is_hdmi_ep flag instead of deriving the encoding from connector state.
- Pass PIXEL_ENCODING_RGB / is_hdmi_ep=false to all existing call sites.
- Add cases verifying the caller-selected encoding is applied verbatim (YCbCr420/422/444), replacing the old display-info-derived behaviour.
- Add cases covering the is_hdmi_ep TMDS colour-depth clamp: depth is reduced when over the sink limit on an HDMI endpoint and left untouched otherwise.
--- .../tests/amdgpu_dm_connector_test.c | 155 ++++++++++++++++-- 1 file changed, 141 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c +141 -14
@@ -3416,7 +3416,8 @@ static void dm_test_fill_stream_borders_zeroed(struct kunit *test) timing->v_border_bottom =8 ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->h_border_left,0 );KUNIT_EXPECT_EQ (test, (int )timing->h_border_right,0 );
@@ -3437,7 +3438,8 @@ static void dm_test_fill_stream_rgb_defaults(struct kunit *test)struct dc_crtc_timing *timing = &ctx->stream->timing;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->pixel_encoding, (int )PIXEL_ENCODING_RGB ); KUNIT_EXPECT_EQ(test, (int)timing->timing_3d_format,
@@ -3463,7 +3465,8 @@ static void dm_test_fill_stream_sync_polarity_positive(struct kunit *test) ctx->mode->flags =DRM_MODE_FLAG_PHSYNC |DRM_MODE_FLAG_PVSYNC ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->flags.HSYNC_POSITIVE_POLARITY,1 );KUNIT_EXPECT_EQ (test, (int )timing->flags.VSYNC_POSITIVE_POLARITY,1 );
@@ -3482,7 +3485,8 @@ static void dm_test_fill_stream_sync_polarity_negative(struct kunit *test) ctx->mode->flags =0 ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->flags.HSYNC_POSITIVE_POLARITY,0 );KUNIT_EXPECT_EQ (test, (int )timing->flags.VSYNC_POSITIVE_POLARITY,0 );
@@ -3511,7 +3515,8 @@ static void dm_test_fill_stream_inherits_old_stream(struct kunit *test) ctx->mode->flags =DRM_MODE_FLAG_PHSYNC |DRM_MODE_FLAG_PVSYNC ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state, old_stream,8 ); + &ctx->aconnector->base, ctx->conn_state, old_stream,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->vic,16 );KUNIT_EXPECT_EQ (test, (int )timing->flags.HSYNC_POSITIVE_POLARITY,1 );
@@ -3541,7 +3546,8 @@ static void dm_test_fill_stream_timing_from_crtc(struct kunit *test) ctx->mode->crtc_clock =148500 ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->h_addressable,1920 );KUNIT_EXPECT_EQ (test, (int )timing->h_total,2200 );
@@ -3568,7 +3574,8 @@ static void dm_test_fill_stream_color_depth_requested_bpc(struct kunit *test) ctx->aconnector->base.display_info.bpc =12 ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,10 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,10 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->display_color_depth, (int )COLOR_DEPTH_101010 );
@@ -3585,7 +3592,8 @@ static void dm_test_fill_stream_content_type(struct kunit *test) ctx->conn_state->content_type =DRM_MODE_CONTENT_TYPE_GRAPHICS ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )ctx->stream->content_type, (int )DISPLAY_CONTENT_TYPE_GRAPHICS );
@@ -3603,12 +3611,121 @@ static void dm_test_fill_stream_aspect_ratio(struct kunit *test) ctx->mode->picture_aspect_ratio =HDMI_PICTURE_ASPECT_16_9 ;fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, - &ctx->aconnector->base, ctx->conn_state,NULL ,8 ); + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_EXPECT_EQ (test, (int )timing->aspect_ratio, (int )ASPECT_RATIO_16_9 ); } +/** +* dm_test_fill_stream_encoding_from_caller_ycbcr420 - Test caller-selected 420 +* @test: The KUnit test context +* +* The helper no longer derives the pixel encoding from the display info; it +* applies whatever the caller selected. Passing YCbCr420 must be honoured even +* though the DisplayPort sink advertises no YCbCr color formats. +*/ +static void dm_test_fill_stream_encoding_from_caller_ycbcr420 (struct kunit *test) +{ +struct dm_test_fill_ctx *ctx =dm_test_fill_ctx_alloc (test); +struct dc_crtc_timing *timing = &ctx->stream->timing; + +fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_YCBCR420 , false); + +KUNIT_EXPECT_EQ (test, (int )timing->pixel_encoding, + (int )PIXEL_ENCODING_YCBCR420 ); +} + +/** +* dm_test_fill_stream_encoding_from_caller_ycbcr422 - Test caller-selected 422 +* @test: The KUnit test context +* +* A caller-selected YCbCr422 encoding is applied verbatim. +*/ +static void dm_test_fill_stream_encoding_from_caller_ycbcr422 (struct kunit *test) +{ +struct dm_test_fill_ctx *ctx =dm_test_fill_ctx_alloc (test); +struct dc_crtc_timing *timing = &ctx->stream->timing; + +fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_YCBCR422 , false); + +KUNIT_EXPECT_EQ (test, (int )timing->pixel_encoding, + (int )PIXEL_ENCODING_YCBCR422 ); +} + +/** +* dm_test_fill_stream_encoding_from_caller_ycbcr444 - Test caller-selected 444 +* @test: The KUnit test context +* +* A caller-selected YCbCr444 encoding is applied verbatim. +*/ +static void dm_test_fill_stream_encoding_from_caller_ycbcr444 (struct kunit *test) +{ +struct dm_test_fill_ctx *ctx =dm_test_fill_ctx_alloc (test); +struct dc_crtc_timing *timing = &ctx->stream->timing; + +fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, + &ctx->aconnector->base, ctx->conn_state,NULL ,8 , +PIXEL_ENCODING_YCBCR444 , false); + +KUNIT_EXPECT_EQ (test, (int )timing->pixel_encoding, + (int )PIXEL_ENCODING_YCBCR444 ); +} + +/** +* dm_test_fill_stream_hdmi_ep_clamps_depth - Test HDMI TMDS depth clamp applied +* @test: The KUnit test context +* +* With is_hdmi_ep set the colour depth is clamped to what the sink's max TMDS +* clock allows: a 10bpc request that exceeds the limit is reduced to 8bpc. +*/ +static void dm_test_fill_stream_hdmi_ep_clamps_depth (struct kunit *test) +{ +struct dm_test_fill_ctx *ctx =dm_test_fill_ctx_alloc (test); +struct dc_crtc_timing *timing = &ctx->stream->timing; + + ctx->aconnector->base.display_info.bpc =10 ; +/* 10bpc RGB needs 185625 KHz, over the sink's 160 MHz TMDS limit. */ + ctx->aconnector->base.display_info.max_tmds_clock =160000 ; + ctx->mode->crtc_clock =148500 ; + +fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, + &ctx->aconnector->base, ctx->conn_state,NULL ,10 , +PIXEL_ENCODING_RGB , true); + +KUNIT_EXPECT_EQ (test, (int )timing->display_color_depth, + (int )COLOR_DEPTH_888 ); +} + +/** +* dm_test_fill_stream_non_hdmi_ep_keeps_depth - Test no TMDS clamp off HDMI +* @test: The KUnit test context +* +* With is_hdmi_ep clear the TMDS clamp is skipped, so the same over-limit +* 10bpc request is left untouched. The clamp is HDMI-specific. +*/ +static void dm_test_fill_stream_non_hdmi_ep_keeps_depth (struct kunit *test) +{ +struct dm_test_fill_ctx *ctx =dm_test_fill_ctx_alloc (test); +struct dc_crtc_timing *timing = &ctx->stream->timing; + + ctx->aconnector->base.display_info.bpc =10 ; + ctx->aconnector->base.display_info.max_tmds_clock =160000 ; + ctx->mode->crtc_clock =148500 ; + +fill_stream_properties_from_drm_display_mode (ctx->stream, ctx->mode, + &ctx->aconnector->base, ctx->conn_state,NULL ,10 , +PIXEL_ENCODING_RGB , false); + +KUNIT_EXPECT_EQ (test, (int )timing->display_color_depth, + (int )COLOR_DEPTH_101010 ); +} +/* Tests for create_stream_for_sink() */ /*
@@ -3687,7 +3804,8 @@ static void dm_test_create_stream_fake_sink_success(struct kunit *test)struct dc_stream_state *stream; stream =create_stream_for_sink (&ctx->aconnector->base, ctx->mode, - ctx->dm_state,NULL ,8 ); + ctx->dm_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_ASSERT_NOT_NULL (test, stream);dc_stream_release (stream);
@@ -3703,7 +3821,8 @@ static void dm_test_create_stream_sets_dm_context(struct kunit *test)struct dc_stream_state *stream; stream =create_stream_for_sink (&ctx->aconnector->base, ctx->mode, - ctx->dm_state,NULL ,8 ); + ctx->dm_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_ASSERT_NOT_NULL (test, stream);KUNIT_EXPECT_PTR_EQ (test, stream->dm_stream_context, ctx->aconnector);
@@ -3720,7 +3839,8 @@ static void dm_test_create_stream_virtual_signal(struct kunit *test)struct dc_stream_state *stream; stream =create_stream_for_sink (&ctx->aconnector->base, ctx->mode, - ctx->dm_state,NULL ,8 ); + ctx->dm_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_ASSERT_NOT_NULL (test, stream);KUNIT_EXPECT_EQ (test, (int )stream->signal, (int )SIGNAL_TYPE_VIRTUAL );
@@ -3739,7 +3859,8 @@ static void dm_test_create_stream_scaling_src(struct kunit *test)struct dc_stream_state *stream; stream =create_stream_for_sink (&ctx->aconnector->base, ctx->mode, - ctx->dm_state,NULL ,8 ); + ctx->dm_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_ASSERT_NOT_NULL (test, stream);KUNIT_EXPECT_EQ (test, (int )stream->src.width,1920 );
@@ -3770,7 +3891,8 @@ static void dm_test_create_stream_existing_sink(struct kunit *test) ctx->aconnector->dc_sink = sink; stream =create_stream_for_sink (&ctx->aconnector->base, ctx->mode, - ctx->dm_state,NULL ,8 ); + ctx->dm_state,NULL ,8 , +PIXEL_ENCODING_RGB , false);KUNIT_ASSERT_NOT_NULL (test, stream);KUNIT_EXPECT_PTR_EQ (test, stream->sink, sink);
@@ -5456,6 +5578,11 @@ static struct kunit_case amdgpu_dm_connector_tests[] = {KUNIT_CASE (dm_test_fill_stream_color_depth_requested_bpc),KUNIT_CASE (dm_test_fill_stream_content_type),KUNIT_CASE (dm_test_fill_stream_aspect_ratio), +KUNIT_CASE (dm_test_fill_stream_encoding_from_caller_ycbcr420), +KUNIT_CASE (dm_test_fill_stream_encoding_from_caller_ycbcr422), +KUNIT_CASE (dm_test_fill_stream_encoding_from_caller_ycbcr444), +KUNIT_CASE (dm_test_fill_stream_hdmi_ep_clamps_depth), +KUNIT_CASE (dm_test_fill_stream_non_hdmi_ep_keeps_depth),/* create_stream_for_sink */ KUNIT_CASE (dm_test_create_stream_fake_sink_success), KUNIT_CASE(dm_test_create_stream_sets_dm_context),
Signature · 1 line
2.34.1
PATCH 24/41 drm/amd/display: Increase fclk change latency on dcn351
In reply to [email protected]From: Sung-huai Wang <[email protected]>
[Why]
fclk change latency is longer than expected on dcn351.
[How]
Increate fclk change latency from 24us to 32us.
--- drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +2 -2
@@ -206,7 +206,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = { .sr_enter_plus_exit_time_us = 30.0, .sr_exit_z8_time_us = 263.0, .sr_enter_plus_exit_z8_time_us = 363.0, - .fclk_change_latency_us = 24.0, + .fclk_change_latency_us = 39.0, .usr_retraining_latency_us = 2, .writeback_latency_us = 12.0,
@@ -215,7 +215,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = { .urgent_latency_pixel_data_only_us = 4.0, .urgent_latency_pixel_mixed_with_vm_data_us = 4.0, .urgent_latency_vm_data_only_us = 4.0, - .dram_clock_change_latency_us = 34, + .dram_clock_change_latency_us = 39, .urgent_out_of_order_return_per_channel_pixel_only_bytes = 4096, .urgent_out_of_order_return_per_channel_pixel_and_vm_bytes = 4096, .urgent_out_of_order_return_per_channel_vm_only_bytes = 4096,
Signature · 1 line
2.34.1
PATCH 25/41 drm/amd/display: Add KUnit tests for crtc set_vblank
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add coverage for the amdgpu_dm_crtc_set_vblank() paths reached through amdgpu_dm_crtc_enable_vblank() and amdgpu_dm_crtc_disable_vblank():
- dm_test_crtc_enable_vblank_full_path: VRR-active enable that walks the vupdate-irq branch and acquires the crtc/pageflip IRQ references.
- dm_test_crtc_enable_vblank_vupdate_busy: vupdate IRQ rejection aborts the enable with -EBUSY.
- dm_test_crtc_enable_vblank_crtc_irq_error: crtc IRQ acquire failure aborts the enable with -ENOENT.
- dm_test_crtc_enable_vblank_in_reset: an in-progress GPU reset returns early before the vblank workqueue branch.
- dm_test_crtc_disable_vblank_vrr: the VRR disable path turns the vupdate IRQ off and releases both IRQ references.
Add shared IRQ-source stubs and setup helpers so amdgpu_irq_get()/put() succeed without hardware access.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 283 ++++++++++++++++++ 1 file changed, 283 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +283 -0
@@ -477,6 +477,19 @@ static struct irq_source_info_funcs dm_test_vupdate_irq_src_funcs = { .ack = dm_test_vupdate_irq_src_ack, }; +/* A .set that fails so dc_interrupt_set() reports the source as busy. */ +static bool dm_test_vupdate_irq_src_set_busy (struct irq_service *irq_service, +const struct irq_source_info *info, +bool enable) +{ +return false; +} + +static struct irq_source_info_funcs dm_test_vupdate_irq_src_busy_funcs = { + .set = dm_test_vupdate_irq_src_set_busy, + .ack = dm_test_vupdate_irq_src_ack, +}; +/** * dm_test_crtc_set_vupdate_irq_enable - Test vupdate irq enable/disable success * @test: The KUnit test context
@@ -832,6 +845,224 @@ static void dm_test_crtc_enable_vblank_rejects_unconfigured(struct kunit *test)KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base), -EINVAL ); } +/* Stub IRQ source .set so amdgpu_irq_get()/put() pass their funcs->set check. */ +static int dm_test_crtc_irq_src_set (struct amdgpu_device *adev, +struct amdgpu_irq_src *source, +unsigned int type, +enum amdgpu_interrupt_state state) +{ +return 0 ; +} + +static const struct amdgpu_irq_src_funcs dm_test_crtc_irq_src_funcs = { + .set = dm_test_crtc_irq_src_set, +}; + +/* +* dm_test_crtc_arm_irq_src - Prime an IRQ source so get()/put() short-circuit. +* @test: The KUnit test context +* @src: The amdgpu IRQ source to arm +* @count: Initial per-type reference count +* +* Seeds enabled_types[AMDGPU_CRTC_IRQ_VBLANK1] with @count and installs a +* non-NULL funcs->set so amdgpu_irq_get()/amdgpu_irq_put() adjust the refcount +* without ever reaching amdgpu_irq_update() (which would touch hardware). +*/ +static void dm_test_crtc_arm_irq_src (struct kunit *test, +struct amdgpu_irq_src *src,int count) +{ +atomic_t *enabled; + + enabled =kunit_kzalloc (test,sizeof (*enabled),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, enabled); + +atomic_set (enabled, count); + src->num_types =1 ; + src->enabled_types = enabled; + src->funcs = &dm_test_crtc_irq_src_funcs; +} + +/* +* dm_test_crtc_setup_enable - Build an adev/CRTC primed for the vblank enable path. +* @test: The KUnit test context +* @adev_out: Receives the allocated device +* @dce_version: DCE version stamped on the DC (controls dc_supports_vrr()) +* +* Returns a CRTC whose enable path can run to completion: a configured +* (enabled) CRTC with crtc_id 0, an initialized single-pipe vblank array, a DC +* with @dce_version, a non-reset reset_domain and a dm_crtc_state carrying a +* stream+link. IPS support stays disabled so drm_crtc_vblank_restore() is +* skipped, and the IRQ subsystem is left uninstalled for callers to arm. +*/ +static struct amdgpu_crtc * +dm_test_crtc_setup_enable (struct kunit *test,struct amdgpu_device **adev_out, +enum dce_version dce_version) +{ +struct amdgpu_reset_domain *reset_domain; +struct dc_stream_state *stream; +struct dm_crtc_state *dm_state; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; +struct dc_link *link; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + +KUNIT_ASSERT_EQ (test,drm_vblank_init (&adev->ddev,1 ),0 ); + + adev->dm.dc =dm_kunit_alloc_dc_with_ctx (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev->dm.dc); + adev->dm.dc->ctx->dce_version = dce_version; + +/* crtc_id 0 maps to a valid IRQ type only when a CRTC is registered. */ + adev->mode_info.num_crtc =1 ; + + reset_domain =kunit_kzalloc (test,sizeof (*reset_domain),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, reset_domain); + adev->reset_domain = reset_domain; + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + acrtc->base.dev = &adev->ddev; + acrtc->base.enabled = true; + acrtc->crtc_id =0 ; + + link =dm_kunit_alloc_link (test); + stream =dm_kunit_alloc_stream (test, link); + + dm_state =kunit_kzalloc (test,sizeof (*dm_state),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, dm_state); + dm_state->stream = stream; + acrtc->base.state = &dm_state->base; + + *adev_out = adev; +return acrtc; +} + +/** +* dm_test_crtc_enable_vblank_full_path - Test the enable path runs to completion +* @test: The KUnit test context +* +* With a configured CRTC on a VRR-capable DC and both crtc/pageflip IRQ sources +* armed, the enable path walks the vupdate-irq branch (VRR active, OTG +* unassigned so it returns early), acquires both IRQ references and completes +* with no vblank workqueue queued. +*/ +static void dm_test_crtc_enable_vblank_full_path (struct kunit *test) +{ +struct dm_crtc_state *acrtc_state; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + +/* DCE_VERSION_8_0 supports VRR -> the vupdate-irq branch is walked. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_8_0 ); + +/* OTG unassigned -> amdgpu_dm_crtc_set_vupdate_irq() returns 0 early. */ + acrtc->otg_inst =-1 ; +/* VRR active so the enable path takes the vupdate-irq branch. */ + acrtc_state =to_dm_crtc_state (acrtc->base.state); + acrtc_state->freesync_config.state =VRR_STATE_ACTIVE_VARIABLE ; + + adev->irq.installed = true; +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,1 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,1 ); + +KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); +} + +/** +* dm_test_crtc_enable_vblank_vupdate_busy - Test vupdate failure aborts enable +* @test: The KUnit test context +* +* When VRR is active and the DC rejects the vupdate IRQ request, the enable +* path must propagate the error (-EBUSY) before touching the crtc/pageflip +* IRQs. +*/ +static void dm_test_crtc_enable_vblank_vupdate_busy (struct kunit *test) +{ +struct irq_source_info *info; +struct resource_pool *res_pool; +struct dm_crtc_state *acrtc_state; +struct irq_service *irqs; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; +int i; + + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_8_0 ); + +/* OTG assigned and VRR active so set_vupdate_irq() calls into DC. */ + acrtc->otg_inst =0 ; + acrtc_state =to_dm_crtc_state (acrtc->base.state); + acrtc_state->freesync_config.state =VRR_STATE_ACTIVE_VARIABLE ; + + res_pool =kunit_kzalloc (test,sizeof (*res_pool),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, res_pool); + irqs =kunit_kzalloc (test,sizeof (*irqs),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, irqs); + +/* Per-source .set fails so dc_interrupt_set() reports the source busy. */ + info =kunit_kzalloc (test,sizeof (*info) *DAL_IRQ_SOURCES_NUMBER , +GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, info); +for (i =0 ; i <DAL_IRQ_SOURCES_NUMBER ; i++) + info[i].funcs = &dm_test_vupdate_irq_src_busy_funcs; + + irqs->info = info; + res_pool->irqs = irqs; + adev->dm.dc->res_pool = res_pool; + +KUNIT_EXPECT_EQ (test, +amdgpu_dm_crtc_enable_vblank (&acrtc->base), -EBUSY ); +} + +/** +* dm_test_crtc_enable_vblank_crtc_irq_error - Test crtc IRQ failure aborts enable +* @test: The KUnit test context +* +* On a non-VRR DC the vupdate-irq branch is skipped. With the IRQ subsystem +* uninstalled, amdgpu_irq_get() on the crtc IRQ returns -ENOENT and the enable +* path must propagate it before touching the pageflip IRQ. +*/ +static void dm_test_crtc_enable_vblank_crtc_irq_error (struct kunit *test) +{ +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + +/* DCE_VERSION_6_0 has no VRR, so the vupdate-irq branch is skipped. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_6_0 ); + +/* IRQ subsystem not installed -> amdgpu_irq_get() returns -ENOENT. */ + adev->irq.installed = false; + +KUNIT_EXPECT_EQ (test, +amdgpu_dm_crtc_enable_vblank (&acrtc->base), -ENOENT ); +} + +/** +* dm_test_crtc_enable_vblank_in_reset - Test enable returns early during GPU reset +* @test: The KUnit test context +* +* After acquiring the IRQ references, an in-progress GPU reset must short the +* enable path so it returns 0 without queuing any vblank control work. +*/ +static void dm_test_crtc_enable_vblank_in_reset (struct kunit *test) +{ +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + +/* DCE_VERSION_6_0 has no VRR, so the vupdate-irq branch is skipped. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_6_0 ); + + adev->irq.installed = true; +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,1 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,1 ); + +/* Mid-reset: return 0 before the vblank workqueue branch is reached. */ +atomic_set (&adev->reset_domain->in_gpu_reset,1 ); + +KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); +} +/* Tests for amdgpu_dm_crtc_update_crtc_active_planes() */ /**
@@ -1307,6 +1538,53 @@ static void dm_test_crtc_disable_vblank_no_irq_installed(struct kunit *test)KUNIT_EXPECT_EQ (test, adev->dm.active_vblank_irq_count,0 ); } +/** +* dm_test_crtc_disable_vblank_vrr - Test disable path releases IRQs on a VRR DC +* @test: The KUnit test context +* +* On a VRR-capable DC the disable path turns the vupdate IRQ off (OTG +* unassigned so it returns early), releases the armed crtc and pageflip IRQ +* references and completes without queuing vblank control work. +*/ +static void dm_test_crtc_disable_vblank_vrr (struct kunit *test) +{ +struct amdgpu_reset_domain *reset_domain; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + + adev->dm.dc =dm_kunit_alloc_dc_with_ctx (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev->dm.dc); +/* DCE_VERSION_8_0 supports VRR -> the vupdate-irq branch is walked. */ + adev->dm.dc->ctx->dce_version =DCE_VERSION_8_0 ; + + adev->mode_info.num_crtc =1 ; + adev->irq.installed = true; + + reset_domain =kunit_kzalloc (test,sizeof (*reset_domain),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, reset_domain); + adev->reset_domain = reset_domain; + +/* Seed with 2 so amdgpu_irq_put() drops to a non-zero refcount. */ +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,2 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,2 ); + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + acrtc->base.dev = &adev->ddev; + acrtc->crtc_id =0 ; +/* OTG unassigned -> amdgpu_dm_crtc_set_vupdate_irq() returns 0 early. */ + acrtc->otg_inst =-1 ; + +amdgpu_dm_crtc_disable_vblank (&acrtc->base); + +/* Both IRQ references were released without underflow. */ +KUNIT_EXPECT_EQ (test,atomic_read (&adev->crtc_irq.enabled_types[0 ]),1 ); +KUNIT_EXPECT_EQ (test,atomic_read (&adev->pageflip_irq.enabled_types[0 ]),1 ); +} +static struct kunit_case amdgpu_dm_crtc_tests[] = {/* amdgpu_dm_crtc_modeset_required */ KUNIT_CASE (dm_test_crtc_modeset_required_active_mode_changed),
@@ -1352,6 +1630,10 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_set_static_screen_optimze_psr_su_skips),/* amdgpu_dm_crtc_enable_vblank */ KUNIT_CASE (dm_test_crtc_enable_vblank_rejects_unconfigured), +KUNIT_CASE (dm_test_crtc_enable_vblank_full_path), +KUNIT_CASE (dm_test_crtc_enable_vblank_vupdate_busy), +KUNIT_CASE (dm_test_crtc_enable_vblank_crtc_irq_error), +KUNIT_CASE (dm_test_crtc_enable_vblank_in_reset),/* amdgpu_dm_crtc_update_crtc_active_planes */ KUNIT_CASE(dm_test_crtc_update_active_planes_no_stream),/* amdgpu_dm_crtc_count_crtc_active_planes */
@@ -1373,6 +1655,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_vblank_control_worker_disable_clamps_zero),/* amdgpu_dm_crtc_disable_vblank */ KUNIT_CASE (dm_test_crtc_disable_vblank_no_irq_installed), + KUNIT_CASE(dm_test_crtc_disable_vblank_vrr), {} };
Signature · 1 line
2.34.1
PATCH 26/41 drm/amd/display: Cover crtc set_vblank workqueue branch
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_enable_vblank_queues_work and dm_test_crtc_disable_vblank_queues_work to cover the vblank_control_workqueue branch of amdgpu_dm_crtc_set_vblank():
- The enable test installs a real workqueue, retains the stream and queues the control worker, then drains it and checks the active vblank IRQ count was incremented.
- The disable test drives the no-stream sub-branch (the stream-retain is skipped) and checks the worker decremented the count.
Both seed the ISM so the queued worker takes no state-machine transition, keeping coverage on the vblank accounting; the ISM state machine itself is covered by the ISM tests.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +115 -0
@@ -1063,6 +1063,50 @@ static void dm_test_crtc_enable_vblank_in_reset(struct kunit *test)KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); } +/** +* dm_test_crtc_enable_vblank_queues_work - Test enable queues vblank control work +* @test: The KUnit test context +* +* With a vblank control workqueue installed, the enable path allocates a work +* item, retains the stream and queues the control worker. Draining the queue +* runs the worker, which bumps the active vblank IRQ count. The initial ISM +* state has no EXIT_IDLE_REQUESTED transition, so the worker only exercises the +* vblank accounting (the ISM state machine is covered by its own tests). +*/ +static void dm_test_crtc_enable_vblank_queues_work (struct kunit *test) +{ +struct dm_crtc_state *acrtc_state; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + +/* DCE_VERSION_8_0 supports VRR -> the vupdate-irq branch is walked. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_8_0 ); + +/* OTG unassigned -> amdgpu_dm_crtc_set_vupdate_irq() returns 0 early. */ + acrtc->otg_inst =-1 ; + acrtc_state =to_dm_crtc_state (acrtc->base.state); + acrtc_state->freesync_config.state =VRR_STATE_ACTIVE_VARIABLE ; + + adev->irq.installed = true; +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,1 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,1 ); + +/* Real workqueue so the queue_work() branch runs the control worker. */ +mutex_init (&adev->dm.dc_lock); + adev->dm.vblank_control_workqueue = +create_singlethread_workqueue ("dm_test_vblank" ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev->dm.vblank_control_workqueue); + +KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); + +/* Drain the queued worker before the fixture is torn down, then tidy up. */ +destroy_workqueue (adev->dm.vblank_control_workqueue); + adev->dm.vblank_control_workqueue =NULL ; + +/* The queued worker ran and accounted the active vblank IRQ. */ +KUNIT_EXPECT_EQ (test, adev->dm.active_vblank_irq_count,1 ); +} +/* Tests for amdgpu_dm_crtc_update_crtc_active_planes() */ /**
@@ -1585,6 +1629,75 @@ static void dm_test_crtc_disable_vblank_vrr(struct kunit *test)KUNIT_EXPECT_EQ (test,atomic_read (&adev->pageflip_irq.enabled_types[0 ]),1 ); } +/** +* dm_test_crtc_disable_vblank_queues_work - Test disable queues work without a stream +* @test: The KUnit test context +* +* With a vblank control workqueue installed and a CRTC state carrying no +* stream, the disable path queues the control worker without retaining a +* stream. Draining the queue runs the worker, which drops the active vblank IRQ +* count. The ISM is seeded in a state with no ENTER_IDLE_REQUESTED transition +* so the worker only exercises the vblank accounting. +*/ +static void dm_test_crtc_disable_vblank_queues_work (struct kunit *test) +{ +struct amdgpu_reset_domain *reset_domain; +struct dm_crtc_state *dm_state; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; + + adev =dm_kunit_alloc_adev (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev); + + adev->dm.dc =dm_kunit_alloc_dc_with_ctx (test); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev->dm.dc); +/* DCE_VERSION_6_0 has no VRR, so the vupdate-irq branch is skipped. */ + adev->dm.dc->ctx->dce_version =DCE_VERSION_6_0 ; + adev->dm.active_vblank_irq_count =2 ; + + adev->mode_info.num_crtc =1 ; + adev->irq.installed = true; + + reset_domain =kunit_kzalloc (test,sizeof (*reset_domain),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, reset_domain); + adev->reset_domain = reset_domain; + +/* Seed with 2 so amdgpu_irq_put() drops to a non-zero refcount. */ +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,2 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,2 ); + + acrtc =kunit_kzalloc (test,sizeof (*acrtc),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, acrtc); + acrtc->base.dev = &adev->ddev; + acrtc->crtc_id =0 ; + acrtc->otg_inst =-1 ; +/* +* Seed the ISM in a state where ENTER_IDLE_REQUESTED does not transition +* so the worker skips the ISM power-state dispatch and its timers. +*/ + acrtc->ism.current_state =DM_ISM_STATE_HYSTERESIS_WAITING ; + +/* CRTC state with no stream -> the stream-retain branch is skipped. */ + dm_state =kunit_kzalloc (test,sizeof (*dm_state),GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, dm_state); + acrtc->base.state = &dm_state->base; + +/* Real workqueue so the queue_work() branch runs the control worker. */ +mutex_init (&adev->dm.dc_lock); + adev->dm.vblank_control_workqueue = +create_singlethread_workqueue ("dm_test_vblank" ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, adev->dm.vblank_control_workqueue); + +amdgpu_dm_crtc_disable_vblank (&acrtc->base); + +/* Drain the queued worker before the fixture is torn down, then tidy up. */ +destroy_workqueue (adev->dm.vblank_control_workqueue); + adev->dm.vblank_control_workqueue =NULL ; + +/* The queued worker ran and decremented the active vblank IRQ count. */ +KUNIT_EXPECT_EQ (test, adev->dm.active_vblank_irq_count,1 ); +} +static struct kunit_case amdgpu_dm_crtc_tests[] = {/* amdgpu_dm_crtc_modeset_required */ KUNIT_CASE (dm_test_crtc_modeset_required_active_mode_changed),
@@ -1634,6 +1747,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_enable_vblank_vupdate_busy),KUNIT_CASE (dm_test_crtc_enable_vblank_crtc_irq_error),KUNIT_CASE (dm_test_crtc_enable_vblank_in_reset), +KUNIT_CASE (dm_test_crtc_enable_vblank_queues_work),/* amdgpu_dm_crtc_update_crtc_active_planes */ KUNIT_CASE(dm_test_crtc_update_active_planes_no_stream),/* amdgpu_dm_crtc_count_crtc_active_planes */
@@ -1656,6 +1770,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {/* amdgpu_dm_crtc_disable_vblank */ KUNIT_CASE (dm_test_crtc_disable_vblank_no_irq_installed),KUNIT_CASE (dm_test_crtc_disable_vblank_vrr), + KUNIT_CASE(dm_test_crtc_disable_vblank_queues_work), {} };
Signature · 1 line
2.34.1
PATCH 27/41 drm/amd/display: Cover crtc vblank IPS self-refresh restore
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_enable_vblank_ips_restore to cover the IPS/self-refresh branch of amdgpu_dm_crtc_set_vblank() that calls drm_crtc_vblank_restore().
The test primes the DC with ips_support set and IPS not fully disabled, a supported PSR version (self-refresh supported) and an immediate-disable vblank config, so all four conditions gating the restore hold. A stub get_vblank_timestamp hook is installed on the CRTC so the restore helper passes its sanity check, and the enable path then runs to completion.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +66 -0
@@ -858,6 +858,24 @@ static const struct amdgpu_irq_src_funcs dm_test_crtc_irq_src_funcs = { .set = dm_test_crtc_irq_src_set, }; +/* +* Stub get_vblank_timestamp so drm_crtc_vblank_restore() finds a non-NULL hook. +* The CRTC is not registered on the device, so drm_crtc_from_index() returns +* NULL and this callback is never actually invoked; it only satisfies the +* WARN_ON_ONCE(!crtc->funcs->get_vblank_timestamp) sanity check. +*/ +static bool dm_test_crtc_get_vblank_timestamp (struct drm_crtc *crtc, +int *max_error, +ktime_t *vblank_time, +bool in_vblank_irq) +{ +return false; +} + +static const struct drm_crtc_funcs dm_test_crtc_funcs = { + .get_vblank_timestamp = dm_test_crtc_get_vblank_timestamp, +}; +/* * dm_test_crtc_arm_irq_src - Prime an IRQ source so get()/put() short-circuit. * @test: The KUnit test context
@@ -1107,6 +1125,53 @@ static void dm_test_crtc_enable_vblank_queues_work(struct kunit *test)KUNIT_EXPECT_EQ (test, adev->dm.active_vblank_irq_count,1 ); } +/** +* dm_test_crtc_enable_vblank_ips_restore - Test IPS/self-refresh vblank restore +* @test: The KUnit test context +* +* When the DC advertises IPS support with IPS not fully disabled, self-refresh +* is supported and immediate vblank disable is configured, the enable path must +* call drm_crtc_vblank_restore() to estimate missed vblanks before arming the +* IRQs. The enable path then runs to completion. +*/ +static void dm_test_crtc_enable_vblank_ips_restore (struct kunit *test) +{ +struct dm_crtc_state *acrtc_state; +struct drm_vblank_crtc *vblank; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; +struct dc_link *link; + +/* DCE_VERSION_8_0 supports VRR -> the vupdate-irq branch is walked. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_8_0 ); + +/* OTG unassigned -> amdgpu_dm_crtc_set_vupdate_irq() returns 0 early. */ + acrtc->otg_inst =-1 ; + acrtc_state =to_dm_crtc_state (acrtc->base.state); + acrtc_state->freesync_config.state =VRR_STATE_ACTIVE_VARIABLE ; + +/* Non-NULL get_vblank_timestamp keeps drm_crtc_vblank_restore() quiet. */ + acrtc->base.funcs = &dm_test_crtc_funcs; + +/* IPS enabled and not fully disabled -> first restore condition holds. */ + adev->dm.dc->caps.ips_support = true; + adev->dm.dc->config.disable_ips =DMUB_IPS_ENABLE ; + +/* Supported PSR version makes self-refresh supported. */ + link = acrtc_state->stream->link; + link->psr_settings.psr_version =DC_PSR_VERSION_1 ; + +/* Immediate vblank disable is the last condition gating the restore. */ + vblank =drm_crtc_vblank_crtc (&acrtc->base); + vblank->config.disable_immediate = true; + + adev->irq.installed = true; +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,1 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,1 ); + +KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); +} +/* Tests for amdgpu_dm_crtc_update_crtc_active_planes() */ /**
@@ -1748,6 +1813,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_enable_vblank_crtc_irq_error),KUNIT_CASE (dm_test_crtc_enable_vblank_in_reset),KUNIT_CASE (dm_test_crtc_enable_vblank_queues_work), +KUNIT_CASE (dm_test_crtc_enable_vblank_ips_restore),/* amdgpu_dm_crtc_update_crtc_active_planes */ KUNIT_CASE(dm_test_crtc_update_active_planes_no_stream),/* amdgpu_dm_crtc_count_crtc_active_planes */
Signature · 1 line
2.34.1
PATCH 28/41 drm/amd/display: Cover crtc vblank restore replay-supported path
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_enable_vblank_ips_restore_replay to cover the pr->config.replay_supported side of the sr_supported OR in amdgpu_dm_crtc_set_vblank().
The existing IPS restore test establishes self-refresh support via the PSR version. This test instead marks the PSR version unsupported and sets replay_supported, forcing the sr_supported computation to fall through to the replay branch while still calling drm_crtc_vblank_restore().
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +52 -0
@@ -1172,6 +1172,57 @@ static void dm_test_crtc_enable_vblank_ips_restore(struct kunit *test)KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); } +/** +* dm_test_crtc_enable_vblank_ips_restore_replay - Test IPS restore via replay support +* @test: The KUnit test context +* +* Same as dm_test_crtc_enable_vblank_ips_restore() but self-refresh support is +* established through replay rather than PSR: the PSR version is unsupported, so +* the sr_supported computation must fall through to pr->config.replay_supported. +* The enable path still calls drm_crtc_vblank_restore() and completes. +*/ +static void dm_test_crtc_enable_vblank_ips_restore_replay (struct kunit *test) +{ +struct dm_crtc_state *acrtc_state; +struct drm_vblank_crtc *vblank; +struct amdgpu_device *adev; +struct amdgpu_crtc *acrtc; +struct dc_link *link; + +/* DCE_VERSION_8_0 supports VRR -> the vupdate-irq branch is walked. */ + acrtc =dm_test_crtc_setup_enable (test, &adev,DCE_VERSION_8_0 ); + +/* OTG unassigned -> amdgpu_dm_crtc_set_vupdate_irq() returns 0 early. */ + acrtc->otg_inst =-1 ; + acrtc_state =to_dm_crtc_state (acrtc->base.state); + acrtc_state->freesync_config.state =VRR_STATE_ACTIVE_VARIABLE ; + +/* Non-NULL get_vblank_timestamp keeps drm_crtc_vblank_restore() quiet. */ + acrtc->base.funcs = &dm_test_crtc_funcs; + +/* IPS enabled and not fully disabled -> first restore condition holds. */ + adev->dm.dc->caps.ips_support = true; + adev->dm.dc->config.disable_ips =DMUB_IPS_ENABLE ; + +/* +* PSR unsupported but replay supported -> sr_supported is driven by the +* pr->config.replay_supported side of the OR. +*/ + link = acrtc_state->stream->link; + link->psr_settings.psr_version =DC_PSR_VERSION_UNSUPPORTED ; + link->replay_settings.config.replay_supported = true; + +/* Immediate vblank disable is the last condition gating the restore. */ + vblank =drm_crtc_vblank_crtc (&acrtc->base); + vblank->config.disable_immediate = true; + + adev->irq.installed = true; +dm_test_crtc_arm_irq_src (test, &adev->crtc_irq,1 ); +dm_test_crtc_arm_irq_src (test, &adev->pageflip_irq,1 ); + +KUNIT_EXPECT_EQ (test,amdgpu_dm_crtc_enable_vblank (&acrtc->base),0 ); +} +/* Tests for amdgpu_dm_crtc_update_crtc_active_planes() */ /**
@@ -1814,6 +1865,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_enable_vblank_in_reset),KUNIT_CASE (dm_test_crtc_enable_vblank_queues_work),KUNIT_CASE (dm_test_crtc_enable_vblank_ips_restore), +KUNIT_CASE (dm_test_crtc_enable_vblank_ips_restore_replay),/* amdgpu_dm_crtc_update_crtc_active_planes */ KUNIT_CASE(dm_test_crtc_update_active_planes_no_stream),/* amdgpu_dm_crtc_count_crtc_active_planes */
Signature · 1 line
2.34.1
PATCH 29/41 drm/amd/display: Cover crtc destroy_state stream release
In reply to [email protected]From: Bhawanpreet Lakha <[email protected]>
Add dm_test_crtc_destroy_state_releases_stream to cover the cur->stream branch of amdgpu_dm_crtc_destroy_state(), complementing the existing no-stream test.
The test attaches a DC stream to the CRTC state and takes an extra stream reference so the destroy path drops back to the KUnit-managed reference instead of freeing the stream, then verifies exactly one reference was released.
--- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c +35 -0
@@ -1451,6 +1451,40 @@ static void dm_test_crtc_destroy_state_no_stream(struct kunit *test)amdgpu_dm_crtc_destroy_state (NULL , &dm_state->base); } +/** +* dm_test_crtc_destroy_state_releases_stream - Test destroy releases the stream +* @test: The KUnit test context +* +* When the CRTC state carries a DC stream, destroying the state must release a +* stream reference. An extra reference is taken up front so the release leaves +* the KUnit-managed reference intact rather than freeing the stream here. +*/ +static void dm_test_crtc_destroy_state_releases_stream (struct kunit *test) +{ +struct dc_stream_state *stream; +struct dm_crtc_state *dm_state; +struct dc_link *link; + + link =dm_kunit_alloc_link (test); + stream =dm_kunit_alloc_stream (test, link); + +/* +* Take an extra reference so amdgpu_dm_crtc_destroy_state() drops back to +* the KUnit-managed reference instead of freeing the stream. +*/ +kref_get (&stream->refcount); + +/* destroy_state kfree()s the state, so use a plain (unmanaged) alloc. */ + dm_state =kzalloc_obj (*dm_state,GFP_KERNEL ); +KUNIT_ASSERT_NOT_ERR_OR_NULL (test, dm_state); + dm_state->stream = stream; + +amdgpu_dm_crtc_destroy_state (NULL , &dm_state->base); + +/* One reference was dropped, leaving the KUnit-managed one. */ +KUNIT_EXPECT_EQ (test,kref_read (&stream->refcount),1 ); +} +/** * dm_test_crtc_handle_vblank_no_event - Test vblank handling with no pending event * @test: The KUnit test context
@@ -1877,6 +1911,7 @@ static struct kunit_case amdgpu_dm_crtc_tests[] = {KUNIT_CASE (dm_test_crtc_reset_state_allocates_state),/* amdgpu_dm_crtc_destroy_state */ KUNIT_CASE (dm_test_crtc_destroy_state_no_stream), +KUNIT_CASE (dm_test_crtc_destroy_state_releases_stream),/* amdgpu_dm_crtc_handle_vblank */ KUNIT_CASE (dm_test_crtc_handle_vblank_no_event), KUNIT_CASE(dm_test_crtc_handle_vblank_skips_when_flip_submitted),
Signature · 1 line
2.34.1
PATCH 30/41 drm/amd/display: Fix ABM over VABC
In reply to [email protected]From: Iswara Nagulendran <[email protected]>
[Why]
ABM does not take effect when brightness
is below twenty percent on VABC LCD panels.
[How]
Create new VESA aux path for brightness
translation functions. When VESA aux enabled
use zero-anchored linear interpolation to
translate instead of the legacy min max
backlight mapping.
--- .../drm/amd/display/modules/power/power_abm.c | 215 ++++++++++++++++-- .../amd/display/modules/power/power_helpers.h | 9 + 2 files changed, 210 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/modules/power/power_abm.c +201 -14
@@ -245,29 +245,80 @@ struct iram_table_v_2_2 {#define MOD_POWER_TO_CORE (mod_power)\ container_of(mod_power, struct core_power, mod_public) +/* Maximum brightness expressed in millipercent (100% * 1000). */ +#define BACKLIGHT_MILLIPERCENT_MAX (100 * 1000) +static uint16_t backlight_8_to_16 (unsigned int backlight_8bit) {return (uint16_t )(backlight_8bit *0x101 ); } +/* Caches the link's backlight control type on the panel's backlight +* properties so the brightness translation helpers can pick the correct +* mapping. +*/ +void mod_power_set_backlight_control_type (struct core_power *core_power, +unsigned int inst,enum backlight_control_type backlight_control_type) +{ +if (core_power ==NULL ) +return ; + + core_power->bl_prop[inst].backlight_control_type = backlight_control_type; +} + +/* Returns true when the panel uses the VESA AUX backlight control path, which +* requires zero-anchored linear brightness interpolation. +*/ +static bool is_vesa_abc (struct core_power *core_power,unsigned int inst) +{ +if (core_power ==NULL ) +return false; + +return core_power->bl_prop[inst].backlight_control_type == +BACKLIGHT_CONTROL_VESA_AUX ; +} + +/* Legacy millipercent→millinit conversion: scales linearly between +* [0%, 100%] → [min_brightness_millinits, max_brightness_millinits]. +*/ +static unsigned int backlight_millipercent_to_millinit_legacy ( +struct core_power *core_power,unsigned int millipercent,unsigned int inst) +{ +if (core_power ==NULL ) +return 0 ; + +return (unsigned int )div_u64 ((unsigned long long )millipercent * + core_power->bl_prop[inst].nits_range, +100000 ) + + core_power->bl_prop[inst].min_brightness_millinits; +} + +/* Converts millipercent to millinit. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0% = 0 nits and 100% = max_brightness_millinits. +* Otherwise, falls back to the legacy min→max nits range mapping. +*/ unsigned int backlight_millipercent_to_millinit (struct core_power *core_power,unsigned int millipercent,unsigned int inst) { -unsigned int millinit =0 ; -unsigned long long numerator =0 ; +if (!is_vesa_abc (core_power, inst)) +return backlight_millipercent_to_millinit_legacy (core_power, millipercent, inst);if (core_power ==NULL )return 0 ; - numerator = ((unsigned long long )millipercent) * - core_power->bl_prop[inst].nits_range; - millinit = ((unsigned int )div_u64 (numerator,100000 )) + - core_power->bl_prop[inst].min_brightness_millinits; +if (millipercent >=BACKLIGHT_MILLIPERCENT_MAX ) +return core_power->bl_prop[inst].max_brightness_millinits; -return millinit; +return (unsigned int )div_u64 ((unsigned long long )millipercent * + core_power->bl_prop[inst].max_brightness_millinits, +BACKLIGHT_MILLIPERCENT_MAX ); } -static unsigned int backlight_millinit_to_millipercent ( +/* Legacy millinit→millipercent conversion: scales linearly between +* [min_brightness_millinits, max_brightness_millinits] → [0%, 100%]. +*/ +static unsigned int backlight_millinit_to_millipercent_legacy (struct core_power *core_power,unsigned int millinit,unsigned int inst) {unsigned int millipercent =0 ;
@@ -280,7 +331,7 @@ static unsigned int backlight_millinit_to_millipercent(return 0 ;if (millinit >= core_power->bl_prop[inst].max_brightness_millinits) -return (100 *1000 ); +return BACKLIGHT_MILLIPERCENT_MAX ; numerator = (((unsigned long long )millinit) - core_power->bl_prop[inst].min_brightness_millinits) *100000 ;
@@ -290,7 +341,31 @@ static unsigned int backlight_millinit_to_millipercent(return millipercent; } -static unsigned int backlight_pwm_to_millipercent ( +/* Converts millinit to millipercent. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0 nits = 0% and max_brightness_millinits = 100%. +* Otherwise, falls back to the legacy min→max nits range mapping. +*/ +static unsigned int backlight_millinit_to_millipercent ( +struct core_power *core_power,unsigned int millinit,unsigned int inst) +{ +if (!is_vesa_abc (core_power, inst)) +return backlight_millinit_to_millipercent_legacy (core_power, millinit, inst); + +if (core_power ==NULL ) +return 0 ; + +if (core_power->bl_prop[inst].max_brightness_millinits ==0 ) +return 0 ; + +if (millinit >= core_power->bl_prop[inst].max_brightness_millinits) +return BACKLIGHT_MILLIPERCENT_MAX ; + +return (unsigned int )div_u64 ((unsigned long long )millinit *100000 , + core_power->bl_prop[inst].max_brightness_millinits); +} + +static unsigned int backlight_pwm_to_millipercent_legacy (struct core_power *core_power,unsigned int pwm,unsigned int inst) {unsigned int millipercent =0 ;
@@ -362,12 +437,37 @@ static unsigned int backlight_pwm_to_millipercent( }/* No interpolation, just take closest index */ - millipercent =1000 *100 * mid / max_index; + millipercent =BACKLIGHT_MILLIPERCENT_MAX * mid / max_index;return millipercent; } -static unsigned int backlight_pwm_to_millinit ( +/* Converts PWM to millipercent. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0 PWM = 0% and max_backlight_pwm = 100%. +* Otherwise, falls back to the legacy LUT based mapping. +*/ +static unsigned int backlight_pwm_to_millipercent ( +struct core_power *core_power,unsigned int pwm,unsigned int inst) +{ +if (!is_vesa_abc (core_power, inst)) +return backlight_pwm_to_millipercent_legacy (core_power, pwm, inst); + +if (core_power ==NULL ) +return 0 ; + +if (core_power->bl_prop[inst].max_backlight_pwm ==0 ) +return 0 ; + +if (pwm >= core_power->bl_prop[inst].max_backlight_pwm) +return BACKLIGHT_MILLIPERCENT_MAX ; + +return (unsigned int )div_u64 ((unsigned long long )pwm * +BACKLIGHT_MILLIPERCENT_MAX , + core_power->bl_prop[inst].max_backlight_pwm); +} + +static unsigned int backlight_pwm_to_millinit_legacy (struct core_power *core_power,unsigned int pwm,unsigned int inst) {unsigned int millinit =0 ;
@@ -394,7 +494,32 @@ static unsigned int backlight_pwm_to_millinit(return millinit; } -unsigned int backlight_millipercent_to_pwm ( +/* Converts PWM to millinit. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0 PWM = 0 nits and max_backlight_pwm = max_brightness_millinits. +* Otherwise, falls back to the legacy min→max nits range mapping. +*/ +static unsigned int backlight_pwm_to_millinit ( +struct core_power *core_power,unsigned int pwm,unsigned int inst) +{ +if (!is_vesa_abc (core_power, inst)) +return backlight_pwm_to_millinit_legacy (core_power, pwm, inst); + +if (core_power ==NULL ) +return 0 ; + +if (core_power->bl_prop[inst].max_backlight_pwm ==0 ) +return 0 ; + +if (pwm >= core_power->bl_prop[inst].max_backlight_pwm) +return core_power->bl_prop[inst].max_brightness_millinits; + +return (unsigned int )div_u64 ((unsigned long long )pwm * + core_power->bl_prop[inst].max_brightness_millinits, + core_power->bl_prop[inst].max_backlight_pwm); +} + +static unsigned int backlight_millipercent_to_pwm_legacy (struct core_power *core_power,unsigned int millipercent,unsigned int inst) {unsigned int pwm = (unsigned int )-1 ;
@@ -431,7 +556,32 @@ unsigned int backlight_millipercent_to_pwm(return pwm; } -static unsigned int backlight_millinit_to_pwm ( +/* Converts millipercent to PWM. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0% = 0 PWM and 100% = max_backlight_pwm. +* Otherwise, falls back to the legacy LUT based mapping. +*/ +unsigned int backlight_millipercent_to_pwm ( +struct core_power *core_power,unsigned int millipercent,unsigned int inst) +{ +if (!is_vesa_abc (core_power, inst)) +return backlight_millipercent_to_pwm_legacy (core_power, millipercent, inst); + +if (core_power ==NULL ) +return 0 ; + +if (millipercent >=BACKLIGHT_MILLIPERCENT_MAX ) +return core_power->bl_prop[inst].max_backlight_pwm; + +return (unsigned int )div_u64 ((unsigned long long )millipercent * + core_power->bl_prop[inst].max_backlight_pwm, +BACKLIGHT_MILLIPERCENT_MAX ); +} + +/* Legacy millinit→PWM conversion: scales linearly between +* [min_brightness_millinits, max_brightness_millinits] → [min_backlight_pwm, max_backlight_pwm]. +*/ +static unsigned int backlight_millinit_to_pwm_legacy (struct core_power *core_power,unsigned int millinit,unsigned int inst) {unsigned int pwm =0 ;
@@ -460,6 +610,35 @@ static unsigned int backlight_millinit_to_pwm(return pwm; } +/* Converts millinit to PWM. +* For VESA AUX brightness control, uses simple linear interpolation with +* 0 nits = 0 PWM and max_brightness_millinits = max_backlight_pwm. +* Otherwise, falls back to the legacy min→max nits range mapping. +*/ +static unsigned int backlight_millinit_to_pwm ( +struct core_power *core_power,unsigned int millinit,unsigned int inst) +{ +if (!is_vesa_abc (core_power, inst)) +return backlight_millinit_to_pwm_legacy (core_power, millinit, inst); + +if (core_power ==NULL ) +return 0 ; + +if (core_power->bl_prop[inst].max_brightness_millinits ==0 ) +return 0 ; + +if (millinit >= core_power->bl_prop[inst].max_brightness_millinits) +return core_power->bl_prop[inst].max_backlight_pwm; + +/* millinit is bounded by max_brightness_millinits (up to ~10^7 for ~10000 nits). +* max_backlight_pwm is a 32-bit value. +* Worst-case product (~10^7 × UINT_MAX ≈ 4×10^16) fits within unsigned long long. +*/ +return (unsigned int )div_u64 ((unsigned long long )millinit * + core_power->bl_prop[inst].max_backlight_pwm, + core_power->bl_prop[inst].max_brightness_millinits); +} +static bool validate_ext_backlight_caps (struct dm_acpi_atif_backlight_caps *ext_backlight_caps) {
@@ -716,6 +895,14 @@ void mod_power_update_backlight_on_mode_change( {struct set_backlight_level_params backlight_level_params = {0 }; +/* Cache the panel's backlight control type once at mode-change/init +* time. It is a stable per-panel property (decided in the OS shim +* from panel type + DPCD caps), so the brightness translation +* helpers can read it without it being passed on every call. +*/ +mod_power_set_backlight_control_type (core_power, panel_inst, + link->backlight_control_type); +if ((link->dpcd_sink_ext_caps.bits.hdr_aux_backlight_control ==1 || link->dpcd_sink_ext_caps.bits.sdr_aux_backlight_control ==1 ) && link->backlight_control_type ==BACKLIGHT_CONTROL_AMD_AUX )
drivers/gpu/drm/amd/display/modules/power/power_helpers.h +9 -0
@@ -102,6 +102,13 @@ struct pwr_backlight_properties {unsigned int max_brightness_millinits;unsigned int nits_range; +/* Backlight control type of the associated link. Cached here so the +* brightness translation helpers can select the correct mapping +* (legacy vs. VESA AUX zero-anchored) without threading the type +* through every call. +*/ +enum backlight_control_type backlight_control_type; +bool backlight_caps_valid;bool use_custom_backlight_caps;unsigned int custom_backlight_caps_config_no;
@@ -190,6 +197,8 @@ void reset_replay_dsync_error_count(struct dc_link *link);void change_replay_to_psr (struct dc_link *link);void change_psr_to_replay (struct dc_link *link);void initialize_backlight_caps (struct core_power *core_power,unsigned int inst); +void mod_power_set_backlight_control_type (struct core_power *core_power, +unsigned int inst,enum backlight_control_type backlight_control_type);unsigned int backlight_millipercent_to_pwm (struct core_power *core_power,unsigned int millipercent,unsigned int inst); unsigned int backlight_millipercent_to_millinit(
Signature · 1 line
2.34.1
PATCH 31/41 drm/amd/display: Add missing DCN42B register defines
In reply to [email protected]From: Matthew Stewart <[email protected]>
[why]
These registers are used, but were missing from their corresponding lists.
--- .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.h | 47 ------------------- .../dc/resource/dcn42b/dcn42b_resource.c | 19 +++++++- 2 files changed, 17 insertions(+), 49 deletions(-)
drivers/gpu/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.h +0 -47
@@ -165,53 +165,6 @@SE_SF (DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL ,CRC_CONT_MODE_ENABLE , mask_sh),\ SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_HBLANK_CONTROL, HBLANK_MINIMUM_SYMBOL_WIDTH, mask_sh) -/* Not in DCN42B: -* SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL, CRC_ENABLE, mask_sh), -* SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL, CRC_CONT_MODE_ENABLE, mask_sh), -* SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_HBLANK_CONTROL, HBLANK_MINIMUM_SYMBOL_WIDTH, mask_sh), - */ -#define DCN4_2B_HPO_DP_STREAM_ENC_MASK_SH_LIST (mask_sh)\ - SE_SF(DP_STREAM_MAPPER_CONTROL0, DP_STREAM_LINK_TARGET, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_CLOCK_CONTROL, DP_STREAM_ENC_CLOCK_EN, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_INPUT_MUX_CONTROL, DP_STREAM_ENC_INPUT_MUX_PIXEL_STREAM_SOURCE_SEL, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_AUDIO_CONTROL, DP_STREAM_ENC_INPUT_MUX_AUDIO_STREAM_SOURCE_SEL, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_AUDIO_CONTROL, DP_STREAM_ENC_APG_CLOCK_EN, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_CLOCK_RAMP_ADJUSTER_FIFO_STATUS_CONTROL0, FIFO_RESET, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_CLOCK_RAMP_ADJUSTER_FIFO_STATUS_CONTROL0, FIFO_RESET_DONE, mask_sh),\ - SE_SF(DP_STREAM_ENC0_DP_STREAM_ENC_CLOCK_RAMP_ADJUSTER_FIFO_STATUS_CONTROL0, FIFO_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_CONTROL, DP_SYM32_ENC_RESET, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_CONTROL, DP_SYM32_ENC_RESET_DONE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_CONTROL, DP_SYM32_ENC_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_PIXEL_FORMAT, PIXEL_ENCODING_TYPE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_PIXEL_FORMAT, UNCOMPRESSED_PIXEL_ENCODING, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_PIXEL_FORMAT, UNCOMPRESSED_COMPONENT_DEPTH, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_PIXEL_FORMAT_DOUBLE_BUFFER_CONTROL, PIXEL_FORMAT_DOUBLE_BUFFER_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_MSA_DOUBLE_BUFFER_CONTROL, MSA_DOUBLE_BUFFER_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC_VID_MSA, MSA_DATA_LANE_0, mask_sh),\ - SE_SF(DP_SYM32_ENC_VID_MSA, MSA_DATA_LANE_1, mask_sh),\ - SE_SF(DP_SYM32_ENC_VID_MSA, MSA_DATA_LANE_2, mask_sh),\ - SE_SF(DP_SYM32_ENC_VID_MSA, MSA_DATA_LANE_3, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_FIFO_CONTROL, PIXEL_TO_SYMBOL_FIFO_RESET, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_FIFO_CONTROL, PIXEL_TO_SYMBOL_FIFO_RESET_DONE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_FIFO_CONTROL, PIXEL_TO_SYMBOL_FIFO_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_STREAM_CONTROL, VID_STREAM_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_STREAM_CONTROL, VID_STREAM_STATUS, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_VBID_CONTROL, VBID_6_COMPRESSEDSTREAM_FLAG_SOF_REFERENCE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_VID_VBID_CONTROL, VBID_6_COMPRESSEDSTREAM_FLAG_LINE_NUMBER, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_CONTROL, SDP_STREAM_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL0, GSP_VIDEO_CONTINUOUS_TRANSMISSION_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL0, GSP_PAYLOAD_SIZE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL0, GSP_TRANSMISSION_LINE_NUMBER, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL5, GSP_VIDEO_CONTINUOUS_TRANSMISSION_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL5, GSP_TRANSMISSION_LINE_NUMBER, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_GSP_CONTROL5, GSP_SOF_REFERENCE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_METADATA_PACKET_CONTROL, METADATA_PACKET_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_AUDIO_CONTROL0, AUDIO_MUTE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_AUDIO_CONTROL0, ASP_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_AUDIO_CONTROL0, ATP_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_AUDIO_CONTROL0, AIP_ENABLE, mask_sh),\ - SE_SF(DP_SYM32_ENC0_DP_SYM32_ENC_SDP_AUDIO_CONTROL0, ACM_ENABLE, mask_sh) -#define DCN3_1_HPO_DP_STREAM_ENC_REG_FIELD_LIST (type) \ type DP_STREAM_LINK_TARGET;\
drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c +17 -2
@@ -148,6 +148,21 @@#define regDP_SYM32_ENC2_DP_SYM32_ENC_HBLANK_CONTROL 0x3813#define regDP_SYM32_ENC2_DP_SYM32_ENC_HBLANK_CONTROL_BASE_IDX 2 +#define DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_ENABLE__SHIFT 0x0 +#define DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_CONT_MODE_ENABLE__SHIFT 0x4 +#define DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_ENABLE_MASK 0x00000001L +#define DP_SYM32_ENC0_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_CONT_MODE_ENABLE_MASK 0x00000010L +#define DP_SYM32_ENC0_DP_SYM32_ENC_HBLANK_CONTROL__HBLANK_MINIMUM_SYMBOL_WIDTH__SHIFT 0x0 +#define DP_SYM32_ENC0_DP_SYM32_ENC_HBLANK_CONTROL__HBLANK_MINIMUM_SYMBOL_WIDTH_MASK 0x0000FFFFL + + +#define DP_SYM32_ENC1_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_ENABLE__SHIFT 0x0 +#define DP_SYM32_ENC1_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_CONT_MODE_ENABLE__SHIFT 0x4 +#define DP_SYM32_ENC1_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_ENABLE_MASK 0x00000001L +#define DP_SYM32_ENC1_DP_SYM32_ENC_VID_CRC_CONTROL__CRC_CONT_MODE_ENABLE_MASK 0x00000010L +#define DP_SYM32_ENC1_DP_SYM32_ENC_HBLANK_CONTROL__HBLANK_MINIMUM_SYMBOL_WIDTH__SHIFT 0x0 +#define DP_SYM32_ENC1_DP_SYM32_ENC_HBLANK_CONTROL__HBLANK_MINIMUM_SYMBOL_WIDTH_MASK 0x0000FFFFL +enum dcn401_clk_src_array_id {DCN401_CLK_SRC_PLL0 ,DCN401_CLK_SRC_PLL1 ,
@@ -370,10 +385,10 @@ static const struct dcn10_link_enc_mask le_mask = {static struct dcn31_hpo_dp_stream_encoder_registers hpo_dp_stream_enc_regs[4 ];static const struct dcn31_hpo_dp_stream_encoder_shift hpo_dp_se_shift = { -DCN4_2B_HPO_DP_STREAM_ENC_MASK_SH_LIST (__SHIFT)}; +DCN4_2_HPO_DP_STREAM_ENC_MASK_SH_LIST (__SHIFT)};static const struct dcn31_hpo_dp_stream_encoder_mask hpo_dp_se_mask = { -DCN4_2B_HPO_DP_STREAM_ENC_MASK_SH_LIST (_MASK)}; +DCN4_2_HPO_DP_STREAM_ENC_MASK_SH_LIST (_MASK)};#define hpo_dp_link_encoder_reg_init (id) \ DCN42B_HPO_DP_LINK_ENC_REG_LIST_RI(id)
Signature · 1 line
2.34.1
PATCH 32/41 drm/amd/display: Add missing DMUB CACP and PR definitions
In reply to [email protected]From: Taimur Hassan <[email protected]>
[Why]
Should have been picked up in 0.1.69.0 promotion commit.
[How]
Add the missing DMUB command-header definitions in dmub_cmd.h:
1. DMUB_CMD__CACP_GET_ACE_CURVE_AREA command ID.
2. Request/response data and command structs.
3. PR runtime flag bit.
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +54 -0
@@ -6256,6 +6256,10 @@ enum dmub_cmd_cacp_type {* Get CACP Histogram */ DMUB_CMD__CACP_GET_HISTOGRAM =7 , +/** +* Get ACE curve area for IGT test validation. +*/ + DMUB_CMD__CACP_GET_ACE_CURVE_AREA = 8, };/**
@@ -6644,6 +6648,50 @@ struct dmub_rb_cmd_cacp_get_histogram {uint8_t pad; }; +/** +* Data passed from driver to FW in a DMUB_CMD__CACP_GET_ACE_CURVE_AREA command. +*/ +struct dmub_cmd_cacp_get_ace_curve_area_in { +/** +* eDP panel instance (0-based). +*/ +uint8_t panel_inst; +/** +* Explicit padding to 4 byte boundary. +*/ +uint8_t pad[3 ]; +}; + +/** +* Data returned from FW in a DMUB_CMD__CACP_GET_ACE_CURVE_AREA command. +*/ +struct dmub_cmd_cacp_get_ace_curve_area_out { +/** +* Computed area under the ACE PWL curve (trapezoidal integration). +* Lower value = stronger dimming (higher CACP level). +* Directly comparable across levels. +*/ +uint32_t area; +}; + +/** +* Definition of a DMUB_CMD__CACP_GET_ACE_CURVE_AREA command. +* Uses inline response pattern: input and output share the data union. +*/ +struct dmub_rb_cmd_cacp_get_ace_curve_area { +/** +* Command header. +*/ +struct dmub_cmd_header header; +/** +* Data union for input/output. +*/ +union { +struct dmub_cmd_cacp_get_ace_curve_area_in in; +struct dmub_cmd_cacp_get_ace_curve_area_out out; + } data; +}; +/** * Data passed from driver to FW in a DMUB_CMD__QUERY_FEATURE_CAPS command. */
@@ -7435,6 +7483,7 @@ struct dmub_rb_cmd_pr_copy_settings {union dmub_pr_runtime_flags {struct {uint32_t disable_abm_optimization :1 ;// Disable ABM optimization for PR +uint32_t abm_periodic_ffu_allowed :1 ;// DAL: scenario wants periodic ABM keep-alive FFU } bitfields;uint32_t u32All; };
@@ -7815,6 +7864,11 @@ union dmub_rb_cmd {*/ struct dmub_rb_cmd_cacp_get_histogram cacp_get_histogram; +/** +* Definition of a DMUB_CMD__CACP_GET_ACE_CURVE_AREA command. +*/ +struct dmub_rb_cmd_cacp_get_ace_curve_area cacp_get_ace_curve_area; +/** * Definition of a DMUB_CMD__IDLE_OPT_DCN_NOTIFY_IDLE command. */
Signature · 1 line
2.34.1
PATCH 33/41 drm/amd/display: Add missing OTG_CRC1_SELECT mask for DCN3.2
In reply to [email protected]From: Wayne Lin <[email protected]>
[Why]
Configuring CRC engine 1 via optc35_configure_crc() triggers ASSERT(mask != 0) in dc_helper.c when programming OTG_CRC1_SELECT. The DCN3.2 OPTC mask list inherited from dcn32 is missing this field, so ROI[1] CRC cannot be enabled in DisplayCRC mode on DCN3.5/3.51.
[How]
Add OTG_CRC1_SELECT to OPTC_COMMON_MASK_SH_LIST_DCN3_2, matching the existing dcn10 definition so REG_UPDATE can program CRC engine 1.
--- drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.h +1 -0
@@ -132,6 +132,7 @@SF (OTG0_OTG_GSL_CONTROL ,OTG_GSL_CHECK_ALL_FIELDS , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_CONT_EN , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_R_CR , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_RG, CRC0_G_Y, mask_sh),\
Signature · 1 line
2.34.1
PATCH 34/41 drm/amd/display: Fix CRC engine 1 enable/disable on DCN3.1.2+
In reply to [email protected]From: Wayne Lin <[email protected]>
[Why]
Multi-ROI CRC uses OTG_CRC1_EN for the second engine, but the driver only toggled OTG_CRC_EN and cleared the whole OTG_CRC_CNTL register on disable.
[How]
Program engine 1 via OTG_CRC1_EN where supported, disable each engine independently by crc_eng_inst, and add the missing mask on relevant DCN ASICs.
--- .../amd/display/dc/optc/dcn10/dcn10_optc.c | 36 +++++++++++++++---- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 3 +- .../amd/display/dc/optc/dcn31/dcn31_optc.h | 4 +++ .../amd/display/dc/optc/dcn314/dcn314_optc.h | 1 + .../amd/display/dc/optc/dcn32/dcn32_optc.h | 1 + .../amd/display/dc/optc/dcn35/dcn35_optc.c | 26 +++++++++++--- .../amd/display/dc/optc/dcn401/dcn401_optc.h | 1 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 5 ++- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 2 ++ .../dc/resource/dcn315/dcn315_resource.c | 4 +-- .../dc/resource/dcn316/dcn316_resource.c | 4 +-- 11 files changed, 69 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c +29 -7
@@ -1471,8 +1471,21 @@ bool optc1_configure_crc(struct timing_generator *optc,if (!optc1_is_tg_enabled (optc))return false; -if (!params->enable || params->reset) -REG_WRITE (OTG_CRC_CNTL ,0 ); +if (!params->enable || params->reset) { +switch (params->crc_eng_inst) { +case 0 : +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC_EN ,0 ); +break ; +case 1 : +if (optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC1_EN ,0 ); +else +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC_EN ,0 ); +break ; +default : +return false; + } + }if (!params->enable)return true;
@@ -1528,10 +1541,16 @@ bool optc1_configure_crc(struct timing_generator *optc, OTG_CRC1_WINDOWB_Y_END, params->windowb_y_end);/* Set crc mode and selection, and enable.*/ -REG_UPDATE_3 (OTG_CRC_CNTL , -OTG_CRC_CONT_EN , params->continuous_mode ?1 :0 , -OTG_CRC1_SELECT , params->selection, -OTG_CRC_EN ,1 ); +if (optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_UPDATE_3 (OTG_CRC_CNTL , +OTG_CRC_CONT_EN , params->continuous_mode ?1 :0 , +OTG_CRC1_SELECT , params->selection, +OTG_CRC1_EN ,1 ); +else +REG_UPDATE_3 (OTG_CRC_CNTL , +OTG_CRC_CONT_EN , params->continuous_mode ?1 :0 , +OTG_CRC1_SELECT , params->selection, +OTG_CRC_EN ,1 );break ;default :return false;
@@ -1562,7 +1581,10 @@ bool optc1_get_crc(struct timing_generator *optc, uint8_t idx,uint32_t field =0 ;struct optc *optc1 =DCN10TG_FROM_TG (optc); -REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field); +if (idx ==1 && optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_GET (OTG_CRC_CNTL ,OTG_CRC1_EN , &field); +else +REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field);/* Early return if CRC is not enabled for this CRTC */ if (!field)
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h +2 -1
@@ -655,7 +655,8 @@ struct dcn_optc_registers {type OTG0_IHC_OTG_VERTICAL_INTERRUPT2_DEST ;#define TG_REG_FIELD_LIST_DCN3_2 (type) \ - type OTG_H_TIMING_DIV_MODE_MANUAL; + type OTG_H_TIMING_DIV_MODE_MANUAL;\ + type OTG_CRC1_EN;#define TG_REG_FIELD_LIST_DCN3_5 (type) \ type OTG_CRC0_WINDOWA_X_START_READBACK;\
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.h +4 -0
@@ -263,6 +263,10 @@SF (OTG0_OTG_PIPE_UPDATE_STATUS ,OTG_VUPDATE_KEEPOUT_STATUS , mask_sh),\ SF(OTG0_INTERRUPT_DEST, OTG0_IHC_OTG_VERTICAL_INTERRUPT2_DEST, mask_sh) +#define OPTC_COMMON_MASK_SH_LIST_DCN31X (mask_sh)\ + OPTC_COMMON_MASK_SH_LIST_DCN3_1(mask_sh),\ + SF(OTG0_OTG_CRC_CNTL, OTG_CRC1_EN, mask_sh) +void dcn31_timing_generator_init (struct optc *optc1);bool optc31_immediate_disable_crtc (struct timing_generator *optc);
drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.h +1 -0
@@ -205,6 +205,7 @@SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_CONT_EN , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_R_CR , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_G_Y , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_B, CRC0_B_CB, mask_sh),\
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.h +1 -0
@@ -134,6 +134,7 @@SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_R_CR , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_G_Y , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_B, CRC0_B_CB, mask_sh),\
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c +21 -5
@@ -205,7 +205,10 @@ static bool optc35_get_crc(struct timing_generator *optc, uint8_t idx,uint32_t field =0 ;struct optc *optc1 =DCN10TG_FROM_TG (optc); -REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field); +if (idx ==1 && optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_GET (OTG_CRC_CNTL ,OTG_CRC1_EN , &field); +else +REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field);/* Early return if CRC is not enabled for this CRTC */ if (!field)
@@ -275,8 +278,21 @@ bool optc35_configure_crc(struct timing_generator *optc,if (!optc1_is_tg_enabled (optc))return false; -if (!params->enable || params->reset) -REG_WRITE (OTG_CRC_CNTL ,0 ); +if (!params->enable || params->reset) { +switch (params->crc_eng_inst) { +case 0 : +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC_EN ,0 ); +break ; +case 1 : +if (optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC1_EN ,0 ); +else +REG_UPDATE (OTG_CRC_CNTL ,OTG_CRC_EN ,0 ); +break ; +default : +return false; + } + }if (!params->enable)return true;
@@ -341,13 +357,13 @@ bool optc35_configure_crc(struct timing_generator *optc,REG_UPDATE_4 (OTG_CRC_CNTL ,OTG_CRC_CONT_EN , params->continuous_mode ?1 :0 ,OTG_CRC1_SELECT , params->selection, -OTG_CRC_EN ,1 , +OTG_CRC1_EN ,1 ,OTG_CRC_WINDOW_DB_EN ,1 ); else REG_UPDATE_3(OTG_CRC_CNTL, OTG_CRC_CONT_EN, params->continuous_mode ? 1 : 0, OTG_CRC1_SELECT, params->selection, - OTG_CRC_EN, 1); + OTG_CRC1_EN, 1);break ;default :return false;
drivers/gpu/drm/amd/display/dc/optc/dcn401/dcn401_optc.h +1 -0
@@ -111,6 +111,7 @@SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_CONT_EN , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_R_CR , mask_sh),\SF (OTG0_OTG_CRC0_DATA_RG ,CRC0_G_Y , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_B, CRC0_B_CB, mask_sh),\
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.c +4 -1
@@ -46,7 +46,10 @@ bool optc42_get_crc(struct timing_generator *optc, uint8_t idx,uint32_t field =0 ;struct optc *optc1 =DCN10TG_FROM_TG (optc); -REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field); +if (idx ==1 && optc1->tg_mask->OTG_CRC1_EN !=0 ) +REG_GET (OTG_CRC_CNTL ,OTG_CRC1_EN , &field); +else +REG_GET (OTG_CRC_CNTL ,OTG_CRC_EN , &field);/* Early return if CRC is not enabled for this CRTC */ if (!field)
drivers/gpu/drm/amd/display/dc/optc/dcn42/dcn42_optc.h +2 -0
@@ -138,6 +138,7 @@SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_CONT_EN , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_R ,CRC0_R_CR , mask_sh),\SF (OTG0_OTG_CRC0_DATA_G ,CRC0_G_Y , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_B, CRC0_B_CB, mask_sh),\
@@ -316,6 +317,7 @@SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_CONT_EN , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC0_SELECT , mask_sh),\SF (OTG0_OTG_CRC_CNTL ,OTG_CRC_EN , mask_sh),\ +SF (OTG0_OTG_CRC_CNTL ,OTG_CRC1_EN , mask_sh),\SF (OTG0_OTG_CRC0_DATA_R ,CRC0_R_CR , mask_sh),\SF (OTG0_OTG_CRC0_DATA_G ,CRC0_G_Y , mask_sh),\ SF(OTG0_OTG_CRC0_DATA_B, CRC0_B_CB, mask_sh),\
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +2 -2
@@ -659,11 +659,11 @@ static const struct dcn_optc_registers optc_regs[] = { };static const struct dcn_optc_shift optc_shift = { -OPTC_COMMON_MASK_SH_LIST_DCN3_1 (__SHIFT) +OPTC_COMMON_MASK_SH_LIST_DCN31X (__SHIFT) };static const struct dcn_optc_mask optc_mask = { -OPTC_COMMON_MASK_SH_LIST_DCN3_1 (_MASK) +OPTC_COMMON_MASK_SH_LIST_DCN31X (_MASK) };#define hubp_regs (id)\
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +2 -2
@@ -654,11 +654,11 @@ static const struct dcn_optc_registers optc_regs[] = { };static const struct dcn_optc_shift optc_shift = { -OPTC_COMMON_MASK_SH_LIST_DCN3_1 (__SHIFT) +OPTC_COMMON_MASK_SH_LIST_DCN31X (__SHIFT) };static const struct dcn_optc_mask optc_mask = { -OPTC_COMMON_MASK_SH_LIST_DCN3_1 (_MASK) +OPTC_COMMON_MASK_SH_LIST_DCN31X (_MASK) };#define hubp_regs (id)\
Signature · 1 line
2.34.1
PATCH 35/41 drm/amd/display: Configure all CRC engines in pipe CRC source path
In reply to [email protected]From: Wayne Lin <[email protected]>
Iterate every CRC engine instance when enabling or disabling the pipe CRC source so DCN31x OTG_CRC1_EN is handled alongside OTG_CRC_EN, matching the legacy shared enable behavior used by DisplayCRC multi-ROI.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 13 +++++++++---- drivers/gpu/drm/amd/display/dc/dc_types.h | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +9 -4
@@ -604,10 +604,15 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,/* Enable or disable CRTC CRC generation */ if (dm_is_crc_source_crtc (source) || source ==AMDGPU_DM_PIPE_CRC_SOURCE_NONE ) { -if (!dc_stream_configure_crc (stream_state->ctx->dc, - stream_state,NULL , enable, enable,0 , true, crc_poly_mode)) { - ret = -EINVAL ; - goto unlock; +int i; + +for (i =0 ; i <MAX_CRC_WINDOW_NUM ; i++) { +if (!dc_stream_configure_crc (stream_state->ctx->dc, + stream_state,NULL , enable, enable, + i, true, crc_poly_mode)) { + ret = -EINVAL ; + goto unlock; + } } }
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -1
@@ -1045,9 +1045,10 @@ enum backlight_control_type { BACKLIGHT_CONTROL_AMD_AUX = 2, }; -#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)#define MAX_CRC_WINDOW_NUM 2 +#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY) + struct otg_phy_mux { uint8_t phy_output_num; uint8_t otg_output_num;
Signature · 1 line
2.34.1
PATCH 36/41 drm/amd/display: Fix more KUnit connector use-after-free bugs
In reply to [email protected]From: Alex Hung <[email protected]>
drmm_connector_init() and drmm_encoder_init() register their cleanup (drm_connector_cleanup() / drm_encoder_cleanup()) as DRM-managed actions tied to the drm_device lifetime. When the object memory is owned by KUnit, it is freed before that action runs, so the cleanup touches freed memory. Allocate these objects with drmm_kzalloc() so their lifetime matches the cleanup action.
--- .../display/amdgpu_dm/tests/amdgpu_dm_connector_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c +4 -4
@@ -3763,7 +3763,7 @@ static struct dm_test_stream_ctx *dm_test_stream_ctx_alloc(struct kunit *test) DRIVER_MODESET);KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ctx->drm); - ctx->aconnector =kunit_kzalloc (test,sizeof (*ctx->aconnector),GFP_KERNEL ); + ctx->aconnector =drmm_kzalloc (ctx->drm,sizeof (*ctx->aconnector),GFP_KERNEL );KUNIT_ASSERT_NOT_NULL (test, ctx->aconnector); KUNIT_ASSERT_EQ(test, drmm_connector_init(ctx->drm, &ctx->aconnector->base,
@@ -4026,7 +4026,7 @@ static void dm_test_poll_dac_load_returns_cached(struct kunit *test)KUNIT_ASSERT_NOT_ERR_OR_NULL (test, drm); adev =drm_to_adev (drm); - aconnector =kunit_kzalloc (test,sizeof (*aconnector),GFP_KERNEL ); + aconnector =drmm_kzalloc (drm,sizeof (*aconnector),GFP_KERNEL );KUNIT_ASSERT_NOT_NULL (test, aconnector); KUNIT_ASSERT_EQ(test, drmm_connector_init(drm, &aconnector->base,
@@ -4073,7 +4073,7 @@ static struct amdgpu_dm_connector *dm_test_reg_connector(struct kunit *test) DRIVER_MODESET);KUNIT_ASSERT_NOT_ERR_OR_NULL (test, drm); - aconnector =kunit_kzalloc (test,sizeof (*aconnector),GFP_KERNEL ); + aconnector =drmm_kzalloc (drm,sizeof (*aconnector),GFP_KERNEL );KUNIT_ASSERT_NOT_NULL (test, aconnector); KUNIT_ASSERT_EQ(test, drmm_connector_init(drm, &aconnector->base,
@@ -4528,7 +4528,7 @@ dm_test_modes_ctx_alloc(struct kunit *test, int connector_type) ctx->drm =dm_test_alloc_drm (test); ctx->aconnector =dm_test_add_connector (test, ctx->drm, connector_type); - ctx->aenc =kunit_kzalloc (test,sizeof (*ctx->aenc),GFP_KERNEL ); + ctx->aenc =drmm_kzalloc (ctx->drm,sizeof (*ctx->aenc),GFP_KERNEL );KUNIT_ASSERT_NOT_NULL (test, ctx->aenc); KUNIT_ASSERT_EQ(test, drmm_encoder_init(ctx->drm, &ctx->aenc->base, NULL,
Signature · 1 line
2.34.1
PATCH 37/41 drm/amd/display: Update BW bounding box unconditionally for DCN6
In reply to [email protected]From: Alvin Lee <[email protected]>
[Description]
DCN6 needs to update BW bounding box in hw init in order to propagate the Alt-Ch aperture info into DML. In this case update unconditionally on dcn6 HW init.
--- drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.c +2 -6
@@ -548,7 +548,6 @@ void dcn60_init_hw(struct dc *dc)unsigned int edp_num;uint32_t backlight =MAX_BACKLIGHT_LEVEL ;uint32_t user_level =MAX_BACKLIGHT_LEVEL ; -int current_dchub_ref_freq =0 ;if (dc->clk_mgr && dc->clk_mgr->funcs && dc->clk_mgr->funcs->init_clocks) { dc->clk_mgr->funcs->init_clocks (dc->clk_mgr);
@@ -589,8 +588,6 @@ void dcn60_init_hw(struct dc *dc) dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency, &res_pool->ref_clocks.dccg_ref_clock_inKhz); - current_dchub_ref_freq = res_pool->ref_clocks.dchub_ref_clock_inKhz /1000 ; - (res_pool->hubbub->funcs->get_dchub_ref_freq)(res_pool->hubbub, res_pool->ref_clocks.dccg_ref_clock_inKhz, &res_pool->ref_clocks.dchub_ref_clock_inKhz);
@@ -764,9 +761,8 @@ void dcn60_init_hw(struct dc *dc) dc->caps.dmub_caps.fams_ver = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver; dc->debug.fams2_config.bits.enable &= dc->caps.dmub_caps.fams_ver == dc->debug.fams_version.ver;// sw & fw fams versions must match for support -if ((!dc->debug.fams2_config.bits.enable && dc->res_pool->funcs->update_bw_bounding_box) - || res_pool->ref_clocks.dchub_ref_clock_inKhz /1000 != current_dchub_ref_freq) { -/* update bounding box if FAMS2 disabled, or if dchub clk has changed */ +if (dc->res_pool->funcs->update_bw_bounding_box) { +/* For DCN6 re-update unconditionally to propagate Alt-Ch address info into DML */ if (dc->clk_mgr) dc->res_pool->funcs->update_bw_bounding_box (dc, dc->clk_mgr->bw_params); }
Signature · 1 line
2.34.1
PATCH 38/41 drm/amd/display: switch max FFE level cap based on FRL link rate
In reply to [email protected]From: Relja Vojvodic <[email protected]>
[How & Why]
- Add support for dynamic FFE levels based on debug config and link rate
--- .../gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.c +2 -1
@@ -139,7 +139,8 @@ void dpcs60_program_eq_setting(bool no_ffe, const struct dc_hdmi_frl_link_settings *link_settings) { - const uint8_t max_ffe_level = 0x7; + const uint8_t max_ffe_level = + (link_settings->frl_link_rate >HDMI_FRL_LINK_RATE_12GBPS ) ?0x7 :0x3 ;struct dcn10_link_encoder *enc10 =TO_DCN10_LINK_ENC (enc);struct bp_transmitter_control cntl = {0 };
Signature · 1 line
2.34.1
PATCH 39/41 drm/amd/display: Add FFE level defaults
In reply to [email protected]From: Relja Vojvodic <[email protected]>
[How & Why]
Follow-up change to set defaults for HDMI FRL training
--- drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c | 1 + 16 files changed, 16 insertions(+)
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +1 -0
@@ -753,6 +753,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true,//No DMCU on DCN30 .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c +1 -0
@@ -84,6 +84,7 @@#define DC_LOGGER_INIT (logger)static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c +1 -0
@@ -84,6 +84,7 @@static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +1 -0
@@ -915,6 +915,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -0
@@ -928,6 +928,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_z10 = false, .enable_z9_disable_interface = true, .minimum_z8_residency_time =2100 ,
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -0
@@ -914,6 +914,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_z10 = true,/*hw not support it*/ .disable_dmcu = true, .force_abm_enable = false,
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +1 -0
@@ -909,6 +909,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_z10 = true,/*hw not support it*/ .disable_dmcu = true, .force_abm_enable = false,
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -0
@@ -745,6 +745,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +1 -0
@@ -735,6 +735,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -0
@@ -761,6 +761,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -0
@@ -741,6 +741,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -0
@@ -748,6 +748,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +1 -0
@@ -748,6 +748,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -0
@@ -727,6 +727,7 @@ static const struct dc_plane_cap plane_cap = { .min_height = 64};static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c +1 -0
@@ -785,6 +785,7 @@ static const struct dc_plane_cap plane_cap = { .min_height = 64};static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =3 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c +1 -0
@@ -615,6 +615,7 @@ static const struct dc_plane_cap plane_cap = { };static const struct dc_debug_options debug_defaults_drv = { + .limit_ffe =7 , .disable_dmcu = true, .force_abm_enable = false, .clock_trace = true,
Signature · 1 line
2.34.1
PATCH 40/41 drm/amd/display: Migrate color manager HW and fix MCM blend LUT issues
In reply to [email protected]From: Rafal Ostrowski <[email protected]>
Combine two related color manager improvements:
1. Migrate MCM/RMCM, shaper and 3DLUT HW programming to dc_plane_cm
- Continue convergence with upstream Color Manager refactor
- Migrate MCM/RMCM, shaper and 3DLUT programming for dcn401+ to dc_plane_cm
- Unify MCM programming across both legacy and 3DLUT DMA paths
- Add 3DLUT DMA broadcast support for multi-pipe planes
2. Reprogram MCM blend LUT on blend_enable falling edge
- Fix issue where SDR desktop remained desaturated after video playback
- Detect blend_enable falling edge (1->0) in surface update detection
- Force MCM LUT reprogramming on blend state change
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 66 +-- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 18 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 3 +- drivers/gpu/drm/amd/display/dc/dc.h | 12 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 +++++--- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 78 ++- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 10 +- .../amd/display/dc/hubp/dcn50/dcn50_hubp.c | 10 +- .../amd/display/dc/hubp/dcn60/dcn60_hubp.c | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 428 ++++++--------- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 488 ++---------------- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 6 - .../amd/display/dc/hwss/dcn42/dcn42_init.c | 2 - .../amd/display/dc/hwss/dcn60/dcn60_init.c | 2 - .../drm/amd/display/dc/hwss/hw_sequencer.h | 2 +- .../display/dc/hwss/hw_sequencer_private.h | 5 - drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 35 +- drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 +-- .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 ++++--- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 405 ++------------- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 55 +- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c | 235 ++++----- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h | 15 - .../dc/resource/dcn42/dcn42_resource.c | 1 + .../dc/resource/dcn60/dcn60_resource.c | 1 + 29 files changed, 778 insertions(+), 1621 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -62
@@ -3027,13 +3027,14 @@ static struct dc_update_descriptor det_surface_update(elevate_update_type (&overall_type,UPDATE_TYPE_FAST ,LOCK_DESCRIPTOR_STREAM ); } -if ((u->cm && u->cm->flags.bits.blend_enable) || +if ((u->cm && (u->cm->flags.bits.blend_enable || + u->cm->flags.bits.blend_enable != u->surface->cm.flags.bits.blend_enable)) || (u->gamma &&dce_use_lut (u->plane_info ? u->plane_info->format : u->surface->format))) { update_bits->gamma_change =1 ;elevate_update_type (&overall_type,UPDATE_TYPE_FAST ,LOCK_DESCRIPTOR_STREAM ); } -if (u->cm && (u->cm->flags.bits.lut3d_enable || u->cm->flags.bits.shaper_enable)) { +if (u->cm && (u->cm->flags.bits.lut3d_enable || u->surface->cm.flags.bits.lut3d_enable)) { update_bits->lut_3d =1 ;elevate_update_type (&overall_type,UPDATE_TYPE_FAST ,LOCK_DESCRIPTOR_STREAM ); }
@@ -3075,25 +3076,12 @@ static struct dc_update_descriptor det_surface_update( } }; -if (u->cm->flags.bits.shaper_enable != u->surface->cm.flags.bits.shaper_enable - || u->cm->flags.bits.blend_enable != u->surface->cm.flags.bits.blend_enable - || u->cm->flags.bits.lut3d_enable != u->surface->cm.flags.bits.lut3d_enable - || u->cm->flags.bits.lut3d_dma_enable != u->surface->cm.flags.bits.lut3d_dma_enable) { - update_bits->mcm_transfer_function_enable_change =1 ; -elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); - } -if ((u->cm->flags.all != blend_only_flags.all && u->cm->flags.all !=0 ) || (u->surface->cm.flags.all != blend_only_flags.all && u->surface->cm.flags.all !=0 )) {elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); } } -if (update_bits->lut_3d && - !u->surface->cm.flags.bits.lut3d_dma_enable) { -elevate_update_type (&overall_type,UPDATE_TYPE_FULL ,LOCK_DESCRIPTOR_GLOBAL ); - } - if (check_config->enable_legacy_fast_update && (update_bits->gamma_change || update_bits->gamut_remap_change ||
@@ -3446,46 +3434,6 @@ static void copy_surface_update_to_plane(memcpy (&surface->cm, srf_update->cm,sizeof (surface->cm)); surface->cm.refcount = refcount; -#ifndef TRIM_CM2 -/* Populate mcm_luts from cm for legacy consumers (dml2, hwseq) */ - surface->mcm_luts.lut1d_func = &surface->cm.blend_func; - surface->mcm_luts.shaper = &surface->cm.shaper_func; -if (srf_update->cm->flags.bits.lut3d_dma_enable) { - surface->mcm_luts.lut3d_data.lut3d_src =DC_CM2_TRANSFER_FUNC_SOURCE_VIDMEM ; - surface->mcm_luts.lut3d_data.gpu_mem_params.addr = surface->cm.lut3d_dma.addr; - surface->mcm_luts.lut3d_data.gpu_mem_params.layout = - (surface->cm.lut3d_dma.swizzle ==CM_LUT_3D_SWIZZLE_LINEAR_RGB ) ? -DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_RGB : - (surface->cm.lut3d_dma.swizzle ==CM_LUT_3D_SWIZZLE_LINEAR_BGR ) ? -DC_CM2_GPU_MEM_LAYOUT_3D_SWIZZLE_LINEAR_BGR : -DC_CM2_GPU_MEM_LAYOUT_1D_PACKED_LINEAR ; - surface->mcm_luts.lut3d_data.gpu_mem_params.format_params.format = - (surface->cm.lut3d_dma.format ==CM_LUT_PIXEL_FORMAT_RGBA16161616_UNORM_12MSB ) ? -DC_CM2_GPU_MEM_FORMAT_16161616_UNORM_12MSB : - (surface->cm.lut3d_dma.format ==CM_LUT_PIXEL_FORMAT_RGBA16161616_UNORM_12LSB ) ? -DC_CM2_GPU_MEM_FORMAT_16161616_UNORM_12LSB : -DC_CM2_GPU_MEM_FORMAT_16161616_FLOAT_FP1_5_10 ; - surface->mcm_luts.lut3d_data.gpu_mem_params.format_params.float_params.bias = - surface->cm.lut3d_dma.bias; - surface->mcm_luts.lut3d_data.gpu_mem_params.format_params.float_params.scale = - surface->cm.lut3d_dma.scale; - surface->mcm_luts.lut3d_data.gpu_mem_params.component_order = -DC_CM2_GPU_MEM_PIXEL_COMPONENT_ORDER_RGBA ; - surface->mcm_luts.lut3d_data.gpu_mem_params.size =DC_CM2_GPU_MEM_SIZE_TRANSFORMED ; - surface->mcm_luts.lut3d_data.mpc_3dlut_enable = (srf_update->cm->flags.bits.lut3d_enable !=0 ); - }else { - surface->mcm_luts.lut3d_data.lut3d_src =DC_CM2_TRANSFER_FUNC_SOURCE_SYSMEM ; - surface->mcm_luts.lut3d_data.lut3d_func = &surface->cm.lut3d_func; - } - -if (srf_update->cm->flags.bits.shaper_enable && - srf_update->cm->flags.bits.lut3d_enable) - surface->mcm_shaper_3dlut_setting =DC_CM2_SHAPER_3DLUT_SETTING_ENABLE_SHAPER_3DLUT ; -else if (srf_update->cm->flags.bits.shaper_enable) - surface->mcm_shaper_3dlut_setting =DC_CM2_SHAPER_3DLUT_SETTING_ENABLE_SHAPER ; -else - surface->mcm_shaper_3dlut_setting =DC_CM2_SHAPER_3DLUT_SETTING_BYPASS_ALL ; -#endif /* TRIM_CM2 */ }if (srf_update->hdr_mult.value)
@@ -3496,12 +3444,6 @@ static void copy_surface_update_to_plane( surface->sdr_white_level_nits = srf_update->sdr_white_level_nits; -if (srf_update->cm && - (srf_update->cm->flags.bits.blend_enable || - srf_update->cm->flags.bits.shaper_enable || - srf_update->cm->flags.bits.lut3d_enable)) - surface->lut_bank_a = !surface->lut_bank_a; -if (srf_update->input_csc_color_matrix) surface->input_csc_color_matrix = *srf_update->input_csc_color_matrix;
@@ -5243,7 +5185,7 @@ static void commit_planes_for_stream(struct dc *dc, srf_updates[i].cm->flags.bits.lut3d_enable && srf_updates[i].cm->flags.bits.lut3d_dma_enable && dc->hwss.trigger_3dlut_dma_load) - dc->hwss.trigger_3dlut_dma_load(dc, pipe_ctx); + dc->hwss.trigger_3dlut_dma_load(pipe_ctx);/*program triple buffer after lock based on flip type*/ if (dc->hwss.program_triplebuffer !=NULL && dc->debug.enable_tri_buf) {
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +18 -0
@@ -1457,6 +1457,24 @@ void hwss_build_fast_sequence(struct dc *dc, (*num_steps)++; } +if (current_mpc_pipe->plane_state->update_bits.hdr_mult) { +struct fixed31_32 multiplier = current_mpc_pipe->plane_state->hdr_mult; +uint32_t hw_mult =0x1f000 ;// 1.0 default multiplier +struct custom_float_format fmt; + + fmt.exponenta_bits =6 ; + fmt.mantissa_bits =12 ; + fmt.sign = true; + +if (!dc_fixpt_eq (multiplier,dc_fixpt_from_int (0 )) &&// check != 0 +convert_to_custom_float_format (multiplier, &fmt, &hw_mult)) { + block_sequence[*num_steps].params.dpp_set_hdr_multiplier_params.dpp = current_mpc_pipe->plane_res.dpp; + block_sequence[*num_steps].params.dpp_set_hdr_multiplier_params.hw_mult = hw_mult; + block_sequence[*num_steps].func =DPP_SET_HDR_MULTIPLIER ; + (*num_steps)++; + } + } +if (dc->hwss.program_gamut_remap && (current_mpc_pipe->plane_state->update_bits.gamut_remap_change || current_mpc_pipe->stream->update_flags.bits.gamut_remap)) {
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +1 -2
@@ -991,6 +991,7 @@ void dc_stream_log(const struct dc *dc, const struct dc_stream_state *stream) } } +/* TODO - move to per plane ownership? */ /* * dc_stream_get_3dlut() * Requirements:
@@ -1042,7 +1043,6 @@ void dc_stream_release_3dlut_for_stream(if (rmcm_3dlut) { rmcm_3dlut->isInUse = false; rmcm_3dlut->stream =NULL ; - rmcm_3dlut->protection_bits =0 ; } }
@@ -1054,7 +1054,6 @@ void dc_stream_init_rmcm_3dlut(struct dc *dc)for (unsigned int i =0 ; i < num_rmcm; i++) { dc->res_pool->rmcm_3dlut[i].isInUse = false; dc->res_pool->rmcm_3dlut[i].stream =NULL ; - dc->res_pool->rmcm_3dlut[i].protection_bits =0 ; } }
drivers/gpu/drm/amd/display/dc/dc.h +3 -9
@@ -1459,6 +1459,7 @@ struct dc_transfer_func {enum dc_transfer_func_predefined tf;/* FP16 1.0 reference level in nits, default is 80 nits, only for PQ*/ uint32_t sdr_ref_white_level; +struct fixed31_32 hdr_multiplier;union {struct pwl_params pwl;struct dc_transfer_func_distributed_points tf_pts;
@@ -1509,13 +1510,11 @@ struct lut_mem_mapping {struct dc_rmcm_3dlut {bool isInUse;const struct dc_stream_state *stream; -uint8_t protection_bits; };struct dc_3dlut {struct kref refcount;struct tetrahedral_params lut_3d; -struct fixed31_32 hdr_multiplier;union dc_3dlut_state state; };
@@ -1595,7 +1594,6 @@ struct pipe_update_bits { uint32_t stereo_format_change:1; uint32_t lut_3d:1; uint32_t tmz_changed:1; - uint32_t mcm_transfer_function_enable_change:1; /* disable or enable MCM transfer func */ uint32_t full_update:1; uint32_t sdr_white_level_nits:1; uint32_t cm_hist_change:1;
@@ -1640,7 +1638,6 @@ static inline void dc_pipe_update_bits_set_full(struct pipe_update_bits *flags) flags->stereo_format_change =1 ; flags->lut_3d =1 ; flags->tmz_changed =1 ; - flags->mcm_transfer_function_enable_change =1 ; flags->full_update =1 ; flags->sdr_white_level_nits =1 ; flags->cm_hist_change =1 ;
@@ -1674,7 +1671,6 @@ static inline bool dc_pipe_update_bits_is_any_set(const struct pipe_update_bits flags->stereo_format_change || flags->lut_3d || flags->tmz_changed || - flags->mcm_transfer_function_enable_change || flags->full_update || flags->sdr_white_level_nits || flags->cm_hist_change;
@@ -1709,18 +1705,16 @@ struct dc_plane_state {enum dc_color_space color_space;#ifndef TRIM_CM2 -// TODO: No longer used, remove +bool lut_bank_a;struct dc_hdr_static_metadata hdr_static_ctx; -struct dc_3dlut lut3d_func;struct dc_transfer_func in_shaper_func;struct dc_transfer_func blend_tf;enum dc_cm2_shaper_3dlut_setting mcm_shaper_3dlut_setting;bool mcm_lut1d_enable;struct dc_cm2_func_luts mcm_luts; -#endif /* TRIM_CM2 */ -bool lut_bank_a;enum mpcc_movable_cm_location mcm_location; +#endif /* TRIM_CM2 */ struct dc_plane_cm cm;struct dc_transfer_func *gamcor_tf;
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +134 -67
260 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h +4 -19
@@ -328,32 +328,17 @@ uint32_t hubp401_get_3dlut_fl_done(struct hubp *hubp);void hubp401_set_unbounded_requesting (struct hubp *hubp,bool enable); -void hubp401_update_3dlut_fl_bias_scale (struct hubp *hubp,uint16_t bias,uint16_t scale); -void hubp401_program_3dlut_fl_crossbar (struct hubp *hubp, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_y_g, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cb_b, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cr_r); - -void hubp401_program_3dlut_fl_tmz_protected (struct hubp *hubp,uint8_t protection_bits); - -void hubp401_program_3dlut_fl_width (struct hubp *hubp,enum hubp_3dlut_fl_width width); - -void hubp401_program_3dlut_fl_addressing_mode (struct hubp *hubp,enum hubp_3dlut_fl_addressing_mode addr_mode); +const enum dc_cm_lut_pixel_format format);void hubp401_enable_3dlut_fl (struct hubp *hubp,bool enable);void hubp401_program_3dlut_fl_dlg_param (struct hubp *hubp,int refcyc_per_3dlut_group); -void hubp401_program_3dlut_fl_addr (struct hubp *hubp,const struct dc_plane_address address); +void hubp401_program_3dlut_fl_addr (struct hubp *hubp,const struct dc_plane_address *address); -void hubp401_program_3dlut_fl_format (struct hubp *hubp,enum hubp_3dlut_fl_format format); - -void hubp401_program_3dlut_fl_mode (struct hubp *hubp,enum hubp_3dlut_fl_mode mode); - -void hubp401_program_3dlut_fl_config ( -struct hubp *hubp, -struct hubp_fl_3dlut_config *cfg); +void hubp401_program_3dlut_fl_config (struct hubp *hubp, +const struct dc_3dlut_dma *config);void hubp401_clear_tiling (struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.c +69 -9
103 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hubp/dcn42/dcn42_hubp.h +5 -5
@@ -79,11 +79,11 @@ bool hubp42_construct(const struct dcn_hubp2_shift *hubp_shift, const struct dcn_hubp2_mask *hubp_mask); -void hubp42_program_3dlut_fl_crossbar ( -struct hubp *hubp, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_r, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_g, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_b); +void hubp42_program_3dlut_fl_crossbar (struct hubp *hubp, +const enum dc_cm_lut_pixel_format format); + +void hubp42_program_3dlut_fl_config (struct hubp *hubp, +const struct dc_3dlut_dma *config);void hubp42_read_state (struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.c +3 -7
@@ -7,6 +7,7 @@#include "reg_helper.h" #include "basics/conversion.h" #include "dcn50_hubp.h" +#include "dcn42/dcn42_hubp.h" #define REG (reg)\ hubp2->hubp_regs->reg
@@ -500,16 +501,11 @@ static struct hubp_funcs dcn50_hubp_funcs = { .hubp_update_mall_sel = hubp401_update_mall_sel, .hubp_prepare_subvp_buffering = hubp32_prepare_subvp_buffering, .hubp_program_mcache_id_and_split_coordinate = hubp401_program_mcache_id_and_split_coordinate, - .hubp_update_3dlut_fl_bias_scale = hubp401_update_3dlut_fl_bias_scale, - .hubp_program_3dlut_fl_mode = hubp401_program_3dlut_fl_mode, - .hubp_program_3dlut_fl_format = hubp401_program_3dlut_fl_format, .hubp_program_3dlut_fl_addr = hubp401_program_3dlut_fl_addr, + .hubp_program_3dlut_fl_config = hubp42_program_3dlut_fl_config, .hubp_program_3dlut_fl_dlg_param = hubp401_program_3dlut_fl_dlg_param, .hubp_enable_3dlut_fl = hubp401_enable_3dlut_fl, - .hubp_program_3dlut_fl_addressing_mode = hubp401_program_3dlut_fl_addressing_mode, - .hubp_program_3dlut_fl_width = hubp401_program_3dlut_fl_width, - .hubp_program_3dlut_fl_tmz_protected = hubp401_program_3dlut_fl_tmz_protected, - .hubp_program_3dlut_fl_crossbar = hubp401_program_3dlut_fl_crossbar, + .hubp_program_3dlut_fl_crossbar = hubp42_program_3dlut_fl_crossbar, .hubp_get_3dlut_fl_done = hubp401_get_3dlut_fl_done, .hubp_clear_tiling = hubp401_clear_tiling, .hubp_read_reg_state = hubp3_read_reg_state
drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c +1 -6
@@ -441,15 +441,10 @@ static struct hubp_funcs dcn60_hubp_funcs = { .hubp_update_mall_sel = NULL, .hubp_prepare_subvp_buffering = hubp32_prepare_subvp_buffering, .hubp_program_mcache_id_and_split_coordinate = hubp401_program_mcache_id_and_split_coordinate, - .hubp_update_3dlut_fl_bias_scale = hubp401_update_3dlut_fl_bias_scale, - .hubp_program_3dlut_fl_mode = hubp401_program_3dlut_fl_mode, - .hubp_program_3dlut_fl_format = hubp401_program_3dlut_fl_format, .hubp_program_3dlut_fl_addr = hubp401_program_3dlut_fl_addr, + .hubp_program_3dlut_fl_config = hubp42_program_3dlut_fl_config, .hubp_program_3dlut_fl_dlg_param = hubp401_program_3dlut_fl_dlg_param, .hubp_enable_3dlut_fl = hubp401_enable_3dlut_fl, - .hubp_program_3dlut_fl_addressing_mode = hubp401_program_3dlut_fl_addressing_mode, - .hubp_program_3dlut_fl_width = hubp401_program_3dlut_fl_width, - .hubp_program_3dlut_fl_tmz_protected = hubp401_program_3dlut_fl_tmz_protected, .hubp_program_3dlut_fl_crossbar = hubp42_program_3dlut_fl_crossbar, .hubp_get_3dlut_fl_done = hubp401_get_3dlut_fl_done, .hubp_clear_tiling = hubp401_clear_tiling,
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +167 -261
508 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.h +1 -6
@@ -39,8 +39,7 @@ void dcn401_init_hw(struct dc *dc);bool dcn401_set_mcm_luts (struct pipe_ctx *pipe_ctx,const struct dc_plane_state *plane_state);bool dcn401_set_output_transfer_func (struct set_output_transfer_func_params *params); -void dcn401_trigger_3dlut_dma_load (struct dc *dc, -struct pipe_ctx *pipe_ctx); +void dcn401_trigger_3dlut_dma_load (struct pipe_ctx *pipe_ctx);void dcn401_calculate_dccg_tmds_div_value (struct pipe_ctx *pipe_ctx,unsigned int *tmds_div); enum dc_status dcn401_enable_stream_timing(
@@ -48,10 +47,6 @@ enum dc_status dcn401_enable_stream_timing(struct dc_state *context, struct dc *dc);void dcn401_enable_stream (struct pipe_ctx *pipe_ctx); -void dcn401_populate_mcm_luts (struct dc *dc, -struct pipe_ctx *pipe_ctx, -const struct dc_plane_cm *cm, -bool lut_bank_a);void dcn401_setup_hpo_hw_control (const struct dce_hwseq *hws,bool enable); void dcn401_disable_link_output(struct dc_link *link,
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c +0 -1
@@ -166,7 +166,6 @@ static const struct hwseq_private_funcs dcn401_private_funcs = { .calculate_dccg_k1_k2_values = NULL, .apply_single_controller_ctx_to_hw = dce110_apply_single_controller_ctx_to_hw, .reset_back_end_for_pipe = dcn401_reset_back_end_for_pipe, - .populate_mcm_luts = NULL, .perform_3dlut_wa_unlock = dcn401_perform_3dlut_wa_unlock, .program_pipe_sequence = dcn401_program_pipe_sequence, .dc_ip_request_cntl = dcn401_dc_ip_request_cntl,
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +42 -446
555 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.h +0 -6
@@ -18,17 +18,11 @@ void dcn42_program_cm_hist(bool dcn42_set_mcm_luts (struct pipe_ctx *pipe_ctx,const struct dc_plane_state *plane_state); -void dcn42_populate_mcm_luts (struct dc *dc, -struct pipe_ctx *pipe_ctx, -const struct dc_plane_cm *cm, -bool lut_bank_a); -bool dcn42_program_rmcm_luts (struct hubp *hubp,struct pipe_ctx *pipe_ctx,const struct dc_plane_cm *cm,struct mpc *mpc, -bool lut_bank_a,int mpcc_id);void dcn42_hardware_release (struct dc *dc);
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_init.c +0 -2
@@ -155,8 +155,6 @@ static const struct hwseq_private_funcs dcn42_private_funcs = { .calculate_dccg_k1_k2_values = NULL, .apply_single_controller_ctx_to_hw = dce110_apply_single_controller_ctx_to_hw, .reset_back_end_for_pipe = dcn401_reset_back_end_for_pipe, - .populate_mcm_luts = NULL, - .perform_3dlut_wa_unlock = dcn401_perform_3dlut_wa_unlock, .program_cm_hist = dcn42_program_cm_hist, .dpp_root_clock_control = dcn35_dpp_root_clock_control, .dpstream_root_clock_control = dcn35_dpstream_root_clock_control,
drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.c +0 -2
@@ -166,8 +166,6 @@ static const struct hwseq_private_funcs dcn60_private_funcs = { .calculate_dccg_k1_k2_values = NULL, .apply_single_controller_ctx_to_hw = dcn60_apply_single_controller_ctx_to_hw, .reset_back_end_for_pipe = dcn401_reset_back_end_for_pipe, - .populate_mcm_luts = NULL, - .perform_3dlut_wa_unlock = dcn401_perform_3dlut_wa_unlock, .program_cm_hist = dcn42_program_cm_hist, .program_pipe = dcn401_program_pipe, .program_pipe_sequence = dcn401_program_pipe_sequence,
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +1 -1
@@ -1506,7 +1506,7 @@ struct hw_sequencer_funcs {void (*program_output_csc)(struct dc *dc,struct pipe_ctx *pipe_ctx,enum dc_color_space colorspace,uint16_t *matrix,int opp_id); -void (*trigger_3dlut_dma_load)(struct dc *dc,struct pipe_ctx *pipe_ctx); +void (*trigger_3dlut_dma_load)(struct pipe_ctx *pipe_ctx);/* VM Related */ int (*init_sys_ctx)(struct dce_hwseq *hws,
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.h +0 -5
@@ -58,7 +58,6 @@ struct dc_state;struct dc_stream_status ;struct dc_writeback_info ;struct dchub_init_data ; -struct dc_plane_cm ;struct dc_static_screen_params ;struct resource_pool ;struct resource_context ;
@@ -218,10 +217,6 @@ struct hwseq_private_funcs {void (*reset_back_end_for_pipe)(struct dc *dc,struct pipe_ctx *pipe_ctx,struct dc_state *context); -void (*populate_mcm_luts)(struct dc *dc, -struct pipe_ctx *pipe_ctx, -const struct dc_plane_cm *cm, -bool lut_bank_a);void (*perform_3dlut_wa_unlock)(struct pipe_ctx *pipe_ctx);void (*wait_for_pipe_update_if_needed)(struct dc *dc,struct pipe_ctx *pipe_ctx,bool is_surface_update_only);void (*set_wait_for_update_needed_for_pipe)(struct dc *dc,struct pipe_ctx *pipe_ctx);
drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h +5 -30
@@ -89,7 +89,7 @@ enum hubp_3dlut_fl_addressing_mode {enum hubp_3dlut_fl_width { hubp_3dlut_fl_width_17 =17 , hubp_3dlut_fl_width_33 =33 , - hubp_3dlut_fl_width_transformed =4916 ,//mpc default + hubp_3dlut_fl_width_17_transformed =4916 ,//mpc default };enum hubp_3dlut_fl_crossbar_bit_slice {
@@ -99,22 +99,6 @@ enum hubp_3dlut_fl_crossbar_bit_slice { hubp_3dlut_fl_crossbar_bit_slice_48_63 =3 }; -struct hubp_fl_3dlut_config { -bool enabled; -enum hubp_3dlut_fl_width width; -enum hubp_3dlut_fl_mode mode; -enum hubp_3dlut_fl_format format; -uint16_t bias; -uint16_t scale; -struct dc_plane_address address; -enum hubp_3dlut_fl_addressing_mode addr_mode; -enum dc_cm_lut_swizzle layout; -uint8_t protection_bits; -enum hubp_3dlut_fl_crossbar_bit_slice crossbar_bit_slice_y_g; -enum hubp_3dlut_fl_crossbar_bit_slice crossbar_bit_slice_cb_b; -enum hubp_3dlut_fl_crossbar_bit_slice crossbar_bit_slice_cr_r; -}; -struct hubp {const struct hubp_funcs *funcs;struct dc_context *ctx;
@@ -289,24 +273,15 @@ struct hubp_funcs {void (*hubp_wait_pipe_read_start)(struct hubp *hubp);void (*hubp_program_mcache_id_and_split_coordinate)(struct hubp *hubp,struct dml2_hubp_pipe_mcache_regs *mcache_regs); -void (*hubp_update_3dlut_fl_bias_scale)(struct hubp *hubp,uint16_t bias,uint16_t scale); -void (*hubp_program_3dlut_fl_mode)(struct hubp *hubp, -enum hubp_3dlut_fl_mode mode); -void (*hubp_program_3dlut_fl_format)(struct hubp *hubp, -enum hubp_3dlut_fl_format format);void (*hubp_program_3dlut_fl_addr)(struct hubp *hubp, -const struct dc_plane_address address); +const struct dc_plane_address *address); +void (*hubp_program_3dlut_fl_config)(struct hubp *hubp, +const struct dc_3dlut_dma *config);void (*hubp_program_3dlut_fl_dlg_param)(struct hubp *hubp,int refcyc_per_3dlut_group);void (*hubp_enable_3dlut_fl)(struct hubp *hubp,bool enable); -void (*hubp_program_3dlut_fl_addressing_mode)(struct hubp *hubp,enum hubp_3dlut_fl_addressing_mode addr_mode); -void (*hubp_program_3dlut_fl_width)(struct hubp *hubp,enum hubp_3dlut_fl_width width); -void (*hubp_program_3dlut_fl_tmz_protected)(struct hubp *hubp,uint8_t protection_bits);void (*hubp_program_3dlut_fl_crossbar)(struct hubp *hubp, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_y_g, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cb_b, -enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cr_r); +enum dc_cm_lut_pixel_format format);uint32_t (*hubp_get_3dlut_fl_done)(struct hubp *hubp); -void (*hubp_program_3dlut_fl_config)(struct hubp *hubp,struct hubp_fl_3dlut_config *cfg);void (*hubp_clear_tiling)(struct hubp *hubp);uint32_t (*hubp_get_current_read_line)(struct hubp *hubp);uint32_t (*hubp_get_det_config_error)(struct hubp *hubp);
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +49 -32
144 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c +100 -77
251 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.h +18 -7
@@ -206,21 +206,32 @@ void dcn401_mpc_construct(struct dcn401_mpc *mpc401, int num_rmu);void mpc401_set_movable_cm_location (struct mpc *mpc,enum mpcc_movable_cm_location location,int mpcc_id); -void mpc401_populate_lut (struct mpc *mpc,const enum MCM_LUT_ID id,const union mcm_lut_params params, -bool lut_bank_a,int mpcc_id); +void mpc401_populate_lut (struct mpc *mpc, +const enum MCM_LUT_ID id, +const union mcm_lut_params *params, +bool lut_bank_a, +int mpcc_id);void mpc401_program_lut_mode (struct mpc *mpc,const enum MCM_LUT_ID id, -const enum MCM_LUT_XABLE xable, -bool lut_bank_a, -int mpcc_id); +const bool enable, +const bool lut_bank_a, +const enum dc_cm_lut_size size, +const int mpcc_id); + +void mpc401_get_lut_mode (struct mpc *mpc, +const enum MCM_LUT_ID id, +const int mpcc_id, +bool *enable, +bool *lut_bank_a);void mpc401_program_lut_read_write_control (struct mpc *mpc,const enum MCM_LUT_ID id, -bool lut_bank_a, -int mpcc_id); +const bool lut_bank_a, +const unsigned int bit_depth, +const int mpcc_id); void mpc401_set_gamut_remap( struct mpc *mpc,
drivers/gpu/drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c +50 -355
468 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h +8 -47
82 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c +93 -142
142 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h +0 -15
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn42/dcn42_resource.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c +1 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
PATCH 41/41 drm/amd/display: Promote DC to 3.2.392
In reply to [email protected]From: Taimur Hassan <[email protected]>
This version brings along the following updates:
- Add KUnit tests for crtc functions.
- Add KUnit tests for crtc functions.
- Add support for dynamic FFE levels.
- Configure all CRC engines in pipe CRC source path.
- Enable DCN6 compilation.
- Fix ABM over VABC.
- Fix CRC engine 1 enable/disable on DCN3.1.2+.
- Fix MCM blend LUT issues.
- Fix seamless mode switch not triggering for HDR to SDR transition.
- Fix wb_info leak and NULL deref in writeback.
- Increase fclk change latency on dcn351.
- Refactor stream validation.
- Resize MST HDCP per-connector arrays to 32.
- Unify force_yuv debugfs into force_yuv_pixel_format.
- Update VRR info packet to support 12-bit refresh rates.
--- 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
@@ -66,7 +66,7 @@ struct dcn_dsc_reg_state;struct dcn_optc_reg_state ;struct dcn_dccg_reg_state ; -#define DC_VER "3.2.391" +#define DC_VER "3.2.392"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.34.1
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 - 76e667ef60446d435b869360961888cca1500cb6 -> drm/amd/display: use proper context for logging) with new patches added on top of it.
Tested on Ubuntu 26.04.1, on Gnome Wayland.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, July 31, 2026 5:12 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Lin, Ping Lei <[email protected]>; Chen, Chen-Yu <[email protected]>; Li, Roman <[email protected]>
Subject: [PATCH 00/41] DC Patches July 31, 2026
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
- Add KUnit tests for crtc functions
- Enable DCN6
- Fix ABM, CRC engine, MCM, writeback issues
- Refactor stream validation.
Alex Hung (2):
drm/amd/display: Fix wb_info leak and NULL deref in writeback drm/amd/display: Fix more KUnit connector use-after-free bugs
Alvin Lee (1):
drm/amd/display: Update BW bounding box unconditionally for DCN6
Aurabindo Pillai (5):
drm/amd: Add DCN6 register headers drm/amd/display: Add new sources for DCN6 drm/amd/display: Enable DCN6 init drm/amd/display: Dependent changes for DCN6 drm/amd/display: Enable DCN6 sources compilation
Bhawanpreet Lakha (12):
drm/amd/display: Add KUnit tests for more crtc functions drm/amd/display: Add vblank handling tests for crtc drm/amd/display: Add idle worker tests for crtc drm/amd/display: Add active plane count tests for crtc drm/amd/display: Add KUnit test for crtc vblank event completion drm/amd/display: Add KUnit tests for crtc set_vupdate_irq drm/amd/display: Add KUnit tests for crtc set_static_screen_optimze drm/amd/display: Add KUnit tests for crtc set_vblank drm/amd/display: Cover crtc set_vblank workqueue branch drm/amd/display: Cover crtc vblank IPS self-refresh restore drm/amd/display: Cover crtc vblank restore replay-supported path drm/amd/display: Cover crtc destroy_state stream release
Charlene Liu (1):
drm/amd/display: Ensure dtbclk is enabled
Fangzhi Zuo (1):
drm/amd/display: Gate HDMI FRL status polling on active FRL link rate
Harry VanZyllDeJong (1):
drm/amd/display: Update VRR info packet to support 12-bit refresh
rates
Harry Wentland (2):
drm/amd/display: Resize MST HDCP per-connector arrays to 32 drm/amd/display: Bounds-check connector->index in dm_dp_mst_get_modes
Iswara Nagulendran (1):
drm/amd/display: Fix ABM over VABC
Ivan Lipski (3):
drm/amd/display: Refactor stream validation drm/amd/display: Unify force_yuv debugfs into force_yuv_pixel_format drm/amd/display: Align connector KUnit tests with stream validation
refactor
Karthi Kandasamy (1):
drm/amd/display: Fix seamless mode switch not triggering for HDR to
SDR transition
Matthew Stewart (1):
drm/amd/display: Add missing DCN42B register defines
Rafal Ostrowski (1):
drm/amd/display: Migrate color manager HW and fix MCM blend LUT issues
Relja Vojvodic (2):
drm/amd/display: switch max FFE level cap based on FRL link rate drm/amd/display: Add FFE level defaults
Roman Li (1):
drm/amd/display: Remove duplicate in tests/Makefile
Sung-huai Wang (1):
drm/amd/display: Increase fclk change latency on dcn351
Taimur Hassan (2):
drm/amd/display: Add missing DMUB CACP and PR definitions drm/amd/display: Promote DC to 3.2.392
Wayne Lin (3):
drm/amd/display: Add missing OTG_CRC1_SELECT mask for DCN3.2 drm/amd/display: Fix CRC engine 1 enable/disable on DCN3.1.2+ drm/amd/display: Configure all CRC engines in pipe CRC source path
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../amd/display/amdgpu_dm/amdgpu_dm_audio.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_connector.c | 289 +- .../display/amdgpu_dm/amdgpu_dm_connector.h | 8 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 13 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 25 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 9 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 57 +- .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 10 + .../amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 +- .../drm/amd/display/amdgpu_dm/tests/Makefile | 1 - .../tests/amdgpu_dm_connector_test.c | 163 +- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 1436 + .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c | 29 + .../tests/amdgpu_dm_kunit_test_helpers.h | 3 + .../display/dc/bios/command_table_helper2.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 28 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 1 + .../drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h | 389 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 1673 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h | 150 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c | 369 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h | 35 + drivers/gpu/drm/amd/display/dc/core/dc.c | 76 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 428 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 47 + .../gpu/drm/amd/display/dc/core/dc_state.c | 12 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 27 +- drivers/gpu/drm/amd/display/dc/dc.h | 41 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 23 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 53 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 32 +- .../gpu/drm/amd/display/dc/dc_state_priv.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 + drivers/gpu/drm/amd/display/dc/dc_types.h | 13 +- drivers/gpu/drm/amd/display/dc/dccg/Makefile | 8 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 10 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.c | 187 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.h | 182 + .../drm/amd/display/dc/dce/dce_clock_source.c | 28 + .../drm/amd/display/dc/dce/dce_clock_source.h | 9 + drivers/gpu/drm/amd/display/dc/dio/Makefile | 8 + .../display/dc/dio/dcn10/dcn10_link_encoder.h | 16 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 15 + .../dc/dio/dcn401/dcn401_dio_link_encoder.h | 10 + .../dc/dio/dcn60/dcn60_dio_link_encoder.c | 373 + .../dc/dio/dcn60/dcn60_dio_link_encoder.h | 43 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.c | 538 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.h | 181 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 8 + .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 +- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 25 + .../dml2_0/dml21/dml21_translation_helper.c | 57 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 129 +- .../dml21/inc/bounding_boxes/dcn5_soc_bb.h | 36 + .../dml21/inc/bounding_boxes/dcn6_soc_bb.h | 229 + .../bounding_boxes/utm_qos_model_dchub_v1.h | 109 + .../bounding_boxes/utm_qos_model_dchub_v2.h | 122 + .../bounding_boxes/utm_qos_model_dchub_v3.h | 53 + .../inc/bounding_boxes/utm_qos_model_types.h | 51 + .../dc/dml2_0/dml21/inc/dml_dmub_cmd.h | 502 + .../dml21/inc/dml_top_display_cfg_types.h | 10 + .../dml21/inc/dml_top_soc_parameter_types.h | 2 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 45 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c | 152 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h | 9 + .../dml21/src/dml2_cga/dml2_cga_factory.c | 38 + .../dml21/src/dml2_cga/dml2_cga_factory.h | 9 + .../dml2_core_calcs_dsc_shared_types.h | 32 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 1 + .../dml2_core/dml2_core_dcn5_calcs_dchub.c | 5893 ++ .../dml2_core/dml2_core_dcn5_calcs_dchub.h | 426 + .../dml2_core_dcn5_calcs_display_pipe.c | 1029 + .../dml2_core_dcn5_calcs_display_pipe.h | 151 + .../dml2_core_dcn5_calcs_dsc_latency.c | 501 + .../dml2_core_dcn5_calcs_dsc_latency.h | 23 + .../dml2_core_dcn5_funcs_initialize.c | 78 + .../dml2_core_dcn5_funcs_initialize.h | 12 + .../dml2_core_dcn5_funcs_mode_programming.c | 1791 + .../dml2_core_dcn5_funcs_mode_programming.h | 11 + .../dml2_core_dcn5_funcs_mode_support.c | 2957 + .../dml2_core_dcn5_funcs_mode_support.h | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.c | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.h | 8 + .../dml2_core/dml2_core_dcn6_calcs_dchub.c | 1951 + .../dml2_core/dml2_core_dcn6_calcs_dchub.h | 101 + .../dml2_core_dcn6_funcs_initialize.c | 165 + .../dml2_core_dcn6_funcs_initialize.h | 12 + .../dml2_core_dcn6_funcs_mode_programming.c | 1389 + .../dml2_core_dcn6_funcs_mode_programming.h | 11 + .../dml2_core_dcn6_funcs_mode_support.c | 4277 ++ .../dml2_core_dcn6_funcs_mode_support.h | 11 + .../dml21/src/dml2_core/dml2_core_factory.c | 25 + .../src/dml2_core/dml2_core_shared_types.h | 160 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c | 449 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h | 19 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 57 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c | 522 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h | 21 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c | 2228 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h | 97 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c | 506 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h | 22 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c | 1789 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h | 17 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 34 + .../alternate_pstate_shared_lib.c | 1078 + .../alternate_pstate_shared_lib.h | 109 + .../dml21/src/dml2_top/dml2_top_interfaces.c | 7 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 394 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.h | 9 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c | 144 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h | 11 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c | 405 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h | 12 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c | 29 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h | 11 + .../src/inc/dml2_internal_shared_types.h | 485 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.h | 8 + drivers/gpu/drm/amd/display/dc/dpp/Makefile | 17 + .../amd/display/dc/dpp/dcn401/dcn401_dpp.h | 41 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 26 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 7 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h | 6 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c | 391 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h | 86 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c | 346 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h | 525 + .../amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c | 315 + drivers/gpu/drm/amd/display/dc/dsc/Makefile | 7 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c | 447 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h | 248 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 10 + .../display/dc/gpio/dcn60/hw_factory_dcn60.c | 228 + .../display/dc/gpio/dcn60/hw_factory_dcn60.h | 11 + .../dc/gpio/dcn60/hw_translate_dcn60.c | 168 + .../dc/gpio/dcn60/hw_translate_dcn60.h | 13 + .../gpu/drm/amd/display/dc/gpio/ddc_regs.h | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 302 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 28 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 + .../drm/amd/display/dc/gpio/hw_translate.c | 4 + .../gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 + drivers/gpu/drm/amd/display/dc/hpo/Makefile | 8 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.h | 47 - .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c | 114 + .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h | 18 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.c | 358 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.h | 32 + .../gpu/drm/amd/display/dc/hubbub/Makefile | 8 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 108 + .../display/dc/hubbub/dcn60/dcn60_hubbub.c | 1816 + .../display/dc/hubbub/dcn60/dcn60_hubbub.h | 207 + drivers/gpu/drm/amd/display/dc/hubp/Makefile | 16 + .../amd/display/dc/hubp/dcn20/dcn20_hubp.h | 29 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 78 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 10 +- .../amd/display/dc/hubp/dcn50/dcn50_hubp.c | 532 + .../amd/display/dc/hubp/dcn50/dcn50_hubp.h | 48 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.c | 472 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.h | 272 + drivers/gpu/drm/amd/display/dc/hwss/Makefile | 16 + .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 9 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 5 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 483 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 488 +- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 6 - .../amd/display/dc/hwss/dcn42/dcn42_init.c | 2 - .../amd/display/dc/hwss/dcn50/dcn50_hwseq.c | 759 + .../amd/display/dc/hwss/dcn50/dcn50_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 1164 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_init.c | 181 + .../amd/display/dc/hwss/dcn60/dcn60_init.h | 12 + .../drm/amd/display/dc/hwss/hw_sequencer.h | 19 +- .../display/dc/hwss/hw_sequencer_private.h | 5 - .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + .../amd/display/dc/inc/hw/clk_mgr_internal.h | 22 + .../amd/display/dc/inc/hw/cursor_reg_cache.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 35 +- .../drm/amd/display/dc/inc/hw/link_encoder.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 +- .../gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 9 + .../display/dc/irq/dcn60/irq_service_dcn60.c | 417 + .../display/dc/irq/dcn60/irq_service_dcn60.h | 12 + .../drm/amd/display/dc/link/link_detection.c | 29 + .../drm/amd/display/dc/link/link_factory.c | 5 + .../amd/display/dc/link/protocols/link_ddc.c | 8 + .../display/dc/link/protocols/link_hdmi_frl.c | 23 +- drivers/gpu/drm/amd/display/dc/mpc/Makefile | 8 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 405 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 55 +- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c | 330 + .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h | 472 + drivers/gpu/drm/amd/display/dc/opp/Makefile | 8 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.c | 25 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.h | 64 + drivers/gpu/drm/amd/display/dc/optc/Makefile | 9 + .../amd/display/dc/optc/dcn10/dcn10_optc.c | 36 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 3 +- .../amd/display/dc/optc/dcn31/dcn31_optc.h | 4 + .../amd/display/dc/optc/dcn314/dcn314_optc.h | 1 + .../amd/display/dc/optc/dcn32/dcn32_optc.h | 2 + .../amd/display/dc/optc/dcn35/dcn35_optc.c | 26 +- .../amd/display/dc/optc/dcn401/dcn401_optc.h | 1 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 9 +- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 4 + .../amd/display/dc/optc/dcn60/dcn60_optc.c | 107 + .../amd/display/dc/optc/dcn60/dcn60_optc.h | 178 + .../gpu/drm/amd/display/dc/resource/Makefile | 10 + .../dc/resource/dcn10/dcn10_resource.c | 1 + .../dc/resource/dcn20/dcn20_resource.c | 1 + .../dc/resource/dcn201/dcn201_resource.c | 1 + .../dc/resource/dcn21/dcn21_resource.c | 1 + .../dc/resource/dcn30/dcn30_resource.c | 2 + .../dc/resource/dcn301/dcn301_resource.c | 1 + .../dc/resource/dcn302/dcn302_resource.c | 2 + .../dc/resource/dcn303/dcn303_resource.c | 2 + .../dc/resource/dcn31/dcn31_resource.c | 1 + .../dc/resource/dcn314/dcn314_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 6 +- .../dc/resource/dcn316/dcn316_resource.c | 5 +- .../dc/resource/dcn32/dcn32_resource.c | 2 + .../dc/resource/dcn321/dcn321_resource.c | 2 + .../dc/resource/dcn35/dcn35_resource.c | 2 + .../dc/resource/dcn351/dcn351_resource.c | 2 + .../dc/resource/dcn36/dcn36_resource.c | 2 + .../dc/resource/dcn401/dcn401_resource.c | 34 +- .../dc/resource/dcn401/dcn401_resource.h | 4 + .../dc/resource/dcn42/dcn42_resource.c | 3 + .../dc/resource/dcn42b/dcn42b_resource.c | 20 +- .../dc/resource/dcn60/dcn60_resource.c | 2377 + .../dc/resource/dcn60/dcn60_resource.h | 676 + .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn60/dcn60_soc_and_ip_translator.c | 117 + .../dcn60/dcn60_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 229 +- drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c | 732 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h | 303 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 52 + .../gpu/drm/amd/display/include/dal_asic_id.h | 18 + .../gpu/drm/amd/display/include/dal_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 8 +- .../drm/amd/display/modules/power/power_abm.c | 215 +- .../amd/display/modules/power/power_helpers.h | 9 + .../drm/amd/display/modules/power/power_psr.c | 7 + .../amd/display/modules/power/power_replay.c | 7 + .../include/asic_reg/dcn/dcn_6_0_0_offset.h | 15799 +++++ .../include/asic_reg/dcn/dcn_6_0_0_sh_mask.h | 58556 ++++++++++++++++ .../include/asic_reg/dpcs/dpcs_6_0_0_offset.h | 47 + .../asic_reg/dpcs/dpcs_6_0_0_sh_mask.h | 55 + .../asic_reg/mmhub/mmhub_5_0_1_offset.h | 17 + .../asic_reg/mmhub/mmhub_5_0_1_sh_mask.h | 17 + 286 files changed, 129427 insertions(+), 1800 deletions(-) create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.c create mode 100644 drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn5_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn6_soc_bb.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v1.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_types.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_dmub_cmd.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_calcs_dsc_shared_types.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c create mode 100644 drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c create mode 100644 drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.c create mode 100644 drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.c create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.h create mode 100644 drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c create mode 100644 drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h create mode 100644 drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.c create mode 100644 drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.h create mode 100644 drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.c create mode 100644 drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.h create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.c create mode 100644 drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.h create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.c create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_sh_mask.h
--
2.34.1
Quoted 6 lines · Daniel
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.
Hi Daniel,
Is there any way the community could contribute to help prevent regressions?
I respect that AMD wants to minimize time and resources spent on development for legacy GPUs, that is understandable and reasonable. However, could we please find a way to try to minimize regressions? For example, at the very least, would it be feasible to make sure that all supported GPUs can boot to a functional graphical desktop without crashing or showing a black screen?
Current amd-staging-drm-next is broken on all Vega and older GPUs since the 20th July DC patch series. Basically the display driver just crashes on boot. I already sent fixes for two regressions, and we're still looking for one more.
Thanks & best regards,
Timur
Quoted 643 lines
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 testingThe 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 eDPThe patchset consists of the amd-staging-drm-next branch (Head commit -
76e667ef60446d435b869360961888cca1500cb6-> drm/amd/display: use proper context for logging) with new patches added on top of it.Tested on Ubuntu 26.04.1, on Gnome Wayland.
Tested-by Dan Wheeler <[email protected]>Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
----------------------------------------------------------------------------
-------------------------------------- 1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, July 31, 2026 5:12 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Lin, Ping Lei <[email protected]>; Chen, Chen-Yu <[email protected]>; Li, Roman <[email protected]> Subject: [PATCH 00/41] DC Patches July 31, 2026From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we
highlight: - Add KUnit tests for crtc functions
- Enable DCN6
- Fix ABM, CRC engine, MCM, writeback issues
- Refactor stream validation.Cc Dan Wheeler <[email protected]>Alex Hung (2):
drm/amd/display: Fixwb_infoleak and NULL deref in writeback drm/amd/display: Fix more KUnit connector use-after-free bugsAlvin Lee (1):
drm/amd/display: Update BW bounding box unconditionally for DCN6Aurabindo Pillai (5):
drm/amd: Add DCN6 register headers drm/amd/display: Add new sources for DCN6 drm/amd/display: Enable DCN6 init drm/amd/display: Dependent changes for DCN6 drm/amd/display: Enable DCN6 sources compilationBhawanpreet Lakha (12):
drm/amd/display: Add KUnit tests for more crtc functions drm/amd/display: Add vblank handling tests for crtc drm/amd/display: Add idle worker tests for crtc drm/amd/display: Add active plane count tests for crtc drm/amd/display: Add KUnit test for crtc vblank event completion drm/amd/display: Add KUnit tests for crtcset_vupdate_irqdrm/amd/display: Add KUnit tests for crtcset_static_screen_optimzedrm/amd/display: Add KUnit tests for crtcset_vblankdrm/amd/display: Cover crtcset_vblankworkqueue branch drm/amd/display: Cover crtc vblank IPS self-refresh restore drm/amd/display: Cover crtc vblank restore replay-supported path drm/amd/display: Cover crtcdestroy_statestream releaseCharlene Liu (1):
drm/amd/display: Ensure dtbclk is enabledFangzhi Zuo (1):
drm/amd/display: Gate HDMI FRL status polling on active FRL link rateHarry VanZyllDeJong (1):
drm/amd/display: Update VRR info packet to support 12-bit refresh
ratesHarry Wentland (2):
drm/amd/display: Resize MST HDCP per-connector arrays to 32 drm/amd/display: Bounds-checkconnector->indexindm_dp_mst_get_modesIswara Nagulendran (1):
drm/amd/display: Fix ABM over VABCIvan Lipski (3):
drm/amd/display: Refactor stream validation drm/amd/display: Unifyforce_yuvdebugfs intoforce_yuv_pixel_formatdrm/amd/display: Align connector KUnit tests with stream validation
refactorKarthi Kandasamy (1):
drm/amd/display: Fix seamless mode switch not triggering for HDR to
SDR transitionMatthew Stewart (1):
drm/amd/display: Add missing DCN42B register definesRafal Ostrowski (1):
drm/amd/display: Migrate color manager HW and fix MCM blend LUT issuesRelja Vojvodic (2):
drm/amd/display: switch max FFE level cap based on FRL link rate drm/amd/display: Add FFE level defaultsRoman Li (1):
drm/amd/display: Remove duplicate in tests/MakefileSung-huai Wang (1):
drm/amd/display: Increase fclk change latency on dcn351Taimur Hassan (2):
drm/amd/display: Add missing DMUB CACP and PR definitions drm/amd/display: Promote DC to 3.2.392Wayne Lin (3):
drm/amd/display: Add missingOTG_CRC1_SELECTmask for DCN3.2 drm/amd/display: Fix CRC engine 1 enable/disable on DCN3.1.2+ drm/amd/display: Configure all CRC engines in pipe CRC source pathdrivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../amd/display/amdgpu_dm/amdgpu_dm_audio.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_connector.c | 289 +- .../display/amdgpu_dm/amdgpu_dm_connector.h | 8 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 13 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 25 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 9 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 57 +- .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 10 + .../amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 +- .../drm/amd/display/amdgpu_dm/tests/Makefile | 1 - .../tests/amdgpu_dm_connector_test.c | 163 +- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 1436 + .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c | 29 + .../tests/amdgpu_dm_kunit_test_helpers.h | 3 + .../display/dc/bios/command_table_helper2.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 28 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 1 + .../drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h | 389 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 1673 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h | 150 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c | 369 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h | 35 + drivers/gpu/drm/amd/display/dc/core/dc.c | 76 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 428 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 47 + .../gpu/drm/amd/display/dc/core/dc_state.c | 12 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 27 +- drivers/gpu/drm/amd/display/dc/dc.h | 41 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 23 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 53 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 32 +- .../gpu/drm/amd/display/dc/dc_state_priv.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 + drivers/gpu/drm/amd/display/dc/dc_types.h | 13 +- drivers/gpu/drm/amd/display/dc/dccg/Makefile | 8 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 10 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.c | 187 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.h | 182 + .../drm/amd/display/dc/dce/dce_clock_source.c | 28 + .../drm/amd/display/dc/dce/dce_clock_source.h | 9 + drivers/gpu/drm/amd/display/dc/dio/Makefile | 8 + .../display/dc/dio/dcn10/dcn10_link_encoder.h | 16 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 15 + .../dc/dio/dcn401/dcn401_dio_link_encoder.h | 10 + .../dc/dio/dcn60/dcn60_dio_link_encoder.c | 373 + .../dc/dio/dcn60/dcn60_dio_link_encoder.h | 43 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.c | 538 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.h | 181 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 8 + .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 +- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 25 + .../dml2_0/dml21/dml21_translation_helper.c | 57 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 129 +- .../dml21/inc/bounding_boxes/dcn5_soc_bb.h | 36 + .../dml21/inc/bounding_boxes/dcn6_soc_bb.h | 229 + .../bounding_boxes/utm_qos_model_dchub_v1.h | 109 + .../bounding_boxes/utm_qos_model_dchub_v2.h | 122 + .../bounding_boxes/utm_qos_model_dchub_v3.h | 53 + .../inc/bounding_boxes/utm_qos_model_types.h | 51 + .../dc/dml2_0/dml21/inc/dml_dmub_cmd.h | 502 + .../dml21/inc/dml_top_display_cfg_types.h | 10 + .../dml21/inc/dml_top_soc_parameter_types.h | 2 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 45 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c | 152 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h | 9 + .../dml21/src/dml2_cga/dml2_cga_factory.c | 38 + .../dml21/src/dml2_cga/dml2_cga_factory.h | 9 + .../dml2_core_calcs_dsc_shared_types.h | 32 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 1 + .../dml2_core/dml2_core_dcn5_calcs_dchub.c | 5893 ++ .../dml2_core/dml2_core_dcn5_calcs_dchub.h | 426 + .../dml2_core_dcn5_calcs_display_pipe.c | 1029 + .../dml2_core_dcn5_calcs_display_pipe.h | 151 + .../dml2_core_dcn5_calcs_dsc_latency.c | 501 + .../dml2_core_dcn5_calcs_dsc_latency.h | 23 + .../dml2_core_dcn5_funcs_initialize.c | 78 + .../dml2_core_dcn5_funcs_initialize.h | 12 + .../dml2_core_dcn5_funcs_mode_programming.c | 1791 + .../dml2_core_dcn5_funcs_mode_programming.h | 11 + .../dml2_core_dcn5_funcs_mode_support.c | 2957 + .../dml2_core_dcn5_funcs_mode_support.h | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.c | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.h | 8 + .../dml2_core/dml2_core_dcn6_calcs_dchub.c | 1951 + .../dml2_core/dml2_core_dcn6_calcs_dchub.h | 101 + .../dml2_core_dcn6_funcs_initialize.c | 165 + .../dml2_core_dcn6_funcs_initialize.h | 12 + .../dml2_core_dcn6_funcs_mode_programming.c | 1389 + .../dml2_core_dcn6_funcs_mode_programming.h | 11 + .../dml2_core_dcn6_funcs_mode_support.c | 4277 ++ .../dml2_core_dcn6_funcs_mode_support.h | 11 + .../dml21/src/dml2_core/dml2_core_factory.c | 25 + .../src/dml2_core/dml2_core_shared_types.h | 160 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c | 449 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h | 19 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 57 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c | 522 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h | 21 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c | 2228 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h | 97 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c | 506 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h | 22 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c | 1789 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h | 17 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 34 + .../alternate_pstate_shared_lib.c | 1078 + .../alternate_pstate_shared_lib.h | 109 + .../dml21/src/dml2_top/dml2_top_interfaces.c | 7 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 394 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.h | 9 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c | 144 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h | 11 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c | 405 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h | 12 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c | 29 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h | 11 + .../src/inc/dml2_internal_shared_types.h | 485 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.h | 8 + drivers/gpu/drm/amd/display/dc/dpp/Makefile | 17 + .../amd/display/dc/dpp/dcn401/dcn401_dpp.h | 41 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 26 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 7 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h | 6 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c | 391 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h | 86 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c | 346 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h | 525 + .../amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c | 315 + drivers/gpu/drm/amd/display/dc/dsc/Makefile | 7 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c | 447 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h | 248 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 10 + .../display/dc/gpio/dcn60/hw_factory_dcn60.c | 228 + .../display/dc/gpio/dcn60/hw_factory_dcn60.h | 11 + .../dc/gpio/dcn60/hw_translate_dcn60.c | 168 + .../dc/gpio/dcn60/hw_translate_dcn60.h | 13 + .../gpu/drm/amd/display/dc/gpio/ddc_regs.h | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 302 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 28 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 + .../drm/amd/display/dc/gpio/hw_translate.c | 4 + .../gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 + drivers/gpu/drm/amd/display/dc/hpo/Makefile | 8 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.h | 47 - .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c | 114 + .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h | 18 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.c | 358 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.h | 32 + .../gpu/drm/amd/display/dc/hubbub/Makefile | 8 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 108 + .../display/dc/hubbub/dcn60/dcn60_hubbub.c | 1816 + .../display/dc/hubbub/dcn60/dcn60_hubbub.h | 207 + drivers/gpu/drm/amd/display/dc/hubp/Makefile | 16 + .../amd/display/dc/hubp/dcn20/dcn20_hubp.h | 29 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 78 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 10 +- .../amd/display/dc/hubp/dcn50/dcn50_hubp.c | 532 + .../amd/display/dc/hubp/dcn50/dcn50_hubp.h | 48 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.c | 472 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.h | 272 + drivers/gpu/drm/amd/display/dc/hwss/Makefile | 16 + .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 9 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 5 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 483 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 488 +- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 6 - .../amd/display/dc/hwss/dcn42/dcn42_init.c | 2 - .../amd/display/dc/hwss/dcn50/dcn50_hwseq.c | 759 + .../amd/display/dc/hwss/dcn50/dcn50_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 1164 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_init.c | 181 + .../amd/display/dc/hwss/dcn60/dcn60_init.h | 12 + .../drm/amd/display/dc/hwss/hw_sequencer.h | 19 +- .../display/dc/hwss/hw_sequencer_private.h | 5 - .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + .../amd/display/dc/inc/hw/clk_mgr_internal.h | 22 + .../amd/display/dc/inc/hw/cursor_reg_cache.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 35 +- .../drm/amd/display/dc/inc/hw/link_encoder.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 +- .../gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 9 + .../display/dc/irq/dcn60/irq_service_dcn60.c | 417 + .../display/dc/irq/dcn60/irq_service_dcn60.h | 12 + .../drm/amd/display/dc/link/link_detection.c | 29 + .../drm/amd/display/dc/link/link_factory.c | 5 + .../amd/display/dc/link/protocols/link_ddc.c | 8 + .../display/dc/link/protocols/link_hdmi_frl.c | 23 +- drivers/gpu/drm/amd/display/dc/mpc/Makefile | 8 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 405 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 55 +- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c | 330 + .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h | 472 + drivers/gpu/drm/amd/display/dc/opp/Makefile | 8 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.c | 25 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.h | 64 + drivers/gpu/drm/amd/display/dc/optc/Makefile | 9 + .../amd/display/dc/optc/dcn10/dcn10_optc.c | 36 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 3 +- .../amd/display/dc/optc/dcn31/dcn31_optc.h | 4 + .../amd/display/dc/optc/dcn314/dcn314_optc.h | 1 + .../amd/display/dc/optc/dcn32/dcn32_optc.h | 2 + .../amd/display/dc/optc/dcn35/dcn35_optc.c | 26 +- .../amd/display/dc/optc/dcn401/dcn401_optc.h | 1 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 9 +- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 4 + .../amd/display/dc/optc/dcn60/dcn60_optc.c | 107 + .../amd/display/dc/optc/dcn60/dcn60_optc.h | 178 + .../gpu/drm/amd/display/dc/resource/Makefile | 10 + .../dc/resource/dcn10/dcn10_resource.c | 1 + .../dc/resource/dcn20/dcn20_resource.c | 1 + .../dc/resource/dcn201/dcn201_resource.c | 1 + .../dc/resource/dcn21/dcn21_resource.c | 1 + .../dc/resource/dcn30/dcn30_resource.c | 2 + .../dc/resource/dcn301/dcn301_resource.c | 1 + .../dc/resource/dcn302/dcn302_resource.c | 2 + .../dc/resource/dcn303/dcn303_resource.c | 2 + .../dc/resource/dcn31/dcn31_resource.c | 1 + .../dc/resource/dcn314/dcn314_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 6 +- .../dc/resource/dcn316/dcn316_resource.c | 5 +- .../dc/resource/dcn32/dcn32_resource.c | 2 + .../dc/resource/dcn321/dcn321_resource.c | 2 + .../dc/resource/dcn35/dcn35_resource.c | 2 + .../dc/resource/dcn351/dcn351_resource.c | 2 + .../dc/resource/dcn36/dcn36_resource.c | 2 + .../dc/resource/dcn401/dcn401_resource.c | 34 +- .../dc/resource/dcn401/dcn401_resource.h | 4 + .../dc/resource/dcn42/dcn42_resource.c | 3 + .../dc/resource/dcn42b/dcn42b_resource.c | 20 +- .../dc/resource/dcn60/dcn60_resource.c | 2377 + .../dc/resource/dcn60/dcn60_resource.h | 676 + .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn60/dcn60_soc_and_ip_translator.c | 117 + .../dcn60/dcn60_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 229 +- drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c | 732 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h | 303 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 52 + .../gpu/drm/amd/display/include/dal_asic_id.h | 18 + .../gpu/drm/amd/display/include/dal_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 8 +- .../drm/amd/display/modules/power/power_abm.c | 215 +- .../amd/display/modules/power/power_helpers.h | 9 + .../drm/amd/display/modules/power/power_psr.c | 7 + .../amd/display/modules/power/power_replay.c | 7 + .../include/asic_reg/dcn/dcn_6_0_0_offset.h | 15799 +++++ .../include/asic_reg/dcn/dcn_6_0_0_sh_mask.h | 58556 ++++++++++++++++ .../include/asic_reg/dpcs/dpcs_6_0_0_offset.h | 47 + .../asic_reg/dpcs/dpcs_6_0_0_sh_mask.h | 55 + .../asic_reg/mmhub/mmhub_5_0_1_offset.h | 17 + .../asic_reg/mmhub/mmhub_5_0_1_sh_mask.h | 17 + 286 files changed, 129427 insertions(+), 1800 deletions(-) create mode100644
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dalsmc.hcreate mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.ccreate mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.hcreate mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.ccreate mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn5_soc_bb. h create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn6_soc_bb. h create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v1.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_types.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_dmub_cmd.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_calcs_dsc_shared_types.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_libraries/alternate_pstate_shared_lib.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.hcreate mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.ccreate mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.hcreate mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.ccreate mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.hcreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.ccreate mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.hcreate mode 100644drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.ccreate mode 100644drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.hcreate mode 100644drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.ccreate mode 100644drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.hcreate mode 100644drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.ccreate mode 100644drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.hcreate mode 100644drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.ccreate mode 100644drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.hcreate mode 100644drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.ccreate mode 100644drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.hcreate mode 100644drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.ccreate mode 100644drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.hcreate mode 100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.ccreate mode 100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_sh_mask.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_offset.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_sh_mask.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_offset.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_sh_mask.h--
2.34.1
Public
Hey Timur,
The most helpful thing the community can do is to file tickets at https://gitlab.freedesktop.org/drm/amd. We've created a few new tools that will help us get through the tickets posted here from the community.
As for Vega and older GPUs, they were part of our automated tests but were removed. We'll readd them to the test farm, initially Vega for boot testing, and we can see how that goes.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: Timur Kristóf <[email protected]>
Sent: Tuesday, August 4, 2026 5:16 PM
To: Li, Roman <[email protected]>; [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]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Lin, Ping Lei <[email protected]>; Chen, Chen-Yu <[email protected]>; Li, Roman <[email protected]>; Wheeler, Daniel <[email protected]>; Deucher, Alexander <[email protected]>
Subject: Re: [PATCH 00/41] DC Patches July 31, 2026
Quoted 6 lines · Daniel
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.
Hi Daniel,
Is there any way the community could contribute to help prevent regressions?
I respect that AMD wants to minimize time and resources spent on development for legacy GPUs, that is understandable and reasonable. However, could we please find a way to try to minimize regressions? For example, at the very least, would it be feasible to make sure that all supported GPUs can boot to a functional graphical desktop without crashing or showing a black screen?
Current amd-staging-drm-next is broken on all Vega and older GPUs since the 20th July DC patch series. Basically the display driver just crashes on boot. I already sent fixes for two regressions, and we're still looking for one more.
Thanks & best regards,
Timur
Quoted 724 lines
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 testingThe 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 eDPThe patchset consists of the amd-staging-drm-next branch (Head commit -
76e667ef60446d435b869360961888cca1500cb6-> drm/amd/display: use proper context for logging) with new patches added on top of it.Tested on Ubuntu 26.04.1, on Gnome Wayland.
Tested-by Dan Wheeler <[email protected]>Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
----------------------------------------------------------------------
------
-------------------------------------- 1 Commerce Valley Dr E, Thornhill, ON L3T 7X6 amd.com-----Original Message-----
From: [email protected] <[email protected]>
Sent: Friday, July 31, 2026 5:12 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan
(Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Lin, Ping Lei <[email protected]>; Chen, Chen-Yu <[email protected]>; Li, Roman <[email protected]> Subject: [PATCH 00/41] DC Patches July 31, 2026From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we
highlight: - Add KUnit tests for crtc functions
- Enable DCN6
- Fix ABM, CRC engine, MCM, writeback issues
- Refactor stream validation.Cc Dan Wheeler <[email protected]>Alex Hung (2):
drm/amd/display: Fixwb_infoleak and NULL deref in writeback drm/amd/display: Fix more KUnit connector use-after-free bugsAlvin Lee (1):
drm/amd/display: Update BW bounding box unconditionally for DCN6Aurabindo Pillai (5):
drm/amd: Add DCN6 register headers drm/amd/display: Add new sources for DCN6 drm/amd/display: Enable DCN6 init drm/amd/display: Dependent changes for DCN6 drm/amd/display: Enable DCN6 sources compilationBhawanpreet Lakha (12):
drm/amd/display: Add KUnit tests for more crtc functions drm/amd/display: Add vblank handling tests for crtc drm/amd/display: Add idle worker tests for crtc drm/amd/display: Add active plane count tests for crtc drm/amd/display: Add KUnit test for crtc vblank event completion drm/amd/display: Add KUnit tests for crtcset_vupdate_irqdrm/amd/display: Add KUnit tests for crtcset_static_screen_optimzedrm/amd/display: Add KUnit tests for crtcset_vblankdrm/amd/display: Cover crtcset_vblankworkqueue branch drm/amd/display: Cover crtc vblank IPS self-refresh restore drm/amd/display: Cover crtc vblank restore replay-supported path drm/amd/display: Cover crtcdestroy_statestream releaseCharlene Liu (1):
drm/amd/display: Ensure dtbclk is enabledFangzhi Zuo (1):
drm/amd/display: Gate HDMI FRL status polling on active FRL link
rateHarry VanZyllDeJong (1):
drm/amd/display: Update VRR info packet to support 12-bit refresh
ratesHarry Wentland (2):
drm/amd/display: Resize MST HDCP per-connector arrays to 32 drm/amd/display: Bounds-checkconnector->indexindm_dp_mst_get_modesIswara Nagulendran (1):
drm/amd/display: Fix ABM over VABCIvan Lipski (3):
drm/amd/display: Refactor stream validation drm/amd/display: Unifyforce_yuvdebugfs intoforce_yuv_pixel_formatdrm/amd/display: Align connector KUnit tests with stream validation
refactorKarthi Kandasamy (1):
drm/amd/display: Fix seamless mode switch not triggering for HDR to
SDR transitionMatthew Stewart (1):
drm/amd/display: Add missing DCN42B register definesRafal Ostrowski (1):
drm/amd/display: Migrate color manager HW and fix MCM blend LUT
issuesRelja Vojvodic (2):
drm/amd/display: switch max FFE level cap based on FRL link rate drm/amd/display: Add FFE level defaultsRoman Li (1):
drm/amd/display: Remove duplicate in tests/MakefileSung-huai Wang (1):
drm/amd/display: Increase fclk change latency on dcn351Taimur Hassan (2):
drm/amd/display: Add missing DMUB CACP and PR definitions drm/amd/display: Promote DC to 3.2.392Wayne Lin (3):
drm/amd/display: Add missingOTG_CRC1_SELECTmask for DCN3.2 drm/amd/display: Fix CRC engine 1 enable/disable on DCN3.1.2+ drm/amd/display: Configure all CRC engines in pipe CRC source pathdrivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 2 - .../amd/display/amdgpu_dm/amdgpu_dm_audio.h | 2 +- .../display/amdgpu_dm/amdgpu_dm_connector.c | 289 +- .../display/amdgpu_dm/amdgpu_dm_connector.h | 8 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 13 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 25 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.h | 9 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 57 +- .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c | 10 + .../amd/display/amdgpu_dm/amdgpu_dm_dmub.h | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.h | 10 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 6 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 9 +- .../drm/amd/display/amdgpu_dm/tests/Makefile | 1 - .../tests/amdgpu_dm_connector_test.c | 163 +- .../amdgpu_dm/tests/amdgpu_dm_crtc_test.c | 1436 + .../amdgpu_dm/tests/amdgpu_dm_kunit_helpers.c | 29 + .../tests/amdgpu_dm_kunit_test_helpers.h | 3 + .../display/dc/bios/command_table_helper2.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 9 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 + .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.c | 28 +- .../display/dc/clk_mgr/dcn42/dcn42_clk_mgr.h | 1 + .../drm/amd/display/dc/clk_mgr/dcn60/dalsmc.h | 389 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c | 1673 + .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h | 150 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c | 369 + .../dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h | 35 + drivers/gpu/drm/amd/display/dc/core/dc.c | 76 +- .../drm/amd/display/dc/core/dc_hw_sequencer.c | 428 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 47 + .../gpu/drm/amd/display/dc/core/dc_state.c | 12 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 27 +- drivers/gpu/drm/amd/display/dc/dc.h | 41 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 23 + drivers/gpu/drm/amd/display/dc/dc_helper.c | 2 + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 53 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 32 +- .../gpu/drm/amd/display/dc/dc_state_priv.h | 1 + drivers/gpu/drm/amd/display/dc/dc_stream.h | 5 + drivers/gpu/drm/amd/display/dc/dc_types.h | 13 +- drivers/gpu/drm/amd/display/dc/dccg/Makefile | 8 + .../amd/display/dc/dccg/dcn20/dcn20_dccg.h | 10 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.c | 187 + .../amd/display/dc/dccg/dcn60/dcn60_dccg.h | 182 + .../drm/amd/display/dc/dce/dce_clock_source.c | 28 + .../drm/amd/display/dc/dce/dce_clock_source.h | 9 + drivers/gpu/drm/amd/display/dc/dio/Makefile | 8 + .../display/dc/dio/dcn10/dcn10_link_encoder.h | 16 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 15 + .../dc/dio/dcn401/dcn401_dio_link_encoder.h | 10 + .../dc/dio/dcn60/dcn60_dio_link_encoder.c | 373 + .../dc/dio/dcn60/dcn60_dio_link_encoder.h | 43 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.c | 538 + .../dc/dio/dcn60/dcn60_dio_stream_encoder.h | 181 + drivers/gpu/drm/amd/display/dc/dm_helpers.h | 8 + .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 +- .../gpu/drm/amd/display/dc/dml2_0/Makefile | 25 + .../dml2_0/dml21/dml21_translation_helper.c | 57 +- .../amd/display/dc/dml2_0/dml21/dml21_utils.c | 129 +- .../dml21/inc/bounding_boxes/dcn5_soc_bb.h | 36 + .../dml21/inc/bounding_boxes/dcn6_soc_bb.h | 229 + .../bounding_boxes/utm_qos_model_dchub_v1.h | 109 + .../bounding_boxes/utm_qos_model_dchub_v2.h | 122 + .../bounding_boxes/utm_qos_model_dchub_v3.h | 53 + .../inc/bounding_boxes/utm_qos_model_types.h | 51 + .../dc/dml2_0/dml21/inc/dml_dmub_cmd.h | 502 + .../dml21/inc/dml_top_display_cfg_types.h | 10 + .../dml21/inc/dml_top_soc_parameter_types.h | 2 + .../dc/dml2_0/dml21/inc/dml_top_types.h | 45 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.c | 152 + .../dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6.h | 9 + .../dml21/src/dml2_cga/dml2_cga_factory.c | 38 + .../dml21/src/dml2_cga/dml2_cga_factory.h | 9 + .../dml2_core_calcs_dsc_shared_types.h | 32 + .../src/dml2_core/dml2_core_dcn4_calcs.c | 1 + .../dml2_core/dml2_core_dcn5_calcs_dchub.c | 5893 ++ .../dml2_core/dml2_core_dcn5_calcs_dchub.h | 426 + .../dml2_core_dcn5_calcs_display_pipe.c | 1029 + .../dml2_core_dcn5_calcs_display_pipe.h | 151 + .../dml2_core_dcn5_calcs_dsc_latency.c | 501 + .../dml2_core_dcn5_calcs_dsc_latency.h | 23 + .../dml2_core_dcn5_funcs_initialize.c | 78 + .../dml2_core_dcn5_funcs_initialize.h | 12 + .../dml2_core_dcn5_funcs_mode_programming.c | 1791 + .../dml2_core_dcn5_funcs_mode_programming.h | 11 + .../dml2_core_dcn5_funcs_mode_support.c | 2957 + .../dml2_core_dcn5_funcs_mode_support.h | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.c | 11 + .../src/dml2_core/dml2_core_dcn6_calcs.h | 8 + .../dml2_core/dml2_core_dcn6_calcs_dchub.c | 1951 + .../dml2_core/dml2_core_dcn6_calcs_dchub.h | 101 + .../dml2_core_dcn6_funcs_initialize.c | 165 + .../dml2_core_dcn6_funcs_initialize.h | 12 + .../dml2_core_dcn6_funcs_mode_programming.c | 1389 + .../dml2_core_dcn6_funcs_mode_programming.h | 11 + .../dml2_core_dcn6_funcs_mode_support.c | 4277 ++ .../dml2_core_dcn6_funcs_mode_support.h | 11 + .../dml21/src/dml2_core/dml2_core_factory.c | 25 + .../src/dml2_core/dml2_core_shared_types.h | 160 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn4.c | 1 - .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c | 449 + .../dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h | 19 + .../dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 12 + .../dml21/src/dml2_mcg/dml2_mcg_factory.c | 5 + .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 57 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.c | 522 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5.h | 21 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.c | 2228 + .../dml2_pmo/dml2_pmo_dcn5_stage_optimizers.h | 97 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.c | 506 + .../dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6.h | 22 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.c | 1789 + .../dml2_pmo/dml2_pmo_dcn6_stage_optimizers.h | 17 + .../dml21/src/dml2_pmo/dml2_pmo_factory.c | 34 + .../alternate_pstate_shared_lib.c | 1078 + .../alternate_pstate_shared_lib.h | 109 + .../dml21/src/dml2_top/dml2_top_interfaces.c | 7 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 394 + .../dml2_0/dml21/src/dml2_top/dml2_top_utm.h | 9 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.c | 144 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.h | 11 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.c | 405 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.h | 12 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.c | 29 + .../dml2_utm_soc_bb/dml2_utm_soc_bb_factory.h | 11 + .../src/inc/dml2_internal_shared_types.h | 485 + .../drm/amd/display/dc/dml2_0/dml2_wrapper.h | 8 + drivers/gpu/drm/amd/display/dc/dpp/Makefile | 17 + .../amd/display/dc/dpp/dcn401/dcn401_dpp.h | 41 + .../display/dc/dpp/dcn401/dcn401_dpp_dscl.c | 26 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.c | 7 +- .../drm/amd/display/dc/dpp/dcn42/dcn42_dpp.h | 6 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.c | 391 + .../drm/amd/display/dc/dpp/dcn50/dcn50_dpp.h | 86 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c | 346 + .../drm/amd/display/dc/dpp/dcn60/dcn60_dpp.h | 525 + .../amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c | 315 + drivers/gpu/drm/amd/display/dc/dsc/Makefile | 7 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.c | 447 + .../drm/amd/display/dc/dsc/dcn60/dcn60_dsc.h | 248 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 10 + .../display/dc/gpio/dcn60/hw_factory_dcn60.c | 228 + .../display/dc/gpio/dcn60/hw_factory_dcn60.h | 11 + .../dc/gpio/dcn60/hw_translate_dcn60.c | 168 + .../dc/gpio/dcn60/hw_translate_dcn60.h | 13 + .../gpu/drm/amd/display/dc/gpio/ddc_regs.h | 15 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 302 + drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.h | 28 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 4 + .../drm/amd/display/dc/gpio/hw_translate.c | 4 + .../gpu/drm/amd/display/dc/hdcp/hdcp_msg.c | 9 + drivers/gpu/drm/amd/display/dc/hpo/Makefile | 8 + .../hpo/dcn31/dcn31_hpo_dp_stream_encoder.h | 47 - .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c | 114 + .../dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h | 18 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.c | 358 + .../hpo/dcn60/dcn60_hpo_frl_stream_encoder.h | 32 + .../gpu/drm/amd/display/dc/hubbub/Makefile | 8 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 108 + .../display/dc/hubbub/dcn60/dcn60_hubbub.c | 1816 + .../display/dc/hubbub/dcn60/dcn60_hubbub.h | 207 + drivers/gpu/drm/amd/display/dc/hubp/Makefile | 16 + .../amd/display/dc/hubp/dcn20/dcn20_hubp.h | 29 + .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 201 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.h | 23 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.c | 78 +- .../amd/display/dc/hubp/dcn42/dcn42_hubp.h | 10 +- .../amd/display/dc/hubp/dcn50/dcn50_hubp.c | 532 + .../amd/display/dc/hubp/dcn50/dcn50_hubp.h | 48 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.c | 472 + .../amd/display/dc/hubp/dcn60/dcn60_hubp.h | 272 + drivers/gpu/drm/amd/display/dc/hwss/Makefile | 16 + .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 9 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c | 21 +- .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 5 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 8 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 483 +- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 7 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 1 - .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c | 488 +- .../amd/display/dc/hwss/dcn42/dcn42_hwseq.h | 6 - .../amd/display/dc/hwss/dcn42/dcn42_init.c | 2 - .../amd/display/dc/hwss/dcn50/dcn50_hwseq.c | 759 + .../amd/display/dc/hwss/dcn50/dcn50_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.c | 1164 + .../amd/display/dc/hwss/dcn60/dcn60_hwseq.h | 32 + .../amd/display/dc/hwss/dcn60/dcn60_init.c | 181 + .../amd/display/dc/hwss/dcn60/dcn60_init.h | 12 + .../drm/amd/display/dc/hwss/hw_sequencer.h | 19 +- .../display/dc/hwss/hw_sequencer_private.h | 5 - .../gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 1 + .../amd/display/dc/inc/hw/clk_mgr_internal.h | 22 + .../amd/display/dc/inc/hw/cursor_reg_cache.h | 3 +- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h | 35 +- .../drm/amd/display/dc/inc/hw/link_encoder.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 81 +- .../gpu/drm/amd/display/dc/inc/hw/transform.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 2 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 9 + .../display/dc/irq/dcn60/irq_service_dcn60.c | 417 + .../display/dc/irq/dcn60/irq_service_dcn60.h | 12 + .../drm/amd/display/dc/link/link_detection.c | 29 + .../drm/amd/display/dc/link/link_factory.c | 5 + .../amd/display/dc/link/protocols/link_ddc.c | 8 + .../display/dc/link/protocols/link_hdmi_frl.c | 23 +- drivers/gpu/drm/amd/display/dc/mpc/Makefile | 8 + .../amd/display/dc/mpc/dcn401/dcn401_mpc.c | 177 +- .../amd/display/dc/mpc/dcn401/dcn401_mpc.h | 25 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.c | 405 +- .../drm/amd/display/dc/mpc/dcn42/dcn42_mpc.h | 55 +- .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.c | 330 + .../drm/amd/display/dc/mpc/dcn60/dcn60_mpc.h | 472 + drivers/gpu/drm/amd/display/dc/opp/Makefile | 8 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.c | 25 + .../drm/amd/display/dc/opp/dcn60/dcn60_opp.h | 64 + drivers/gpu/drm/amd/display/dc/optc/Makefile | 9 + .../amd/display/dc/optc/dcn10/dcn10_optc.c | 36 +- .../amd/display/dc/optc/dcn10/dcn10_optc.h | 3 +- .../amd/display/dc/optc/dcn31/dcn31_optc.h | 4 + .../amd/display/dc/optc/dcn314/dcn314_optc.h | 1 + .../amd/display/dc/optc/dcn32/dcn32_optc.h | 2 + .../amd/display/dc/optc/dcn35/dcn35_optc.c | 26 +- .../amd/display/dc/optc/dcn401/dcn401_optc.h | 1 + .../amd/display/dc/optc/dcn42/dcn42_optc.c | 9 +- .../amd/display/dc/optc/dcn42/dcn42_optc.h | 4 + .../amd/display/dc/optc/dcn60/dcn60_optc.c | 107 + .../amd/display/dc/optc/dcn60/dcn60_optc.h | 178 + .../gpu/drm/amd/display/dc/resource/Makefile | 10 + .../dc/resource/dcn10/dcn10_resource.c | 1 + .../dc/resource/dcn20/dcn20_resource.c | 1 + .../dc/resource/dcn201/dcn201_resource.c | 1 + .../dc/resource/dcn21/dcn21_resource.c | 1 + .../dc/resource/dcn30/dcn30_resource.c | 2 + .../dc/resource/dcn301/dcn301_resource.c | 1 + .../dc/resource/dcn302/dcn302_resource.c | 2 + .../dc/resource/dcn303/dcn303_resource.c | 2 + .../dc/resource/dcn31/dcn31_resource.c | 1 + .../dc/resource/dcn314/dcn314_resource.c | 2 + .../dc/resource/dcn315/dcn315_resource.c | 6 +- .../dc/resource/dcn316/dcn316_resource.c | 5 +- .../dc/resource/dcn32/dcn32_resource.c | 2 + .../dc/resource/dcn321/dcn321_resource.c | 2 + .../dc/resource/dcn35/dcn35_resource.c | 2 + .../dc/resource/dcn351/dcn351_resource.c | 2 + .../dc/resource/dcn36/dcn36_resource.c | 2 + .../dc/resource/dcn401/dcn401_resource.c | 34 +- .../dc/resource/dcn401/dcn401_resource.h | 4 + .../dc/resource/dcn42/dcn42_resource.c | 3 + .../dc/resource/dcn42b/dcn42b_resource.c | 20 +- .../dc/resource/dcn60/dcn60_resource.c | 2377 + .../dc/resource/dcn60/dcn60_resource.h | 676 + .../display/dc/soc_and_ip_translator/Makefile | 3 + .../dcn60/dcn60_soc_and_ip_translator.c | 117 + .../dcn60/dcn60_soc_and_ip_translator.h | 16 + .../soc_and_ip_translator.c | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 5 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 229 +- drivers/gpu/drm/amd/display/dmub/src/Makefile | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c | 732 + .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h | 303 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 52 + .../gpu/drm/amd/display/include/dal_asic_id.h | 18 + .../gpu/drm/amd/display/include/dal_types.h | 1 + .../amd/display/modules/freesync/freesync.c | 8 +- .../drm/amd/display/modules/power/power_abm.c | 215 +- .../amd/display/modules/power/power_helpers.h | 9 + .../drm/amd/display/modules/power/power_psr.c | 7 + .../amd/display/modules/power/power_replay.c | 7 + .../include/asic_reg/dcn/dcn_6_0_0_offset.h | 15799 +++++ .../include/asic_reg/dcn/dcn_6_0_0_sh_mask.h | 58556 ++++++++++++++++ .../include/asic_reg/dpcs/dpcs_6_0_0_offset.h | 47 + .../asic_reg/dpcs/dpcs_6_0_0_sh_mask.h | 55 + .../asic_reg/mmhub/mmhub_5_0_1_offset.h | 17 + .../asic_reg/mmhub/mmhub_5_0_1_sh_mask.h | 17 + 286 files changed, 129427 insertions(+), 1800 deletions(-) createmode
100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dalsmc.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c
create mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.h
create mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.c
create mode 100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr_smu_msg.h
create mode 100644drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.ccreate mode
100644drivers/gpu/drm/amd/display/dc/dccg/dcn60/dcn60_dccg.hcreate
mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.c
create mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_link_encoder.h
create mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.c
create mode 100644drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn5_soc_bb. h create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/dcn6_soc_bb.
h create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v1.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_types.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/dml_dmub_cmd.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6
.c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_dcn6
.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_cga/dml2_cga_factory.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_calcs_dsc_shared_types.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_display_pipe.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dsc_latency.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_initialize.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_programming.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_funcs_mode_support.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_calcs_dchub.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_initialize.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_programming.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_dpmm/dml2_dpmm_dcn5.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5
.c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5
.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn5_stage_optimizers.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6
.c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6
.h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn6_stage_optimizers.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_librar
ies/alternate_pstate_shared_lib.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_standalone_librar
ies/alternate_pstate_shared_lib.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.
c
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.
h
create mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn5.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_dcn6.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.ccreate mode 100644drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_utm_soc_bb/dml2_utm_soc_bb_factory.hcreate mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.ccreate mode
100644drivers/gpu/drm/amd/display/dc/dpp/dcn50/dcn50_dpp.hcreate
mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.c
create mode 100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp.hcreate mode
100644drivers/gpu/drm/amd/display/dc/dpp/dcn60/dcn60_dpp_dscl.c
create mode
100644drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.ccreate
mode
100644drivers/gpu/drm/amd/display/dc/dsc/dcn60/dcn60_dsc.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.c
create mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_factory_dcn60.h
create mode 100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.ccreate
mode
100644drivers/gpu/drm/amd/display/dc/gpio/dcn60/hw_translate_dcn60.h
create mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.c
create mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_link_encoder.h
create mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.
c
create mode 100644drivers/gpu/drm/amd/display/dc/hpo/dcn60/dcn60_hpo_frl_stream_encoder.
h
create mode 100644drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.ccreate mode
100644drivers/gpu/drm/amd/display/dc/hubbub/dcn60/dcn60_hubbub.h
create mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.ccreate mode
100644drivers/gpu/drm/amd/display/dc/hubp/dcn50/dcn50_hubp.hcreate
mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.c
create mode 100644drivers/gpu/drm/amd/display/dc/hubp/dcn60/dcn60_hubp.hcreate mode
100644drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.ccreate
mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.h
create mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.ccreate mode
100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_hwseq.hcreate
mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.c
create mode 100644drivers/gpu/drm/amd/display/dc/hwss/dcn60/dcn60_init.hcreate mode
100644drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.c
create mode 100644drivers/gpu/drm/amd/display/dc/irq/dcn60/irq_service_dcn60.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.ccreate
mode
100644drivers/gpu/drm/amd/display/dc/mpc/dcn60/dcn60_mpc.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.ccreate
mode
100644drivers/gpu/drm/amd/display/dc/opp/dcn60/dcn60_opp.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.ccreate
mode
100644drivers/gpu/drm/amd/display/dc/optc/dcn60/dcn60_optc.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
create mode 100644drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.hcreate
mode
100644drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.ccreate mode 100644drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.hcreate mode 100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.ccreate mode 100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.hcreate mode 100644drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_offset.hcreate
mode
100644drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_6_0_0_sh_mask.h
create mode 100644drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_offset.h
create mode 100644drivers/gpu/drm/amd/include/asic_reg/dpcs/dpcs_6_0_0_sh_mask.hcreate
mode
100644drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_offset.h
create mode 100644drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_5_0_1_sh_mask.h--
2.34.1