DC Patches Nov 20 2023
Subsystems (3)
cover DC Patches Nov 20 2023
This DC patchset brings improvements in multiple areas. In summary, we have:
- Add DSC granular throughput adjustment
- Allow DTBCLK disable for DCN35
- Update Fixed VS/PE Retimer Sequence
- Block dcn315 dynamic crb allocation when unintended
- Update dcn315 lpddr pstate latency
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.194.0
Aric Cyr (1):
drm/amd/display: Promote DAL to 3.2.262
Dmytro Laktyushkin (2):
drm/amd/display: update dcn315 lpddr pstate latency drm/amd/display: block dcn315 dynamic crb allocation when unintended
Ilya Bakoulin (1):
drm/amd/display: Add DSC granular throughput adjustment
Michael Strauss (1):
drm/amd/display: Update Fixed VS/PE Retimer Sequence
Nicholas Kazlauskas (1):
drm/amd/display: Allow DTBCLK disable for DCN35
.../dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 8 +++--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 27 +++++++++---------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10 +++++-- .../link_dp_training_fixed_vs_pe_retimer.c | 10 +++++++ .../dc/resource/dcn315/dcn315_resource.c | 6 +++-- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +++ 7 files changed, 43 insertions(+), 24 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/7 drm/amd/display: update dcn315 lpddr pstate latency
From: Dmytro Laktyushkin <[email protected]>
[WHY/HOW]
Increase the pstate latency to improve ac/dc transition
--- .../drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +4 -4
@@ -334,7 +334,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_A, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -342,7 +342,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_B, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -350,7 +350,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_C, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
@@ -358,7 +358,7 @@ static struct wm_table lpddr5_wm_table = { { .wm_inst = WM_D, .wm_type = WM_TYPE_PSTATE_CHG, - .pstate_latency_us = 11.65333, + .pstate_latency_us = 129.0, .sr_exit_time_us = 11.5, .sr_enter_plus_exit_time_us = 14.5, .valid = true,
Signature · 1 line
2.25.1
PATCH 2/7 drm/amd/display: block dcn315 dynamic crb allocation when unintended
In reply to Tom ChungFrom: Dmytro Laktyushkin <[email protected]>
[WHY/HOW]
Limit the dynamic crb to dual stream configs that include eDP
--- .../drm/amd/display/dc/resource/dcn315/dcn315_resource.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +4 -2
@@ -1631,8 +1631,10 @@ static bool allow_pixel_rate_crb(struct dc *dc, struct dc_state *context)int i;struct resource_context *res_ctx = &context->res_ctx; -/*Don't apply for single stream*/ -if (context->stream_count <2 ) +/* Only apply for dual stream scenarios with edp*/ +if (context->stream_count !=2 ) +return false; +if (context->streams[0 ]->signal !=SIGNAL_TYPE_EDP && context->streams[1 ]->signal !=SIGNAL_TYPE_EDP )return false;for (i =0 ; i < dc->res_pool->pipe_count; i++) {
Signature · 1 line
2.25.1
PATCH 3/7 drm/amd/display: Update Fixed VS/PE Retimer Sequence
In reply to Tom ChungFrom: Michael Strauss <[email protected]>
[WHY/HOW]
Add a new AUX sequence provided by vendor to improve interop with specific display configurations.
--- .../protocols/link_dp_training_fixed_vs_pe_retimer.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c +10 -0
@@ -205,6 +205,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence_legacy(const uint8_t vendor_lttpr_write_data_4lane_3[4 ] = {0x1 ,0x6D ,0xF2 ,0x18 };const uint8_t vendor_lttpr_write_data_4lane_4[4 ] = {0x1 ,0x6C ,0xF2 ,0x03 };const uint8_t vendor_lttpr_write_data_4lane_5[4 ] = {0x1 ,0x03 ,0xF3 ,0x06 }; +const uint8_t vendor_lttpr_write_data_dpmf[4 ] = {0x1 ,0x6 ,0x70 ,0x87 };enum link_training_result status =LINK_TRAINING_SUCCESS ;uint8_t lane =0 ;union down_spread_ctrl downspread = {0 };
@@ -293,6 +294,10 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence_legacy(DP_DOWNSPREAD_CTRL , lt_settings->link_settings.link_spread); +link_configure_fixed_vs_pe_retimer (link->ddc, + &vendor_lttpr_write_data_dpmf[0 ], +sizeof (vendor_lttpr_write_data_dpmf)); +if (lt_settings->link_settings.lane_count ==LANE_COUNT_FOUR ) {link_configure_fixed_vs_pe_retimer (link->ddc, &vendor_lttpr_write_data_4lane_1[0 ],sizeof (vendor_lttpr_write_data_4lane_1));
@@ -552,6 +557,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence(const uint8_t vendor_lttpr_write_data_4lane_3[4 ] = {0x1 ,0x6D ,0xF2 ,0x18 };const uint8_t vendor_lttpr_write_data_4lane_4[4 ] = {0x1 ,0x6C ,0xF2 ,0x03 };const uint8_t vendor_lttpr_write_data_4lane_5[4 ] = {0x1 ,0x03 ,0xF3 ,0x06 }; +const uint8_t vendor_lttpr_write_data_dpmf[4 ] = {0x1 ,0x6 ,0x70 ,0x87 };enum link_training_result status =LINK_TRAINING_SUCCESS ;uint8_t lane =0 ;union down_spread_ctrl downspread = {0 };
@@ -639,6 +645,10 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence(DP_DOWNSPREAD_CTRL , lt_settings->link_settings.link_spread); +link_configure_fixed_vs_pe_retimer (link->ddc, + &vendor_lttpr_write_data_dpmf[0 ], +sizeof (vendor_lttpr_write_data_dpmf)); +if (lt_settings->link_settings.lane_count ==LANE_COUNT_FOUR ) {link_configure_fixed_vs_pe_retimer (link->ddc, &vendor_lttpr_write_data_4lane_1[0 ],sizeof (vendor_lttpr_write_data_4lane_1));
Signature · 1 line
2.25.1
PATCH 4/7 drm/amd/display: [FW Promotion] Release 0.0.194.0
In reply to Tom ChungFrom: Anthony Koo <[email protected]>
- Add a new dmub command in enum dmub_cmd_cab_type
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +4 -0
@@ -1345,6 +1345,10 @@ enum dmub_cmd_cab_type {* Fit surfaces in CAB (i.e. CAB enable) */ DMUB_CMD__CAB_DCN_SS_FIT_IN_CAB =2 , +/** +* Do not fit surfaces in CAB (i.e. no CAB) +*/ + DMUB_CMD__CAB_DCN_SS_NOT_FIT_IN_CAB = 3, };/**
Signature · 1 line
2.25.1
PATCH 5/7 drm/amd/display: Allow DTBCLK disable for DCN35
In reply to Tom ChungFrom: Nicholas Kazlauskas <[email protected]>
[Why]
DTBCLK is enabled on idle and it will burn power.
[How]
There's a few issues here:
- Always enabling DTBCLK on clock manager init
- Setting refclk when DTBCLK is supposed to be disabled
- Not applying the correct calculated version refclk, but instead the base value which might be zero
On dtbclk_en change we'll message PMFW to enable or disable the clock accordingly.
The DTBDTO will be then based on refclk, but it will be set to the default fixed value if there was nothing calculated in DML despite the clock being considered enabled.
--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +12 -15
@@ -232,6 +232,10 @@ void dcn35_update_clocks(struct clk_mgr *clk_mgr_base,if (dc->work_arounds.skip_clock_update)return ; +/* DTBCLK is fixed, so set a default if unspecified. */ +if (new_clocks->dtbclk_en && !new_clocks->ref_dtbclk_khz) + new_clocks->ref_dtbclk_khz =600000 ; +/* * if it is safe to lower, but we are already in the lower state, we don't have to do anything * also if safe to lower is false, we just go in the higher state
@@ -265,8 +269,10 @@ void dcn35_update_clocks(struct clk_mgr *clk_mgr_base,if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) {dcn35_smu_set_dtbclk (clk_mgr, true); -dcn35_update_clocks_update_dtb_dto (clk_mgr, context, clk_mgr_base->clks.ref_dtbclk_khz); clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en; + +dcn35_update_clocks_update_dtb_dto (clk_mgr, context, new_clocks->ref_dtbclk_khz); + clk_mgr_base->clks.ref_dtbclk_khz = new_clocks->ref_dtbclk_khz; }/* check that we're not already in D0 */
@@ -314,17 +320,12 @@ void dcn35_update_clocks(struct clk_mgr *clk_mgr_base, update_dispclk = true; } -if (!new_clocks->dtbclk_en) { - new_clocks->ref_dtbclk_khz =600000 ; - } -/* clock limits are received with MHz precision, divide by 1000 to prevent setting clocks at every call */ if (!dc->debug.disable_dtb_ref_clk_switch && -should_set_clock (safe_to_lower, new_clocks->ref_dtbclk_khz /1000 , clk_mgr_base->clks.ref_dtbclk_khz /1000 )) { -/* DCCG requires KHz precision for DTBCLK */ -dcn35_smu_set_dtbclk (clk_mgr, true); - -dcn35_update_clocks_update_dtb_dto (clk_mgr, context, clk_mgr_base->clks.ref_dtbclk_khz); +should_set_clock (safe_to_lower, new_clocks->ref_dtbclk_khz /1000 , + clk_mgr_base->clks.ref_dtbclk_khz /1000 )) { +dcn35_update_clocks_update_dtb_dto (clk_mgr, context, new_clocks->ref_dtbclk_khz); + clk_mgr_base->clks.ref_dtbclk_khz = new_clocks->ref_dtbclk_khz; }if (dpp_clock_lowered) {
@@ -1048,12 +1049,8 @@ void dcn35_clk_mgr_construct(dcn35_dump_clk_registers (&clk_mgr->base.base.boot_snapshot, &clk_mgr->base.base, &log_info); clk_mgr->base.base.dprefclk_khz =dcn35_smu_get_dprefclk (&clk_mgr->base); - clk_mgr->base.base.clks.ref_dtbclk_khz =dcn35_smu_get_dtbclk (&clk_mgr->base); - -if (!clk_mgr->base.base.clks.ref_dtbclk_khz) -dcn35_smu_set_dtbclk (&clk_mgr->base, true); + clk_mgr->base.base.clks.ref_dtbclk_khz =600000 ; - clk_mgr->base.base.clks.dtbclk_en = true;dce_clock_read_ss_info (&clk_mgr->base);/*when clk src is from FCH, it could have ss, same clock src as DPREF clk*/
Signature · 1 line
2.25.1
PATCH 6/7 drm/amd/display: Add DSC granular throughput adjustment
In reply to Tom ChungFrom: Ilya Bakoulin <[email protected]>
[Why/How]
Update DSC DPCD parsing to take granular throughput adjustment into consideration.
--- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c +8 -2
@@ -331,8 +331,9 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc,int buff_block_size;int buff_size; -if (!dsc_buff_block_size_from_dpcd (dpcd_dsc_basic_data[DP_DSC_RC_BUF_BLK_SIZE -DP_DSC_SUPPORT ], - &buff_block_size)) +if (!dsc_buff_block_size_from_dpcd ( + dpcd_dsc_basic_data[DP_DSC_RC_BUF_BLK_SIZE -DP_DSC_SUPPORT ] &0x03 , + &buff_block_size))return false; buff_size = dpcd_dsc_basic_data[DP_DSC_RC_BUF_SIZE -DP_DSC_SUPPORT ] +1 ;
@@ -357,10 +358,15 @@ bool dc_dsc_parse_dsc_dpcd(const struct dc *dc, {int dpcd_throughput = dpcd_dsc_basic_data[DP_DSC_PEAK_THROUGHPUT -DP_DSC_SUPPORT ]; +int dsc_throughput_granular_delta; + + dsc_throughput_granular_delta = dpcd_dsc_basic_data[DP_DSC_RC_BUF_BLK_SIZE -DP_DSC_SUPPORT ] >>3 ; + dsc_throughput_granular_delta *=2 ;if (!dsc_throughput_from_dpcd (dpcd_throughput &DP_DSC_THROUGHPUT_MODE_0_MASK , &dsc_sink_caps->throughput_mode_0_mps))return false; + dsc_sink_caps->throughput_mode_0_mps += dsc_throughput_granular_delta; dpcd_throughput = (dpcd_throughput &DP_DSC_THROUGHPUT_MODE_1_MASK ) >>DP_DSC_THROUGHPUT_MODE_1_SHIFT ;if (!dsc_throughput_from_dpcd (dpcd_throughput, &dsc_sink_caps->throughput_mode_1_mps))
Signature · 1 line
2.25.1
PATCH 7/7 drm/amd/display: Promote DAL to 3.2.262
In reply to Tom ChungFrom: Aric Cyr <[email protected]>
This version brings along following fixes:
- Add DSC granular throughput adjustment
- Allow DTBCLK disable for DCN35
- Update Fixed VS/PE Retimer Sequence
- Block dcn315 dynamic crb allocation when unintended
- Update dcn315 lpddr pstate latency
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -49,7 +49,7 @@ struct aux_payload;struct set_config_cmd_payload ;struct dmub_notification ; -#define DC_VER "3.2.261" +#define DC_VER "3.2.262"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 1 line
2.25.1
[Public]
Hi all,
This week this patchset was tested on the following systems:
* Lenovo ThinkBook T13s Gen4 with AMD Ryzen 5 6600U
* MSI Gaming X Trio RX 6800
* Gigabyte Gaming OC RX 7900 XTX
These systems were tested on the following display/connection types:
* eDP, (1080p 60hz [5650U]) (1920x1200 60hz [6600U]) (2560x1600 120hz[6600U])
* VGA and DVI (1680x1050 60hz [DP to VGA/DVI, USB-C to VGA/DVI])
* DP/HDMI/USB-C (1440p 170hz, 4k 60hz, 4k 144hz, 4k 240hz [Includes USB-C to DP/HDMI adapters])
* Thunderbolt (LG Ultrafine 5k)
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60Hz displays)
* DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60 displays, and HP Hook G2 with 1 4k60 display)
* USB 4 (Kensington SD5700T and 1x 4k 60Hz display)
* PCON (Club3D CAC-1085 and 1x 4k 144Hz display [at 4k 120HZ, as that is the max the adapter supports])
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to):
* Changing display configurations and settings
* Benchmark testing
* Feature testing (Freesync, etc.)
Automated testing includes (but is not limited to):
* Script testing (scripts to automate some of the manual checks)
* IGT testing
The patchset consists of the amd-staging-drm-next branch (Head commit - d1619cb96246076df2a5b4a10055c51836584001 drm/amd/display: 3.2.261) with new patches added on top of it.
Tested on Ubuntu 22.04.3, on Wayland and X11, using KDE Plasma and Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: Tom Chung <[email protected]>
Sent: Wednesday, November 22, 2023 1:59 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Wang, Chao-kai (Stylon) <[email protected]>; Gutierrez, Agustin <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Wu, Hersen <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>
Subject: [PATCH 0/7] DC Patches Nov 20 2023
This DC patchset brings improvements in multiple areas. In summary, we have:
- Add DSC granular throughput adjustment
- Allow DTBCLK disable for DCN35
- Update Fixed VS/PE Retimer Sequence
- Block dcn315 dynamic crb allocation when unintended
- Update dcn315 lpddr pstate latency
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.194.0
Aric Cyr (1):
drm/amd/display: Promote DAL to 3.2.262
Dmytro Laktyushkin (2):
drm/amd/display: update dcn315 lpddr pstate latency drm/amd/display: block dcn315 dynamic crb allocation when unintended
Ilya Bakoulin (1):
drm/amd/display: Add DSC granular throughput adjustment
Michael Strauss (1):
drm/amd/display: Update Fixed VS/PE Retimer Sequence
Nicholas Kazlauskas (1):
drm/amd/display: Allow DTBCLK disable for DCN35
.../dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 8 +++--- .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 27 +++++++++---------- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10 +++++-- .../link_dp_training_fixed_vs_pe_retimer.c | 10 +++++++ .../dc/resource/dcn315/dcn315_resource.c | 6 +++-- .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 +++ 7 files changed, 43 insertions(+), 24 deletions(-)
--
2.25.1