All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] DC Patches November 22nd, 2021
@ 2021-11-19 19:43 Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 01/16] drm/amd/display: Fix DPIA outbox timeout after GPU reset Qingqing Zhuo
                   ` (16 more replies)
  0 siblings, 17 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	agustin.gutierrez, pavle.kotarac

This DC patchset brings improvements in multiple areas. In summary, we highlight:
- DC 3.2.163
- FW promotion to 0.0.94
- Enable seamless boot for DCN301
- Improvements in bandwidth validation
- Fixes in flags update, link encoder assignments, DSC, ODM combine and more

Thank you,
Lillian

---

Anthony Koo (1):
  drm/amd/display: [FW Promotion] Release 0.0.94

Aric Cyr (1):
  drm/amd/display: 3.2.163

Charlene Liu (1):
  drm/amd/display: based on flag reset z10 function pointer

Guo, Bing (1):
  drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC

Martin Leung (1):
  drm/amd/display: add else to avoid double destroy clk_mgr

Mikita Lipski (1):
  drm/amd/display: fix accidental casting enum to bool

Nevenko Stupar (1):
  drm/amd/display: Display object info table changes

Nicholas Kazlauskas (4):
  drm/amd/display: Fix DPIA outbox timeout after GPU reset
  drm/amd/display: Run full global validation in dc_commit_state
  drm/amd/display: Set plane update flags for all planes in reset
  drm/amd/display: Reset link encoder assignments for GPU reset

Sung Joon Kim (1):
  drm/amd/display: retain/release at proper places in link_enc
    assignment

Yi-Ling Chen (1):
  drm/amd/display: Fixed DSC would not PG after removing DSC stream

Zhan Liu (2):
  drm/amd/display: enable seamless boot for DCN301
  drm/amd/display: Rename dcn_validate_bandwidth to
    dcn10_validate_bandwidth

sungwang (1):
  drm/amd/display: Fix ODM combine issue with fast boot

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 66 +++++++++++++------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  3 +
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
 .../drm/amd/display/dc/bios/bios_parser2.c    |  6 +-
 .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c  |  2 +-
 .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |  3 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 17 +++++
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  3 +-
 .../drm/amd/display/dc/core/dc_link_enc_cfg.c |  6 +-
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  1 -
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c |  6 +-
 .../drm/amd/display/dc/dcn10/dcn10_resource.c |  2 +-
 .../drm/amd/display/dc/dcn20/dcn20_hwseq.c    |  2 +-
 .../amd/display/dc/dcn301/dcn301_resource.c   |  2 +-
 .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    |  2 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_init.c |  5 ++
 .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.c  | 31 ---------
 .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h  |  4 --
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c  | 28 --------
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h  |  1 -
 .../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c  |  5 +-
 .../gpu/drm/amd/display/dc/inc/dcn_calcs.h    |  2 +-
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 11 +---
 24 files changed, 99 insertions(+), 113 deletions(-)

-- 
2.25.1


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

* [PATCH 01/16] drm/amd/display: Fix DPIA outbox timeout after GPU reset
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 02/16] drm/amd/display: based on flag reset z10 function pointer Qingqing Zhuo
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, Jude Shih, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, Nicholas Kazlauskas, agustin.gutierrez,
	pavle.kotarac

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

[Why]
The HW interrupt gets disabled after GPU reset so we don't receive
notifications for HPD or AUX from DMUB - leading to timeout and
black screen with (or without) DPIA links connected.

[How]
Re-enable the interrupt after GPU reset like we do for the other
DC interrupts.

Fixes: 81927e2808be ("drm/amd/display: Support for DMUB AUX")

Reviewed-by: Jude Shih <Jude.Shih@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 26fcc8911698..c88054f8c583 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2562,6 +2562,8 @@ static int dm_resume(void *handle)
 	if (amdgpu_in_reset(adev)) {
 		dc_state = dm->cached_dc_state;
 
+		amdgpu_dm_outbox_init(adev);
+
 		r = dm_dmub_hw_init(adev);
 		if (r)
 			DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
-- 
2.25.1


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

* [PATCH 02/16] drm/amd/display: based on flag reset z10 function pointer
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 01/16] drm/amd/display: Fix DPIA outbox timeout after GPU reset Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 03/16] drm/amd/display: Run full global validation in dc_commit_state Qingqing Zhuo
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Charlene Liu, solomon.chiu, Sunpeng.Li,
	Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, Sung joon Kim,
	mikita.lipski, Bhawanpreet.Lakha, agustin.gutierrez,
	pavle.kotarac

From: Charlene Liu <Charlene.Liu@amd.com>

[Why & How]
Per hardware requirements, add a flag to control
z10 enable/disable.

Reviewed-by: Sung joon Kim <Sungjoon.Kim@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c
index 05335a8c3c2d..e175b6cc0125 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c
@@ -149,4 +149,9 @@ void dcn31_hw_sequencer_construct(struct dc *dc)
 		dc->hwss.init_hw = dcn20_fpga_init_hw;
 		dc->hwseq->funcs.init_pipes = NULL;
 	}
+	if (dc->debug.disable_z10) {
+		/*hw not support z10 or sw disable it*/
+		dc->hwss.z10_restore = NULL;
+		dc->hwss.z10_save_init = NULL;
+	}
 }
-- 
2.25.1


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

* [PATCH 03/16] drm/amd/display: Run full global validation in dc_commit_state
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 01/16] drm/amd/display: Fix DPIA outbox timeout after GPU reset Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 02/16] drm/amd/display: based on flag reset z10 function pointer Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 04/16] drm/amd/display: enable seamless boot for DCN301 Qingqing Zhuo
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	Nicholas Kazlauskas, agustin.gutierrez, pavle.kotarac

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

[Why]
Dynamic link encoder assignment expects that it can modify DC
current_state and the links associated with the incoming state when
performing full validation.

This does not align with our actual synchronization constraints
in DM's atomic_check.

[How]
Since link encoder assignment only happens as part of full validation
we can just use fast validation as part of atomic_check instead.

This satisfy's DC interface requirements and skips the DML calculations
needed for pipe programming - hopefully speeding up things a little bit
to offset the cost of double validation during stream modification.

We already do this as part of dc_commit_updates_for_stream()
with validate_bandwidth(), so extend this to dc_commit_state() as
well.

Fixes: 019f278036a2 ("drm/amd/display: Fix concurrent dynamic encoder assignment")

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 +------------------
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 13 +++++++++++++
 2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c88054f8c583..729ab647f691 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2304,14 +2304,6 @@ static enum dc_status amdgpu_dm_commit_zero_streams(struct dc *dc)
 			goto fail;
 	}
 
-
-	res = dc_validate_global_state(dc, context, false);
-
-	if (res != DC_OK) {
-		DRM_ERROR("%s:resource validation failed, dc_status:%d\n", __func__, res);
-		goto fail;
-	}
-
 	res = dc_commit_state(dc, context);
 
 fail:
@@ -2580,15 +2572,6 @@ static int dm_resume(void *handle)
 					= 0xffffffff;
 			}
 		}
-#if defined(CONFIG_DRM_AMD_DC_DCN)
-		/*
-		 * Resource allocation happens for link encoders for newer ASIC in
-		 * dc_validate_global_state, so we need to revalidate it.
-		 *
-		 * This shouldn't fail (it passed once before), so warn if it does.
-		 */
-		WARN_ON(dc_validate_global_state(dm->dc, dc_state, false) != DC_OK);
-#endif
 
 		WARN_ON(!dc_commit_state(dm->dc, dc_state));
 
@@ -11126,7 +11109,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 			DRM_DEBUG_DRIVER("drm_dp_mst_atomic_check() failed\n");
 			goto fail;
 		}
-		status = dc_validate_global_state(dc, dm_state->context, false);
+		status = dc_validate_global_state(dc, dm_state->context, true);
 		if (status != DC_OK) {
 			DRM_DEBUG_DRIVER("DC global validation failure: %s (%d)",
 				       dc_status_to_str(status), status);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 39ad3854bfe4..dd4ea98749b7 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1827,6 +1827,19 @@ bool dc_commit_state(struct dc *dc, struct dc_state *context)
 		dc_stream_log(dc, stream);
 	}
 
+	/*
+	 * Previous validation was perfomred with fast_validation = true and
+	 * the full DML state required for hardware programming was skipped.
+	 *
+	 * Re-validate here to calculate these parameters / watermarks.
+	 */
+	result = dc_validate_global_state(dc, context, false);
+	if (result != DC_OK) {
+		DC_LOG_ERROR("DC commit global validation failure: %s (%d)",
+			     dc_status_to_str(result), result);
+		return result;
+	}
+
 	result = dc_commit_state_no_check(dc, context);
 
 	return (result == DC_OK);
-- 
2.25.1


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

* [PATCH 04/16] drm/amd/display: enable seamless boot for DCN301
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (2 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 03/16] drm/amd/display: Run full global validation in dc_commit_state Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 05/16] drm/amd/display: Set plane update flags for all planes in reset Qingqing Zhuo
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Charlene Liu, Zhan Liu, solomon.chiu, Sunpeng.Li,
	Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

From: Zhan Liu <Zhan.Liu@amd.com>

[Why]
DCN301 is capable of running seamless boot
if keep_stolen_vga_memory is not set.

[How]
Add a helper to check whether an ASIC can support
seamless boot and set it based on base driver flags.

Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Zhan Liu <Zhan.Liu@amd.com>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 +++++++++++++++++++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  3 +++
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  1 -
 .../amd/display/dc/dcn301/dcn301_resource.c   |  2 +-
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 729ab647f691..7b1b88dc98c3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1454,6 +1454,12 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.flags.power_down_display_on_boot = true;
 
+	if (check_seamless_boot_capability(adev)) {
+		init_data.flags.power_down_display_on_boot = false;
+		init_data.flags.allow_seamless_boot_optimization = true;
+		DRM_INFO("Seamless boot condition check passed\n");
+	}
+
 	INIT_LIST_HEAD(&adev->dm.da_list);
 	/* Display Core create. */
 	adev->dm.dc = dc_create(&init_data);
@@ -11612,3 +11618,24 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context
 			ctx, DMUB_ASYNC_TO_SYNC_ACCESS_SUCCESS,
 			(uint32_t *)operation_result);
 }
+
+/*
+ * Check whether seamless boot is supported.
+ *
+ * So far we only support seamless boot on CHIP_VANGOGH.
+ * If everything goes well, we may consider expanding
+ * seamless boot to other ASICs.
+ */
+bool check_seamless_boot_capability(struct amdgpu_device *adev)
+{
+	switch (adev->asic_type) {
+	case CHIP_VANGOGH:
+		if (!adev->mman.keep_stolen_vga_memory)
+			return true;
+		break;
+	default:
+		break;
+	}
+
+	return false;
+}
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
index 37e61a88d49e..bb65f41d1a59 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@ -731,4 +731,7 @@ extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;
 int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux,
 					struct dc_context *ctx, unsigned int link_index,
 					void *payload, void *operation_result);
+
+bool check_seamless_boot_capability(struct amdgpu_device *adev);
+
 #endif /* __AMDGPU_DM_H__ */
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index fabe1b83bd4f..d226ef799e50 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -2078,7 +2078,6 @@ static void mark_seamless_boot_stream(
 {
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 
-	/* TODO: Check Linux */
 	if (dc->config.allow_seamless_boot_optimization &&
 			!dcb->funcs->is_accelerated_mode(dcb)) {
 		if (dc_validate_seamless_boot_timing(dc, stream->sink, &stream->timing))
diff --git a/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c b/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c
index e3596a5f68b1..7abc36a4ff76 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c
@@ -686,7 +686,7 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.disable_clock_gate = true,
 	.disable_pplib_clock_request = true,
 	.disable_pplib_wm_range = true,
-	.pipe_split_policy = MPC_SPLIT_AVOID_MULT_DISP,
+	.pipe_split_policy = MPC_SPLIT_AVOID,
 	.force_single_disp_pipe_split = false,
 	.disable_dcc = DCC_ENABLE,
 	.vsr_support = true,
-- 
2.25.1


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

* [PATCH 05/16] drm/amd/display: Set plane update flags for all planes in reset
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (3 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 04/16] drm/amd/display: enable seamless boot for DCN301 Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 06/16] drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC Qingqing Zhuo
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	Nicholas Kazlauskas, agustin.gutierrez, pavle.kotarac

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

[Why]
We're only setting the flags on stream[0]'s planes so this logic fails
if we have more than one stream in the state.

This can cause a page flip timeout with multiple displays in the
configuration.

[How]
Index into the stream_status array using the stream index - it's a 1:1
mapping.

Fixes: cdaae8371aa9 ("drm/amd/display: Handle GPU reset for DC block")

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 7b1b88dc98c3..8411445e9c43 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2573,8 +2573,8 @@ static int dm_resume(void *handle)
 
 		for (i = 0; i < dc_state->stream_count; i++) {
 			dc_state->streams[i]->mode_changed = true;
-			for (j = 0; j < dc_state->stream_status->plane_count; j++) {
-				dc_state->stream_status->plane_states[j]->update_flags.raw
+			for (j = 0; j < dc_state->stream_status[i].plane_count; j++) {
+				dc_state->stream_status[i].plane_states[j]->update_flags.raw
 					= 0xffffffff;
 			}
 		}
-- 
2.25.1


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

* [PATCH 06/16] drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (4 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 05/16] drm/amd/display: Set plane update flags for all planes in reset Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 07/16] drm/amd/display: Reset link encoder assignments for GPU reset Qingqing Zhuo
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Wenjing Liu,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, Guo, Bing,
	mikita.lipski, Bhawanpreet.Lakha, agustin.gutierrez,
	pavle.kotarac

From: "Guo, Bing" <Bing.Guo@amd.com>

[Why]
OPTC_BYTES_PER_PIXEL calculation for 4:2:2 and 4:2:0 could have error.

[How]
Change to use following formula:
OPTC_DSC_BYTES_PER_PIXEL = ceiling((chunk size * 2^28) / slice width)

Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Bing Guo <Bing.Guo@amd.com>
---
 .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.c  | 31 -------------------
 .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h  |  4 ---
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c  | 28 -----------------
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h  |  1 -
 .../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c  |  5 +--
 5 files changed, 3 insertions(+), 66 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
index 3ee858f311d1..122ba291a7ef 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
@@ -61,16 +61,6 @@ static double dsc_roundf(double num)
 	return (int)(num);
 }
 
-static double dsc_ceil(double num)
-{
-	double retval = (int)num;
-
-	if (retval != num && num > 0)
-		retval = num + 1;
-
-	return (int)retval;
-}
-
 static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,
 		       enum max_min max_min, float bpp)
 {
@@ -268,24 +258,3 @@ void _do_calc_rc_params(struct rc_params *rc,
 	rc->rc_buf_thresh[13] = 8064;
 }
 
-u32 _do_bytes_per_pixel_calc(int slice_width,
-		u16 drm_bpp,
-		bool is_navite_422_or_420)
-{
-	float bpp;
-	u32 bytes_per_pixel;
-	double d_bytes_per_pixel;
-
-	dc_assert_fp_enabled();
-
-	bpp = ((float)drm_bpp / 16.0);
-	d_bytes_per_pixel = dsc_ceil(bpp * slice_width / 8.0) / slice_width;
-	// TODO: Make sure the formula for calculating this is precise (ceiling
-	// vs. floor, and at what point they should be applied)
-	if (is_navite_422_or_420)
-		d_bytes_per_pixel /= 2;
-
-	bytes_per_pixel = (u32)dsc_ceil(d_bytes_per_pixel * 0x10000000);
-
-	return bytes_per_pixel;
-}
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.h b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.h
index b93b95409fbe..cad244c023cd 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.h
+++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.h
@@ -78,10 +78,6 @@ struct qp_entry {
 
 typedef struct qp_entry qp_table[];
 
-u32 _do_bytes_per_pixel_calc(int slice_width,
-		u16 drm_bpp,
-		bool is_navite_422_or_420);
-
 void _do_calc_rc_params(struct rc_params *rc,
 		enum colour_mode cm,
 		enum bits_per_comp bpc,
diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
index b19d3aeb5962..e97cf09be9d5 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
@@ -60,31 +60,3 @@ void calc_rc_params(struct rc_params *rc, const struct drm_dsc_config *pps)
 			   pps->dsc_version_minor);
 	DC_FP_END();
 }
-
-/**
- * calc_dsc_bytes_per_pixel - calculate bytes per pixel
- * @pps: DRM struct with all required DSC values
- *
- * Based on the information inside drm_dsc_config, this function calculates the
- * total of bytes per pixel.
- *
- * @note This calculation requires float point operation, most of it executes
- * under kernel_fpu_{begin,end}.
- *
- * Return:
- * Return the number of bytes per pixel
- */
-u32 calc_dsc_bytes_per_pixel(const struct drm_dsc_config *pps)
-
-{
-	u32 ret;
-	u16 drm_bpp = pps->bits_per_pixel;
-	int slice_width  = pps->slice_width;
-	bool is_navite_422_or_420 = pps->native_422 || pps->native_420;
-
-	DC_FP_START();
-	ret = _do_bytes_per_pixel_calc(slice_width, drm_bpp,
-				       is_navite_422_or_420);
-	DC_FP_END();
-	return ret;
-}
diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h
index c2340e001b57..80921c1c0d53 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h
+++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h
@@ -30,7 +30,6 @@
 #include "dml/dsc/rc_calc_fpu.h"
 
 void calc_rc_params(struct rc_params *rc, const struct drm_dsc_config *pps);
-u32 calc_dsc_bytes_per_pixel(const struct drm_dsc_config *pps);
 
 #endif
 
diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
index 1e19dd674e5a..381561ee0026 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c
@@ -101,8 +101,6 @@ int dscc_compute_dsc_parameters(const struct drm_dsc_config *pps, struct dsc_par
 	struct rc_params rc;
 	struct drm_dsc_config   dsc_cfg;
 
-	dsc_params->bytes_per_pixel = calc_dsc_bytes_per_pixel(pps);
-
 	calc_rc_params(&rc, pps);
 	dsc_params->pps = *pps;
 	dsc_params->pps.initial_scale_value = 8 * rc.rc_model_size / (rc.rc_model_size - rc.initial_fullness_offset);
@@ -113,6 +111,9 @@ int dscc_compute_dsc_parameters(const struct drm_dsc_config *pps, struct dsc_par
 	dsc_cfg.mux_word_size = dsc_params->pps.bits_per_component <= 10 ? 48 : 64;
 
 	ret = drm_dsc_compute_rc_parameters(&dsc_cfg);
+	dsc_params->bytes_per_pixel =
+			(uint32_t)(((unsigned long long)dsc_cfg.slice_chunk_size * 0x10000000 + (dsc_cfg.slice_width - 1))
+							/ (uint32_t)dsc_cfg.slice_width);  //ROUND-UP
 
 	copy_pps_fields(&dsc_params->pps, &dsc_cfg);
 	dsc_params->rc_buffer_model_size = dsc_cfg.rc_bits;
-- 
2.25.1


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

* [PATCH 07/16] drm/amd/display: Reset link encoder assignments for GPU reset
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (5 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 06/16] drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 08/16] drm/amd/display: Rename dcn_validate_bandwidth to dcn10_validate_bandwidth Qingqing Zhuo
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	Nicholas Kazlauskas, agustin.gutierrez, pavle.kotarac

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

[Why]
A warning appears in the log on GPU reset for
link_enc_cfg_link_encs_assign for the following condition:

ASSERT(state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].valid == false);

This is not expected behavior and may result in link encoders being
incorrectly assigned.

[How]
The dc->current_state is backed up into dm->cached_dc_state before
we commit 0 streams.

DC will clear link encoder assignments on the real state but the
changes won't propagate over to the copy we made before the
0 streams commit.

DC expects that link encoder assignments are *not* valid
when committing a state, so as a workaround it needs to be cleared
before passing it back into DC.

Fixes: 1a80a0d88ac5 ("drm/amd/display: Fix dynamic encoder reassignment")

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 8411445e9c43..bfa63a4737eb 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2560,6 +2560,20 @@ static int dm_resume(void *handle)
 	if (amdgpu_in_reset(adev)) {
 		dc_state = dm->cached_dc_state;
 
+		/*
+		 * The dc->current_state is backed up into dm->cached_dc_state
+		 * before we commit 0 streams.
+		 *
+		 * DC will clear link encoder assignments on the real state
+		 * but the changes won't propagate over to the copy we made
+		 * before the 0 streams commit.
+		 *
+		 * DC expects that link encoder assignments are *not* valid
+		 * when committing a state, so as a workaround it needs to be
+		 * cleared here.
+		 */
+		link_enc_cfg_init(dm->dc, dc_state);
+
 		amdgpu_dm_outbox_init(adev);
 
 		r = dm_dmub_hw_init(adev);
-- 
2.25.1


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

* [PATCH 08/16] drm/amd/display: Rename dcn_validate_bandwidth to dcn10_validate_bandwidth
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (6 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 07/16] drm/amd/display: Reset link encoder assignments for GPU reset Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 09/16] drm/amd/display: retain/release at proper places in link_enc assignment Qingqing Zhuo
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Zhan Liu, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Ahmad Othman,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

From: Zhan Liu <Zhan.Liu@amd.com>

[Why]
Rename function name so it aligns with other resource
function names being used by dcn10.

[How]
Rename function name for consistency.

Reviewed-by: Ahmad Othman <Ahmad.Othman@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Zhan Liu <Zhan.Liu@amd.com>
---
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c          | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c     | 2 +-
 drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h            | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
index 6b248cd2a461..c8b0a2f05b4d 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
@@ -763,7 +763,7 @@ unsigned int get_highest_allowed_voltage_level(uint32_t chip_family, uint32_t hw
 	return 4;
 }
 
-bool dcn_validate_bandwidth(
+bool dcn10_validate_bandwidth(
 		struct dc *dc,
 		struct dc_state *context,
 		bool fast_validate)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index c50427bfab77..d342c04f5f30 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -2626,7 +2626,7 @@ static void dcn10_update_dchubp_dpp(
 		/* new calculated dispclk, dppclk are stored in
 		 * context->bw_ctx.bw.dcn.clk.dispclk_khz / dppclk_khz. current
 		 * dispclk, dppclk are from dc->clk_mgr->clks.dispclk_khz.
-		 * dcn_validate_bandwidth compute new dispclk, dppclk.
+		 * dcn10_validate_bandwidth compute new dispclk, dppclk.
 		 * dispclk will put in use after optimize_bandwidth when
 		 * ramp_up_dispclk_with_dpp is called.
 		 * there are two places for dppclk be put in use. One location
@@ -2640,7 +2640,7 @@ static void dcn10_update_dchubp_dpp(
 		 * for example, eDP + external dp,  change resolution of DP from
 		 * 1920x1080x144hz to 1280x960x60hz.
 		 * before change: dispclk = 337889 dppclk = 337889
-		 * change mode, dcn_validate_bandwidth calculate
+		 * change mode, dcn10_validate_bandwidth calculate
 		 *                dispclk = 143122 dppclk = 143122
 		 * update_dchubp_dpp be executed before dispclk be updated,
 		 * dispclk = 337889, but dppclk use new value dispclk /2 =
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index f37551e00023..6ddfb0633abb 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
@@ -1320,7 +1320,7 @@ static const struct resource_funcs dcn10_res_pool_funcs = {
 	.destroy = dcn10_destroy_resource_pool,
 	.link_enc_create = dcn10_link_encoder_create,
 	.panel_cntl_create = dcn10_panel_cntl_create,
-	.validate_bandwidth = dcn_validate_bandwidth,
+	.validate_bandwidth = dcn10_validate_bandwidth,
 	.acquire_idle_pipe_for_layer = dcn10_acquire_idle_pipe_for_layer,
 	.validate_plane = dcn10_validate_plane,
 	.validate_global = dcn10_validate_global,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h b/drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h
index 806f3041db14..337c0161e72d 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h
@@ -619,7 +619,7 @@ struct dcn_ip_params {
 };
 extern const struct dcn_ip_params dcn10_ip_defaults;
 
-bool dcn_validate_bandwidth(
+bool dcn10_validate_bandwidth(
 		struct dc *dc,
 		struct dc_state *context,
 		bool fast_validate);
-- 
2.25.1


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

* [PATCH 09/16] drm/amd/display: retain/release at proper places in link_enc assignment
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (7 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 08/16] drm/amd/display: Rename dcn_validate_bandwidth to dcn10_validate_bandwidth Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 10/16] drm/amd/display: fix accidental casting enum to bool Qingqing Zhuo
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Aric Cyr, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	Sung Joon Kim, agustin.gutierrez, pavle.kotarac

From: Sung Joon Kim <sungkim@amd.com>

[why]
Need to keep track of number of
references to stream pointer.

[how]
Call stream retain/release whenever
necessary in link_enc table assignment
sequence.

Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Sung Joon Kim <sungkim@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c              | 4 ++++
 drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index dd4ea98749b7..0bf49a1df8be 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -808,6 +808,10 @@ void dc_stream_set_static_screen_params(struct dc *dc,
 
 static void dc_destruct(struct dc *dc)
 {
+	// reset link encoder assignment table on destruct
+	if (dc->res_pool->funcs->link_encs_assign)
+		link_enc_cfg_init(dc, dc->current_state);
+
 	if (dc->current_state) {
 		dc_release_state(dc->current_state);
 		dc->current_state = NULL;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
index 8b319992c71d..a55944da8d53 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
@@ -151,6 +151,7 @@ static void add_link_enc_assignment(
 						.ep_type = stream->link->ep_type},
 					.eng_id = eng_id,
 					.stream = stream};
+				dc_stream_retain(stream);
 				state->res_ctx.link_enc_cfg_ctx.link_enc_avail[eng_idx] = ENGINE_ID_UNKNOWN;
 				stream->link_enc = stream->ctx->dc->res_pool->link_encoders[eng_idx];
 				break;
@@ -247,7 +248,10 @@ static void clear_enc_assignments(const struct dc *dc, struct dc_state *state)
 	for (i = 0; i < MAX_PIPES; i++) {
 		state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].valid = false;
 		state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].eng_id = ENGINE_ID_UNKNOWN;
-		state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].stream = NULL;
+		if (state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].stream != NULL) {
+			dc_stream_release(state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].stream);
+			state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].stream = NULL;
+		}
 	}
 
 	for (i = 0; i < dc->res_pool->res_cap->num_dig_link_enc; i++) {
-- 
2.25.1


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

* [PATCH 10/16] drm/amd/display: fix accidental casting enum to bool
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (8 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 09/16] drm/amd/display: retain/release at proper places in link_enc assignment Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 11/16] drm/amd/display: Display object info table changes Qingqing Zhuo
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, Nicholas Choi, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

From: Mikita Lipski <mikita.lipski@amd.com>

[why/how]
Fixing -Wint-in-bool-context Clang Build Failure

Reviewed-by: Nicholas Choi <Nicholas.Choi@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 84bcbf0c06fc..e8e70840a622 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -584,7 +584,7 @@ bool dm_helpers_dp_write_dsc_enable(
 		ret = drm_dp_dpcd_write(aconnector->dsc_aux, DP_DSC_ENABLE, &enable_dsc, 1);
 	}
 
-	if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT || SIGNAL_TYPE_EDP) {
+	if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT || stream->signal == SIGNAL_TYPE_EDP) {
 		ret = dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
 		DC_LOG_DC("Send DSC %s to sst display\n", enable_dsc ? "enable" : "disable");
 	}
-- 
2.25.1


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

* [PATCH 11/16] drm/amd/display: Display object info table changes
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (9 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 10/16] drm/amd/display: fix accidental casting enum to bool Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 12/16] drm/amd/display: Fixed DSC would not PG after removing DSC stream Qingqing Zhuo
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Jun Lei, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, Nevenko Stupar, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

From: Nevenko Stupar <Nevenko.Stupar@amd.com>

[Why]
display_object_info_table_v1_5 with atom_display_object_path_v3
will be used.

[How]
Add bios parser support for display_object_info_table_v1_5 with
atom_display_object_path_v3 for all existing, in use bios records
as well as for new records:
ATOM_CONNECTOR_CAP_RECORD_TYPE,
ATOM_CONNECTOR_SPEED_UPTO and
ATOM_BRACKET_LAYOUT_V2_RECORD_TYPE.

Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index a4bef4364afd..1e385d55e7fb 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -2995,7 +2995,7 @@ static bool bios_parser2_construct(
 		&bp->object_info_tbl.revision);
 
 	if (bp->object_info_tbl.revision.major == 1
-		&& bp->object_info_tbl.revision.minor >= 4) {
+		&& bp->object_info_tbl.revision.minor == 4) {
 		struct display_object_info_table_v1_4 *tbl_v1_4;
 
 		tbl_v1_4 = GET_IMAGE(struct display_object_info_table_v1_4,
@@ -3004,8 +3004,10 @@ static bool bios_parser2_construct(
 			return false;
 
 		bp->object_info_tbl.v1_4 = tbl_v1_4;
-	} else
+	} else {
+		ASSERT(0);
 		return false;
+	}
 
 	dal_firmware_parser_init_cmd_tbl(bp);
 	dal_bios_parser_init_cmd_tbl_helper2(&bp->cmd_helper, dce_version);
-- 
2.25.1


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

* [PATCH 12/16] drm/amd/display: Fixed DSC would not PG after removing DSC stream
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (10 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 11/16] drm/amd/display: Display object info table changes Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 13/16] drm/amd/display: Fix ODM combine issue with fast boot Qingqing Zhuo
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Anthony Koo, solomon.chiu, Sunpeng.Li,
	Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, Aurabindo.Pillai, Yi-Ling Chen, wayne.lin,
	mikita.lipski, Bhawanpreet.Lakha, agustin.gutierrez,
	pavle.kotarac

From: Yi-Ling Chen <Yi-Ling.Chen2@amd.com>

[WHY]
Due to pass the wrong parameter down to the enable_stream_gating(),
it would cause the DSC of the removing stream would not be PG.

[HOW]
To pass the correct parameter down th the enable_stream_gating().

Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Yi-Ling Chen <Yi-Ling.Chen2@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c        | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index d342c04f5f30..a2b925cc4132 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -1639,7 +1639,7 @@ void dcn10_reset_hw_ctx_wrap(
 
 			dcn10_reset_back_end_for_pipe(dc, pipe_ctx_old, dc->current_state);
 			if (hws->funcs.enable_stream_gating)
-				hws->funcs.enable_stream_gating(dc, pipe_ctx);
+				hws->funcs.enable_stream_gating(dc, pipe_ctx_old);
 			if (old_clk)
 				old_clk->funcs->cs_power_down(old_clk);
 		}
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 4f88376a118f..e6af99ae3d9f 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -2270,7 +2270,7 @@ void dcn20_reset_hw_ctx_wrap(
 
 			dcn20_reset_back_end_for_pipe(dc, pipe_ctx_old, dc->current_state);
 			if (hws->funcs.enable_stream_gating)
-				hws->funcs.enable_stream_gating(dc, pipe_ctx);
+				hws->funcs.enable_stream_gating(dc, pipe_ctx_old);
 			if (old_clk)
 				old_clk->funcs->cs_power_down(old_clk);
 		}
diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c
index a668feff30b8..4206ce5bf9a9 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c
@@ -565,7 +565,7 @@ void dcn31_reset_hw_ctx_wrap(
 
 			dcn31_reset_back_end_for_pipe(dc, pipe_ctx_old, dc->current_state);
 			if (hws->funcs.enable_stream_gating)
-				hws->funcs.enable_stream_gating(dc, pipe_ctx);
+				hws->funcs.enable_stream_gating(dc, pipe_ctx_old);
 			if (old_clk)
 				old_clk->funcs->cs_power_down(old_clk);
 		}
-- 
2.25.1


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

* [PATCH 13/16] drm/amd/display: Fix ODM combine issue with fast boot
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (11 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 12/16] drm/amd/display: Fixed DSC would not PG after removing DSC stream Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr Qingqing Zhuo
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Dmytro Laktyushkin, solomon.chiu, Sunpeng.Li,
	Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, sungwang, Aurabindo.Pillai, wayne.lin,
	mikita.lipski, Bhawanpreet.Lakha, agustin.gutierrez,
	pavle.kotarac

From: sungwang <danny.wang@amd.com>

[Why]
When systme power up and eDP lit up by VBIOS,
in the core_link_enable_stream(),
the function will early return due to apply
apply_edp_fast_boot_optimization,
resulting the DP_PIXEL_COMBINE cannot get set
in enc3_dp_set_odm_combine.

[How]
Check ODM PIPE to avoid early return.

Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Danny Wang <danny.wang@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 8f23c160f291..3d08f8eba402 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -4285,7 +4285,8 @@ void core_link_enable_stream(
 		/* eDP lit up by bios already, no need to enable again. */
 		if (pipe_ctx->stream->signal == SIGNAL_TYPE_EDP &&
 					apply_edp_fast_boot_optimization &&
-					!pipe_ctx->stream->timing.flags.DSC) {
+					!pipe_ctx->stream->timing.flags.DSC &&
+					!pipe_ctx->next_odm_pipe) {
 			pipe_ctx->stream->dpms_off = false;
 #if defined(CONFIG_DRM_AMD_DC_HDCP)
 			update_psp_stream_config(pipe_ctx, false);
-- 
2.25.1


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

* [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (12 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 13/16] drm/amd/display: Fix ODM combine issue with fast boot Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-22 15:38   ` Deucher, Alexander
  2021-11-19 19:43 ` [PATCH 15/16] drm/amd/display: [FW Promotion] Release 0.0.94 Qingqing Zhuo
                   ` (2 subsequent siblings)
  16 siblings, 1 reply; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Aric Cyr, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Martin Leung, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

From: Martin Leung <Martin.Leung@amd.com>

[Why & How]
when changing some code we accidentally
changed else if-> if. reverting that.

Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Martin Leung <Martin.Leung@amd.com>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
index 26f96ee32472..9200c8ce02ba 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
@@ -308,8 +308,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
 	case FAMILY_NV:
 		if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
 			dcn3_clk_mgr_destroy(clk_mgr);
-		}
-		if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
+		} else if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
 			dcn3_clk_mgr_destroy(clk_mgr);
 		}
 		if (ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
-- 
2.25.1


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

* [PATCH 15/16] drm/amd/display: [FW Promotion] Release 0.0.94
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (13 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-19 19:43 ` [PATCH 16/16] drm/amd/display: 3.2.163 Qingqing Zhuo
  2021-11-22 14:27 ` [PATCH 00/16] DC Patches November 22nd, 2021 Wheeler, Daniel
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Anthony Koo, solomon.chiu, Sunpeng.Li,
	Harry.Wentland, qingqing.zhuo, Rodrigo.Siqueira, roman.li,
	Anson.Jacob, Aurabindo.Pillai, wayne.lin, mikita.lipski,
	Bhawanpreet.Lakha, agustin.gutierrez, pavle.kotarac

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

[Why & How]
 - Remove tick count definition since it can be different
   per HW revision

Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

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 20efa1f61914..6499e5c790bc 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -47,10 +47,10 @@
 
 /* Firmware versioning. */
 #ifdef DMUB_EXPOSE_VERSION
-#define DMUB_FW_VERSION_GIT_HASH 0xcd0e1e7a
+#define DMUB_FW_VERSION_GIT_HASH 0x465e619a
 #define DMUB_FW_VERSION_MAJOR 0
 #define DMUB_FW_VERSION_MINOR 0
-#define DMUB_FW_VERSION_REVISION 93
+#define DMUB_FW_VERSION_REVISION 94
 #define DMUB_FW_VERSION_TEST 0
 #define DMUB_FW_VERSION_VBIOS 0
 #define DMUB_FW_VERSION_HOTFIX 0
@@ -173,13 +173,6 @@ extern "C" {
 #define dmub_udelay(microseconds) udelay(microseconds)
 #endif
 
-/**
- * Number of nanoseconds per DMUB tick.
- * DMCUB_TIMER_CURRENT increments in DMUB ticks, which are 10ns by default.
- * If DMCUB_TIMER_WINDOW is non-zero this will no longer be true.
- */
-#define NS_PER_DMUB_TICK 10
-
 /**
  * union dmub_addr - DMUB physical/virtual 64-bit address.
  */
-- 
2.25.1


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

* [PATCH 16/16] drm/amd/display: 3.2.163
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (14 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 15/16] drm/amd/display: [FW Promotion] Release 0.0.94 Qingqing Zhuo
@ 2021-11-19 19:43 ` Qingqing Zhuo
  2021-11-22 14:27 ` [PATCH 00/16] DC Patches November 22nd, 2021 Wheeler, Daniel
  16 siblings, 0 replies; 20+ messages in thread
From: Qingqing Zhuo @ 2021-11-19 19:43 UTC (permalink / raw)
  To: amd-gfx
  Cc: stylon.wang, Aric Cyr, solomon.chiu, Sunpeng.Li, Harry.Wentland,
	qingqing.zhuo, Rodrigo.Siqueira, roman.li, Anson.Jacob,
	Aurabindo.Pillai, wayne.lin, mikita.lipski, Bhawanpreet.Lakha,
	agustin.gutierrez, pavle.kotarac

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

This version brings along the following:
- FW promotion to 0.0.94
- Enable seamless boot for DCN301
- Improvements in bandwidth validation
- Fixes in flags update, link encoder assignments, DSC, ODM combine and more

Acked-by: Qingqing Zhuo <qingqing.zhuo@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 a43583c6e90e..c14e7db3f69d 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -47,7 +47,7 @@ struct aux_payload;
 struct set_config_cmd_payload;
 struct dmub_notification;
 
-#define DC_VER "3.2.162"
+#define DC_VER "3.2.163"
 
 #define MAX_SURFACES 3
 #define MAX_PLANES 6
-- 
2.25.1


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

* RE: [PATCH 00/16] DC Patches November 22nd, 2021
  2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
                   ` (15 preceding siblings ...)
  2021-11-19 19:43 ` [PATCH 16/16] drm/amd/display: 3.2.163 Qingqing Zhuo
@ 2021-11-22 14:27 ` Wheeler, Daniel
  16 siblings, 0 replies; 20+ messages in thread
From: Wheeler, Daniel @ 2021-11-22 14:27 UTC (permalink / raw)
  To: Zhuo, Qingqing (Lillian), amd-gfx
  Cc: Wang, Chao-kai (Stylon), Jacob, Anson, Li, Sun peng (Leo),
	Lakha, Bhawanpreet, Zhuo, Qingqing (Lillian),
	Siqueira, Rodrigo, Li,  Roman, Chiu, Solomon, Pillai, Aurabindo,
	Lin, Wayne, Lipski, Mikita, Wentland,  Harry, Gutierrez, Agustin,
	Kotarac, Pavle

[AMD Official Use Only]

Hi all,
 
This week this patchset was tested on the following systems:
 
Lenovo Thinkpad T14s Gen2 with AMD Ryzen 5 5650U, with 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 with 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 with 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, and 3x 1080p 60hz on all systems. Also tested DSC via USB-C to DP DSC Hub with 3x 4k 60hz on Ryzen 9 5900h and Ryzen 5 4500u.
 
Tested on Ubuntu 20.04.3 with Kernel Version 5.13
 
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
 
 
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 <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Qingqing Zhuo
Sent: November 19, 2021 2:43 PM
To: amd-gfx@lists.freedesktop.org
Cc: Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Li, Roman <Roman.Li@amd.com>; Jacob, Anson <Anson.Jacob@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Lipski, Mikita <Mikita.Lipski@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com>; Kotarac, Pavle <Pavle.Kotarac@amd.com>
Subject: [PATCH 00/16] DC Patches November 22nd, 2021

This DC patchset brings improvements in multiple areas. In summary, we highlight:
- DC 3.2.163
- FW promotion to 0.0.94
- Enable seamless boot for DCN301
- Improvements in bandwidth validation
- Fixes in flags update, link encoder assignments, DSC, ODM combine and more

Thank you,
Lillian

---

Anthony Koo (1):
  drm/amd/display: [FW Promotion] Release 0.0.94

Aric Cyr (1):
  drm/amd/display: 3.2.163

Charlene Liu (1):
  drm/amd/display: based on flag reset z10 function pointer

Guo, Bing (1):
  drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC

Martin Leung (1):
  drm/amd/display: add else to avoid double destroy clk_mgr

Mikita Lipski (1):
  drm/amd/display: fix accidental casting enum to bool

Nevenko Stupar (1):
  drm/amd/display: Display object info table changes

Nicholas Kazlauskas (4):
  drm/amd/display: Fix DPIA outbox timeout after GPU reset
  drm/amd/display: Run full global validation in dc_commit_state
  drm/amd/display: Set plane update flags for all planes in reset
  drm/amd/display: Reset link encoder assignments for GPU reset

Sung Joon Kim (1):
  drm/amd/display: retain/release at proper places in link_enc
    assignment

Yi-Ling Chen (1):
  drm/amd/display: Fixed DSC would not PG after removing DSC stream

Zhan Liu (2):
  drm/amd/display: enable seamless boot for DCN301
  drm/amd/display: Rename dcn_validate_bandwidth to
    dcn10_validate_bandwidth

sungwang (1):
  drm/amd/display: Fix ODM combine issue with fast boot

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 66 +++++++++++++------  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  3 +  .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  2 +-
 .../drm/amd/display/dc/bios/bios_parser2.c    |  6 +-
 .../gpu/drm/amd/display/dc/calcs/dcn_calcs.c  |  2 +-  .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c  |  3 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 17 +++++
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  3 +-  .../drm/amd/display/dc/core/dc_link_enc_cfg.c |  6 +-  .../gpu/drm/amd/display/dc/core/dc_resource.c |  1 -
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c |  6 +-  .../drm/amd/display/dc/dcn10/dcn10_resource.c |  2 +-
 .../drm/amd/display/dc/dcn20/dcn20_hwseq.c    |  2 +-
 .../amd/display/dc/dcn301/dcn301_resource.c   |  2 +-
 .../drm/amd/display/dc/dcn31/dcn31_hwseq.c    |  2 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_init.c |  5 ++  .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.c  | 31 ---------  .../drm/amd/display/dc/dml/dsc/rc_calc_fpu.h  |  4 --  drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c  | 28 --------  drivers/gpu/drm/amd/display/dc/dsc/rc_calc.h  |  1 -  .../gpu/drm/amd/display/dc/dsc/rc_calc_dpi.c  |  5 +-
 .../gpu/drm/amd/display/dc/inc/dcn_calcs.h    |  2 +-
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 11 +---
 24 files changed, 99 insertions(+), 113 deletions(-)

--
2.25.1

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

* Re: [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr
  2021-11-19 19:43 ` [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr Qingqing Zhuo
@ 2021-11-22 15:38   ` Deucher, Alexander
  2021-11-22 17:15     ` Zhuo, Qingqing (Lillian)
  0 siblings, 1 reply; 20+ messages in thread
From: Deucher, Alexander @ 2021-11-22 15:38 UTC (permalink / raw)
  To: Zhuo, Qingqing (Lillian), amd-gfx
  Cc: Wang, Chao-kai (Stylon),
	Cyr, Aric, Jacob, Anson, Li, Sun peng (Leo),
	Lakha, Bhawanpreet, Lin, Wayne, Siqueira, Rodrigo, Li, Roman,
	Chiu, Solomon, Pillai, Aurabindo, Leung, Martin, Lipski, Mikita,
	Wentland, Harry, Gutierrez, Agustin, Kotarac, Pavle

[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]

[Public]

Do you want to change the ASICREV_IS_BEIGE_GOBY_P() check to else if as well?  maybe something like:

if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev) ||
    ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev) ||
     ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev))
         dcn3_clk_mgr_destroy(clk_mgr);

