DC Patches March 18, 2024
Subsystems (5)
cover DC Patches March 18, 2024
This DC patchset brings improvements in multiple areas. In summary, we highlight:
- Clear mpc_tree in init_pipes
- Program pixclk according to dcn revision
- Add stream clock source to DP DTO params
- Enabling urgent latency adjustment for DCN35
- To adjust dprefclk by down spread percentage
- Add debug option for idle reg checks
- Revert few patches which cause regression
- skip forcing odm in minimal transition
- Fix noise issue on HDMI AV mute
- Enable fast update for DCN314
- Enable 2to1 ODM policy for DCN35
- Fix DCN31 underflow problem
- Add the MALL size in the fallback function
- Modify coding style/errors and remove redundant codes
- Add missing registers and offset
- Fix few problems for DCN35
- Fix a bug which dereferences freed memory
- Enable new interface design for alternate scrambling
- Enhance IPS handshake
- Increase Z8 watermark times
- Fix DML2 problem
- Revert patch which cause regression
- Fix problems for dmub idle power optimization
---
Alex Hung (2):
drm/amd/display: Delete duplicated function prototypes drm/amd/display: Correct indentations and spaces
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.208.0
Aric Cyr (2):
drm/amd/display: 3.2.276
drm/amd/display: 3.2.277
Chaitanya Dhere (1):
drm/amd/display: Add TB_BORROWED_MAX definition
Charlene Liu (2):
drm/amd/display: fix debug key not working on dml2 drm/amd/display: change aux_init to apu version
Chris Park (1):
drm/amd/display: Prevent crash on bring-up
Dillon Varone (3):
drm/amd/display: add stream clock source to DP DTO params drm/amd/display: Program pixclk according to dcn revision drm/amd/display: Power on VPG memory unconditionally if off
Gabe Teeger (1):
drm/amd/display: Revert Add left edge pixel + ODM pipe split
Leo Ma (1):
drm/amd/display: Fix noise issue on HDMI AV mute
Martin Leung (1):
drm/amd/display: revert Exit idle optimizations before HDCP execution
Natanel Roizenman (2):
drm/amd/display: Added debug prints for zstate_support and
StutterPeriod
drm/amd/display: Increase Z8 watermark times.
Nicholas Kazlauskas (6):
drm/amd/display: Add debug option for idle reg checks drm/amd/display: Workaround register access in idle race with cursor drm/amd/display: Detect and disallow idle reallow during reentrancy drm/amd/display: Add optional optimization for IPS handshake drm/amd/display: Enable optimized handshake for DCN35 drm/amd/display: Enable reallow for idle on DCN35
Nicholas Susanto (1):
drm/amd/display: Enabling urgent latency adjustment for DCN35
Ovidiu Bunea (1):
drm/amd/display: Revert "Set the power_down_on_boot function pointer
to null"
Rodrigo Siqueira (9):
drm/amd/display: Remove code duplication drm/amd/display: Remove wrong signal from vrr calculation drm/amd/display: Enable 2to1 ODM policy for DCN35 drm/amd/display: Add the MALL size in the fallback function drm/amd/display: Move define to the proper header drm/amd/display: Enable fast update for DCN314 drm/amd/display: Remove legacy code drm/amd/display: Comments adjustments drm/amd/display: Add missing registers and offset
Samson Tam (1):
drm/amd/display: clear mpc_tree in init_pipes
Sherry Wang (1):
drm/amd/display: correct hostvm flag
Sung Joon Kim (1):
drm/amd/display: Enable new interface design for alternate scrambling
Wenjing Liu (3):
drm/amd/display: skip forcing odm in minimal transition drm/amd/display: Revert Remove pixle rate limit for subvp drm/amd/display: fix a bug to dereference already freed old current
state memory
Xi Liu (2):
drm/amd/display: increase bb clock for DCN351 drm/amd/display: Remove unnecessary hard coded DPM states
Zhongwei (1):
drm/amd/display: To adjust dprefclk by down spread percentage
.../gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 ++- .../display/dc/clk_mgr/dcn314/dcn314_smu.h | 42 +++---- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 3 +- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 50 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 118 +++++++++++------- .../gpu/drm/amd/display/dc/core/dc_resource.c | 40 +----- drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 5 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 +++++-- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + .../display/dc/dcn31/dcn31_dio_link_encoder.c | 2 +- .../display/dc/dcn31/dcn31_dio_link_encoder.h | 2 + .../gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c | 7 +- .../display/dc/dcn35/dcn35_dio_link_encoder.c | 2 +- .../drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 1 + .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 12 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 94 +++++++++++--- .../amd/display/dc/dml2/display_mode_core.c | 2 + .../display/dc/dml2/dml2_translation_helper.c | 17 ++- .../gpu/drm/amd/display/dc/dml2/dml2_utils.c | 6 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 16 +++ .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 10 -- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 12 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 16 +++ .../amd/display/dc/hwss/dcn35/dcn35_init.c | 2 +- .../gpu/drm/amd/display/dc/inc/core_types.h | 2 - drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 - .../gpu/drm/amd/display/dc/link/link_dpms.c | 3 + .../dc/link/protocols/link_dp_training.c | 16 +-- .../link/protocols/link_edp_panel_control.c | 64 ++++++++++ .../link/protocols/link_edp_panel_control.h | 2 + .../dc/resource/dcn20/dcn20_resource.c | 7 +- .../dc/resource/dcn31/dcn31_resource.c | 5 +- .../dc/resource/dcn314/dcn314_resource.c | 21 +--- .../dc/resource/dcn316/dcn316_resource.c | 1 - .../dc/resource/dcn32/dcn32_resource.c | 3 +- .../dc/resource/dcn321/dcn321_resource.c | 4 +- .../dc/resource/dcn35/dcn35_resource.c | 5 +- .../dc/resource/dcn351/dcn351_resource.c | 3 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 73 ++++++++++- .../amd/display/modules/freesync/freesync.c | 2 +- .../gpu/drm/amd/display/modules/hdcp/hdcp.c | 10 -- .../drm/amd/display/modules/inc/mod_hdcp.h | 8 -- .../display/modules/info_packet/info_packet.c | 2 - .../include/asic_reg/dcn/dcn_3_2_1_offset.h | 37 +++++- .../include/asic_reg/dcn/dcn_3_2_1_sh_mask.h | 16 +++ 50 files changed, 581 insertions(+), 234 deletions(-)
Signature · 1 line
2.37.3
PATCH 1/43 drm/amd/display: Remove code duplication
From: Rodrigo Siqueira <[email protected]>
[Why & How]
Remove redundant code
--- drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/modules/info_packet/info_packet.c +0 -2
@@ -539,8 +539,6 @@ void mod_build_adaptive_sync_infopacket(const struct dc_stream_state *stream,mod_build_adaptive_sync_infopacket_v2 (stream, param, info_packet);break ;case FREESYNC_TYPE_PCON_IN_WHITELIST : -mod_build_adaptive_sync_infopacket_v1 (info_packet); -break ;case ADAPTIVE_SYNC_TYPE_EDP :mod_build_adaptive_sync_infopacket_v1 (info_packet);break ;
Signature · 1 line
2.37.3
PATCH 2/43 drm/amd/display: Remove wrong signal from vrr calculation
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
In some of the merge conflict fixes, one '+' was accidentally left at the beginning of the line. Fortunately, this did not cause any major issues since it acted as a number signal. This commit addresses this issue by removing the extra '+'.
--- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +1 -1
@@ -1057,7 +1057,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, in_out_vrr->fixed_refresh_in_uhz =0 ; refresh_range =div_u64 (in_out_vrr->max_refresh_in_uhz +500000 ,1000000 ) - -+div_u64 (in_out_vrr->min_refresh_in_uhz +500000 ,1000000 ); +div_u64 (in_out_vrr->min_refresh_in_uhz +500000 ,1000000 ); in_out_vrr->supported = true; }
Signature · 1 line
2.37.3
PATCH 3/43 drm/amd/display: Enable 2to1 ODM policy for DCN35
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
Enable 2to1 ODM policy for DCN35
--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
@@ -769,7 +769,7 @@ static const struct dc_debug_options debug_defaults_drv = { .support_eDP1_5 = true, .enable_hpo_pg_support = false, .enable_legacy_fast_update = true, - .enable_single_display_2to1_odm_policy = false, + .enable_single_display_2to1_odm_policy = true, .disable_idle_power_optimizations = false, .dmcub_emulation = false, .disable_boot_optimizations = false,
Signature · 1 line
2.37.3
Re: [PATCH 03/43] drm/amd/display: Enable 2to1 ODM policy for DCN35
Just another general comment on how to upstream patches.
When publishing a large set of patches it is usually good convention to sort them:
1. Bug fixes which might even get backported
2. Comment and other non function cleanups
3. Functional cleanups
4. New features
One good reason for that is that it usually makes fixes much easier to port to older kernel versions, but it also makes things easier to review.
If you are in doubt if a patch set is still fully compiling after re-ordering things you can use the command
git rebase -x make base_branch
On your branch and git will run a make between after applying each patch. This way you can double check that everything still builds fine.
Working like that is not a must have, but really good practice.
Regards,
Christian.
Am 12.03.24 um 10:19 schrieb Wayne Lin:
Quoted 24 lines
From: Rodrigo Siqueira <[email protected]>
[Why & How]
Enable 2to1 ODM policy for DCN35Acked-by Wayne Lin <[email protected]>Signed-off-by Rodrigo Siqueira <[email protected]>--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1
-1@@ -769,7 +769,7 @@ static const struct dc_debug_options debug_defaults_drv = { .support_eDP1_5 = true, .enable_hpo_pg_support = false, .enable_legacy_fast_update = true, - .enable_single_display_2to1_odm_policy = false, + .enable_single_display_2to1_odm_policy = true, .disable_idle_power_optimizations = false, .dmcub_emulation = false, .disable_boot_optimizations = false,
RE: [PATCH 03/43] drm/amd/display: Enable 2to1 ODM policy for DCN35
[Public]
Appreciate for the feedback!
Regards,
Wayne
Quoted 64 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, March 12, 2024 6:21 PM
To: Lin, Wayne <[email protected]>; [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]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; Zuo, Jerry <[email protected]>
Subject: Re: [PATCH 03/43] drm/amd/display: Enable 2to1 ODM policy for DCN35Just another general comment on how to upstream patches.
When publishing a large set of patches it is usually good convention to sort them:
1. Bug fixes which might even get backported 2. Comment and other non function cleanups 3. Functional cleanups 4. New featuresOne good reason for that is that it usually makes fixes much easier to port to older kernel versions, but it also makes things easier to review.
If you are in doubt if a patch set is still fully compiling after re-ordering things you can use the command
git rebase -x make
base_branchOn your branch and git will run a make between after applying each patch. This way you can double check that everything still builds fine.
Working like that is not a must have, but really good practice.
Regards,
Christian.Am 12.03.24 um 10:19 schrieb Wayne Lin:
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c static const struct dc_debug_options
Quoted 18 lines
From: Rodrigo Siqueira <[email protected]>
[Why & How]
Enable 2to1 ODM policy for DCN35Acked-by Wayne Lin <[email protected]>Signed-off-by Rodrigo Siqueira <[email protected]>--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git
a/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.cb/drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.cindex5d52853cac96..a8f4023ff3b1100644drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +0
-0@@ -769,7 +769,7 @@ static const struct dc_debug_options
debug_defaults_drv= {Quoted 8 lines
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1
-1.support_eDP1_5 = true, .enable_hpo_pg_support = false, .enable_legacy_fast_update = true, - .enable_single_display_2to1_odm_policy = false, + .enable_single_display_2to1_odm_policy = true, .disable_idle_power_optimizations = false, .dmcub_emulation = false, .disable_boot_optimizations = false,
PATCH 4/43 drm/amd/display: Delete duplicated function prototypes
In reply to Wayne LinFrom: Alex Hung <[email protected]>
[Why & How]dcn32_smu_transfer_wm_table_dram_2_smu is defined twice so one is removed. Also adjust prototype orders.
--- .../drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h +1 -2
@@ -37,10 +37,9 @@#define DALSMC_Result_OK 0x1void dcn32_smu_send_fclk_pstate_message (struct clk_mgr_internal *clk_mgr,bool enable); -void dcn32_smu_transfer_wm_table_dram_2_smu (struct clk_mgr_internal *clk_mgr); -void dcn32_smu_set_pme_workaround (struct clk_mgr_internal *clk_mgr);void dcn32_smu_send_cab_for_uclk_message (struct clk_mgr_internal *clk_mgr,unsigned int num_ways);void dcn32_smu_transfer_wm_table_dram_2_smu (struct clk_mgr_internal *clk_mgr); +void dcn32_smu_set_pme_workaround (struct clk_mgr_internal *clk_mgr);unsigned int dcn32_smu_set_hard_min_by_freq (struct clk_mgr_internal *clk_mgr,uint32_t clk,uint16_t freq_mhz);void dcn32_smu_wait_for_dmub_ack_mclk (struct clk_mgr_internal *clk_mgr,bool enable);
Signature · 1 line
2.37.3
PATCH 5/43 drm/amd/display: Correct indentations and spaces
In reply to Wayne LinFrom: Alex Hung <[email protected]>
[Why & How]
This fixes indentations and adjust spaces for better readability and code styles.
--- .../gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 ++++--- .../display/dc/clk_mgr/dcn314/dcn314_smu.h | 42 +++++++++---------- .../gpu/drm/amd/display/dc/core/dc_resource.c | 3 +- drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 2 +- 5 files changed, 32 insertions(+), 31 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +1 -0
@@ -1731,6 +1731,7 @@ static uint32_t get_ss_entry_number_from_internal_ss_info_tbl_v2_1(return 0 ; } +/** * get_ss_entry_number_from_internal_ss_info_tbl_V3_1 * Get Number of SpreadSpectrum Entry from the ASIC_InternalSS_Info table of
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +7 -8
@@ -329,15 +329,14 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p }break ;case AMDGPU_FAMILY_GC_11_0_0 : { -struct clk_mgr_internal *clk_mgr =kzalloc (sizeof (*clk_mgr),GFP_KERNEL ); - -if (clk_mgr ==NULL ) { -BREAK_TO_DEBUGGER (); -return NULL ; - } +struct clk_mgr_internal *clk_mgr =kzalloc (sizeof (*clk_mgr),GFP_KERNEL ); -dcn32_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); -return &clk_mgr->base; +if (clk_mgr ==NULL ) { +BREAK_TO_DEBUGGER (); +return NULL ; + } +dcn32_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); +return &clk_mgr->base; }case AMDGPU_FAMILY_GC_11_0_1 : {
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.h +21 -21
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -1
@@ -340,7 +340,7 @@ struct resource_pool *dc_create_resource_pool(struct dc *dc,return res_pool; } -void dc_destroy_resource_pool (struct dc *dc) +void dc_destroy_resource_pool (struct dc *dc) {if (dc) {if (dc->res_pool)
@@ -1522,6 +1522,7 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)struct dc_crtc_timing *timing = &pipe_ctx->stream->timing;const struct rect odm_slice_rec =calculate_odm_slice_in_timing_active (pipe_ctx);bool res = false; +DC_LOGGER_INIT (pipe_ctx->stream->ctx->logger);/* Invalid input */
drivers/gpu/drm/amd/display/dc/core/dc_stat.c +1 -1
@@ -61,7 +61,7 @@ void dc_stat_get_dmub_notification(const struct dc *dc, struct dmub_notification/* For HPD/HPD RX, convert dpia port index into link index */ if (notify->type ==DMUB_NOTIFICATION_HPD || notify->type ==DMUB_NOTIFICATION_HPD_IRQ || - notify->type ==DMUB_NOTIFICATION_DPIA_NOTIFICATION || + notify->type ==DMUB_NOTIFICATION_DPIA_NOTIFICATION || notify->type ==DMUB_NOTIFICATION_SET_CONFIG_REPLY ) { notify->link_index =get_link_index_from_dpia_port_index (dc, notify->link_index);
Signature · 1 line
2.37.3
PATCH 6/43 drm/amd/display: Add the MALL size in the fallback function
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
If the driver has issues retrieving the MALL size for the specific hardware, it might fail since the current value is set to zero. This commit addresses this issue by adding a simple constant value to give the drive a chance to start.
--- .../gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c | 3 ++- .../gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +2 -1
@@ -2048,7 +2048,8 @@ static bool dcn32_resource_construct( dc->caps.min_horizontal_blanking_period =80 ; dc->caps.dmdata_alloc_size =2048 ; dc->caps.mall_size_per_mem_channel =4 ; - dc->caps.mall_size_total =0 ; +/* total size = mall per channel * num channels * 1024 * 1024 */ + dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans *1048576 ; dc->caps.cursor_cache_size = dc->caps.max_cursor_size * dc->caps.max_cursor_size *8 ; dc->caps.cache_line_size =64 ;
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +3 -1
@@ -1697,7 +1697,9 @@ static bool dcn321_resource_construct( dc->caps.min_horizontal_blanking_period =80 ; dc->caps.dmdata_alloc_size =2048 ; dc->caps.mall_size_per_mem_channel =4 ; - dc->caps.mall_size_total =0 ; +/* total size = mall per channel * num channels * 1024 * 1024 */ + dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans *1048576 ; + dc->caps.cursor_cache_size = dc->caps.max_cursor_size * dc->caps.max_cursor_size *8 ; dc->caps.cache_line_size =64 ; dc->caps.cache_num_ways =16 ;
Signature · 1 line
2.37.3
PATCH 7/43 drm/amd/display: Move define to the proper header
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]DCN3_16_MIN_COMPBUF_SIZE_KB is defined in the dcn316_resource.c file. This header fit better in the dcn31_fpu.h together with similar defines.
--- drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 1 + drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.h +1 -0
@@ -30,6 +30,7 @@#define DCN3_15_DEFAULT_DET_SIZE 192#define DCN3_15_MIN_COMPBUF_SIZE_KB 128#define DCN3_16_DEFAULT_DET_SIZE 192 +#define DCN3_16_MIN_COMPBUF_SIZE_KB 128void dcn31_zero_pipe_dcc_fraction (display_e2e_pipe_params_st *pipes,int pipe_cnt);
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +0 -1
@@ -125,7 +125,6 @@#include "link_enc_cfg.h" #define DCN3_16_MAX_DET_SIZE 384 -#define DCN3_16_MIN_COMPBUF_SIZE_KB 128#define DCN3_16_CRB_SEGMENT_SIZE_KB 64enum dcn31_clk_src_array_id {
Signature · 1 line
2.37.3
PATCH 8/43 drm/amd/display: Enable fast update for DCN314
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
Enable legacy fast update for DCN314
--- drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -0
@@ -925,6 +925,7 @@ static const struct dc_debug_options debug_defaults_drv = { }, .seamless_boot_odm_combine = true, + .enable_legacy_fast_update = true, .using_dml2 = false, };
Signature · 1 line
2.37.3
PATCH 9/43 drm/amd/display: Remove legacy code
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
Remove legacy code which is unnecessary.
--- .../dc/resource/dcn314/dcn314_resource.c | 20 ------------------- 1 file changed, 20 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +0 -20
@@ -929,24 +929,6 @@ static const struct dc_debug_options debug_defaults_drv = { .using_dml2 = false, }; -static const struct dc_debug_options debug_defaults_diags = { - .disable_dmcu = true, - .force_abm_enable = false, - .timing_trace = true, - .clock_trace = true, - .disable_dpp_power_gate = true, - .disable_hubp_power_gate = true, - .disable_clock_gate = true, - .disable_pplib_clock_request = true, - .disable_pplib_wm_range = true, - .disable_stutter = false, - .scl_reset_length10 = true, - .dwb_fi_phase =-1 ,// -1 = disable - .dmub_command_table = true, - .enable_tri_buf = true, - .use_max_lb = true -}; -static const struct dc_panel_config panel_config_defaults = { .psr = { .disable_psr = false,
@@ -1939,8 +1921,6 @@ static bool dcn314_resource_construct(if (dc->ctx->dce_environment ==DCE_ENV_PRODUCTION_DRV ) dc->debug = debug_defaults_drv; -else - dc->debug = debug_defaults_diags;/* Disable pipe power gating */ dc->debug.disable_dpp_power_gate = true;
Signature · 1 line
2.37.3
PATCH 10/43 drm/amd/display: correct hostvm flag
In reply to Wayne LinFrom: Sherry Wang <[email protected]>
[Why]
Hostvm should be enabled/disabled accordding to the status of riommu_active, but hostvm always be disabled on DCN31 which causes underflow
[How]
Set correct hostvm flag on DCN31
--- drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +1 -1
@@ -892,7 +892,7 @@ static const struct dc_debug_options debug_defaults_drv = { .disable_z10 = true, .enable_legacy_fast_update = true, .enable_z9_disable_interface = true, /* Allow support for the PMFW interface for disable Z9*/ - .dml_hostvm_override = DML_HOSTVM_OVERRIDE_FALSE, + .dml_hostvm_override = DML_HOSTVM_NO_OVERRIDE, .using_dml2 = false, };
Signature · 1 line
2.37.3
PATCH 11/43 drm/amd/display: Comments adjustments
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
This commit just drop some old comments and update a typo in another one.
--- drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +1 -2
@@ -75,7 +75,6 @@#include "dcn30/dcn30_dwb.h" #include "dcn30/dcn30_mmhubbub.h" -// TODO: change include headers /amd/include/asic_reg after upstream #include "yellow_carp_offset.h" #include "dcn/dcn_3_1_2_offset.h" #include "dcn/dcn_3_1_2_sh_mask.h"
@@ -1771,7 +1770,7 @@ bool dcn31_validate_bandwidth(struct dc *dc, out =dcn30_internal_validate_bw (dc, context, pipes, &pipe_cnt, &vlevel, fast_validate, true);DC_FP_END (); -// Disable fast_validate to set min dcfclk in alculate_wm_and_dlg +// Disable fast_validate to set min dcfclk in calculate_wm_and_dlg if (pipe_cnt ==0 ) fast_validate = false;
Signature · 1 line
2.37.3
PATCH 12/43 drm/amd/display: Add missing registers and offset
In reply to Wayne LinFrom: Rodrigo Siqueira <[email protected]>
[Why & How]
Registers and offset are missing. Add it back
--- .../include/asic_reg/dcn/dcn_3_2_1_offset.h | 37 ++++++++++++++++++- .../include/asic_reg/dcn/dcn_3_2_1_sh_mask.h | 16 ++++++++ 2 files changed, 52 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_offset.h +36 -1
@@ -1719,6 +1719,10 @@#define regDCHUBBUB_TIMEOUT_INTERRUPT_STATUS_BASE_IDX 2#define regFMON_CTRL 0x0541#define regFMON_CTRL_BASE_IDX 2 +#define regDCHUBBUB_TEST_DEBUG_INDEX 0x0542 +#define regDCHUBBUB_TEST_DEBUG_INDEX_BASE_IDX 2 +#define regDCHUBBUB_TEST_DEBUG_DATA 0x0543 +#define regDCHUBBUB_TEST_DEBUG_DATA_BASE_IDX 2// addressBlock: dce_dc_dchubbubl_hubbub_sdpif_dispdec
@@ -3573,6 +3577,10 @@#define regCM0_CM_DEALPHA_BASE_IDX 2#define regCM0_CM_COEF_FORMAT 0x0d8c#define regCM0_CM_COEF_FORMAT_BASE_IDX 2 +#define regCM0_CM_TEST_DEBUG_INDEX 0x0d8d +#define regCM0_CM_TEST_DEBUG_INDEX_BASE_IDX 2 +#define regCM0_CM_TEST_DEBUG_DATA 0x0d8e +#define regCM0_CM_TEST_DEBUG_DATA_BASE_IDX 2// addressBlock: dce_dc_dpp0_dispdec_dpp_top_dispdec
@@ -3959,6 +3967,10 @@#define regCM1_CM_DEALPHA_BASE_IDX 2#define regCM1_CM_COEF_FORMAT 0x0ef7#define regCM1_CM_COEF_FORMAT_BASE_IDX 2 +#define regCM1_CM_TEST_DEBUG_INDEX 0x0ef8 +#define regCM1_CM_TEST_DEBUG_INDEX_BASE_IDX 2 +#define regCM1_CM_TEST_DEBUG_DATA 0x0ef9 +#define regCM1_CM_TEST_DEBUG_DATA_BASE_IDX 2// addressBlock: dce_dc_dpp1_dispdec_dpp_top_dispdec
@@ -4345,6 +4357,10 @@#define regCM2_CM_DEALPHA_BASE_IDX 2#define regCM2_CM_COEF_FORMAT 0x1062#define regCM2_CM_COEF_FORMAT_BASE_IDX 2 +#define regCM2_CM_TEST_DEBUG_INDEX 0x1063 +#define regCM2_CM_TEST_DEBUG_INDEX_BASE_IDX 2 +#define regCM2_CM_TEST_DEBUG_DATA 0x1064 +#define regCM2_CM_TEST_DEBUG_DATA_BASE_IDX 2// addressBlock: dce_dc_dpp2_dispdec_dpp_top_dispdec
@@ -4731,6 +4747,10 @@#define regCM3_CM_DEALPHA_BASE_IDX 2#define regCM3_CM_COEF_FORMAT 0x11cd#define regCM3_CM_COEF_FORMAT_BASE_IDX 2 +#define regCM3_CM_TEST_DEBUG_INDEX 0x11ce +#define regCM3_CM_TEST_DEBUG_INDEX_BASE_IDX 2 +#define regCM3_CM_TEST_DEBUG_DATA 0x11cf +#define regCM3_CM_TEST_DEBUG_DATA_BASE_IDX 2// addressBlock: dce_dc_dpp3_dispdec_dpp_top_dispdec
@@ -11789,6 +11809,10 @@#define regDSCC0_DSCC_RATE_CONTROL_BUFFER2_MAX_FULLNESS_LEVEL_BASE_IDX 2#define regDSCC0_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL 0x3035#define regDSCC0_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL_BASE_IDX 2 +#define regDSCC0_DSCC_TEST_DEBUG_BUS_ROTATE 0x303a +#define regDSCC0_DSCC_TEST_DEBUG_BUS_ROTATE_BASE_IDX 2 +#define regDSCC0_DSCC_TEST_DEBUG_DATA0 0x303b +#define regDSCC0_DSCC_TEST_DEBUG_DATA0_BASE_IDX 2// addressBlock: dce_dc_dsc0_dispdec_dsccif_dispdec
@@ -11897,6 +11921,10 @@#define regDSCC1_DSCC_RATE_CONTROL_BUFFER2_MAX_FULLNESS_LEVEL_BASE_IDX 2#define regDSCC1_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL 0x3091#define regDSCC1_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL_BASE_IDX 2 +#define regDSCC1_DSCC_TEST_DEBUG_BUS_ROTATE 0x3096 +#define regDSCC1_DSCC_TEST_DEBUG_BUS_ROTATE_BASE_IDX 2 +#define regDSCC1_DSCC_TEST_DEBUG_DATA0 0x3097 +#define regDSCC1_DSCC_TEST_DEBUG_DATA0_BASE_IDX 2// addressBlock: dce_dc_dsc1_dispdec_dsccif_dispdec
@@ -12005,7 +12033,10 @@#define regDSCC2_DSCC_RATE_CONTROL_BUFFER2_MAX_FULLNESS_LEVEL_BASE_IDX 2#define regDSCC2_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL 0x30ed#define regDSCC2_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL_BASE_IDX 2 - +#define regDSCC2_DSCC_TEST_DEBUG_BUS_ROTATE 0x30f2 +#define regDSCC2_DSCC_TEST_DEBUG_BUS_ROTATE_BASE_IDX 2 +#define regDSCC2_DSCC_TEST_DEBUG_DATA0 0x30f3 +#define regDSCC2_DSCC_TEST_DEBUG_DATA0_BASE_IDX 2// addressBlock: dce_dc_dsc2_dispdec_dsccif_dispdec // base address: 0x2e0
@@ -12113,6 +12144,10 @@#define regDSCC3_DSCC_RATE_CONTROL_BUFFER2_MAX_FULLNESS_LEVEL_BASE_IDX 2#define regDSCC3_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL 0x3149#define regDSCC3_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL_BASE_IDX 2 +#define regDSCC3_DSCC_TEST_DEBUG_BUS_ROTATE 0x314e +#define regDSCC3_DSCC_TEST_DEBUG_BUS_ROTATE_BASE_IDX 2 +#define regDSCC3_DSCC_TEST_DEBUG_DATA0 0x314f +#define regDSCC3_DSCC_TEST_DEBUG_DATA0_BASE_IDX 2// addressBlock: dce_dc_dsc3_dispdec_dsccif_dispdec
drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_2_1_sh_mask.h +16 -0
@@ -11547,6 +11547,11 @@#define CM0_CM_COEF_FORMAT__CM_BIAS_FORMAT_MASK 0x00000001L#define CM0_CM_COEF_FORMAT__CM_POST_CSC_COEF_FORMAT_MASK 0x00000010L#define CM0_CM_COEF_FORMAT__CM_GAMUT_REMAP_COEF_FORMAT_MASK 0x00000100L +//CM0_CM_TEST_DEBUG_INDEX +#define CM0_CM_TEST_DEBUG_INDEX__CM_TEST_DEBUG_INDEX__SHIFT 0x0 +#define CM0_CM_TEST_DEBUG_INDEX__CM_TEST_DEBUG_WRITE_EN__SHIFT 0x8 +#define CM0_CM_TEST_DEBUG_INDEX__CM_TEST_DEBUG_INDEX_MASK 0x000000FFL +#define CM0_CM_TEST_DEBUG_INDEX__CM_TEST_DEBUG_WRITE_EN_MASK 0x00000100L// addressBlock: dce_dc_dpp0_dispdec_dpp_top_dispdec
@@ -42315,6 +42320,15 @@//DSCC0_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL #define DSCC0_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL__DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL__SHIFT 0x0#define DSCC0_DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL__DSCC_RATE_CONTROL_BUFFER3_MAX_FULLNESS_LEVEL_MASK 0x0003FFFFL +//DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS0_ROTATE__SHIFT 0x0 +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS1_ROTATE__SHIFT 0x8 +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS2_ROTATE__SHIFT 0x10 +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS3_ROTATE__SHIFT 0x18 +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS0_ROTATE_MASK 0x0000001FL +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS1_ROTATE_MASK 0x00001F00L +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS2_ROTATE_MASK 0x001F0000L +#define DSCC0_DSCC_TEST_DEBUG_BUS_ROTATE__DSCC_TEST_DEBUG_BUS3_ROTATE_MASK 0x1F000000L// addressBlock: dce_dc_dsc0_dispdec_dsccif_dispdec
@@ -42348,7 +42362,9 @@#define DSC_TOP0_DSC_TOP_CONTROL__DSC_DSCCLK_R_GATE_DIS_MASK 0x00000100L//DSC_TOP0_DSC_DEBUG_CONTROL #define DSC_TOP0_DSC_DEBUG_CONTROL__DSC_DBG_EN__SHIFT 0x0 +#define DSC_TOP0_DSC_DEBUG_CONTROL__DSC_TEST_CLOCK_MUX_SEL__SHIFT 0x4#define DSC_TOP0_DSC_DEBUG_CONTROL__DSC_DBG_EN_MASK 0x00000001L +#define DSC_TOP0_DSC_DEBUG_CONTROL__DSC_TEST_CLOCK_MUX_SEL_MASK 0x00000070L// addressBlock: dce_dc_dsc1_dispdec_dscc_dispdec
Signature · 1 line
2.37.3
PATCH 13/43 drm/amd/display: Fix noise issue on HDMI AV mute
In reply to Wayne LinFrom: Leo Ma <[email protected]>
[Why]
When mode switching is triggered there is momentary noise visible on some HDMI TV or displays.
[How]
Wait for 2 frames to make sure we have enough time to send out AV mute and sink receives a full frame.
--- .../gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +11 -1
@@ -812,10 +812,20 @@ void dcn30_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)if (pipe_ctx ==NULL )return ; -if (dc_is_hdmi_signal (pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc !=NULL ) +if (dc_is_hdmi_signal (pipe_ctx->stream->signal) && pipe_ctx->stream_res.stream_enc !=NULL ) { pipe_ctx->stream_res.stream_enc->funcs->set_avmute ( pipe_ctx->stream_res.stream_enc, enable); + +/* Wait for two frame to make sure AV mute is sent out */ +if (enable) { + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VBLANK ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VBLANK ); + pipe_ctx->stream_res.tg->funcs->wait_for_state (pipe_ctx->stream_res.tg,CRTC_STATE_VACTIVE ); + } + } }void dcn30_update_info_frame (struct pipe_ctx *pipe_ctx)
Signature · 1 line
2.37.3
PATCH 14/43 drm/amd/display: skip forcing odm in minimal transition
In reply to Wayne LinFrom: Wenjing Liu <[email protected]>
[why]
In minial transitions state, ODM combine shouldn't be forced as it will make transition non seamless. The force ODM debug option is to control the end result not the intermediate transition. So we can temporarily disable ODM forcing when committing minimal transition state.
[how]
Backup stream ODM forcing option and clear it in minimal transition state. Once minimal transition state is released, we will restore the original debug option back.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 97 ++++++++++++++++-------- 1 file changed, 65 insertions(+), 32 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +65 -32
@@ -4162,55 +4162,88 @@ struct pipe_split_policy_backup {bool dynamic_odm_policy;bool subvp_policy;enum pipe_split_policy mpc_policy; +char force_odm[MAX_PIPES ]; }; -static void release_minimal_transition_state (struct dc *dc, -struct dc_state *context,struct pipe_split_policy_backup *policy) +static void backup_and_set_minimal_pipe_split_policy (struct dc *dc, +struct dc_state *context, +struct pipe_split_policy_backup *policy) { -dc_state_release (context); -/* restore previous pipe split and odm policy */ +int i; + +if (!dc->config.is_vmin_only_asic) { + policy->mpc_policy = dc->debug.pipe_split_policy; + dc->debug.pipe_split_policy =MPC_SPLIT_AVOID ; + } + policy->dynamic_odm_policy = dc->debug.enable_single_display_2to1_odm_policy; + dc->debug.enable_single_display_2to1_odm_policy = false; + policy->subvp_policy = dc->debug.force_disable_subvp; + dc->debug.force_disable_subvp = true; +for (i =0 ; i < context->stream_count; i++) { + policy->force_odm[i] = context->streams[i]->debug.force_odm_combine_segments; + context->streams[i]->debug.force_odm_combine_segments =0 ; + } +} + +static void restore_minimal_pipe_split_policy (struct dc *dc, +struct dc_state *context, +struct pipe_split_policy_backup *policy) +{ +uint8_t i; +if (!dc->config.is_vmin_only_asic) dc->debug.pipe_split_policy = policy->mpc_policy; - dc->debug.enable_single_display_2to1_odm_policy = policy->dynamic_odm_policy; + dc->debug.enable_single_display_2to1_odm_policy = + policy->dynamic_odm_policy; dc->debug.force_disable_subvp = policy->subvp_policy; +for (i =0 ; i < context->stream_count; i++) + context->streams[i]->debug.force_odm_combine_segments = policy->force_odm[i]; +} + +static void release_minimal_transition_state (struct dc *dc, +struct dc_state *minimal_transition_context, +struct dc_state *base_context, +struct pipe_split_policy_backup *policy) +{ +restore_minimal_pipe_split_policy (dc, base_context, policy); +dc_state_release (minimal_transition_context); +/* restore previous pipe split and odm policy */ +} + +static void force_vsync_flip_in_minimal_transition_context (struct dc_state *context) +{ +uint8_t i; +int j; +struct dc_stream_status *stream_status; + +for (i =0 ; i < context->stream_count; i++) { + stream_status = &context->stream_status[i]; + +for (j =0 ; j < stream_status->plane_count; j++) + stream_status->plane_states[j]->flip_immediate = false; + } }static struct dc_state *create_minimal_transition_state (struct dc *dc,struct dc_state *base_context,struct pipe_split_policy_backup *policy) {struct dc_state *minimal_transition_context =NULL ; -unsigned int i, j; minimal_transition_context =dc_state_create_copy (base_context);if (!minimal_transition_context)return NULL ; -if (!dc->config.is_vmin_only_asic) { - policy->mpc_policy = dc->debug.pipe_split_policy; - dc->debug.pipe_split_policy =MPC_SPLIT_AVOID ; - } - policy->dynamic_odm_policy = dc->debug.enable_single_display_2to1_odm_policy; - dc->debug.enable_single_display_2to1_odm_policy = false; - policy->subvp_policy = dc->debug.force_disable_subvp; - dc->debug.force_disable_subvp = true; - +backup_and_set_minimal_pipe_split_policy (dc, base_context, policy);/* commit minimal state */ if (dc->res_pool->funcs->validate_bandwidth (dc, minimal_transition_context, false)) { -for (i =0 ; i < minimal_transition_context->stream_count; i++) { -struct dc_stream_status *stream_status = &minimal_transition_context->stream_status[i]; - -for (j =0 ; j < stream_status->plane_count; j++) { -struct dc_plane_state *plane_state = stream_status->plane_states[j]; - -/* force vsync flip when reconfiguring pipes to prevent underflow -* and corruption -*/ - plane_state->flip_immediate = false; - } - } +/* prevent underflow and corruption when reconfiguring pipes */ +force_vsync_flip_in_minimal_transition_context (minimal_transition_context); }else { -/* this should never happen */ -release_minimal_transition_state (dc, minimal_transition_context, policy); +/* +* This should never happen, minimal transition state should +* always be validated first before adding pipe split features. +*/ +release_minimal_transition_state (dc, minimal_transition_context, base_context, policy);BREAK_TO_DEBUGGER (); minimal_transition_context =NULL ; }
@@ -4298,7 +4331,7 @@ static bool commit_minimal_transition_based_on_new_context(struct dc *dc, success = true; }release_minimal_transition_state ( - dc, intermediate_context, &policy); + dc, intermediate_context, new_context, &policy); }return success; }
@@ -4344,7 +4377,7 @@ static bool commit_minimal_transition_based_on_current_context(struct dc *dc, success = true; }release_minimal_transition_state (dc, intermediate_context, - &policy); + dc->current_state, &policy); }/* * Restore stream and plane states back to the values associated with
@@ -4471,7 +4504,7 @@ static bool commit_minimal_transition_state(struct dc *dc, transition_base_context, &policy);if (transition_context) { ret =dc_commit_state_no_check (dc, transition_context); -release_minimal_transition_state (dc, transition_context, &policy); +release_minimal_transition_state (dc, transition_context, transition_base_context, &policy); }if (ret !=DC_OK ) {
Signature · 1 line
2.37.3
PATCH 15/43 drm/amd/display: revert Exit idle optimizations before HDCP execution
In reply to Wayne LinFrom: Martin Leung <[email protected]>
why and how:
causes black screen on PNP on DCN 3.5
This reverts commit 520b0596f978 ("drm/amd/display: Exit idle optimizations before HDCP execution")
--- drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c | 10 ---------- drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h | 8 -------- 2 files changed, 18 deletions(-)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c +0 -10
@@ -88,14 +88,6 @@ static uint8_t is_cp_desired_hdcp2(struct mod_hdcp *hdcp) !hdcp->connection.is_hdcp2_revoked; } -static void exit_idle_optimizations (struct mod_hdcp *hdcp) -{ -struct mod_hdcp_dm *dm = &hdcp->config.dm; - -if (dm->funcs.exit_idle_optimizations) - dm->funcs.exit_idle_optimizations (dm->handle); -} -static enum mod_hdcp_status execution (struct mod_hdcp *hdcp,struct mod_hdcp_event_context *event_ctx,union mod_hdcp_transition_input *input)
@@ -551,8 +543,6 @@ enum mod_hdcp_status mod_hdcp_process_event(struct mod_hdcp *hdcp,memset (&event_ctx,0 ,sizeof (struct mod_hdcp_event_context )); event_ctx.event = event; -exit_idle_optimizations (hdcp); -/* execute and transition */ exec_status =execution (hdcp, &event_ctx, &hdcp->auth.trans_input); trans_status = transition(
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h +0 -8
@@ -156,13 +156,6 @@ struct mod_hdcp_ddc { } funcs; }; -struct mod_hdcp_dm { -void *handle; -struct { -void (*exit_idle_optimizations)(void *handle); - } funcs; -}; -struct mod_hdcp_psp {void *handle;void *funcs;
@@ -279,7 +272,6 @@ struct mod_hdcp_display_query {struct mod_hdcp_config {struct mod_hdcp_psp psp;struct mod_hdcp_ddc ddc; -struct mod_hdcp_dm dm;uint8_t index; };
Signature · 1 line
2.37.3
PATCH 16/43 drm/amd/display: Add debug option for idle reg checks
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Leave disabled by default due to sequencing issues around power states where these flags aren't properly reset.
[How]
Allow re-enabling from DC debug option.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -991,6 +991,7 @@ struct dc_debug_options {bool disable_dmub_reallow_idle;bool disable_timeout;bool disable_extblankadj; +bool enable_idle_reg_checks;unsigned int static_screen_wait_frames;bool force_chroma_subsampling_1tap; };
Signature · 1 line
2.37.3
PATCH 17/43 drm/amd/display: Revert Add left edge pixel + ODM pipe split
In reply to Wayne LinFrom: Gabe Teeger <[email protected]>
This reverts commit 97c109f498da ("drm/amd/display: Add left edge pixel for YCbCr422/420 + ODM pipe split")
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 -- .../gpu/drm/amd/display/dc/core/dc_resource.c | 37 ------------------- .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 10 ----- .../gpu/drm/amd/display/dc/inc/core_types.h | 2 - drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 -- 5 files changed, 57 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -4
@@ -3258,10 +3258,6 @@ static bool update_planes_and_stream_state(struct dc *dc,if (otg_master && otg_master->stream->test_pattern.type !=DP_TEST_PATTERN_VIDEO_MODE )resource_build_test_pattern_params (&context->res_ctx, otg_master); - -if (otg_master && (otg_master->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR422 || - otg_master->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR420 )) -resource_build_subsampling_params (&context->res_ctx, otg_master); } }update_seamless_boot_flags (dc, context, surface_count, stream);
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -37
@@ -828,16 +828,6 @@ static struct rect calculate_odm_slice_in_timing_active(struct pipe_ctx *pipe_ct stream->timing.v_border_bottom + stream->timing.v_border_top; -/* Recout for ODM slices after the first slice need one extra left edge pixel -* for 3-tap chroma subsampling. -*/ -if (odm_slice_idx >0 && - (pipe_ctx->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR422 || - pipe_ctx->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR420 )) { - odm_rec.x -=1 ; - odm_rec.width +=1 ; - } -return odm_rec; }
@@ -1454,7 +1444,6 @@ void resource_build_test_pattern_params(struct resource_context *res_ctx,enum controller_dp_test_pattern controller_test_pattern;enum controller_dp_color_space controller_color_space;enum dc_color_depth color_depth = otg_master->stream->timing.display_color_depth; -enum dc_pixel_encoding pixel_encoding = otg_master->stream->timing.pixel_encoding;int h_active = otg_master->stream->timing.h_addressable + otg_master->stream->timing.h_border_left + otg_master->stream->timing.h_border_right;
@@ -1486,36 +1475,10 @@ void resource_build_test_pattern_params(struct resource_context *res_ctx,else params->width = last_odm_slice_width; -/* Extra left edge pixel is required for 3-tap chroma subsampling. */ -if (i !=0 && (pixel_encoding ==PIXEL_ENCODING_YCBCR422 || - pixel_encoding ==PIXEL_ENCODING_YCBCR420 )) { - params->offset -=1 ; - params->width +=1 ; - } - offset += odm_slice_width; } } -void resource_build_subsampling_params (struct resource_context *res_ctx, -struct pipe_ctx *otg_master) -{ -struct pipe_ctx *opp_heads[MAX_PIPES ]; -int odm_cnt =1 ; -int i; - - odm_cnt =resource_get_opp_heads_for_otg_master (otg_master, res_ctx, opp_heads); - -/* For ODM slices after the first slice, extra left edge pixel is required -* for 3-tap chroma subsampling. -*/ -if (otg_master->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR422 || - otg_master->stream->timing.pixel_encoding ==PIXEL_ENCODING_YCBCR420 ) { -for (i =0 ; i < odm_cnt; i++) - opp_heads[i]->stream_res.left_edge_extra_pixel = (i ==0 ) ? false : true; - } -} -bool resource_build_scaling_params (struct pipe_ctx *pipe_ctx) {const struct dc_plane_state *plane_state = pipe_ctx->plane_state;
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +0 -10
@@ -1579,11 +1579,6 @@ static void dcn20_detect_pipe_changes(struct dc_state *old_state,if (old_pipe->stream_res.tg != new_pipe->stream_res.tg) new_pipe->update_flags.bits.tg_changed =1 ; -if (resource_is_pipe_type (new_pipe,OPP_HEAD )) { -if (old_pipe->stream_res.left_edge_extra_pixel != new_pipe->stream_res.left_edge_extra_pixel) - new_pipe->update_flags.bits.opp_changed =1 ; - } -/* * Detect mpcc blending changes, only dpp inst and opp matter here, * mpccs getting removed/inserted update connected ones during their own
@@ -1967,11 +1962,6 @@ static void dcn20_program_pipe( pipe_ctx->stream_res.opp, &pipe_ctx->stream->bit_depth_params, &pipe_ctx->stream->clamping); - -if (resource_is_pipe_type (pipe_ctx,OPP_HEAD )) - pipe_ctx->stream_res.opp->funcs->opp_program_left_edge_extra_pixel ( - pipe_ctx->stream_res.opp, - pipe_ctx->stream_res.left_edge_extra_pixel); }/* Set ABM pipe after other pipe configurations done */
drivers/gpu/drm/amd/display/dc/inc/core_types.h +0 -2
@@ -333,8 +333,6 @@ struct stream_resource {uint8_t gsl_group;struct test_pattern_params test_pattern_params; - -bool left_edge_extra_pixel; };struct plane_resource {
drivers/gpu/drm/amd/display/dc/inc/resource.h +0 -4
@@ -107,10 +107,6 @@ void resource_build_test_pattern_params(struct resource_context *res_ctx, struct pipe_ctx *pipe_ctx); -void resource_build_subsampling_params ( -struct resource_context *res_ctx, -struct pipe_ctx *pipe_ctx); -bool resource_build_scaling_params (struct pipe_ctx *pipe_ctx); enum dc_status resource_build_scaling_params_for_context(
Signature · 1 line
2.37.3
PATCH 18/43 drm/amd/display: To adjust dprefclk by down spread percentage
In reply to Wayne LinFrom: Zhongwei <[email protected]>
[Why]
OLED panels show no display for large vtotal timings.
[How]
Check if spread spectrum is enabled and read from lut for spread spectrum percentage. Adjust dprefclk as required.
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +50 -0
@@ -73,6 +73,12 @@#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_SEL_MASK 0x00000007L#define CLK1_CLK2_BYPASS_CNTL__CLK2_BYPASS_DIV_MASK 0x000F0000L +#define regCLK5_0_CLK5_spll_field_8 0x464b +#define regCLK5_0_CLK5_spll_field_8_BASE_IDX 0 + +#define CLK5_0_CLK5_spll_field_8__spll_ssc_en__SHIFT 0xd +#define CLK5_0_CLK5_spll_field_8__spll_ssc_en_MASK 0x00002000L +#define REG (reg_name) \ (ctx->clk_reg_offsets[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
@@ -410,6 +416,17 @@ static void dcn35_dump_clk_registers(struct clk_state_registers_and_bypass *regs { } +static bool dcn35_is_spll_ssc_enabled (struct clk_mgr *clk_mgr_base) +{ +struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base); +struct dc_context *ctx = clk_mgr->base.ctx; +uint32_t ssc_enable; + +REG_GET (CLK5_0_CLK5_spll_field_8, spll_ssc_en, &ssc_enable); + +return ssc_enable ==1 ; +} +static void init_clk_states (struct clk_mgr *clk_mgr) {uint32_t ref_dtbclk = clk_mgr->clks.ref_dtbclk_khz;
@@ -424,7 +441,16 @@ static void init_clk_states(struct clk_mgr *clk_mgr)void dcn35_init_clocks (struct clk_mgr *clk_mgr) { +struct clk_mgr_internal *clk_mgr_int =TO_CLK_MGR_INTERNAL (clk_mgr);init_clk_states (clk_mgr); + +// to adjust dp_dto reference clock if ssc is enable otherwise to apply dprefclk +if (dcn35_is_spll_ssc_enabled (clk_mgr)) + clk_mgr->dp_dto_source_clock_in_khz = +dce_adjust_dp_ref_freq_for_ss (clk_mgr_int, clk_mgr->dprefclk_khz); +else + clk_mgr->dp_dto_source_clock_in_khz = clk_mgr->dprefclk_khz; + }static struct clk_bw_params dcn35_bw_params = { .vram_type = Ddr4MemType,
@@ -513,6 +539,28 @@ static DpmClocks_t_dcn35 dummy_clocks;static struct dcn35_watermarks dummy_wms = {0 }; +static struct dcn35_ss_info_table ss_info_table = { + .ss_divider =1000 , + .ss_percentage = {0 ,0 ,375 ,375 ,375 } +}; + +static void dcn35_read_ss_info_from_lut (struct clk_mgr_internal *clk_mgr) +{ +struct dc_context *ctx = clk_mgr->base.ctx; +uint32_t clock_source; + +REG_GET (CLK1_CLK2_BYPASS_CNTL ,CLK2_BYPASS_SEL , &clock_source); + +if (dcn35_is_spll_ssc_enabled (&clk_mgr->base) && (clock_source <ARRAY_SIZE (ss_info_table.ss_percentage))) { + clk_mgr->dprefclk_ss_percentage = ss_info_table.ss_percentage[clock_source]; + +if (clk_mgr->dprefclk_ss_percentage !=0 ) { + clk_mgr->ss_on_dprefclk = true; + clk_mgr->dprefclk_ss_divider = ss_info_table.ss_divider; + } + } +} +static void dcn35_build_watermark_ranges (struct clk_bw_params *bw_params,struct dcn35_watermarks *table) {int i, num_valid_sets;
@@ -1057,6 +1105,8 @@ void dcn35_clk_mgr_construct(dce_clock_read_ss_info (&clk_mgr->base);/*when clk src is from FCH, it could have ss, same clock src as DPREF clk*/ +dcn35_read_ss_info_from_lut (&clk_mgr->base); + clk_mgr->base.base.bw_params = &dcn35_bw_params;if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
Signature · 1 line
2.37.3
PATCH 19/43 drm/amd/display: Enabling urgent latency adjustment for DCN35
In reply to Wayne LinFrom: Nicholas Susanto <[email protected]>
[Why]
Underflow occurs when running netflix in a 4k144 eDP + 4k60 setup. Increasing DCFCLK or urgent latency watermark fixes the issue. Implementing this workaround for now while we figure out why this is happenning in DCN.
[How]
Enable urgent latency adjustment and match the reference to existing ASIC that also see increased latency at low FCLK.
--- drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 -2
@@ -195,9 +195,9 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = { .dcn_downspread_percent = 0.5, .gpuvm_min_page_size_bytes = 4096, .hostvm_min_page_size_bytes = 4096, - .do_urgent_latency_adjustment = 0, + .do_urgent_latency_adjustment = 1, .urgent_latency_adjustment_fabric_clock_component_us = 0, - .urgent_latency_adjustment_fabric_clock_reference_mhz = 0, + .urgent_latency_adjustment_fabric_clock_reference_mhz = 3000, };void dcn35_build_wm_range_table_fpu (struct clk_mgr *clk_mgr)
Signature · 1 line
2.37.3
PATCH 20/43 drm/amd/display: Revert "Set the power_down_on_boot function pointer to null"
In reply to Wayne LinFrom: Ovidiu Bunea <[email protected]>
This reverts commit 1b35616f8bdb ("drm/amd/display: Set the power_down_on_boot function pointer to null")
[why & how]
This commit breaks S0i3 entry because DCN does not enter IPS2.
--- drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_init.c +1 -1
@@ -39,7 +39,7 @@static const struct hw_sequencer_funcs dcn35_funcs = { .program_gamut_remap = dcn30_program_gamut_remap, .init_hw = dcn35_init_hw, - .power_down_on_boot =NULL , + .power_down_on_boot = dcn35_power_down_on_boot, .apply_ctx_to_hw = dce110_apply_ctx_to_hw, .apply_ctx_for_surface =NULL , .program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
Signature · 1 line
2.37.3
PATCH 21/43 drm/amd/display: add stream clock source to DP DTO params
In reply to Wayne LinFrom: Dillon Varone <[email protected]>
[WHY&HOW]
Stream clock source is a required parameter for DP DTO programming.
--- drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h +1 -0
@@ -59,6 +59,7 @@ enum dentist_dispclk_change_mode {struct dp_dto_params {int otg_inst;enum signal_type signal; +enum streamclk_source clk_src;uint64_t pixclk_hz;uint64_t refclk_hz; };
Signature · 1 line
2.37.3
PATCH 22/43 drm/amd/display: Program pixclk according to dcn revision
In reply to Wayne LinFrom: Dillon Varone <[email protected]>
[WHY&HOW]
Pixel clock programming should be built per dcn revision, not hardcoded to use dcn20.
--- .../gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +6 -1
@@ -1282,8 +1282,13 @@ void dcn20_build_pipe_pix_clk_params(struct pipe_ctx *pipe_ctx)static enum dc_status build_pipe_hw_param (struct pipe_ctx *pipe_ctx) { +struct resource_pool *pool = pipe_ctx->stream->ctx->dc->res_pool; -dcn20_build_pipe_pix_clk_params (pipe_ctx); +if (pool->funcs->build_pipe_pix_clk_params) { + pool->funcs->build_pipe_pix_clk_params (pipe_ctx); + }else { +dcn20_build_pipe_pix_clk_params (pipe_ctx); + } pipe_ctx->stream->clamping.pixel_encoding = pipe_ctx->stream->timing.pixel_encoding;
Signature · 1 line
2.37.3
PATCH 23/43 drm/amd/display: clear mpc_tree in init_pipes
In reply to Wayne LinFrom: Samson Tam <[email protected]>
[Why]
During init_pipes, otg master is not initialized. So mpc tree is still configured even if mpc bottom is not active
[How]
For pipes that have tg enabled, check their mpc tree and clear opp_list if mpc bottom is not active
--- .../drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 16 ++++++++++++++++ .../drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +16 -0
@@ -1366,6 +1366,7 @@ void dcn10_init_pipes(struct dc *dc, struct dc_state *context)struct dce_hwseq *hws = dc->hwseq;struct hubbub *hubbub = dc->res_pool->hubbub;bool can_apply_seamless_boot = false; +bool tg_enabled[MAX_PIPES ] = {false};for (i =0 ; i < context->stream_count; i++) {if (context->streams[i]->apply_seamless_boot_optimization) {
@@ -1447,6 +1448,7 @@ void dcn10_init_pipes(struct dc *dc, struct dc_state *context)// requesting data while in PSR. tg->funcs->tg_init (tg); hubp->power_gated = true; + tg_enabled[i] = true;continue ; }
@@ -1488,6 +1490,20 @@ void dcn10_init_pipes(struct dc *dc, struct dc_state *context) tg->funcs->tg_init (tg); } +/* Clean up MPC tree */ +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +if (tg_enabled[i]) { +if (dc->res_pool->opps[i]->mpc_tree_params.opp_list) { +if (dc->res_pool->opps[i]->mpc_tree_params.opp_list->mpcc_bot) { +int bot_id = dc->res_pool->opps[i]->mpc_tree_params.opp_list->mpcc_bot->mpcc_id; + +if ((bot_id <MAX_MPCC ) && (bot_id <MAX_PIPES ) && (!tg_enabled[bot_id])) + dc->res_pool->opps[i]->mpc_tree_params.opp_list =NULL ; + } + } + } + } +/* Power gate DSCs */ if (hws->funcs.dsc_pg_control !=NULL ) {uint32_t num_opps =0 ;
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +16 -0
@@ -720,6 +720,7 @@ void dcn35_init_pipes(struct dc *dc, struct dc_state *context)struct hubbub *hubbub = dc->res_pool->hubbub;struct pg_cntl *pg_cntl = dc->res_pool->pg_cntl;bool can_apply_seamless_boot = false; +bool tg_enabled[MAX_PIPES ] = {false};for (i =0 ; i < context->stream_count; i++) {if (context->streams[i]->apply_seamless_boot_optimization) {
@@ -801,6 +802,7 @@ void dcn35_init_pipes(struct dc *dc, struct dc_state *context)// requesting data while in PSR. tg->funcs->tg_init (tg); hubp->power_gated = true; + tg_enabled[i] = true;continue ; }
@@ -842,6 +844,20 @@ void dcn35_init_pipes(struct dc *dc, struct dc_state *context) tg->funcs->tg_init (tg); } +/* Clean up MPC tree */ +for (i =0 ; i < dc->res_pool->pipe_count; i++) { +if (tg_enabled[i]) { +if (dc->res_pool->opps[i]->mpc_tree_params.opp_list) { +if (dc->res_pool->opps[i]->mpc_tree_params.opp_list->mpcc_bot) { +int bot_id = dc->res_pool->opps[i]->mpc_tree_params.opp_list->mpcc_bot->mpcc_id; + +if ((bot_id <MAX_MPCC ) && (bot_id <MAX_PIPES ) && (!tg_enabled[bot_id])) + dc->res_pool->opps[i]->mpc_tree_params.opp_list =NULL ; + } + } + } + } +if (pg_cntl !=NULL ) {if (pg_cntl->funcs->dsc_pg_control !=NULL ) {uint32_t num_opps =0 ;
Signature · 1 line
2.37.3
PATCH 24/43 drm/amd/display: [FW Promotion] Release 0.0.208.0
In reply to Wayne LinFrom: Anthony Koo <[email protected]>
- Add a Replay residency mode which only calcuates the entry time based on replay state 0/1 switch.
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -0
@@ -2957,6 +2957,7 @@ enum pr_residency_mode {PR_RESIDENCY_MODE_ALPM ,PR_RESIDENCY_MODE_IPS2 ,PR_RESIDENCY_MODE_FRAME_CNT , + PR_RESIDENCY_MODE_ENABLEMENT_PERIOD, };#define REPLAY_RESIDENCY_MODE_SHIFT (0)
@@ -2971,6 +2972,7 @@ enum pr_residency_mode {#define REPLAY_RESIDENCY_MODE2_MASK (0xF << REPLAY_RESIDENCY_MODE2_SHIFT)# define REPLAY_RESIDENCY_FIELD_MODE2_IPS (0x1 << REPLAY_RESIDENCY_MODE2_SHIFT)# define REPLAY_RESIDENCY_FIELD_MODE2_FRAME_CNT (0x2 << REPLAY_RESIDENCY_MODE2_SHIFT) +# define REPLAY_RESIDENCY_FIELD_MODE2_EN_PERIOD (0x3 << REPLAY_RESIDENCY_MODE2_SHIFT)#define REPLAY_RESIDENCY_ENABLE_MASK (0x1 << REPLAY_RESIDENCY_ENABLE_SHIFT)# define REPLAY_RESIDENCY_DISABLE (0x0 << REPLAY_RESIDENCY_ENABLE_SHIFT)
Signature · 1 line
2.37.3
PATCH 25/43 drm/amd/display: 3.2.276
In reply to Wayne LinFrom: Aric Cyr <[email protected]>
This version brings along following fixes:
- Clear mpc_tree in init_pipes
- Program pixclk according to dcn revision
- Add stream clock source to DP DTO params
- Enabling urgent latency adjustment for DCN35
- To adjust dprefclk by down spread percentage
- Add debug option for idle reg checks
- Revert few patches which cause regression
- skip forcing odm in minimal transition
- Fix noise issue on HDMI AV mute
- Enable fast update for DCN314
- Enable 2to1 ODM policy for DCN35
- Fix DCN31 underflow problem
- Add the MALL size in the fallback function
- Modify coding style/errors and remove redundant codes
- Add missing registers and offset
--- 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
@@ -51,7 +51,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.275" +#define DC_VER "3.2.276"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.37.3
PATCH 26/43 drm/amd/display: Workaround register access in idle race with cursor
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Cursor update can be pre-empted by a request for setting target flip submission.
This causes an issue where we're in the middle of the exit sequence trying to log to DM, but the pre-emption starts another DMCUB command submission that requires being out of idle.
The DC lock aqusition can fail, and depending on the DM/OS interface it's possible that the function inserted into this thread must not fail.
This means that lock aqusition must be skipped and exit *must* occur.
[How]
Modify when we consider idle as active. Consider it exited only once the exit has fully finished.
Consider it as entered prior to actual notification.
Since we're on the same core/thread the cached values are coherent and we'll see that we still need to exit. Once the cursor update resumes it'll continue doing the double exit but this won't cause a functional issue, just a (potential) redundant operation.
--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 23 +++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +17 -6
@@ -1434,16 +1434,27 @@ void dc_dmub_srv_apply_idle_power_optimizations(const struct dc *dc, bool allow_* Powering up the hardware requires notifying PMFW and DMCUB. * Clearing the driver idle allow requires a DMCUB command. * DMCUB commands requires the DMCUB to be powered up and restored. -* -* Exit out early to prevent an infinite loop of DMCUB commands -* triggering exit low power - use software state to track this. */ - dc_dmub_srv->idle_allowed = allow_idle; -if (!allow_idle) +if (!allow_idle) {dc_dmub_srv_exit_low_power_state (dc); -else +/* +* Idle is considered fully exited only after the sequence above +* fully completes. If we have a race of two threads exiting +* at the same time then it's safe to perform the sequence +* twice as long as we're not re-entering. +* +* Infinite command submission is avoided by using the +* dm_execute_dmub_cmd submission instead of the "wake" helpers. +*/ + dc_dmub_srv->idle_allowed = false; + }else { +/* Consider idle as notified prior to the actual submission to +* prevent multiple entries. */ + dc_dmub_srv->idle_allowed = true; +dc_dmub_srv_notify_idle (dc, allow_idle); + } } bool dc_wake_and_execute_dmub_cmd(const struct dc_context *ctx, union dmub_rb_cmd *cmd,
Signature · 1 line
2.37.3
PATCH 27/43 drm/amd/display: Revert Remove pixle rate limit for subvp
In reply to Wayne LinFrom: Wenjing Liu <[email protected]>
This reverts commit 6cf00f4c4d5c ("drm/amd/display: Remove pixle rate limit for subvp")
[why]
The original commit causes a regression when subvp is applied on ODM required 8k60hz timing. The display shows black screen on boot. The issue can be recovered with hotplug. It also causes MPO to fail. We will temprarily revert this commit and investigate the root cause further.
--- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +1 -0
@@ -623,6 +623,7 @@ static bool dcn32_assign_subvp_pipe(struct dc *dc,* - Not TMZ surface */ if (pipe->plane_state && !pipe->top_pipe && !dcn32_is_center_timing(pipe) && + !(pipe->stream->timing.pix_clk_100hz / 10000 > DCN3_2_MAX_SUBVP_PIXEL_RATE_MHZ) && (!dcn32_is_psr_capable(pipe) || (context->stream_count == 1 && dc->caps.dmub_caps.subvp_psr)) && dc_state_get_pipe_subvp_type(context, pipe) == SUBVP_NONE && (refresh_rate < 120 || dcn32_allow_subvp_high_refresh_rate(dc, context, pipe)) &&
Signature · 1 line
2.37.3
PATCH 28/43 drm/amd/display: fix debug key not working on dml2
In reply to Wayne LinFrom: Charlene Liu <[email protected]>
[why]
need to apply the debug key check for max displayclk.
--- drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c +6 -0
@@ -374,10 +374,16 @@ void dml2_calculate_rq_and_dlg_params(const struct dc *dc, struct dc_state *cont context->bw_ctx.bw.dcn.clk.bw_dppclk_khz = context->bw_ctx.bw.dcn.clk.dppclk_khz; context->bw_ctx.bw.dcn.clk.bw_dispclk_khz = context->bw_ctx.bw.dcn.clk.dispclk_khz; + context->bw_ctx.bw.dcn.clk.max_supported_dppclk_khz = in_ctx->v20.dml_core_ctx.states.state_array[in_ctx->v20.scratch.mode_support_params.out_lowest_state_idx].dppclk_mhz *1000 ; context->bw_ctx.bw.dcn.clk.max_supported_dispclk_khz = in_ctx->v20.dml_core_ctx.states.state_array[in_ctx->v20.scratch.mode_support_params.out_lowest_state_idx].dispclk_mhz *1000 ; + +if (dc->config.forced_clocks || dc->debug.max_disp_clk) { + context->bw_ctx.bw.dcn.clk.bw_dispclk_khz = context->bw_ctx.bw.dcn.clk.max_supported_dispclk_khz; + context->bw_ctx.bw.dcn.clk.bw_dppclk_khz = context->bw_ctx.bw.dcn.clk.max_supported_dppclk_khz ; + } }void dml2_extract_watermark_set (struct dcn_watermarks *watermark,struct display_mode_lib_st *dml_core_ctx)
Signature · 1 line
2.37.3
PATCH 29/43 drm/amd/display: Power on VPG memory unconditionally if off
In reply to Wayne LinFrom: Dillon Varone <[email protected]>
[WHY&HOW]
Even if memory lower power feature policy states that it is disabled, VPG memory should still be poweerd on if it is currently disabled when requested.
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c +6 -1
@@ -63,7 +63,12 @@ void vpg31_poweron(struct vpg *vpg) {struct dcn31_vpg *vpg31 =DCN31_VPG_FROM_VPG (vpg); -if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false) +uint32_t vpg_gsp_mem_pwr_state; + +REG_GET (VPG_MEM_PWR ,VPG_GSP_MEM_PWR_STATE , &vpg_gsp_mem_pwr_state); + +if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false && + vpg_gsp_mem_pwr_state ==0 )return ;REG_UPDATE_2 (VPG_MEM_PWR ,VPG_GSP_MEM_LIGHT_SLEEP_DIS ,1 ,VPG_GSP_LIGHT_SLEEP_FORCE ,0 );
Signature · 1 line
2.37.3
PATCH 30/43 drm/amd/display: Added debug prints for zstate_support and StutterPeriod
In reply to Wayne LinFrom: Natanel Roizenman <[email protected]>
Added debug prints for zstate_support and StutterPeriod in dcn35_decide_zstate_support for testing.
--- drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +4 -0
@@ -577,6 +577,7 @@ void dcn35_decide_zstate_support(struct dc *dc, struct dc_state *context) {enum dcn_zstate_support_state support =DCN_ZSTATE_SUPPORT_DISALLOW ;unsigned int i, plane_count =0 ; +DC_LOGGER_INIT (dc->ctx->logger);for (i =0 ; i < dc->res_pool->pipe_count; i++) {if (context->res_ctx.pipe_ctx[i].plane_state)
@@ -608,5 +609,8 @@ void dcn35_decide_zstate_support(struct dc *dc, struct dc_state *context) } +DC_LOG_SMU ("zstate_support: %d, StutterPeriod: %d\n" , support, + (int )context->bw_ctx.dml.vba.StutterPeriod); + context->bw_ctx.bw.dcn.clk.zstate_support = support; }
Signature · 1 line
2.37.3
PATCH 31/43 drm/amd/display: change aux_init to apu version
In reply to Wayne LinFrom: Charlene Liu <[email protected]>
[why]
APU has different refclk as dGPU which is used for AUX_DPHY setup
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.h | 2 ++ drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dio_link_encoder.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.c +1 -1
@@ -205,7 +205,7 @@ void dcn31_link_encoder_set_dio_phy_mux( } } -static void enc31_hw_init (struct link_encoder *enc) +void enc31_hw_init (struct link_encoder *enc) {struct dcn10_link_encoder *enc10 =TO_DCN10_LINK_ENC (enc);
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.h +2 -0
@@ -283,4 +283,6 @@ bool dcn31_link_encoder_is_in_alt_mode(void dcn31_link_encoder_get_max_link_cap (struct link_encoder *enc,struct dc_link_settings *link_settings); +void enc31_hw_init (struct link_encoder *enc); +#endif /* __DC_LINK_ENCODER__DCN31_H__ */
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_dio_link_encoder.c +1 -1
@@ -119,7 +119,7 @@ void dcn35_link_encoder_setup(void dcn35_link_encoder_init (struct link_encoder *enc) { -enc32_hw_init (enc); +enc31_hw_init (enc);dcn35_link_encoder_set_fgcg (enc, enc->ctx->dc->debug.enable_fine_grain_clock_gating.bits.dio); }
Signature · 1 line
2.37.3
PATCH 32/43 drm/amd/display: Increase Z8 watermark times.
In reply to Wayne LinFrom: Natanel Roizenman <[email protected]>
Increase Z8 watermark times from 210->250us and 320->350us.
--- drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 -2
@@ -166,8 +166,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = { .num_states = 5, .sr_exit_time_us = 28.0, .sr_enter_plus_exit_time_us = 30.0, - .sr_exit_z8_time_us = 210.0, - .sr_enter_plus_exit_z8_time_us = 320.0, + .sr_exit_z8_time_us = 250.0, + .sr_enter_plus_exit_z8_time_us = 350.0, .fclk_change_latency_us = 24.0, .usr_retraining_latency_us = 2, .writeback_latency_us = 12.0,
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +2 -2
@@ -145,8 +145,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = { .num_states = 5, .sr_exit_time_us = 28.0, .sr_enter_plus_exit_time_us = 30.0, - .sr_exit_z8_time_us = 210.0, - .sr_enter_plus_exit_z8_time_us = 320.0, + .sr_exit_z8_time_us = 250.0, + .sr_enter_plus_exit_z8_time_us = 350.0, .fclk_change_latency_us = 24.0, .usr_retraining_latency_us = 2, .writeback_latency_us = 12.0,
Signature · 1 line
2.37.3
PATCH 33/43 drm/amd/display: Prevent crash on bring-up
In reply to Wayne LinFrom: Chris Park <[email protected]>
[Why]
Disabling stream encoder invokes a function that no longer exists in bring-up.
[How]
Check if the function declaration is NULL in disable stream encoder.
--- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -1
@@ -1185,7 +1185,8 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)if (dccg) { dccg->funcs->disable_symclk32_se (dccg, dp_hpo_inst); dccg->funcs->set_dpstreamclk (dccg,REFCLK , tg->inst, dp_hpo_inst); - dccg->funcs->set_dtbclk_dto (dccg, &dto_params); +if (dccg && dccg->funcs->set_dtbclk_dto) + dccg->funcs->set_dtbclk_dto (dccg, &dto_params); } }else if (dccg && dccg->funcs->disable_symclk_se) { dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,
Signature · 1 line
2.37.3
Re: [PATCH 33/43] drm/amd/display: Prevent crash on bring-up
[AMD Official Use Only - General]
Might want to avoid bringup in the commit description
--
Regards,
Jay
________________________________
From: Wayne Lin <[email protected]>
Sent: Tuesday, March 12, 2024 5:20 AM
To: [email protected] <[email protected]>
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; Zuo, Jerry <[email protected]>; Park, Chris <[email protected]>; Limonciello, Mario <[email protected]>; Deucher, Alexander <[email protected]>; [email protected] <[email protected]>; Liu, Charlene <[email protected]>
Subject: [PATCH 33/43] drm/amd/display: Prevent crash on bring-up
From: Chris Park <[email protected]>
[Why]
Disabling stream encoder invokes a function that no longer exists in bring-up.
[How]
Check if the function declaration is NULL in disable stream encoder.
--- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -1
@@ -1185,7 +1185,8 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)if (dccg) { dccg->funcs->disable_symclk32_se (dccg, dp_hpo_inst); dccg->funcs->set_dpstreamclk (dccg,REFCLK , tg->inst, dp_hpo_inst); - dccg->funcs->set_dtbclk_dto (dccg, &dto_params); +if (dccg && dccg->funcs->set_dtbclk_dto) + dccg->funcs->set_dtbclk_dto (dccg, &dto_params); } }else if (dccg && dccg->funcs->disable_symclk_se) { dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,
--
2.37.3
PATCH 34/43 drm/amd/display: increase bb clock for DCN351
In reply to Wayne LinFrom: Xi Liu <[email protected]>
[Why and how]
Bounding box clocks for DCN351 should be increased as per request
--- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 90 ++++++++++++++++--- 1 file changed, 76 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/dcn351/dcn351_fpu.c +76 -14
@@ -98,51 +98,110 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = { .clock_limits = { { .state = 0, - .dispclk_mhz = 1200.0, - .dppclk_mhz = 1200.0, + .dcfclk_mhz = 400.0, + .fabricclk_mhz = 400.0, + .socclk_mhz = 600.0, + .dram_speed_mts = 3200.0, + .dispclk_mhz = 600.0, + .dppclk_mhz = 600.0, .phyclk_mhz = 600.0, .phyclk_d18_mhz = 667.0, - .dscclk_mhz = 186.0, + .dscclk_mhz = 200.0, .dtbclk_mhz = 600.0, }, { .state = 1, - .dispclk_mhz = 1200.0, - .dppclk_mhz = 1200.0, + .dcfclk_mhz = 600.0, + .fabricclk_mhz = 1000.0, + .socclk_mhz = 733.0, + .dram_speed_mts = 6400.0, + .dispclk_mhz = 800.0, + .dppclk_mhz = 800.0, .phyclk_mhz = 810.0, .phyclk_d18_mhz = 667.0, - .dscclk_mhz = 209.0, + .dscclk_mhz = 266.7, .dtbclk_mhz = 600.0, }, { .state = 2, - .dispclk_mhz = 1200.0, - .dppclk_mhz = 1200.0, + .dcfclk_mhz = 738.0, + .fabricclk_mhz = 1200.0, + .socclk_mhz = 880.0, + .dram_speed_mts = 7500.0, + .dispclk_mhz = 800.0, + .dppclk_mhz = 800.0, .phyclk_mhz = 810.0, .phyclk_d18_mhz = 667.0, - .dscclk_mhz = 209.0, + .dscclk_mhz = 266.7, .dtbclk_mhz = 600.0, }, { .state = 3, - .dispclk_mhz = 1200.0, - .dppclk_mhz = 1200.0, + .dcfclk_mhz = 800.0, + .fabricclk_mhz = 1400.0, + .socclk_mhz = 978.0, + .dram_speed_mts = 7500.0, + .dispclk_mhz = 960.0, + .dppclk_mhz = 960.0, .phyclk_mhz = 810.0, .phyclk_d18_mhz = 667.0, - .dscclk_mhz = 371.0, + .dscclk_mhz = 320.0, .dtbclk_mhz = 600.0, }, { .state = 4, + .dcfclk_mhz = 873.0, + .fabricclk_mhz = 1600.0, + .socclk_mhz = 1100.0, + .dram_speed_mts = 8533.0, + .dispclk_mhz = 1066.7, + .dppclk_mhz = 1066.7, + .phyclk_mhz = 810.0, + .phyclk_d18_mhz = 667.0, + .dscclk_mhz = 355.6, + .dtbclk_mhz = 600.0, + }, + { + .state = 5, + .dcfclk_mhz = 960.0, + .fabricclk_mhz = 1700.0, + .socclk_mhz = 1257.0, + .dram_speed_mts = 8533.0, .dispclk_mhz = 1200.0, .dppclk_mhz = 1200.0, .phyclk_mhz = 810.0, .phyclk_d18_mhz = 667.0, - .dscclk_mhz = 417.0, + .dscclk_mhz = 400.0, + .dtbclk_mhz = 600.0, + }, + { + .state = 6, + .dcfclk_mhz = 1067.0, + .fabricclk_mhz = 1850.0, + .socclk_mhz = 1257.0, + .dram_speed_mts = 8533.0, + .dispclk_mhz = 1371.4, + .dppclk_mhz = 1371.4, + .phyclk_mhz = 810.0, + .phyclk_d18_mhz = 667.0, + .dscclk_mhz = 457.1, + .dtbclk_mhz = 600.0, + }, + { + .state = 7, + .dcfclk_mhz = 1200.0, + .fabricclk_mhz = 2000.0, + .socclk_mhz = 1467.0, + .dram_speed_mts = 8533.0, + .dispclk_mhz = 1600.0, + .dppclk_mhz = 1600.0, + .phyclk_mhz = 810.0, + .phyclk_d18_mhz = 667.0, + .dscclk_mhz = 533.3, .dtbclk_mhz = 600.0, }, }, - .num_states = 5, + .num_states = 8, .sr_exit_time_us = 28.0, .sr_enter_plus_exit_time_us = 30.0, .sr_exit_z8_time_us = 250.0,
@@ -177,6 +236,9 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_51_soc = { .do_urgent_latency_adjustment = 0, .urgent_latency_adjustment_fabric_clock_component_us = 0, .urgent_latency_adjustment_fabric_clock_reference_mhz = 0, + .num_chans = 4, + .dram_clock_change_latency_us = 11.72, + .dispclk_dppclk_vco_speed_mhz = 2400.0, };/*
Signature · 1 line
2.37.3
PATCH 35/43 drm/amd/display: Detect and disallow idle reallow during reentrancy
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
Cursor updates can be preempted by queued flips in some DMs.
The synchronization model causes this to occur within the same thread at an intermediate level when we insert logs into the OS queue.
Since this occurs on the same thread and we're still holding the lock (recursively) the cache is coherent.
The exit sequence will run twice since we technically haven't finished the exit the first time, so we need a way to detect and avoid the reallow in the middle of this call to prevent the hang on the cursor update that was preempted.
[How]
Keep a counter that tracks the depth of the exit calls. Do not reallow until the counter is zero.
--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 14 ++++++++++++-- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +12 -2
@@ -1437,6 +1437,8 @@ void dc_dmub_srv_apply_idle_power_optimizations(const struct dc *dc, bool allow_*/ if (!allow_idle) { + dc_dmub_srv->idle_exit_counter +=1 ; +dc_dmub_srv_exit_low_power_state (dc);/* * Idle is considered fully exited only after the sequence above
@@ -1448,6 +1450,12 @@ void dc_dmub_srv_apply_idle_power_optimizations(const struct dc *dc, bool allow_* dm_execute_dmub_cmd submission instead of the "wake" helpers. */ dc_dmub_srv->idle_allowed = false; + + dc_dmub_srv->idle_exit_counter -=1 ; +if (dc_dmub_srv->idle_exit_counter <0 ) { +ASSERT (0 ); + dc_dmub_srv->idle_exit_counter =0 ; + } }else {/* Consider idle as notified prior to the actual submission to * prevent multiple entries. */
@@ -1489,7 +1497,8 @@ bool dc_wake_and_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned inelse result =dm_execute_dmub_cmd (ctx, cmd, wait_type); -if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle) +if (result && reallow_idle && dc_dmub_srv->idle_exit_counter ==0 && + !ctx->dc->debug.disable_dmub_reallow_idle)dc_dmub_srv_apply_idle_power_optimizations (ctx->dc, true);return result;
@@ -1538,7 +1547,8 @@ bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_com result =dc_dmub_execute_gpint (ctx, command_code, param, response, wait_type); -if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle) +if (result && reallow_idle && dc_dmub_srv->idle_exit_counter ==0 && + !ctx->dc->debug.disable_dmub_reallow_idle)dc_dmub_srv_apply_idle_power_optimizations (ctx->dc, true);return result;
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +1 -0
@@ -51,6 +51,7 @@ struct dc_dmub_srv {struct dc_context *ctx;void *dm; +int32_t idle_exit_counter;bool idle_allowed;bool needs_idle_wake; };
Signature · 1 line
2.37.3
PATCH 36/43 drm/amd/display: Add optional optimization for IPS handshake
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
It's possible to skip parts of the eval and exit sequencing if we know whether DCN is in IPS2 already or if it's committed to going to idle and not in IPS2.
[How]
Skip IPS2 entry/exit if DMCUB is idle but the IPS2 commit is not set.
Skip the eval delay if DMCUB is already in IPS2 since we know we need to exit.
These are turned off by default.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++++-- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -988,6 +988,7 @@ struct dc_debug_options {bool psp_disabled_wa;unsigned int ips2_eval_delay_us;unsigned int ips2_entry_delay_us; +bool optimize_ips_handshake;bool disable_dmub_reallow_idle;bool disable_timeout;bool disable_extblankadj;
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +5 -2
@@ -1318,13 +1318,16 @@ static void dc_dmub_srv_exit_low_power_state(const struct dc *dc)*/ dc_dmub_srv->needs_idle_wake = false; -if (prev_driver_signals.bits.allow_ips2) { +if (prev_driver_signals.bits.allow_ips2 && + (!dc->debug.optimize_ips_handshake || + ips_fw->signals.bits.ips2_commit || !ips_fw->signals.bits.in_idle)) {DC_LOG_IPS ("wait IPS2 eval (ips1_commit=%d ips2_commit=%d)" , ips_fw->signals.bits.ips1_commit, ips_fw->signals.bits.ips2_commit); -udelay (dc->debug.ips2_eval_delay_us); +if (!dc->debug.optimize_ips_handshake || !ips_fw->signals.bits.ips2_commit) +udelay (dc->debug.ips2_eval_delay_us);if (ips_fw->signals.bits.ips2_commit) { DC_LOG_IPS(
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -1
@@ -700,7 +700,8 @@ union dmub_shared_state_ips_fw_signals {struct {uint32_t ips1_commit :1 ;/**< 1 if in IPS1 */ uint32_t ips2_commit :1 ;/**< 1 if in IPS2 */ -uint32_t reserved_bits :30 ;/**< Reversed */ +uint32_t in_idle :1 ;/**< 1 if DMCUB is in idle */ +uint32_t reserved_bits :29 ;/**< Reversed */ } bits;uint32_t all; };
Signature · 1 line
2.37.3
PATCH 37/43 drm/amd/display: Enable optimized handshake for DCN35
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
To reduce the handshake overhead for static screen and video playback.
[How]
Flip the debug option to enable by default.
--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -0
@@ -785,6 +785,7 @@ static const struct dc_debug_options debug_defaults_drv = { .ips2_entry_delay_us = 800, .disable_dmub_reallow_idle = true, .static_screen_wait_frames = 2, + .optimize_ips_handshake = true, };static const struct dc_panel_config panel_config_defaults = {
Signature · 1 line
2.37.3
PATCH 38/43 drm/amd/display: Remove unnecessary hard coded DPM states
In reply to Wayne LinFrom: Xi Liu <[email protected]>
[Why]
The hard coded DPM states are only used to fix mismatch states numbers from FW.
[How]
Remove when not needed.
--- .../display/dc/dml2/dml2_translation_helper.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +15 -2
@@ -30,6 +30,10 @@#define NUM_DCFCLK_STAS 5 +#if defined(CONFIG_DRM_AMD_DC_DCN3_51 ) +#define NUM_DCFCLK_STAS_NEW 8 +#endif +void dml2_init_ip_params (struct dml2_context *dml2,const struct dc *in_dc,struct ip_params_st *out) {switch (dml2->v20.dml_core_ctx.project) {
@@ -254,11 +258,21 @@ void dml2_init_soc_states(struct dml2_context *dml2, const struct dc *in_dc,struct dml2_policy_build_synthetic_soc_states_scratch *s = &dml2->v20.scratch.create_scratch.build_synthetic_socbb_scratch;struct dml2_policy_build_synthetic_soc_states_params *p = &dml2->v20.scratch.build_synthetic_socbb_params;unsigned int dcfclk_stas_mhz[NUM_DCFCLK_STAS ]; +#if defined(CONFIG_DRM_AMD_DC_DCN3_51 ) +unsigned int dcfclk_stas_mhz_new[NUM_DCFCLK_STAS_NEW ]; +unsigned int dml_project = dml2->v20.dml_core_ctx.project; +#endif unsigned int i =0 ;unsigned int transactions_per_mem_clock =16 ;// project specific, depends on used Memory type p->dcfclk_stas_mhz = dcfclk_stas_mhz; p->num_dcfclk_stas =NUM_DCFCLK_STAS ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_51 ) +if (dml_project == dml_project_dcn351) { + p->dcfclk_stas_mhz = dcfclk_stas_mhz_new; + p->num_dcfclk_stas =NUM_DCFCLK_STAS_NEW ; + } +#endif p->in_bbox = in_bbox; p->out_states = out; p->in_states = &dml2->v20.scratch.create_scratch.in_states;
@@ -436,8 +450,7 @@ void dml2_init_soc_states(struct dml2_context *dml2, const struct dc *in_dc, }dml2_policy_build_synthetic_soc_states (s, p); -if (dml2->v20.dml_core_ctx.project == dml_project_dcn35 || - dml2->v20.dml_core_ctx.project == dml_project_dcn351) { +if (dml2->v20.dml_core_ctx.project == dml_project_dcn35) {// Override last out_state with data from last in_state // This will ensure that out_state contains max fclk memcpy(&p->out_states->state_array[p->out_states->num_states - 1],
Signature · 1 line
2.37.3
PATCH 39/43 drm/amd/display: Enable new interface design for alternate scrambling
In reply to Wayne LinFrom: Sung Joon Kim <[email protected]>
[why & how]
To enable a new interface so alternate scrambling can be done via security module.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 + .../gpu/drm/amd/display/dc/link/link_dpms.c | 3 + .../dc/link/protocols/link_dp_training.c | 16 +---- .../link/protocols/link_edp_panel_control.c | 64 +++++++++++++++++ .../link/protocols/link_edp_panel_control.h | 2 + .../dc/resource/dcn351/dcn351_resource.c | 3 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 68 +++++++++++++++++++ 7 files changed, 142 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -436,6 +436,7 @@ struct dc_config {unsigned int disable_ips_in_vpb;bool usb4_bw_alloc_support;bool allow_0_dtb_clk; +bool use_assr_psp_message; };enum visual_confirm {
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +3 -0
@@ -2285,6 +2285,7 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)struct dc_stream_state *stream = pipe_ctx->stream;struct dc_link *link = stream->sink->link;struct vpg *vpg = pipe_ctx->stream_res.stream_enc->vpg; +enum dp_panel_mode panel_mode_dp =dp_get_panel_mode (link);DC_LOGGER_INIT (pipe_ctx->stream->ctx->logger);
@@ -2311,6 +2312,8 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx) dc->hwss.disable_audio_stream (pipe_ctx); +edp_set_panel_assr (link, pipe_ctx, &panel_mode_dp, false); +update_psp_stream_config (pipe_ctx, true); dc->hwss.blank_stream (pipe_ctx);
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c +1 -15
@@ -1587,21 +1587,7 @@ bool perform_link_training_with_retries(msleep (delay_dp_power_up_in_ms); } -if (panel_mode ==DP_PANEL_MODE_EDP ) { -struct cp_psp *cp_psp = &stream->ctx->cp_psp; - -if (cp_psp && cp_psp->funcs.enable_assr) { -/* ASSR is bound to fail with unsigned PSP -* verstage used during devlopment phase. -* Report and continue with eDP panel mode to -* perform eDP link training with right settings -*/ -bool result; - result = cp_psp->funcs.enable_assr (cp_psp->handle, link); -if (!result && link->panel_mode !=DP_PANEL_MODE_EDP ) - panel_mode =DP_PANEL_MODE_DEFAULT ; - } - } +edp_set_panel_assr (link, pipe_ctx, &panel_mode, true);dp_set_panel_mode (link, panel_mode);
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +64 -0
73 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.h +2 -0
@@ -76,4 +76,6 @@ bool edp_receiver_ready_T9(struct dc_link *link);bool edp_receiver_ready_T7 (struct dc_link *link);bool edp_power_alpm_dpcd_enable (struct dc_link *link,bool enable);void edp_set_panel_power (struct dc_link *link,bool powerOn); +void edp_set_panel_assr (struct dc_link *link,struct pipe_ctx *pipe_ctx, +enum dp_panel_mode *panel_mode,bool enable);#endif /* __DC_LINK_EDP_POWER_CONTROL_H__ */
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +3 -0
@@ -1864,6 +1864,9 @@ static bool dcn351_resource_construct(/* Use pipe context based otg sync logic */ dc->config.use_pipe_ctx_sync_logic = true; +/* Use psp mailbox to enable assr */ + dc->config.use_assr_psp_message = true; +/* read VBIOS LTTPR caps */ {if (ctx->dc_bios->funcs->get_lttpr_caps) {
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +68 -0
86 lines not on this page · raw message
Signature · 1 line
2.37.3
PATCH 40/43 drm/amd/display: Enable reallow for idle on DCN35
In reply to Wayne LinFrom: Nicholas Kazlauskas <[email protected]>
[Why]
It was previously disabled for stability purposes, but command submission causes residency issues in IPS video playback.
[How]
Enable the disallow/reallow pattern back. There's additional checks now in DMCUB that should make this safer stability wise.
--- drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
@@ -783,7 +783,7 @@ static const struct dc_debug_options debug_defaults_drv = { .psp_disabled_wa = true, .ips2_eval_delay_us = 2000, .ips2_entry_delay_us = 800, - .disable_dmub_reallow_idle = true, + .disable_dmub_reallow_idle = false, .static_screen_wait_frames = 2, .optimize_ips_handshake = true, };
Signature · 1 line
2.37.3
PATCH 41/43 drm/amd/display: fix a bug to dereference already freed old current state memory
In reply to Wayne LinFrom: Wenjing Liu <[email protected]>
[why]
During minimal transition commit, the base state could be freed if it is current state. This is because after committing minimal transition state, the current state will be swapped to the minimal transition state and the old current state will be released. the release could cause the old current state's memory to be freed. However dc will derefernce this memory when release minimal transition state. Therefore, we need to retain the old current state until we release minimal transition state.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -8
@@ -4203,7 +4203,6 @@ static void release_minimal_transition_state(struct dc *dc, {restore_minimal_pipe_split_policy (dc, base_context, policy);dc_state_release (minimal_transition_context); -/* restore previous pipe split and odm policy */ }static void force_vsync_flip_in_minimal_transition_context (struct dc_state *context)
@@ -4258,7 +4257,7 @@ static bool is_pipe_topology_transition_seamless_with_intermediate_step( intermediate_state, final_state); } -static void swap_and_free_current_context (struct dc *dc, +static void swap_and_release_current_context (struct dc *dc,struct dc_state *new_context,struct dc_stream_state *stream) {
@@ -4321,7 +4320,7 @@ static bool commit_minimal_transition_based_on_new_context(struct dc *dc,commit_planes_for_stream (dc, srf_updates, surface_count, stream,NULL ,UPDATE_TYPE_FULL , intermediate_context); -swap_and_free_current_context ( +swap_and_release_current_context ( dc, intermediate_context, stream);dc_state_retain (dc->current_state); success = true;
@@ -4338,6 +4337,7 @@ static bool commit_minimal_transition_based_on_current_context(struct dc *dc,bool success = false;struct pipe_split_policy_backup policy;struct dc_state *intermediate_context; +struct dc_state *old_current_state = dc->current_state;struct dc_surface_update srf_updates[MAX_SURFACE_NUM ];int surface_count;
@@ -4353,8 +4353,10 @@ static bool commit_minimal_transition_based_on_current_context(struct dc *dc,* with the current state. */ restore_planes_and_stream_state (&dc->scratch.current_state, stream); +dc_state_retain (old_current_state); intermediate_context =create_minimal_transition_state (dc, - dc->current_state, &policy); + old_current_state, &policy); +if (intermediate_context) { if (is_pipe_topology_transition_seamless_with_intermediate_step( dc,
@@ -4367,14 +4369,15 @@ static bool commit_minimal_transition_based_on_current_context(struct dc *dc,commit_planes_for_stream (dc, srf_updates, surface_count, stream,NULL ,UPDATE_TYPE_FULL , intermediate_context); -swap_and_free_current_context ( +swap_and_release_current_context ( dc, intermediate_context, stream);dc_state_retain (dc->current_state); success = true; }release_minimal_transition_state (dc, intermediate_context, - dc->current_state, &policy); + old_current_state, &policy); } +dc_state_release (old_current_state);/* * Restore stream and plane states back to the values associated with * new context.
@@ -4496,12 +4499,14 @@ static bool commit_minimal_transition_state(struct dc *dc, dc->debug.pipe_split_policy !=MPC_SPLIT_AVOID ?"MPC in Use" : "Unknown"); +dc_state_retain (transition_base_context); transition_context =create_minimal_transition_state (dc, transition_base_context, &policy);if (transition_context) { ret =dc_commit_state_no_check (dc, transition_context);release_minimal_transition_state (dc, transition_context, transition_base_context, &policy); } +dc_state_release (transition_base_context);if (ret !=DC_OK ) {/* this should never happen */
@@ -4839,7 +4844,7 @@ static bool update_planes_and_stream_v2(struct dc *dc, context); }if (dc->current_state != context) -swap_and_free_current_context (dc, context, stream); +swap_and_release_current_context (dc, context, stream);return true; }
@@ -4941,7 +4946,7 @@ static bool update_planes_and_stream_v3(struct dc *dc,commit_planes_and_stream_update_with_new_context (dc, srf_updates, surface_count, stream, stream_update, update_type, new_context); -swap_and_free_current_context (dc, new_context, stream); +swap_and_release_current_context (dc, new_context, stream); }return true;
Signature · 1 line
2.37.3
PATCH 42/43 drm/amd/display: Add TB_BORROWED_MAX definition
In reply to Wayne LinFrom: Chaitanya Dhere <[email protected]>
[Why & How]
For DML2 to decouple it from other DML versions.
--- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c +2 -0
@@ -31,6 +31,8 @@#include "dml_assert.h" #define DML2_MAX_FMT_420_BUFFER_WIDTH 4096 +#define TB_BORROWED_MAX 400 +// --------------------------- // Declaration Begins // ---------------------------
Signature · 1 line
2.37.3
PATCH 43/43 drm/amd/display: 3.2.277
In reply to Wayne LinFrom: Aric Cyr <[email protected]>
This version brings along following fixes:
- Fix few problems for DCN35
- Fix a bug which dereferences freed memory
- Enable new interface design for alternate scrambling
- Enhance IPS handshake
- Increase Z8 watermark times
- Fix DML2 problem
- Revert patch which cause regression
- Fix problems for dmub idle power optimization
--- 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
@@ -51,7 +51,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.276" +#define DC_VER "3.2.277"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.37.3
[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 - 0b233252a7c1 drm/amd/display: 3.2.275) 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: Wayne Lin <[email protected]>
Sent: Tuesday, March 12, 2024 5:20 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; Zuo, Jerry <[email protected]>; Lin, Wayne <[email protected]>; Wheeler, Daniel <[email protected]>
Subject: [PATCH 00/43] DC Patches March 18, 2024
This DC patchset brings improvements in multiple areas. In summary, we highlight:
- Clear mpc_tree in init_pipes
- Program pixclk according to dcn revision
- Add stream clock source to DP DTO params
- Enabling urgent latency adjustment for DCN35
- To adjust dprefclk by down spread percentage
- Add debug option for idle reg checks
- Revert few patches which cause regression
- skip forcing odm in minimal transition
- Fix noise issue on HDMI AV mute
- Enable fast update for DCN314
- Enable 2to1 ODM policy for DCN35
- Fix DCN31 underflow problem
- Add the MALL size in the fallback function
- Modify coding style/errors and remove redundant codes
- Add missing registers and offset
- Fix few problems for DCN35
- Fix a bug which dereferences freed memory
- Enable new interface design for alternate scrambling
- Enhance IPS handshake
- Increase Z8 watermark times
- Fix DML2 problem
- Revert patch which cause regression
- Fix problems for dmub idle power optimization
---
Alex Hung (2):
drm/amd/display: Delete duplicated function prototypes drm/amd/display: Correct indentations and spaces
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.208.0
Aric Cyr (2):
drm/amd/display: 3.2.276
drm/amd/display: 3.2.277
Chaitanya Dhere (1):
drm/amd/display: Add TB_BORROWED_MAX definition
Charlene Liu (2):
drm/amd/display: fix debug key not working on dml2 drm/amd/display: change aux_init to apu version
Chris Park (1):
drm/amd/display: Prevent crash on bring-up
Dillon Varone (3):
drm/amd/display: add stream clock source to DP DTO params drm/amd/display: Program pixclk according to dcn revision drm/amd/display: Power on VPG memory unconditionally if off
Gabe Teeger (1):
drm/amd/display: Revert Add left edge pixel + ODM pipe split
Leo Ma (1):
drm/amd/display: Fix noise issue on HDMI AV mute
Martin Leung (1):
drm/amd/display: revert Exit idle optimizations before HDCP execution
Natanel Roizenman (2):
drm/amd/display: Added debug prints for zstate_support and
StutterPeriod
drm/amd/display: Increase Z8 watermark times.
Nicholas Kazlauskas (6):
drm/amd/display: Add debug option for idle reg checks drm/amd/display: Workaround register access in idle race with cursor drm/amd/display: Detect and disallow idle reallow during reentrancy drm/amd/display: Add optional optimization for IPS handshake drm/amd/display: Enable optimized handshake for DCN35 drm/amd/display: Enable reallow for idle on DCN35
Nicholas Susanto (1):
drm/amd/display: Enabling urgent latency adjustment for DCN35
Ovidiu Bunea (1):
drm/amd/display: Revert "Set the power_down_on_boot function pointer
to null"
Rodrigo Siqueira (9):
drm/amd/display: Remove code duplication drm/amd/display: Remove wrong signal from vrr calculation drm/amd/display: Enable 2to1 ODM policy for DCN35 drm/amd/display: Add the MALL size in the fallback function drm/amd/display: Move define to the proper header drm/amd/display: Enable fast update for DCN314 drm/amd/display: Remove legacy code drm/amd/display: Comments adjustments drm/amd/display: Add missing registers and offset
Samson Tam (1):
drm/amd/display: clear mpc_tree in init_pipes
Sherry Wang (1):
drm/amd/display: correct hostvm flag
Sung Joon Kim (1):
drm/amd/display: Enable new interface design for alternate scrambling
Wenjing Liu (3):
drm/amd/display: skip forcing odm in minimal transition drm/amd/display: Revert Remove pixle rate limit for subvp drm/amd/display: fix a bug to dereference already freed old current
state memory
Xi Liu (2):
drm/amd/display: increase bb clock for DCN351 drm/amd/display: Remove unnecessary hard coded DPM states
Zhongwei (1):
drm/amd/display: To adjust dprefclk by down spread percentage
.../gpu/drm/amd/display/dc/bios/bios_parser.c | 1 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 15 ++- .../display/dc/clk_mgr/dcn314/dcn314_smu.h | 42 +++---- .../dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.h | 3 +- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 50 ++++++++ drivers/gpu/drm/amd/display/dc/core/dc.c | 118 +++++++++++------- .../gpu/drm/amd/display/dc/core/dc_resource.c | 40 +----- drivers/gpu/drm/amd/display/dc/core/dc_stat.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 5 +- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 44 +++++-- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + .../display/dc/dcn31/dcn31_dio_link_encoder.c | 2 +- .../display/dc/dcn31/dcn31_dio_link_encoder.h | 2 + .../gpu/drm/amd/display/dc/dcn31/dcn31_vpg.c | 7 +- .../display/dc/dcn35/dcn35_dio_link_encoder.c | 2 +- .../drm/amd/display/dc/dml/dcn31/dcn31_fpu.h | 1 + .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 1 + .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c | 12 +- .../amd/display/dc/dml/dcn351/dcn351_fpu.c | 94 +++++++++++--- .../amd/display/dc/dml2/display_mode_core.c | 2 + .../display/dc/dml2/dml2_translation_helper.c | 17 ++- .../gpu/drm/amd/display/dc/dml2/dml2_utils.c | 6 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 +- .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 16 +++ .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 10 -- .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c | 12 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 16 +++ .../amd/display/dc/hwss/dcn35/dcn35_init.c | 2 +- .../gpu/drm/amd/display/dc/inc/core_types.h | 2 - drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h | 1 + drivers/gpu/drm/amd/display/dc/inc/resource.h | 4 - .../gpu/drm/amd/display/dc/link/link_dpms.c | 3 + .../dc/link/protocols/link_dp_training.c | 16 +-- .../link/protocols/link_edp_panel_control.c | 64 ++++++++++ .../link/protocols/link_edp_panel_control.h | 2 + .../dc/resource/dcn20/dcn20_resource.c | 7 +- .../dc/resource/dcn31/dcn31_resource.c | 5 +- .../dc/resource/dcn314/dcn314_resource.c | 21 +--- .../dc/resource/dcn316/dcn316_resource.c | 1 - .../dc/resource/dcn32/dcn32_resource.c | 3 +- .../dc/resource/dcn321/dcn321_resource.c | 4 +- .../dc/resource/dcn35/dcn35_resource.c | 5 +- .../dc/resource/dcn351/dcn351_resource.c | 3 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 73 ++++++++++- .../amd/display/modules/freesync/freesync.c | 2 +- .../gpu/drm/amd/display/modules/hdcp/hdcp.c | 10 -- .../drm/amd/display/modules/inc/mod_hdcp.h | 8 -- .../display/modules/info_packet/info_packet.c | 2 - .../include/asic_reg/dcn/dcn_3_2_1_offset.h | 37 +++++- .../include/asic_reg/dcn/dcn_3_2_1_sh_mask.h | 16 +++ 50 files changed, 581 insertions(+), 234 deletions(-)
--
2.37.3