All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] DC Patches Nov 20 2023
@ 2023-11-22  6:58 Tom Chung
  2023-11-22  6:58 ` [PATCH 1/7] drm/amd/display: update dcn315 lpddr pstate latency Tom Chung
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, chiahsuan.chung, Sunpeng.Li, Rodrigo.Siqueira,
	roman.li, Daniel Wheeler, jerry.zuo, Aurabindo.Pillai,
	hersenxs.wu, wayne.lin, Harry.Wentland, agustin.gutierrez

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

Cc: Daniel Wheeler <daniel.wheeler@amd.com>

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/7] drm/amd/display: update dcn315 lpddr pstate latency
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 2/7] drm/amd/display: block dcn315 dynamic crb allocation when unintended Tom Chung
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Charlene Liu, Dmytro Laktyushkin, chiahsuan.chung,
	Sunpeng.Li, Rodrigo.Siqueira, roman.li, jerry.zuo,
	Aurabindo.Pillai, hersenxs.wu, wayne.lin, Harry.Wentland,
	agustin.gutierrez

From: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>

[WHY/HOW]
Increase the pstate latency to improve ac/dc transition

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
---
 .../drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
index b2c4f97afc8b..8776055bbeaa 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
@@ -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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] drm/amd/display: block dcn315 dynamic crb allocation when unintended
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
  2023-11-22  6:58 ` [PATCH 1/7] drm/amd/display: update dcn315 lpddr pstate latency Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 3/7] drm/amd/display: Update Fixed VS/PE Retimer Sequence Tom Chung
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Charlene Liu, Dmytro Laktyushkin, chiahsuan.chung,
	Sunpeng.Li, Rodrigo.Siqueira, roman.li, jerry.zuo,
	Aurabindo.Pillai, hersenxs.wu, wayne.lin, Harry.Wentland,
	agustin.gutierrez

From: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>

[WHY/HOW]
Limit the dynamic crb to dual stream configs that include eDP

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
---
 .../drm/amd/display/dc/resource/dcn315/dcn315_resource.c    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
index cb8024eee8e4..515ba435f759 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
@@ -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++) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] drm/amd/display: Update Fixed VS/PE Retimer Sequence
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
  2023-11-22  6:58 ` [PATCH 1/7] drm/amd/display: update dcn315 lpddr pstate latency Tom Chung
  2023-11-22  6:58 ` [PATCH 2/7] drm/amd/display: block dcn315 dynamic crb allocation when unintended Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 4/7] drm/amd/display: [FW Promotion] Release 0.0.194.0 Tom Chung
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, chiahsuan.chung, Sunpeng.Li, Wenjing Liu,
	Rodrigo.Siqueira, roman.li, jerry.zuo, Aurabindo.Pillai,
	hersenxs.wu, wayne.lin, Michael Strauss, Harry.Wentland,
	agustin.gutierrez

From: Michael Strauss <michael.strauss@amd.com>

[WHY/HOW]
Add a new AUX sequence provided by vendor to improve
interop with specific display configurations.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
---
 .../protocols/link_dp_training_fixed_vs_pe_retimer.c   | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c
index 68096d12f52f..7087cdc9e977 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c
@@ -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));
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] drm/amd/display: [FW Promotion] Release 0.0.194.0
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
                   ` (2 preceding siblings ...)
  2023-11-22  6:58 ` [PATCH 3/7] drm/amd/display: Update Fixed VS/PE Retimer Sequence Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 5/7] drm/amd/display: Allow DTBCLK disable for DCN35 Tom Chung
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, chiahsuan.chung, Sunpeng.Li, Anthony Koo,
	Rodrigo.Siqueira, roman.li, jerry.zuo, Aurabindo.Pillai,
	hersenxs.wu, wayne.lin, Harry.Wentland, agustin.gutierrez

From: Anthony Koo <anthony.koo@amd.com>