Alex
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Qingqing Zhuo <qingqing.zhuo@amd.com>
Sent: Friday, November 19, 2021 2:43 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Cyr, Aric <Aric.Cyr@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com>; Leung, Martin <Martin.Leung@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Li, Roman <Roman.Li@amd.com>; Jacob, Anson <Anson.Jacob@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Lipski, Mikita <Mikita.Lipski@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com>; Kotarac, Pavle <Pavle.Kotarac@amd.com>
Subject: [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr

From: Martin Leung <Martin.Leung@amd.com>

[Why & How]
when changing some code we accidentally
changed else if-> if. reverting that.

Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Martin Leung <Martin.Leung@amd.com>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
index 26f96ee32472..9200c8ce02ba 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
@@ -308,8 +308,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
         case FAMILY_NV:
                 if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
                         dcn3_clk_mgr_destroy(clk_mgr);
-               }
-               if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
+               } else if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
                         dcn3_clk_mgr_destroy(clk_mgr);
                 }
                 if (ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
--
2.25.1


[-- Attachment #2: Type: text/html, Size: 5532 bytes --]

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

* RE: [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr
  2021-11-22 15:38   ` Deucher, Alexander
@ 2021-11-22 17:15     ` Zhuo, Qingqing (Lillian)
  0 siblings, 0 replies; 20+ messages in thread
From: Zhuo, Qingqing (Lillian) @ 2021-11-22 17:15 UTC (permalink / raw)
  To: Deucher, Alexander, amd-gfx
  Cc: Wang, Chao-kai (Stylon),
	Cyr, Aric, Jacob, Anson, Li, Sun peng (Leo),
	Lakha, Bhawanpreet, Lin, Wayne, Siqueira, Rodrigo, Li, Roman,
	Chiu, Solomon, Pillai, Aurabindo, Leung, Martin, Lipski, Mikita,
	Wentland, Harry, Gutierrez, Agustin, Kotarac, Pavle

[-- Attachment #1: Type: text/plain, Size: 4540 bytes --]

[Public]

Hi Alex,

Thank you for the advice! Last week's DC candidate has in fact already been merged to upstream, but I will bring up your suggestion to the patch author for review.

Thank you,
Lillian
From: Deucher, Alexander <Alexander.Deucher@amd.com>
Sent: Monday, November 22, 2021 10:38 AM
To: Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com>; Cyr, Aric <Aric.Cyr@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Leung, Martin <Martin.Leung@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Li, Roman <Roman.Li@amd.com>; Jacob, Anson <Anson.Jacob@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Lipski, Mikita <Mikita.Lipski@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com>; Kotarac, Pavle <Pavle.Kotarac@amd.com>
Subject: Re: [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr


[Public]

Do you want to change the ASICREV_IS_BEIGE_GOBY_P() check to else if as well?  maybe something like:

if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev) ||
    ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev) ||
     ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev))
         dcn3_clk_mgr_destroy(clk_mgr);

Alex
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Qingqing Zhuo <qingqing.zhuo@amd.com<mailto:qingqing.zhuo@amd.com>>
Sent: Friday, November 19, 2021 2:43 PM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> <amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>
Cc: Wang, Chao-kai (Stylon) <Stylon.Wang@amd.com<mailto:Stylon.Wang@amd.com>>; Cyr, Aric <Aric.Cyr@amd.com<mailto:Aric.Cyr@amd.com>>; Chiu, Solomon <Solomon.Chiu@amd.com<mailto:Solomon.Chiu@amd.com>>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com<mailto:Sunpeng.Li@amd.com>>; Wentland, Harry <Harry.Wentland@amd.com<mailto:Harry.Wentland@amd.com>>; Zhuo, Qingqing (Lillian) <Qingqing.Zhuo@amd.com<mailto:Qingqing.Zhuo@amd.com>>; Leung, Martin <Martin.Leung@amd.com<mailto:Martin.Leung@amd.com>>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com<mailto:Rodrigo.Siqueira@amd.com>>; Li, Roman <Roman.Li@amd.com<mailto:Roman.Li@amd.com>>; Jacob, Anson <Anson.Jacob@amd.com<mailto:Anson.Jacob@amd.com>>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com<mailto:Aurabindo.Pillai@amd.com>>; Lin, Wayne <Wayne.Lin@amd.com<mailto:Wayne.Lin@amd.com>>; Lipski, Mikita <Mikita.Lipski@amd.com<mailto:Mikita.Lipski@amd.com>>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com<mailto:Bhawanpreet.Lakha@amd.com>>; Gutierrez, Agustin <Agustin.Gutierrez@amd.com<mailto:Agustin.Gutierrez@amd.com>>; Kotarac, Pavle <Pavle.Kotarac@amd.com<mailto:Pavle.Kotarac@amd.com>>
Subject: [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr

From: Martin Leung <Martin.Leung@amd.com<mailto:Martin.Leung@amd.com>>

[Why & How]
when changing some code we accidentally
changed else if-> if. reverting that.

Reviewed-by: Aric Cyr <Aric.Cyr@amd.com<mailto:Aric.Cyr@amd.com>>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com<mailto:qingqing.zhuo@amd.com>>
Signed-off-by: Martin Leung <Martin.Leung@amd.com<mailto:Martin.Leung@amd.com>>
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
index 26f96ee32472..9200c8ce02ba 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
@@ -308,8 +308,7 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
         case FAMILY_NV:
                 if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
                         dcn3_clk_mgr_destroy(clk_mgr);
-               }
-               if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
+               } else if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
                         dcn3_clk_mgr_destroy(clk_mgr);
                 }
                 if (ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
--
2.25.1

[-- Attachment #2: Type: text/html, Size: 10352 bytes --]

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

end of thread, other threads:[~2021-11-22 17:15 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 19:43 [PATCH 00/16] DC Patches November 22nd, 2021 Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 01/16] drm/amd/display: Fix DPIA outbox timeout after GPU reset Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 02/16] drm/amd/display: based on flag reset z10 function pointer Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 03/16] drm/amd/display: Run full global validation in dc_commit_state Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 04/16] drm/amd/display: enable seamless boot for DCN301 Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 05/16] drm/amd/display: Set plane update flags for all planes in reset Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 06/16] drm/amd/display: fixed an error related to 4:2:0/4:2:2 DSC Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 07/16] drm/amd/display: Reset link encoder assignments for GPU reset Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 08/16] drm/amd/display: Rename dcn_validate_bandwidth to dcn10_validate_bandwidth Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 09/16] drm/amd/display: retain/release at proper places in link_enc assignment Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 10/16] drm/amd/display: fix accidental casting enum to bool Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 11/16] drm/amd/display: Display object info table changes Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 12/16] drm/amd/display: Fixed DSC would not PG after removing DSC stream Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 13/16] drm/amd/display: Fix ODM combine issue with fast boot Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 14/16] drm/amd/display: add else to avoid double destroy clk_mgr Qingqing Zhuo
2021-11-22 15:38   ` Deucher, Alexander
2021-11-22 17:15     ` Zhuo, Qingqing (Lillian)
2021-11-19 19:43 ` [PATCH 15/16] drm/amd/display: [FW Promotion] Release 0.0.94 Qingqing Zhuo
2021-11-19 19:43 ` [PATCH 16/16] drm/amd/display: 3.2.163 Qingqing Zhuo
2021-11-22 14:27 ` [PATCH 00/16] DC Patches November 22nd, 2021 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.