DC Patches May 17, 2021
Subsystems (3)
cover DC Patches May 17, 2021
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* DC v3.2.136
* Improvements across DP, DMUB, code documentation, suspend/resume, etc
--
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.66
Aric Cyr (1):
drm/amd/display: 3.2.136
Bhawanpreet Lakha (1):
drm/amd/display: Add Overflow check to skip MALL
Chris Park (1):
drm/amd/display: Disconnect non-DP with no EDID
George Shen (1):
drm/amd/display: Minor refactor of DP PHY test automation
Hugo Hu (1):
drm/amd/display: treat memory as a single-channel for asymmetric
memory V3
Nikola Cornij (1):
drm/amd/display: Use the correct max downscaling value for DCN3.x
family
Rodrigo Siqueira (4):
drm/amd/display: Add documentation for power gate plane drm/amd/display: Remove legacy comments drm/amd/display: Add kernel-doc to some hubp functions drm/amd/display: Document set RECOUT operation
Wayne Lin (2):
drm/amd/display: Refactor suspend/resume of Secure display drm/amd/display: Avoid get/put vblank when stream disabled
Wenjing Liu (4):
drm/amd/display: determine dp link encoding format from link settings drm/amd/display: decide link training settings based on channel coding drm/amd/display: rename perform_link_training_int function drm/amd/display: consider channel coding in configure lttpr mode
Wyatt Wood (2):
drm/amd/display: Add get_current_time interface to dmub_srv drm/amd/display: Refactor and add visual confirm for HW Flip Queue
Zhan Liu (1):
drm/amd/display: Correct DPCD revision for eDP v1.4
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 63 +---- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 4 - .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 48 +++- drivers/gpu/drm/amd/display/dc/core/dc.c | 39 +-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 106 +++++--- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 5 + .../drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 49 ++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 13 + .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 229 +++++------------- .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 6 + .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 5 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 28 ++- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 5 + .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 2 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 8 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 9 + .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_resource.c | 7 +- .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + .../amd/display/dc/dcn301/dcn301_resource.c | 7 +- .../amd/display/dc/dcn302/dcn302_resource.c | 7 +- drivers/gpu/drm/amd/display/dc/dm_services.h | 1 - .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 3 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +- .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 5 + .../gpu/drm/amd/display/dmub/src/dmub_dcn20.h | 5 +- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + .../amd/display/include/link_service_types.h | 1 + 39 files changed, 380 insertions(+), 353 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/20 drm/amd/display: treat memory as a single-channel for asymmetric memory V3
From: Hugo Hu <[email protected]>
Previous patch caused crash and had been reverted. This patch addresses the issue without regression.
[Why]
1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as single-channel.
2. We found single rank dimm need additional delay time for stutter.
[How]
Get information from each DIMM. Treat memory config as a single-channel for asymmetric memory in bandwidth calculating.
Add additional delay time for single rank dimm.
--- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 48 ++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 2 + 2 files changed, 48 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +46 -2
@@ -761,6 +761,43 @@ static struct wm_table ddr4_wm_table_rn = { } }; +static struct wm_table ddr4_1R_wm_table_rn = { + .entries = { + { + .wm_inst =WM_A , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =13.90 , + .sr_enter_plus_exit_time_us =14.80 , + .valid = true, + }, + { + .wm_inst =WM_B , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =13.90 , + .sr_enter_plus_exit_time_us =14.80 , + .valid = true, + }, + { + .wm_inst =WM_C , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =13.90 , + .sr_enter_plus_exit_time_us =14.80 , + .valid = true, + }, + { + .wm_inst =WM_D , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =13.90 , + .sr_enter_plus_exit_time_us =14.80 , + .valid = true, + }, + } +}; +static struct wm_table lpddr4_wm_table_rn = { .entries = { {
@@ -971,8 +1008,12 @@ void rn_clk_mgr_construct( }else {if (is_green_sardine) rn_bw_params.wm_table = ddr4_wm_table_gs; -else - rn_bw_params.wm_table = ddr4_wm_table_rn; +else { +if (ctx->dc->config.is_single_rank_dimm) + rn_bw_params.wm_table = ddr4_1R_wm_table_rn; +else + rn_bw_params.wm_table = ddr4_wm_table_rn; + } }/* Saved clocks configured at boot for debug purposes */ rn_dump_clk_registers (&clk_mgr->base.boot_snapshot, &clk_mgr->base, &log_info);
@@ -990,6 +1031,9 @@ void rn_clk_mgr_construct(if (status ==PP_SMU_RESULT_OK && ctx->dc_bios && ctx->dc_bios->integrated_info) {rn_clk_mgr_helper_populate_bw_params (clk_mgr->base.bw_params, &clock_table, ctx->dc_bios->integrated_info); +/* treat memory config as single channel if memory is asymmetrics. */ +if (ctx->dc->config.is_asymmetric_memory) + clk_mgr->base.bw_params->num_channels =1 ; } }
drivers/gpu/drm/amd/display/dc/dc.h +2 -0
@@ -308,6 +308,8 @@ struct dc_config {#endif uint64_t vblank_alignment_dto_params;uint8_t vblank_alignment_max_frame_time_diff; +bool is_asymmetric_memory; +bool is_single_rank_dimm; };enum visual_confirm {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/20 drm/amd/display: Add get_current_time interface to dmub_srv
In reply to Stylon WangFrom: Wyatt Wood <[email protected]>
[Why]
Need to get current DMUB time.
[How]
Add get_current_time interface to dmub_srv.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 39 ++++++++++--------- .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 8 ++-- drivers/gpu/drm/amd/display/dc/dm_services.h | 1 - drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 5 +++ .../gpu/drm/amd/display/dmub/src/dmub_dcn20.h | 5 ++- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + 7 files changed, 35 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +20 -19
@@ -2636,14 +2636,14 @@ static void commit_planes_for_stream(struct dc *dc, top_pipe_to_program->stream_res.tg); } -if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) - dc->hwss.interdependent_update_lock (dc, context, true); -else -/* Lock the top pipe while updating plane addrs, since freesync requires -* plane addr update event triggers to be synchronized. -* top_pipe_to_program is expected to never be NULL -*/ - dc->hwss.pipe_control_lock (dc, top_pipe_to_program, true); +if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) + dc->hwss.interdependent_update_lock (dc, context, true); +else +/* Lock the top pipe while updating plane addrs, since freesync requires +* plane addr update event triggers to be synchronized. +* top_pipe_to_program is expected to never be NULL +*/ + dc->hwss.pipe_control_lock (dc, top_pipe_to_program, true);// Stream updates if (stream_update)
@@ -2659,11 +2659,10 @@ static void commit_planes_for_stream(struct dc *dc,if (dc->hwss.program_front_end_for_ctx) dc->hwss.program_front_end_for_ctx (dc, context); -if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) - dc->hwss.interdependent_update_lock (dc, context, false); -else - dc->hwss.pipe_control_lock (dc, top_pipe_to_program, false); - +if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) + dc->hwss.interdependent_update_lock (dc, context, false); +else + dc->hwss.pipe_control_lock (dc, top_pipe_to_program, false); dc->hwss.post_unlock_program_front_end (dc, context);return ; }
@@ -2764,6 +2763,7 @@ static void commit_planes_for_stream(struct dc *dc, plane_state->flip_immediate); } } +/* Perform requested Updates */ for (i =0 ; i < surface_count; i++) {struct dc_plane_state *plane_state = srf_updates[i].surface;
@@ -2786,12 +2786,13 @@ static void commit_planes_for_stream(struct dc *dc, dc->hwss.update_plane_addr (dc, pipe_ctx); } } + } -if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) - dc->hwss.interdependent_update_lock (dc, context, false); -else - dc->hwss.pipe_control_lock (dc, top_pipe_to_program, false); +if ((update_type !=UPDATE_TYPE_FAST ) && dc->hwss.interdependent_update_lock) + dc->hwss.interdependent_update_lock (dc, context, false); +else + dc->hwss.pipe_control_lock (dc, top_pipe_to_program, false);if ((update_type !=UPDATE_TYPE_FAST ) && stream->update_flags.bits.dsc_changed)if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
@@ -2837,8 +2838,8 @@ static void commit_planes_for_stream(struct dc *dc, pipe_ctx->plane_state->skip_manual_trigger)continue ; -if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger) - pipe_ctx->stream_res.tg->funcs->program_manual_trigger (pipe_ctx->stream_res.tg); +if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger) + pipe_ctx->stream_res.tg->funcs->program_manual_trigger (pipe_ctx->stream_res.tg); } }
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c +4 -4
@@ -795,10 +795,10 @@ bool hubp21_program_surface_flip_and_addr( flip_regs.tmz_surface = address->tmz_surface; flip_regs.immediate = flip_immediate; -if (hubp->ctx->dc->debug.enable_dmcub_surface_flip && address->type ==PLN_ADDR_TYPE_VIDEO_PROGRESSIVE ) -dmcub_PLAT_54186_wa (hubp, &flip_regs); -else -program_surface_flip_and_addr (hubp, &flip_regs); +if (hubp->ctx->dc->debug.enable_dmcub_surface_flip && address->type ==PLN_ADDR_TYPE_VIDEO_PROGRESSIVE ) +dmcub_PLAT_54186_wa (hubp, &flip_regs); +else +program_surface_flip_and_addr (hubp, &flip_regs); hubp->request_address = *address;
drivers/gpu/drm/amd/display/dc/dm_services.h +0 -1
@@ -264,7 +264,6 @@ static inline unsigned long long dm_get_timestamp(struct dc_context *ctx)unsigned long long dm_get_elapse_time_in_ns (struct dc_context *ctx,unsigned long long current_time_stamp,unsigned long long last_time_stamp); -/* * performance tracing */
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -0
@@ -323,6 +323,7 @@ struct dmub_srv_hw_funcs {uint32_t (*get_gpint_response)(struct dmub_srv *dmub); +uint32_t (*get_current_time)(struct dmub_srv *dmub); };/**
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.c +5 -0
@@ -399,3 +399,8 @@ void dmub_dcn20_skip_dmub_panel_power_sequence(struct dmub_srv *dmub, bool skip) boot_options.bits.skip_phy_init_panel_sequence = skip;REG_WRITE (DMCUB_SCRATCH14 , boot_options.all); } + +uint32_t dmub_dcn20_get_current_time (struct dmub_srv *dmub) +{ +return REG_READ (DMCUB_TIMER_CURRENT ); +}
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn20.h +4 -1
@@ -107,7 +107,8 @@ struct dmub_srv; DMUB_SR(MMHUBBUB_SOFT_RESET) \ DMUB_SR(DCN_VM_FB_LOCATION_BASE) \ DMUB_SR(DCN_VM_FB_OFFSET) \ - DMUB_SR(DMCUB_INTERRUPT_ACK) + DMUB_SR(DMCUB_INTERRUPT_ACK) \ + DMUB_SR(DMCUB_TIMER_CURRENT) #define DMUB_COMMON_FIELDS() \ DMUB_SF(DMCUB_CNTL, DMCUB_ENABLE) \
@@ -231,4 +232,6 @@ bool dmub_dcn20_use_cached_inbox(struct dmub_srv *dmub);bool dmub_dcn20_use_cached_trace_buffer (struct dmub_srv *dmub); +uint32_t dmub_dcn20_get_current_time (struct dmub_srv *dmub); +#endif /* _DMUB_DCN20_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +1 -0
@@ -159,6 +159,7 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) funcs->get_fw_status = dmub_dcn20_get_fw_boot_status; funcs->enable_dmub_boot_options = dmub_dcn20_enable_dmub_boot_options; funcs->skip_dmub_panel_power_sequence = dmub_dcn20_skip_dmub_panel_power_sequence; + funcs->get_current_time = dmub_dcn20_get_current_time;// Out mailbox register access functions for RN and above funcs->setup_out_mailbox = dmub_dcn20_setup_out_mailbox;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/20 drm/amd/display: Add documentation for power gate plane
In reply to Stylon WangFrom: Rodrigo Siqueira <[email protected]>
This commit introduces kernel documentation to some essential functions related to power gate control over planes. It also adds a macro to make one part of the code easy to understand.
--- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +36 -2
@@ -72,6 +72,9 @@#define GAMMA_HW_POINTS_NUM 256 +#define PGFSM_POWER_ON 0 +#define PGFSM_POWER_OFF 2 +void print_microsec (struct dc_context *dc_ctx,struct dc_log_buffer_ctx *log_ctx,uint32_t ref_cycle)
@@ -536,13 +539,22 @@ void dcn10_disable_vga(REG_UPDATE (VGA_TEST_CONTROL ,VGA_TEST_RENDER_START ,1 ); } +/** +* dcn10_dpp_pg_control - DPP power gate control. +* +* @hws: dce_hwseq reference. +* @dpp_inst: DPP instance reference. +* @power_on: true if we want to enable power gate, false otherwise. +* +* Enable or disable power gate in the specific DPP instance. +*/ void dcn10_dpp_pg_control (struct dce_hwseq *hws,unsigned int dpp_inst,bool power_on) {uint32_t power_gate = power_on ?0 :1 ; -uint32_t pwr_status = power_on ?0 :2 ; +uint32_t pwr_status = power_on ?PGFSM_POWER_ON :PGFSM_POWER_OFF ;if (hws->ctx->dc->debug.disable_dpp_power_gate)return ;
@@ -588,13 +600,22 @@ void dcn10_dpp_pg_control( } } +/** +* dcn10_hubp_pg_control - HUBP power gate control. +* +* @hws: dce_hwseq reference. +* @hubp_inst: DPP instance reference. +* @power_on: true if we want to enable power gate, false otherwise. +* +* Enable or disable power gate in the specific HUBP instance. +*/ void dcn10_hubp_pg_control (struct dce_hwseq *hws,unsigned int hubp_inst,bool power_on) {uint32_t power_gate = power_on ?0 :1 ; -uint32_t pwr_status = power_on ?0 :2 ; +uint32_t pwr_status = power_on ?PGFSM_POWER_ON :PGFSM_POWER_OFF ;if (hws->ctx->dc->debug.disable_hubp_power_gate)return ;
@@ -1078,6 +1099,19 @@ void dcn10_plane_atomic_disconnect(struct dc *dc, struct pipe_ctx *pipe_ctx) hws->funcs.verify_allow_pstate_change_high (dc); } +/** +* dcn10_plane_atomic_power_down - Power down plane components. +* +* @dc: dc struct reference. used for grab hwseq. +* @dpp: dpp struct reference. +* @hubp: hubp struct reference. +* +* Keep in mind that this operation requires a power gate configuration; +* however, requests for switch power gate are precisely controlled to avoid +* problems. For this reason, power gate request is usually disabled. This +* function first needs to enable the power gate request before disabling DPP +* and HUBP. Finally, it disables the power gate request again. +*/ void dcn10_plane_atomic_power_down (struct dc *dc,struct dpp *dpp,struct hubp *hubp)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/20 drm/amd/display: Remove legacy comments
In reply to Stylon WangFrom: Rodrigo Siqueira <[email protected]>
To improve the code readability, this commit removes a set of commented and not used functions for a long time. Notice that now we have the amdgpu_dm_dtn_log, which prints all the relevant information that we need.
--- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 160 ------------------ 1 file changed, 160 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -160
@@ -2199,129 +2199,6 @@ void dcn10_enable_per_frame_crtc_position_reset(DC_SYNC_INFO ("Multi-display sync is complete\n" ); } -/*static void print_rq_dlg_ttu( -struct dc *dc, -struct pipe_ctx *pipe_ctx) -{ -DC_LOG_BANDWIDTH_CALCS(dc->ctx->logger, -"\n============== DML TTU Output parameters [%d] ==============\n" -"qos_level_low_wm: %d, \n" -"qos_level_high_wm: %d, \n" -"min_ttu_vblank: %d, \n" -"qos_level_flip: %d, \n" -"refcyc_per_req_delivery_l: %d, \n" -"qos_level_fixed_l: %d, \n" -"qos_ramp_disable_l: %d, \n" -"refcyc_per_req_delivery_pre_l: %d, \n" -"refcyc_per_req_delivery_c: %d, \n" -"qos_level_fixed_c: %d, \n" -"qos_ramp_disable_c: %d, \n" -"refcyc_per_req_delivery_pre_c: %d\n" -"=============================================================\n", -pipe_ctx->pipe_idx, -pipe_ctx->ttu_regs.qos_level_low_wm, -pipe_ctx->ttu_regs.qos_level_high_wm, -pipe_ctx->ttu_regs.min_ttu_vblank, -pipe_ctx->ttu_regs.qos_level_flip, -pipe_ctx->ttu_regs.refcyc_per_req_delivery_l, -pipe_ctx->ttu_regs.qos_level_fixed_l, -pipe_ctx->ttu_regs.qos_ramp_disable_l, -pipe_ctx->ttu_regs.refcyc_per_req_delivery_pre_l, -pipe_ctx->ttu_regs.refcyc_per_req_delivery_c, -pipe_ctx->ttu_regs.qos_level_fixed_c, -pipe_ctx->ttu_regs.qos_ramp_disable_c, -pipe_ctx->ttu_regs.refcyc_per_req_delivery_pre_c -); - -DC_LOG_BANDWIDTH_CALCS(dc->ctx->logger, -"\n============== DML DLG Output parameters [%d] ==============\n" -"refcyc_h_blank_end: %d, \n" -"dlg_vblank_end: %d, \n" -"min_dst_y_next_start: %d, \n" -"refcyc_per_htotal: %d, \n" -"refcyc_x_after_scaler: %d, \n" -"dst_y_after_scaler: %d, \n" -"dst_y_prefetch: %d, \n" -"dst_y_per_vm_vblank: %d, \n" -"dst_y_per_row_vblank: %d, \n" -"ref_freq_to_pix_freq: %d, \n" -"vratio_prefetch: %d, \n" -"refcyc_per_pte_group_vblank_l: %d, \n" -"refcyc_per_meta_chunk_vblank_l: %d, \n" -"dst_y_per_pte_row_nom_l: %d, \n" -"refcyc_per_pte_group_nom_l: %d, \n", -pipe_ctx->pipe_idx, -pipe_ctx->dlg_regs.refcyc_h_blank_end, -pipe_ctx->dlg_regs.dlg_vblank_end, -pipe_ctx->dlg_regs.min_dst_y_next_start, -pipe_ctx->dlg_regs.refcyc_per_htotal, -pipe_ctx->dlg_regs.refcyc_x_after_scaler, -pipe_ctx->dlg_regs.dst_y_after_scaler, -pipe_ctx->dlg_regs.dst_y_prefetch, -pipe_ctx->dlg_regs.dst_y_per_vm_vblank, -pipe_ctx->dlg_regs.dst_y_per_row_vblank, -pipe_ctx->dlg_regs.ref_freq_to_pix_freq, -pipe_ctx->dlg_regs.vratio_prefetch, -pipe_ctx->dlg_regs.refcyc_per_pte_group_vblank_l, -pipe_ctx->dlg_regs.refcyc_per_meta_chunk_vblank_l, -pipe_ctx->dlg_regs.dst_y_per_pte_row_nom_l, -pipe_ctx->dlg_regs.refcyc_per_pte_group_nom_l -); - -DC_LOG_BANDWIDTH_CALCS(dc->ctx->logger, -"\ndst_y_per_meta_row_nom_l: %d, \n" -"refcyc_per_meta_chunk_nom_l: %d, \n" -"refcyc_per_line_delivery_pre_l: %d, \n" -"refcyc_per_line_delivery_l: %d, \n" -"vratio_prefetch_c: %d, \n" -"refcyc_per_pte_group_vblank_c: %d, \n" -"refcyc_per_meta_chunk_vblank_c: %d, \n" -"dst_y_per_pte_row_nom_c: %d, \n" -"refcyc_per_pte_group_nom_c: %d, \n" -"dst_y_per_meta_row_nom_c: %d, \n" -"refcyc_per_meta_chunk_nom_c: %d, \n" -"refcyc_per_line_delivery_pre_c: %d, \n" -"refcyc_per_line_delivery_c: %d \n" -"========================================================\n", -pipe_ctx->dlg_regs.dst_y_per_meta_row_nom_l, -pipe_ctx->dlg_regs.refcyc_per_meta_chunk_nom_l, -pipe_ctx->dlg_regs.refcyc_per_line_delivery_pre_l, -pipe_ctx->dlg_regs.refcyc_per_line_delivery_l, -pipe_ctx->dlg_regs.vratio_prefetch_c, -pipe_ctx->dlg_regs.refcyc_per_pte_group_vblank_c, -pipe_ctx->dlg_regs.refcyc_per_meta_chunk_vblank_c, -pipe_ctx->dlg_regs.dst_y_per_pte_row_nom_c, -pipe_ctx->dlg_regs.refcyc_per_pte_group_nom_c, -pipe_ctx->dlg_regs.dst_y_per_meta_row_nom_c, -pipe_ctx->dlg_regs.refcyc_per_meta_chunk_nom_c, -pipe_ctx->dlg_regs.refcyc_per_line_delivery_pre_c, -pipe_ctx->dlg_regs.refcyc_per_line_delivery_c -); - -DC_LOG_BANDWIDTH_CALCS(dc->ctx->logger, -"\n============== DML RQ Output parameters [%d] ==============\n" -"chunk_size: %d \n" -"min_chunk_size: %d \n" -"meta_chunk_size: %d \n" -"min_meta_chunk_size: %d \n" -"dpte_group_size: %d \n" -"mpte_group_size: %d \n" -"swath_height: %d \n" -"pte_row_height_linear: %d \n" -"========================================================\n", -pipe_ctx->pipe_idx, -pipe_ctx->rq_regs.rq_regs_l.chunk_size, -pipe_ctx->rq_regs.rq_regs_l.min_chunk_size, -pipe_ctx->rq_regs.rq_regs_l.meta_chunk_size, -pipe_ctx->rq_regs.rq_regs_l.min_meta_chunk_size, -pipe_ctx->rq_regs.rq_regs_l.dpte_group_size, -pipe_ctx->rq_regs.rq_regs_l.mpte_group_size, -pipe_ctx->rq_regs.rq_regs_l.swath_height, -pipe_ctx->rq_regs.rq_regs_l.pte_row_height_linear -); -} -*/ -static void mmhub_read_vm_system_aperture_settings (struct dcn10_hubp *hubp1,struct vm_system_aperture_param *apt,struct dce_hwseq *hws)
@@ -2429,43 +2306,6 @@ static void dcn10_enable_plane( pipe_ctx->stream_res.opp, true); -/* TODO: enable/disable in dm as per update type. -if (plane_state) { -DC_LOG_DC(dc->ctx->logger, -"Pipe:%d 0x%x: addr hi:0x%x, " -"addr low:0x%x, " -"src: %d, %d, %d," -" %d; dst: %d, %d, %d, %d;\n", -pipe_ctx->pipe_idx, -plane_state, -plane_state->address.grph.addr.high_part, -plane_state->address.grph.addr.low_part, -plane_state->src_rect.x, -plane_state->src_rect.y, -plane_state->src_rect.width, -plane_state->src_rect.height, -plane_state->dst_rect.x, -plane_state->dst_rect.y, -plane_state->dst_rect.width, -plane_state->dst_rect.height); - -DC_LOG_DC(dc->ctx->logger, -"Pipe %d: width, height, x, y format:%d\n" -"viewport:%d, %d, %d, %d\n" -"recout: %d, %d, %d, %d\n", -pipe_ctx->pipe_idx, -plane_state->format, -pipe_ctx->plane_res.scl_data.viewport.width, -pipe_ctx->plane_res.scl_data.viewport.height, -pipe_ctx->plane_res.scl_data.viewport.x, -pipe_ctx->plane_res.scl_data.viewport.y, -pipe_ctx->plane_res.scl_data.recout.width, -pipe_ctx->plane_res.scl_data.recout.height, -pipe_ctx->plane_res.scl_data.recout.x, -pipe_ctx->plane_res.scl_data.recout.y); -print_rq_dlg_ttu(dc, pipe_ctx); -} -*/ if (dc->config.gpu_vm_support)dcn10_program_pte_vm (hws, pipe_ctx->plane_res.hubp);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/20 drm/amd/display: Add kernel-doc to some hubp functions
In reply to Stylon WangFrom: Rodrigo Siqueira <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +13 -0
@@ -1226,6 +1226,14 @@ void hubp1_cursor_set_position(/* TODO Handle surface pixel formats other than 4:4:4 */ } +/** +* hubp1_clk_cntl - Disable or enable clocks for DCHUBP +* +* @hubp: hubp struct reference. +* @enable: Set true for enabling gate clock. +* +* When enabling/disabling DCHUBP clock, we affect dcfclk/dppclk. +*/ void hubp1_clk_cntl (struct hubp *hubp,bool enable) {struct dcn10_hubp *hubp1 =TO_DCN10_HUBP (hubp);
@@ -1257,6 +1265,11 @@ void hubp1_soft_reset(struct hubp *hubp, bool reset)REG_UPDATE (DCHUBP_CNTL ,HUBP_DISABLE , reset ?1 :0 ); } +/** +* hubp1_set_flip_int - Enable surface flip interrupt +* +* @hubp: hubp struct reference. +*/ void hubp1_set_flip_int (struct hubp *hubp) {struct dcn10_hubp *hubp1 =TO_DCN10_HUBP (hubp);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/20 drm/amd/display: Document set RECOUT operation
In reply to Stylon WangFrom: Rodrigo Siqueira <[email protected]>
During the investigation on how to add visual confirmation on top of the planes used by DCN, it becomes evident that the lack of information in the code makes this work unnecessarily complicated. This commit introduces a set of documentation related to the RECOUT operation in order to make it easy for developers to navigate this set of functions.
--- .../drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 49 +++++++++++++------ drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 6 +++ 2 files changed, 39 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +33 -16
@@ -653,33 +653,50 @@ static void dpp1_dscl_set_manual_ratio_init( } } - - -static void dpp1_dscl_set_recout ( -struct dcn10_dpp *dpp,const struct rect *recout) +/** +* dpp1_dscl_set_recout - Set the first pixel of RECOUT in the OTG active area +* +* @dpp: DPP data struct +* @recount: Rectangle information +* +* This function sets the MPC RECOUT_START and RECOUT_SIZE registers based on +* the values specified in the recount parameter. +* +* Note: This function only have effect if AutoCal is disabled. +*/ +static void dpp1_dscl_set_recout (struct dcn10_dpp *dpp, +const struct rect *recout) {int visual_confirm_on =0 ;if (dpp->base.ctx->dc->debug.visual_confirm !=VISUAL_CONFIRM_DISABLE ) visual_confirm_on =1 ;REG_SET_2 (RECOUT_START ,0 , -/* First pixel of RECOUT */ -RECOUT_START_X , recout->x, -/* First line of RECOUT */ -RECOUT_START_Y , recout->y); +/* First pixel of RECOUT in the active OTG area */ +RECOUT_START_X , recout->x, +/* First line of RECOUT in the active OTG area */ +RECOUT_START_Y , recout->y);REG_SET_2 (RECOUT_SIZE ,0 , -/* Number of RECOUT horizontal pixels */ -RECOUT_WIDTH , recout->width, -/* Number of RECOUT vertical lines */ -RECOUT_HEIGHT , recout->height +/* Number of RECOUT horizontal pixels */ +RECOUT_WIDTH , recout->width, +/* Number of RECOUT vertical lines */ +RECOUT_HEIGHT , recout->height - visual_confirm_on *2 * (dpp->base.inst +1 )); } -/* Main function to program scaler and line buffer in manual scaling mode */ -void dpp1_dscl_set_scaler_manual_scale ( -struct dpp *dpp_base, -const struct scaler_data *scl_data) +/** +* dpp1_dscl_set_scaler_manual_scale - Manually program scaler and line buffer +* +* @dpp_base: High level DPP struct +* @scl_data: scalaer_data info +* +* This is the primary function to program scaler and line buffer in manual +* scaling mode. To execute the required operations for manual scale, we need +* to disable AutoCal first. +*/ +void dpp1_dscl_set_scaler_manual_scale (struct dpp *dpp_base, +const struct scaler_data *scl_data) {enum lb_memory_config lb_config;struct dcn10_dpp *dpp =TO_DCN10_DPP (dpp_base);
drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h +6 -0
@@ -32,6 +32,12 @@struct dpp {const struct dpp_funcs *funcs;struct dc_context *ctx; +/** +* @inst: +* +* inst stands for "instance," and it is an id number that references a +* specific DPP. +*/ int inst;struct dpp_caps *caps;struct pwl_params regamma_params;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/20 drm/amd/display: Minor refactor of DP PHY test automation
In reply to Stylon WangFrom: George Shen <[email protected]>
[Why]
Improve readability and maintainability of code.
[How]
Refactor test pattern size calculation out of function call parameter and store value in variable.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +10 -7
@@ -2773,9 +2773,10 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link)union phy_test_pattern dpcd_test_pattern;union lane_adjust dpcd_lane_adjustment[2 ];unsigned char dpcd_post_cursor_2_adjustment =0 ; -unsigned char test_80_bit_pattern[ +unsigned char test_pattern_buffer[ (DP_TEST_80BIT_CUSTOM_PATTERN_79_72 -DP_TEST_80BIT_CUSTOM_PATTERN_7_0 )+1 ] = {0 }; +unsigned int test_pattern_size =0 ;enum dp_test_pattern test_pattern;struct dc_link_training_settings link_settings;union lane_adjust dpcd_lane_adjust;
@@ -2845,12 +2846,15 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link)break ; } -if (test_pattern ==DP_TEST_PATTERN_80BIT_CUSTOM ) +if (test_pattern ==DP_TEST_PATTERN_80BIT_CUSTOM ) { + test_pattern_size = (DP_TEST_80BIT_CUSTOM_PATTERN_79_72 - +DP_TEST_80BIT_CUSTOM_PATTERN_7_0 ) +1 ;core_link_read_dpcd ( link,DP_TEST_80BIT_CUSTOM_PATTERN_7_0 , - test_80_bit_pattern, -sizeof (test_80_bit_pattern)); + test_pattern_buffer, + test_pattern_size); + }/* prepare link training settings */ link_settings.link = link->cur_link_settings;
@@ -2888,9 +2892,8 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link) test_pattern,DP_TEST_PATTERN_COLOR_SPACE_UNDEFINED , &link_training_settings, - test_80_bit_pattern, - (DP_TEST_80BIT_CUSTOM_PATTERN_79_72 - - DP_TEST_80BIT_CUSTOM_PATTERN_7_0)+1); + test_pattern_buffer, + test_pattern_size); }static void dp_test_send_link_test_pattern (struct dc_link *link)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/20 drm/amd/display: Disconnect non-DP with no EDID
In reply to Stylon WangFrom: Chris Park <[email protected]>
[Why]
Active DP dongles return no EDID when dongle
is connected, but VGA display is taken out.
Current driver behavior does not remove the
active display when this happens, and this is
a gap between dongle DTP and dongle behavior.
[How]
For active DP dongles and non-DP scenario,
disconnect sink on detection when no EDID
is read due to timeout.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +18 -0
@@ -1099,6 +1099,24 @@ static bool dc_link_detect_helper(struct dc_link *link, dc_is_dvi_signal(link->connector_signal)) {if (prev_sink)dc_sink_release (prev_sink); +link_disconnect_sink (link); + +return false; + } +/* +* Abort detection for DP connectors if we have +* no EDID and connector is active converter +* as there are no display downstream +* +*/ +if (dc_is_dp_sst_signal (link->connector_signal) && + (link->dpcd_caps.dongle_type == +DISPLAY_DONGLE_DP_VGA_CONVERTER || + link->dpcd_caps.dongle_type == +DISPLAY_DONGLE_DP_DVI_CONVERTER )) { +if (prev_sink) +dc_sink_release (prev_sink); +link_disconnect_sink (link);return false; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/20 drm/amd/display: determine dp link encoding format from link settings
In reply to Stylon WangFrom: Wenjing Liu <[email protected]>
[how]
Implement a function that determines link encoding format based on the link settings passed in.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 5 +++++ drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 1 + 3 files changed, 13 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +7 -0
@@ -4870,4 +4870,11 @@ bool is_edp_ilr_optimization_required(struct dc_link *link, struct dc_crtc_timinreturn false; } +enum dp_link_encoding dp_get_link_encoding_format (const struct dc_link_settings *link_settings) +{ +if ((link_settings->link_rate >=LINK_RATE_LOW ) && + (link_settings->link_rate <=LINK_RATE_HIGH3 )) +return DP_8b_10b_ENCODING; +return DP_UNKNOWN_ENCODING ; +}
drivers/gpu/drm/amd/display/dc/dc_dp_types.h +5 -0
@@ -98,6 +98,11 @@ enum dc_dp_training_pattern { DP_TRAINING_PATTERN_VIDEOIDLE, }; +enum dp_link_encoding { +DP_UNKNOWN_ENCODING =0 , + DP_8b_10b_ENCODING =1 , +}; +struct dc_link_settings {enum dc_lane_count lane_count;enum dc_link_rate link_rate;
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +1 -0
@@ -105,4 +105,5 @@ enum link_training_result dp_check_link_loss_status(struct dc_link *link, const struct link_training_settings *link_training_setting); +enum dp_link_encoding dp_get_link_encoding_format (const struct dc_link_settings *link_settings);#endif /* __DC_LINK_DP_H__ */
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/20 drm/amd/display: decide link training settings based on channel coding
In reply to Stylon WangFrom: Wenjing Liu <[email protected]>
[how]
Rename initialize_training_settings to decide_training_settings. Call get link encoding format and decide training settings based on current channel coding.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +15 -4
@@ -1231,7 +1231,7 @@ enum link_training_result dp_check_link_loss_status(return status; } -static void initialize_training_settings( +static inline void decide_8b_10b_training_settings( struct dc_link *link, const struct dc_link_settings *link_setting, const struct dc_link_training_overrides *overrides,
@@ -1327,6 +1327,17 @@ static void initialize_training_settings( lt_settings->enhanced_framing =1 ; } +static void decide_training_settings ( +struct dc_link *link, +const struct dc_link_settings *link_settings, +const struct dc_link_training_overrides *overrides, +struct link_training_settings *lt_settings) +{ +if (dp_get_link_encoding_format (link_settings) == DP_8b_10b_ENCODING) +decide_8b_10b_training_settings (link, link_settings, overrides, lt_settings); +} + +uint8_t dp_convert_to_count (uint8_t lttpr_repeater_count) {switch (lttpr_repeater_count) {
@@ -1542,7 +1553,7 @@ bool dc_link_dp_perform_link_training_skip_aux( {struct link_training_settings lt_settings; - initialize_training_settings( + decide_training_settings( link, link_setting, &link->preferred_training_settings,
@@ -1592,7 +1603,7 @@ enum link_training_result dc_link_dp_perform_link_training(uint8_t repeater_cnt;uint8_t repeater_id; - initialize_training_settings( + decide_training_settings( link, link_setting, &link->preferred_training_settings,
@@ -1877,7 +1888,7 @@ enum link_training_result dc_link_dp_sync_lt_attempt(enum clock_source_id dp_cs_id =CLOCK_SOURCE_ID_EXTERNAL ;bool fec_enable = false; - initialize_training_settings( + decide_training_settings( link, link_settings, lt_overrides,
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/20 drm/amd/display: rename perform_link_training_int function
In reply to Stylon WangFrom: Wenjing Liu <[email protected]>
[why]
The function's name doesn't represent what it actaully does. The function implements necessary steps for our hardware to transition from link training mode back to video idle mode. Therefore, rename the function as dp_transition_to_video_idle so everyone can understand it.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -2
@@ -1157,7 +1157,7 @@ static enum link_training_result perform_clock_recovery_sequence(return get_cr_failure (lane_count, dpcd_lane_status); } -static inline enum link_training_result perform_link_training_int ( +static inline enum link_training_result dp_transition_to_video_idle (struct dc_link *link,struct link_training_settings *lt_settings,enum link_training_result status)
@@ -1665,7 +1665,7 @@ enum link_training_result dc_link_dp_perform_link_training(/* 3. set training not in progress*/ dpcd_set_training_pattern (link,DP_TRAINING_PATTERN_VIDEOIDLE );if ((status ==LINK_TRAINING_SUCCESS ) || !skip_video_pattern) { - status =perform_link_training_int (link, + status =dp_transition_to_video_idle (link, <_settings, status); }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/20 drm/amd/display: consider channel coding in configure lttpr mode
In reply to Stylon WangFrom: Wenjing Liu <[email protected]>
[why]
Some lttpr configuration steps are exclusive to 8b/10b channel coding mode. We need to take channel conding into account.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 47 ++++++++++++------- .../amd/display/include/link_service_types.h | 1 + 2 files changed, 30 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +29 -18
@@ -1275,6 +1275,8 @@ static inline void decide_8b_10b_training_settings(else lt_settings->link_settings.link_spread =LINK_SPREAD_05_DOWNSPREAD_30KHZ ; + lt_settings->lttpr_mode = link->lttpr_mode; +/* Initialize lane settings overrides */ if (overrides->voltage_swing !=NULL ) lt_settings->voltage_swing = overrides->voltage_swing;
@@ -1367,13 +1369,16 @@ static void configure_lttpr_mode_transparent(struct dc_link *link) {uint8_t repeater_mode =DP_PHY_REPEATER_MODE_TRANSPARENT ; +DC_LOG_HW_LINK_TRAINING ("%s\n Set LTTPR to Transparent Mode\n" , __func__);core_link_write_dpcd (link,DP_PHY_REPEATER_MODE , (uint8_t *)&repeater_mode,sizeof (repeater_mode)); } -static void configure_lttpr_mode_non_transparent (struct dc_link *link) +static void configure_lttpr_mode_non_transparent ( +struct dc_link *link, +const struct link_training_settings *lt_settings) {/* aux timeout is already set to extended */ /* RESET/SET lttpr mode to enable non transparent mode */
@@ -1383,11 +1388,16 @@ static void configure_lttpr_mode_non_transparent(struct dc_link *link)enum dc_status result =DC_ERROR_UNEXPECTED ;uint8_t repeater_mode =DP_PHY_REPEATER_MODE_TRANSPARENT ; -DC_LOG_HW_LINK_TRAINING ("%s\n Set LTTPR to Transparent Mode\n" , __func__); - result =core_link_write_dpcd (link, -DP_PHY_REPEATER_MODE , - (uint8_t *)&repeater_mode, -sizeof (repeater_mode)); +enum dp_link_encoding encoding =dp_get_link_encoding_format (<_settings->link_settings); + +if (encoding == DP_8b_10b_ENCODING) { +DC_LOG_HW_LINK_TRAINING ("%s\n Set LTTPR to Transparent Mode\n" , __func__); + result =core_link_write_dpcd (link, +DP_PHY_REPEATER_MODE , + (uint8_t *)&repeater_mode, +sizeof (repeater_mode)); + + }if (result ==DC_OK ) { link->dpcd_caps.lttpr_caps.mode = repeater_mode;
@@ -1407,17 +1417,18 @@ static void configure_lttpr_mode_non_transparent(struct dc_link *link) link->dpcd_caps.lttpr_caps.mode = repeater_mode; } - repeater_cnt =dp_convert_to_count (link->dpcd_caps.lttpr_caps.phy_repeater_cnt); - -for (repeater_id = repeater_cnt; repeater_id >0 ; repeater_id--) { - aux_interval_address =DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 + - ((DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE ) * (repeater_id -1 )); -core_link_read_dpcd ( - link, - aux_interval_address, - (uint8_t *)&link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ], -sizeof (link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ])); - link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ] &=0x7F ; +if (encoding == DP_8b_10b_ENCODING) { + repeater_cnt =dp_convert_to_count (link->dpcd_caps.lttpr_caps.phy_repeater_cnt); +for (repeater_id = repeater_cnt; repeater_id >0 ; repeater_id--) { + aux_interval_address =DP_TRAINING_AUX_RD_INTERVAL_PHY_REPEATER1 + + ((DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE ) * (repeater_id -1 )); +core_link_read_dpcd ( + link, + aux_interval_address, + (uint8_t *)&link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ], +sizeof (link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ])); + link->dpcd_caps.lttpr_caps.aux_rd_interval[repeater_id -1 ] &=0x7F ; + } } } }
@@ -1611,7 +1622,7 @@ enum link_training_result dc_link_dp_perform_link_training(/* Configure lttpr mode */ if (link->lttpr_mode ==LTTPR_MODE_NON_TRANSPARENT ) -configure_lttpr_mode_non_transparent (link); +configure_lttpr_mode_non_transparent (link, <_settings);else if (link->lttpr_mode ==LTTPR_MODE_TRANSPARENT )configure_lttpr_mode_transparent (link);
drivers/gpu/drm/amd/display/include/link_service_types.h +1 -0
@@ -93,6 +93,7 @@ struct link_training_settings {bool enhanced_framing;bool allow_invalid_msa_timing_param; +enum lttpr_mode lttpr_mode; };/*TODO: Move this enum test harness*/
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/20 drm/amd/display: Refactor suspend/resume of Secure display
In reply to Stylon WangFrom: Wayne Lin <[email protected]>
[Why]
Once set ROI and do suspend/resume, current flow will not enable OTG_CRC_CTL again due to we'll defer crc configuration when stream is enabled.
[How]
Remove current suspend/resume function and have logic implemented into amdgpu_dm_atomic_commit_tail()
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 ++++---- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 61 ------------------- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 4 -- 3 files changed, 15 insertions(+), 77 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +15 -12
@@ -1988,9 +1988,6 @@ static int dm_suspend(void *handle)return ret; } -#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY -amdgpu_dm_crtc_secure_display_suspend (adev); -#endif WARN_ON (adev->dm.cached_state); adev->dm.cached_state =drm_atomic_helper_suspend (adev_to_drm (adev));
@@ -2315,10 +2312,6 @@ static int dm_resume(void *handle) dm->cached_state =NULL ; -#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY -amdgpu_dm_crtc_secure_display_resume (adev); -#endif -amdgpu_dm_irq_resume_late (adev);amdgpu_dm_smu_write_watermarks_table (adev);
@@ -9090,6 +9083,12 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)#ifdef CONFIG_DEBUG_FS bool configure_crc = false;enum amdgpu_dm_pipe_crc_source cur_crc_src; +#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY ) +struct crc_rd_work *crc_rd_wrk = dm->crc_rd_wrk; +#endif +spin_lock_irqsave (&adev_to_drm (adev)->event_lock, flags); + cur_crc_src = acrtc->dm_irq_params.crc_src; +spin_unlock_irqrestore (&adev_to_drm (adev)->event_lock, flags);#endif dm_new_crtc_state =to_dm_crtc_state (new_crtc_state);
@@ -9106,15 +9105,19 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)* settings for the stream. */ dm_new_crtc_state =to_dm_crtc_state (new_crtc_state); -spin_lock_irqsave (&adev_to_drm (adev)->event_lock, flags); - cur_crc_src = acrtc->dm_irq_params.crc_src; -spin_unlock_irqrestore (&adev_to_drm (adev)->event_lock, flags);if (amdgpu_dm_is_valid_crc_source (cur_crc_src)) { configure_crc = true;#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY ) -if (amdgpu_dm_crc_window_is_activated (crtc)) - configure_crc = false; +if (amdgpu_dm_crc_window_is_activated (crtc)) { +spin_lock_irqsave (&adev_to_drm (adev)->event_lock, flags); + acrtc->dm_irq_params.crc_window.update_win = true; + acrtc->dm_irq_params.crc_window.skip_frame_cnt =2 ; +spin_lock_irq (&crc_rd_wrk->crc_rd_work_lock); + crc_rd_wrk->crtc = crtc; +spin_unlock_irq (&crc_rd_wrk->crc_rd_work_lock); +spin_unlock_irqrestore (&adev_to_drm (adev)->event_lock, flags); + }#endif }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +0 -61
67 lines not on this page · raw message
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h +0 -4
@@ -91,14 +91,10 @@ void amdgpu_dm_crtc_handle_crc_irq(struct drm_crtc *crtc);bool amdgpu_dm_crc_window_is_activated (struct drm_crtc *crtc);void amdgpu_dm_crtc_handle_crc_window_irq (struct drm_crtc *crtc);struct crc_rd_work *amdgpu_dm_crtc_secure_display_create_work (void ); -void amdgpu_dm_crtc_secure_display_resume (struct amdgpu_device *adev); -void amdgpu_dm_crtc_secure_display_suspend (struct amdgpu_device *adev);#else #define amdgpu_dm_crc_window_is_activated (x)#define amdgpu_dm_crtc_handle_crc_window_irq (x)#define amdgpu_dm_crtc_secure_display_create_work () -#define amdgpu_dm_crtc_secure_display_resume (x) -#define amdgpu_dm_crtc_secure_display_suspend (x)#endif #endif /* AMD_DAL_DEV_AMDGPU_DM_AMDGPU_DM_CRC_H_ */
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/20 drm/amd/display: Add Overflow check to skip MALL
In reply to Stylon WangFrom: Bhawanpreet Lakha <[email protected]>
[Why]
In some small modes (<200pixels) the stutter period is really big and will cause overflow. In these cases we shouldnt try to enable MALL as it will exceeds range of hysteresis timer (this can be seen in some IGT tests where the plane size is small)
[How]
Compare the stutter_period with the frame time and if we will overflow there is no point in trying to enable MALL (and see the ASSERT) so we early exist in this case
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +9 -0
@@ -813,6 +813,15 @@ bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable) (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), denom) - 64LL; +/* In some cases the stutter period is really big (tiny modes) in these +* cases MALL cant be enabled, So skip these cases to avoid a ASSERT() +* +* We can check if stutter_period is more than 1/10th the frame time to +* consider if we can actually meet the range of hysteresis timer +*/ +if (stutter_period >100000 /refresh_hz) +return false; +/* scale should be increased until it fits into 6 bits */ while (tmr_delay & ~0x3F ) { tmr_scale++;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/20 drm/amd/display: Correct DPCD revision for eDP v1.4
In reply to Stylon WangFrom: Zhan Liu <[email protected]>
[Why]
eDP version and DPCD revision are different. Per VESA spec, "The DPCD revision for eDP v1.4 is 13h".
SUPPORTED_LINK_RATES is valid since eDP v1.4 (DPCD_REV_13).
[How]
Correct DPCD_REV for eDP v1.4.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +10 -2
@@ -2595,7 +2595,11 @@ bool decide_edp_link_settings(struct dc_link *link, struct dc_link_settings *linstruct dc_link_settings current_link_setting;uint32_t link_bw; -if (link->dpcd_caps.dpcd_rev.raw <DPCD_REV_14 || +/* +* edp_supported_link_rates_count is only valid for eDP v1.4 or higher. +* Per VESA eDP spec, "The DPCD revision for eDP v1.4 is 13h" +*/ +if (link->dpcd_caps.dpcd_rev.raw <DPCD_REV_13 || link->dpcd_caps.edp_supported_link_rates_count ==0 ) { *link_setting = link->verified_link_cap;return true;
@@ -4018,7 +4022,11 @@ void detect_edp_sink_caps(struct dc_link *link) link->dpcd_caps.edp_supported_link_rates_count =0 ;memset (supported_link_rates,0 ,sizeof (supported_link_rates)); -if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_14 && +/* +* edp_supported_link_rates_count is only valid for eDP v1.4 or higher. +* Per VESA eDP spec, "The DPCD revision for eDP v1.4 is 13h" +*/ +if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_13 && (link->dc->debug.optimize_edp_link_rate || link->reported_link_cap.link_rate ==LINK_RATE_UNKNOWN )) {// Read DPCD 00010h - 0001Fh 16 bytes at one shot
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/20 drm/amd/display: Avoid get/put vblank when stream disabled
In reply to Stylon WangFrom: Wayne Lin <[email protected]>
[Why]amdgpu_dm_crtc_set_crc_source() will call amdgpu_dm_crtc_configure_crc_source() to enable/disable CRC generation. However, configuration will be deferred to stream enabled. If stream is not enabled, current flow will still try to get/put vblank refcount.
[How]
Return EINVAL to skip actions on vblank refcount when stream is not enabled.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -2
@@ -9122,8 +9122,9 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) }if (configure_crc) -amdgpu_dm_crtc_configure_crc_source ( - crtc, dm_new_crtc_state, cur_crc_src); +if (amdgpu_dm_crtc_configure_crc_source ( + crtc, dm_new_crtc_state, cur_crc_src)) +DRM_DEBUG_DRIVER ("Failed to configure crc source" );#endif } }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c +1 -1
@@ -176,7 +176,7 @@ int amdgpu_dm_crtc_configure_crc_source(struct drm_crtc *crtc,/* Configuration will be deferred to stream enable. */ if (!stream_state) -return 0 ; +return -EINVAL ;mutex_lock (&adev->dm.dc_lock);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/20 drm/amd/display: Use the correct max downscaling value for DCN3.x family
In reply to Stylon WangFrom: Nikola Cornij <[email protected]>
[why]
As per spec, DCN3.x can do 6:1 downscaling and DCN2.x can do 4:1. The max downscaling limit value for DCN2.x is 250, which means it's calculated as 1000 / 4 = 250. For DCN3.x this then gives 1000 / 6 = 167.
[how]
Set maximum downscaling limit to 167 for DCN3.x
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c | 7 ++++--- drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +4 -3
@@ -826,10 +826,11 @@ static const struct dc_plane_cap plane_cap = { .fp16 = 16000 }, +/* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 = 600 + .argb8888 = 167, + .nv12 = 167, + .fp16 =167 } };
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +4 -3
@@ -843,10 +843,11 @@ static const struct dc_plane_cap plane_cap = { .fp16 = 16000 }, +/* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 =600 + .argb8888 = 167, + .nv12 = 167, + .fp16 =167 },64 ,64
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c +4 -3
@@ -284,10 +284,11 @@ static const struct dc_plane_cap plane_cap = { .nv12 = 16000, .fp16 =16000 }, +/* 6:1 downscaling ratio: 1000/6 = 166.666 */ .max_downscale_factor = { - .argb8888 = 600, - .nv12 = 600, - .fp16 =600 + .argb8888 = 167, + .nv12 = 167, + .fp16 =167 },16 ,16
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/20 drm/amd/display: Refactor and add visual confirm for HW Flip Queue
In reply to Stylon WangFrom: Wyatt Wood <[email protected]>
[Why]
Visual confirm will indicate if driver is programming the surface address.
Refactor is required because much of the visual confirm logic is buried deep in the mpcc files.
In addition, visual confirm is not updated during fast updates.
[How]
In order to have visual confirm for driver flips, visual confirm needs to be updated on every frame, including fast updates. Add a new hw sequencer interface update_visual_confirm_color, and a new mpc function pointer set_bg_color.
--- .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 31 ++++++++++++------- .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 6 ++++ .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 5 +++ .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 28 +++++++++++------ .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 5 +++ .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 2 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +- .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 3 ++ .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 +++ 14 files changed, 68 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +19 -12
@@ -2502,6 +2502,23 @@ static void dcn10_update_dpp(struct dpp *dpp, struct dc_plane_state *plane_state dpp->funcs->dpp_program_bias_and_scale (dpp, &bns_params); } +void dcn10_update_visual_confirm_color (struct dc *dc,struct pipe_ctx *pipe_ctx,struct tg_color *color,int mpcc_id) +{ +struct dce_hwseq *hws = dc->hwseq; +struct mpc *mpc = dc->res_pool->mpc; + +if (dc->debug.visual_confirm ==VISUAL_CONFIRM_HDR ) + hws->funcs.get_hdr_visual_confirm_color (pipe_ctx, color); +else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_SURFACE ) + hws->funcs.get_surface_visual_confirm_color (pipe_ctx, color); +else +color_space_to_black_color ( + dc, pipe_ctx->stream->output_color_space, color); + +if (mpc->funcs->set_bg_color) + mpc->funcs->set_bg_color (mpc, color, mpcc_id); +} +void dcn10_update_mpcc (struct dc *dc,struct pipe_ctx *pipe_ctx) {struct dce_hwseq *hws = dc->hwseq;
@@ -2513,18 +2530,6 @@ void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)struct mpc *mpc = dc->res_pool->mpc;struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params); -if (dc->debug.visual_confirm ==VISUAL_CONFIRM_HDR ) { - hws->funcs.get_hdr_visual_confirm_color ( - pipe_ctx, &blnd_cfg.black_color); - }else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_SURFACE ) { - hws->funcs.get_surface_visual_confirm_color ( - pipe_ctx, &blnd_cfg.black_color); - }else { -color_space_to_black_color ( - dc, pipe_ctx->stream->output_color_space, - &blnd_cfg.black_color); - } -if (per_pixel_alpha) blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ;else
@@ -2556,6 +2561,8 @@ void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)*/ mpcc_id = hubp->inst; + dc->hwss.update_visual_confirm_color (dc, pipe_ctx, &blnd_cfg.black_color, mpcc_id); +/* If there is no full update, don't need to touch MPC tree*/ if (!pipe_ctx->plane_state->update_flags.bits.full_update) { mpc->funcs->update_blending (mpc, &blnd_cfg, mpcc_id);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +6 -0
@@ -206,4 +206,10 @@ void dcn10_verify_allow_pstate_change_high(struct dc *dc);void dcn10_get_dcc_en_bits (struct dc *dc,int *dcc_en_bits); +void dcn10_update_visual_confirm_color ( +struct dc *dc, +struct pipe_ctx *pipe_ctx, +struct tg_color *color, +int mpcc_id); +#endif /* __DC_HWSS_DCN10_H__ */
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c +1 -0
@@ -82,6 +82,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = { .set_abm_immediate_disable = dce110_set_abm_immediate_disable, .set_pipe = dce110_set_pipe, .get_dcc_en_bits = dcn10_get_dcc_en_bits, + .update_visual_confirm_color = dcn10_update_visual_confirm_color, };static const struct hwseq_private_funcs dcn10_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +5 -0
@@ -64,6 +64,8 @@ void mpc1_set_bg_color(struct mpc *mpc, MPCC_BG_G_Y, bg_g_y);REG_SET (MPCC_BG_B_CB [bottommost_mpcc->mpcc_id],0 ,MPCC_BG_B_CB , bg_b_cb); + + bottommost_mpcc->blnd_cfg.black_color = *bg_color; } static void mpc1_update_blending(
@@ -246,6 +248,8 @@ struct mpcc *mpc1_insert_plane( } } + mpc->funcs->set_bg_color (mpc, &blnd_cfg->black_color, mpcc_id); +/* update the blending configuration */ mpc->funcs->update_blending (mpc, blnd_cfg, mpcc_id);
@@ -495,6 +499,7 @@ static const struct mpc_funcs dcn10_mpc_funcs = { .set_output_csc = NULL, .set_output_gamma = NULL, .get_mpc_out_mux = mpc1_get_mpc_out_mux, + .set_bg_color = mpc1_set_bg_color, }; void dcn10_mpc_construct(struct dcn10_mpc *mpc10,
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19 -9
@@ -2267,6 +2267,23 @@ void dcn20_get_mpctree_visual_confirm_color( *color = pipe_colors[top_pipe->pipe_idx]; } +void dcn20_update_visual_confirm_color (struct dc *dc,struct pipe_ctx *pipe_ctx,struct tg_color *color,int mpcc_id) +{ +struct dce_hwseq *hws = dc->hwseq; +struct mpc *mpc = dc->res_pool->mpc; + +/* input to MPCC is always RGB, by default leave black_color at 0 */ +if (dc->debug.visual_confirm ==VISUAL_CONFIRM_HDR ) + hws->funcs.get_hdr_visual_confirm_color (pipe_ctx, color); +else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_SURFACE ) + hws->funcs.get_surface_visual_confirm_color (pipe_ctx, color); +else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_MPCTREE ) +dcn20_get_mpctree_visual_confirm_color (pipe_ctx, color); + +if (mpc->funcs->set_bg_color) + mpc->funcs->set_bg_color (mpc, color, mpcc_id); +} +void dcn20_update_mpcc (struct dc *dc,struct pipe_ctx *pipe_ctx) {struct dce_hwseq *hws = dc->hwseq;
@@ -2278,15 +2295,6 @@ void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)struct mpc *mpc = dc->res_pool->mpc;struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params); -// input to MPCC is always RGB, by default leave black_color at 0 -if (dc->debug.visual_confirm ==VISUAL_CONFIRM_HDR ) { - hws->funcs.get_hdr_visual_confirm_color (pipe_ctx, &blnd_cfg.black_color); - }else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_SURFACE ) { - hws->funcs.get_surface_visual_confirm_color (pipe_ctx, &blnd_cfg.black_color); - }else if (dc->debug.visual_confirm ==VISUAL_CONFIRM_MPCTREE ) { -dcn20_get_mpctree_visual_confirm_color (pipe_ctx, &blnd_cfg.black_color); - } -if (per_pixel_alpha) blnd_cfg.alpha_mode =MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA ;else
@@ -2320,6 +2328,8 @@ void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)*/ mpcc_id = hubp->inst; + dc->hwss.update_visual_confirm_color (dc, pipe_ctx, &blnd_cfg.black_color, mpcc_id); +/* If there is no full update, don't need to touch MPC tree*/ if (!pipe_ctx->plane_state->update_flags.bits.full_update && !pipe_ctx->update_flags.bits.mpcc) {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h +5 -0
@@ -146,5 +146,10 @@ void dcn20_set_disp_pattern_generator(const struct dc *dc,const struct tg_color *solid_color, int width, int height, int offset); +void dcn20_update_visual_confirm_color (struct dc *dc, +struct pipe_ctx *pipe_ctx, +struct tg_color *color, +int mpcc_id); +#endif /* __DC_HWSS_DCN20_H__ */
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +1 -0
@@ -96,6 +96,7 @@ static const struct hw_sequencer_funcs dcn20_funcs = {#endif .set_disp_pattern_generator = dcn20_set_disp_pattern_generator, .get_dcc_en_bits = dcn10_get_dcc_en_bits, + .update_visual_confirm_color = dcn20_update_visual_confirm_color, };static const struct hwseq_private_funcs dcn20_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c +1 -1
@@ -67,7 +67,6 @@ void mpc2_update_blending(REG_SET (MPCC_BOT_GAIN_INSIDE [mpcc_id],0 ,MPCC_BOT_GAIN_INSIDE , blnd_cfg->bottom_inside_gain);REG_SET (MPCC_BOT_GAIN_OUTSIDE [mpcc_id],0 ,MPCC_BOT_GAIN_OUTSIDE , blnd_cfg->bottom_outside_gain); -mpc1_set_bg_color (mpc, &blnd_cfg->black_color, mpcc_id); mpcc->blnd_cfg = *blnd_cfg; }
@@ -557,6 +556,7 @@ const struct mpc_funcs dcn20_mpc_funcs = { .set_output_gamma = mpc2_set_output_gamma, .power_on_mpc_mem_pwr = mpc20_power_on_ogam_lut, .get_mpc_out_mux = mpc1_get_mpc_out_mux, + .set_bg_color = mpc1_set_bg_color, }; void dcn20_mpc_construct(struct dcn20_mpc *mpc20,
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +1 -0
@@ -100,6 +100,7 @@ static const struct hw_sequencer_funcs dcn21_funcs = { .is_abm_supported = dcn21_is_abm_supported, .set_disp_pattern_generator = dcn20_set_disp_pattern_generator, .get_dcc_en_bits = dcn10_get_dcc_en_bits, + .update_visual_confirm_color = dcn20_update_visual_confirm_color, };static const struct hwseq_private_funcs dcn21_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +1 -0
@@ -99,6 +99,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = { .set_pipe = dcn21_set_pipe, .set_disp_pattern_generator = dcn30_set_disp_pattern_generator, .get_dcc_en_bits = dcn10_get_dcc_en_bits, + .update_visual_confirm_color = dcn20_update_visual_confirm_color, };static const struct hwseq_private_funcs dcn30_private_funcs = {
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c +1 -1
@@ -1431,7 +1431,7 @@ const struct mpc_funcs dcn30_mpc_funcs = { .release_rmu = mpcc3_release_rmu, .power_on_mpc_mem_pwr = mpc3_power_on_ogam_lut, .get_mpc_out_mux = mpc1_get_mpc_out_mux, - + .set_bg_color = mpc1_set_bg_color, }; void dcn30_mpc_construct(struct dcn30_mpc *mpc30,
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c +1 -0
@@ -101,6 +101,7 @@ static const struct hw_sequencer_funcs dcn301_funcs = { .get_dcc_en_bits = dcn10_get_dcc_en_bits, .optimize_pwr_state = dcn21_optimize_pwr_state, .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state, + .update_visual_confirm_color = dcn20_update_visual_confirm_color, };static const struct hwseq_private_funcs dcn301_private_funcs = {
drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +3 -0
@@ -363,6 +363,9 @@ struct mpc_funcs {struct mpc *mpc, int opp_id); +void (*set_bg_color)(struct mpc *mpc, +struct tg_color *bg_color, + int mpcc_id); };#endif
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +4 -0
@@ -235,6 +235,10 @@ struct hw_sequencer_funcs {enum dc_color_depth color_depth, const struct tg_color *solid_color, int width, int height, int offset); +void (*update_visual_confirm_color)(struct dc *dc, +struct pipe_ctx *pipe_ctx, +struct tg_color *color, +int mpcc_id); }; void color_space_to_black_color(
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/20 drm/amd/display: [FW Promotion] Release 0.0.66
In reply to Stylon WangFrom: Anthony Koo <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -2
@@ -47,10 +47,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x2cab49dfb +#define DMUB_FW_VERSION_GIT_HASH 0x992f4893d#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 65 +#define DMUB_FW_VERSION_REVISION 66#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/20 drm/amd/display: 3.2.136
In reply to Stylon WangFrom: Aric Cyr <[email protected]>
--- 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
@@ -45,7 +45,7 @@/* forward declaration */ struct aux_payload ; -#define DC_VER "3.2.135.1" +#define DC_VER "3.2.136"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Hi all,
This week this patchset was tested on the following systems:
HP Envy 360, with Ryzen 5 4500U, on the following display types: eDP 1080p 60hz, 4k 60hz (via USB-C to DP/HDMI), 1440p 144hz (via USB-C to DP/HDMI), 1680*1050 60hz (via USB-C to DP and then DP to DVI/VGA)
Sapphire Pulse RX5700XT on the following display types:
4k 60hz (via DP/HDMI), 1440p 144hz (via DP/HDMI), 1680*1050 60hz (via DP to DVI/VGA)
Reference AMD RX6800 on the following display types:
4k 60hz (via DP/HDMI and USB-C to DP/HDMI), 1440p 144hz (via USB-C to DP/HDMI and USB-C to DP/HDMI), 1680*1050 60hz (via DP to DVI/VGA)
Included testing using a Startech DP 1.4 MST hub at 2x 4k 60hz on all systems.
Thank you,
Dan Wheeler
Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook | Twitter | amd.com
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stylon Wang
Sent: May 14, 2021 12:50 AM
To: [email protected]
Cc: Wang, Chao-kai (Stylon) <[email protected]>; Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 00/20] DC Patches May 17, 2021
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* DC v3.2.136
* Improvements across DP, DMUB, code documentation, suspend/resume, etc
--
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.66
Aric Cyr (1):
drm/amd/display: 3.2.136
Bhawanpreet Lakha (1):
drm/amd/display: Add Overflow check to skip MALL
Chris Park (1):
drm/amd/display: Disconnect non-DP with no EDID
George Shen (1):
drm/amd/display: Minor refactor of DP PHY test automation
Hugo Hu (1):
drm/amd/display: treat memory as a single-channel for asymmetric
memory V3
Nikola Cornij (1):
drm/amd/display: Use the correct max downscaling value for DCN3.x
family
Rodrigo Siqueira (4):
drm/amd/display: Add documentation for power gate plane drm/amd/display: Remove legacy comments drm/amd/display: Add kernel-doc to some hubp functions drm/amd/display: Document set RECOUT operation
Wayne Lin (2):
drm/amd/display: Refactor suspend/resume of Secure display drm/amd/display: Avoid get/put vblank when stream disabled
Wenjing Liu (4):
drm/amd/display: determine dp link encoding format from link settings drm/amd/display: decide link training settings based on channel coding drm/amd/display: rename perform_link_training_int function drm/amd/display: consider channel coding in configure lttpr mode
Wyatt Wood (2):
drm/amd/display: Add get_current_time interface to dmub_srv drm/amd/display: Refactor and add visual confirm for HW Flip Queue
Zhan Liu (1):
drm/amd/display: Correct DPCD revision for eDP v1.4
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +-- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c | 63 +---- .../drm/amd/display/amdgpu_dm/amdgpu_dm_crc.h | 4 - .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 48 +++- drivers/gpu/drm/amd/display/dc/core/dc.c | 39 +-- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 106 +++++--- drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 5 + .../drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 49 ++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 13 + .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 229 +++++------------- .../amd/display/dc/dcn10/dcn10_hw_sequencer.h | 6 + .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c | 1 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 5 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 28 ++- .../drm/amd/display/dc/dcn20/dcn20_hwseq.h | 5 + .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c | 1 + .../gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c | 2 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 8 +- .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c | 1 + .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 9 + .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c | 1 + .../gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_resource.c | 7 +- .../drm/amd/display/dc/dcn301/dcn301_init.c | 1 + .../amd/display/dc/dcn301/dcn301_resource.c | 7 +- .../amd/display/dc/dcn302/dcn302_resource.c | 7 +- drivers/gpu/drm/amd/display/dc/dm_services.h | 1 - .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 6 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 3 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 4 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 1 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +- .../gpu/drm/amd/display/dmub/src/dmub_dcn20.c | 5 + .../gpu/drm/amd/display/dmub/src/dmub_dcn20.h | 5 +- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + .../amd/display/include/link_service_types.h | 1 + 39 files changed, 380 insertions(+), 353 deletions(-)
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cdaniel.wheeler%40amd.com%7C8950ba7c4b3c41857a0408d91693cf96%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637565646366382267%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AjwGnPFwZ1cWRsik2S%2FANkBQrsBF2L1xrqjkk3zew%2F8%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx