DC Patches November 15, 2023
Subsystems (5)
cover DC Patches November 15, 2023
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* DCN314 fixes
* DCN32 fixes
* DCN35 fixes
* DML2 fixes
* eDP fixes
* HDR fixes
* MST fixes
* Replay fixes
* SubVP support for more configs
Alvin Lee (5):
drm/amd/display: Include udelay when waiting for INBOX0 ACK drm/amd/display: Use DRAM speed from validation for dummy p-state drm/amd/display: Increase num voltage states to 40 drm/amd/display: Enable SubVP on 1080p60 displays drm/amd/display: If P-State is supported try SubVP for smaller vlevel
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.193.0
Aric Cyr (1):
drm/amd/display: 3.2.261
Bhuvana Chandra Pinninti (1):
drm/amd/display: Refactor DSC into component folder
Camille Cho (1):
drm/amd/display: Simplify brightness initialization
Dennis Chan (2):
drm/amd/display: Add new Replay command and Disabled Replay Timing
Reysnc
drm/amd/display: Disable Timing sync check in Full-Screen Video Case
Gabe Teeger (1):
Revert "drm/amd/display: Enable CM low mem power optimization"
Ian Chen (1):
drm/amd/display: add skip_implict_edp_power_control flag for dce110
Ilya Bakoulin (1):
drm/amd/display: Fix MPCC 1DLUT programming
Max Tseng (2):
drm/amd/display: replay: generalize the send command function usage drm/amd/display: replay: Augment Frameupdate Command
Meenakshikumar Somasundaram (1):
drm/amd/display: Fix tiled display misalignment
Michael Strauss (1):
drm/amd/display: Do not read DPREFCLK spread info from LUT on DCN35
Nicholas Kazlauskas (7):
drm/amd/display: Add z-state support policy for dcn35 drm/amd/display: Update DCN35 watermarks drm/amd/display: Add Z8 watermarks for DML2 bbox overrides drm/amd/display: Feed SR and Z8 watermarks into DML2 for DCN35 drm/amd/display: Remove min_dst_y_next_start check for Z8 drm/amd/display: Update min Z8 residency time to 2100 for DCN314 drm/amd/display: Update DCN35 clock table policy
Parandhaman K (1):
drm/amd/display: Refactor OPTC into component folder
Sung Joon Kim (1):
drm/amd/display: Fix black screen on video playback with embedded
panel
Taimur Hassan (3):
drm/amd/display: Remove config update drm/amd/display: Fix conversions between bytes and KB drm/amd/display: Fix some HostVM parameters in DML
Wayne Lin (1):
drm/amd/display: adjust flow for deallocation mst payload
Wenjing Liu (3):
drm/amd/display: fix a pipe mapping error in dcn32_fpu drm/amd/display: update pixel clock params after stream slice count
change in context
drm/amd/display: always use mpc factor of 2 for stereo timings
Zhongwei (1):
drm/amd/display: force toggle rate wa for first link training for a
retimer
drivers/gpu/drm/amd/display/Makefile | 2 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 ---
.../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 53 ++++---
drivers/gpu/drm/amd/display/dc/Makefile | 2 +-
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 132 +++++++++---------
drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +
.../gpu/drm/amd/display/dc/core/dc_resource.c | 11 +-
drivers/gpu/drm/amd/display/dc/dc.h | 5 +-
drivers/gpu/drm/amd/display/dc/dc_types.h | 82 ++++++++---
.../gpu/drm/amd/display/dc/dce/dmub_replay.h | 2 +
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
.../dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 4 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 6 +-
.../gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 +-
.../display/dc/dcn32/dcn32_resource_helpers.c | 32 ++++-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 4 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 ++
drivers/gpu/drm/amd/display/dc/dm_helpers.h | 12 +-
.../gpu/drm/amd/display/dc/dml/dc_features.h | 2 +-
.../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 15 +-
.../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 78 ++++++-----
.../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 82 ++++++++++-
.../drm/amd/display/dc/dml/dcn35/dcn35_fpu.h | 2 +
.../amd/display/dc/dml2/display_mode_core.c | 18 +--
.../display/dc/dml2/dml2_dc_resource_mgmt.c | 26 ++--
.../display/dc/dml2/dml2_translation_helper.c | 60 +++++---
.../gpu/drm/amd/display/dc/dml2/dml2_utils.c | 2 +-
.../gpu/drm/amd/display/dc/dml2/dml2_utils.h | 2 +-
.../drm/amd/display/dc/dml2/dml2_wrapper.h | 2 +
drivers/gpu/drm/amd/display/dc/dsc/Makefile | 26 ++++
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.c | 0
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.h | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.c | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.h | 0
.../drm/amd/display/dc/{inc/hw => dsc}/dsc.h | 0
.../amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 +-
.../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 +-
.../gpu/drm/amd/display/dc/inc/core_types.h | 1 +
drivers/gpu/drm/amd/display/dc/inc/link.h | 3 +
.../drm/amd/display/dc/link/link_detection.c | 2 +-
.../gpu/drm/amd/display/dc/link/link_dpms.c | 108 ++------------
.../drm/amd/display/dc/link/link_factory.c | 1 +
.../link_dp_training_fixed_vs_pe_retimer.c | 6 +-
.../link/protocols/link_edp_panel_control.c | 46 ++++--
.../link/protocols/link_edp_panel_control.h | 4 +-
drivers/gpu/drm/amd/display/dc/optc/Makefile | 108 ++++++++++++++
.../display/dc/{ => optc}/dcn10/dcn10_optc.c | 0
.../display/dc/{ => optc}/dcn10/dcn10_optc.h | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.c | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.h | 2 +-
.../dc/{ => optc}/dcn201/dcn201_optc.c | 0
.../dc/{ => optc}/dcn201/dcn201_optc.h | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.c | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.h | 0
.../dc/{ => optc}/dcn301/dcn301_optc.c | 0
.../dc/{ => optc}/dcn301/dcn301_optc.h | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.c | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.h | 0
.../dc/{ => optc}/dcn314/dcn314_optc.c | 0
.../dc/{ => optc}/dcn314/dcn314_optc.h | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.c | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.h | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.c | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.h | 0
.../dc/resource/dcn20/dcn20_resource.c | 16 ++-
.../dc/resource/dcn20/dcn20_resource.h | 1 +
.../dc/resource/dcn314/dcn314_resource.c | 2 +-
.../dc/resource/dcn32/dcn32_resource.c | 1 +
.../dc/resource/dcn32/dcn32_resource.h | 10 ++
.../dc/resource/dcn321/dcn321_resource.c | 1 +
.../dc/resource/dcn35/dcn35_resource.c | 11 +-
.../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 80 ++++++++++-
.../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 +
79 files changed, 742 insertions(+), 391 deletions(-)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{inc/hw => dsc}/dsc.h (100%)
create mode 100644 drivers/gpu/drm/amd/display/dc/optc/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.h (99%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.h (100%)Signature · 1 line
2.42.0
PATCH 1/35 drm/amd/display: Add new Replay command and Disabled Replay Timing Reysnc
From: Dennis Chan <[email protected]>
[why]
To support dynamic switching for Replay timing sync mechanism.
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 10 ++++++++ .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/link.h | 3 +++ .../drm/amd/display/dc/link/link_factory.c | 1 + .../link/protocols/link_edp_panel_control.c | 24 +++++++++++++++++++ .../link/protocols/link_edp_panel_control.h | 3 +++ 6 files changed, 44 insertions(+)
drivers/gpu/drm/amd/display/dc/dc_types.h +10 -0
@@ -1022,6 +1022,16 @@ enum replay_coasting_vtotal_type { PR_COASTING_TYPE_NUM, }; +/* +* This is general Interface for Replay to +* set an 32 bit variable to dmub +* The Message_type indicates which variable +* passed to DMUB. +*/ +enum replay_FW_Message_type { + Replay_Set_Timing_Sync_Supported, +}; +union replay_error_status {struct {unsigned char STATE_TRANSITION_ERROR :1 ;
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +3 -0
@@ -45,6 +45,9 @@ struct dmub_replay_funcs { struct replay_context *replay_context, uint8_t panel_inst);void (*replay_set_power_opt)(struct dmub_replay *dmub,unsigned int power_opt,uint8_t panel_inst); +void (*replay_send_cmd)(struct dmub_replay *dmub, +enum replay_FW_Message_type msg,unsigned int panel_inst, +uint32_t cmd_data);void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub,uint16_t coasting_vtotal,uint8_t panel_inst); void (*replay_residency)(struct dmub_replay *dmub,
drivers/gpu/drm/amd/display/dc/inc/link.h +3 -0
@@ -281,6 +281,9 @@ struct link_service { const unsigned int *power_opts);bool (*edp_setup_replay)(struct dc_link *link,const struct dc_stream_state *stream); +bool (*edp_send_replay_cmd)(struct dc_link *link, +enum replay_FW_Message_type msg, +uint32_t params);bool (*edp_set_coasting_vtotal)(struct dc_link *link,uint16_t coasting_vtotal); bool (*edp_replay_residency)(const struct dc_link *link,
drivers/gpu/drm/amd/display/dc/link/link_factory.c +1 -0
@@ -213,6 +213,7 @@ static void construct_link_service_edp_panel_control(struct link_service *link_s link_srv->edp_get_replay_state = edp_get_replay_state; link_srv->edp_set_replay_allow_active = edp_set_replay_allow_active; link_srv->edp_setup_replay = edp_setup_replay; + link_srv->edp_send_replay_cmd = edp_send_replay_cmd; link_srv->edp_set_coasting_vtotal = edp_set_coasting_vtotal; link_srv->edp_replay_residency = edp_replay_residency;
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +24 -0
@@ -1007,6 +1007,30 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *streamreturn true; } +/* +* This is general Interface for Replay to set an 32 bit variable to dmub +* replay_FW_Message_type: Indicates which instruction or variable pass to DMUB +* cmd_data: Value of the config. +*/ +bool edp_send_replay_cmd (struct dc_link *link, +enum replay_FW_Message_type msg, +uint32_t cmd_data) +{ +struct dc *dc = link->ctx->dc; +struct dmub_replay *replay = dc->res_pool->replay; +unsigned int panel_inst; + +if (!replay) +return false; + +if (!dc_get_edp_link_panel_inst (dc, link, &panel_inst)) +return false; + + replay->funcs->replay_send_cmd (replay, msg, cmd_data, panel_inst); + +return true; +} +bool edp_set_coasting_vtotal (struct dc_link *link,uint16_t coasting_vtotal) {struct dc *dc = link->ctx->dc;
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.h +3 -0
@@ -57,6 +57,9 @@ bool edp_set_replay_allow_active(struct dc_link *dc_link, const bool *enable, bool wait, bool force_static, const unsigned int *power_opts);bool edp_setup_replay (struct dc_link *link,const struct dc_stream_state *stream); +bool edp_send_replay_cmd (struct dc_link *link, +enum replay_FW_Message_type msg, +uint32_t params);bool edp_set_coasting_vtotal (struct dc_link *link,uint16_t coasting_vtotal);bool edp_replay_residency (const struct dc_link *link,unsigned int *residency,const bool is_start,const bool is_alpm);
Signature · 1 line
2.42.0
PATCH 2/35 drm/amd/display: Include udelay when waiting for INBOX0 ACK
In reply to Hamza MahfoozFrom: Alvin Lee <[email protected]>
When waiting for the ACK for INBOX0 message, we have to ensure to include the udelay for proper wait time
--- drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +1 -0
@@ -1077,6 +1077,7 @@ enum dmub_status dmub_srv_wait_for_inbox0_ack(struct dmub_srv *dmub, uint32_t ti ack = dmub->hw_funcs.read_inbox0_ack_register (dmub);if (ack)return DMUB_STATUS_OK ; +udelay (1 ); }return DMUB_STATUS_TIMEOUT ; }
Signature · 1 line
2.42.0
PATCH 3/35 drm/amd/display: Add z-state support policy for dcn35
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
DML2 means that the dcn3x policy for calculating z-state support no longer runs from validate_bandwidth.
This means we are unconditionally allowing Z8, the hardware default.
[How]
Port the policy over to DCN35, but with a few modifications:
- Don't use min_dst_y_next_start as a check for Z8/Z10 allow
- Add support for overriding the Z10 stutter period per ASIC
- Cleanup the code to make the policy assignment more clear
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 34 +++++++++++++++++++ .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.h | 2 ++ .../dc/resource/dcn35/dcn35_resource.c | 7 ++++ 4 files changed, 44 insertions(+)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -874,6 +874,7 @@ struct dc_debug_options {unsigned int seamless_boot_odm_combine;unsigned int force_odm_combine_4to1;//bit vector based on otg inst int minimum_z8_residency_time; +int minimum_z10_residency_time;bool disable_z9_mpc;unsigned int force_fclk_khz;bool enable_tri_buf;
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +34 -0
@@ -507,3 +507,37 @@ int dcn35_populate_dml_pipes_from_context_fpu(struct dc *dc,return pipe_cnt; } + +void dcn35_decide_zstate_support (struct dc *dc,struct dc_state *context) +{ +enum dcn_zstate_support_state support =DCN_ZSTATE_SUPPORT_DISALLOW ; +unsigned int i, plane_count =0 ; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +if (context->res_ctx.pipe_ctx[i].plane_state) + plane_count++; + } + +if (plane_count ==0 ) { + support =DCN_ZSTATE_SUPPORT_ALLOW ; + }else if (plane_count ==1 && context->stream_count ==1 && context->streams[0 ]->signal ==SIGNAL_TYPE_EDP ) { +struct dc_link *link = context->streams[0 ]->sink->link; +bool is_pwrseq0 = link && link->link_index ==0 ; +bool is_psr1 = link && link->psr_settings.psr_version ==DC_PSR_VERSION_1 && !link->panel_config.psr.disable_psr; +int minmum_z8_residency = + dc->debug.minimum_z8_residency_time >0 ? dc->debug.minimum_z8_residency_time :1000 ; +bool allow_z8 = context->bw_ctx.dml.vba.StutterPeriod > (double )minmum_z8_residency; +int minmum_z10_residency = + dc->debug.minimum_z10_residency_time >0 ? dc->debug.minimum_z10_residency_time :5000 ; +bool allow_z10 = context->bw_ctx.dml.vba.StutterPeriod > (double )minmum_z10_residency; + +if (is_pwrseq0 && allow_z10) + support =DCN_ZSTATE_SUPPORT_ALLOW ; +else if (is_pwrseq0 && is_psr1) + support = allow_z8 ?DCN_ZSTATE_SUPPORT_ALLOW_Z8_Z10_ONLY :DCN_ZSTATE_SUPPORT_ALLOW_Z10_ONLY ; +else if (allow_z8) + support =DCN_ZSTATE_SUPPORT_ALLOW_Z8_ONLY ; + } + + context->bw_ctx.bw.dcn.clk.zstate_support = support; +}
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.h +2 -0
@@ -39,4 +39,6 @@ int dcn35_populate_dml_pipes_from_context_fpu(struct dc *dc,display_e2e_pipe_params_st *pipes, bool fast_validate); +void dcn35_decide_zstate_support (struct dc *dc,struct dc_state *context); +#endif
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +7 -0
@@ -1724,6 +1724,13 @@ static bool dcn35_validate_bandwidth(struct dc *dc, out =dml2_validate (dc, context, fast_validate); +if (fast_validate) +return out; + +DC_FP_START (); +dcn35_decide_zstate_support (dc, context); +DC_FP_END (); +return out; }
Signature · 1 line
2.42.0
PATCH 4/35 drm/amd/display: add skip_implict_edp_power_control flag for dce110
In reply to Hamza MahfoozFrom: Ian Chen <[email protected]>
If the link requests to skip implicit eDP power control, we should honor that request.
--- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -1
@@ -3114,7 +3114,8 @@ void dce110_disable_link_output(struct dc_link *link,struct dmcu *dmcu = dc->res_pool->dmcu;if (signal ==SIGNAL_TYPE_EDP && - link->dc->hwss.edp_backlight_control) + link->dc->hwss.edp_backlight_control && + !link->skip_implict_edp_power_control) link->dc->hwss.edp_backlight_control (link, false);else if (dmcu !=NULL && dmcu->funcs->lock_phy) dmcu->funcs->lock_phy (dmcu);
Signature · 1 line
2.42.0
PATCH 5/35 drm/amd/display: Update DCN35 watermarks
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why & How]
Update to the new values per HW team request. Affects both stutter and z8.
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 32 +++++++++---------- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 8 ++--- 2 files changed, 20 insertions(+), 20 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +16 -16
@@ -443,32 +443,32 @@ static struct wm_table ddr5_wm_table = { .wm_inst = WM_A, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.72, - .sr_exit_time_us = 9, - .sr_enter_plus_exit_time_us = 11, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_B, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.72, - .sr_exit_time_us = 9, - .sr_enter_plus_exit_time_us = 11, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_C, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.72, - .sr_exit_time_us = 9, - .sr_enter_plus_exit_time_us = 11, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_D, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.72, - .sr_exit_time_us = 9, - .sr_enter_plus_exit_time_us = 11, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, }
@@ -480,32 +480,32 @@ static struct wm_table lpddr5_wm_table = { .wm_inst = WM_A, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.65333, - .sr_exit_time_us = 11.5, - .sr_enter_plus_exit_time_us = 14.5, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_B, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.65333, - .sr_exit_time_us = 11.5, - .sr_enter_plus_exit_time_us = 14.5, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_C, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.65333, - .sr_exit_time_us = 11.5, - .sr_enter_plus_exit_time_us = 14.5, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, { .wm_inst = WM_D, .wm_type = WM_TYPE_PSTATE_CHG, .pstate_latency_us = 11.65333, - .sr_exit_time_us = 11.5, - .sr_enter_plus_exit_time_us = 14.5, + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, .valid = true, }, }
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +4 -4
@@ -164,10 +164,10 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = { }, }, .num_states = 5, - .sr_exit_time_us = 9.0, - .sr_enter_plus_exit_time_us = 11.0, - .sr_exit_z8_time_us = 50.0, /*changed from 442.0*/ - .sr_enter_plus_exit_z8_time_us = 50.0,/*changed from 560.0*/ + .sr_exit_time_us = 14.0, + .sr_enter_plus_exit_time_us = 16.0, + .sr_exit_z8_time_us = 525.0, + .sr_enter_plus_exit_z8_time_us = 715.0, .fclk_change_latency_us = 20.0, .usr_retraining_latency_us = 2, .writeback_latency_us = 12.0,
Signature · 1 line
2.42.0
PATCH 6/35 drm/amd/display: fix a pipe mapping error in dcn32_fpu
In reply to Hamza MahfoozFrom: Wenjing Liu <[email protected]>
[why]
In dcn32 DML pipes are ordered the same as dc pipes but only for used pipes. For example, if dc pipe 1 and 2 are used, their dml pipe indices would be 0 and 1 respectively. However update_pipe_slice_table_with_split_flags doesn't skip indices for free pipes. This causes us to not reference correct dml pipe output when building pipe topology.
[how]
Use two variables to iterate dc and dml pipes respectively and only increment dml pipe index when current dc pipe is not free.
--- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +12 -8
@@ -1192,13 +1192,16 @@ static bool update_pipe_slice_table_with_split_flags(*/ struct pipe_ctx *pipe;bool odm; -int i; +int dc_pipe_idx, dml_pipe_idx =0 ;bool updated = false; -for (i =0 ; i < dc->res_pool->pipe_count; i++) { - pipe = &context->res_ctx.pipe_ctx[i]; +for (dc_pipe_idx =0 ; + dc_pipe_idx < dc->res_pool->pipe_count; dc_pipe_idx++) { + pipe = &context->res_ctx.pipe_ctx[dc_pipe_idx]; +if (resource_is_pipe_type (pipe,FREE_PIPE )) +continue ; -if (merge[i]) { +if (merge[dc_pipe_idx]) {if (resource_is_pipe_type (pipe,OPP_HEAD ))/* merging OPP head means reducing ODM slice * count by 1
@@ -1213,17 +1216,18 @@ static bool update_pipe_slice_table_with_split_flags( updated = true; } -if (split[i]) { - odm = vba->ODMCombineEnabled[vba->pipe_plane[i]] != +if (split[dc_pipe_idx]) { + odm = vba->ODMCombineEnabled[vba->pipe_plane[dml_pipe_idx]] != dm_odm_combine_mode_disabled;if (odm &&resource_is_pipe_type (pipe,OPP_HEAD ))update_slice_table_for_stream ( - table, pipe->stream, split[i] -1 ); + table, pipe->stream, split[dc_pipe_idx] -1 );else if (!odm &&resource_is_pipe_type (pipe,DPP_PIPE ))update_slice_table_for_plane (table, pipe, - pipe->plane_state, split[i] -1 ); + pipe->plane_state, split[dc_pipe_idx] -1 ); updated = true; } + dml_pipe_idx++; }return updated; }
Signature · 1 line
2.42.0
PATCH 7/35 drm/amd/display: update pixel clock params after stream slice count change in context
In reply to Hamza MahfoozFrom: Wenjing Liu <[email protected]>
[why]
When ODM slice count is changed, otg master pipe's pixel clock params is no longer valid as the value is dependent on ODM slice count.
--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 9 ++++++--- .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 6 +----- drivers/gpu/drm/amd/display/dc/inc/core_types.h | 1 + .../display/dc/resource/dcn20/dcn20_resource.c | 16 ++++++++++------ .../display/dc/resource/dcn20/dcn20_resource.h | 1 + .../display/dc/resource/dcn32/dcn32_resource.c | 1 + .../display/dc/resource/dcn321/dcn321_resource.c | 1 + 7 files changed, 21 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +6 -3
@@ -2256,7 +2256,7 @@ static struct pipe_ctx *get_last_dpp_pipe_in_mpcc_combine( }static bool update_pipe_params_after_odm_slice_count_change ( -const struct dc_stream_state *stream, +struct pipe_ctx *otg_master,struct dc_state *context,const struct resource_pool *pool) {
@@ -2266,9 +2266,12 @@ static bool update_pipe_params_after_odm_slice_count_change(for (i =0 ; i < pool->pipe_count && result; i++) { pipe = &context->res_ctx.pipe_ctx[i]; -if (pipe->stream == stream && pipe->plane_state) +if (pipe->stream == otg_master->stream && pipe->plane_state) result =resource_build_scaling_params (pipe); } + +if (pool->funcs->build_pipe_pix_clk_params) + pool->funcs->build_pipe_pix_clk_params (otg_master);return result; }
@@ -2951,7 +2954,7 @@ bool resource_update_pipes_for_stream_with_slice_count( otg_master, new_ctx, pool);if (result) result =update_pipe_params_after_odm_slice_count_change ( - otg_master->stream, new_ctx, pool); + otg_master, new_ctx, pool);return result; }
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +1 -5
@@ -1237,15 +1237,11 @@ static void update_pipes_with_slice_table(struct dc *dc, struct dc_state *contex {int i; -for (i =0 ; i < table->odm_combine_count; i++) { +for (i =0 ; i < table->odm_combine_count; i++)resource_update_pipes_for_stream_with_slice_count (context, dc->current_state, dc->res_pool, table->odm_combines[i].stream, table->odm_combines[i].slice_count); -/* TODO: move this into the function above */ -dcn20_build_mapped_resource (dc, context, - table->odm_combines[i].stream); - }for (i =0 ; i < table->mpc_combine_count; i++) resource_update_pipes_for_plane_with_slice_count(context,
drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 -0
@@ -205,6 +205,7 @@ struct resource_funcs {void (*get_panel_config_defaults)(struct dc_panel_config *panel_config);void (*save_mall_state)(struct dc *dc,struct dc_state *context,struct mall_temp_config *temp_config);void (*restore_mall_state)(struct dc *dc,struct dc_state *context,struct mall_temp_config *temp_config); +void (*build_pipe_pix_clk_params)(struct pipe_ctx *pipe_ctx); };struct audio_support {
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +10 -6
@@ -1273,15 +1273,19 @@ static void build_clamping_params(struct dc_stream_state *stream) stream->clamping.pixel_encoding = stream->timing.pixel_encoding; } -static enum dc_status build_pipe_hw_param (struct pipe_ctx *pipe_ctx) +void dcn20_build_pipe_pix_clk_params (struct pipe_ctx *pipe_ctx) { -get_pixel_clock_parameters (pipe_ctx, &pipe_ctx->stream_res.pix_clk_params); - pipe_ctx->clock_source->funcs->get_pix_clk_dividers ( - pipe_ctx->clock_source, - &pipe_ctx->stream_res.pix_clk_params, - &pipe_ctx->pll_settings); + pipe_ctx->clock_source, + &pipe_ctx->stream_res.pix_clk_params, + &pipe_ctx->pll_settings); +} + +static enum dc_status build_pipe_hw_param (struct pipe_ctx *pipe_ctx) +{ + +dcn20_build_pipe_pix_clk_params (pipe_ctx); pipe_ctx->stream->clamping.pixel_encoding = pipe_ctx->stream->timing.pixel_encoding;
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.h +1 -0
@@ -165,6 +165,7 @@ enum dc_status dcn20_add_stream_to_ctx(struct dc *dc, struct dc_state *new_ctx,enum dc_status dcn20_add_dsc_to_stream_resource (struct dc *dc,struct dc_state *dc_ctx,struct dc_stream_state *dc_stream);enum dc_status dcn20_remove_stream_from_ctx (struct dc *dc,struct dc_state *new_ctx,struct dc_stream_state *dc_stream);enum dc_status dcn20_patch_unknown_plane_state (struct dc_plane_state *plane_state); +void dcn20_build_pipe_pix_clk_params (struct pipe_ctx *pipe_ctx);#endif /* __DC_RESOURCE_DCN20_H__ */
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -0
@@ -2041,6 +2041,7 @@ static struct resource_funcs dcn32_res_pool_funcs = { .retain_phantom_pipes = dcn32_retain_phantom_pipes, .save_mall_state = dcn32_save_mall_state, .restore_mall_state = dcn32_restore_mall_state, + .build_pipe_pix_clk_params = dcn20_build_pipe_pix_clk_params, };static uint32_t read_pipe_fuses (struct dc_context *ctx)
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +1 -0
@@ -1609,6 +1609,7 @@ static struct resource_funcs dcn321_res_pool_funcs = { .retain_phantom_pipes = dcn32_retain_phantom_pipes, .save_mall_state = dcn32_save_mall_state, .restore_mall_state = dcn32_restore_mall_state, + .build_pipe_pix_clk_params = dcn20_build_pipe_pix_clk_params, };static uint32_t read_pipe_fuses (struct dc_context *ctx)
Signature · 1 line
2.42.0
PATCH 8/35 drm/amd/display: always use mpc factor of 2 for stereo timings
In reply to Hamza MahfoozFrom: Wenjing Liu <[email protected]>
[why]
In the new pipe resource management logic, the special handling for stereo timings is missing.
This commit implements the same stereo timings handling as old pipe resource management code.
--- .../display/dc/dml2/dml2_dc_resource_mgmt.c | 26 +++++++++++++------ .../gpu/drm/amd/display/dc/dml2/dml2_utils.c | 2 +- .../gpu/drm/amd/display/dc/dml2/dml2_utils.h | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c +18 -8
@@ -772,18 +772,29 @@ static unsigned int get_mpc_factor(struct dml2_context *ctx,const struct dc_state *state, const struct dml_display_cfg_st *disp_cfg, struct dml2_dml_to_dc_pipe_mapping *mapping, - const struct dc_stream_status *status, unsigned int stream_id, + const struct dc_stream_status *status, + const struct dc_stream_state *stream, int plane_idx) { unsigned int plane_id;unsigned int cfg_idx; +unsigned int mpc_factor; -get_plane_id (ctx, state, status->plane_states[plane_idx], stream_id, plane_idx, &plane_id); +get_plane_id (ctx, state, status->plane_states[plane_idx], + stream->stream_id, plane_idx, &plane_id); cfg_idx =find_disp_cfg_idx_by_plane_id (mapping, plane_id); -if (ctx->architecture == dml2_architecture_20) -return (unsigned int )disp_cfg->hw.DPPPerSurface[cfg_idx]; -ASSERT (false); -return 1 ; +if (ctx->architecture == dml2_architecture_20) { + mpc_factor = (unsigned int )disp_cfg->hw.DPPPerSurface[cfg_idx]; + }else { + mpc_factor =1 ; +ASSERT (false); + } + +/* For stereo timings, we need to pipe split */ +if (dml2_is_stereo_timing (stream)) + mpc_factor =2 ; + +return mpc_factor; } static unsigned int get_odm_factor(
@@ -820,14 +831,13 @@ static void populate_mpc_factors_for_stream( unsigned int mpc_factors[MAX_PIPES]) {const struct dc_stream_status *status = &state->stream_status[stream_idx]; -unsigned int stream_id = state->streams[stream_idx]->stream_id;int i;for (i =0 ; i < status->plane_count; i++)if (odm_factor ==1 ) mpc_factors[i] =get_mpc_factor ( ctx, state, disp_cfg, mapping, status, - stream_id, i); + state->streams[stream_idx], i);else mpc_factors[i] =1 ; }
drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c +1 -1
@@ -468,7 +468,7 @@ bool dml2_verify_det_buffer_configuration(struct dml2_context *in_ctx, struct dcreturn need_recalculation; } -bool dml2_is_stereo_timing (struct dc_stream_state *stream) +bool dml2_is_stereo_timing (const struct dc_stream_state *stream) {bool is_stereo = false;
drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.h +1 -1
@@ -42,7 +42,7 @@ void dml2_copy_clocks_to_dc_state(struct dml2_dcn_clocks *out_clks, struct dc_stvoid dml2_extract_watermark_set (struct dcn_watermarks *watermark,struct display_mode_lib_st *dml_core_ctx);int dml2_helper_find_dml_pipe_idx_by_stream_id (struct dml2_context *ctx,unsigned int stream_id);bool is_dtbclk_required (const struct dc *dc,struct dc_state *context); -bool dml2_is_stereo_timing (struct dc_stream_state *stream); +bool dml2_is_stereo_timing (const struct dc_stream_state *stream);/* * dml2_dc_construct_pipes - This function will determine if we need additional pipes based
Signature · 1 line
2.42.0
PATCH 9/35 drm/amd/display: Add Z8 watermarks for DML2 bbox overrides
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
We can override SR watermarks but not Z8 ones.
[How]
Add new parameters for Z8 matching the SR ones and feed them into the states.
These also weren't being applied to every state, so make sure that we loop over and update all SOC states if given an override.
--- .../display/dc/dml2/dml2_translation_helper.c | 47 +++++++++++++------ .../drm/amd/display/dc/dml2/dml2_wrapper.h | 2 + 2 files changed, 34 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +32 -15
@@ -341,25 +341,42 @@ void dml2_init_soc_states(struct dml2_context *dml2, const struct dc *in_dc,break ; } -/* Override from passed values, mainly for debugging purposes, if available */ -if (dml2->config.bbox_overrides.sr_exit_latency_us) { - p->in_states->state_array[0 ].sr_exit_time_us = dml2->config.bbox_overrides.sr_exit_latency_us; - } +/* Override from passed values, if available */ +for (i =0 ; i < p->in_states->num_states; i++) { +if (dml2->config.bbox_overrides.sr_exit_latency_us) { + p->in_states->state_array[i].sr_exit_time_us = + dml2->config.bbox_overrides.sr_exit_latency_us; + } -if (dml2->config.bbox_overrides.sr_enter_plus_exit_latency_us) { - p->in_states->state_array[0 ].sr_enter_plus_exit_time_us = dml2->config.bbox_overrides.sr_enter_plus_exit_latency_us; - } +if (dml2->config.bbox_overrides.sr_enter_plus_exit_latency_us) { + p->in_states->state_array[i].sr_enter_plus_exit_time_us = + dml2->config.bbox_overrides.sr_enter_plus_exit_latency_us; + } -if (dml2->config.bbox_overrides.urgent_latency_us) { - p->in_states->state_array[0 ].urgent_latency_pixel_data_only_us = dml2->config.bbox_overrides.urgent_latency_us; - } +if (dml2->config.bbox_overrides.sr_exit_z8_time_us) { + p->in_states->state_array[i].sr_exit_z8_time_us = + dml2->config.bbox_overrides.sr_exit_z8_time_us; + } -if (dml2->config.bbox_overrides.dram_clock_change_latency_us) { - p->in_states->state_array[0 ].dram_clock_change_latency_us = dml2->config.bbox_overrides.dram_clock_change_latency_us; - } +if (dml2->config.bbox_overrides.sr_enter_plus_exit_z8_time_us) { + p->in_states->state_array[i].sr_enter_plus_exit_z8_time_us = + dml2->config.bbox_overrides.sr_enter_plus_exit_z8_time_us; + } + +if (dml2->config.bbox_overrides.urgent_latency_us) { + p->in_states->state_array[i].urgent_latency_pixel_data_only_us = + dml2->config.bbox_overrides.urgent_latency_us; + } -if (dml2->config.bbox_overrides.fclk_change_latency_us) { - p->in_states->state_array[0 ].fclk_change_latency_us = dml2->config.bbox_overrides.fclk_change_latency_us; +if (dml2->config.bbox_overrides.dram_clock_change_latency_us) { + p->in_states->state_array[i].dram_clock_change_latency_us = + dml2->config.bbox_overrides.dram_clock_change_latency_us; + } + +if (dml2->config.bbox_overrides.fclk_change_latency_us) { + p->in_states->state_array[i].fclk_change_latency_us = + dml2->config.bbox_overrides.fclk_change_latency_us; + } }/* DCFCLK stas values are project specific */
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h +2 -0
@@ -139,6 +139,8 @@ struct dml2_soc_bbox_overrides {double urgent_latency_us;double sr_exit_latency_us;double sr_enter_plus_exit_latency_us; +double sr_exit_z8_time_us; +double sr_enter_plus_exit_z8_time_us;double dram_clock_change_latency_us;double fclk_change_latency_us;unsigned int dram_num_chan;
Signature · 1 line
2.42.0
PATCH 10/35 drm/amd/display: Feed SR and Z8 watermarks into DML2 for DCN35
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
We've updated the table but the values aren't being reflected in DML2 calculation.
[How]
Pass them into the bbox overrides.
--- drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +9 -0
@@ -329,6 +329,15 @@ void dcn35_update_bw_bounding_box_fpu(struct dc *dc,/*temp till dml2 fully work without dml1*/ dml_init_instance (&dc->dml, &dcn3_5_soc, &dcn3_5_ip,DML_PROJECT_DCN31 ); + +/* Update latency values */ + dc->dml2_options.bbox_overrides.dram_clock_change_latency_us = dcn3_5_soc.dram_clock_change_latency_us; + + dc->dml2_options.bbox_overrides.sr_exit_latency_us = dcn3_5_soc.sr_exit_time_us; + dc->dml2_options.bbox_overrides.sr_enter_plus_exit_latency_us = dcn3_5_soc.sr_enter_plus_exit_time_us; + + dc->dml2_options.bbox_overrides.sr_exit_z8_time_us = dcn3_5_soc.sr_exit_z8_time_us; + dc->dml2_options.bbox_overrides.sr_enter_plus_exit_z8_time_us = dcn3_5_soc.sr_enter_plus_exit_z8_time_us; }static bool is_dual_plane (enum surface_pixel_format format)
Signature · 1 line
2.42.0
PATCH 11/35 drm/amd/display: Fix MPCC 1DLUT programming
In reply to Hamza MahfoozFrom: Ilya Bakoulin <[email protected]>
[Why]
Wrong function is used to translate LUT values to HW format, leading to visible artifacting in some cases.
[How]
Use the correct cm3_helper function.
--- drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +2 -4
@@ -487,8 +487,7 @@ bool dcn32_set_mcm_luts(if (plane_state->blend_tf->type ==TF_TYPE_HWPWL ) lut_params = &plane_state->blend_tf->pwl;else if (plane_state->blend_tf->type ==TF_TYPE_DISTRIBUTED_POINTS ) { -cm_helper_translate_curve_to_hw_format (plane_state->ctx, - plane_state->blend_tf, +cm3_helper_translate_curve_to_hw_format (plane_state->blend_tf, &dpp_base->regamma_params, false); lut_params = &dpp_base->regamma_params; }
@@ -503,8 +502,7 @@ bool dcn32_set_mcm_luts(else if (plane_state->in_shaper_func->type ==TF_TYPE_DISTRIBUTED_POINTS ) {// TODO: dpp_base replace ASSERT (false); -cm_helper_translate_curve_to_hw_format (plane_state->ctx, - plane_state->in_shaper_func, +cm3_helper_translate_curve_to_hw_format (plane_state->in_shaper_func, &dpp_base->shaper_params, true); lut_params = &dpp_base->shaper_params; }
Signature · 1 line
2.42.0
PATCH 12/35 drm/amd/display: Use DRAM speed from validation for dummy p-state
In reply to Hamza MahfoozFrom: Alvin Lee <[email protected]>
[Description]
When choosing which dummy p-state latency to use, we need to use the DRAM speed from validation. The DRAMSpeed DML variable can change because we use different input params to DML when populating watermarks set B.
--- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +2 -1
@@ -2231,6 +2231,7 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context,int i, pipe_idx, vlevel_temp =0 ;double dcfclk = dcn3_2_soc.clock_limits[0 ].dcfclk_mhz;double dcfclk_from_validation = context->bw_ctx.dml.vba.DCFCLKState[vlevel][context->bw_ctx.dml.vba.maxMpcComb]; +double dram_speed_from_validation = context->bw_ctx.dml.vba.DRAMSpeed;double dcfclk_from_fw_based_mclk_switching = dcfclk_from_validation;bool pstate_en = context->bw_ctx.dml.vba.DRAMClockChangeSupport[vlevel][context->bw_ctx.dml.vba.maxMpcComb] != dm_dram_clock_change_unsupported;
@@ -2418,7 +2419,7 @@ void dcn32_calculate_wm_and_dlg_fpu(struct dc *dc, struct dc_state *context, }if (dc->clk_mgr->bw_params->wm_table.nv_entries[WM_C ].valid) { - min_dram_speed_mts = context->bw_ctx.dml.vba.DRAMSpeed; + min_dram_speed_mts = dram_speed_from_validation; min_dram_speed_mts_margin =160 ; context->bw_ctx.dml.soc.dram_clock_change_latency_us =
Signature · 1 line
2.42.0
PATCH 13/35 drm/amd/display: Refactor DSC into component folder
In reply to Hamza MahfoozFrom: Bhuvana Chandra Pinninti <[email protected]>
[why]
To refactor DSC and make DSC files unit testable.
[how]
moved the dcnxx_dsc.c and .h files
into corresponding dcn folders inside the dsc and cleared the linkage errors.
---
drivers/gpu/drm/amd/display/Makefile | 1 +
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 2 --
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dsc/Makefile | 26 +++++++++++++++++++
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.c | 0
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.h | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.c | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.h | 0
.../drm/amd/display/dc/{inc/hw => dsc}/dsc.h | 0
9 files changed, 28 insertions(+), 3 deletions(-)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{inc/hw => dsc}/dsc.h (100%)drivers/gpu/drm/amd/display/Makefile +1 -0
@@ -31,6 +31,7 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/hwss subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/resource +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dsc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/inc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color
drivers/gpu/drm/amd/display/dc/dcn20/Makefile +0 -2
@@ -7,8 +7,6 @@ DCN20 = dcn20_init.o dcn20_dpp.o dcn20_dpp_cm.o dcn20_hubp.o \ dcn20_stream_encoder.o dcn20_link_encoder.o dcn20_dccg.o \ dcn20_vmid.o dcn20_dwb.o dcn20_dwb_scl.o -DCN20 += dcn20_dsc.o - AMD_DAL_DCN20 = $(addprefix $(AMDDALPATH)/dc/dcn20/,$(DCN20)) AMD_DISPLAY_FILES += $(AMD_DAL_DCN20)
drivers/gpu/drm/amd/display/dc/dcn35/Makefile +1 -1
@@ -12,7 +12,7 @@ DCN35 = dcn35_init.o dcn35_dio_stream_encoder.o \ dcn35_dio_link_encoder.o dcn35_dccg.o dcn35_optc.o \ - dcn35_dsc.o dcn35_hubp.o dcn35_hubbub.o \ + dcn35_hubp.o dcn35_hubbub.o \ dcn35_mmhubbub.o dcn35_opp.o dcn35_dpp.o dcn35_pg_cntl.o dcn35_dwb.o AMD_DAL_DCN35 = $(addprefix $(AMDDALPATH)/dc/dcn35/,$(DCN35))
drivers/gpu/drm/amd/display/dc/dsc/Makefile +26 -0
@@ -1,8 +1,34 @@ # SPDX-License-Identifier: MIT # # Makefile for the 'dsc' sub-component of DAL. + +ifdef CONFIG_DRM_AMD_DC_FP + +############################################################################### +# DCN20 +############################################################################### +DSC_DCN20 = dcn20_dsc.o + +AMD_DISPLAY_FILES += $(addprefix $(AMDDALPATH)/dc/dsc/dcn20/,$(DSC_DCN20)) + + + + +############################################################################### +# DCN35 +############################################################################### + +DSC_DCN35 = dcn35_dsc.o + +AMD_DISPLAY_FILES += $(addprefix $(AMDDALPATH)/dc/dsc/dcn35/,$(DSC_DCN35)) + + + +endif + DSC = dc_dsc.o rc_calc.o rc_calc_dpi.o AMD_DAL_DSC = $(addprefix $(AMDDALPATH)/dc/dsc/,$(DSC)) AMD_DISPLAY_FILES += $(AMD_DAL_DSC) +
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c +0 -0
drivers/gpu/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.h +0 -0
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dsc.c +0 -0
drivers/gpu/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.h renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dsc.h +0 -0
drivers/gpu/drm/amd/display/dc/dsc/dsc.h renamed from drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h +0 -0
Signature · 1 line
2.42.0
PATCH 14/35 drm/amd/display: replay: generalize the send command function usage
In reply to Hamza MahfoozFrom: Max Tseng <[email protected]>
Augment the function to allow send different format data in different use case.
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h | 3 +-- drivers/gpu/drm/amd/display/dc/inc/link.h | 2 +- .../display/dc/link/protocols/link_edp_panel_control.c | 4 ++-- .../display/dc/link/protocols/link_edp_panel_control.h | 2 +- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 10 ++++++++++ 6 files changed, 16 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -0
@@ -1029,6 +1029,7 @@ enum replay_coasting_vtotal_type {* passed to DMUB. */ enum replay_FW_Message_type { + Replay_Msg_Not_Support =-1 , Replay_Set_Timing_Sync_Supported, };
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +1 -2
@@ -46,8 +46,7 @@ struct dmub_replay_funcs {void (*replay_set_power_opt)(struct dmub_replay *dmub,unsigned int power_opt,uint8_t panel_inst);void (*replay_send_cmd)(struct dmub_replay *dmub, -enum replay_FW_Message_type msg,unsigned int panel_inst, -uint32_t cmd_data); +enum replay_FW_Message_type msg,unsigned int panel_inst,union dmub_replay_cmd_set *cmd_element);void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub,uint16_t coasting_vtotal,uint8_t panel_inst); void (*replay_residency)(struct dmub_replay *dmub,
drivers/gpu/drm/amd/display/dc/inc/link.h +1 -1
@@ -283,7 +283,7 @@ struct link_service { const struct dc_stream_state *stream);bool (*edp_send_replay_cmd)(struct dc_link *link,enum replay_FW_Message_type msg, -uint32_t params); +union dmub_replay_cmd_set *cmd_data);bool (*edp_set_coasting_vtotal)(struct dc_link *link,uint16_t coasting_vtotal); bool (*edp_replay_residency)(const struct dc_link *link,
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +2 -2
@@ -1014,7 +1014,7 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream*/ bool edp_send_replay_cmd (struct dc_link *link,enum replay_FW_Message_type msg, -uint32_t cmd_data) +union dmub_replay_cmd_set *cmd_data) {struct dc *dc = link->ctx->dc;struct dmub_replay *replay = dc->res_pool->replay;
@@ -1026,7 +1026,7 @@ bool edp_send_replay_cmd(struct dc_link *link,if (!dc_get_edp_link_panel_inst (dc, link, &panel_inst))return false; - replay->funcs->replay_send_cmd (replay, msg, cmd_data, panel_inst); + replay->funcs->replay_send_cmd (replay, msg, panel_inst, cmd_data);return true; }
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.h +1 -1
@@ -59,7 +59,7 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream);bool edp_send_replay_cmd (struct dc_link *link,enum replay_FW_Message_type msg, -uint32_t params); +union dmub_replay_cmd_set *cmd_data);bool edp_set_coasting_vtotal (struct dc_link *link,uint16_t coasting_vtotal);bool edp_replay_residency (const struct dc_link *link,unsigned int *residency,const bool is_start,const bool is_alpm);
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +10 -0
@@ -3143,6 +3143,16 @@ struct dmub_rb_cmd_replay_set_timing_sync {struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data; }; +/** +* Definition union of replay command set +*/ +union dmub_replay_cmd_set { +/** +* Definition of DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED command data. +*/ +struct dmub_cmd_replay_set_timing_sync_data sync_data; +}; +/** * Set of HW components that can be locked. *
Signature · 1 line
2.42.0
PATCH 15/35 drm/amd/display: Do not read DPREFCLK spread info from LUT on DCN35
In reply to Hamza MahfoozFrom: Michael Strauss <[email protected]>
[WHY]
Currently DCN35 does not spread DPREFCLK
[HOW]
Remove hardcoded table with nonzero caps
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 22 ------------------- 1 file changed, 22 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +0 -22
@@ -515,11 +515,6 @@ static DpmClocks_t_dcn35 dummy_clocks;static struct dcn35_watermarks dummy_wms = {0 }; -static struct dcn35_ss_info_table ss_info_table = { - .ss_divider =1000 , - .ss_percentage = {0 ,0 ,375 ,375 ,375 } -}; -static void dcn35_build_watermark_ranges (struct clk_bw_params *bw_params,struct dcn35_watermarks *table) {int i, num_valid_sets;
@@ -965,21 +960,6 @@ struct clk_mgr_funcs dcn35_fpga_funcs = { .get_dtb_ref_clk_frequency = dcn31_get_dtb_ref_freq_khz, }; -static void dcn35_read_ss_info_from_lut (struct clk_mgr_internal *clk_mgr) -{ -uint32_t clock_source; -struct dc_context *ctx = clk_mgr->base.ctx; - -REG_GET (CLK1_CLK2_BYPASS_CNTL ,CLK2_BYPASS_SEL , &clock_source); - - clk_mgr->dprefclk_ss_percentage = ss_info_table.ss_percentage[clock_source]; - -if (clk_mgr->dprefclk_ss_percentage !=0 ) { - clk_mgr->ss_on_dprefclk = true; - clk_mgr->dprefclk_ss_divider = ss_info_table.ss_divider; - } -} - void dcn35_clk_mgr_construct( struct dc_context *ctx, struct clk_mgr_dcn35 *clk_mgr,
@@ -1052,8 +1032,6 @@ void dcn35_clk_mgr_construct(dce_clock_read_ss_info (&clk_mgr->base);/*when clk src is from FCH, it could have ss, same clock src as DPREF clk*/ -dcn35_read_ss_info_from_lut (&clk_mgr->base); - clk_mgr->base.base.bw_params = &dcn35_bw_params;if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
Signature · 1 line
2.42.0
PATCH 16/35 drm/amd/display: Increase num voltage states to 40
In reply to Hamza MahfoozFrom: Alvin Lee <[email protected]>
[Description]
If during driver init stage there are greater than 20 intermediary voltage states while constructing the SOC BB we could hit issues because we will index outside of the clock_limits array and start overwriting data. Increase the total number of states to 40 to avoid this issue.
--- drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dc_features.h +1 -1
@@ -36,7 +36,7 @@* Define the maximum amount of states supported by the ASIC. Every ASIC has a * specific number of states; this macro defines the maximum number of states. */ -#define DC__VOLTAGE_STATES 20 +#define DC__VOLTAGE_STATES 40#define DC__NUM_DPP__4 1#define DC__NUM_DPP__0_PRESENT 1#define DC__NUM_DPP__1_PRESENT 1
Signature · 1 line
2.42.0
PATCH 17/35 drm/amd/display: replay: Augment Frameupdate Command
In reply to Hamza MahfoozFrom: Max Tseng <[email protected]>
[Why]
Sending certain Frameupdate number for Replay Power Evaluation
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 2 +- .../link/protocols/link_edp_panel_control.c | 10 +++- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 51 +++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -0
@@ -1031,6 +1031,7 @@ enum replay_coasting_vtotal_type {enum replay_FW_Message_type { Replay_Msg_Not_Support =-1 , Replay_Set_Timing_Sync_Supported, + Replay_Set_Residency_Frameupdate_Timer, };union replay_error_status {
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +1 -1
@@ -46,7 +46,7 @@ struct dmub_replay_funcs {void (*replay_set_power_opt)(struct dmub_replay *dmub,unsigned int power_opt,uint8_t panel_inst);void (*replay_send_cmd)(struct dmub_replay *dmub, -enum replay_FW_Message_type msg,unsigned int panel_inst,union dmub_replay_cmd_set *cmd_element); +enum replay_FW_Message_type msg,union dmub_replay_cmd_set *cmd_element);void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub,uint16_t coasting_vtotal,uint8_t panel_inst); void (*replay_residency)(struct dmub_replay *dmub,
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +8 -2
@@ -1023,10 +1023,16 @@ bool edp_send_replay_cmd(struct dc_link *link,if (!replay)return false; -if (!dc_get_edp_link_panel_inst (dc, link, &panel_inst)) +DC_LOGGER_INIT (link->ctx->logger); + +if (dc_get_edp_link_panel_inst (dc, link, &panel_inst)) + cmd_data->panel_inst = panel_inst; +else { +DC_LOG_DC ("%s(): get edp panel inst fail " , __func__);return false; + } - replay->funcs->replay_send_cmd (replay, msg, panel_inst, cmd_data); + replay->funcs->replay_send_cmd (replay, msg, cmd_data);return true; }
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +51 -0
77 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH 18/35 drm/amd/display: Simplify brightness initialization
In reply to Hamza MahfoozFrom: Camille Cho <[email protected]>
[Why]
Remove the brightness cache in DC. It uses a single value to represent the brightness for both SDR and HDR mode. This leads to flash in HDR on/off. It also unconditionally programs brightness as in HDR mode. This may introduce garbage on SDR mode in miniLED panel.
[How]
Simplify the initialization flow by removing the DC cache and taking what panel has as default. Expand the mechanism for PWM to DPCD Aux to restore cached brightness value generally.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dc_types.h | 4 ---- .../gpu/drm/amd/display/dc/link/link_detection.c | 2 +- drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 +-- .../dc/link/protocols/link_edp_panel_control.c | 16 +++------------- .../dc/link/protocols/link_edp_panel_control.h | 1 - 6 files changed, 5 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
@@ -1610,7 +1610,6 @@ struct dc_link {enum edp_revision edp_revision;union dpcd_sink_ext_caps dpcd_sink_ext_caps; -struct backlight_settings backlight_settings;struct psr_settings psr_settings;struct replay_settings replay_settings;
drivers/gpu/drm/amd/display/dc/dc_types.h +0 -4
@@ -991,10 +991,6 @@ struct link_mst_stream_allocation_table {struct link_mst_stream_allocation stream_allocations[MAX_CONTROLLER_NUM ]; }; -struct backlight_settings { -uint32_t backlight_millinits; -}; -/* PSR feature flags */ struct psr_settings {bool psr_feature_enabled;// PSR is supported by sink
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -1
@@ -879,7 +879,7 @@ static bool detect_link_and_local_sink(struct dc_link *link, (link->dpcd_sink_ext_caps.bits.oled == 1)) {dpcd_set_source_specific_data (link);msleep (post_oui_delay); -set_cached_brightness_aux (link); +set_default_brightness_aux (link); }return true;
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +1 -2
@@ -2142,8 +2142,7 @@ static enum dc_status enable_link_dp(struct dc_state *state,if (link->dpcd_sink_ext_caps.bits.oled ==1 || link->dpcd_sink_ext_caps.bits.sdr_aux_backlight_control ==1 || link->dpcd_sink_ext_caps.bits.hdr_aux_backlight_control ==1 ) { -set_cached_brightness_aux (link); - +set_default_brightness_aux (link);if (link->dpcd_sink_ext_caps.bits.oled ==1 )msleep (bl_oled_enable_delay);edp_backlight_enable_aux (link, true);
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +3 -13
@@ -170,7 +170,6 @@ bool edp_set_backlight_level_nits(struct dc_link *link, *(uint32_t *)&dpcd_backlight_set.backlight_level_millinits = backlight_millinits; *(uint16_t *)&dpcd_backlight_set.backlight_transition_time_ms = (uint16_t )transition_time_in_ms; - link->backlight_settings.backlight_millinits = backlight_millinits;if (!link->dpcd_caps.panel_luminance_control) { if (core_link_write_dpcd(link, DP_SOURCE_BACKLIGHT_LEVEL,
@@ -288,9 +287,9 @@ bool set_default_brightness_aux(struct dc_link *link)if (link && link->dpcd_sink_ext_caps.bits.oled ==1 ) {if (!read_default_bl_aux (link, &default_backlight)) default_backlight =150000 ; -// if < 1 nits or > 5000, it might be wrong readback -if (default_backlight <1000 || default_backlight >5000000 ) - default_backlight =150000 ;// +// if > 5000, it might be wrong readback +if (default_backlight >5000000 ) + default_backlight =150000 ;return edp_set_backlight_level_nits (link, true, default_backlight,0 );
@@ -298,15 +297,6 @@ bool set_default_brightness_aux(struct dc_link *link)return false; } -bool set_cached_brightness_aux (struct dc_link *link) -{ -if (link->backlight_settings.backlight_millinits) -return edp_set_backlight_level_nits (link, true, - link->backlight_settings.backlight_millinits,0 ); -else -return set_default_brightness_aux (link); -return false; -}bool edp_is_ilr_optimization_enabled (struct dc_link *link) {if (link->dpcd_caps.edp_supported_link_rates_count ==0 || !link->panel_config.ilr.optimize_edp_link_rate)
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.h +0 -1
@@ -30,7 +30,6 @@enum dp_panel_mode dp_get_panel_mode (struct dc_link *link);void dp_set_panel_mode (struct dc_link *link,enum dp_panel_mode panel_mode);bool set_default_brightness_aux (struct dc_link *link); -bool set_cached_brightness_aux (struct dc_link *link);void edp_panel_backlight_power_on (struct dc_link *link,bool wait_for_hpd);int edp_get_backlight_level (const struct dc_link *link); bool edp_get_backlight_level_nits(struct dc_link *link,
Signature · 1 line
2.42.0
PATCH 19/35 drm/amd/display: adjust flow for deallocation mst payload
In reply to Hamza MahfoozFrom: Wayne Lin <[email protected]>
[Why]
MST relevant variables are maintained at drm side. As the result, we still have to call drm_dp_remove_payload_part2() to update the relevant values regardless the link is under mst mode or not. We used to have a workaround patch to tackle this: commit 3d8fcc6740c9 ("drm/amd/display:
Extract temp drm mst deallocation wa into its own function")
Now it's time to remove the workaround and adjust the flow.
[How]
During deallocate_mst_payload(), source actually doesn't send out ALLOCATE_PAYLOAD at the end as like the flow in allocate_mst_payload(). Call function dm_helpers_dp_mst_send_payload_allocation() at the end of deallocate_mst_payload() is a bit confusing.
Separate dm_helpers_dp_mst_send_payload_allocation() into 2 functions. Have a new function dm_helpers_dp_mst_update_mst_mgr_for_deallocation() to replace dm_helpers_dp_mst_send_payload_allocation() for payload deallocation.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 53 +++++---- drivers/gpu/drm/amd/display/dc/dc.h | 1 - drivers/gpu/drm/amd/display/dc/dm_helpers.h | 12 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 105 ++---------------- 5 files changed, 50 insertions(+), 138 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -17
@@ -1716,23 +1716,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)/* TODO: Remove after DP2 receiver gets proper support of Cable ID feature */ adev->dm.dc->debug.ignore_cable_id = true; -/* TODO: There is a new drm mst change where the freedom of -* vc_next_start_slot update is revoked/moved into drm, instead of in -* driver. This forces us to make sure to get vc_next_start_slot updated -* in drm function each time without considering if mst_state is active -* or not. Otherwise, next time hotplug will give wrong start_slot -* number. We are implementing a temporary solution to even notify drm -* mst deallocation when link is no longer of MST type when uncommitting -* the stream so we will have more time to work on a proper solution. -* Ideally when dm_helpers_dp_mst_stop_top_mgr message is triggered, we -* should notify drm to do a complete "reset" of its states and stop -* calling further drm mst functions when link is no longer of an MST -* type. This could happen when we unplug an MST hubs/displays. When -* uncommit stream comes later after unplug, we should just reset -* hardware states only. -*/ - adev->dm.dc->debug.temp_mst_deallocation_sequence = true; -if (adev->dm.dc->caps.dp_hdmi21_pcon_support)DRM_INFO ("DP-HDMI FRL PCON supported\n" );
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +33 -20
83 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
@@ -956,7 +956,6 @@ struct dc_debug_options {unsigned int min_prefetch_in_strobe_ns;bool disable_unbounded_requesting;bool dig_fifo_off_in_blank; -bool temp_mst_deallocation_sequence;bool override_dispclk_programming;bool otg_crc_db;bool disallow_dispclk_dppclk_ds;
drivers/gpu/drm/amd/display/dc/dm_helpers.h +9 -3
@@ -103,10 +103,16 @@ enum act_return_status dm_helpers_dp_mst_poll_for_allocation_change_trigger(/* * Sends ALLOCATE_PAYLOAD message. */ -bool dm_helpers_dp_mst_send_payload_allocation ( +void dm_helpers_dp_mst_send_payload_allocation (struct dc_context *ctx, -const struct dc_stream_state *stream, -bool enable); +const struct dc_stream_state *stream); + +/* +* Update mst manager relevant variables +*/ +void dm_helpers_dp_mst_update_mst_mgr_for_deallocation ( +struct dc_context *ctx, +const struct dc_stream_state *stream); bool dm_helpers_dp_mst_start_top_mgr( struct dc_context *ctx,
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +8 -97
147 lines not on this page · raw message
Signature · 1 line
2.42.0
PATCH 20/35 drm/amd/display: Disable Timing sync check in Full-Screen Video Case
In reply to Hamza MahfoozFrom: Dennis Chan <[email protected]>
[why]
If Panel max link off frame count is low, it will cause low residency for Replay, then Disabled timing sync check in Full screen Video Case.
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 66 +++++++++++++------ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 9 ++- 2 files changed, 51 insertions(+), 24 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_types.h +47 -19
@@ -1018,6 +1018,12 @@ enum replay_coasting_vtotal_type { PR_COASTING_TYPE_NUM, }; +enum replay_link_off_frame_count_level { +PR_LINK_OFF_FRAME_COUNT_FAIL =0x0 , +PR_LINK_OFF_FRAME_COUNT_GOOD =0x2 , +PR_LINK_OFF_FRAME_COUNT_BEST =0x6 , +}; +/* * This is general Interface for Replay to * set an 32 bit variable to dmub
@@ -1041,26 +1047,48 @@ union replay_error_status { };struct replay_config { -bool replay_supported;// Replay feature is supported -unsigned int replay_power_opt_supported;// Power opt flags that are supported -bool replay_smu_opt_supported;// SMU optimization is supported -unsigned int replay_enable_option;// Replay enablement option -uint32_t debug_flags;// Replay debug flags -bool replay_timing_sync_supported;// Replay desync is supported -bool force_disable_desync_error_check;// Replay desync is supported -bool received_desync_error_hpd;//Replay Received Desync Error HPD. -union replay_error_status replay_error_status;// Replay error status -}; - -/* Replay feature flags */ +/* Replay feature is supported */ +bool replay_supported; +/* Power opt flags that are supported */ +unsigned int replay_power_opt_supported; +/* SMU optimization is supported */ +bool replay_smu_opt_supported; +/* Replay enablement option */ +unsigned int replay_enable_option; +/* Replay debug flags */ +uint32_t debug_flags; +/* Replay sync is supported */ +bool replay_timing_sync_supported; +/* Replay Disable desync error check. */ +bool force_disable_desync_error_check; +/* Replay Received Desync Error HPD. */ +bool received_desync_error_hpd; +/* Replay feature is supported long vblank */ +bool replay_support_fast_resync_in_ultra_sleep_mode; +/* Replay error status */ +union replay_error_status replay_error_status; +}; + +/* Replay feature flags*/ struct replay_settings { -struct replay_config config;// Replay configuration -bool replay_feature_enabled;// Replay feature is ready for activating -bool replay_allow_active;// Replay is currently active -unsigned int replay_power_opt_active;// Power opt flags that are activated currently -bool replay_smu_opt_enable;// SMU optimization is enabled -uint16_t coasting_vtotal;// Current Coasting vtotal -uint16_t coasting_vtotal_table[PR_COASTING_TYPE_NUM ];// Coasting vtotal table +/* Replay configuration */ +struct replay_config config; +/* Replay feature is ready for activating */ +bool replay_feature_enabled; +/* Replay is currently active */ +bool replay_allow_active; +/* Replay is currently active */ +bool replay_allow_long_vblank; +/* Power opt flags that are activated currently */ +unsigned int replay_power_opt_active; +/* SMU optimization is enabled */ +bool replay_smu_opt_enable; +/* Current Coasting vtotal */ +uint16_t coasting_vtotal; +/* Coasting vtotal table */ +uint16_t coasting_vtotal_table[PR_COASTING_TYPE_NUM ]; +/* Maximum link off frame count */ +enum replay_link_off_frame_count_level link_off_frame_count_level; };/* To split out "global" and "per-panel" config settings.
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +4 -5
@@ -3056,15 +3056,14 @@ struct dmub_cmd_replay_set_timing_sync_data {* Currently the support is only for 0 or 1 */ uint8_t panel_inst; -/** -* Explicit padding to 4 byte boundary. +* REPLAY set_timing_sync */ -uint8_t pad[3 ]; +uint8_t timing_sync_supported;/** -* REPLAY set_timing_sync +* Explicit padding to 4 byte boundary. */ -bool timing_sync_supported; +uint8_t pad[2 ]; };/**
Signature · 1 line
2.42.0
PATCH 21/35 drm/amd/display: Enable SubVP on 1080p60 displays
In reply to Hamza MahfoozFrom: Alvin Lee <[email protected]>
[Description]
- Previously SubVP would never be selected on 1080p60 displays because it has too much vactive margin. However, implement a change to allow it like how 1440p60 is allowed.
- Add a new struct such that we have a list of allowed modes for enabling subvp with vactive margin (currently 1080p60 and 1440p60)
- Also ensure to block drr + vblank cases to prevent unexpected enablement of new display configs
- Update SW cursor fallback for these new potential cases as well
--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- .../display/dc/dcn32/dcn32_resource_helpers.c | 32 ++++++++++++++- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 41 +++++++++++-------- .../dc/resource/dcn32/dcn32_resource.h | 10 +++++ 4 files changed, 65 insertions(+), 20 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -5316,7 +5316,7 @@ bool check_subvp_sw_cursor_fallback_req(const struct dc *dc, struct dc_stream_stif (dc->current_state->stream_count ==1 && stream->timing.v_addressable >=2880 && ((stream->timing.pix_clk_100hz *100 ) / stream->timing.v_total / stream->timing.h_total) <120 )return true; -else if (dc->current_state->stream_count >1 && stream->timing.v_addressable >=2160 && +else if (dc->current_state->stream_count >1 && stream->timing.v_addressable >=1080 && ((stream->timing.pix_clk_100hz *100 ) / stream->timing.v_total / stream->timing.h_total) <120 )return true;
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +30 -2
@@ -665,6 +665,30 @@ bool dcn32_check_native_scaling_for_res(struct pipe_ctx *pipe, unsigned int widtreturn is_native_scaling; } +/** +* disallow_subvp_in_active_plus_blank() - Function to determine disallowed subvp + drr/vblank configs +* +* @pipe: subvp pipe to be used for the subvp + drr/vblank config +* +* Since subvp is being enabled on more configs (such as 1080p60), we want +* to explicitly block any configs that we don't want to enable. We do not +* want to enable any 1080p60 (SubVP) + drr / vblank configs since these +* are already convered by FPO. +* +* Return: True if disallowed, false otherwise +*/ +static bool disallow_subvp_in_active_plus_blank (struct pipe_ctx *pipe) +{ +bool disallow = false; + +if (resource_is_pipe_type (pipe,OPP_HEAD ) && +resource_is_pipe_type (pipe,DPP_PIPE )) { +if (pipe->stream->timing.v_addressable ==1080 && pipe->stream->timing.h_addressable ==1920 ) + disallow = true; + } +return disallow; +} +/** * dcn32_subvp_drr_admissable() - Determine if SubVP + DRR config is admissible *
@@ -688,6 +712,7 @@ bool dcn32_subvp_drr_admissable(struct dc *dc, struct dc_state *context)bool drr_pipe_found = false;bool drr_psr_capable = false;uint64_t refresh_rate =0 ; +bool subvp_disallow = false;for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
@@ -697,6 +722,7 @@ bool dcn32_subvp_drr_admissable(struct dc *dc, struct dc_state *context)if (pipe->stream->mall_stream_config.type ==SUBVP_MAIN ) { subvp_count++; + subvp_disallow |=disallow_subvp_in_active_plus_blank (pipe); refresh_rate = (pipe->stream->timing.pix_clk_100hz * (uint64_t )100 + pipe->stream->timing.v_total * pipe->stream->timing.h_total - (uint64_t )1 ); refresh_rate =div_u64 (refresh_rate, pipe->stream->timing.v_total);
@@ -713,7 +739,7 @@ bool dcn32_subvp_drr_admissable(struct dc *dc, struct dc_state *context) } } -if (subvp_count ==1 && non_subvp_pipes ==1 && drr_pipe_found && !drr_psr_capable && +if (subvp_count ==1 && !subvp_disallow && non_subvp_pipes ==1 && drr_pipe_found && !drr_psr_capable && ((uint32_t )refresh_rate <120 )) result = true;
@@ -746,6 +772,7 @@ bool dcn32_subvp_vblank_admissable(struct dc *dc, struct dc_state *context, intstruct vba_vars_st *vba = &context->bw_ctx.dml.vba;bool vblank_psr_capable = false;uint64_t refresh_rate =0 ; +bool subvp_disallow = false;for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
@@ -755,6 +782,7 @@ bool dcn32_subvp_vblank_admissable(struct dc *dc, struct dc_state *context, intif (pipe->stream->mall_stream_config.type ==SUBVP_MAIN ) { subvp_count++; + subvp_disallow |=disallow_subvp_in_active_plus_blank (pipe); refresh_rate = (pipe->stream->timing.pix_clk_100hz * (uint64_t )100 + pipe->stream->timing.v_total * pipe->stream->timing.h_total - (uint64_t )1 ); refresh_rate =div_u64 (refresh_rate, pipe->stream->timing.v_total);
@@ -772,7 +800,7 @@ bool dcn32_subvp_vblank_admissable(struct dc *dc, struct dc_state *context, int }if (subvp_count ==1 && non_subvp_pipes ==1 && !drr_pipe_found && !vblank_psr_capable && - ((uint32_t )refresh_rate <120 ) && + ((uint32_t )refresh_rate <120 ) && !subvp_disallow && vba->DRAMClockChangeSupport[vlevel][vba->maxMpcComb] == dm_dram_clock_change_vblank_w_mall_sub_vp) result = true;
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +24 -17
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.h +10 -0
@@ -39,6 +39,7 @@#define DCN3_2_MBLK_HEIGHT_8BPE 64#define DCN3_2_DCFCLK_DS_INIT_KHZ 10000 // Choose 10Mhz for init DCFCLK DS freq#define SUBVP_HIGH_REFRESH_LIST_LEN 4 +#define SUBVP_ACTIVE_MARGIN_LIST_LEN 2#define DCN3_2_MAX_SUBVP_PIXEL_RATE_MHZ 1800#define DCN3_2_VMIN_DISPCLK_HZ 717000000
@@ -57,6 +58,15 @@ struct subvp_high_refresh_list { } res[SUBVP_HIGH_REFRESH_LIST_LEN ]; }; +struct subvp_active_margin_list { +int min_refresh; +int max_refresh; +struct { +int width; +int height; + } res[SUBVP_ACTIVE_MARGIN_LIST_LEN ]; +}; +struct dcn32_resource_pool {struct resource_pool base; };
Signature · 1 line
2.42.0
PATCH 22/35 drm/amd/display: Fix tiled display misalignment
In reply to Hamza MahfoozFrom: Meenakshikumar Somasundaram <[email protected]>
[Why]
When otg workaround is applied during clock update, otgs of tiled display went out of sync.
[How]
To call dc_trigger_sync() after clock update to sync otgs again.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
@@ -1964,6 +1964,10 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *cwait_for_no_pipes_pending (dc, context);/* pplib is notified if disp_num changed */ dc->hwss.optimize_bandwidth (dc, context); +/* Need to do otg sync again as otg could be out of sync due to otg +* workaround applied during clock update +*/ +dc_trigger_sync (dc, context); }if (dc->hwss.update_dsc_pg)
Signature · 1 line
2.42.0
PATCH 23/35 drm/amd/display: Remove min_dst_y_next_start check for Z8
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Flickering occurs on DRR supported panels when engaged in DRR due to min_dst_y_next becoming larger than the frame size itself.
[How]
In general, we should be able to enter Z8 when this is engaged but it might be a net power loss even if the calculation wasn't bugged.
Don't support enabling Z8 during the DRR region.
--- .../gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c +1 -14
@@ -950,10 +950,8 @@ static enum dcn_zstate_support_state decide_zstate_support(struct dc *dc, struc {int plane_count;int i; -unsigned int min_dst_y_next_start_us; plane_count =0 ; - min_dst_y_next_start_us =0 ;for (i =0 ; i < dc->res_pool->pipe_count; i++) {if (context->res_ctx.pipe_ctx[i].plane_state) plane_count++;
@@ -975,26 +973,15 @@ static enum dcn_zstate_support_state decide_zstate_support(struct dc *dc, strucelse if (context->stream_count ==1 && context->streams[0 ]->signal ==SIGNAL_TYPE_EDP ) {struct dc_link *link = context->streams[0 ]->sink->link;struct dc_stream_status *stream_status = &context->stream_status[0 ]; -struct dc_stream_state *current_stream = context->streams[0 ];int minmum_z8_residency = dc->debug.minimum_z8_residency_time >0 ? dc->debug.minimum_z8_residency_time :1000 ;bool allow_z8 = context->bw_ctx.dml.vba.StutterPeriod > (double )minmum_z8_residency;bool is_pwrseq0 = link->link_index ==0 ; -bool isFreesyncVideo; - - isFreesyncVideo = current_stream->adjust.v_total_min == current_stream->adjust.v_total_max; - isFreesyncVideo = isFreesyncVideo && current_stream->timing.v_total < current_stream->adjust.v_total_min; -for (i =0 ; i < dc->res_pool->pipe_count; i++) { -if (context->res_ctx.pipe_ctx[i].stream == current_stream && isFreesyncVideo) { - min_dst_y_next_start_us = context->res_ctx.pipe_ctx[i].dlg_regs.min_dst_y_next_start_us; -break ; - } - }/* Don't support multi-plane configurations */ if (stream_status->plane_count >1 )return DCN_ZSTATE_SUPPORT_DISALLOW ; -if (is_pwrseq0 && (context->bw_ctx.dml.vba.StutterPeriod >5000.0 || min_dst_y_next_start_us >5000 )) +if (is_pwrseq0 && context->bw_ctx.dml.vba.StutterPeriod >5000.0 )return DCN_ZSTATE_SUPPORT_ALLOW ;else if (is_pwrseq0 && link->psr_settings.psr_version ==DC_PSR_VERSION_1 && !link->panel_config.psr.disable_psr)return allow_z8 ?DCN_ZSTATE_SUPPORT_ALLOW_Z8_Z10_ONLY :DCN_ZSTATE_SUPPORT_ALLOW_Z10_ONLY ;
Signature · 1 line
2.42.0
PATCH 24/35 drm/amd/display: Update min Z8 residency time to 2100 for DCN314
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Some panels with residency period of 2054 exhibit flickering with Z8 at the end of the frame.
[How]
As a workaround, increase the limit to block these panels.
--- .../gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -1
@@ -871,7 +871,7 @@ static const struct dc_plane_cap plane_cap = {static const struct dc_debug_options debug_defaults_drv = { .disable_z10 = false, .enable_z9_disable_interface = true, - .minimum_z8_residency_time =2000 , + .minimum_z8_residency_time =2100 , .psr_skip_crtc_disable = true, .replay_skip_crtc_disabled = true, .disable_dmcu = true,
Signature · 1 line
2.42.0
PATCH 25/35 Revert "drm/amd/display: Enable CM low mem power optimization"
In reply to Hamza MahfoozFrom: Gabe Teeger <[email protected]>
This reverts commit c2925d905ede9f7023168857e8f488136e56a1d4.
[why]
Flickering observed. Regression search pointed to this being the offending commit.
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 +++++-------- .../amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c +5 -8
@@ -71,24 +71,21 @@ void mpc32_power_on_blnd_lut( {struct dcn30_mpc *mpc30 =TO_DCN30_MPC (mpc); -/* if (mpc->ctx->dc->debug.enable_mem_low_power.bits.cm) {if (power_on) {REG_UPDATE (MPCC_MCM_MEM_PWR_CTRL [mpcc_id],MPCC_MCM_1DLUT_MEM_PWR_FORCE ,0 );REG_WAIT (MPCC_MCM_MEM_PWR_CTRL [mpcc_id],MPCC_MCM_1DLUT_MEM_PWR_STATE ,0 ,1 ,5 ); }else if (!mpc->ctx->dc->debug.disable_mem_low_power) { -//TODO: change to mpc -dpp_base->ctx->dc->optimized_required = true; -dpp_base->deferred_reg_writes.bits.disable_blnd_lut = true; +ASSERT (false); +/* TODO: change to mpc +* dpp_base->ctx->dc->optimized_required = true; +* dpp_base->deferred_reg_writes.bits.disable_blnd_lut = true; +*/ } }else {REG_SET (MPCC_MCM_MEM_PWR_CTRL [mpcc_id],0 ,MPCC_MCM_1DLUT_MEM_PWR_FORCE , power_on == true ?0 :1 ); } -*/ - -REG_SET (MPCC_MCM_MEM_PWR_CTRL [mpcc_id],0 , -MPCC_MCM_1DLUT_MEM_PWR_FORCE , power_on == true ?0 :1 ); }static enum dc_lut_mode mpc32_get_post1dlut_current (struct mpc *mpc,uint32_t mpcc_id)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
@@ -736,7 +736,7 @@ static const struct dc_debug_options debug_defaults_drv = { .i2c = true, .dmcu = false, // This is previously known to cause hang on S3 cycles if enabled .dscl = true, - .cm = true, + .cm = false, .mpc = true, .optc = true, .vpg = true,
Signature · 1 line
2.42.0
PATCH 26/35 drm/amd/display: If P-State is supported try SubVP for smaller vlevel
In reply to Hamza MahfoozFrom: Alvin Lee <[email protected]>
[Description]
- To reduce vlevel further, we can try to apply subvp on configs that already support p-state since the natural p-state support may not allow for DPM0.
- Add code to try subvp to reduce UCLK DPM level further if already supported, but don't use subvp if it does not optimize the DPM level even lower
--- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +7 -1
@@ -1416,6 +1416,7 @@ static void dcn32_full_validate_bw_helper(struct dc *dc,unsigned int dc_pipe_idx =0 ;int i =0 ;bool found_supported_config = false; +int vlevel_temp =0 ;dc_assert_fp_enabled ();
@@ -1448,13 +1449,15 @@ static void dcn32_full_validate_bw_helper(struct dc *dc,*/ if (!dc->debug.force_disable_subvp && !dc->caps.dmub_caps.gecc_enable &&dcn32_all_pipes_have_stream_and_plane (dc, context) && !dcn32_mpo_in_use (context) && !dcn32_any_surfaces_rotated (dc, context) && !is_test_pattern_enabled (context) && - (*vlevel == context->bw_ctx.dml.soc.num_states || + (*vlevel == context->bw_ctx.dml.soc.num_states || (vba->DRAMSpeedPerState[*vlevel] != vba->DRAMSpeedPerState[0 ] && + vba->DRAMClockChangeSupport[*vlevel][vba->maxMpcComb] != dm_dram_clock_change_unsupported) || vba->DRAMClockChangeSupport[*vlevel][vba->maxMpcComb] == dm_dram_clock_change_unsupported || dc->debug.force_subvp_mclk_switch)) {dcn32_merge_pipes_for_subvp (dc, context);memset (merge,0 ,MAX_PIPES *sizeof (bool )); + vlevel_temp = *vlevel;/* to re-initialize viewport after the pipe merge */ for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
@@ -1523,6 +1526,9 @@ static void dcn32_full_validate_bw_helper(struct dc *dc, } } +if (vba->DRAMSpeedPerState[*vlevel] >= vba->DRAMSpeedPerState[vlevel_temp]) + found_supported_config = false; +// If SubVP pipe config is unsupported (or cannot be used for UCLK switching) // remove phantom pipes and repopulate dml pipes if (!found_supported_config) {
Signature · 1 line
2.42.0
PATCH 27/35 drm/amd/display: force toggle rate wa for first link training for a retimer
In reply to Hamza MahfoozFrom: Zhongwei <[email protected]>
[WHY]
Handover from DMUB to driver does not perform link rate toggle. It might cause link training failure for boot up.
[HOW]
Force toggle rate wa for first link train. link->vendor_specific_lttpr_link_rate_wa should be zero then.
--- .../link/protocols/link_dp_training_fixed_vs_pe_retimer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c +3 -3
@@ -115,7 +115,7 @@ static enum link_training_result perform_fixed_vs_pe_nontransparent_training_seq lt_settings->cr_pattern_time =16000 ;/* Fixed VS/PE specific: Toggle link rate */ - apply_toggle_rate_wa = (link->vendor_specific_lttpr_link_rate_wa == target_rate); + apply_toggle_rate_wa = ((link->vendor_specific_lttpr_link_rate_wa == target_rate) || (link->vendor_specific_lttpr_link_rate_wa ==0 )); target_rate =get_dpcd_link_rate (<_settings->link_settings); toggle_rate = (target_rate ==0x6 ) ?0xA :0x6 ;
@@ -271,7 +271,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence_legacy(/* Vendor specific: Toggle link rate */ toggle_rate = (rate ==0x6 ) ?0xA :0x6 ; -if (link->vendor_specific_lttpr_link_rate_wa == rate) { +if (link->vendor_specific_lttpr_link_rate_wa == rate || link->vendor_specific_lttpr_link_rate_wa ==0 ) { core_link_write_dpcd( link, DP_LINK_BW_SET,
@@ -617,7 +617,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence(/* Vendor specific: Toggle link rate */ toggle_rate = (rate ==0x6 ) ?0xA :0x6 ; -if (link->vendor_specific_lttpr_link_rate_wa == rate) { +if (link->vendor_specific_lttpr_link_rate_wa == rate || link->vendor_specific_lttpr_link_rate_wa ==0 ) { core_link_write_dpcd( link, DP_LINK_BW_SET,
Signature · 1 line
2.42.0
PATCH 28/35 drm/amd/display: Refactor OPTC into component folder
In reply to Hamza MahfoozFrom: Parandhaman K <[email protected]>
[why]
Move all optc files to unique
folder optc.
[how]
creating optc repo in dc, and moved the dcnxx_optc.c and .h files into corresponding new folders inside the optc and cleared the linkage errors by adding relative paths in the Makefile.template.
---
drivers/gpu/drm/amd/display/Makefile | 1 +
drivers/gpu/drm/amd/display/dc/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
.../dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 6 +-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/optc/Makefile | 108 ++++++++++++++++++
.../display/dc/{ => optc}/dcn10/dcn10_optc.c | 0
.../display/dc/{ => optc}/dcn10/dcn10_optc.h | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.c | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.h | 2 +-
.../dc/{ => optc}/dcn201/dcn201_optc.c | 0
.../dc/{ => optc}/dcn201/dcn201_optc.h | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.c | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.h | 0
.../dc/{ => optc}/dcn301/dcn301_optc.c | 0
.../dc/{ => optc}/dcn301/dcn301_optc.h | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.c | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.h | 0
.../dc/{ => optc}/dcn314/dcn314_optc.c | 0
.../dc/{ => optc}/dcn314/dcn314_optc.h | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.c | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.h | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.c | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.h | 0
31 files changed, 122 insertions(+), 15 deletions(-)
create mode 100644 drivers/gpu/drm/amd/display/dc/optc/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.h (99%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.h (100%)drivers/gpu/drm/amd/display/Makefile +1 -0
@@ -32,6 +32,7 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/hwss subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/resource subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dsc +subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/optc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/inc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color
drivers/gpu/drm/amd/display/dc/Makefile +1 -1
@@ -22,7 +22,7 @@ # # Makefile for Display Core (dc) component. -DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource +DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource optc ifdef CONFIG_DRM_AMD_DC_FP
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
@@ -24,7 +24,7 @@ DCN10 = dcn10_init.o dcn10_ipp.o \ dcn10_hw_sequencer_debug.o \ - dcn10_dpp.o dcn10_opp.o dcn10_optc.o \ + dcn10_dpp.o dcn10_opp.o \ dcn10_hubp.o dcn10_mpc.o \ dcn10_dpp_dscl.o dcn10_dpp_cm.o dcn10_cm_common.o \ dcn10_hubbub.o dcn10_stream_encoder.o dcn10_link_encoder.o
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c +1 -1
@@ -32,7 +32,7 @@#include "dce/dce_hwseq.h" #include "abm.h" #include "dmcu.h" -#include "dcn10_optc.h" +#include "dcn10/dcn10_optc.h" #include "dcn10/dcn10_dpp.h" #include "dcn10/dcn10_mpc.h" #include "timing_generator.h"
drivers/gpu/drm/amd/display/dc/dcn20/Makefile +1 -1
@@ -3,7 +3,7 @@ # Makefile for DCN. DCN20 = dcn20_init.o dcn20_dpp.o dcn20_dpp_cm.o dcn20_hubp.o \ - dcn20_mpc.o dcn20_opp.o dcn20_hubbub.o dcn20_optc.o dcn20_mmhubbub.o \ + dcn20_mpc.o dcn20_opp.o dcn20_hubbub.o dcn20_mmhubbub.o \ dcn20_stream_encoder.o dcn20_link_encoder.o dcn20_dccg.o \ dcn20_vmid.o dcn20_dwb.o dcn20_dwb_scl.o
drivers/gpu/drm/amd/display/dc/dcn201/Makefile +1 -1
@@ -3,7 +3,7 @@ # Makefile for DCN. DCN201 = dcn201_init.o \ dcn201_hubbub.o\ - dcn201_mpc.o dcn201_hubp.o dcn201_opp.o dcn201_optc.o dcn201_dpp.o \ + dcn201_mpc.o dcn201_hubp.o dcn201_opp.o dcn201_dpp.o \ dcn201_dccg.o dcn201_link_encoder.o AMD_DAL_DCN201 = $(addprefix $(AMDDALPATH)/dc/dcn201/,$(DCN201))
drivers/gpu/drm/amd/display/dc/dcn30/Makefile +0 -1
@@ -28,7 +28,6 @@ DCN30 := \ dcn30_hubbub.o \ dcn30_hubp.o \ dcn30_dpp.o \ - dcn30_optc.o \ dcn30_dccg.o \ dcn30_mpc.o dcn30_vpg.o \ dcn30_afmt.o \
drivers/gpu/drm/amd/display/dc/dcn301/Makefile +1 -2
@@ -11,8 +11,7 @@ # Makefile for dcn30. DCN301 = dcn301_init.o dcn301_dccg.o \ - dcn301_dio_link_encoder.o dcn301_panel_cntl.o dcn301_hubbub.o \ - dcn301_optc.o + dcn301_dio_link_encoder.o dcn301_panel_cntl.o dcn301_hubbub.o AMD_DAL_DCN301 = $(addprefix $(AMDDALPATH)/dc/dcn301/,$(DCN301))
drivers/gpu/drm/amd/display/dc/dcn31/Makefile +1 -1
@@ -11,7 +11,7 @@ # Makefile for dcn31. DCN31 = dcn31_hubbub.o dcn31_init.o dcn31_hubp.o \ - dcn31_dccg.o dcn31_optc.o dcn31_dio_link_encoder.o dcn31_panel_cntl.o \ + dcn31_dccg.o dcn31_dio_link_encoder.o dcn31_panel_cntl.o \ dcn31_apg.o dcn31_hpo_dp_stream_encoder.o dcn31_hpo_dp_link_encoder.o \ dcn31_afmt.o dcn31_vpg.o
drivers/gpu/drm/amd/display/dc/dcn314/Makefile +1 -1
@@ -11,7 +11,7 @@ # Makefile for dcn314. DCN314 = dcn314_init.o \ - dcn314_dio_stream_encoder.o dcn314_dccg.o dcn314_optc.o + dcn314_dio_stream_encoder.o dcn314_dccg.o AMD_DAL_DCN314 = $(addprefix $(AMDDALPATH)/dc/dcn314/,$(DCN314))
drivers/gpu/drm/amd/display/dc/dcn32/Makefile +3 -3
@@ -11,9 +11,9 @@ # Makefile for dcn32. DCN32 = dcn32_hubbub.o dcn32_init.o dcn32_dccg.o \ - dcn32_dccg.o dcn32_optc.o dcn32_mmhubbub.o dcn32_hubp.o dcn32_dpp.o \ - dcn32_dio_stream_encoder.o dcn32_dio_link_encoder.o dcn32_hpo_dp_link_encoder.o \ - dcn32_resource_helpers.o dcn32_mpc.o + dcn32_mmhubbub.o dcn32_dpp.o dcn32_hubp.o dcn32_mpc.o \ + dcn32_dio_stream_encoder.o dcn32_dio_link_encoder.o dcn32_resource_helpers.o \ + dcn32_hpo_dp_link_encoder.o AMD_DAL_DCN32 = $(addprefix $(AMDDALPATH)/dc/dcn32/,$(DCN32))
drivers/gpu/drm/amd/display/dc/dcn35/Makefile +1 -1
@@ -11,7 +11,7 @@ # Makefile for DCN35. DCN35 = dcn35_init.o dcn35_dio_stream_encoder.o \ - dcn35_dio_link_encoder.o dcn35_dccg.o dcn35_optc.o \ + dcn35_dio_link_encoder.o dcn35_dccg.o \ dcn35_hubp.o dcn35_hubbub.o \ dcn35_mmhubbub.o dcn35_opp.o dcn35_dpp.o dcn35_pg_cntl.o dcn35_dwb.o
drivers/gpu/drm/amd/display/dc/optc/Makefile new file +108 -0
108 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_optc.h +1 -1
@@ -26,7 +26,7 @@#ifndef __DC_OPTC_DCN20_H__#define __DC_OPTC_DCN20_H__ -#include "../dcn10/dcn10_optc.h" +#include "dcn10/dcn10_optc.h" #define TG_COMMON_REG_LIST_DCN2_0 (inst) \ TG_COMMON_REG_LIST_DCN(inst),\
drivers/gpu/drm/amd/display/dc/optc/dcn201/dcn201_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn201/dcn201_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn301/dcn301_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn301/dcn301_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_optc.h +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.c renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_optc.c +0 -0
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.h renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_optc.h +0 -0
Signature · 1 line
2.42.0
PATCH 29/35 drm/amd/display: Update DCN35 clock table policy
In reply to Hamza MahfoozFrom: Nicholas Kazlauskas <[email protected]>
[Why]
The new table doesn't have an implicit mapping between Fclk SOC voltage and MemClk and it currently builds the table off of number of Fclk states rather than DcfClock states.
The DML table in use is not correct for functionality or power and does not align with our existing policies for DCN3x.
[How]
Build the table based on DcfClock with the following assumptions:
1. Raising Soc voltage is the most expensive operation, so assume that running at max DispClock or DppClock is preferable.
2. Assume that we can run at max Fclk / MemClk at any state, but restrict the maximum state to the very last entry in the table as the worst case scenario.
3. Assume that Fclk always has a 2x multiplier on DcfClock unless the table specifies something lower.
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 77 ++++++++++++------- 1 file changed, 51 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +51 -26
@@ -648,27 +648,47 @@ static unsigned int convert_wck_ratio(uint8_t wck_ratio)return 1 ; } +static inline uint32_t calc_dram_speed_mts (const MemPstateTable_t *entry) +{ +return entry->UClk *convert_wck_ratio (entry->WckRatio) *2 ; +} +static void dcn35_clk_mgr_helper_populate_bw_params (struct clk_mgr_internal *clk_mgr,struct integrated_info *bios_info,DpmClocks_t_dcn35 *clock_table) {struct clk_bw_params *bw_params = clk_mgr->base.bw_params;struct clk_limit_table_entry def_max = bw_params->clk_table.entries[bw_params->clk_table.num_entries -1 ]; -uint32_t max_pstate =0 , max_uclk =0 , max_fclk =0 ; -uint32_t min_pstate =0 , max_dispclk =0 , max_dppclk =0 ; +uint32_t max_fclk =0 , min_pstate =0 , max_dispclk =0 , max_dppclk =0 ; +uint32_t max_pstate =0 , max_dram_speed_mts =0 , min_dram_speed_mts =0 ;int i; +/* Determine min/max p-state values. */ for (i =0 ; i < clock_table->NumMemPstatesEnabled; i++) { -if (is_valid_clock_value (clock_table->MemPstateTable[i].UClk) && - clock_table->MemPstateTable[i].UClk > max_uclk) { - max_uclk = clock_table->MemPstateTable[i].UClk; +uint32_t dram_speed_mts =calc_dram_speed_mts (&clock_table->MemPstateTable[i]); + +if (is_valid_clock_value (dram_speed_mts) && dram_speed_mts > max_dram_speed_mts) { + max_dram_speed_mts = dram_speed_mts; max_pstate = i; } } -/* We expect the table to contain at least one valid Uclk entry. */ -ASSERT (is_valid_clock_value (max_uclk)); + min_dram_speed_mts = max_dram_speed_mts; + min_pstate = max_pstate; +for (i =0 ; i < clock_table->NumMemPstatesEnabled; i++) { +uint32_t dram_speed_mts =calc_dram_speed_mts (&clock_table->MemPstateTable[i]); + +if (is_valid_clock_value (dram_speed_mts) && dram_speed_mts < min_dram_speed_mts) { + min_dram_speed_mts = dram_speed_mts; + min_pstate = i; + } + } + +/* We expect the table to contain at least one valid P-state entry. */ +ASSERT (clock_table->NumMemPstatesEnabled && +is_valid_clock_value (max_dram_speed_mts) && +is_valid_clock_value (min_dram_speed_mts));/* dispclk and dppclk can be max at any voltage, same number of levels for both */ if (clock_table->NumDispClkLevelsEnabled <= NUM_DISPCLK_DPM_LEVELS &&
@@ -678,47 +698,46 @@ static void dcn35_clk_mgr_helper_populate_bw_params(struct clk_mgr_internal *clk max_dppclk =find_max_clk_value (clock_table->DppClocks, clock_table->NumDispClkLevelsEnabled); }else { +/* Invalid number of entries in the table from PMFW. */ ASSERT (0 ); } -if (clock_table->NumFclkLevelsEnabled <=NUM_FCLK_DPM_LEVELS ) - max_fclk =find_max_clk_value (clock_table->FclkClocks_Freq, - clock_table->NumFclkLevelsEnabled); -for (i =0 ; i < clock_table->NumMemPstatesEnabled; i++) { -uint32_t min_uclk = clock_table->MemPstateTable[0 ].UClk; -int j; +/* Base the clock table on dcfclk, need at least one entry regardless of pmfw table */ +ASSERT (clock_table->NumDcfClkLevelsEnabled >0 ); -for (j =1 ; j < clock_table->NumMemPstatesEnabled; j++) { -if (is_valid_clock_value (clock_table->MemPstateTable[j].UClk) && - clock_table->MemPstateTable[j].UClk < min_uclk && - clock_table->MemPstateTable[j].Voltage <= clock_table->SocVoltage[i]) { - min_uclk = clock_table->MemPstateTable[j].UClk; - min_pstate = j; - } - } + max_fclk =find_max_clk_value (clock_table->FclkClocks_Freq, clock_table->NumFclkLevelsEnabled); +for (i =0 ; i < clock_table->NumDcfClkLevelsEnabled; i++) { +int j; + +/* First search defaults for the clocks we don't read using closest lower or equal default dcfclk */ for (j = bw_params->clk_table.num_entries -1 ; j >0 ; j--)if (bw_params->clk_table.entries[j].dcfclk_mhz <= clock_table->DcfClocks[i]) -break ; +break ; bw_params->clk_table.entries[i].phyclk_mhz = bw_params->clk_table.entries[j].phyclk_mhz; bw_params->clk_table.entries[i].phyclk_d18_mhz = bw_params->clk_table.entries[j].phyclk_d18_mhz; bw_params->clk_table.entries[i].dtbclk_mhz = bw_params->clk_table.entries[j].dtbclk_mhz; - bw_params->clk_table.entries[i].fclk_mhz = max_fclk; + +/* Now update clocks we do read */ bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemPstateTable[min_pstate].MemClk; bw_params->clk_table.entries[i].voltage = clock_table->MemPstateTable[min_pstate].Voltage; bw_params->clk_table.entries[i].dcfclk_mhz = clock_table->DcfClocks[i]; bw_params->clk_table.entries[i].socclk_mhz = clock_table->SocClocks[i]; bw_params->clk_table.entries[i].dispclk_mhz = max_dispclk; bw_params->clk_table.entries[i].dppclk_mhz = max_dppclk; - bw_params->clk_table.entries[i].wck_ratio =convert_wck_ratio ( - clock_table->MemPstateTable[min_pstate].WckRatio); - } + bw_params->clk_table.entries[i].wck_ratio = +convert_wck_ratio (clock_table->MemPstateTable[min_pstate].WckRatio); + +/* Dcfclk and Fclk are tied, but at a different ratio */ + bw_params->clk_table.entries[i].fclk_mhz =min (max_fclk,2 * clock_table->DcfClocks[i]); + }/* Make sure to include at least one entry at highest pstate */ if (max_pstate != min_pstate || i ==0 ) {if (i >MAX_NUM_DPM_LVL -1 ) i =MAX_NUM_DPM_LVL -1 ; + bw_params->clk_table.entries[i].fclk_mhz = max_fclk; bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemPstateTable[max_pstate].MemClk; bw_params->clk_table.entries[i].voltage = clock_table->MemPstateTable[max_pstate].Voltage;
@@ -734,6 +753,7 @@ static void dcn35_clk_mgr_helper_populate_bw_params(struct clk_mgr_internal *clk } bw_params->clk_table.num_entries = i--; +/* Make sure all highest clocks are included*/ bw_params->clk_table.entries[i].socclk_mhz =find_max_clk_value (clock_table->SocClocks,NUM_SOCCLK_DPM_LEVELS ); bw_params->clk_table.entries[i].dispclk_mhz =
@@ -752,6 +772,11 @@ static void dcn35_clk_mgr_helper_populate_bw_params(struct clk_mgr_internal *clk bw_params->clk_table.num_entries_per_clk.num_fclk_levels = clock_table->NumFclkLevelsEnabled; bw_params->clk_table.num_entries_per_clk.num_memclk_levels = clock_table->NumMemPstatesEnabled; bw_params->clk_table.num_entries_per_clk.num_socclk_levels = clock_table->NumSocClkLevelsEnabled; + +/* +* Set any 0 clocks to max default setting. Not an issue for +* power since we aren't doing switching in such case anyway +*/ for (i =0 ; i < bw_params->clk_table.num_entries; i++) {if (!bw_params->clk_table.entries[i].fclk_mhz) { bw_params->clk_table.entries[i].fclk_mhz = def_max.fclk_mhz;
Signature · 1 line
2.42.0
PATCH 30/35 drm/amd/display: Remove config update
In reply to Hamza MahfoozFrom: Taimur Hassan <[email protected]>
[Why]
Prevent overwrite of dc->config.use_default_clock_table, as it should be pre-configured.
--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
@@ -1876,7 +1876,7 @@ static bool dcn35_resource_construct(/* Use pipe context based otg sync logic */ dc->config.use_pipe_ctx_sync_logic = true; - dc->config.use_default_clock_table = false; +/* read VBIOS LTTPR caps */ {if (ctx->dc_bios->funcs->get_lttpr_caps) {
Signature · 1 line
2.42.0
PATCH 31/35 drm/amd/display: Fix conversions between bytes and KB
In reply to Hamza MahfoozFrom: Taimur Hassan <[email protected]>
[Why]
There are a number of instances where we convert HostVMMinPageSize or GPUVMMinPageSize from bytes to KB by dividing (rather than multiplying) and vice versa.
Additionally, in some cases, a parameter is passed through DML in KB but later checked as if it were in bytes.
--- .../amd/display/dc/dml2/display_mode_core.c | 18 +++++++++--------- .../display/dc/dml2/dml2_translation_helper.c | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c +9 -9
@@ -6277,7 +6277,7 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib) mode_lib->ms.NoOfDPPThisState, mode_lib->ms.dpte_group_bytes, s->HostVMInefficiencyFactor, - mode_lib->ms.soc.hostvm_min_page_size_kbytes, + mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 , mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels); s->NextMaxVStartup = s->MaxVStartupAllPlanes[j];
@@ -6355,7 +6355,7 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib) CalculatePrefetchSchedule_params->GPUVMEnable = mode_lib->ms.cache_display_cfg.plane.GPUVMEnable; CalculatePrefetchSchedule_params->HostVMEnable = mode_lib->ms.cache_display_cfg.plane.HostVMEnable; CalculatePrefetchSchedule_params->HostVMMaxNonCachedPageTableLevels = mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels; - CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes; + CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 ; CalculatePrefetchSchedule_params->DynamicMetadataEnable = mode_lib->ms.cache_display_cfg.plane.DynamicMetadataEnable[k]; CalculatePrefetchSchedule_params->DynamicMetadataVMEnabled = mode_lib->ms.ip.dynamic_metadata_vm_enabled; CalculatePrefetchSchedule_params->DynamicMetadataLinesBeforeActiveRequired = mode_lib->ms.cache_display_cfg.plane.DynamicMetadataLinesBeforeActiveRequired[k];
@@ -6533,7 +6533,7 @@ static void dml_prefetch_check(struct display_mode_lib_st *mode_lib) mode_lib->ms.cache_display_cfg.plane.HostVMEnable, mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels, mode_lib->ms.cache_display_cfg.plane.GPUVMEnable, - mode_lib->ms.soc.hostvm_min_page_size_kbytes, + mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 , mode_lib->ms.PDEAndMetaPTEBytesPerFrame[j][k], mode_lib->ms.MetaRowBytes[j][k], mode_lib->ms.DPTEBytesPerRow[j][k],
@@ -7678,7 +7678,7 @@ dml_bool_t dml_core_mode_support(struct display_mode_lib_st *mode_lib) CalculateVMRowAndSwath_params->HostVMMaxNonCachedPageTableLevels = mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels; CalculateVMRowAndSwath_params->GPUVMMaxPageTableLevels = mode_lib->ms.cache_display_cfg.plane.GPUVMMaxPageTableLevels; CalculateVMRowAndSwath_params->GPUVMMinPageSizeKBytes = mode_lib->ms.cache_display_cfg.plane.GPUVMMinPageSizeKBytes; - CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes; + CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 ; CalculateVMRowAndSwath_params->PTEBufferModeOverrideEn = mode_lib->ms.cache_display_cfg.plane.PTEBufferModeOverrideEn; CalculateVMRowAndSwath_params->PTEBufferModeOverrideVal = mode_lib->ms.cache_display_cfg.plane.PTEBufferMode; CalculateVMRowAndSwath_params->PTEBufferSizeNotExceeded = mode_lib->ms.PTEBufferSizeNotExceededPerState;
@@ -7948,7 +7948,7 @@ dml_bool_t dml_core_mode_support(struct display_mode_lib_st *mode_lib) UseMinimumDCFCLK_params->GPUVMMaxPageTableLevels = mode_lib->ms.cache_display_cfg.plane.GPUVMMaxPageTableLevels; UseMinimumDCFCLK_params->HostVMEnable = mode_lib->ms.cache_display_cfg.plane.HostVMEnable; UseMinimumDCFCLK_params->NumberOfActiveSurfaces = mode_lib->ms.num_active_planes; - UseMinimumDCFCLK_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes; + UseMinimumDCFCLK_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 ; UseMinimumDCFCLK_params->HostVMMaxNonCachedPageTableLevels = mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels; UseMinimumDCFCLK_params->DynamicMetadataVMEnabled = mode_lib->ms.ip.dynamic_metadata_vm_enabled; UseMinimumDCFCLK_params->ImmediateFlipRequirement = s->ImmediateFlipRequiredFinal;
@@ -8690,7 +8690,7 @@ void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struc CalculateVMRowAndSwath_params->HostVMMaxNonCachedPageTableLevels = mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels; CalculateVMRowAndSwath_params->GPUVMMaxPageTableLevels = mode_lib->ms.cache_display_cfg.plane.GPUVMMaxPageTableLevels; CalculateVMRowAndSwath_params->GPUVMMinPageSizeKBytes = mode_lib->ms.cache_display_cfg.plane.GPUVMMinPageSizeKBytes; - CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes; + CalculateVMRowAndSwath_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 ; CalculateVMRowAndSwath_params->PTEBufferModeOverrideEn = mode_lib->ms.cache_display_cfg.plane.PTEBufferModeOverrideEn; CalculateVMRowAndSwath_params->PTEBufferModeOverrideVal = mode_lib->ms.cache_display_cfg.plane.PTEBufferMode; CalculateVMRowAndSwath_params->PTEBufferSizeNotExceeded = s->dummy_boolean_array[0 ];
@@ -8796,7 +8796,7 @@ void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struc mode_lib->ms.cache_display_cfg.hw.DPPPerSurface, locals->dpte_group_bytes, s->HostVMInefficiencyFactor, - mode_lib->ms.soc.hostvm_min_page_size_kbytes, + mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 , mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels); locals->TCalc =24.0 / locals->DCFCLKDeepSleep;
@@ -8986,7 +8986,7 @@ void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struc CalculatePrefetchSchedule_params->GPUVMEnable = mode_lib->ms.cache_display_cfg.plane.GPUVMEnable; CalculatePrefetchSchedule_params->HostVMEnable = mode_lib->ms.cache_display_cfg.plane.HostVMEnable; CalculatePrefetchSchedule_params->HostVMMaxNonCachedPageTableLevels = mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels; - CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes; + CalculatePrefetchSchedule_params->HostVMMinPageSize = mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 ; CalculatePrefetchSchedule_params->DynamicMetadataEnable = mode_lib->ms.cache_display_cfg.plane.DynamicMetadataEnable[k]; CalculatePrefetchSchedule_params->DynamicMetadataVMEnabled = mode_lib->ms.ip.dynamic_metadata_vm_enabled; CalculatePrefetchSchedule_params->DynamicMetadataLinesBeforeActiveRequired = mode_lib->ms.cache_display_cfg.plane.DynamicMetadataLinesBeforeActiveRequired[k];
@@ -9231,7 +9231,7 @@ void dml_core_mode_programming(struct display_mode_lib_st *mode_lib, const struc mode_lib->ms.cache_display_cfg.plane.HostVMEnable, mode_lib->ms.cache_display_cfg.plane.HostVMMaxPageTableLevels, mode_lib->ms.cache_display_cfg.plane.GPUVMEnable, - mode_lib->ms.soc.hostvm_min_page_size_kbytes, + mode_lib->ms.soc.hostvm_min_page_size_kbytes *1024 , locals->PDEAndMetaPTEBytesFrame[k], locals->MetaRowByte[k], locals->PixelPTEBytesPerRow[k],
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +2 -2
@@ -515,8 +515,8 @@ void dml2_translate_socbb_params(const struct dc *in, struct soc_bounding_box_st out->do_urgent_latency_adjustment = in_soc_params->do_urgent_latency_adjustment; out->dram_channel_width_bytes = (dml_uint_t )in_soc_params->dram_channel_width_bytes; out->fabric_datapath_to_dcn_data_return_bytes = (dml_uint_t )in_soc_params->fabric_datapath_to_dcn_data_return_bytes; - out->gpuvm_min_page_size_kbytes = in_soc_params->gpuvm_min_page_size_bytes *1024 ; - out->hostvm_min_page_size_kbytes = in_soc_params->hostvm_min_page_size_bytes *1024 ; + out->gpuvm_min_page_size_kbytes = in_soc_params->gpuvm_min_page_size_bytes /1024 ; + out->hostvm_min_page_size_kbytes = in_soc_params->hostvm_min_page_size_bytes /1024 ; out->mall_allocated_for_dcn_mbytes = (dml_uint_t )in_soc_params->mall_allocated_for_dcn_mbytes; out->max_avg_dram_bw_use_normal_percent = in_soc_params->max_avg_dram_bw_use_normal_percent; out->max_avg_fabric_bw_use_normal_percent = in_soc_params->max_avg_fabric_bw_use_normal_percent;
Signature · 1 line
2.42.0
PATCH 32/35 drm/amd/display: Fix some HostVM parameters in DML
In reply to Hamza MahfoozFrom: Taimur Hassan <[email protected]>
[Why]
A number of DML parameters related to HostVM were either missing or being set incorrectly, which may cause inaccuracies in calculating margins and determining BW limitations.
[How]
Correct these values where needed and populate the missing values.
--- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 35 +++++++++++++++++-- .../display/dc/dml2/dml2_translation_helper.c | 9 +++-- 2 files changed, 39 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +33 -2
@@ -330,8 +330,39 @@ void dcn35_update_bw_bounding_box_fpu(struct dc *dc,dml_init_instance (&dc->dml, &dcn3_5_soc, &dcn3_5_ip,DML_PROJECT_DCN31 ); -/* Update latency values */ - dc->dml2_options.bbox_overrides.dram_clock_change_latency_us = dcn3_5_soc.dram_clock_change_latency_us; +/*copy to dml2, before dml2_create*/ +if (clk_table->num_entries >2 ) { + +for (i =0 ; i < clk_table->num_entries; i++) { + dc->dml2_options.bbox_overrides.clks_table.num_states = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dcfclk_mhz = + clock_limits[i].dcfclk_mhz; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].fclk_mhz = + clock_limits[i].fabricclk_mhz; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dispclk_mhz = + clock_limits[i].dispclk_mhz; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].dppclk_mhz = + clock_limits[i].dppclk_mhz; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].socclk_mhz = + clock_limits[i].socclk_mhz; + dc->dml2_options.bbox_overrides.clks_table.clk_entries[i].memclk_mhz = + clk_table->entries[i].memclk_mhz * clk_table->entries[i].wck_ratio; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dcfclk_levels = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_fclk_levels = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dispclk_levels = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_dppclk_levels = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_socclk_levels = + clk_table->num_entries; + dc->dml2_options.bbox_overrides.clks_table.num_entries_per_clk.num_memclk_levels = + clk_table->num_entries; + } + } + dc->dml2_options.bbox_overrides.dram_clock_change_latency_us = dcn3_5_soc.dram_clock_change_latency_us * clk_table->entries[i].wck_ratio; dc->dml2_options.bbox_overrides.sr_exit_latency_us = dcn3_5_soc.sr_exit_time_us; dc->dml2_options.bbox_overrides.sr_enter_plus_exit_latency_us = dcn3_5_soc.sr_enter_plus_exit_time_us;
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +6 -3
@@ -1057,9 +1057,12 @@ void map_dc_state_into_dml_display_cfg(struct dml2_context *dml2, struct dc_stat }//Generally these are set by referencing our latest BB/IP params in dcn32_resource.c file - dml_dispcfg->plane.GPUVMEnable = true; - dml_dispcfg->plane.GPUVMMaxPageTableLevels =4 ; - dml_dispcfg->plane.HostVMEnable = false; + dml_dispcfg->plane.GPUVMEnable = dml2->v20.dml_core_ctx.ip.gpuvm_enable; + dml_dispcfg->plane.GPUVMMaxPageTableLevels = dml2->v20.dml_core_ctx.ip.gpuvm_max_page_table_levels; + dml_dispcfg->plane.HostVMEnable = dml2->v20.dml_core_ctx.ip.hostvm_enable; + dml_dispcfg->plane.HostVMMaxPageTableLevels = dml2->v20.dml_core_ctx.ip.hostvm_max_page_table_levels; +if (dml2->v20.dml_core_ctx.ip.hostvm_enable) + dml2->v20.dml_core_ctx.policy.AllowForPStateChangeOrStutterInVBlankFinal = dml_prefetch_support_uclk_fclk_and_stutter;dml2_populate_pipe_to_plane_index_mapping (dml2, context);
Signature · 1 line
2.42.0
PATCH 33/35 drm/amd/display: Fix black screen on video playback with embedded panel
In reply to Hamza MahfoozFrom: Sung Joon Kim <[email protected]>
[why]
We have dynamic power control in driver but
should be ignored when power is forced on.
[how]
Bypass any power control when it's forced on.
--- .../drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 1 - drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +0 -1
@@ -1132,7 +1132,6 @@ void dcn35_clk_mgr_construct( ctx->dc->debug.disable_dpp_power_gate = false; ctx->dc->debug.disable_hubp_power_gate = false; ctx->dc->debug.disable_dsc_power_gate = false; - ctx->dc->debug.disable_hpo_power_gate = false; }else {/*let's reset the config control flag*/ ctx->dc->config.disable_ips =DMUB_IPS_DISABLE_ALL ;/*pmfw not support it, disable it all*/
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.c +10 -0
@@ -261,6 +261,7 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on)uint32_t power_gate = power_on ?0 :1 ;uint32_t pwr_status = power_on ?0 :2 ;uint32_t org_ip_request_cntl; +uint32_t power_forceon;bool block_enabled; if (pg_cntl->ctx->dc->debug.ignore_pg ||
@@ -277,6 +278,10 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on)return ; } +REG_GET (DOMAIN25_PG_CONFIG ,DOMAIN_POWER_FORCEON , &power_forceon); +if (power_forceon) +return ; +REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl);if (org_ip_request_cntl ==0 )REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 );
@@ -304,6 +309,7 @@ void pg_cntl35_io_clk_pg_control(struct pg_cntl *pg_cntl, bool power_on)uint32_t power_gate = power_on ?0 :1 ;uint32_t pwr_status = power_on ?0 :2 ;uint32_t org_ip_request_cntl; +uint32_t power_forceon;bool block_enabled; if (pg_cntl->ctx->dc->debug.ignore_pg ||
@@ -319,6 +325,10 @@ void pg_cntl35_io_clk_pg_control(struct pg_cntl *pg_cntl, bool power_on)return ; } +REG_GET (DOMAIN22_PG_CONFIG ,DOMAIN_POWER_FORCEON , &power_forceon); +if (power_forceon) +return ; +REG_GET (DC_IP_REQUEST_CNTL ,IP_REQUEST_EN , &org_ip_request_cntl);if (org_ip_request_cntl ==0 )REG_SET (DC_IP_REQUEST_CNTL ,0 ,IP_REQUEST_EN ,1 );
Signature · 1 line
2.42.0
PATCH 34/35 drm/amd/display: [FW Promotion] Release 0.0.193.0
In reply to Hamza MahfoozFrom: Anthony Koo <[email protected]>
- Add a tracing framework, to measure duration, execution count and longest duration of main loop/vsync interrupt work GPINT command is used to start/stop the measurements.
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +8 -2
@@ -185,8 +185,7 @@ union abm_flags { unsigned int disable_abm_requested : 1;/** -* @disable_abm_immediately: Indicates if driver has requested ABM to be disabled -* immediately. +* @disable_abm_immediately: Indicates if driver has requested ABM to be disabled immediately. */ unsigned int disable_abm_immediately : 1;
@@ -866,6 +865,13 @@ enum dmub_gpint_command {* DESC: Updates the trace buffer mask bit32~bit63. */ DMUB_GPINT__GET_TRACE_BUFFER_MASK_WORD3 =119 , + +/** +* DESC: Enable measurements for various task duration +* ARGS: 0 - Disable measurement +* 1 - Enable measurement +*/ + DMUB_GPINT__TRACE_DMUB_WAKE_ACTIVITY = 123, };/**
Signature · 1 line
2.42.0
PATCH 35/35 drm/amd/display: 3.2.261
In reply to Hamza MahfoozFrom: Aric Cyr <[email protected]>
This version brings along the following:
- DCN314 fixes
- DCN32 fixes
- DCN35 fixes
- DML2 fixes
- eDP fixes
- HDR fixes
- MST fixes
- Replay fixes
- SubVP support for more configs
--- 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
@@ -49,7 +49,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.260" +#define DC_VER "3.2.261"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.42.0
[Public]
Hi all,
This week this patchset was tested on the following systems:
• Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U
• MSI Gaming X Trio RX 6800
• Gigabyte Gaming OC RX 7900 XTX
These systems were tested on the following display/connection types:
• eDP, (1080p 60hz [5650U]) (1920x1200 60hz [6600U]) (2560x1600 120hz[6600U])
• VGA and DVI (1680x1050 60hz [DP to VGA/DVI, USB-C to VGA/DVI])
• DP/HDMI/USB-C (1440p 170hz, 4k 60hz, 4k 144hz, 4k 240hz [Includes USB-C to DP/HDMI adapters])
• Thunderbolt (LG Ultrafine 5k)
• MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60Hz displays)
• DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60 displays, and HP Hook G2 with 1 4k60 display)
• USB 4 (Kensington SD5700T and 1x 4k 60Hz display)
• PCON (Club3D CAC-1085 and 1x 4k 144Hz display [at 4k 120HZ, as that is the max the adapter supports])
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to):
• Changing display configurations and settings
• Benchmark testing
• Feature testing (Freesync, etc.)
Automated testing includes (but is not limited to):
• Script testing (scripts to automate some of the manual checks)
• IGT testing
The patchset consists of the amd-staging-drm-next branch (Head commit 2ca13e7462d5 drm/amd/display: Promote DC to 3.2.260) with new patches added on top of it.
Tested on Ubuntu 22.04.3, on Wayland and X11, using KDE Plasma and Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Hamza Mahfooz
Sent: Wednesday, November 15, 2023 2:40 PM
To: [email protected]
Cc: Wang, Chao-kai (Stylon) <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Li, Roman <[email protected]>; Zuo, Jerry <[email protected]>; Pillai, Aurabindo <[email protected]>; Wu, Hersen <[email protected]>; Mahfooz, Hamza <[email protected]>; Lin, Wayne <[email protected]>; Wentland, Harry <[email protected]>; Gutierrez, Agustin <[email protected]>
Subject: [PATCH 00/35] DC Patches November 15, 2023
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* DCN314 fixes
* DCN32 fixes
* DCN35 fixes
* DML2 fixes
* eDP fixes
* HDR fixes
* MST fixes
* Replay fixes
* SubVP support for more configs
Alvin Lee (5):
drm/amd/display: Include udelay when waiting for INBOX0 ACK drm/amd/display: Use DRAM speed from validation for dummy p-state drm/amd/display: Increase num voltage states to 40 drm/amd/display: Enable SubVP on 1080p60 displays drm/amd/display: If P-State is supported try SubVP for smaller vlevel
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.193.0
Aric Cyr (1):
drm/amd/display: 3.2.261
Bhuvana Chandra Pinninti (1):
drm/amd/display: Refactor DSC into component folder
Camille Cho (1):
drm/amd/display: Simplify brightness initialization
Dennis Chan (2):
drm/amd/display: Add new Replay command and Disabled Replay Timing
Reysnc
drm/amd/display: Disable Timing sync check in Full-Screen Video Case
Gabe Teeger (1):
Revert "drm/amd/display: Enable CM low mem power optimization"
Ian Chen (1):
drm/amd/display: add skip_implict_edp_power_control flag for dce110
Ilya Bakoulin (1):
drm/amd/display: Fix MPCC 1DLUT programming
Max Tseng (2):
drm/amd/display: replay: generalize the send command function usage drm/amd/display: replay: Augment Frameupdate Command
Meenakshikumar Somasundaram (1):
drm/amd/display: Fix tiled display misalignment
Michael Strauss (1):
drm/amd/display: Do not read DPREFCLK spread info from LUT on DCN35
Nicholas Kazlauskas (7):
drm/amd/display: Add z-state support policy for dcn35 drm/amd/display: Update DCN35 watermarks drm/amd/display: Add Z8 watermarks for DML2 bbox overrides drm/amd/display: Feed SR and Z8 watermarks into DML2 for DCN35 drm/amd/display: Remove min_dst_y_next_start check for Z8 drm/amd/display: Update min Z8 residency time to 2100 for DCN314 drm/amd/display: Update DCN35 clock table policy
Parandhaman K (1):
drm/amd/display: Refactor OPTC into component folder
Sung Joon Kim (1):
drm/amd/display: Fix black screen on video playback with embedded
panel
Taimur Hassan (3):
drm/amd/display: Remove config update drm/amd/display: Fix conversions between bytes and KB drm/amd/display: Fix some HostVM parameters in DML
Wayne Lin (1):
drm/amd/display: adjust flow for deallocation mst payload
Wenjing Liu (3):
drm/amd/display: fix a pipe mapping error in dcn32_fpu drm/amd/display: update pixel clock params after stream slice count
change in context
drm/amd/display: always use mpc factor of 2 for stereo timings
Zhongwei (1):
drm/amd/display: force toggle rate wa for first link training for a
retimer
drivers/gpu/drm/amd/display/Makefile | 2 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 53 ++++---
drivers/gpu/drm/amd/display/dc/Makefile | 2 +-
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 132 +++++++++---------
drivers/gpu/drm/amd/display/dc/core/dc.c | 4 +
.../gpu/drm/amd/display/dc/core/dc_resource.c | 11 +-
drivers/gpu/drm/amd/display/dc/dc.h | 5 +-
drivers/gpu/drm/amd/display/dc/dc_types.h | 82 ++++++++---
.../gpu/drm/amd/display/dc/dce/dmub_replay.h | 2 +
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
.../dc/dcn10/dcn10_hw_sequencer_debug.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 4 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 6 +-
.../gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 +- .../display/dc/dcn32/dcn32_resource_helpers.c | 32 ++++-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 4 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 ++
drivers/gpu/drm/amd/display/dc/dm_helpers.h | 12 +-
.../gpu/drm/amd/display/dc/dml/dc_features.h | 2 +-
.../drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 15 +- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 78 ++++++----- .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 82 ++++++++++-
.../drm/amd/display/dc/dml/dcn35/dcn35_fpu.h | 2 +
.../amd/display/dc/dml2/display_mode_core.c | 18 +--
.../display/dc/dml2/dml2_dc_resource_mgmt.c | 26 ++--
.../display/dc/dml2/dml2_translation_helper.c | 60 +++++---
.../gpu/drm/amd/display/dc/dml2/dml2_utils.c | 2 +-
.../gpu/drm/amd/display/dc/dml2/dml2_utils.h | 2 +-
.../drm/amd/display/dc/dml2/dml2_wrapper.h | 2 +
drivers/gpu/drm/amd/display/dc/dsc/Makefile | 26 ++++
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.c | 0
.../display/dc/{ => dsc}/dcn20/dcn20_dsc.h | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.c | 0
.../display/dc/{ => dsc}/dcn35/dcn35_dsc.h | 0
.../drm/amd/display/dc/{inc/hw => dsc}/dsc.h | 0
.../amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 +-
.../amd/display/dc/hwss/dcn32/dcn32_hwseq.c | 6 +-
.../gpu/drm/amd/display/dc/inc/core_types.h | 1 +
drivers/gpu/drm/amd/display/dc/inc/link.h | 3 +
.../drm/amd/display/dc/link/link_detection.c | 2 +-
.../gpu/drm/amd/display/dc/link/link_dpms.c | 108 ++------------
.../drm/amd/display/dc/link/link_factory.c | 1 +
.../link_dp_training_fixed_vs_pe_retimer.c | 6 +-
.../link/protocols/link_edp_panel_control.c | 46 ++++--
.../link/protocols/link_edp_panel_control.h | 4 +-
drivers/gpu/drm/amd/display/dc/optc/Makefile | 108 ++++++++++++++
.../display/dc/{ => optc}/dcn10/dcn10_optc.c | 0
.../display/dc/{ => optc}/dcn10/dcn10_optc.h | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.c | 0
.../display/dc/{ => optc}/dcn20/dcn20_optc.h | 2 +-
.../dc/{ => optc}/dcn201/dcn201_optc.c | 0
.../dc/{ => optc}/dcn201/dcn201_optc.h | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.c | 0
.../display/dc/{ => optc}/dcn30/dcn30_optc.h | 0
.../dc/{ => optc}/dcn301/dcn301_optc.c | 0
.../dc/{ => optc}/dcn301/dcn301_optc.h | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.c | 0
.../display/dc/{ => optc}/dcn31/dcn31_optc.h | 0
.../dc/{ => optc}/dcn314/dcn314_optc.c | 0
.../dc/{ => optc}/dcn314/dcn314_optc.h | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.c | 0
.../display/dc/{ => optc}/dcn32/dcn32_optc.h | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.c | 0
.../display/dc/{ => optc}/dcn35/dcn35_optc.h | 0
.../dc/resource/dcn20/dcn20_resource.c | 16 ++-
.../dc/resource/dcn20/dcn20_resource.h | 1 +
.../dc/resource/dcn314/dcn314_resource.c | 2 +-
.../dc/resource/dcn32/dcn32_resource.c | 1 +
.../dc/resource/dcn32/dcn32_resource.h | 10 ++
.../dc/resource/dcn321/dcn321_resource.c | 1 +
.../dc/resource/dcn35/dcn35_resource.c | 11 +-
.../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 80 ++++++++++-
.../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 +
79 files changed, 742 insertions(+), 391 deletions(-) rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn20/dcn20_dsc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => dsc}/dcn35/dcn35_dsc.h (100%) rename drivers/gpu/drm/amd/display/dc/{inc/hw => dsc}/dsc.h (100%) create mode 100644 drivers/gpu/drm/amd/display/dc/optc/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn10/dcn10_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn20/dcn20_optc.h (99%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn201/dcn201_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn30/dcn30_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn301/dcn301_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn31/dcn31_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn314/dcn314_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn32/dcn32_optc.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => optc}/dcn35/dcn35_optc.h (100%)--
2.42.0