DC Patches Nov 08, 2023
Subsystems (5)
cover DC Patches Nov 08, 2023
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Add missing chips for HDCP
* Add new command to disable replay timing resync
* Fix encoder disable logic
* Enable DSC Flag in MST Mode Validation
* Change the DMCUB mailbox memory location from FB to inbox
* Add disable timeout option
* Negate IPS allow and commit bits
* Enable DCN clock gating for DCN35
* Prefer currently used OTG master when acquiring free pipe
* Try to acquire a free OTG master not used in cur ctx first
* Clear dpcd_sink_ext_caps if not set
* Enable fast plane updates on DCN3.2 and above
* Add null checks for 8K60 lightup
* Refactor resource into component directory
* Fix DSC not Enabled on Direct MST Sink
* Guard against invalid RPTR/WPTR being set
* Enable CM low mem power optimization
* Fix a debugfs null pointer error
Anthony Koo (1):
drm/amd/display: Add new command to disable replay timing resync
Aric Cyr (1):
drm/amd/display: Promote DC to 3.2.260
Aurabindo Pillai (1):
drm/amd/display: Fix a debugfs null pointer error
Daniel Miess (1):
drm/amd/display: Enable DCN clock gating for DCN35
Duncan Ma (2):
drm/amd/display: Negate IPS allow and commit bits drm/amd/display: Add disable timeout option
Fangzhi Zuo (2):
drm/amd/display: Fix DSC not Enabled on Direct MST Sink drm/amd/display: Enable DSC Flag in MST Mode Validation
Krunoslav Kovac (1):
drm/amd/display: Send PQ bit in AMD VSIF
Lewis Huang (1):
drm/amd/display: Change the DMCUB mailbox memory location from FB to
inbox
Mounika Adhuri (1):
drm/amd/display: Refactor resource into component directory
Muhammad Ahmed (1):
drm/amd/display: Add null checks for 8K60 lightup
Nicholas Kazlauskas (1):
drm/amd/display: Guard against invalid RPTR/WPTR being set
Nicholas Susanto (1):
drm/amd/display: Fix encoder disable logic
Paul Hsieh (1):
drm/amd/display: Clear dpcd_sink_ext_caps if not set
Rodrigo Siqueira (1):
drm/amd/display: Add missing chips for HDCP
Tianci Yin (1):
drm/amd/display: Enable fast plane updates on DCN3.2 and above
Wenjing Liu (2):
drm/amd/display: Try to acquire a free OTG master not used in cur ctx
first
drm/amd/display: Prefer currently used OTG master when acquiring free
pipe
Yihan Zhu (1):
drm/amd/display: Enable CM low mem power optimization
drivers/gpu/drm/amd/display/Makefile | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 +-
.../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +-
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 63 +++---
drivers/gpu/drm/amd/display/dc/Makefile | 5 +-
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 18 +-
.../amd/display/dc/clk_mgr/dcn35/dcn35_smu.c | 3 +
drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +-
.../gpu/drm/amd/display/dc/core/dc_resource.c | 50 ++++-
drivers/gpu/drm/amd/display/dc/dc.h | 3 +-
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 39 +++-
drivers/gpu/drm/amd/display/dc/dc_types.h | 1 +
.../gpu/drm/amd/display/dc/dce100/Makefile | 46 ----
.../gpu/drm/amd/display/dc/dce110/Makefile | 4 +-
.../gpu/drm/amd/display/dc/dce112/Makefile | 3 +-
.../gpu/drm/amd/display/dc/dce120/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dce80/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 6 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn302/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn303/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn315/Makefile | 30 ---
.../gpu/drm/amd/display/dc/dcn316/Makefile | 30 ---
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 +-
.../display/dc/dcn32/dcn32_resource_helpers.c | 2 +-
.../gpu/drm/amd/display/dc/dcn321/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.c | 30 +++
.../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.h | 7 +-
.../dc/dcn35/dcn35_dio_stream_encoder.c | 10 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.h | 1 -
.../drm/amd/display/dc/dml/calcs/dcn_calcs.c | 2 +-
.../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 15 +-
.../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 42 ++--
.../gpu/drm/amd/display/dc/inc/hw/pg_cntl.h | 2 -
drivers/gpu/drm/amd/display/dc/inc/resource.h | 12 ++
.../drm/amd/display/dc/link/link_detection.c | 3 +
.../gpu/drm/amd/display/dc/resource/Makefile | 199 ++++++++++++++++++
.../{ => resource}/dce100/dce100_resource.c | 0
.../{ => resource}/dce100/dce100_resource.h | 0
.../{ => resource}/dce110/dce110_resource.c | 0
.../{ => resource}/dce110/dce110_resource.h | 0
.../{ => resource}/dce112/dce112_resource.c | 0
.../{ => resource}/dce112/dce112_resource.h | 0
.../{ => resource}/dce120/dce120_resource.c | 2 +-
.../{ => resource}/dce120/dce120_resource.h | 0
.../display/dc/resource/dce80/CMakeLists.txt | 4 +
.../dc/{ => resource}/dce80/dce80_resource.c | 0
.../dc/{ => resource}/dce80/dce80_resource.h | 0
.../dc/{ => resource}/dcn10/dcn10_resource.c | 25 ++-
.../dc/{ => resource}/dcn10/dcn10_resource.h | 0
.../dc/{ => resource}/dcn20/dcn20_resource.c | 24 +--
.../dc/{ => resource}/dcn20/dcn20_resource.h | 0
.../{ => resource}/dcn201/dcn201_resource.c | 14 +-
.../{ => resource}/dcn201/dcn201_resource.h | 0
.../dc/{ => resource}/dcn21/dcn21_resource.c | 6 +-
.../dc/{ => resource}/dcn21/dcn21_resource.h | 0
.../dc/{ => resource}/dcn30/dcn30_resource.c | 2 +-
.../dc/{ => resource}/dcn30/dcn30_resource.h | 0
.../{ => resource}/dcn301/dcn301_resource.c | 4 +-
.../{ => resource}/dcn301/dcn301_resource.h | 0
.../{ => resource}/dcn302/dcn302_resource.c | 4 +-
.../{ => resource}/dcn302/dcn302_resource.h | 0
.../{ => resource}/dcn303/dcn303_resource.c | 4 +-
.../{ => resource}/dcn303/dcn303_resource.h | 0
.../dc/{ => resource}/dcn31/dcn31_resource.c | 2 +-
.../dc/{ => resource}/dcn31/dcn31_resource.h | 0
.../{ => resource}/dcn314/dcn314_resource.c | 0
.../{ => resource}/dcn314/dcn314_resource.h | 0
.../{ => resource}/dcn315/dcn315_resource.c | 0
.../{ => resource}/dcn315/dcn315_resource.h | 0
.../{ => resource}/dcn316/dcn316_resource.c | 0
.../{ => resource}/dcn316/dcn316_resource.h | 0
.../dc/{ => resource}/dcn32/dcn32_resource.c | 4 +-
.../dc/{ => resource}/dcn32/dcn32_resource.h | 0
.../{ => resource}/dcn321/dcn321_resource.c | 2 +-
.../{ => resource}/dcn321/dcn321_resource.h | 0
.../dc/{ => resource}/dcn35/dcn35_resource.c | 20 +-
.../dc/{ => resource}/dcn35/dcn35_resource.h | 1 +
drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 22 +-
.../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 41 ++++
.../gpu/drm/amd/display/dmub/src/dmub_srv.c | 50 ++++-
.../drm/amd/display/include/hdcp_msg_types.h | 5 +
.../amd/display/modules/freesync/freesync.c | 6 +-
.../include/asic_reg/dcn/dcn_3_5_0_sh_mask.h | 8 +
94 files changed, 655 insertions(+), 308 deletions(-)
delete mode 100644 drivers/gpu/drm/amd/display/dc/dce100/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn315/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/resource/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.h (100%)
create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dce80/CMakeLists.txt
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.c (98%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.h (99%)Signature · 1 line
2.42.0
PATCH 1/20 drm/amd/display: Fix a debugfs null pointer error
From: Aurabindo Pillai <[email protected]>
[WHY & HOW]
Check whether get_subvp_en() callback exists before calling it.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +5 -1
@@ -3647,12 +3647,16 @@ static int capabilities_show(struct seq_file *m, void *unused)bool mall_supported = dc->caps.mall_size_total;bool subvp_supported = dc->caps.subvp_fw_processing_delay_us;unsigned int mall_in_use = false; -unsigned int subvp_in_use = dc->cap_funcs.get_subvp_en (dc, dc->current_state); +unsigned int subvp_in_use = false; +struct hubbub *hubbub = dc->res_pool->hubbub;if (hubbub->funcs->get_mall_en) hubbub->funcs->get_mall_en (hubbub, &mall_in_use); +if (dc->cap_funcs.get_subvp_en) + subvp_in_use = dc->cap_funcs.get_subvp_en (dc, dc->current_state); +seq_printf (m,"mall supported: %s, enabled: %s\n" , mall_supported ?"yes" :"no" , mall_in_use ?"yes" :"no" ); seq_printf(m, "sub-viewport supported: %s, enabled: %s\n",
Signature · 1 line
2.42.0
PATCH 2/20 drm/amd/display: Enable CM low mem power optimization
In reply to Alex HungFrom: Yihan Zhu <[email protected]>
[WHY & HOW]
MPC MCM low mem power optimization still causes color distortion on first SCE enablement, only forces light sleep for it.
DPP low memory power optimization still needs this bit to save power.
--- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 ++++++++----- .../gpu/drm/amd/display/dc/dcn35/dcn35_resource.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c +8 -5
@@ -71,21 +71,24 @@ 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) { -ASSERT (false); -/* TODO: change to mpc -* dpp_base->ctx->dc->optimized_required = true; -* dpp_base->deferred_reg_writes.bits.disable_blnd_lut = true; -*/ +//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/dcn35/dcn35_resource.c +1 -1
@@ -724,7 +724,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 = false, + .cm = true, .mpc = true, .optc = true, .vpg = true,
Signature · 1 line
2.42.0
PATCH 3/20 drm/amd/display: Guard against invalid RPTR/WPTR being set
In reply to Alex HungFrom: Nicholas Kazlauskas <[email protected]>
[WHY]
HW can return invalid values on register read, guard against these being set and causing us to access memory out of range and page fault.
[HOW]
Guard at sync_inbox1 and guard at pushing commands.
--- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +15 -3
@@ -707,9 +707,16 @@ enum dmub_status dmub_srv_sync_inbox1(struct dmub_srv *dmub)return DMUB_STATUS_INVALID ;if (dmub->hw_funcs.get_inbox1_rptr && dmub->hw_funcs.get_inbox1_wptr) { - dmub->inbox1_rb.rptr = dmub->hw_funcs.get_inbox1_rptr (dmub); - dmub->inbox1_rb.wrpt = dmub->hw_funcs.get_inbox1_wptr (dmub); - dmub->inbox1_last_wptr = dmub->inbox1_rb.wrpt; +uint32_t rptr = dmub->hw_funcs.get_inbox1_rptr (dmub); +uint32_t wptr = dmub->hw_funcs.get_inbox1_wptr (dmub); + +if (rptr > dmub->inbox1_rb.capacity || wptr > dmub->inbox1_rb.capacity) { +return DMUB_STATUS_HW_FAILURE ; + }else { + dmub->inbox1_rb.rptr = rptr; + dmub->inbox1_rb.wrpt = wptr; + dmub->inbox1_last_wptr = dmub->inbox1_rb.wrpt; + } }return DMUB_STATUS_OK ;
@@ -743,6 +750,11 @@ enum dmub_status dmub_srv_cmd_queue(struct dmub_srv *dmub,if (!dmub->hw_init)return DMUB_STATUS_INVALID ; +if (dmub->inbox1_rb.rptr > dmub->inbox1_rb.capacity || + dmub->inbox1_rb.wrpt > dmub->inbox1_rb.capacity) { +return DMUB_STATUS_HW_FAILURE ; + } +if (dmub_rb_push_front (&dmub->inbox1_rb, cmd))return DMUB_STATUS_OK ;
Signature · 1 line
2.42.0
PATCH 4/20 drm/amd/display: Fix DSC not Enabled on Direct MST Sink
In reply to Alex HungFrom: Fangzhi Zuo <[email protected]>
[WHY & HOW]
For the scenario when a dsc capable MST sink device is directly connected, it needs to use max dsc compression as the link bw constraint.
--- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +14 -15
@@ -1604,31 +1604,31 @@ enum dc_status dm_dp_mst_is_port_support_mode(unsigned int upper_link_bw_in_kbps =0 , down_link_bw_in_kbps =0 ;unsigned int max_compressed_bw_in_kbps =0 ;struct dc_dsc_bw_range bw_range = {0 }; -struct drm_dp_mst_topology_mgr *mst_mgr; +uint16_t full_pbn = aconnector->mst_output_port->full_pbn;/* -* check if the mode could be supported if DSC pass-through is supported -* AND check if there enough bandwidth available to support the mode -* with DSC enabled. +* Consider the case with the depth of the mst topology tree is equal or less than 2 +* A. When dsc bitstream can be transmitted along the entire path +* 1. dsc is possible between source and branch/leaf device (common dsc params is possible), AND +* 2. dsc passthrough supported at MST branch, or +* 3. dsc decoding supported at leaf MST device +* Use maximum dsc compression as bw constraint +* B. When dsc bitstream cannot be transmitted along the entire path +* Use native bw as bw constraint */ if (is_dsc_common_config_possible (stream, &bw_range) && - aconnector->mst_output_port->passthrough_aux) { - mst_mgr = aconnector->mst_output_port->mgr; -mutex_lock (&mst_mgr->lock); - + (aconnector->mst_output_port->passthrough_aux || + aconnector->dsc_aux == &aconnector->mst_output_port->aux)) { cur_link_settings = stream->link->verified_link_cap; upper_link_bw_in_kbps =dc_link_bandwidth_kbps (aconnector->dc_link, - &cur_link_settings - ); - down_link_bw_in_kbps =kbps_from_pbn (aconnector->mst_output_port->full_pbn); + &cur_link_settings); + down_link_bw_in_kbps =kbps_from_pbn (full_pbn);/* pick the bottleneck */ end_to_end_bw_in_kbps =min (upper_link_bw_in_kbps, down_link_bw_in_kbps); -mutex_unlock (&mst_mgr->lock); -/* * use the maximum dsc compression bandwidth as the required * bandwidth for the mode
@@ -1643,8 +1643,7 @@ enum dc_status dm_dp_mst_is_port_support_mode(/* check if mode could be supported within full_pbn */ bpp =convert_dc_color_depth_into_bpc (stream->timing.display_color_depth) *3 ; pbn =drm_dp_calc_pbn_mode (stream->timing.pix_clk_100hz /10 , bpp, false); - -if (pbn > aconnector->mst_output_port->full_pbn) +if (pbn > full_pbn)return DC_FAIL_BANDWIDTH_VALIDATE ; }
Signature · 1 line
2.42.0
PATCH 5/20 drm/amd/display: Refactor resource into component directory
In reply to Alex HungFrom: Mounika Adhuri <[email protected]>
[WHY]
Move all resource files to unique folder resource.
[HOW]
Created resource folder in dc, moved the dcnxx_resource.c and dcnxx_resource.h files into corresponding new folders inside the resource and made appropriate changes for compilation in Makefiles.
---
drivers/gpu/drm/amd/display/Makefile | 1 +
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
drivers/gpu/drm/amd/display/dc/Makefile | 5 +-
.../gpu/drm/amd/display/dc/core/dc_resource.c | 4 +-
.../gpu/drm/amd/display/dc/dce100/Makefile | 46 ----
.../gpu/drm/amd/display/dc/dce110/Makefile | 4 +-
.../gpu/drm/amd/display/dc/dce112/Makefile | 3 +-
.../gpu/drm/amd/display/dc/dce120/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dce80/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn302/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn303/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn315/Makefile | 30 ---
.../gpu/drm/amd/display/dc/dcn316/Makefile | 30 ---
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 2 +-
.../display/dc/dcn32/dcn32_resource_helpers.c | 2 +-
.../gpu/drm/amd/display/dc/dcn321/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 2 +-
.../drm/amd/display/dc/dml/calcs/dcn_calcs.c | 2 +-
.../gpu/drm/amd/display/dc/resource/Makefile | 199 ++++++++++++++++++
.../{ => resource}/dce100/dce100_resource.c | 0
.../{ => resource}/dce100/dce100_resource.h | 0
.../{ => resource}/dce110/dce110_resource.c | 0
.../{ => resource}/dce110/dce110_resource.h | 0
.../{ => resource}/dce112/dce112_resource.c | 0
.../{ => resource}/dce112/dce112_resource.h | 0
.../{ => resource}/dce120/dce120_resource.c | 2 +-
.../{ => resource}/dce120/dce120_resource.h | 0
.../display/dc/resource/dce80/CMakeLists.txt | 4 +
.../dc/{ => resource}/dce80/dce80_resource.c | 0
.../dc/{ => resource}/dce80/dce80_resource.h | 0
.../dc/{ => resource}/dcn10/dcn10_resource.c | 25 ++-
.../dc/{ => resource}/dcn10/dcn10_resource.h | 0
.../dc/{ => resource}/dcn20/dcn20_resource.c | 24 +--
.../dc/{ => resource}/dcn20/dcn20_resource.h | 0
.../{ => resource}/dcn201/dcn201_resource.c | 14 +-
.../{ => resource}/dcn201/dcn201_resource.h | 0
.../dc/{ => resource}/dcn21/dcn21_resource.c | 6 +-
.../dc/{ => resource}/dcn21/dcn21_resource.h | 0
.../dc/{ => resource}/dcn30/dcn30_resource.c | 2 +-
.../dc/{ => resource}/dcn30/dcn30_resource.h | 0
.../{ => resource}/dcn301/dcn301_resource.c | 4 +-
.../{ => resource}/dcn301/dcn301_resource.h | 0
.../{ => resource}/dcn302/dcn302_resource.c | 4 +-
.../{ => resource}/dcn302/dcn302_resource.h | 0
.../{ => resource}/dcn303/dcn303_resource.c | 4 +-
.../{ => resource}/dcn303/dcn303_resource.h | 0
.../dc/{ => resource}/dcn31/dcn31_resource.c | 2 +-
.../dc/{ => resource}/dcn31/dcn31_resource.h | 0
.../{ => resource}/dcn314/dcn314_resource.c | 0
.../{ => resource}/dcn314/dcn314_resource.h | 0
.../{ => resource}/dcn315/dcn315_resource.c | 0
.../{ => resource}/dcn315/dcn315_resource.h | 0
.../{ => resource}/dcn316/dcn316_resource.c | 0
.../{ => resource}/dcn316/dcn316_resource.h | 0
.../dc/{ => resource}/dcn32/dcn32_resource.c | 4 +-
.../dc/{ => resource}/dcn32/dcn32_resource.h | 0
.../{ => resource}/dcn321/dcn321_resource.c | 2 +-
.../{ => resource}/dcn321/dcn321_resource.h | 0
.../dc/{ => resource}/dcn35/dcn35_resource.c | 2 +-
.../dc/{ => resource}/dcn35/dcn35_resource.h | 0
68 files changed, 276 insertions(+), 181 deletions(-)
delete mode 100644 drivers/gpu/drm/amd/display/dc/dce100/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn315/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/resource/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.h (100%)
create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dce80/CMakeLists.txt
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.c (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.h (100%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.c (99%)
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.h (100%)drivers/gpu/drm/amd/display/Makefile +1 -0
@@ -30,6 +30,7 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ 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)/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/amdgpu_dm/amdgpu_dm_mst_types.c +1 -1
@@ -44,7 +44,7 @@#include "amdgpu_dm_debugfs.h" #endif -#include "dc/dcn20/dcn20_resource.h" +#include "dc/resource/dcn20/dcn20_resource.h" #define PEAK_FACTOR_X1000 1006
drivers/gpu/drm/amd/display/dc/Makefile +1 -4
@@ -22,7 +22,7 @@ # # Makefile for Display Core (dc) component. -DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc +DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource ifdef CONFIG_DRM_AMD_DC_FP
@@ -38,8 +38,6 @@ DC_LIBS += dcn302 DC_LIBS += dcn303 DC_LIBS += dcn31 DC_LIBS += dcn314 -DC_LIBS += dcn315 -DC_LIBS += dcn316 DC_LIBS += dcn32 DC_LIBS += dcn321 DC_LIBS += dcn35
@@ -51,7 +49,6 @@ DC_LIBS += dce120 DC_LIBS += dce112 DC_LIBS += dce110 -DC_LIBS += dce100 DC_LIBS += dce80 ifdef CONFIG_DRM_AMD_DC_SI
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
@@ -69,8 +69,8 @@#include "dcn314/dcn314_resource.h" #include "dcn315/dcn315_resource.h" #include "dcn316/dcn316_resource.h" -#include "../dcn32/dcn32_resource.h" -#include "../dcn321/dcn321_resource.h" +#include "dcn32/dcn32_resource.h" +#include "dcn321/dcn321_resource.h" #include "dcn35/dcn35_resource.h" #define VISUAL_CONFIRM_BASE_DEFAULT 3
drivers/gpu/drm/amd/display/dc/dce100/Makefile deleted +0 -46
46 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/Makefile +2 -2
@@ -26,8 +26,8 @@ CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = $(call cc-disable-warning, override-init) DCE110 = dce110_timing_generator.o \ -dce110_compressor.o dce110_resource.o \ -dce110_opp_regamma_v.o dce110_opp_csc_v.o dce110_timing_generator_v.o \ +dce110_compressor.o dce110_opp_regamma_v.o \ +dce110_opp_csc_v.o dce110_timing_generator_v.o \ dce110_mem_input_v.o dce110_opp_v.o dce110_transform_v.o AMD_DAL_DCE110 = $(addprefix $(AMDDALPATH)/dc/dce110/,$(DCE110))
drivers/gpu/drm/amd/display/dc/dce112/Makefile +1 -2
@@ -25,8 +25,7 @@ CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = $(call cc-disable-warning, override-init) -DCE112 = dce112_compressor.o \ -dce112_resource.o +DCE112 = dce112_compressor.o AMD_DAL_DCE112 = $(addprefix $(AMDDALPATH)/dc/dce112/,$(DCE112))
drivers/gpu/drm/amd/display/dc/dce120/Makefile +1 -1
@@ -26,7 +26,7 @@ CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = $(call cc-disable-warning, override-init) -DCE120 = dce120_resource.o dce120_timing_generator.o \ +DCE120 = dce120_timing_generator.o AMD_DAL_DCE120 = $(addprefix $(AMDDALPATH)/dc/dce120/,$(DCE120))
drivers/gpu/drm/amd/display/dc/dce80/Makefile +1 -2
@@ -25,8 +25,7 @@ CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = $(call cc-disable-warning, override-init) -DCE80 = dce80_timing_generator.o \ - dce80_resource.o +DCE80 = dce80_timing_generator.o AMD_DAL_DCE80 = $(addprefix $(AMDDALPATH)/dc/dce80/,$(DCE80))
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
@@ -22,7 +22,7 @@ # # Makefile for DCN. -DCN10 = dcn10_init.o dcn10_resource.o dcn10_ipp.o \ +DCN10 = dcn10_init.o dcn10_ipp.o \ dcn10_hw_sequencer_debug.o \ dcn10_dpp.o dcn10_opp.o dcn10_optc.o \ dcn10_hubp.o dcn10_mpc.o \
drivers/gpu/drm/amd/display/dc/dcn20/Makefile +1 -1
@@ -2,7 +2,7 @@ # # Makefile for DCN. -DCN20 = dcn20_resource.o dcn20_init.o dcn20_dpp.o dcn20_dpp_cm.o dcn20_hubp.o \ +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_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
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: MIT # # Makefile for DCN. -DCN201 = dcn201_init.o dcn201_resource.o \ +DCN201 = dcn201_init.o \ dcn201_hubbub.o\ dcn201_mpc.o dcn201_hubp.o dcn201_opp.o dcn201_optc.o dcn201_dpp.o \ dcn201_dccg.o dcn201_link_encoder.o
drivers/gpu/drm/amd/display/dc/dcn21/Makefile +1 -1
@@ -2,7 +2,7 @@ # # Makefile for DCN21. -DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o \ +DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o \ dcn21_link_encoder.o dcn21_dccg.o AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))
drivers/gpu/drm/amd/display/dc/dcn30/Makefile +0 -1
@@ -38,7 +38,6 @@ DCN30 := \ dcn30_dwb_cm.o \ dcn30_cm_common.o \ dcn30_mmhubbub.o \ - dcn30_resource.o \ dcn30_dio_link_encoder.o
drivers/gpu/drm/amd/display/dc/dcn301/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Makefile for dcn30. -DCN301 = dcn301_init.o dcn301_resource.o dcn301_dccg.o \ +DCN301 = dcn301_init.o dcn301_dccg.o \ dcn301_dio_link_encoder.o dcn301_panel_cntl.o dcn301_hubbub.o \ dcn301_optc.o
drivers/gpu/drm/amd/display/dc/dcn302/Makefile +1 -1
@@ -5,7 +5,7 @@ # # Makefile for dcn302. -DCN3_02 = dcn302_init.o dcn302_resource.o +DCN3_02 = dcn302_init.o AMD_DAL_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/dcn302/,$(DCN3_02))
drivers/gpu/drm/amd/display/dc/dcn303/Makefile +1 -1
@@ -6,7 +6,7 @@ # # Makefile for dcn303. -DCN3_03 = dcn303_init.o dcn303_resource.o +DCN3_03 = dcn303_init.o AMD_DAL_DCN3_03 = $(addprefix $(AMDDALPATH)/dc/dcn303/,$(DCN3_03))
drivers/gpu/drm/amd/display/dc/dcn31/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Makefile for dcn31. -DCN31 = dcn31_resource.o dcn31_hubbub.o dcn31_init.o dcn31_hubp.o \ +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_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
@@ -10,7 +10,7 @@ # # Makefile for dcn314. -DCN314 = dcn314_resource.o dcn314_init.o \ +DCN314 = dcn314_init.o \ dcn314_dio_stream_encoder.o dcn314_dccg.o dcn314_optc.o AMD_DAL_DCN314 = $(addprefix $(AMDDALPATH)/dc/dcn314/,$(DCN314))
drivers/gpu/drm/amd/display/dc/dcn315/Makefile deleted +0 -30
@@ -1,30 +0,0 @@ -# -# Copyright © 2021 Advanced Micro Devices, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# Authors: AMD -# -# Makefile for dcn315. - -DCN315 = dcn315_resource.o - -AMD_DAL_DCN315 = $(addprefix $(AMDDALPATH)/dc/dcn315/,$(DCN315)) - -AMD_DISPLAY_FILES += $(AMD_DAL_DCN315)
drivers/gpu/drm/amd/display/dc/dcn316/Makefile deleted +0 -30
@@ -1,30 +0,0 @@ -# -# Copyright 2021 Advanced Micro Devices, Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -# OTHER DEALINGS IN THE SOFTWARE. -# -# Authors: AMD -# -# Makefile for dcn316. - -DCN316 = dcn316_resource.o - -AMD_DAL_DCN316 = $(addprefix $(AMDDALPATH)/dc/dcn316/,$(DCN316)) - -AMD_DISPLAY_FILES += $(AMD_DAL_DCN316)
drivers/gpu/drm/amd/display/dc/dcn32/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Makefile for dcn32. -DCN32 = dcn32_resource.o dcn32_hubbub.o dcn32_init.o dcn32_dccg.o \ +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
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource_helpers.c +1 -1
@@ -24,7 +24,7 @@*/ // header file of functions being implemented -#include "dcn32_resource.h" +#include "dcn32/dcn32_resource.h" #include "dcn20/dcn20_resource.h" #include "dml/dcn32/display_mode_vba_util_32.h" #include "dml/dcn32/dcn32_fpu.h"
drivers/gpu/drm/amd/display/dc/dcn321/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Makefile for dcn321. -DCN321 = dcn321_resource.o dcn321_dio_link_encoder.o +DCN321 = dcn321_dio_link_encoder.o AMD_DAL_DCN321 = $(addprefix $(AMDDALPATH)/dc/dcn321/,$(DCN321))
drivers/gpu/drm/amd/display/dc/dcn35/Makefile +1 -1
@@ -10,7 +10,7 @@ # # Makefile for DCN35. -DCN35 = dcn35_resource.o dcn35_init.o dcn35_dio_stream_encoder.o \ +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_mmhubbub.o dcn35_opp.o dcn35_dpp.o dcn35_pg_cntl.o dcn35_dwb.o
drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c +1 -1
@@ -30,7 +30,7 @@#include "dcn_calc_auto.h" #include "dal_asic_id.h" #include "resource.h" -#include "dcn10/dcn10_resource.h" +#include "resource/dcn10/dcn10_resource.h" #include "dcn10/dcn10_hubbub.h" #include "dml/dml1_display_rq_dlg_calc.h"
drivers/gpu/drm/amd/display/dc/resource/Makefile new file +199 -0
199 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c renamed from drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.h renamed from drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.c renamed from drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce110/dce110_resource.h renamed from drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.c renamed from drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce112/dce112_resource.h renamed from drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c renamed from drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +1 -1
@@ -36,7 +36,7 @@#include "dce110/dce110_resource.h" #include "virtual/virtual_stream_encoder.h" -#include "dce120_timing_generator.h" +#include "dce120/dce120_timing_generator.h" #include "irq/dce120/irq_service_dce120.h" #include "dce/dce_opp.h" #include "dce/dce_clock_source.h"
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.h renamed from drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce80/CMakeLists.txt new file +4 -0
@@ -0,0 +1,4 @@ +dal3_subdirectory_sources( + dce80_resource.c + dce80_resource.h + )
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c renamed from drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.h renamed from drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +14 -11
@@ -26,29 +26,32 @@#include "dm_services.h" #include "dc.h" -#include "dcn10_init.h" +#include "dcn10/dcn10_init.h" #include "resource.h" #include "include/irq_service_interface.h" -#include "dcn10_resource.h" -#include "dcn10_ipp.h" -#include "dcn10_mpc.h" +#include "dcn10/dcn10_resource.h" +#include "dcn10/dcn10_ipp.h" +#include "dcn10/dcn10_mpc.h" + +#include "dcn10/dcn10_dwb.h" +#include "irq/dcn10/irq_service_dcn10.h" -#include "dcn10_dpp.h" -#include "dcn10_optc.h" +#include "dcn10/dcn10_dpp.h" +#include "dcn10/dcn10_optc.h" #include "dcn10/dcn10_hwseq.h" #include "dce110/dce110_hwseq.h" -#include "dcn10_opp.h" -#include "dcn10_link_encoder.h" -#include "dcn10_stream_encoder.h" +#include "dcn10/dcn10_opp.h" +#include "dcn10/dcn10_link_encoder.h" +#include "dcn10/dcn10_stream_encoder.h" #include "dce/dce_clock_source.h" #include "dce/dce_audio.h" #include "dce/dce_hwseq.h" #include "virtual/virtual_stream_encoder.h" #include "dce110/dce110_resource.h" #include "dce112/dce112_resource.h" -#include "dcn10_hubp.h" -#include "dcn10_hubbub.h" +#include "dcn10/dcn10_hubp.h" +#include "dcn10/dcn10_hubbub.h" #include "dce/dce_panel_cntl.h" #include "soc15_hw_ip.h"
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +12 -12
@@ -29,7 +29,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn20_init.h" +#include "dcn20/dcn20_init.h" #include "resource.h" #include "include/irq_service_interface.h"
@@ -39,29 +39,29 @@#include "dcn10/dcn10_hubp.h" #include "dcn10/dcn10_ipp.h" -#include "dcn20_hubbub.h" -#include "dcn20_mpc.h" -#include "dcn20_hubp.h" +#include "dcn20/dcn20_hubbub.h" +#include "dcn20/dcn20_mpc.h" +#include "dcn20/dcn20_hubp.h" #include "irq/dcn20/irq_service_dcn20.h" -#include "dcn20_dpp.h" -#include "dcn20_optc.h" +#include "dcn20/dcn20_dpp.h" +#include "dcn20/dcn20_optc.h" #include "dcn20/dcn20_hwseq.h" #include "dce110/dce110_hwseq.h" #include "dcn10/dcn10_resource.h" -#include "dcn20_opp.h" +#include "dcn20/dcn20_opp.h" -#include "dcn20_dsc.h" +#include "dcn20/dcn20_dsc.h" -#include "dcn20_link_encoder.h" -#include "dcn20_stream_encoder.h" +#include "dcn20/dcn20_link_encoder.h" +#include "dcn20/dcn20_stream_encoder.h" #include "dce/dce_clock_source.h" #include "dce/dce_audio.h" #include "dce/dce_hwseq.h" #include "virtual/virtual_stream_encoder.h" #include "dce110/dce110_resource.h" #include "dml/display_mode_vba.h" -#include "dcn20_dccg.h" -#include "dcn20_vmid.h" +#include "dcn20/dcn20_dccg.h" +#include "dcn20/dcn20_vmid.h" #include "dce/dce_panel_cntl.h" #include "navi10_ip_offset.h"
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c +7 -7
@@ -26,7 +26,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn201_init.h" +#include "dcn201/dcn201_init.h" #include "dml/dcn20/dcn20_fpu.h" #include "resource.h" #include "include/irq_service_interface.h"
@@ -36,16 +36,16 @@#include "dcn10/dcn10_hubp.h" #include "dcn10/dcn10_ipp.h" -#include "dcn201_mpc.h" -#include "dcn201_hubp.h" +#include "dcn201/dcn201_mpc.h" +#include "dcn201/dcn201_hubp.h" #include "irq/dcn201/irq_service_dcn201.h" #include "dcn201/dcn201_dpp.h" #include "dcn201/dcn201_hubbub.h" -#include "dcn201_dccg.h" -#include "dcn201_optc.h" +#include "dcn201/dcn201_dccg.h" +#include "dcn201/dcn201_optc.h" #include "dcn201/dcn201_hwseq.h" #include "dce110/dce110_hwseq.h" -#include "dcn201_opp.h" +#include "dcn201/dcn201_opp.h" #include "dcn201/dcn201_link_encoder.h" #include "dcn20/dcn20_stream_encoder.h" #include "dce/dce_clock_source.h"
@@ -55,7 +55,7 @@#include "dce110/dce110_resource.h" #include "dce/dce_aux.h" #include "dce/dce_i2c.h" -#include "dcn201_hubbub.h" +#include "dcn201/dcn201_hubbub.h" #include "dcn10/dcn10_resource.h" #include "cyan_skillfish_ip_offset.h"
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +3 -3
@@ -29,7 +29,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn21_init.h" +#include "dcn21/dcn21_init.h" #include "resource.h" #include "include/irq_service_interface.h"
@@ -44,7 +44,7 @@#include "dcn20/dcn20_hubbub.h" #include "dcn20/dcn20_mpc.h" #include "dcn20/dcn20_hubp.h" -#include "dcn21_hubp.h" +#include "dcn21/dcn21_hubp.h" #include "irq/dcn21/irq_service_dcn21.h" #include "dcn20/dcn20_dpp.h" #include "dcn20/dcn20_optc.h"
@@ -61,7 +61,7 @@#include "dml/display_mode_vba.h" #include "dcn20/dcn20_dccg.h" #include "dcn21/dcn21_dccg.h" -#include "dcn21_hubbub.h" +#include "dcn21/dcn21_hubbub.h" #include "dcn10/dcn10_resource.h" #include "dce/dce_panel_cntl.h"
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +1 -1
@@ -27,7 +27,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn30_init.h" +#include "dcn30/dcn30_init.h" #include "resource.h" #include "include/irq_service_interface.h"
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +2 -2
@@ -27,7 +27,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn301_init.h" +#include "dcn301/dcn301_init.h" #include "resource.h" #include "include/irq_service_interface.h"
@@ -61,7 +61,7 @@#include "dcn10/dcn10_resource.h" #include "dcn30/dcn30_dio_stream_encoder.h" #include "dcn301/dcn301_dio_link_encoder.h" -#include "dcn301_panel_cntl.h" +#include "dcn301/dcn301_panel_cntl.h" #include "vangogh_ip_offset.h"
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +2 -2
@@ -23,9 +23,9 @@* */ -#include "dcn302_init.h" +#include "dcn302/dcn302_init.h" #include "dcn302_resource.h" -#include "dcn302_dccg.h" +#include "dcn302/dcn302_dccg.h" #include "irq/dcn302/irq_service_dcn302.h" #include "dcn30/dcn30_dio_link_encoder.h"
drivers/gpu/drm/amd/display/dc/resource/dcn302/dcn302_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c +2 -2
@@ -23,9 +23,9 @@* Authors: AMD */ -#include "dcn303_init.h" +#include "dcn303/dcn303_init.h" #include "dcn303_resource.h" -#include "dcn303_dccg.h" +#include "dcn303/dcn303_dccg.h" #include "irq/dcn303/irq_service_dcn303.h" #include "dcn30/dcn30_dio_link_encoder.h"
drivers/gpu/drm/amd/display/dc/resource/dcn303/dcn303_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +1 -1
@@ -70,7 +70,7 @@#include "dml/dcn31/dcn31_fpu.h" #include "dcn31/dcn31_dccg.h" #include "dcn10/dcn10_resource.h" -#include "dcn31_panel_cntl.h" +#include "dcn31/dcn31_panel_cntl.h" #include "dcn30/dcn30_dwb.h" #include "dcn30/dcn30_mmhubbub.h"
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +2 -2
@@ -27,7 +27,7 @@#include "dm_services.h" #include "dc.h" -#include "dcn32_init.h" +#include "dcn32/dcn32_init.h" #include "resource.h" #include "include/irq_service_interface.h"
@@ -41,7 +41,7 @@#include "dcn31/dcn31_hubbub.h" #include "dcn32/dcn32_hubbub.h" #include "dcn32/dcn32_mpc.h" -#include "dcn32_hubp.h" +#include "dcn32/dcn32_hubp.h" #include "irq/dcn32/irq_service_dcn32.h" #include "dcn32/dcn32_dpp.h" #include "dcn32/dcn32_optc.h"
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +1 -1
@@ -63,7 +63,7 @@#include "dcn31/dcn31_apg.h" #include "dcn31/dcn31_dio_link_encoder.h" #include "dcn32/dcn32_dio_link_encoder.h" -#include "dcn321_dio_link_encoder.h" +#include "dcn321/dcn321_dio_link_encoder.h" #include "dce/dce_clock_source.h" #include "dce/dce_audio.h" #include "dce/dce_hwseq.h"
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.h +0 -0
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +1 -1
@@ -78,7 +78,7 @@#include "dcn10/dcn10_resource.h" #include "dcn31/dcn31_panel_cntl.h" #include "dcn35/dcn35_hwseq.h" -#include "dcn35_dio_link_encoder.h" +#include "dcn35/dcn35_dio_link_encoder.h" #include "dml/dcn31/dcn31_fpu.h" /*todo*/ #include "dml/dcn35/dcn35_fpu.h" #include "dcn35/dcn35_dwb.h"
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.h renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.h +0 -0
Signature · 1 line
2.42.0
PATCH 6/20 drm/amd/display: Add null checks for 8K60 lightup
In reply to Alex HungFrom: Muhammad Ahmed <[email protected]>
[WHY & HOW]
Add some null checks to fix an issue where 8k60 tiled display fails to light up.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -3178,7 +3178,7 @@ static bool update_planes_and_stream_state(struct dc *dc,struct pipe_ctx *otg_master =resource_get_otg_master_for_stream (&context->res_ctx, context->streams[i]); -if (otg_master->stream->test_pattern.type !=DP_TEST_PATTERN_VIDEO_MODE ) +if (otg_master && otg_master->stream->test_pattern.type !=DP_TEST_PATTERN_VIDEO_MODE )resource_build_test_pattern_params (&context->res_ctx, otg_master); } }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -0
@@ -5190,6 +5190,9 @@ bool dc_resource_acquire_secondary_pipe_for_mpc_odm_legacy( sec_next = sec_pipe->next_odm_pipe; sec_prev = sec_pipe->prev_odm_pipe; +if (pri_pipe ==NULL ) +return false; + *sec_pipe = *pri_pipe; sec_pipe->top_pipe = sec_top;
Signature · 1 line
2.42.0
PATCH 7/20 drm/amd/display: Enable fast plane updates on DCN3.2 and above
In reply to Alex HungFrom: Tianci Yin <[email protected]>
[WHY]
When cursor moves across screen boarder, lag cursor observed, since subvp settings need to sync up with vblank that causes cursor updates being delayed.
[HOW]
Enable fast plane updates on DCN3.2 to fix it.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -4
@@ -9585,14 +9585,14 @@ static bool should_reset_plane(struct drm_atomic_state *state,struct drm_plane *other;struct drm_plane_state *old_other_state, *new_other_state;struct drm_crtc_state *new_crtc_state; +struct amdgpu_device *adev =drm_to_adev (plane->dev);int i;/* -* TODO: Remove this hack once the checks below are sufficient -* enough to determine when we need to reset all the planes on -* the stream. +* TODO: Remove this hack for all asics once it proves that the +* fast updates works fine on DCN3.2+. */ -if (state->allow_modeset) +if (adev->ip_versions[DCE_HWIP ][0 ] <IP_VERSION (3 ,2 ,0 ) && state->allow_modeset)return true;/* Exit early if we know that we're adding or removing the plane. */
Signature · 1 line
2.42.0
PATCH 8/20 drm/amd/display: Clear dpcd_sink_ext_caps if not set
In reply to Alex HungFrom: Paul Hsieh <[email protected]>
[WHY]
Some eDP panels' ext caps don't set initial values and the value of dpcd_addr (0x317) is random.
It means that sometimes the eDP can be OLED, miniLED and etc, and cause incorrect backlight control interface.
[HOW]
Add remove_sink_ext_caps to remove sink ext caps (HDR, OLED and etc)
--- drivers/gpu/drm/amd/display/dc/dc_types.h | 1 + drivers/gpu/drm/amd/display/dc/link/link_detection.c | 3 +++ 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/dc_types.h +1 -0
@@ -177,6 +177,7 @@ struct dc_panel_patch {unsigned int disable_fams;unsigned int skip_avmute;unsigned int mst_start_top_delay; +unsigned int remove_sink_ext_caps; };struct dc_edid_caps {
drivers/gpu/drm/amd/display/dc/link/link_detection.c +3 -0
@@ -1088,6 +1088,9 @@ static bool detect_link_and_local_sink(struct dc_link *link,if (sink->edid_caps.panel_patch.skip_scdc_overwrite) link->ctx->dc->debug.hdmi20_disable = true; +if (sink->edid_caps.panel_patch.remove_sink_ext_caps) + link->dpcd_sink_ext_caps.raw =0 ; +if (dc_is_hdmi_signal (link->connector_signal))read_scdc_caps (link->ddc, link->local_sink);
Signature · 1 line
2.42.0
PATCH 9/20 drm/amd/display: Try to acquire a free OTG master not used in cur ctx first
In reply to Alex HungFrom: Wenjing Liu <[email protected]>
[WHY & HOW]
The current otg master pipe allocation logic is not optimized based current resource context. We should try to acquire a free OTG master not used in cur cts first to avoid unnecessary pipe switch from current state.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +6 -2
@@ -3586,6 +3586,7 @@ static void mark_seamless_boot_stream(* |________|_______________|___________|_____________| */ static bool acquire_otg_master_pipe_for_stream ( +const struct dc_state *cur_ctx,struct dc_state *new_ctx,const struct resource_pool *pool,struct dc_stream_state *stream)
@@ -3599,7 +3600,10 @@ static bool acquire_otg_master_pipe_for_stream(int pipe_idx;struct pipe_ctx *pipe_ctx =NULL ; - pipe_idx =resource_find_any_free_pipe (&new_ctx->res_ctx, pool); + pipe_idx =recource_find_free_pipe_not_used_in_cur_res_ctx ( + &cur_ctx->res_ctx, &new_ctx->res_ctx, pool); +if (pipe_idx ==FREE_PIPE_INDEX_NOT_FOUND ) + pipe_idx =resource_find_any_free_pipe (&new_ctx->res_ctx, pool);if (pipe_idx !=FREE_PIPE_INDEX_NOT_FOUND ) { pipe_ctx = &new_ctx->res_ctx.pipe_ctx[pipe_idx];memset (pipe_ctx,0 ,sizeof (*pipe_ctx));
@@ -3659,7 +3663,7 @@ enum dc_status resource_map_pool_resources(if (!acquired)/* acquire new resources */ - acquired =acquire_otg_master_pipe_for_stream ( + acquired =acquire_otg_master_pipe_for_stream (dc->current_state, context, pool, stream); pipe_ctx =resource_get_otg_master_for_stream (&context->res_ctx, stream);
Signature · 1 line
2.42.0
PATCH 10/20 drm/amd/display: Prefer currently used OTG master when acquiring free pipe
In reply to Alex HungFrom: Wenjing Liu <[email protected]>
[WHY & HOW]
When acquiring an OTG master pipe we should prefer currently enabled OTG master pipes first. If there are no free pipes used as current OTG master pipe then we will try to acquire a currently unused free pipe as new OTG master instead of tearing down current secondary pipes from ODM or MPC combine.
--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 37 ++++++++++++++++++- drivers/gpu/drm/amd/display/dc/inc/resource.h | 12 ++++++ 2 files changed, 48 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +36 -1
@@ -1764,6 +1764,29 @@ int recource_find_free_pipe_not_used_in_cur_res_ctx(return free_pipe_idx; } +int recource_find_free_pipe_used_as_otg_master_in_cur_res_ctx ( +const struct resource_context *cur_res_ctx, +struct resource_context *new_res_ctx, +const struct resource_pool *pool) +{ +int free_pipe_idx =FREE_PIPE_INDEX_NOT_FOUND ; +const struct pipe_ctx *new_pipe, *cur_pipe; +int i; + +for (i =0 ; i < pool->pipe_count; i++) { + cur_pipe = &cur_res_ctx->pipe_ctx[i]; + new_pipe = &new_res_ctx->pipe_ctx[i]; + +if (resource_is_pipe_type (cur_pipe,OTG_MASTER ) && +resource_is_pipe_type (new_pipe,FREE_PIPE )) { + free_pipe_idx = i; +break ; + } + } + +return free_pipe_idx; +} + int resource_find_free_pipe_used_as_cur_sec_dpp_in_mpcc_combine( const struct resource_context *cur_res_ctx, struct resource_context *new_res_ctx,
@@ -3600,8 +3623,20 @@ static bool acquire_otg_master_pipe_for_stream(int pipe_idx;struct pipe_ctx *pipe_ctx =NULL ; - pipe_idx =recource_find_free_pipe_not_used_in_cur_res_ctx ( +/* +* Upper level code is responsible to optimize unnecessary addition and +* removal for unchanged streams. So unchanged stream will keep the same +* OTG master instance allocated. When current stream is removed and a +* new stream is added, we want to reuse the OTG instance made available +* by the removed stream first. If not found, we try to avoid of using +* any free pipes already used in current context as this could tear +* down exiting ODM/MPC/MPO configuration unnecessarily. +*/ + pipe_idx =recource_find_free_pipe_used_as_otg_master_in_cur_res_ctx ( &cur_ctx->res_ctx, &new_ctx->res_ctx, pool); +if (pipe_idx ==FREE_PIPE_INDEX_NOT_FOUND ) + pipe_idx =recource_find_free_pipe_not_used_in_cur_res_ctx ( + &cur_ctx->res_ctx, &new_ctx->res_ctx, pool);if (pipe_idx ==FREE_PIPE_INDEX_NOT_FOUND ) pipe_idx =resource_find_any_free_pipe (&new_ctx->res_ctx, pool);if (pipe_idx !=FREE_PIPE_INDEX_NOT_FOUND ) {
drivers/gpu/drm/amd/display/dc/inc/resource.h +12 -0
@@ -500,6 +500,18 @@ int recource_find_free_pipe_not_used_in_cur_res_ctx(struct resource_context *new_res_ctx, const struct resource_pool *pool); +/* +* Look for a free pipe in new resource context that is used in current resource +* context as an OTG master pipe. +* +* return - FREE_PIPE_INDEX_NOT_FOUND if free pipe is not found, otherwise +* pipe idx of the free pipe +*/ +int recource_find_free_pipe_used_as_otg_master_in_cur_res_ctx ( +const struct resource_context *cur_res_ctx, +struct resource_context *new_res_ctx, +const struct resource_pool *pool); +/* * Look for a free pipe in new resource context that is used as a secondary DPP * pipe in any MPCC combine in current resource context.
Signature · 1 line
2.42.0
PATCH 11/20 drm/amd/display: Enable DCN clock gating for DCN35
In reply to Alex HungFrom: Daniel Miess <[email protected]>
[WHY & HOW]
Enable DCN clock gating for DCN35.
Disable DTBCLK gate before link training
and re-enable afterwards
--- .../gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 6 ++- .../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.c | 30 +++++++++++++ .../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.h | 7 +++- .../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 +---- .../drm/amd/display/dc/dcn35/dcn35_pg_cntl.h | 1 - .../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 15 ++++++- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 42 +++++++++++++------ .../gpu/drm/amd/display/dc/inc/hw/pg_cntl.h | 2 - .../dc/resource/dcn35/dcn35_resource.c | 16 ++++++- .../dc/resource/dcn35/dcn35_resource.h | 1 + .../include/asic_reg/dcn/dcn_3_5_0_sh_mask.h | 8 ++++ 11 files changed, 108 insertions(+), 30 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h +5 -1
@@ -291,7 +291,11 @@type SYMCLKB_FE_SRC_SEL ;\type SYMCLKC_FE_SRC_SEL ;\type SYMCLKD_FE_SRC_SEL ;\ -type SYMCLKE_FE_SRC_SEL ; +type SYMCLKE_FE_SRC_SEL ;\ +type DTBCLK_P0_GATE_DISABLE ;\ +type DTBCLK_P1_GATE_DISABLE ;\ +type DTBCLK_P2_GATE_DISABLE ;\ +type DTBCLK_P3_GATE_DISABLE ;\struct dccg_shift {DCCG_REG_FIELD_LIST (uint8_t )
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dccg.c +30 -0
@@ -256,6 +256,21 @@ static void dccg35_set_dtbclk_dto(if (params->ref_dtbclk_khz && req_dtbclk_khz) {uint32_t modulo, phase; +switch (params->otg_inst) { +case 0 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P0_GATE_DISABLE ,1 ); +break ; +case 1 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P1_GATE_DISABLE ,1 ); +break ; +case 2 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P2_GATE_DISABLE ,1 ); +break ; +case 3 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P3_GATE_DISABLE ,1 ); +break ; + } +// phase / modulo = dtbclk / dtbclk ref modulo = params->ref_dtbclk_khz *1000 ; phase = req_dtbclk_khz *1000 ;
@@ -280,6 +295,21 @@ static void dccg35_set_dtbclk_dto(REG_UPDATE (OTG_PIXEL_RATE_CNTL [params->otg_inst],PIPE_DTO_SRC_SEL [params->otg_inst],2 ); }else { +switch (params->otg_inst) { +case 0 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P0_GATE_DISABLE ,0 ); +break ; +case 1 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P1_GATE_DISABLE ,0 ); +break ; +case 2 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P2_GATE_DISABLE ,0 ); +break ; +case 3 : +REG_UPDATE (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P3_GATE_DISABLE ,0 ); +break ; + } +REG_UPDATE_2 (OTG_PIXEL_RATE_CNTL [params->otg_inst],DTBCLK_DTO_ENABLE [params->otg_inst],0 ,PIPE_DTO_SRC_SEL [params->otg_inst], params->is_hdmi ?0 :1 );
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dccg.h +6 -1
@@ -34,6 +34,7 @@#define DCCG_REG_LIST_DCN35 () \ DCCG_REG_LIST_DCN314(),\ SR(DPPCLK_CTRL),\ + SR(DCCG_GATE_DISABLE_CNTL5),\ SR(DCCG_GATE_DISABLE_CNTL6),\ SR(DCCG_GLOBAL_FGCG_REP_CNTL),\ SR(SYMCLKA_CLOCK_ENABLE),\
@@ -174,7 +175,11 @@DCCG_SF (SYMCLKB_CLOCK_ENABLE ,SYMCLKB_FE_SRC_SEL , mask_sh),\DCCG_SF (SYMCLKC_CLOCK_ENABLE ,SYMCLKC_FE_SRC_SEL , mask_sh),\DCCG_SF (SYMCLKD_CLOCK_ENABLE ,SYMCLKD_FE_SRC_SEL , mask_sh),\ - DCCG_SF(SYMCLKE_CLOCK_ENABLE, SYMCLKE_FE_SRC_SEL, mask_sh) +DCCG_SF (SYMCLKE_CLOCK_ENABLE ,SYMCLKE_FE_SRC_SEL , mask_sh),\ +DCCG_SF (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P0_GATE_DISABLE , mask_sh),\ +DCCG_SF (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P1_GATE_DISABLE , mask_sh),\ +DCCG_SF (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P2_GATE_DISABLE , mask_sh),\ +DCCG_SF (DCCG_GATE_DISABLE_CNTL5 ,DTBCLK_P3_GATE_DISABLE , mask_sh),\ struct dccg *dccg35_create( struct dc_context *ctx,
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.c +1 -9
@@ -332,13 +332,6 @@ void pg_cntl35_io_clk_pg_control(struct pg_cntl *pg_cntl, bool power_on) pg_cntl->pg_res_enable[PG_DCIO ] = power_on; } -void pg_cntl35_set_force_poweron_domain22 (struct pg_cntl *pg_cntl,bool power_on) -{ -struct dcn_pg_cntl *pg_cntl_dcn =TO_DCN_PG_CNTL (pg_cntl); - -REG_UPDATE (DOMAIN22_PG_CONFIG ,DOMAIN_POWER_FORCEON , power_on ?1 :0 ); -} -static bool pg_cntl35_plane_otg_status (struct pg_cntl *pg_cntl) {struct dcn_pg_cntl *pg_cntl_dcn =TO_DCN_PG_CNTL (pg_cntl);
@@ -508,8 +501,7 @@ static const struct pg_cntl_funcs pg_cntl35_funcs = { .mpcc_pg_control = pg_cntl35_mpcc_pg_control, .opp_pg_control = pg_cntl35_opp_pg_control, .optc_pg_control = pg_cntl35_optc_pg_control, - .dwb_pg_control = pg_cntl35_dwb_pg_control, - .set_force_poweron_domain22 = pg_cntl35_set_force_poweron_domain22 + .dwb_pg_control = pg_cntl35_dwb_pg_control }; struct pg_cntl *pg_cntl35_create(
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.h +0 -1
@@ -183,7 +183,6 @@ void pg_cntl35_optc_pg_control(struct pg_cntl *pg_cntl, unsigned int optc_inst, bool power_on);void pg_cntl35_dwb_pg_control (struct pg_cntl *pg_cntl,bool power_on);void pg_cntl35_init_pg_status (struct pg_cntl *pg_cntl); -void pg_cntl35_set_force_poweron_domain22 (struct pg_cntl *pg_cntl,bool power_on); struct pg_cntl *pg_cntl35_create( struct dc_context *ctx,
drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.h +14 -1
@@ -682,6 +682,7 @@ struct dce_hwseq_registers {uint32_t DCHUBBUB_ARB_HOSTVM_CNTL ;uint32_t HPO_TOP_HW_CONTROL ;uint32_t DMU_CLK_CNTL ; +uint32_t DCCG_GATE_DISABLE_CNTL4 ;uint32_t DCCG_GATE_DISABLE_CNTL5 ; };/* set field name */
@@ -1199,7 +1200,19 @@ struct dce_hwseq_registers {type PHYBSYMCLK_ROOT_GATE_DISABLE ;\type PHYCSYMCLK_ROOT_GATE_DISABLE ;\type PHYDSYMCLK_ROOT_GATE_DISABLE ;\ -type PHYESYMCLK_ROOT_GATE_DISABLE ; +type PHYESYMCLK_ROOT_GATE_DISABLE ;\ +type DTBCLK_P0_GATE_DISABLE ;\ +type DTBCLK_P1_GATE_DISABLE ;\ +type DTBCLK_P2_GATE_DISABLE ;\ +type DTBCLK_P3_GATE_DISABLE ;\ +type DPSTREAMCLK0_GATE_DISABLE ;\ +type DPSTREAMCLK1_GATE_DISABLE ;\ +type DPSTREAMCLK2_GATE_DISABLE ;\ +type DPSTREAMCLK3_GATE_DISABLE ;\ +type DPIASYMCLK0_GATE_DISABLE ;\ +type DPIASYMCLK1_GATE_DISABLE ;\ +type DPIASYMCLK2_GATE_DISABLE ;\ +type DPIASYMCLK3_GATE_DISABLE ;struct dce_hwseq_shift {HWSEQ_REG_FIELD_LIST (uint8_t )
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +29 -13
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/inc/hw/pg_cntl.h +0 -2
@@ -47,8 +47,6 @@ struct pg_cntl_funcs {void (*optc_pg_control)(struct pg_cntl *pg_cntl,unsigned int optc_inst,bool power_on);void (*dwb_pg_control)(struct pg_cntl *pg_cntl,bool power_on); void (*init_pg_status)(struct pg_cntl *pg_cntl); - - void (*set_force_poweron_domain22)(struct pg_cntl *pg_cntl, bool power_on); };#endif //__DC_PG_CNTL_H__
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +14 -2
@@ -626,7 +626,19 @@ static struct dce_hwseq_registers hwseq_reg; HWS_SF(, DCCG_GATE_DISABLE_CNTL2, PHYBSYMCLK_ROOT_GATE_DISABLE, mask_sh), \ HWS_SF(, DCCG_GATE_DISABLE_CNTL2, PHYCSYMCLK_ROOT_GATE_DISABLE, mask_sh), \ HWS_SF(, DCCG_GATE_DISABLE_CNTL2, PHYDSYMCLK_ROOT_GATE_DISABLE, mask_sh), \ - HWS_SF(, DCCG_GATE_DISABLE_CNTL2, PHYESYMCLK_ROOT_GATE_DISABLE, mask_sh) + HWS_SF(, DCCG_GATE_DISABLE_CNTL2, PHYESYMCLK_ROOT_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DTBCLK_P0_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DTBCLK_P1_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DTBCLK_P2_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DTBCLK_P3_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DPSTREAMCLK0_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DPSTREAMCLK1_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DPSTREAMCLK2_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL5, DPSTREAMCLK3_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL4, DPIASYMCLK0_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL4, DPIASYMCLK1_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL4, DPIASYMCLK2_GATE_DISABLE, mask_sh),\ + HWS_SF(, DCCG_GATE_DISABLE_CNTL4, DPIASYMCLK3_GATE_DISABLE, mask_sh)static const struct dce_hwseq_shift hwseq_shift = {HWSEQ_DCN35_MASK_SH_LIST (__SHIFT)
@@ -705,7 +717,7 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_dcc = DCC_ENABLE, .disable_dpp_power_gate = true, .disable_hubp_power_gate = true, - .disable_clock_gate = true, + .disable_clock_gate = false, .disable_dsc_power_gate = true, .vsr_support = true, .performance_trace = false,
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.h +1 -0
@@ -166,6 +166,7 @@ struct resource_pool *dcn35_create_resource_pool(SR (MMHUBBUB_MEM_PWR_CNTL ), \SR (DCCG_GATE_DISABLE_CNTL ), \SR (DCCG_GATE_DISABLE_CNTL2 ), \ +SR (DCCG_GATE_DISABLE_CNTL4 ), \SR (DCCG_GATE_DISABLE_CNTL5 ), \SR (DCFCLK_CNTL ),\ SR(DC_MEM_GLOBAL_PWR_REQ_CNTL), \
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_5_0_sh_mask.h +8 -0
@@ -6220,12 +6220,20 @@#define DCCG_GATE_DISABLE_CNTL4__PHYD_REFCLK_ROOT_GATE_DISABLE__SHIFT 0x3#define DCCG_GATE_DISABLE_CNTL4__PHYE_REFCLK_ROOT_GATE_DISABLE__SHIFT 0x4#define DCCG_GATE_DISABLE_CNTL4__HDMICHARCLK0_ROOT_GATE_DISABLE__SHIFT 0x11 +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK0_GATE_DISABLE__SHIFT 0x17 +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK1_GATE_DISABLE__SHIFT 0x18 +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK2_GATE_DISABLE__SHIFT 0x19 +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK3_GATE_DISABLE__SHIFT 0x1a#define DCCG_GATE_DISABLE_CNTL4__PHYA_REFCLK_ROOT_GATE_DISABLE_MASK 0x00000001L#define DCCG_GATE_DISABLE_CNTL4__PHYB_REFCLK_ROOT_GATE_DISABLE_MASK 0x00000002L#define DCCG_GATE_DISABLE_CNTL4__PHYC_REFCLK_ROOT_GATE_DISABLE_MASK 0x00000004L#define DCCG_GATE_DISABLE_CNTL4__PHYD_REFCLK_ROOT_GATE_DISABLE_MASK 0x00000008L#define DCCG_GATE_DISABLE_CNTL4__PHYE_REFCLK_ROOT_GATE_DISABLE_MASK 0x00000010L#define DCCG_GATE_DISABLE_CNTL4__HDMICHARCLK0_ROOT_GATE_DISABLE_MASK 0x00020000L +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK0_GATE_DISABLE_MASK 0x00800000L +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK1_GATE_DISABLE_MASK 0x01000000L +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK2_GATE_DISABLE_MASK 0x02000000L +#define DCCG_GATE_DISABLE_CNTL4__DPIASYMCLK3_GATE_DISABLE_MASK 0x04000000L#define DPSTREAMCLK_CNTL__DPSTREAMCLK0_SRC_SEL__SHIFT 0x0#define DPSTREAMCLK_CNTL__DPSTREAMCLK0_EN__SHIFT 0x3#define DPSTREAMCLK_CNTL__DPSTREAMCLK1_SRC_SEL__SHIFT 0x4
Signature · 1 line
2.42.0
PATCH 12/20 drm/amd/display: Negate IPS allow and commit bits
In reply to Alex HungFrom: Duncan Ma <[email protected]>
[WHY]
On s0i3, IPS mask isn't saved and restored. It is reset to zero on exit.
If it is cleared unexpectedly, driver will proceed operations while DCN is in IPS2 and cause a hang.
[HOW]
Negate the bit logic. Default value of zero indicates it is still in IPS2. Driver must poll for the bit to assert.
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 18 +++++++++--------- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +9 -9
@@ -820,22 +820,22 @@ static void dcn35_set_idle_state(struct clk_mgr *clk_mgr_base, bool allow_idle)if (dc->config.disable_ips ==DMUB_IPS_ENABLE || dc->config.disable_ips ==DMUB_IPS_DISABLE_DYNAMIC ) { - val |=DMUB_IPS1_ALLOW_MASK ; - val |=DMUB_IPS2_ALLOW_MASK ; - }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS1 ) { val = val & ~DMUB_IPS1_ALLOW_MASK ; val = val & ~DMUB_IPS2_ALLOW_MASK ; - }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2 ) { - val |=DMUB_IPS1_ALLOW_MASK ; - val = val & ~DMUB_IPS2_ALLOW_MASK ; - }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2_Z10 ) { + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS1 ) { val |=DMUB_IPS1_ALLOW_MASK ; val |=DMUB_IPS2_ALLOW_MASK ; + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2 ) { + val = val & ~DMUB_IPS1_ALLOW_MASK ; + val |=DMUB_IPS2_ALLOW_MASK ; + }else if (dc->config.disable_ips ==DMUB_IPS_DISABLE_IPS2_Z10 ) { + val = val & ~DMUB_IPS1_ALLOW_MASK ; + val = val & ~DMUB_IPS2_ALLOW_MASK ; }if (!allow_idle) { - val = val & ~DMUB_IPS1_ALLOW_MASK ; - val = val & ~DMUB_IPS2_ALLOW_MASK ; + val |=DMUB_IPS1_ALLOW_MASK ; + val |=DMUB_IPS2_ALLOW_MASK ; }dcn35_smu_write_ips_scratch (clk_mgr, val);
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
@@ -4934,8 +4934,8 @@ bool dc_dmub_is_ips_idle_state(struct dc *dc)if (dc->hwss.get_idle_state) idle_state = dc->hwss.get_idle_state (dc); -if ((idle_state &DMUB_IPS1_ALLOW_MASK ) || - (idle_state &DMUB_IPS2_ALLOW_MASK )) +if (!(idle_state &DMUB_IPS1_ALLOW_MASK ) || + !(idle_state &DMUB_IPS2_ALLOW_MASK ))return true;return false;
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +5 -5
@@ -1202,11 +1202,11 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc) allow_state = dc->hwss.get_idle_state (dc); dc->hwss.set_idle_state (dc, false); -if (allow_state &DMUB_IPS2_ALLOW_MASK ) { +if (!(allow_state &DMUB_IPS2_ALLOW_MASK )) {// Wait for evaluation time udelay (dc->debug.ips2_eval_delay_us); commit_state = dc->hwss.get_idle_state (dc); -if (commit_state &DMUB_IPS2_COMMIT_MASK ) { +if (!(commit_state &DMUB_IPS2_COMMIT_MASK )) {// Tell PMFW to exit low power state dc->clk_mgr->funcs->exit_low_power_state (dc->clk_mgr);
@@ -1216,7 +1216,7 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc)for (i =0 ; i < max_num_polls; ++i) { commit_state = dc->hwss.get_idle_state (dc); -if (!(commit_state &DMUB_IPS2_COMMIT_MASK )) +if (commit_state &DMUB_IPS2_COMMIT_MASK )break ;udelay (1 );
@@ -1235,10 +1235,10 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc) }dc_dmub_srv_notify_idle (dc, false); -if (allow_state &DMUB_IPS1_ALLOW_MASK ) { +if (!(allow_state &DMUB_IPS1_ALLOW_MASK )) {for (i =0 ; i < max_num_polls; ++i) { commit_state = dc->hwss.get_idle_state (dc); -if (!(commit_state &DMUB_IPS1_COMMIT_MASK )) +if (commit_state &DMUB_IPS1_COMMIT_MASK )break ;udelay (1 );
Signature · 1 line
2.42.0
PATCH 13/20 drm/amd/display: Add disable timeout option
In reply to Alex HungFrom: Duncan Ma <[email protected]>
[WHY]
Driver continues running whenever there is is timeout from smu or dmcub.
It is difficult to track failure state when dcn, dc or dmcub changes on root failure.
[HOW]
Add disable_timeout option to halt driver whenever there is a failure in response.
--- .../amd/display/dc/clk_mgr/dcn35/dcn35_smu.c | 3 ++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 29 +++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.c +3 -0
@@ -116,6 +116,9 @@ static uint32_t dcn35_smu_wait_for_response(struct clk_mgr_internal *clk_mgr, unmsleep (delay_us/1000 ); else if (delay_us > 0) udelay(delay_us); + + if (clk_mgr->base.ctx->dc->debug.disable_timeout) + max_retries++; } while (max_retries--); return res_val;
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -978,6 +978,7 @@ struct dc_debug_options {bool psp_disabled_wa;unsigned int ips2_eval_delay_us;unsigned int ips2_entry_delay_us; +bool disable_timeout; };struct gpu_info_soc_bounding_box_v1_0 ;
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +23 -6
@@ -241,7 +241,12 @@ bool dc_dmub_srv_cmd_run_list(struct dc_dmub_srv *dc_dmub_srv, unsigned int coun// Wait for DMUB to process command if (wait_type !=DM_DMUB_WAIT_TYPE_NO_WAIT ) { - status =dmub_srv_wait_for_idle (dmub,100000 ); +if (dc_dmub_srv->ctx->dc->debug.disable_timeout) { +do { + status =dmub_srv_wait_for_idle (dmub,100000 ); + }while (status !=DMUB_STATUS_OK ); + }else + status =dmub_srv_wait_for_idle (dmub,100000 );if (status !=DMUB_STATUS_OK ) {DC_LOG_DEBUG ("No reply for DMUB command: status=%d\n" , status);
@@ -1147,10 +1152,16 @@ bool dc_dmub_srv_is_hw_pwr_up(struct dc_dmub_srv *dc_dmub_srv, bool wait)return true;if (wait) { - status =dmub_srv_wait_for_hw_pwr_up (dc_dmub_srv->dmub,500000 ); -if (status !=DMUB_STATUS_OK ) { -DC_ERROR ("Error querying DMUB hw power up status: error=%d\n" , status); -return false; +if (dc_dmub_srv->ctx->dc->debug.disable_timeout) { +do { + status =dmub_srv_wait_for_hw_pwr_up (dc_dmub_srv->dmub,500000 ); + }while (status !=DMUB_STATUS_OK ); + }else { + status =dmub_srv_wait_for_hw_pwr_up (dc_dmub_srv->dmub,500000 ); +if (status !=DMUB_STATUS_OK ) { +DC_ERROR ("Error querying DMUB hw power up status: error=%d\n" , status); +return false; + } } }else return dmub_srv_is_hw_pwr_up (dc_dmub_srv->dmub);
@@ -1187,7 +1198,7 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc)const uint32_t max_num_polls =10000 ;uint32_t allow_state =0 ;uint32_t commit_state =0 ; -uint32_t i; +int i;if (dc->debug.dmcub_emulation)return ;
@@ -1220,6 +1231,9 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc)break ;udelay (1 ); + +if (dc->debug.disable_timeout) + i--; }ASSERT (i < max_num_polls);
@@ -1242,6 +1256,9 @@ void dc_dmub_srv_exit_low_power_state(const struct dc *dc)break ;udelay (1 ); + +if (dc->debug.disable_timeout) + i--; }ASSERT (i < max_num_polls); }
Signature · 1 line
2.42.0
PATCH 14/20 drm/amd/display: Change the DMCUB mailbox memory location from FB to inbox
In reply to Alex HungFrom: Lewis Huang <[email protected]>
[WHY]
Flush command sent to DMCUB spends more time for execution on a dGPU than on an APU. This causes cursor lag when using high refresh rate mouses.
[HOW]
1. Change the DMCUB mailbox memory location from FB to inbox.
2. Only change windows memory to inbox.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 ++++---- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 22 ++++++++----- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 32 ++++++++++++++----- 3 files changed, 45 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -6
@@ -2078,7 +2078,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)struct dmub_srv_create_params create_params;struct dmub_srv_region_params region_params;struct dmub_srv_region_info region_info; -struct dmub_srv_fb_params fb_params; +struct dmub_srv_memory_params memory_params;struct dmub_srv_fb_info *fb_info;struct dmub_srv *dmub_srv;const struct dmcub_firmware_header_v1_0 *hdr;
@@ -2181,6 +2181,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) adev->dm.dmub_fw->data +le32_to_cpu (hdr->header.ucode_array_offset_bytes) +PSP_HEADER_BYTES ; + region_params.is_mailbox_in_inbox = false; status =dmub_srv_calc_region_info (dmub_srv, ®ion_params, ®ion_info);
@@ -2204,10 +2205,10 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)return r;/* Rebase the regions on the framebuffer address. */ -memset (&fb_params,0 ,sizeof (fb_params)); - fb_params.cpu_addr = adev->dm.dmub_bo_cpu_addr; - fb_params.gpu_addr = adev->dm.dmub_bo_gpu_addr; - fb_params.region_info = ®ion_info; +memset (&memory_params,0 ,sizeof (memory_params)); + memory_params.cpu_fb_addr = adev->dm.dmub_bo_cpu_addr; + memory_params.gpu_fb_addr = adev->dm.dmub_bo_gpu_addr; + memory_params.region_info = ®ion_info; adev->dm.dmub_fb_info =kzalloc (sizeof (*adev->dm.dmub_fb_info),GFP_KERNEL );
@@ -2219,7 +2220,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)return -ENOMEM ; } - status =dmub_srv_calc_fb_info (dmub_srv, &fb_params, fb_info); + status =dmub_srv_calc_mem_info (dmub_srv, &memory_params, fb_info);if (status !=DMUB_STATUS_OK ) {DRM_ERROR ("Error calculating DMUB FB info: %d\n" , status);return -EINVAL ;
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +14 -8
@@ -195,6 +195,7 @@ struct dmub_srv_region_params {uint32_t vbios_size;const uint8_t *fw_inst_const;const uint8_t *fw_bss_data; +bool is_mailbox_in_inbox; };/**
@@ -214,20 +215,25 @@ struct dmub_srv_region_params {*/ struct dmub_srv_region_info {uint32_t fb_size; +uint32_t inbox_size;uint8_t num_regions;struct dmub_region regions[DMUB_WINDOW_TOTAL ]; };/** -* struct dmub_srv_fb_params - parameters used for driver fb setup +* struct dmub_srv_memory_params - parameters used for driver fb setup * @region_info: region info calculated by dmub service -* @cpu_addr: base cpu address for the framebuffer -* @gpu_addr: base gpu virtual address for the framebuffer +* @cpu_fb_addr: base cpu address for the framebuffer +* @cpu_inbox_addr: base cpu address for the gart +* @gpu_fb_addr: base gpu virtual address for the framebuffer +* @gpu_inbox_addr: base gpu virtual address for the gart */ -struct dmub_srv_fb_params { +struct dmub_srv_memory_params {const struct dmub_srv_region_info *region_info; -void *cpu_addr; -uint64_t gpu_addr; +void *cpu_fb_addr; +void *cpu_inbox_addr; +uint64_t gpu_fb_addr; +uint64_t gpu_inbox_addr; };/**
@@ -563,8 +569,8 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub,* DMUB_STATUS_OK - success * DMUB_STATUS_INVALID - unspecified error */ -enum dmub_status dmub_srv_calc_fb_info (struct dmub_srv *dmub, -const struct dmub_srv_fb_params *params, +enum dmub_status dmub_srv_calc_mem_info (struct dmub_srv *dmub, +const struct dmub_srv_memory_params *params,struct dmub_srv_fb_info *out);/**
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +24 -8
@@ -434,7 +434,7 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub,uint32_t fw_state_size =DMUB_FW_STATE_SIZE ;uint32_t trace_buffer_size =DMUB_TRACE_BUFFER_SIZE ;uint32_t scratch_mem_size =DMUB_SCRATCH_MEM_SIZE ; - +uint32_t previous_top =0 ;if (!dmub->sw_init)return DMUB_STATUS_INVALID ;
@@ -459,8 +459,15 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub, bios->base =dmub_align (stack->top,256 ); bios->top = bios->base + params->vbios_size; - mail->base =dmub_align (bios->top,256 ); - mail->top = mail->base +DMUB_MAILBOX_SIZE ; +if (params->is_mailbox_in_inbox) { + mail->base =0 ; + mail->top = mail->base +DMUB_MAILBOX_SIZE ; + previous_top = bios->top; + }else { + mail->base =dmub_align (bios->top,256 ); + mail->top = mail->base +DMUB_MAILBOX_SIZE ; + previous_top = mail->top; + } fw_info =dmub_get_fw_meta_info (params);
@@ -479,7 +486,7 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub, dmub->fw_version = fw_info->fw_version; } - trace_buff->base =dmub_align (mail->top,256 ); + trace_buff->base =dmub_align (previous_top,256 ); trace_buff->top = trace_buff->base +dmub_align (trace_buffer_size,64 ); fw_state->base =dmub_align (trace_buff->top,256 );
@@ -490,11 +497,14 @@ dmub_srv_calc_region_info(struct dmub_srv *dmub, out->fb_size =dmub_align (scratch_mem->top,4096 ); +if (params->is_mailbox_in_inbox) + out->inbox_size =dmub_align (mail->top,4096 ); +return DMUB_STATUS_OK ; } -enum dmub_status dmub_srv_calc_fb_info (struct dmub_srv *dmub, -const struct dmub_srv_fb_params *params, +enum dmub_status dmub_srv_calc_mem_info (struct dmub_srv *dmub, +const struct dmub_srv_memory_params *params,struct dmub_srv_fb_info *out) {uint8_t *cpu_base;
@@ -509,8 +519,8 @@ enum dmub_status dmub_srv_calc_fb_info(struct dmub_srv *dmub,if (params->region_info->num_regions !=DMUB_NUM_WINDOWS )return DMUB_STATUS_INVALID ; - cpu_base = (uint8_t *)params->cpu_addr; - gpu_base = params->gpu_addr; + cpu_base = (uint8_t *)params->cpu_fb_addr; + gpu_base = params->gpu_fb_addr;for (i =0 ; i <DMUB_NUM_WINDOWS ; ++i) { const struct dmub_region *reg =
@@ -518,6 +528,12 @@ enum dmub_status dmub_srv_calc_fb_info(struct dmub_srv *dmub, out->fb[i].cpu_addr = cpu_base + reg->base; out->fb[i].gpu_addr = gpu_base + reg->base; + +if (i ==DMUB_WINDOW_4_MAILBOX && params->cpu_inbox_addr !=0 ) { + out->fb[i].cpu_addr = (uint8_t *)params->cpu_inbox_addr + reg->base; + out->fb[i].gpu_addr = params->gpu_inbox_addr + reg->base; + } + out->fb[i].size = reg->top - reg->base; }
Signature · 1 line
2.42.0
PATCH 15/20 drm/amd/display: Enable DSC Flag in MST Mode Validation
In reply to Alex HungFrom: Fangzhi Zuo <[email protected]>
[WHY & HOW]
When dsc is possible, MST mode validation includes:
1. if maximum dsc compression cannot fit into end to end bw, mode pruned
2. if native bw cannot fit into end to end bw, try to enabled dsc to see whether a feasible dsc config can be found
3. if native bw can fit into end to end bw, mode supported
--- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 44 +++++++++++-------- 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +26 -18
@@ -1602,9 +1602,8 @@ enum dc_status dm_dp_mst_is_port_support_mode(struct dc_link_settings cur_link_settings;unsigned int end_to_end_bw_in_kbps =0 ;unsigned int upper_link_bw_in_kbps =0 , down_link_bw_in_kbps =0 ; -unsigned int max_compressed_bw_in_kbps =0 ;struct dc_dsc_bw_range bw_range = {0 }; -uint16_t full_pbn = aconnector->mst_output_port->full_pbn; +struct dc_dsc_config_options dsc_options = {0 };/* * Consider the case with the depth of the mst topology tree is equal or less than 2
@@ -1620,30 +1619,39 @@ enum dc_status dm_dp_mst_is_port_support_mode( (aconnector->mst_output_port->passthrough_aux || aconnector->dsc_aux == &aconnector->mst_output_port->aux)) { cur_link_settings = stream->link->verified_link_cap; + upper_link_bw_in_kbps =dc_link_bandwidth_kbps (aconnector->dc_link, &cur_link_settings); + down_link_bw_in_kbps =kbps_from_pbn (aconnector->mst_output_port->full_pbn); - upper_link_bw_in_kbps =dc_link_bandwidth_kbps (aconnector->dc_link, - &cur_link_settings); - down_link_bw_in_kbps =kbps_from_pbn (full_pbn); - -/* pick the bottleneck */ - end_to_end_bw_in_kbps =min (upper_link_bw_in_kbps, - down_link_bw_in_kbps); - -/* -* use the maximum dsc compression bandwidth as the required -* bandwidth for the mode -*/ - max_compressed_bw_in_kbps = bw_range.min_kbps; +/* pick the end to end bw bottleneck */ + end_to_end_bw_in_kbps =min (upper_link_bw_in_kbps, down_link_bw_in_kbps); -if (end_to_end_bw_in_kbps < max_compressed_bw_in_kbps) { -DRM_DEBUG_DRIVER ("Mode does not fit into DSC pass-through bandwidth validation\n" ); +if (end_to_end_bw_in_kbps < bw_range.min_kbps) { +DRM_DEBUG_DRIVER ("maximum dsc compression cannot fit into end-to-end bandwidth\n" );return DC_FAIL_BANDWIDTH_VALIDATE ; } + +if (end_to_end_bw_in_kbps < bw_range.stream_kbps) { +dc_dsc_get_default_config_option (stream->link->dc, &dsc_options); + dsc_options.max_target_bpp_limit_override_x16 = aconnector->base.display_info.max_dsc_bpp *16 ; +if (dc_dsc_compute_config (stream->sink->ctx->dc->res_pool->dscs[0 ], + &stream->sink->dsc_caps.dsc_dec_caps, + &dsc_options, + end_to_end_bw_in_kbps, + &stream->timing, +dc_link_get_highest_encoding_format (stream->link), + &stream->timing.dsc_cfg)) { + stream->timing.flags.DSC =1 ; +DRM_DEBUG_DRIVER ("end-to-end bandwidth require dsc and dsc config found\n" ); + }else { +DRM_DEBUG_DRIVER ("end-to-end bandwidth require dsc but dsc config not found\n" ); +return DC_FAIL_BANDWIDTH_VALIDATE ; + } + } } else {/* check if mode could be supported within full_pbn */ bpp =convert_dc_color_depth_into_bpc (stream->timing.display_color_depth) *3 ; pbn =drm_dp_calc_pbn_mode (stream->timing.pix_clk_100hz /10 , bpp, false); -if (pbn > full_pbn) +if (pbn > aconnector->mst_output_port->full_pbn)return DC_FAIL_BANDWIDTH_VALIDATE ; }
Signature · 1 line
2.42.0
PATCH 16/20 drm/amd/display: Fix encoder disable logic
In reply to Alex HungFrom: Nicholas Susanto <[email protected]>
[WHY]
DENTIST hangs when OTG is off and encoder is on. We were not disabling the encoder properly when switching from extended mode to external monitor only.
[HOW]
Disable the encoder using an existing enable/disable fifo helper instead of enc35_stream_encoder_enable.
--- .../amd/display/dc/dcn35/dcn35_dio_stream_encoder.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dio_stream_encoder.c +4 -6
@@ -261,12 +261,6 @@ static void enc35_stream_encoder_enable(/* invalid mode ! */ ASSERT_CRITICAL (false); } - -REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,1 ); -REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,1 ); - }else { -REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,0 ); -REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,0 ); } }
@@ -436,6 +430,8 @@ static void enc35_disable_fifo(struct stream_encoder *enc)struct dcn10_stream_encoder *enc1 =DCN10STRENC_FROM_STRENC (enc);REG_UPDATE (DIG_FIFO_CTRL0 ,DIG_FIFO_ENABLE ,0 ); +REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,0 ); +REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,0 ); }static void enc35_enable_fifo (struct stream_encoder *enc)
@@ -443,6 +439,8 @@ static void enc35_enable_fifo(struct stream_encoder *enc)struct dcn10_stream_encoder *enc1 =DCN10STRENC_FROM_STRENC (enc);REG_UPDATE (DIG_FIFO_CTRL0 ,DIG_FIFO_READ_START_LEVEL ,0x7 ); +REG_UPDATE (DIG_FE_CLK_CNTL ,DIG_FE_CLK_EN ,1 ); +REG_UPDATE (DIG_FE_EN_CNTL ,DIG_FE_ENABLE ,1 );enc35_reset_fifo (enc, true);enc35_reset_fifo (enc, false);
Signature · 1 line
2.42.0
PATCH 17/20 drm/amd/display: Send PQ bit in AMD VSIF
In reply to Alex HungFrom: Krunoslav Kovac <[email protected]>
[WHY & HOW]
PB9 bit 5 was added to signal PQ EOTF in AMD vendor specific infoframe. This change sets it when appropriate.
--- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +4 -2
@@ -693,10 +693,12 @@ static void build_vrr_infopacket_fs2_data(enum color_transfer_func app_tf,if (app_tf !=TRANSFER_FUNC_UNKNOWN ) { infopacket->valid = true; -if (app_tf !=TRANSFER_FUNC_PQ2084 ) { +if (app_tf ==TRANSFER_FUNC_PQ2084 ) + infopacket->sb[9 ] |=0x20 ;// PB9 = [Bit 5 = PQ EOTF Active] +else { infopacket->sb[6 ] |=0x08 ;// PB6 = [Bit 3 = Native Color Active] if (app_tf ==TRANSFER_FUNC_GAMMA_22 ) - infopacket->sb[9 ] |=0x04 ;// PB6 = [Bit 2 = Gamma 2.2 EOTF Active] + infopacket->sb[9 ] |=0x04 ;// PB9 = [Bit 2 = Gamma 2.2 EOTF Active] } } }
Signature · 1 line
2.42.0
PATCH 18/20 drm/amd/display: Add new command to disable replay timing resync
In reply to Alex HungFrom: Anthony Koo <[email protected]>
[WHY & HOW]
Add new command to disable replay timing resync
--- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +41 -0
@@ -2840,6 +2840,10 @@ enum dmub_cmd_replay_type {* Set power opt and coasting vtotal. */ DMUB_CMD__REPLAY_SET_POWER_OPT_AND_COASTING_VTOTAL =4 , +/** +* Set disabled iiming sync. +*/ + DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED = 5, };/**
@@ -3002,6 +3006,27 @@ struct dmub_cmd_replay_set_power_opt_data {uint32_t power_opt; }; +/** +* Data passed from driver to FW in a DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED command. +*/ +struct dmub_cmd_replay_set_timing_sync_data { +/** +* Panel Instance. +* Panel isntance to identify which replay_state to use +* Currently the support is only for 0 or 1 +*/ +uint8_t panel_inst; + +/** +* Explicit padding to 4 byte boundary. +*/ +uint8_t pad[3 ]; +/** +* REPLAY set_timing_sync +*/ +bool timing_sync_supported; +}; +/** * Definition of a DMUB_CMD__SET_REPLAY_POWER_OPT command. */
@@ -3068,6 +3093,20 @@ struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal {struct dmub_cmd_replay_set_coasting_vtotal_data replay_set_coasting_vtotal_data; }; +/** +* Definition of a DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED command. +*/ +struct dmub_rb_cmd_replay_set_timing_sync { +/** +* Command header. +*/ +struct dmub_cmd_header header; +/** +* Definition of DMUB_CMD__REPLAY_SET_TIMING_SYNC_SUPPORTED command. +*/ +struct dmub_cmd_replay_set_timing_sync_data replay_set_timing_sync_data; +}; +/** * Set of HW components that can be locked. *
@@ -4201,6 +4240,8 @@ union dmub_rb_cmd {* Definition of a DMUB_CMD__REPLAY_SET_POWER_OPT_AND_COASTING_VTOTAL command. */ struct dmub_rb_cmd_replay_set_power_opt_and_coasting_vtotal replay_set_power_opt_and_coasting_vtotal; + +struct dmub_rb_cmd_replay_set_timing_sync replay_set_timing_sync; };/**
Signature · 1 line
2.42.0
PATCH 19/20 drm/amd/display: Add missing chips for HDCP
In reply to Alex HungFrom: Rodrigo Siqueira <[email protected]>
[WHAT]
Add missing HDCP ID in the message id enum.
--- drivers/gpu/drm/amd/display/include/hdcp_msg_types.h | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/include/hdcp_msg_types.h +5 -0
@@ -69,6 +69,11 @@ enum hdcp_message_id {HDCP_MESSAGE_ID_READ_RXSTATUS ,HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE , +/* PS175 chip */ + +HDCP_MESSAGE_ID_WRITE_PS175_CMD , +HDCP_MESSAGE_ID_READ_PS175_RSP , + HDCP_MESSAGE_ID_MAX };
Signature · 1 line
2.42.0
PATCH 20/20 drm/amd/display: Promote DC to 3.2.260
In reply to Alex HungFrom: Aric Cyr <[email protected]>
- Add missing chips for HDCP
- Add new command to disable replay timing resync
- Fix encoder disable logic
- Enable DSC Flag in MST Mode Validation
- Change the DMCUB mailbox memory location from FB to inbox
- Add disable timeout option
- Negate IPS allow and commit bits
- Enable DCN clock gating for DCN35
- Prefer currently used OTG master when acquiring free pipe
- Try to acquire a free OTG master not used in cur ctx first
- Clear dpcd_sink_ext_caps if not set
- Enable fast plane updates on DCN3.2 and above
- Add null checks for 8K60 lightup
- Refactor resource into component directory
- Fix DSC not Enabled on Direct MST Sink
- Guard against invalid RPTR/WPTR being set
- Enable CM low mem power optimization
- Fix a debugfs null pointer error
--- 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.259" +#define DC_VER "3.2.260"#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 - 7bb6e298b738 drm/amdkfd: Move TLB flushing logic into amdgpu) 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: Hung, Alex <[email protected]>
Sent: Wednesday, November 8, 2023 1:44 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]>; Wang, Chao-kai (Stylon) <[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; Zuo, Jerry <[email protected]>; Hung, Alex <[email protected]>; Wheeler, Daniel <[email protected]>
Subject: [PATCH 00/20] DC Patches Nov 08, 2023
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Add missing chips for HDCP
* Add new command to disable replay timing resync
* Fix encoder disable logic
* Enable DSC Flag in MST Mode Validation
* Change the DMCUB mailbox memory location from FB to inbox
* Add disable timeout option
* Negate IPS allow and commit bits
* Enable DCN clock gating for DCN35
* Prefer currently used OTG master when acquiring free pipe
* Try to acquire a free OTG master not used in cur ctx first
* Clear dpcd_sink_ext_caps if not set
* Enable fast plane updates on DCN3.2 and above
* Add null checks for 8K60 lightup
* Refactor resource into component directory
* Fix DSC not Enabled on Direct MST Sink
* Guard against invalid RPTR/WPTR being set
* Enable CM low mem power optimization
* Fix a debugfs null pointer error
Anthony Koo (1):
drm/amd/display: Add new command to disable replay timing resync
Aric Cyr (1):
drm/amd/display: Promote DC to 3.2.260
Aurabindo Pillai (1):
drm/amd/display: Fix a debugfs null pointer error
Daniel Miess (1):
drm/amd/display: Enable DCN clock gating for DCN35
Duncan Ma (2):
drm/amd/display: Negate IPS allow and commit bits drm/amd/display: Add disable timeout option
Fangzhi Zuo (2):
drm/amd/display: Fix DSC not Enabled on Direct MST Sink drm/amd/display: Enable DSC Flag in MST Mode Validation
Krunoslav Kovac (1):
drm/amd/display: Send PQ bit in AMD VSIF
Lewis Huang (1):
drm/amd/display: Change the DMCUB mailbox memory location from FB to
inbox
Mounika Adhuri (1):
drm/amd/display: Refactor resource into component directory
Muhammad Ahmed (1):
drm/amd/display: Add null checks for 8K60 lightup
Nicholas Kazlauskas (1):
drm/amd/display: Guard against invalid RPTR/WPTR being set
Nicholas Susanto (1):
drm/amd/display: Fix encoder disable logic
Paul Hsieh (1):
drm/amd/display: Clear dpcd_sink_ext_caps if not set
Rodrigo Siqueira (1):
drm/amd/display: Add missing chips for HDCP
Tianci Yin (1):
drm/amd/display: Enable fast plane updates on DCN3.2 and above
Wenjing Liu (2):
drm/amd/display: Try to acquire a free OTG master not used in cur ctx
first
drm/amd/display: Prefer currently used OTG master when acquiring free
pipe
Yihan Zhu (1):
drm/amd/display: Enable CM low mem power optimization
drivers/gpu/drm/amd/display/Makefile | 1 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 +-
.../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +-
.../display/amdgpu_dm/amdgpu_dm_mst_types.c | 63 +++---
drivers/gpu/drm/amd/display/dc/Makefile | 5 +-
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 18 +-
.../amd/display/dc/clk_mgr/dcn35/dcn35_smu.c | 3 +
drivers/gpu/drm/amd/display/dc/core/dc.c | 6 +-
.../gpu/drm/amd/display/dc/core/dc_resource.c | 50 ++++-
drivers/gpu/drm/amd/display/dc/dc.h | 3 +-
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 39 +++-
drivers/gpu/drm/amd/display/dc/dc_types.h | 1 +
.../gpu/drm/amd/display/dc/dce100/Makefile | 46 ----
.../gpu/drm/amd/display/dc/dce110/Makefile | 4 +-
.../gpu/drm/amd/display/dc/dce112/Makefile | 3 +-
.../gpu/drm/amd/display/dc/dce120/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dce80/Makefile | 3 +-
drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn20/dcn20_dccg.h | 6 +-
.../gpu/drm/amd/display/dc/dcn201/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/Makefile | 1 -
.../gpu/drm/amd/display/dc/dcn301/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn302/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn303/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn31/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn314/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn315/Makefile | 30 ---
.../gpu/drm/amd/display/dc/dcn316/Makefile | 30 ---
drivers/gpu/drm/amd/display/dc/dcn32/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 13 +-
.../display/dc/dcn32/dcn32_resource_helpers.c | 2 +-
.../gpu/drm/amd/display/dc/dcn321/Makefile | 2 +-
drivers/gpu/drm/amd/display/dc/dcn35/Makefile | 2 +-
.../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.c | 30 +++
.../gpu/drm/amd/display/dc/dcn35/dcn35_dccg.h | 7 +-
.../dc/dcn35/dcn35_dio_stream_encoder.c | 10 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c | 10 +-
.../drm/amd/display/dc/dcn35/dcn35_pg_cntl.h | 1 -
.../drm/amd/display/dc/dml/calcs/dcn_calcs.c | 2 +-
.../drm/amd/display/dc/hwss/dce/dce_hwseq.h | 15 +-
.../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 42 ++--
.../gpu/drm/amd/display/dc/inc/hw/pg_cntl.h | 2 -
drivers/gpu/drm/amd/display/dc/inc/resource.h | 12 ++
.../drm/amd/display/dc/link/link_detection.c | 3 +
.../gpu/drm/amd/display/dc/resource/Makefile | 199 ++++++++++++++++++
.../{ => resource}/dce100/dce100_resource.c | 0
.../{ => resource}/dce100/dce100_resource.h | 0
.../{ => resource}/dce110/dce110_resource.c | 0
.../{ => resource}/dce110/dce110_resource.h | 0
.../{ => resource}/dce112/dce112_resource.c | 0
.../{ => resource}/dce112/dce112_resource.h | 0
.../{ => resource}/dce120/dce120_resource.c | 2 +-
.../{ => resource}/dce120/dce120_resource.h | 0
.../display/dc/resource/dce80/CMakeLists.txt | 4 +
.../dc/{ => resource}/dce80/dce80_resource.c | 0
.../dc/{ => resource}/dce80/dce80_resource.h | 0
.../dc/{ => resource}/dcn10/dcn10_resource.c | 25 ++-
.../dc/{ => resource}/dcn10/dcn10_resource.h | 0
.../dc/{ => resource}/dcn20/dcn20_resource.c | 24 +--
.../dc/{ => resource}/dcn20/dcn20_resource.h | 0
.../{ => resource}/dcn201/dcn201_resource.c | 14 +-
.../{ => resource}/dcn201/dcn201_resource.h | 0
.../dc/{ => resource}/dcn21/dcn21_resource.c | 6 +-
.../dc/{ => resource}/dcn21/dcn21_resource.h | 0
.../dc/{ => resource}/dcn30/dcn30_resource.c | 2 +-
.../dc/{ => resource}/dcn30/dcn30_resource.h | 0
.../{ => resource}/dcn301/dcn301_resource.c | 4 +-
.../{ => resource}/dcn301/dcn301_resource.h | 0
.../{ => resource}/dcn302/dcn302_resource.c | 4 +-
.../{ => resource}/dcn302/dcn302_resource.h | 0
.../{ => resource}/dcn303/dcn303_resource.c | 4 +-
.../{ => resource}/dcn303/dcn303_resource.h | 0
.../dc/{ => resource}/dcn31/dcn31_resource.c | 2 +-
.../dc/{ => resource}/dcn31/dcn31_resource.h | 0
.../{ => resource}/dcn314/dcn314_resource.c | 0
.../{ => resource}/dcn314/dcn314_resource.h | 0
.../{ => resource}/dcn315/dcn315_resource.c | 0
.../{ => resource}/dcn315/dcn315_resource.h | 0
.../{ => resource}/dcn316/dcn316_resource.c | 0
.../{ => resource}/dcn316/dcn316_resource.h | 0
.../dc/{ => resource}/dcn32/dcn32_resource.c | 4 +-
.../dc/{ => resource}/dcn32/dcn32_resource.h | 0
.../{ => resource}/dcn321/dcn321_resource.c | 2 +-
.../{ => resource}/dcn321/dcn321_resource.h | 0
.../dc/{ => resource}/dcn35/dcn35_resource.c | 20 +-
.../dc/{ => resource}/dcn35/dcn35_resource.h | 1 +
drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 22 +-
.../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 41 ++++
.../gpu/drm/amd/display/dmub/src/dmub_srv.c | 50 ++++-
.../drm/amd/display/include/hdcp_msg_types.h | 5 +
.../amd/display/modules/freesync/freesync.c | 6 +-
.../include/asic_reg/dcn/dcn_3_5_0_sh_mask.h | 8 +
94 files changed, 655 insertions(+), 308 deletions(-) delete mode 100644 drivers/gpu/drm/amd/display/dc/dce100/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn315/Makefile
delete mode 100644 drivers/gpu/drm/amd/display/dc/dcn316/Makefile
create mode 100644 drivers/gpu/drm/amd/display/dc/resource/Makefile
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce100/dce100_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce110/dce110_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce112/dce112_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce120/dce120_resource.h (100%) create mode 100644 drivers/gpu/drm/amd/display/dc/resource/dce80/CMakeLists.txt
rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dce80/dce80_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn10/dcn10_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn20/dcn20_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn201/dcn201_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn21/dcn21_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn30/dcn30_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn301/dcn301_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn302/dcn302_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn303/dcn303_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn31/dcn31_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn314/dcn314_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn315/dcn315_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.c (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn316/dcn316_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn32/dcn32_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.c (99%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn321/dcn321_resource.h (100%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.c (98%) rename drivers/gpu/drm/amd/display/dc/{ => resource}/dcn35/dcn35_resource.h (99%)--
2.42.0