DC Patches February 21, 2022
cover DC Patches February 21, 2022
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* add debug option to bypass ssinfo from bios.
* Refactor fixed VS logic for non-transparent mode
* add cable ID support for usb c connector
* clear remote dc_sink when stop mst
* Ignore Transitional Invalid Link Rate Error Message
* Fix wrong resolution with DP/VGA adapter
* Refactor PSR DPCD caps detection
* Set compbuf size to min at prep prevent overbook crb
* lock/un-lock cursor if odm pipe split used
* OVT Update on InfoFrame and Mode Management
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.105.0
Aric Cyr (1):
drm/amd/display: 3.2.174
Charlene Liu (1):
drm/amd/display: add debug option to bypass ssinfo from bios.
Chris Park (1):
drm/amd/display: OVT Update on InfoFrame and Mode Management
Fangzhi Zuo (1):
drm/amd/display: Ignore Transitional Invalid Link Rate Error Message
Ilya (1):
drm/amd/display: Fix wrong resolution with DP/VGA adapter
Ma, Duncan (1):
drm/amd/display: Set compbuf size to min at prep prevent overbook crb
Paul Hsieh (1):
drm/amd/display: lock/un-lock cursor if odm pipe split used
Po Ting Chen (1):
drm/amd/display: Refactor PSR DPCD caps detection
Shen, George (1):
drm/amd/display: Refactor fixed VS logic for non-transparent mode
Wayne Lin (1):
drm/amd/display: clear remote dc_sink when stop mst
Wenjing Liu (1):
drm/amd/display: add cable ID support for usb c connector
.../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 58 +---- .../display/dc/clk_mgr/dce100/dce_clk_mgr.c | 2 + .../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 22 +- .../gpu/drm/amd/display/dc/core/dc_link_ddc.c | 3 + .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 230 +++++++++++++++--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 11 + .../gpu/drm/amd/display/dc/core/dc_stream.c | 7 +- drivers/gpu/drm/amd/display/dc/dc.h | 9 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 32 ++- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 + drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +- drivers/gpu/drm/amd/display/dc/dc_types.h | 2 + .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 12 +- .../amd/display/dc/dml/display_mode_structs.h | 1 + .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 44 +++- .../amd/display/include/ddc_service_types.h | 1 + .../drm/amd/display/include/set_mode_types.h | 8 +- 21 files changed, 369 insertions(+), 113 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/12 drm/amd/display: OVT Update on InfoFrame and Mode Management
From: Chris Park <[email protected]>
[Why]
Integrate OVT timing from DM to DC logic to update info frame and mode management to report the resolution to the OS.
[How]
Reflect RID and Frame Rate to AVI InfoFrame Version 5. Define new Timing Standard for OVT timing.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 11 +++++++++++ drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 2 ++ drivers/gpu/drm/amd/display/dc/dc_types.h | 2 ++ drivers/gpu/drm/amd/display/include/set_mode_types.h | 8 ++++++-- 4 files changed, 21 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +11 -0
@@ -2443,6 +2443,8 @@ static void set_avi_info_frame(union hdmi_info_packet hdmi_info;union display_content_support support = {0 };unsigned int vic = pipe_ctx->stream->timing.vic; +unsigned int rid = pipe_ctx->stream->timing.rid; +unsigned int fr_ind = pipe_ctx->stream->timing.fr_index;enum dc_timing_3d_format format;memset (&hdmi_info,0 ,sizeof (union hdmi_info_packet ));
@@ -2633,6 +2635,15 @@ static void set_avi_info_frame( hdmi_info.bits.header.length =14 ; } +if (rid !=0 && fr_ind !=0 ) { + hdmi_info.bits.header.version =5 ; + hdmi_info.bits.header.length =15 ; + + hdmi_info.bits.FR0_FR3 = fr_ind &0xF ; + hdmi_info.bits.FR4 = (fr_ind >>4 ) &0x1 ; + hdmi_info.bits.RID0_RID5 = rid; + } +/* pixel repetition * PR0 - PR3 start from 0 whereas pHwPathMode->mode.timing.flags.pixel * repetition start from 1 */
drivers/gpu/drm/amd/display/dc/dc_hw_types.h +2 -0
@@ -766,6 +766,8 @@ struct dc_crtc_timing {uint32_t vic;uint32_t hdmi_vic; +uint32_t rid; +uint32_t fr_index;enum dc_timing_3d_format timing_3d_format;enum dc_color_depth display_color_depth;enum dc_pixel_encoding pixel_encoding;
drivers/gpu/drm/amd/display/dc/dc_types.h +2 -0
@@ -276,6 +276,8 @@ enum dc_timing_source {TIMING_SOURCE_EDID_CEA_SVD ,TIMING_SOURCE_EDID_CVT_3BYTE ,TIMING_SOURCE_EDID_4BYTE , +TIMING_SOURCE_EDID_CEA_DISPLAYID_VTDB , +TIMING_SOURCE_EDID_CEA_RID ,TIMING_SOURCE_VBIOS ,TIMING_SOURCE_CV , TIMING_SOURCE_TV,
drivers/gpu/drm/amd/display/include/set_mode_types.h +6 -2
@@ -84,10 +84,14 @@ union hdmi_info_packet {uint16_t bar_left;uint16_t bar_right; - uint8_t F140_F143:4; + uint8_t FR0_FR3:4; uint8_t ACE0_ACE3:4; -uint8_t reserved[13 ]; + uint8_t RID0_RID5:6; + uint8_t FR4:1; + uint8_t F157:1; + +uint8_t reserved[12 ]; } bits;struct info_packet_raw_data packet_raw_data;
Signature · 1 line
2.25.1
PATCH 2/12 drm/amd/display: lock/un-lock cursor if odm pipe split used
In reply to Solomon ChiuFrom: Paul Hsieh <[email protected]>
[Why]
When system resume from sleep, the cursor lock will be reset to default(lock status). And the cursor programming sequence doesn't consider about odm pipe split cause cursor can't be enabled.
[How]
If odm pipe split has been used, lock/un-lock on each pipes.
--- drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +6 -1
@@ -273,6 +273,8 @@ static void program_cursor_attributes(if (!pipe_to_program) { pipe_to_program = pipe_ctx; dc->hwss.cursor_lock (dc, pipe_to_program, true); +if (pipe_to_program->next_odm_pipe) + dc->hwss.cursor_lock (dc, pipe_to_program->next_odm_pipe, true); } dc->hwss.set_cursor_attribute (pipe_ctx);
@@ -280,8 +282,11 @@ static void program_cursor_attributes( dc->hwss.set_cursor_sdr_white_level (pipe_ctx); } -if (pipe_to_program) +if (pipe_to_program) { dc->hwss.cursor_lock (dc, pipe_to_program, false); +if (pipe_to_program->next_odm_pipe) + dc->hwss.cursor_lock (dc, pipe_to_program->next_odm_pipe, false); + } }#ifndef TRIM_FSFT
Signature · 1 line
2.25.1
PATCH 3/12 drm/amd/display: Set compbuf size to min at prep prevent overbook crb
In reply to Solomon ChiuFrom: "Ma, Duncan" <[email protected]>
[Why]
Detbuffer size is dynamically set for dcn31x. At certain moment, compbuf+(def size * num pipes) > config return buffer size causing flickering. This is easily reproducible when MPO is enabled with two displays.
[How]
At prepare BW, use the min comp buffer size. When it is to optimize BW, set compbuf size back to maximum possible size.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 12 ++++++++++-- .../drm/amd/display/dc/dml/display_mode_structs.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +10 -2
@@ -1818,6 +1818,7 @@ void dcn20_prepare_bandwidth( struct dc_state *context) {struct hubbub *hubbub = dc->res_pool->hubbub; +unsigned int compbuf_size_kb =0 ; dc->clk_mgr->funcs->update_clocks( dc->clk_mgr,
@@ -1829,9 +1830,16 @@ void dcn20_prepare_bandwidth( &context->bw_ctx.bw.dcn.watermarks, dc->res_pool->ref_clocks.dchub_ref_clock_inKhz /1000 , false); +/* decrease compbuf size */ -if (hubbub->funcs->program_compbuf_size) - hubbub->funcs->program_compbuf_size (hubbub, context->bw_ctx.bw.dcn.compbuf_size_kb, false); +if (hubbub->funcs->program_compbuf_size) { +if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes) + compbuf_size_kb = context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes; +else + compbuf_size_kb = context->bw_ctx.bw.dcn.compbuf_size_kb; + + hubbub->funcs->program_compbuf_size (hubbub, compbuf_size_kb, false); + } } void dcn20_optimize_bandwidth(
drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h +1 -0
@@ -141,6 +141,7 @@ struct _vcs_dpi_ip_params_st {unsigned int odm_capable;unsigned int rob_buffer_size_kbytes;unsigned int det_buffer_size_kbytes; +unsigned int min_comp_buffer_size_kbytes;unsigned int dpte_buffer_size_in_pte_reqs_luma;unsigned int dpte_buffer_size_in_pte_reqs_chroma;unsigned int pde_proc_buffer_size_64k_reqs;
Signature · 1 line
2.25.1
PATCH 4/12 drm/amd/display: Refactor PSR DPCD caps detection
In reply to Solomon ChiuFrom: Po Ting Chen <[email protected]>
[Why]
To move the PSR DPCD caps detection into detect_edp_sink_caps()
--- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 6 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 58 ++----------------- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 28 +++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 4 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 30 ++++++++++ .../amd/display/include/ddc_service_types.h | 1 + 6 files changed, 70 insertions(+), 57 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +3 -3
@@ -857,9 +857,9 @@ static int psr_capability_show(struct seq_file *m, void *data)if (!(link->connector_signal &SIGNAL_TYPE_EDP ))return -ENODEV ; -seq_printf (m,"Sink support: %s" ,yesno (link->dpcd_caps.psr_caps.psr_version !=0 )); -if (link->dpcd_caps.psr_caps.psr_version) -seq_printf (m," [0x%02x]" , link->dpcd_caps.psr_caps.psr_version); +seq_printf (m,"Sink support: %s" ,yesno (link->dpcd_caps.psr_info.psr_version !=0 )); +if (link->dpcd_caps.psr_info.psr_version) +seq_printf (m," [0x%02x]" , link->dpcd_caps.psr_info.psr_version);seq_puts (m,"\n" );seq_printf (m,"Driver support: %s" ,yesno (link->psr_settings.psr_feature_enabled));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +5 -53
78 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +28 -0
@@ -5565,6 +5565,34 @@ void detect_edp_sink_caps(struct dc_link *link) (backlight_adj_cap &DP_EDP_DYNAMIC_BACKLIGHT_CAP ) ? true:false;dc_link_set_default_brightness_aux (link); + +core_link_read_dpcd (link,DP_EDP_DPCD_REV , + &link->dpcd_caps.edp_rev, +sizeof (link->dpcd_caps.edp_rev)); +/* +* PSR is only valid for eDP v1.3 or higher. +*/ +if (link->dpcd_caps.edp_rev >=DP_EDP_13 ) { +core_link_read_dpcd (link,DP_PSR_SUPPORT , + &link->dpcd_caps.psr_info.psr_version, +sizeof (link->dpcd_caps.psr_info.psr_version)); +core_link_read_dpcd (link,DP_PSR_CAPS , + &link->dpcd_caps.psr_info.psr_dpcd_caps.raw, +sizeof (link->dpcd_caps.psr_info.psr_dpcd_caps.raw)); +if (link->dpcd_caps.psr_info.psr_dpcd_caps.bits.Y_COORDINATE_REQUIRED) { +core_link_read_dpcd (link,DP_PSR2_SU_Y_GRANULARITY , + &link->dpcd_caps.psr_info.psr2_su_y_granularity_cap, +sizeof (link->dpcd_caps.psr_info.psr2_su_y_granularity_cap)); + } + } + +/* +* ALPM is only valid for eDP v1.4 or higher. +*/ +if (link->dpcd_caps.dpcd_rev.raw >=DP_EDP_14 ) +core_link_read_dpcd (link,DP_RECEIVER_ALPM_CAP , + &link->dpcd_caps.alpm_caps.raw, +sizeof (link->dpcd_caps.alpm_caps.raw)); }void dc_link_dp_enable_hpd (const struct dc_link *link)
drivers/gpu/drm/amd/display/dc/dc.h +3 -1
@@ -1230,7 +1230,6 @@ struct dpcd_caps {union dpcd_fec_capability fec_cap;struct dpcd_dsc_capabilities dsc_caps;struct dc_lttpr_caps lttpr_caps; -struct psr_caps psr_caps;struct dpcd_usb4_dp_tunneling_info usb4_dp_tun_info;union dp_128b_132b_supported_link_rates dp_128b_132b_supported_link_rates;
@@ -1238,6 +1237,9 @@ struct dpcd_caps {union dp_sink_video_fallback_formats fallback_formats;union dp_fec_capability1 fec_cap1;union dp_cable_attributes cable_attributes; +uint8_t edp_rev; +union edp_alpm_caps alpm_caps; +struct edp_psr_info psr_info; };union dpcd_sink_ext_caps {
drivers/gpu/drm/amd/display/dc/dc_dp_types.h +30 -0
@@ -1068,4 +1068,34 @@ union dp_128b_132b_training_aux_rd_interval { };#endif // DP_INTRA_HOP_AUX_REPLY_INDICATION + +union edp_alpm_caps { +struct { +uint8_t AUX_WAKE_ALPM_CAP :1 ; +uint8_t PM_STATE_2A_SUPPORT :1 ; +uint8_t AUX_LESS_ALPM_CAP :1 ; +uint8_t RESERVED :5 ; + } bits; +uint8_t raw; +}; + +union edp_psr_dpcd_caps { +struct { +uint8_t LINK_TRAINING_ON_EXIT_NOT_REQUIRED :1 ; +uint8_t PSR_SETUP_TIME :3 ; +uint8_t Y_COORDINATE_REQUIRED :1 ; +uint8_t SU_GRANULARITY_REQUIRED :1 ; +uint8_t FRAME_SYNC_IS_NOT_NEEDED_FOR_SU :1 ; +uint8_t RESERVED :1 ; + } bits; +uint8_t raw; +}; + +struct edp_psr_info { +uint8_t psr_version; +union edp_psr_dpcd_caps psr_dpcd_caps; +uint8_t psr2_su_y_granularity_cap; +uint8_t force_psrsu_cap; +}; +#endif /* DC_DP_TYPES_H */
drivers/gpu/drm/amd/display/include/ddc_service_types.h +1 -0
@@ -34,6 +34,7 @@#define DP_BRANCH_DEVICE_ID_90CC24 0x90CC24#define DP_BRANCH_DEVICE_ID_00E04C 0x00E04C#define DP_BRANCH_DEVICE_ID_006037 0x006037 +#define DP_BRANCH_DEVICE_ID_001CF8 0x001CF8#define DP_BRANCH_HW_REV_10 0x10#define DP_BRANCH_HW_REV_20 0x20
Signature · 1 line
2.25.1
PATCH 5/12 drm/amd/display: Fix wrong resolution with DP/VGA adapter
In reply to Solomon ChiuFrom: Ilya <[email protected]>
[Why]
Hotplugging the VGA side of some DP/VGA adapters caused the display to light up with the wrong (non-native) resolution.
This is caused by the adapter misbehaving by reporting the wrong number of downstream ports when the VGA side is unplugged (reports 1 instead of 0), but only if the SINK_COUNT DPCD register is read more than once.
[How]
To work around the adapter behavior, remove the sink if link is detected, but EDID cannot be read.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 16 ++++++++++++++++ .../gpu/drm/amd/display/dc/core/dc_link_ddc.c | 3 +++ 2 files changed, 19 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +16 -0
@@ -1197,6 +1197,22 @@ static bool detect_link_and_local_sink(struct dc_link *link,return false; } + +if (link->type == dc_connection_sst_branch && + link->dpcd_caps.dongle_type == +DISPLAY_DONGLE_DP_VGA_CONVERTER && + reason ==DETECT_REASON_HPDRX ) { +/* Abort detection for DP-VGA adapters when EDID +* can't be read and detection reason is VGA-side +* hotplug +*/ +if (prev_sink) +dc_sink_release (prev_sink); +link_disconnect_sink (link); + +return true; + } +break ;default :break ;
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c +3 -0
@@ -298,6 +298,9 @@ static uint32_t defer_delay_converter_wa(if (link->dpcd_caps.dongle_type ==DISPLAY_DONGLE_DP_VGA_CONVERTER && link->dpcd_caps.branch_dev_id ==DP_BRANCH_DEVICE_ID_0080E1 && + (link->dpcd_caps.branch_fw_revision[0 ] <0x01 || + (link->dpcd_caps.branch_fw_revision[0 ] ==0x01 && + link->dpcd_caps.branch_fw_revision[1 ] <0x40 )) && !memcmp (link->dpcd_caps.branch_dev_name,DP_VGA_DONGLE_BRANCH_DEV_NAME ,sizeof (link->dpcd_caps.branch_dev_name)))
Signature · 1 line
2.25.1
PATCH 6/12 drm/amd/display: Ignore Transitional Invalid Link Rate Error Message
In reply to Solomon ChiuFrom: Fangzhi Zuo <[email protected]>
[Why]
When hotplug or unplug happens, each stream disabled one by one, and then enable any alived streams. Link phy and payload table is cleared when 1st stream is disabled. That causes the error message pops up when disable 2nd stream. There is no active stream after link_rate is cleared. After all streams are disabled, link will be trained again and link rate is assigned to any alived streams.
Therefore there is no harm for the error message that represents invalid link rate value in the atomic reset transitional time period.
[How]
Downgrade the log level from ERROR to DEBUG.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -3921,7 +3921,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx) &link->mst_stream_alloc_table);break ;case DP_UNKNOWN_ENCODING : -DC_LOG_ERROR ("Failure: unknown encoding format\n" ); +DC_LOG_DEBUG ("Unknown encoding format\n" );return DC_ERROR_UNEXPECTED ; }
Signature · 1 line
2.25.1
PATCH 7/12 drm/amd/display: clear remote dc_sink when stop mst
In reply to Solomon ChiuFrom: Wayne Lin <[email protected]>
[Why]
Currently, we don't have code path to release remote dc_sink when unplug MST hub from the system. After few times hotplug, we hit the limition of maximum number of remote dc_sink and can't light up new connected monitor anymore.
[How]
Releasing all remote dc_sink at dm_helpers_dp_mst_stop_top_mgr() was removed by previous patch. Restore it.
--- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +19 -1
@@ -451,6 +451,7 @@ bool dm_helpers_dp_mst_stop_top_mgr( struct dc_link *link) {struct amdgpu_dm_connector *aconnector = link->priv; +uint8_t i;if (!aconnector) {DRM_ERROR ("Failed to find connector for link!" );
@@ -460,9 +461,26 @@ bool dm_helpers_dp_mst_stop_top_mgr(DRM_INFO ("DM_MST: stopping TM on aconnector: %p [id: %d]\n" , aconnector, aconnector->base.base.id); -if (aconnector->mst_mgr.mst_state == true) +if (aconnector->mst_mgr.mst_state == true) {drm_dp_mst_topology_mgr_set_mst (&aconnector->mst_mgr, false); +for (i =0 ; i <MAX_SINKS_PER_LINK ; i++) { +if (link->remote_sinks[i] ==NULL ) +continue ; + +if (link->remote_sinks[i]->sink_signal == +SIGNAL_TYPE_DISPLAY_PORT_MST ) { +dc_link_remove_remote_sink (link, link->remote_sinks[i]); + +if (aconnector->dc_sink) { +dc_sink_release (aconnector->dc_sink); + aconnector->dc_sink =NULL ; + aconnector->dc_link->cur_link_settings.lane_count =0 ; + } + } + } + } +return false; }
Signature · 1 line
2.25.1
PATCH 8/12 drm/amd/display: add cable ID support for usb c connector
In reply to Solomon ChiuFrom: Wenjing Liu <[email protected]>
[how]
Call to DMUB to retrieve usb c cable ID data from PD firmware. If cable id is retrieved from DMUB, skip reading cable ID from RX.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 100 ++++++++++++------ drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 8 +- .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 +- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 40 +++++++ 7 files changed, 117 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -2
@@ -1305,7 +1305,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,*/ link->dongle_max_pix_clk =0 ; -dc_link_dp_clear_rx_status (link); +dc_link_clear_dprx_states (link); } LINK_INFO("link=%d, dc_sink_in=%p is now %s prev_sink=%p edid same=%d\n",
@@ -1986,7 +1986,7 @@ static enum dc_status enable_link_dp(struct dc_state *state,msleep (post_oui_delay);// similarly, mode switch can cause loss of cable ID -dpcd_update_cable_id (link); +dpcd_write_cable_id_to_dprx (link); skip_video_pattern = true;
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +68 -32
164 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -1236,7 +1236,7 @@ struct dpcd_caps {union dp_main_line_channel_coding_cap channel_coding_cap;union dp_sink_video_fallback_formats fallback_formats;union dp_fec_capability1 fec_cap1; -union dp_cable_attributes cable_attributes; +union dp_cable_id cable_id;uint8_t edp_rev;union edp_alpm_caps alpm_caps;struct edp_psr_info psr_info;
drivers/gpu/drm/amd/display/dc/dc_dp_types.h +1 -1
@@ -1017,7 +1017,7 @@ union dp_fec_capability1 {uint8_t raw; }; -union dp_cable_attributes { +union dp_cable_id {struct {uint8_t UHBR10_20_CAPABILITY :2 ;uint8_t UHBR13_5_CAPABILITY :1 ;
drivers/gpu/drm/amd/display/dc/dc_link.h +4 -4
@@ -43,8 +43,8 @@ struct dc_link_status {struct dpcd_caps *dpcd_caps; }; -struct dp_receiver_status { -bool cable_id_updated; +struct dprx_states { +bool cable_id_written; };/* DP MST stream allocation (payload bandwidth number) */
@@ -205,7 +205,7 @@ struct dc_link {struct link_mst_stream_allocation_table mst_stream_alloc_table;struct dc_link_status link_status; -struct dp_receiver_status dprx_status; +struct dprx_states dprx_states;struct link_trace link_trace;struct gpio *hpd_gpio;
@@ -466,7 +466,7 @@ void dc_link_get_cur_link_res(const struct dc_link *link,void dc_get_cur_link_res_map (const struct dc *dc,uint32_t *map);/* restore link resource allocation state from a snapshot */ void dc_restore_link_res_map (const struct dc *dc,uint32_t *map); -void dc_link_dp_clear_rx_status (struct dc_link *link); +void dc_link_clear_dprx_states (struct dc_link *link);struct gpio *get_hpd_gpio (struct dc_bios *dcb,struct graphics_object_id link_id,struct gpio_service *gpio_service);
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +1 -1
@@ -106,7 +106,7 @@ bool dp_overwrite_extended_receiver_cap(struct dc_link *link);void dpcd_set_source_specific_data (struct dc_link *link); -void dpcd_update_cable_id (struct dc_link *link); +void dpcd_write_cable_id_to_dprx (struct dc_link *link);/* Write DPCD link configuration data. */ enum dc_status dpcd_set_link_settings(
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +40 -0
@@ -668,6 +668,10 @@ enum dmub_cmd_type {* Command type used for EDID CEA parsing */ DMUB_CMD__EDID_CEA =79 , +/** +* Command type used for getting usbc cable ID +*/ + DMUB_CMD_GET_USBC_CABLE_ID = 81,/** * Command type used for all VBIOS interface commands. */
@@ -2484,6 +2488,38 @@ struct dmub_rb_cmd_edid_cea { }; +/** +* struct dmub_cmd_cable_id_input - Defines the input of DMUB_CMD_GET_USBC_CABLE_ID command. +*/ +struct dmub_cmd_cable_id_input { +uint8_t phy_inst;/**< phy inst for cable id data */ +}; + +/** +* struct dmub_cmd_cable_id_input - Defines the output of DMUB_CMD_GET_USBC_CABLE_ID command. +*/ +struct dmub_cmd_cable_id_output { +uint8_t UHBR10_20_CAPABILITY :2 ;/**< b'01 for UHBR10 support, b'10 for both UHBR10 and UHBR20 support */ +uint8_t UHBR13_5_CAPABILITY :1 ;/**< b'1 for UHBR13.5 support */ +uint8_t CABLE_TYPE :3 ;/**< b'01 for passive cable, b'10 for active LRD cable, b'11 for active retimer cable */ +uint8_t RESERVED :2 ;/**< reserved means not defined */ +}; + +/** +* Definition of a DMUB_CMD_GET_USBC_CABLE_ID command +*/ +struct dmub_rb_cmd_get_usbc_cable_id { +struct dmub_cmd_header header;/**< Command header */ +/** +* Data passed from driver to FW in a DMUB_CMD_GET_USBC_CABLE_ID command. +*/ +union dmub_cmd_cable_id_data { +struct dmub_cmd_cable_id_input input;/**< Input */ +struct dmub_cmd_cable_id_output output;/**< Output */ +uint8_t output_raw;/**< Raw data output */ + } data; +}; +/** * union dmub_rb_cmd - DMUB inbox command. */
@@ -2649,6 +2685,10 @@ union dmub_rb_cmd {* Definition of a DMUB_CMD__EDID_CEA command. */ struct dmub_rb_cmd_edid_cea edid_cea; +/** +* Definition of a DMUB_CMD_GET_USBC_CABLE_ID command. +*/ +struct dmub_rb_cmd_get_usbc_cable_id cable_id; };/**
Signature · 1 line
2.25.1
PATCH 9/12 drm/amd/display: Refactor fixed VS logic for non-transparent mode
In reply to Solomon ChiuFrom: "Shen, George" <[email protected]>
[Why]
All fixed VS/PE link training sequence should be refactored into a separate function outside of the standard link training sequence. This includes the sequence for non-transparent mode.
[How]
Isolate link training sequence for fixed VS/PE non-transparent mode into a separate function.
--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 102 +++++++++++++++++- 1 file changed, 97 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +97 -5
@@ -2301,7 +2301,96 @@ static enum link_training_result dp_perform_128b_132b_link_training(return result; } -static enum link_training_result dc_link_dp_perform_fixed_vs_pe_training_sequence ( +static enum link_training_result perform_fixed_vs_pe_nontransparent_training_sequence ( +struct dc_link *link, +const struct link_resource *link_res, +struct link_training_settings *lt_settings) +{ +enum link_training_result status =LINK_TRAINING_SUCCESS ; +uint8_t lane =0 ; +uint8_t toggle_rate =0x6 ; +uint8_t target_rate =0x6 ; +bool apply_toggle_rate_wa = false; +uint8_t repeater_cnt; +uint8_t repeater_id; + +/* Fixed VS/PE specific: Force CR AUX RD Interval to at least 16ms */ +if (lt_settings->cr_pattern_time <16000 ) + lt_settings->cr_pattern_time =16000 ; + +/* Fixed VS/PE specific: Toggle link rate */ + apply_toggle_rate_wa = (link->vendor_specific_lttpr_link_rate_wa == target_rate); + target_rate =get_dpcd_link_rate (<_settings->link_settings); + toggle_rate = (target_rate ==0x6 ) ?0xA :0x6 ; + +if (apply_toggle_rate_wa) + lt_settings->link_settings.link_rate = toggle_rate; + +if (link->ctx->dc->work_arounds.lt_early_cr_pattern) +start_clock_recovery_pattern_early (link, link_res, lt_settings,DPRX ); + +/* 1. set link rate, lane count and spread. */ +dpcd_set_link_settings (link, lt_settings); + +/* Fixed VS/PE specific: Toggle link rate back*/ +if (apply_toggle_rate_wa) { +core_link_write_dpcd ( + link, +DP_LINK_BW_SET , + &target_rate, +1 ); + } + + link->vendor_specific_lttpr_link_rate_wa = target_rate; + +if (link->lttpr_mode ==LTTPR_MODE_NON_TRANSPARENT ) { + +/* 2. perform link training (set link training done +* to false is done as well) +*/ + repeater_cnt =dp_convert_to_count (link->dpcd_caps.lttpr_caps.phy_repeater_cnt); + +for (repeater_id = repeater_cnt; (repeater_id >0 && status ==LINK_TRAINING_SUCCESS ); + repeater_id--) { + status =perform_clock_recovery_sequence (link, link_res, lt_settings, repeater_id); + +if (status !=LINK_TRAINING_SUCCESS ) { +repeater_training_done (link, repeater_id); +break ; + } + + status =perform_channel_equalization_sequence (link, + link_res, + lt_settings, + repeater_id); + +repeater_training_done (link, repeater_id); + +if (status !=LINK_TRAINING_SUCCESS ) +break ; + +for (lane =0 ; lane <LANE_COUNT_DP_MAX ; lane++) { + lt_settings->dpcd_lane_settings[lane].raw =0 ; + lt_settings->hw_lane_settings[lane].VOLTAGE_SWING =0 ; + lt_settings->hw_lane_settings[lane].PRE_EMPHASIS =0 ; + } + } + } + +if (status ==LINK_TRAINING_SUCCESS ) { + status =perform_clock_recovery_sequence (link, link_res, lt_settings,DPRX ); +if (status ==LINK_TRAINING_SUCCESS ) { + status =perform_channel_equalization_sequence (link, + link_res, + lt_settings, +DPRX ); + } + } + +return status; +} + +static enum link_training_result dp_perform_fixed_vs_pe_training_sequence (struct dc_link *link,const struct link_resource *link_res,struct link_training_settings *lt_settings)
@@ -2325,6 +2414,11 @@ static enum link_training_result dc_link_dp_perform_fixed_vs_pe_training_sequencASSERT (dp_get_link_encoding_format (<_settings->link_settings) == DP_8b_10b_ENCODING); +if (link->lttpr_mode ==LTTPR_MODE_NON_TRANSPARENT ) { + status =perform_fixed_vs_pe_nontransparent_training_sequence (link, link_res, lt_settings); +return status; + } +if (offset !=0xFF ) { vendor_lttpr_write_address += ((DP_REPEATER_CONFIGURATION_AND_STATUS_SIZE ) * (offset -1 ));
@@ -2671,10 +2765,8 @@ enum link_training_result dc_link_dp_perform_link_training(* Per DP specs starting from here, DPTX device shall not issue * Non-LT AUX transactions inside training mode. */ -if (!link->dc->debug.apply_vendor_specific_lttpr_wa && - (link->chip_caps &EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN ) && - link->lttpr_mode ==LTTPR_MODE_TRANSPARENT ) - status =dc_link_dp_perform_fixed_vs_pe_training_sequence (link, link_res, <_settings); +if (link->chip_caps &EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN ) + status =dp_perform_fixed_vs_pe_training_sequence (link, link_res, <_settings);else if (encoding == DP_8b_10b_ENCODING) status =dp_perform_8b_10b_link_training (link, link_res, <_settings);else if (encoding == DP_128b_132b_ENCODING)
Signature · 1 line
2.25.1
PATCH 10/12 drm/amd/display: [FW Promotion] Release 0.0.105.0
In reply to Solomon ChiuFrom: 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 0x1422ef84 +#define DMUB_FW_VERSION_GIT_HASH 0x5fb9349b#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 104 +#define DMUB_FW_VERSION_REVISION 105#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 1 line
2.25.1
PATCH 11/12 drm/amd/display: add debug option to bypass ssinfo from bios.
In reply to Solomon ChiuFrom: Charlene Liu <[email protected]>
[Why&How]
add debug option to bypass ssinfo from bios.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 ++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c +2 -0
@@ -374,6 +374,8 @@ void dce_clock_read_ss_info(struct clk_mgr_internal *clk_mgr_dce) clk_mgr_dce->dprefclk_ss_percentage = info.spread_spectrum_percentage; } +if (clk_mgr_dce->base.ctx->dc->debug.ignore_dpref_ss) + clk_mgr_dce->dprefclk_ss_percentage =0 ; } } }
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +2 -0
@@ -697,6 +697,8 @@ void dcn31_clk_mgr_construct( clk_mgr->base.base.dprefclk_khz =600000 ; clk_mgr->base.dccg->ref_dtbclk_khz =600000 ;dce_clock_read_ss_info (&clk_mgr->base); +/*if bios enabled SS, driver needs to adjust dtb clock, only enable with correct bios*/ +//clk_mgr->base.dccg->ref_dtbclk_khz = dce_adjust_dp_ref_freq_for_ss(clk_mgr_internal, clk_mgr->base.base.dprefclk_khz); clk_mgr->base.base.bw_params = &dcn31_bw_params;
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -709,6 +709,7 @@ struct dc_debug_options {union dpia_debug_options dpia_debug;#endif bool apply_vendor_specific_lttpr_wa; +bool ignore_dpref_ss; };struct gpu_info_soc_bounding_box_v1_0 ;
Signature · 1 line
2.25.1
PATCH 12/12 drm/amd/display: 3.2.174
In reply to Solomon ChiuFrom: Aric Cyr <[email protected]>
This version brings along following fixes:
- add debug option to bypass ssinfo from bios.
- Refactor fixed VS logic for non-transparent mode
- add cable ID support for usb c connector
- clear remote dc_sink when stop mst
- Ignore Transitional Invalid Link Rate Error Message
- Fix wrong resolution with DP/VGA adapter
- Refactor PSR DPCD caps detection
- Set compbuf size to min at prep prevent overbook crb
- lock/un-lock cursor if odm pipe split used
- OVT Update on InfoFrame and Mode Management
--- 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
@@ -47,7 +47,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.173" +#define DC_VER "3.2.174"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.25.1