- Add a new dmub command in enum dmub_cmd_cab_type

Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Anthony Koo <anthony.koo@amd.com>
---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index b7d9360bfdc8..a365f6c096de 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -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,
 };
 
 /**
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] drm/amd/display: Allow DTBCLK disable for DCN35
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
                   ` (3 preceding siblings ...)
  2023-11-22  6:58 ` [PATCH 4/7] drm/amd/display: [FW Promotion] Release 0.0.194.0 Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 6/7] drm/amd/display: Add DSC granular throughput adjustment Tom Chung
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Charlene Liu, chiahsuan.chung, Sunpeng.Li,
	Rodrigo.Siqueira, roman.li, jerry.zuo, Aurabindo.Pillai,
	hersenxs.wu, wayne.lin, Harry.Wentland, Nicholas Kazlauskas,
	agustin.gutierrez

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

[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.

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c  | 27 +++++++++----------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
index 63a0b885b6f0..d5fde7d23fbf 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
@@ -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*/
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] drm/amd/display: Add DSC granular throughput adjustment
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
                   ` (4 preceding siblings ...)
  2023-11-22  6:58 ` [PATCH 5/7] drm/amd/display: Allow DTBCLK disable for DCN35 Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-22  6:58 ` [PATCH 7/7] drm/amd/display: Promote DAL to 3.2.262 Tom Chung
  2023-11-24 18:16 ` [PATCH 0/7] DC Patches Nov 20 2023 Wheeler, Daniel
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Ilya Bakoulin, chiahsuan.chung, Sunpeng.Li,
	Wenjing Liu, Rodrigo.Siqueira, roman.li, jerry.zuo,
	Aurabindo.Pillai, hersenxs.wu, wayne.lin, Harry.Wentland,
	agustin.gutierrez

From: Ilya Bakoulin <ilya.bakoulin@amd.com>

[Why/How]
Update DSC DPCD parsing to take granular throughput adjustment into
consideration.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Ilya Bakoulin <ilya.bakoulin@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
index e8b5f17beb96..0df6c55eb326 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
@@ -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))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] drm/amd/display: Promote DAL to 3.2.262
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
                   ` (5 preceding siblings ...)
  2023-11-22  6:58 ` [PATCH 6/7] drm/amd/display: Add DSC granular throughput adjustment Tom Chung
@ 2023-11-22  6:58 ` Tom Chung
  2023-11-24 18:16 ` [PATCH 0/7] DC Patches Nov 20 2023 Wheeler, Daniel
  7 siblings, 0 replies; 9+ messages in thread
From: Tom Chung @ 2023-11-22  6:58 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Aric Cyr, chiahsuan.chung, Sunpeng.Li,
	Rodrigo.Siqueira, roman.li, jerry.zuo, Aurabindo.Pillai,
	hersenxs.wu, wayne.lin, Harry.Wentland, agustin.gutierrez

From: Aric Cyr <aric.cyr@amd.com>

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

Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index f3c3e0935ad0..cf7f88b80390 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH 0/7] DC Patches Nov 20 2023
  2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
                   ` (6 preceding siblings ...)
  2023-11-22  6:58 ` [PATCH 7/7] drm/amd/display: Promote DAL to 3.2.262 Tom Chung
@ 2023-11-24 18:16 ` Wheeler, Daniel
  7 siblings, 0 replies; 9+ messages in thread
From: Wheeler, Daniel @ 2023-11-24 18:16 UTC (permalink / raw)
  To: Chung, ChiaHsuan (Tom), amd-gfx
  Cc: Wang, Chao-kai (Stylon), Chung, ChiaHsuan (Tom),
	Li, Sun peng (Leo),
	Siqueira, Rodrigo, Li, Roman, Zuo, Jerry, Pillai, Aurabindo, Wu,
	Hersen, Lin, Wayne, Wentland, Harry, Gutierrez, Agustin

[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.


Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>


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 <chiahsuan.chung@amd.com>
Sent: Wednesday, November 22, 2023 1:59 AM
To: amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Li, Roman <Roman.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com>; Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; Wu, Hersen <hersenxs.wu@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>; Wheeler, Daniel <Daniel.Wheeler@amd.com>
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

Cc: Daniel Wheeler <daniel.wheeler@amd.com>

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-24 18:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  6:58 [PATCH 0/7] DC Patches Nov 20 2023 Tom Chung
2023-11-22  6:58 ` [PATCH 1/7] drm/amd/display: update dcn315 lpddr pstate latency Tom Chung
2023-11-22  6:58 ` [PATCH 2/7] drm/amd/display: block dcn315 dynamic crb allocation when unintended Tom Chung
2023-11-22  6:58 ` [PATCH 3/7] drm/amd/display: Update Fixed VS/PE Retimer Sequence Tom Chung
2023-11-22  6:58 ` [PATCH 4/7] drm/amd/display: [FW Promotion] Release 0.0.194.0 Tom Chung
2023-11-22  6:58 ` [PATCH 5/7] drm/amd/display: Allow DTBCLK disable for DCN35 Tom Chung
2023-11-22  6:58 ` [PATCH 6/7] drm/amd/display: Add DSC granular throughput adjustment Tom Chung
2023-11-22  6:58 ` [PATCH 7/7] drm/amd/display: Promote DAL to 3.2.262 Tom Chung
2023-11-24 18:16 ` [PATCH 0/7] DC Patches Nov 20 2023 Wheeler, Daniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.