DC Patches June 3, 2024
Subsystems (3)
cover DC Patches June 3, 2024
This DC ptchset brings improvements in multiple areas. In summary, we have:
* FW Release 0.0.221.0
* Fixed missing targets in FAMS2
* Populate hardware_release hook for dcn401
* Disable DMCUB timeout for DCN35
* Move PRIMARY plane zpos higher
* Introduce overlay cursor mode
* Change dram_clock_latency for dcn35 and dcn351
* DCN401 cursor code update
Alex Hung (6):
drm/amd/display: Fix incorrect size calculation for loop in dcn401 drm/amd/display: Fix uninitialized variables in dcn401 drm/amd/display: Remove useless comparison of unsigned int vs. 0 drm/amd/display: Remove NO_EFFECT self-assignment drm/amd/display: Explicitly cast v_total to signed in a subtraction drm/amd/display: Avoid overflow from uint32_t to uint8_t
Alvin Lee (3):
drm/amd/display: Remove NULL assignment for stream_status drm/amd/display: Ignore phantom DTBCLK requirement drm/amd/display: populate hardware_release hook for dcn401
Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.220.0 drm/amd/display: [FW Promotion] Release 0.0.221.0
Aric Cyr (1):
drm/amd/display: 3.2.288
Chris Park (3):
drm/amd/display: Change AVI Info Frame version to 4 for OVT drm/amd/display: Prevent overflow on DTO calculation drm/amd/display: Avoid programming DTO if Refclk is 0
ChunTao Tso (2):
drm/amd/display: Replay low hz drm/amd/display: Replay + IPS + ABM in Full Screen VPB
Daniel Miess (2):
drm/amd/display: Change dram_clock_latency to 34us for dcn351 drm/amd/display: Disable PHYSYMCLK RCO
Daniel Sa (1):
drm/amd/display: Return after Init
Dennis Chan (1):
drm/amd/display: Fix Replay Desync Error Test
Dillon Varone (5):
drm/amd/display: Block SubVP if hardware rotation is used in DML2.1 drm/amd/display: Add null check for phantom pipes in prepare mcache drm/amd/display: Fix missed targets in FAMS2+HWFQ drm/amd/display: Do not override dml2.1 reinit drm/amd/display: Update idle hardmins if uclk or fclk requirement
changed
Fangzhi Zuo (1):
drm/amd/display: Update efficiency bandwidth for dcn351
George Shen (1):
drm/amd/display: Ignore UHBR13.5 cable ID cap for passive cable max
link rate
Ivan Lipski (5):
drm/amd/display: Remove redundant if conditions drm/amd/display: Remove unreachable check
drm/amd/display: Remove redundant ternary operation drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr
code
drm/amd/display: Remove reduntant comparisons by Coverity
JinZe.Xu (1):
drm/amd/display: Disable IPS when it is not allowed.
Joshua Aberback (1):
drm/amd/display: Disable boot optimization for DCN401
Josip Pavic (1):
drm/amd/display: define abm debug interface
Leo Li (2):
drm/amd/display: Introduce overlay cursor mode
drm/amd/display: Move PRIMARY plane zpos higher
Leon Huang (1):
drm/amd/display: Expand supported Replay residency mode
Michael Strauss (2):
drm/amd/display: Update FIXED_VS retimer training pattern delay drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps
Nevenko Stupar (1):
drm/amd/display: Fix multiple cursors when using 4 displays on a
contiguous large surface
Nicholas Kazlauskas (3):
drm/amd/display: Add sequential ONO sequencing for DCN35 drm/amd/display: Remove register from DCN35 DMCUB diagnostic
collection
drm/amd/display: Disable DMCUB timeout for DCN35
Paul Hsieh (1):
drm/amd/display: change dram_clock_latency to 34us for dcn35
Rodrigo Siqueira (2):
drm/amd/display: Use the SPDX license identifier for dmub_replay files drm/amd/display: Check otg_master pointer before use it
Roman Li (1):
drm/amd/display: Add config support entry to replay caps debugfs
Sridevi Arvindekar (2):
drm/amd/display: DCN401 cusor code update drm/amd/display: Minor cleanup for DCN401 cursor related code
Sung-huai Wang (1):
Revert "drm/amd/display: Handle HPD_IRQ for internal link"
Wayne Lin (5):
drm/amd/display: Adjust debug msg for usb4/tbt drm/amd/display: Defer the setting of link hpd status for usb4/tbt drm/amd/display: Correct the defined value for
AMDGPU_DMUB_NOTIFICATION_MAX
drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()
Wenjing Liu (7):
drm/amd/display: use even ODM slice width for two pixels per container drm/amd/display: add odm_slice_rect parameter in spl_in drm/amd/display: reduce ODM slice count to initial new dc state only
when needed
drm/amd/display: remove dpp pipes on failure to update pipe params drm/amd/display: remove ODM combine before bandwidth validation drm/amd/display: use preferred link settings for dp signal only drm/amd/display: make ODM segment width of YCbCr422 two pixel aligned
Zaeem Mohamed (1):
drm/amd/display: Remove dcn32_smu13 duplicate header
pochchan (1):
drm/amd/display: Use TPS3 for ALPM on Specific Panel
winstang (1):
drm/amd/display: added NULL check at start of dc_validate_stream
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 589 +++++++++++++----- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 9 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 1 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 248 +++++--- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 29 +- .../drm/amd/display/dc/basics/fixpt31_32.c | 4 - .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 2 +- .../dc/clk_mgr/dcn32/smu13_driver_if.h | 108 ---- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 90 ++- .../gpu/drm/amd/display/dc/core/dc_state.c | 67 +- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 5 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 5 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 6 +- .../drm/amd/display/dc/dce/dce_clock_source.c | 12 +- .../drm/amd/display/dc/dce/dce_mem_input.c | 6 +- .../gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c | 2 +- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 124 ++-- .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 35 +- .../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 6 +- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 + .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 2 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 2 +- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 10 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 14 +- .../dml21/src/dml2_core/dml2_core_shared.c | 4 - .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 3 +- .../display/dc/dml2/dml2_translation_helper.c | 1 + .../drm/amd/display/dc/dml2/dml2_wrapper.c | 4 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 5 - .../amd/display/dc/dpp/dcn401/dcn401_dpp.c | 5 - drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 11 +- .../gpu/drm/amd/display/dc/gpio/hw_generic.c | 2 +- drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 5 + .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 85 ++- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 85 ++- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 2 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 2 +- .../gpu/drm/amd/display/dc/irq/irq_service.c | 2 +- .../link_hwss_hpo_fixed_vs_pe_retimer_dp.c | 6 +- .../dc/link/protocols/link_dp_capability.c | 46 +- .../dc/link/protocols/link_dp_irq_handler.c | 24 +- .../dc/link/protocols/link_dp_training.c | 8 +- .../dc/resource/dcn20/dcn20_resource.c | 4 +- .../dc/resource/dcn30/dcn30_resource.c | 3 - .../dc/resource/dcn35/dcn35_resource.c | 7 +- .../dc/resource/dcn351/dcn351_resource.c | 2 +- .../dc/resource/dcn401/dcn401_resource.c | 1 + drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 32 +- .../gpu/drm/amd/display/dc/spl/dc_spl_types.h | 4 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 157 ++++- .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 5 +- 60 files changed, 1226 insertions(+), 700 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/smu13_driver_if.h
Signature · 1 line
2.34.1
PATCH 1/67 drm/amd/display: Use TPS3 for ALPM on Specific Panel
From: pochchan <[email protected]>
For some specific panel, it need to use TPS3 rather than use TP2 in ALPM when DSC is enabled.
--- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +5 -2
@@ -33,6 +33,9 @@#define MAX_PIPES 6 +static const uint8_t DP_SINK_DEVICE_STR_ID_1 [] = {7 ,1 ,8 ,7 ,3 }; +static const uint8_t DP_SINK_DEVICE_STR_ID_2 [] = {7 ,1 ,8 ,7 ,5 }; +/* * Get Replay state from firmware. */
@@ -194,11 +197,11 @@ static bool dmub_replay_copy_settings(struct dmub_replay *dmub, (link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT && !link->panel_config.dsc.disable_dsc_edp && link->dc->caps.edp_dsc_support)) && - link->dpcd_caps.sink_dev_id ==DP_DEVICE_ID_38EC11 /*&& + link->dpcd_caps.sink_dev_id ==DP_DEVICE_ID_38EC11 && (!memcmp (link->dpcd_caps.sink_dev_id_str,DP_SINK_DEVICE_STR_ID_1 ,sizeof (DP_SINK_DEVICE_STR_ID_1 )) || !memcmp (link->dpcd_caps.sink_dev_id_str,DP_SINK_DEVICE_STR_ID_2 , - sizeof(DP_SINK_DEVICE_STR_ID_2)))*/) + sizeof(DP_SINK_DEVICE_STR_ID_2)))) copy_settings_data->flags.bitfields.force_wakeup_by_tps3 = 1; else copy_settings_data->flags.bitfields.force_wakeup_by_tps3 = 0;
Signature · 1 line
2.34.1
PATCH 2/67 drm/amd/display: Replay low hz
In reply to Zaeem MohamedFrom: ChunTao Tso <[email protected]>
[Why]
The original coasting vtotal is 2 bytes, and it need to be amended to 4 bytes because low hz case.
[How]
Amend coasting vtotal from 2 bytes to 4 bytes.
--- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 34 +++++++++++-------- .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 4 +-- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 8 +++++ 3 files changed, 30 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +20 -14
@@ -216,17 +216,21 @@ static bool dmub_replay_copy_settings(struct dmub_replay *dmub,* Set coasting vtotal. */ static void dmub_replay_set_coasting_vtotal (struct dmub_replay *dmub, -uint16_t coasting_vtotal, +uint32_t coasting_vtotal,uint8_t panel_inst) {union dmub_rb_cmd cmd;struct dc_context *dc = dmub->ctx; +struct dmub_rb_cmd_replay_set_coasting_vtotal *pCmd =NULL ; + + pCmd = &(cmd.replay_set_coasting_vtotal);memset (&cmd,0 ,sizeof (cmd)); - cmd.replay_set_coasting_vtotal.header.type =DMUB_CMD__REPLAY ; - cmd.replay_set_coasting_vtotal.header.sub_type =DMUB_CMD__REPLAY_SET_COASTING_VTOTAL ; - cmd.replay_set_coasting_vtotal.header.payload_bytes =sizeof (struct dmub_cmd_replay_set_coasting_vtotal_data ); - cmd.replay_set_coasting_vtotal.replay_set_coasting_vtotal_data.coasting_vtotal = coasting_vtotal; + pCmd->header.type =DMUB_CMD__REPLAY ; + pCmd->header.sub_type =DMUB_CMD__REPLAY_SET_COASTING_VTOTAL ; + pCmd->header.payload_bytes =sizeof (struct dmub_cmd_replay_set_coasting_vtotal_data ); + pCmd->replay_set_coasting_vtotal_data.coasting_vtotal = (coasting_vtotal &0xFFFF ); + pCmd->replay_set_coasting_vtotal_data.coasting_vtotal_high = (coasting_vtotal &0xFFFF0000 ) >>16 ;dc_wake_and_execute_dmub_cmd (dc, &cmd,DM_DMUB_WAIT_TYPE_WAIT ); }
@@ -259,20 +263,22 @@ static void dmub_replay_residency(struct dmub_replay *dmub, uint8_t panel_inst,* Set REPLAY power optimization flags and coasting vtotal. */ static void dmub_replay_set_power_opt_and_coasting_vtotal (struct dmub_replay *dmub, -unsigned int power_opt,uint8_t panel_inst,uint16_t coasting_vtotal) +unsigned int power_opt,uint8_t panel_inst,uint32_t coasting_vtotal) {union dmub_rb_cmd cmd;struct dc_context *dc = dmub->ctx; +struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal *pCmd =NULL ; + + pCmd = &(cmd.replay_set_power_opt_and_coasting_vtotal);memset (&cmd,0 ,sizeof (cmd)); - cmd.replay_set_power_opt_and_coasting_vtotal.header.type =DMUB_CMD__REPLAY ; - cmd.replay_set_power_opt_and_coasting_vtotal.header.sub_type = -DMUB_CMD__REPLAY_SET_POWER_OPT_AND_COASTING_VTOTAL ; - cmd.replay_set_power_opt_and_coasting_vtotal.header.payload_bytes = -sizeof (struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal ); - cmd.replay_set_power_opt_and_coasting_vtotal.replay_set_power_opt_data.power_opt = power_opt; - cmd.replay_set_power_opt_and_coasting_vtotal.replay_set_power_opt_data.panel_inst = panel_inst; - cmd.replay_set_power_opt_and_coasting_vtotal.replay_set_coasting_vtotal_data.coasting_vtotal = coasting_vtotal; + pCmd->header.type =DMUB_CMD__REPLAY ; + pCmd->header.sub_type =DMUB_CMD__REPLAY_SET_POWER_OPT_AND_COASTING_VTOTAL ; + pCmd->header.payload_bytes =sizeof (struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal ); + pCmd->replay_set_power_opt_data.power_opt = power_opt; + pCmd->replay_set_power_opt_data.panel_inst = panel_inst; + pCmd->replay_set_coasting_vtotal_data.coasting_vtotal = (coasting_vtotal &0xFFFF ); + pCmd->replay_set_coasting_vtotal_data.coasting_vtotal_high = (coasting_vtotal &0xFFFF0000 ) >>16 ;dc_wake_and_execute_dmub_cmd (dc, &cmd,DM_DMUB_WAIT_TYPE_WAIT ); }
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +2 -2
@@ -47,12 +47,12 @@ struct dmub_replay_funcs { uint8_t panel_inst);void (*replay_send_cmd)(struct dmub_replay *dmub,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, +void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub,uint32_t coasting_vtotal,uint8_t panel_inst);void (*replay_residency)(struct dmub_replay *dmub,uint8_t panel_inst,uint32_t *residency,const bool is_start,const bool is_alpm);void (*replay_set_power_opt_and_coasting_vtotal)(struct dmub_replay *dmub, -unsigned int power_opt,uint8_t panel_inst,uint16_t coasting_vtotal); +unsigned int power_opt,uint8_t panel_inst,uint32_t coasting_vtotal); };struct dmub_replay *dmub_replay_create (struct dc_context *ctx);
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +8 -0
@@ -3004,6 +3004,14 @@ struct dmub_cmd_update_dirty_rect_data {* Currently the support is only for 0 or 1 */ uint8_t panel_inst; +/** +* 16-bit value dicated by driver that indicates the coasting vtotal high byte part. +*/ +uint16_t coasting_vtotal_high; +/** +* Explicit padding to 4 byte boundary. +*/ +uint8_t pad[2 ]; };/**
Signature · 1 line
2.34.1
PATCH 3/67 drm/amd/display: Expand supported Replay residency mode
In reply to Zaeem MohamedFrom: Leon Huang <[email protected]>
[Why]
Dmub provides several Replay residency calculation methods, but current interface only supports either ALPM or PHY mode
[How]
Modify the interface for supporting different types of Replay residency calculation.
--- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 32 ++++++++++++++----- .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +24 -8
@@ -239,23 +239,39 @@ static void dmub_replay_set_coasting_vtotal(struct dmub_replay *dmub,* Get Replay residency from firmware. */ static void dmub_replay_residency (struct dmub_replay *dmub,uint8_t panel_inst, -uint32_t *residency,const bool is_start,const bool is_alpm) +uint32_t *residency,const bool is_start,enum pr_residency_mode mode) { -struct dmub_srv *srv = dmub->ctx->dmub_srv->dmub;uint16_t param = (uint16_t )(panel_inst <<8 ); -if (is_alpm) +switch (mode) { +case PR_RESIDENCY_MODE_PHY : + param |=REPLAY_RESIDENCY_FIELD_MODE_PHY ; +break ; +case PR_RESIDENCY_MODE_ALPM : param |=REPLAY_RESIDENCY_FIELD_MODE_ALPM ; +break ; +case PR_RESIDENCY_MODE_IPS2 : + param |=REPLAY_RESIDENCY_REVISION_1 ; + param |=REPLAY_RESIDENCY_FIELD_MODE2_IPS ; +break ; +case PR_RESIDENCY_MODE_FRAME_CNT : + param |=REPLAY_RESIDENCY_REVISION_1 ; + param |=REPLAY_RESIDENCY_FIELD_MODE2_FRAME_CNT ; +break ; +case PR_RESIDENCY_MODE_ENABLEMENT_PERIOD : + param |=REPLAY_RESIDENCY_REVISION_1 ; + param |=REPLAY_RESIDENCY_FIELD_MODE2_EN_PERIOD ; +break ; +default : +break ; + }if (is_start) param |=REPLAY_RESIDENCY_ENABLE ;// Send gpint command and wait for ack -dmub_srv_send_gpint_command (srv,DMUB_GPINT__REPLAY_RESIDENCY , param,30 ); - -if (!is_start) -dmub_srv_get_gpint_response (srv, residency); -else +if (!dc_wake_and_execute_gpint (dmub->ctx,DMUB_GPINT__REPLAY_RESIDENCY , param, + residency,DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY )) *residency =0 ; }
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.h +1 -1
@@ -50,7 +50,7 @@ struct dmub_replay_funcs {void (*replay_set_coasting_vtotal)(struct dmub_replay *dmub,uint32_t coasting_vtotal,uint8_t panel_inst);void (*replay_residency)(struct dmub_replay *dmub, -uint8_t panel_inst,uint32_t *residency,const bool is_start,const bool is_alpm); +uint8_t panel_inst,uint32_t *residency,const bool is_start,const enum pr_residency_mode mode);void (*replay_set_power_opt_and_coasting_vtotal)(struct dmub_replay *dmub,unsigned int power_opt,uint8_t panel_inst,uint32_t coasting_vtotal); };
Signature · 1 line
2.34.1
PATCH 4/67 drm/amd/display: Replay + IPS + ABM in Full Screen VPB
In reply to Zaeem MohamedFrom: ChunTao Tso <[email protected]>
[Why]
Because ABM will wait VStart to start getting histogram data, it will cause we can't enter IPS while full screnn video playing.
[How]
Modify the panel refresh rate to the maximun multiple of current refresh rate
--- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +12 -0
@@ -350,6 +350,18 @@ static void dmub_replay_send_cmd(struct dmub_replay *dmub, cmd.replay_set_frameupdate_timer.data.frameupdate_count = cmd_element->timer_data.frameupdate_count;break ; +case Replay_Set_Pseudo_VTotal: +//Header + cmd.replay_set_pseudo_vtotal.header.sub_type = +DMUB_CMD__REPLAY_SET_PSEUDO_VTOTAL ; + cmd.replay_set_pseudo_vtotal.header.payload_bytes = +sizeof (struct dmub_rb_cmd_replay_set_pseudo_vtotal ); +//Cmd Body + cmd.replay_set_pseudo_vtotal.data.panel_inst = + cmd_element->pseudo_vtotal_data.panel_inst; + cmd.replay_set_pseudo_vtotal.data.vtotal = + cmd_element->pseudo_vtotal_data.vtotal; +break ;case Replay_Msg_Not_Support:default :return ;
Signature · 1 line
2.34.1
PATCH 5/67 drm/amd/display: Fix Replay Desync Error Test
In reply to Zaeem MohamedFrom: Dennis Chan <[email protected]>
When PHY power off, the DP_SEC_CNTL cannot be configured and cause disable Adaptive sync SDP failed. Regarding the issue, the driver will disabled AS-SDP in replay state machine.
--- drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +12 -0
@@ -362,6 +362,18 @@ static void dmub_replay_send_cmd(struct dmub_replay *dmub, cmd.replay_set_pseudo_vtotal.data.vtotal = cmd_element->pseudo_vtotal_data.vtotal;break ; +case Replay_Disabled_Adaptive_Sync_SDP: +//Header + cmd.replay_disabled_adaptive_sync_sdp.header.sub_type = +DMUB_CMD__REPLAY_DISABLED_ADAPTIVE_SYNC_SDP ; + cmd.replay_disabled_adaptive_sync_sdp.header.payload_bytes = +sizeof (struct dmub_rb_cmd_replay_set_pseudo_vtotal ); +//Cmd Body + cmd.replay_disabled_adaptive_sync_sdp.data.panel_inst = + cmd_element->disabled_adaptive_sync_sdp_data.panel_inst; + cmd.replay_disabled_adaptive_sync_sdp.data.force_disabled = + cmd_element->disabled_adaptive_sync_sdp_data.force_disabled; +break ;case Replay_Msg_Not_Support:default :return ;
Signature · 1 line
2.34.1
PATCH 6/67 drm/amd/display: use even ODM slice width for two pixels per container
In reply to Zaeem MohamedFrom: Wenjing Liu <[email protected]>
[why]
When optc uses two pixel per container, each ODM slice width must be an even number.
[how]
If ODM slice width is odd number increase it by 1.
--- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 3 +++ drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/spl/dc_spl.c +3 -0
@@ -173,6 +173,9 @@ static struct spl_rect calculate_odm_slice_in_timing_active(struct spl_in *spl_iint odm_slice_width = h_active / odm_slice_count;struct spl_rect odm_rec; +if (spl_in->basic_out.use_two_pixels_per_container && (odm_slice_width %2 )) + odm_slice_width++; + odm_rec.x = odm_slice_width * odm_slice_idx; odm_rec.width = is_last_odm_slice ?/* last slice width is the reminder of h_active */
drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h +1 -0
@@ -441,6 +441,7 @@ struct basic_out {bool always_scale;// Is always scale enabled? Required for getting SCL_MODE int max_downscale_src_width;// Required to get optimal no of taps bool alpha_en; +bool use_two_pixels_per_container; };enum explicit_sharpness {SHARPNESS_LOW =0 ,
Signature · 1 line
2.34.1
PATCH 7/67 drm/amd/display: add odm_slice_rect parameter in spl_in
In reply to Zaeem MohamedFrom: Wenjing Liu <[email protected]>
[why]
OPP input rect aka odm slice rect is a hardware dependent parameter that can't be determined by SPL software logic. Therefore we need to explicitly pass odm slice rect in. So ODM slice rect calculation is moved out of SPL.
[how]
add odm_slice_rect parameter in spl_in
--- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 5 ++- drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 35 ++++++++++++------- .../gpu/drm/amd/display/dc/spl/dc_spl_types.h | 3 +- 3 files changed, 28 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_spl_translate.c +4 -1
@@ -70,6 +70,8 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl {const struct dc_plane_state *plane_state = pipe_ctx->plane_state;const struct dc_stream_state *stream = pipe_ctx->stream; +struct rect odm_slice_src =resource_get_odm_slice_src_rect (pipe_ctx); +// Assign the function to calculate the number of partitions in the line buffer // This is used to determine the vtap support switch (plane_state->ctx->dce_version) {
@@ -112,7 +114,8 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct splelse spl_in->basic_in.mpc_combine_v =resource_get_mpc_slice_index (pipe_ctx); - spl_in->basic_out.odm_combine_factor =resource_get_odm_slice_count (pipe_ctx); +populate_splrect_from_rect (&spl_in->basic_out.odm_slice_rect, &odm_slice_src); + spl_in->basic_out.odm_combine_factor =0 ; spl_in->odm_slice_index =resource_get_odm_slice_index (pipe_ctx);// Make spl input basic out info output_size width point to stream h active spl_in->basic_out.output_size.width =
drivers/gpu/drm/amd/display/dc/spl/dc_spl.c +22 -13
@@ -170,22 +170,31 @@ static struct spl_rect calculate_odm_slice_in_timing_active(struct spl_in *spl_ibool is_last_odm_slice = (odm_slice_idx +1 ) == odm_slice_count;int h_active = spl_in->basic_out.output_size.width;int v_active = spl_in->basic_out.output_size.height; -int odm_slice_width = h_active / odm_slice_count; +int odm_slice_width;struct spl_rect odm_rec; -if (spl_in->basic_out.use_two_pixels_per_container && (odm_slice_width %2 )) - odm_slice_width++; - - odm_rec.x = odm_slice_width * odm_slice_idx; - odm_rec.width = is_last_odm_slice ? -/* last slice width is the reminder of h_active */ - h_active - odm_slice_width * (odm_slice_count -1 ) : -/* odm slice width is the floor of h_active / count */ - odm_slice_width; - odm_rec.y =0 ; - odm_rec.height = v_active; +if (spl_in->basic_out.odm_combine_factor >0 ) { + odm_slice_width = h_active / odm_slice_count; +/* +* deprecated, caller must pass in odm slice rect i.e OPP input +* rect in timing active for the new interface. +*/ +if (spl_in->basic_out.use_two_pixels_per_container && (odm_slice_width %2 )) + odm_slice_width++; + + odm_rec.x = odm_slice_width * odm_slice_idx; + odm_rec.width = is_last_odm_slice ? +/* last slice width is the reminder of h_active */ + h_active - odm_slice_width * (odm_slice_count -1 ) : +/* odm slice width is the floor of h_active / count */ + odm_slice_width; + odm_rec.y =0 ; + odm_rec.height = v_active; + +return odm_rec; + } -return odm_rec; +return spl_in->basic_out.odm_slice_rect; }static void spl_calculate_recout (struct spl_in *spl_in,struct spl_out *spl_out)
drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h +2 -1
@@ -436,7 +436,8 @@ struct basic_out {struct spl_size output_size;// Output Size struct spl_rect dst_rect;// Destination Rect struct spl_rect src_rect;// Source rect -int odm_combine_factor;// ODM Combine Factor determine by get_odm_splits +int odm_combine_factor;// deprecated +struct spl_rect odm_slice_rect;// OPP input rect in timing active enum spl_view_3d view_format;// TODO: View format Check if it is chroma subsampling bool always_scale;// Is always scale enabled? Required for getting SCL_MODE int max_downscale_src_width;// Required to get optimal no of taps
Signature · 1 line
2.34.1
PATCH 8/67 drm/amd/display: Remove redundant if conditions
In reply to Zaeem MohamedFrom: Ivan Lipski <[email protected]>
[WHY]
Coverity analysis flagged the two if conditions in dcn30_dpp.c and dcn401_dpp.c as DEADCODE since they are never true, since the variable 'program_prealpha_dealpha' is initialized at 0 and never chagnes.
[HOW]
Removed the variable 'program_prealpha_dealpha' and the if conditions.
--- drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 5 ----- drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c | 5 ----- 2 files changed, 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +0 -5
@@ -219,7 +219,6 @@ void dpp3_cnv_setup (uint32_t alpha_plane_enable =0 ;uint32_t dealpha_en =0 , dealpha_ablnd_en =0 ;uint32_t realpha_en =0 , realpha_ablnd_en =0 ; -uint32_t program_prealpha_dealpha =0 ;struct out_csc_color_matrix tbl_entry;int i;
@@ -347,10 +346,6 @@ void dpp3_cnv_setup ( CNVC_ALPHA_PLANE_ENABLE, alpha_plane_enable);REG_UPDATE (FORMAT_CONTROL ,FORMAT_CONTROL__ALPHA_EN , alpha_en); -if (program_prealpha_dealpha) { - dealpha_en =1 ; - realpha_en =1 ; - }REG_SET_2 (PRE_DEALPHA ,0 ,PRE_DEALPHA_EN , dealpha_en,PRE_DEALPHA_ABLND_EN , dealpha_ablnd_en);
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c +0 -5
@@ -68,7 +68,6 @@ void dpp401_dpp_setup(uint32_t alpha_plane_enable =0 ;uint32_t dealpha_en =0 , dealpha_ablnd_en =0 ;uint32_t realpha_en =0 , realpha_ablnd_en =0 ; -uint32_t program_prealpha_dealpha =0 ;struct out_csc_color_matrix tbl_entry;int i;
@@ -192,10 +191,6 @@ void dpp401_dpp_setup( CNVC_ALPHA_PLANE_ENABLE, alpha_plane_enable);REG_UPDATE (FORMAT_CONTROL ,FORMAT_CONTROL__ALPHA_EN , alpha_en); -if (program_prealpha_dealpha) { - dealpha_en =1 ; - realpha_en =1 ; - }REG_SET_2 (PRE_DEALPHA ,0 ,PRE_DEALPHA_EN , dealpha_en,PRE_DEALPHA_ABLND_EN , dealpha_ablnd_en);
Signature · 1 line
2.34.1
PATCH 9/67 drm/amd/display: Remove unreachable check
In reply to Zaeem MohamedFrom: Ivan Lipski <[email protected]>
[WHY]
Coverity analysis flagged this code as DEADCODE since the condition and return in the outer loop are never reached.
All operations with the 'dwb_pipe' variable happen in the inner loop, that already contains the same check with the 'MAX_DWB_PIPES'. The later check condition cannot occur before the check condition in the inner loop, thus the later condition is unreacable.
[HOW]
Remove the unreachable condition.
--- drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c | 2 -- drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c | 3 --- 2 files changed, 5 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +0 -2
@@ -1666,8 +1666,6 @@ void dcn20_set_mcif_arb_params(if (dwb_pipe >=MAX_DWB_PIPES )return ; } -if (dwb_pipe >=MAX_DWB_PIPES ) -return ; } }
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +0 -3
@@ -1419,10 +1419,7 @@ void dcn30_set_mcif_arb_params(if (dwb_pipe >=MAX_DWB_PIPES )return ; } -if (dwb_pipe >=MAX_DWB_PIPES ) -return ; } - }static struct dc_cap_funcs cap_funcs = {
Signature · 1 line
2.34.1
PATCH 10/67 drm/amd/display: Remove redundant ternary operation
In reply to Zaeem MohamedFrom: Ivan Lipski <[email protected]>
[WHY]
Coverity analysis flagged this ternary operation as DEADCODE.
Since 'total_y_free_entry' is initialized as 0x200 and 'total_c_free_entry' is initialized as 0x140, and they never change values before the ternary operator, so 'total_y_free_entry' is always greater 'total_c_free_entry', 'so small_free_entry' is always set to 'total_c_free_entry'.
[HOW]
Replace the ternary operator with the variable declaration.
--- drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 -1
@@ -1612,7 +1612,7 @@ unsigned int dcn20_calc_max_scaled_time(if (time_per_byte ==0 ) time_per_byte =1 ; - small_free_entry = (total_y_free_entry > total_c_free_entry) ? total_c_free_entry : total_y_free_entry; + small_free_entry = total_c_free_entry; max_free_entry = (mode ==PACKED_444 ) ? total_y_free_entry + total_c_free_entry : small_free_entry; buf_lh_capability = max_free_entry*time_per_byte*32 /16 ;/* there is 4bit fraction */ max_scaled_time = buf_lh_capability - urgent_watermark;
Signature · 1 line
2.34.1
PATCH 11/67 drm/amd/display: Remove dcn32_smu13 duplicate header
In reply to Zaeem Mohamed[WHY]
Duplicate headers requiring unecessary maintenance of both headers
[HOW]
Removal of smu13_driver_if header and all referneces to it changed to dcn32_smu13_driver
--- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 2 +- .../dc/clk_mgr/dcn32/smu13_driver_if.h | 108 ------------------ 3 files changed, 2 insertions(+), 110 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/smu13_driver_if.h
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +1 -1
@@ -36,7 +36,7 @@#include "link.h" #include "dc_state_priv.h" #include "atomfirmware.h" -#include "smu13_driver_if.h" +#include "dcn32_smu13_driver_if.h" #include "dcn/dcn_3_2_0_offset.h" #include "dcn/dcn_3_2_0_sh_mask.h"
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c +1 -1
@@ -28,7 +28,7 @@#include "clk_mgr_internal.h" #include "reg_helper.h" #include "dalsmc.h" -#include "smu13_driver_if.h" +#include "dcn32_smu13_driver_if.h" #define mmDAL_MSG_REG 0x1628A#define mmDAL_ARG_REG 0x16273
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/smu13_driver_if.h deleted +0 -108
108 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 12/67 drm/amd/display: Remove NULL assignment for stream_status
In reply to Zaeem MohamedFrom: Alvin Lee <[email protected]>
[Description]
No need to assign stream_status NULL because it is always re-assigned before usage. This change is to fix coverity errors.
--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +0 -2
@@ -444,7 +444,6 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, strufor (i =0 , pipe_idx =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; - stream_status =NULL ;if (!pipe->stream)continue ;
@@ -464,7 +463,6 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, strufor (i =0 , k =0 ; context && i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; - stream_status =NULL ;if (!resource_is_pipe_type (pipe,OTG_MASTER ))continue ;
Signature · 1 line
2.34.1
PATCH 13/67 drm/amd/display: Change AVI Info Frame version to 4 for OVT
In reply to Zaeem MohamedFrom: Chris Park <[email protected]>
[Why]
Official Release CTA specification reverted the change and no longer uses version 5 to indicate OVT timing.
[How]
Change the version used for AVI info Frame for OVT to 4.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
@@ -4287,7 +4287,7 @@ static void set_avi_info_frame( }if (rid !=0 && fr_ind !=0 ) { - hdmi_info.bits.header.version =5 ; + hdmi_info.bits.header.version =4 ; hdmi_info.bits.header.length =15 ; hdmi_info.bits.FR0_FR3 = fr_ind &0xF ;
Signature · 1 line
2.34.1
PATCH 14/67 drm/amd/display: Return after Init
In reply to Zaeem MohamedFrom: Daniel Sa <[email protected]>
why:
DML21 being overwritten after init.
how:
After initializing, early return.
--- drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c +1 -0
@@ -740,6 +740,7 @@ static void dml2_init(const struct dc *in_dc, const struct dml2_configuration_op// TODO : Temporarily add DCN_VERSION_3_2 for N-1 validation. Remove DCN_VERSION_3_2 after N-1 validation phase is complete. if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version ==DCN_VERSION_4_01 || in_dc->ctx->dce_version ==DCN_VERSION_3_2 )) {dml21_reinit (in_dc, dml2, config); +return ; }// Store config options
Signature · 1 line
2.34.1
PATCH 15/67 drm/amd/display: Fix multiple cursors when using 4 displays on a contiguous large surface
In reply to Zaeem MohamedFrom: Nevenko Stupar <[email protected]>
[Why & How]
Remove some cursor offset calculations for rotated cursor for fixing a bug where multiple cursors are seen.
--- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 25 ------------------- 1 file changed, 25 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +0 -25
@@ -1126,10 +1126,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)*/ if (param.rotation ==ROTATION_ANGLE_90 || param.rotation ==ROTATION_ANGLE_270 ) { - x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width / - pipe_ctx->stream->src.height; - y_pos = pipe_ctx->stream->dst.y + y_pos * pipe_ctx->stream->dst.height / - pipe_ctx->stream->src.width; }else { x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width / pipe_ctx->stream->src.width;
@@ -1225,15 +1221,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) } } }else if (param.rotation ==ROTATION_ANGLE_90 ) { -if (!param.mirror) { -uint32_t temp_y = pos_cpy.y; - - pos_cpy.y = pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.x; - pos_cpy.x = temp_y - prev_odm_width; - }else { -swap (pos_cpy.x, pos_cpy.y); - } - }else if (param.rotation ==ROTATION_ANGLE_270 ) {// Swap axis and mirror vertically uint32_t temp_x = pos_cpy.x;
@@ -1284,15 +1271,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) pos_cpy.y = temp_x; } }else { -if (param.mirror) { -swap (pos_cpy.x, pos_cpy.y); - - pos_cpy.x = pipe_ctx->plane_res.scl_data.recout.width - pos_cpy.x +2 * pipe_ctx->plane_res.scl_data.recout.x; - pos_cpy.y = (2 * pipe_ctx->plane_res.scl_data.recout.y) + pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.y; - }else { - pos_cpy.x = pipe_ctx->plane_res.scl_data.recout.width - pos_cpy.y; - pos_cpy.y = temp_x; - } } }else if (param.rotation ==ROTATION_ANGLE_180 ) {// Mirror horizontally and vertically
@@ -1320,7 +1298,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) } } }else { - pos_cpy.x = recout_width - pos_cpy.x +2 * recout_x; } }
@@ -1332,8 +1309,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)* Simplify it as: * pos_cpy.y = recout.y * 2 + recout.height - pos_cpy.y */ - pos_cpy.y = (2 * pipe_ctx->plane_res.scl_data.recout.y) + - pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.y; } hubp->funcs->set_cursor_position (hubp, &pos_cpy, ¶m);
Signature · 1 line
2.34.1
PATCH 16/67 drm/amd/display: reduce ODM slice count to initial new dc state only when needed
In reply to Zaeem MohamedFrom: Wenjing Liu <[email protected]>
[why]
We need to decrease ODM slice when adding or removing planes because MPO support takes precedence over dynamic ODM combine. However there is a case where we remove ODM combine even for ODM combine required timing in the initial new dc state. This is normally okay because ODM will be added back after we pass DML bandwidth validation. However since we remove ODM combine in the initial new state, the previous ODM pipe allocation is lost. This may cause the new plane to take away the original secondary OPP head pipe that is still required in the new state.
For a timing that requires ODM 2:1 but optimized with ODM 4:1, if we add an MPO plane, we will not have enough pipe to preserve ODM 4:1. In this case we should reduce ODM slice count then try to add the MPO plane again. By reducing, we are gradually remove 1 ODM slice from right most side one at a time until we have enough free pipes for the new plane. If we remove ODM combine entirely, we could use the pipe at ODM slice index 1 as a DPP pipe for the new plane. But ODM slice 1 is still needed as the timing requires ODM 2:1. This transition is not seamless and user will see corruption on the screen.
[how]
Remove single ODM slice one at time until we have enough pipes for a new plane. Remove previous logic to always remove ODM combine entirely.
--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 45 +++++++------ .../gpu/drm/amd/display/dc/core/dc_state.c | 67 +++++++++++++------ 2 files changed, 71 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +25 -20
@@ -2596,6 +2596,17 @@ static void remove_hpo_dp_link_enc_from_ctx(struct resource_context *res_ctx, } } +static int get_num_of_free_pipes (const struct resource_pool *pool,const struct dc_state *context) +{ +int i; +int count =0 ; + +for (i =0 ; i < pool->pipe_count; i++) +if (resource_is_pipe_type (&context->res_ctx.pipe_ctx[i],FREE_PIPE )) + count++; +return count; +} +enum dc_status resource_add_otg_master_for_stream_output (struct dc_state *new_ctx,const struct resource_pool *pool,struct dc_stream_state *stream)
@@ -2729,37 +2740,33 @@ static bool acquire_secondary_dpp_pipes_and_add_plane(struct dc_state *cur_ctx, struct resource_pool *pool) { - struct pipe_ctx *opp_head_pipe, *sec_pipe, *tail_pipe; + struct pipe_ctx *sec_pipe, *tail_pipe; +struct pipe_ctx *opp_heads[MAX_PIPES ]; +int opp_head_count; +int i;if (!pool->funcs->acquire_free_pipe_as_secondary_dpp_pipe) {ASSERT (0 );return false; } - opp_head_pipe = otg_master_pipe; -while (opp_head_pipe) { + opp_head_count =resource_get_opp_heads_for_otg_master (otg_master_pipe, + &new_ctx->res_ctx, opp_heads); +if (get_num_of_free_pipes (pool, new_ctx) < opp_head_count) +/* not enough free pipes */ +return false; + +for (i =0 ; i < opp_head_count; i++) { sec_pipe = pool->funcs->acquire_free_pipe_as_secondary_dpp_pipe ( cur_ctx, new_ctx, pool, - opp_head_pipe); -if (!sec_pipe) { -/* try tearing down MPCC combine */ -int pipe_idx =acquire_first_split_pipe ( - &new_ctx->res_ctx, pool, - otg_master_pipe->stream); - -if (pipe_idx >=0 ) - sec_pipe = &new_ctx->res_ctx.pipe_ctx[pipe_idx]; - } - -if (!sec_pipe) -return false; - + opp_heads[i]); +ASSERT (sec_pipe); sec_pipe->plane_state = plane_state;/* establish pipe relationship */ - tail_pipe =get_tail_pipe (opp_head_pipe); + tail_pipe =get_tail_pipe (opp_heads[i]); tail_pipe->bottom_pipe = sec_pipe; sec_pipe->top_pipe = tail_pipe; sec_pipe->bottom_pipe =NULL ;
@@ -2770,8 +2777,6 @@ static bool acquire_secondary_dpp_pipes_and_add_plane( }else { sec_pipe->prev_odm_pipe =NULL ; } - - opp_head_pipe = opp_head_pipe->next_odm_pipe; }return true; }
drivers/gpu/drm/amd/display/dc/core/dc_state.c +46 -21
97 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 17/67 drm/amd/display: Update FIXED_VS retimer training pattern delay
In reply to Zaeem MohamedFrom: Michael Strauss <[email protected]>
[WHY]
Needed for PHY patterns as well to perform electrical compliance. Also need to increase wait time from 30ms to 50ms to resolve very intermittent UHBR20 link training failures.
--- .../dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_fixed_vs_pe_retimer_dp.c +3 -3
@@ -168,9 +168,9 @@ static void set_hpo_fixed_vs_pe_retimer_dp_link_test_pattern(struct dc_link *lin link->dc->link_srv->dp_trace_source_sequence (link,DPCD_SOURCE_SEQ_AFTER_SET_SOURCE_PATTERN ); -// Give retimer extra time to lock before updating DP_TRAINING_PATTERN_SET to TPS1 -if (tp_params->dp_phy_pattern == DP_TEST_PATTERN_128b_132b_TPS1_TRAINING_MODE) -msleep (30 ); +// Give retimer extra time to lock before updating DP_TRAINING_PATTERN_SET to TPS1 or phy pattern +if (tp_params->dp_phy_pattern != DP_TEST_PATTERN_128b_132b_TPS2_TRAINING_MODE) +msleep (50 ); } static void set_hpo_fixed_vs_pe_retimer_dp_lane_settings(struct dc_link *link,
Signature · 1 line
2.34.1
PATCH 18/67 drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps
In reply to Zaeem MohamedFrom: Michael Strauss <[email protected]>
[WHY]
Some sinks are observed to return invalid LTTPR revision and/or invalid LTTPR link rate capabilities.
[HOW]
Assume any LTTPR which reports invalid max link rate supports HBR3. Don't validate LTTPR DPCD revision in dp_is_lttpr_present check.
--- .../dc/link/protocols/link_dp_capability.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c +16 -3
@@ -363,10 +363,10 @@ bool dp_is_128b_132b_signal(struct pipe_ctx *pipe_ctx)bool dp_is_lttpr_present (struct dc_link *link) { +/* Some sink devices report invalid LTTPR revision, so don't validate against that cap */ return (dp_parse_lttpr_repeater_count (link->dpcd_caps.lttpr_caps.phy_repeater_cnt) !=0 && link->dpcd_caps.lttpr_caps.max_lane_count >0 && - link->dpcd_caps.lttpr_caps.max_lane_count <=4 && - link->dpcd_caps.lttpr_caps.revision.raw >=0x14 ); + link->dpcd_caps.lttpr_caps.max_lane_count <=4 ); }/* in DP compliance test, DPR-120 may have
@@ -399,7 +399,20 @@ static enum dc_link_rate get_link_rate_from_max_link_bw(static enum dc_link_rate get_lttpr_max_link_rate (struct dc_link *link) { -enum dc_link_rate lttpr_max_link_rate = link->dpcd_caps.lttpr_caps.max_link_rate; + +enum dc_link_rate lttpr_max_link_rate =LINK_RATE_UNKNOWN ; + +switch (link->dpcd_caps.lttpr_caps.max_link_rate) { +case LINK_RATE_LOW : +case LINK_RATE_HIGH : +case LINK_RATE_HIGH2 : +case LINK_RATE_HIGH3 : + lttpr_max_link_rate = link->dpcd_caps.lttpr_caps.max_link_rate; +break ; +default : +// Assume all LTTPRs support up to HBR3 to improve misbehaving sink interop + lttpr_max_link_rate =LINK_RATE_HIGH3 ; + }if (link->dpcd_caps.lttpr_caps.supported_128b_132b_rates.bits.UHBR20) lttpr_max_link_rate =LINK_RATE_UHBR20 ;
Signature · 1 line
2.34.1
PATCH 19/67 drm/amd/display: Ignore phantom DTBCLK requirement
In reply to Zaeem MohamedFrom: Alvin Lee <[email protected]>
[Description]
Phantom DTBCLK can be calculated different from main because phantom has no DSC and thus will have a different output BPP. Ignore phantom DTBCLK requirement and only consider non-phantom DTBCLK requirements.
--- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +9 -1
@@ -7713,7 +7713,8 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_out mode_lib->ms.support.DTBCLKRequiredMoreThanSupported = false;for (k =0 ; k < mode_lib->ms.num_active_planes; ++k) { -if (display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].output.output_encoder == dml2_hdmifrl) { +if (display_cfg->stream_descriptors[display_cfg->plane_descriptors[k].stream_index].output.output_encoder == dml2_hdmifrl && + !dml_is_phantom_pipe (&display_cfg->plane_descriptors[k])) { mode_lib->ms.RequiredDTBCLK[k] = RequiredDTBCLK( mode_lib->ms.RequiresDSC[k], s->PixelClockBackEnd[k],
@@ -7728,6 +7729,13 @@ static bool dml_core_mode_support(struct dml2_core_calcs_mode_support_ex *in_outif (mode_lib->ms.RequiredDTBCLK[k] > ((double )min_clk_table->max_clocks_khz.dtbclk /1000 )) { mode_lib->ms.support.DTBCLKRequiredMoreThanSupported = true; } + }else { +/* Phantom DTBCLK can be calculated different from main because phantom has no DSC and thus +* will have a different output BPP. Ignore phantom DTBCLK requirement and only consider +* non-phantom DTBCLK requirements. In map_mode_to_soc_dpm we choose the highest DTBCLK +* required - by setting phantom dtbclk to 0 we ignore it. +*/ + mode_lib->ms.RequiredDTBCLK[k] =0 ; } }
Signature · 1 line
2.34.1
PATCH 20/67 drm/amd/display: Add sequential ONO sequencing for DCN35
In reply to Zaeem MohamedFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Adds support for performing the sequential ONO changes from DCN351 into DCN35 ASIC based on revision.
[How]
Check the revision and run the DCN351 sequences on applicable revisions.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 85 +++++++++++++++---- .../dc/resource/dcn35/dcn35_resource.c | 4 + 3 files changed, 75 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -291,6 +291,7 @@ struct dc_caps {uint8_t subvp_drr_vblank_start_margin_us;bool cursor_not_scaled;bool dcmode_power_limits_present; +bool sequential_ono; };struct dc_bug_wa {
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +70 -15
130 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +4 -0
@@ -1891,6 +1891,10 @@ static bool dcn35_resource_construct(*/ dc->caps.max_disp_clock_khz_at_vmin =650000 ; +/* Sequential ONO is based on ASIC. */ +if (dc->ctx->asic_id.hw_internal_rev >0x10 ) + dc->caps.sequential_ono = true; +/* Use pipe context based otg sync logic */ dc->config.use_pipe_ctx_sync_logic = true;
Signature · 1 line
2.34.1
PATCH 21/67 drm/amd/display: [FW Promotion] Release 0.0.220.0
In reply to Zaeem MohamedFrom: Anthony Koo <[email protected]>
- Change ordering of structs to put enums together
- Add new define DMUB_TRACE_ENTRY_DEFINED to guard the trace code enum
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +14 -12
@@ -558,6 +558,7 @@ union dmub_fw_meta {//============================================================================== //< DMUB Trace Buffer>================================================================ //============================================================================== +#if !defined(TENSILICA ) && !defined(DMUB_TRACE_ENTRY_DEFINED )/** * dmub_trace_code_t - firmware trace code, 32-bits */
@@ -572,6 +573,7 @@ struct dmcub_trace_buf_entry {uint32_t param0;/**< trace defined parameter 0 */ uint32_t param1; /**< trace defined parameter 1 */ }; +#endif //============================================================================== //< DMUB_STATUS>================================================================
@@ -2538,6 +2540,18 @@ enum dmub_cmd_psr_type { DMUB_CMD__SET_PSR_POWER_OPT = 7, }; +/** +* Different PSR residency modes. +* Different modes change the definition of PSR residency. +*/ +enum psr_residency_mode { +PSR_RESIDENCY_MODE_PHY =0 , +PSR_RESIDENCY_MODE_ALPM , +PSR_RESIDENCY_MODE_ENABLEMENT_PERIOD , +/* Do not add below. */ +PSR_RESIDENCY_MODE_LAST_ELEMENT , +}; +enum dmub_cmd_fams_type {DMUB_CMD__FAMS_SETUP_FW_CTRL =0 ,DMUB_CMD__FAMS_DRR_UPDATE =1 ,
@@ -3259,18 +3273,6 @@ struct dmub_rb_cmd_psr_set_power_opt {struct dmub_cmd_psr_set_power_opt_data psr_set_power_opt_data; }; -/** -* Different PSR residency modes. -* Different modes change the definition of PSR residency. -*/ -enum psr_residency_mode { -PSR_RESIDENCY_MODE_PHY =0 , -PSR_RESIDENCY_MODE_ALPM , -PSR_RESIDENCY_MODE_ENABLEMENT_PERIOD , -/* Do not add below. */ -PSR_RESIDENCY_MODE_LAST_ELEMENT , -}; -/** * Definition of Replay Residency GPINT command. * Bit[0] - Residency mode for Revision 0
Signature · 1 line
2.34.1
PATCH 22/67 drm/amd/display: added NULL check at start of dc_validate_stream
In reply to Zaeem MohamedFrom: winstang <[email protected]>
[Why]
prevent invalid memory access
[How]
check if dc and stream are NULL
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -0
@@ -4754,6 +4754,9 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,enum dc_status dc_validate_stream (struct dc *dc,struct dc_stream_state *stream) { +if (dc ==NULL || stream ==NULL ) +return DC_ERROR_UNEXPECTED ; +struct dc_link *link = stream->link;struct timing_generator *tg = dc->res_pool->timing_generators[0 ];enum dc_status res =DC_OK ;
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
IGNORE
-----Original Message-----
From: Mohamed, Zaeem <[email protected]>
Sent: Thursday, June 6, 2024 4:58 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Mohamed, Zaeem <[email protected]>; Wheeler, Daniel <[email protected]>
Subject: [PATCH 00/67] DC Patches June 3, 2024
This DC ptchset brings improvements in multiple areas. In summary, we have:
* FW Release 0.0.221.0
* Fixed missing targets in FAMS2
* Populate hardware_release hook for dcn401
* Disable DMCUB timeout for DCN35
* Move PRIMARY plane zpos higher
* Introduce overlay cursor mode
* Change dram_clock_latency for dcn35 and dcn351
* DCN401 cursor code update
Alex Hung (6):
drm/amd/display: Fix incorrect size calculation for loop in dcn401 drm/amd/display: Fix uninitialized variables in dcn401 drm/amd/display: Remove useless comparison of unsigned int vs. 0 drm/amd/display: Remove NO_EFFECT self-assignment drm/amd/display: Explicitly cast v_total to signed in a subtraction drm/amd/display: Avoid overflow from uint32_t to uint8_t
Alvin Lee (3):
drm/amd/display: Remove NULL assignment for stream_status drm/amd/display: Ignore phantom DTBCLK requirement drm/amd/display: populate hardware_release hook for dcn401
Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.220.0 drm/amd/display: [FW Promotion] Release 0.0.221.0
Aric Cyr (1):
drm/amd/display: 3.2.288
Chris Park (3):
drm/amd/display: Change AVI Info Frame version to 4 for OVT drm/amd/display: Prevent overflow on DTO calculation drm/amd/display: Avoid programming DTO if Refclk is 0
ChunTao Tso (2):
drm/amd/display: Replay low hz drm/amd/display: Replay + IPS + ABM in Full Screen VPB
Daniel Miess (2):
drm/amd/display: Change dram_clock_latency to 34us for dcn351 drm/amd/display: Disable PHYSYMCLK RCO
Daniel Sa (1):
drm/amd/display: Return after Init
Dennis Chan (1):
drm/amd/display: Fix Replay Desync Error Test
Dillon Varone (5):
drm/amd/display: Block SubVP if hardware rotation is used in DML2.1 drm/amd/display: Add null check for phantom pipes in prepare mcache drm/amd/display: Fix missed targets in FAMS2+HWFQ drm/amd/display: Do not override dml2.1 reinit drm/amd/display: Update idle hardmins if uclk or fclk requirement
changed
Fangzhi Zuo (1):
drm/amd/display: Update efficiency bandwidth for dcn351
George Shen (1):
drm/amd/display: Ignore UHBR13.5 cable ID cap for passive cable max
link rate
Ivan Lipski (5):
drm/amd/display: Remove redundant if conditions drm/amd/display: Remove unreachable check
drm/amd/display: Remove redundant ternary operation drm/amd/display: Remove duplicate 'update_idle_uclk' in dcn401 clk_mgr
code
drm/amd/display: Remove reduntant comparisons by Coverity
JinZe.Xu (1):
drm/amd/display: Disable IPS when it is not allowed.
Joshua Aberback (1):
drm/amd/display: Disable boot optimization for DCN401
Josip Pavic (1):
drm/amd/display: define abm debug interface
Leo Li (2):
drm/amd/display: Introduce overlay cursor mode
drm/amd/display: Move PRIMARY plane zpos higher
Leon Huang (1):
drm/amd/display: Expand supported Replay residency mode
Michael Strauss (2):
drm/amd/display: Update FIXED_VS retimer training pattern delay drm/amd/display: Add fallback defaults for invalid LTTPR DPCD caps
Nevenko Stupar (1):
drm/amd/display: Fix multiple cursors when using 4 displays on a
contiguous large surface
Nicholas Kazlauskas (3):
drm/amd/display: Add sequential ONO sequencing for DCN35 drm/amd/display: Remove register from DCN35 DMCUB diagnostic
collection
drm/amd/display: Disable DMCUB timeout for DCN35
Paul Hsieh (1):
drm/amd/display: change dram_clock_latency to 34us for dcn35
Rodrigo Siqueira (2):
drm/amd/display: Use the SPDX license identifier for dmub_replay files drm/amd/display: Check otg_master pointer before use it
Roman Li (1):
drm/amd/display: Add config support entry to replay caps debugfs
Sridevi Arvindekar (2):
drm/amd/display: DCN401 cusor code update drm/amd/display: Minor cleanup for DCN401 cursor related code
Sung-huai Wang (1):
Revert "drm/amd/display: Handle HPD_IRQ for internal link"
Wayne Lin (5):
drm/amd/display: Adjust debug msg for usb4/tbt drm/amd/display: Defer the setting of link hpd status for usb4/tbt drm/amd/display: Correct the defined value for
AMDGPU_DMUB_NOTIFICATION_MAX
drm/amd/display: Don't refer to dc_sink in is_dsc_need_re_compute drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode()
Wenjing Liu (7):
drm/amd/display: use even ODM slice width for two pixels per container drm/amd/display: add odm_slice_rect parameter in spl_in drm/amd/display: reduce ODM slice count to initial new dc state only
when needed
drm/amd/display: remove dpp pipes on failure to update pipe params drm/amd/display: remove ODM combine before bandwidth validation drm/amd/display: use preferred link settings for dp signal only drm/amd/display: make ODM segment width of YCbCr422 two pixel aligned
Zaeem Mohamed (1):
drm/amd/display: Remove dcn32_smu13 duplicate header
pochchan (1):
drm/amd/display: Use TPS3 for ALPM on Specific Panel
winstang (1):
drm/amd/display: added NULL check at start of dc_validate_stream
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 589 +++++++++++++----- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 9 +- .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 1 + .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 1 + .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 248 +++++--- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 29 +- .../drm/amd/display/dc/basics/fixpt31_32.c | 4 - .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 2 +- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c | 2 +- .../dc/clk_mgr/dcn32/smu13_driver_if.h | 108 ---- .../dc/clk_mgr/dcn401/dcn401_clk_mgr.c | 2 +- .../gpu/drm/amd/display/dc/core/dc_resource.c | 90 ++- .../gpu/drm/amd/display/dc/core/dc_state.c | 67 +- .../gpu/drm/amd/display/dc/core/dc_stream.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 5 +- .../gpu/drm/amd/display/dc/dc_spl_translate.c | 5 +- .../amd/display/dc/dccg/dcn401/dcn401_dccg.c | 6 +- .../drm/amd/display/dc/dce/dce_clock_source.c | 12 +- .../drm/amd/display/dc/dce/dce_mem_input.c | 6 +- .../gpu/drm/amd/display/dc/dce/dmub_abm_lcd.c | 2 +- .../gpu/drm/amd/display/dc/dce/dmub_replay.c | 124 ++-- .../gpu/drm/amd/display/dc/dce/dmub_replay.h | 35 +- .../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 6 +- .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 + .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 2 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 2 +- .../amd/display/dc/dml2/dml21/dml21_wrapper.c | 10 +- .../src/dml2_core/dml2_core_dcn4_calcs.c | 14 +- .../dml21/src/dml2_core/dml2_core_shared.c | 4 - .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c | 3 +- .../display/dc/dml2/dml2_translation_helper.c | 1 + .../drm/amd/display/dc/dml2/dml2_wrapper.c | 4 +- .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c | 5 - .../amd/display/dc/dpp/dcn401/dcn401_dpp.c | 5 - drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c | 11 +- .../gpu/drm/amd/display/dc/gpio/hw_generic.c | 2 +- drivers/gpu/drm/amd/display/dc/gpio/hw_hpd.c | 2 +- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 5 + .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c | 2 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 85 ++- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 85 ++- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.h | 2 +- .../amd/display/dc/hwss/dcn401/dcn401_init.c | 2 +- .../gpu/drm/amd/display/dc/irq/irq_service.c | 2 +- .../link_hwss_hpo_fixed_vs_pe_retimer_dp.c | 6 +- .../dc/link/protocols/link_dp_capability.c | 46 +- .../dc/link/protocols/link_dp_irq_handler.c | 24 +- .../dc/link/protocols/link_dp_training.c | 8 +- .../dc/resource/dcn20/dcn20_resource.c | 4 +- .../dc/resource/dcn30/dcn30_resource.c | 3 - .../dc/resource/dcn35/dcn35_resource.c | 7 +- .../dc/resource/dcn351/dcn351_resource.c | 2 +- .../dc/resource/dcn401/dcn401_resource.c | 1 + drivers/gpu/drm/amd/display/dc/spl/dc_spl.c | 32 +- .../gpu/drm/amd/display/dc/spl/dc_spl_types.h | 4 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 157 ++++- .../gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 5 +- 60 files changed, 1226 insertions(+), 700 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/smu13_driver_if.h
--
2.34.1