Skip to contentSkip to conversation

DC Patches Jan 22, 2021

PATCH In review Anson Jacob 2 participants 15 messages Jan 22, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover DC Patches Jan 22, 2021

This DC patchset brings improvements in multiple areas. In summary, we have:

* Fix display detection on HDMI ComboPHY
* FiX PWL backlight calculations
* Drop SOC bounding box hookup
* Fix DPCD values
* Reverted a change that caused memory leak after sleep(S3) state on 4K HDMI displays

Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.49 drm/amd/display: fix calculation for the pwl backlight curve

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

Bhawanpreet Lakha (1):
drm/amd/display: reuse current context instead of recreating one

Brendan Steve Leder (1):
drm/amd/display: initialize i2c speed if not initialized in
dcnxxx__resource.c

George Shen (1):
drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL

Lewis Huang (1):
drm/amd/display: Set power gated default to true in seamless boot pipe

Michael Strauss (1):
drm/amd/display: Add null pointer check to is_dig_enabled func

Nicholas Kazlauskas (1):
drm/amd/display: Drop SOC bounding box hookup in DM/DC

Stylon Wang (1):
drm/amd/display: revert "drm/amd/display: Fix EDID parsing after
resume from suspend"

Sung Lee (1):
drm/amd/display: Add more Clock Sources to DCN2.1

Wenjing Liu (1):
drm/amd/display: correct some hdcp variable naming

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  30 ++---
 .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c    |   7 +-
 .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c    |   3 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  32 +++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  14 +--
 .../gpu/drm/amd/display/dc/core/dc_link_dp.c  |   6 +-
 drivers/gpu/drm/amd/display/dc/dc.h           |   8 +-
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |   3 +-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c |   1 +
 .../drm/amd/display/dc/dcn20/dcn20_resource.c | 111 ------------------
 .../drm/amd/display/dc/dcn21/dcn21_resource.c |  10 ++
 .../drm/amd/display/dc/dcn30/dcn30_resource.c | 107 +----------------
 .../amd/display/dc/dcn301/dcn301_resource.c   | 107 +----------------
 drivers/gpu/drm/amd/display/dc/dm_cp_psp.h    |   7 +-
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |   5 +-
 .../gpu/drm/amd/display/modules/hdcp/hdcp.h   |   2 +-
 .../drm/amd/display/modules/hdcp/hdcp_psp.c   |   2 +-
 .../drm/amd/display/modules/inc/mod_hdcp.h    |   4 +-
 .../amd/display/modules/power/power_helpers.c |   2 +-
 19 files changed, 80 insertions(+), 381 deletions(-)
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

PATCH 1/12 drm/amd/display: Drop SOC bounding box hookup in DM/DC

From: Nicholas Kazlauskas <[email protected]>

[Why]
There aren't any ASIC where we use these binaries and they aren't useful for future use since it's inconvenient to extend and maintain these structures.

[How]
Drop the support from DM and DC for now.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 -
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   1 -
 drivers/gpu/drm/amd/display/dc/dc.h           |   6 -
 .../drm/amd/display/dc/dcn20/dcn20_resource.c | 111 ------------------
 .../drm/amd/display/dc/dcn30/dcn30_resource.c | 107 +----------------
 .../amd/display/dc/dcn301/dcn301_resource.c   | 107 +----------------
 6 files changed, 4 insertions(+), 330 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -2
index e490fc2486f7..a63aec164628 100644
@@ -1015,8 +1015,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.flags.power_down_display_on_boot = true;
 
-	init_data.soc_bounding_box = adev->dm.soc_bounding_box;
-
 	/* Display Core create. */
 	adev->dm.dc = dc_create(&init_data);
 
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -1
index 89e8e3e11862..aa9913092b92 100644
@@ -712,7 +712,6 @@ static bool dc_construct(struct dc *dc,
 	}
 
 	dc->dcn_ip = dcn_ip;
-	dc->soc_bounding_box = init_params->soc_bounding_box;
 #endif
 
 	if (!dc_construct_ctx(dc, init_params)) {
drivers/gpu/drm/amd/display/dc/dc.h +0 -6
index 28e0b6ac1f50..a41bd5a1a187 100644
@@ -636,7 +636,6 @@ struct dc {
 
 	const char *build_id;
 	struct vm_helper *vm_helper;
-	const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
 };
 
 enum frame_buffer_mode {
@@ -674,11 +673,6 @@ struct dc_init_data {
 	struct dc_config flags;
 	uint64_t log_mask;
 
-	/**
-	 * gpu_info FW provided soc bounding box struct or 0 if not
-	 * available in FW
-	 */
-	const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
 	struct dpcd_vendor_signature vendor_signature;
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 	bool force_smu_not_present;
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +0 -111

123 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +2 -105

127 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +2 -105

126 lines not on this page · raw message

Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

PATCH 2/12 drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL

In reply to Anson Jacob

From: George Shen <[email protected]>

[Why]
The translation between the DPCD value and the specified AUX_RD_INTERVAL in the DP spec do not match.

[How]
Update values to match the spec.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +3 -3
index 4149b8771462..78857c97289d 100644
@@ -892,13 +892,13 @@ static uint32_t translate_training_aux_read_interval(uint32_t dpcd_aux_read_inte
 
 	switch (dpcd_aux_read_interval) {
 	case 0x01:
-		aux_rd_interval_us = 400;
+		aux_rd_interval_us = 4000;
 		break;
 	case 0x02:
-		aux_rd_interval_us = 4000;
+		aux_rd_interval_us = 8000;
 		break;
 	case 0x03:
-		aux_rd_interval_us = 8000;
+		aux_rd_interval_us = 12000;
 		break;
 	case 0x04:
 		aux_rd_interval_us = 16000;
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw

PATCH 3/12 drm/amd/display: initialize i2c speed if not initialized in dcnxxx__resource.c

In reply to Anson Jacob

From: Brendan Steve Leder <[email protected]>

Some dcnxxx__resource.c do not initialize the i2c speed; this patch adds the required initialization at dc_construct().

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
index aa9913092b92..aa89e521afe9 100644
@@ -761,6 +761,10 @@ static bool dc_construct(struct dc *dc,
 	if (!dc->res_pool)
 		goto fail;
 
+	/* center place to initialize */
+	if (dc->caps.i2c_speed_in_khz_hdcp == 0)
+		dc->caps.i2c_speed_in_khz_hdcp = dc->caps.i2c_speed_in_khz;
+
 	dc->clk_mgr = dc_clk_mgr_create(dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg);
 	if (!dc->clk_mgr)
 		goto fail;
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#5 lore raw

PATCH 5/12 drm/amd/display: reuse current context instead of recreating one

In reply to Anson Jacob

From: Bhawanpreet Lakha <[email protected]>

[Why]
Currently we discard the current context and recreate it. The current context is what is applied to the HW so we should be re-using this rather than creating a new context.

Recreating the context can lead to mismatch between new context and the current context

For example: gsl groups get changed when we create a new context this can cause issues in a multi display config (with flip immediate) because we don't align the existing gsl groups in the new and current context. If we reuse the current context the gsl group assignment stays the same.

[How]
Instead of discarding the current context, copy the current state and add/remove planes and streams.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 +++++++++----------
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 27 +++++++++++++------
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |  3 +--
 3 files changed, 32 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 -15
index a63aec164628..7a2aee616755 100644
@@ -1936,7 +1936,7 @@ static void dm_gpureset_commit_state(struct dc_state *dc_state,
 		dc_commit_updates_for_stream(
 			dm->dc, bundle->surface_updates,
 			dc_state->stream_status->plane_count,
-			dc_state->streams[k], &bundle->stream_update, dc_state);
+			dc_state->streams[k], &bundle->stream_update);
 	}
 
 cleanup:
@@ -1967,8 +1967,7 @@ static void dm_set_dpms_off(struct dc_link *link)
 
 	stream_update.stream = stream_state;
 	dc_commit_updates_for_stream(stream_state->ctx->dc, NULL, 0,
-				     stream_state, &stream_update,
-				     stream_state->ctx->dc->current_state);
+				     stream_state, &stream_update);
 	mutex_unlock(&adev->dm.dc_lock);
 }
 
@@ -7730,7 +7729,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 				    struct drm_crtc *pcrtc,
 				    bool wait_for_vblank)
 {
-	uint32_t i;
+	int i;
 	uint64_t timestamp_ns;
 	struct drm_plane *plane;
 	struct drm_plane_state *old_plane_state, *new_plane_state;
@@ -7771,7 +7770,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		amdgpu_dm_commit_cursors(state);
 
 	/* update planes when needed */
-	for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
+	for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
 		struct drm_crtc *crtc = new_plane_state->crtc;
 		struct drm_crtc_state *new_crtc_state;
 		struct drm_framebuffer *fb = new_plane_state->fb;
@@ -7994,8 +7993,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 						     bundle->surface_updates,
 						     planes_count,
 						     acrtc_state->stream,
-						     &bundle->stream_update,
-						     dc_state);
+						     &bundle->stream_update);
 
 		/**
 		 * Enable or disable the interrupts on the backend.
@@ -8331,13 +8329,13 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 		struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
 		struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
 		struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
-		struct dc_surface_update dummy_updates[MAX_SURFACES];
+		struct dc_surface_update surface_updates[MAX_SURFACES];
 		struct dc_stream_update stream_update;
 		struct dc_info_packet hdr_packet;
 		struct dc_stream_status *status = NULL;
 		bool abm_changed, hdr_changed, scaling_changed;
 
-		memset(&dummy_updates, 0, sizeof(dummy_updates));
+		memset(&surface_updates, 0, sizeof(surface_updates));
 		memset(&stream_update, 0, sizeof(stream_update));
 
 		if (acrtc) {
@@ -8394,16 +8392,15 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 		 * To fix this, DC should permit updating only stream properties.
 		 */
 		for (j = 0; j < status->plane_count; j++)
-			dummy_updates[j].surface = status->plane_states[0];
+			surface_updates[j].surface = status->plane_states[j];
 
 
 		mutex_lock(&dm->dc_lock);
 		dc_commit_updates_for_stream(dm->dc,
-						     dummy_updates,
-						     status->plane_count,
-						     dm_new_crtc_state->stream,
-						     &stream_update,
-						     dc_state);
+						surface_updates,
+						status->plane_count,
+						dm_new_crtc_state->stream,
+						&stream_update);
 		mutex_unlock(&dm->dc_lock);
 	}
 
drivers/gpu/drm/amd/display/dc/core/dc.c +19 -8
index aa89e521afe9..24c4923c6be0 100644
@@ -2695,8 +2695,7 @@ void dc_commit_updates_for_stream(struct dc *dc,
 		struct dc_surface_update *srf_updates,
 		int surface_count,
 		struct dc_stream_state *stream,
-		struct dc_stream_update *stream_update,
-		struct dc_state *state)
+		struct dc_stream_update *stream_update)
 {
 	const struct dc_stream_status *stream_status;
 	enum surface_update_type update_type;
@@ -2715,6 +2714,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
 
 
 	if (update_type >= UPDATE_TYPE_FULL) {
+		struct dc_plane_state *new_planes[MAX_SURFACES];
+
+		memset(new_planes, 0, sizeof(new_planes));
+
+		for (i = 0; i < surface_count; i++)
+			new_planes[i] = srf_updates[i].surface;
 
 		/* initialize scratch memory for building context */
 		context = dc_create_state(dc);
@@ -2723,15 +2728,21 @@ void dc_commit_updates_for_stream(struct dc *dc,
 			return;
 		}
 
-		dc_resource_state_copy_construct(state, context);
+		dc_resource_state_copy_construct(
+				dc->current_state, context);
 
-		for (i = 0; i < dc->res_pool->pipe_count; i++) {
-			struct pipe_ctx *new_pipe = &context->res_ctx.pipe_ctx[i];
-			struct pipe_ctx *old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
+		/* remove old surfaces from context */
+		if (!dc_rem_all_planes_for_stream(dc, stream, context)) {
+			DC_ERROR("Failed to remove streams for new validate context!\n");
+			return;
+		}
 
-			if (new_pipe->plane_state && new_pipe->plane_state != old_pipe->plane_state)
-				new_pipe->plane_state->force_full_update = true;
+		/* add surface to context */
+		if (!dc_add_all_planes_for_stream(dc, stream, new_planes, surface_count, context)) {
+			DC_ERROR("Failed to add streams for new validate context!\n");
+			return;
 		}
+
 	}
 
 
drivers/gpu/drm/amd/display/dc/dc_stream.h +1 -2
index 80b67b860091..a4f7ec888c67 100644
@@ -294,8 +294,7 @@ void dc_commit_updates_for_stream(struct dc *dc,
 		struct dc_surface_update *srf_updates,
 		int surface_count,
 		struct dc_stream_state *stream,
-		struct dc_stream_update *stream_update,
-		struct dc_state *state);
+		struct dc_stream_update *stream_update);
 /*
  * Log the current stream state.
  */
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#6 lore raw

PATCH 6/12 drm/amd/display: Set power gated default to true in seamless boot pipe

In reply to Anson Jacob

From: Lewis Huang <[email protected]>

[Why]
OS sequence will cause this flag didn't clear.
In seamless boot but without flip case. This flag didn't clear when reset path mode because the plane_state is null
1. OS call setting with clone/extended
2. Reset path mode to remove edp.

[How]
Set power gated default to true in seamless boot pipe

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -0
index 7a30d1d9b535..2f315a47b765 100644
@@ -1224,6 +1224,7 @@ void dcn10_init_pipes(struct dc *dc, struct dc_state *context)
 			// signals when OTG blanked. This is to prevent pipe from
 			// requesting data while in PSR.
 			tg->funcs->tg_init(tg);
+			hubp->power_gated = true;
 			continue;
 		}
 
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#4 lore raw

PATCH 4/12 drm/amd/display: Add null pointer check to is_dig_enabled func

In reply to Anson Jacob

From: Michael Strauss <[email protected]>

[WHY]
Safeguarding as pointer may be null in diagnostic environment

---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c +2 -1
index 991b9c5beaa3..aadb801447a7 100644
@@ -75,7 +75,8 @@ int vg_get_active_display_cnt_wa(
 		const struct dc_link *link = dc->links[i];
 
 		/* abusing the fact that the dig and phy are coupled to see if the phy is enabled */
-		if (link->link_enc->funcs->is_dig_enabled(link->link_enc))
+		if (link->link_enc->funcs->is_dig_enabled &&
+				link->link_enc->funcs->is_dig_enabled(link->link_enc))
 			display_count++;
 	}
 
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#7 lore raw

PATCH 7/12 drm/amd/display: correct some hdcp variable naming

In reply to Anson Jacob

From: Wenjing Liu <[email protected]>

[why]
In HDCP update stream config interface, some variables are named as xxx_supported, but in fact the variable indicates whether or not xxx_enabled. Correct the naming so it is less confusing to read the code.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c |  7 ++++---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      | 14 +++++++-------
 drivers/gpu/drm/amd/display/dc/dm_cp_psp.h         |  7 ++++---
 drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h    |  2 +-
 .../gpu/drm/amd/display/modules/hdcp/hdcp_psp.c    |  2 +-
 drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h |  4 ++--
 6 files changed, 19 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +4 -3
index c2cd184f0bbd..b297ddc24d3a 100644
@@ -449,11 +449,12 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
 		link->mode = mod_hdcp_signal_type_to_operation_mode(aconnector->dc_sink->sink_signal);
 
 	display->controller = CONTROLLER_ID_D0 + config->otg_inst;
-	display->dig_fe = config->stream_enc_inst;
-	link->dig_be = config->link_enc_inst;
+	display->dig_fe = config->dig_fe;
+	link->dig_be = config->dig_be;
 	link->ddc_line = aconnector->dc_link->ddc_hw_inst + 1;
 	link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
-	link->dp.mst_supported = config->mst_supported;
+	link->dp.assr_enabled = config->assr_enabled;
+	link->dp.mst_enabled = config->mst_enabled;
 	display->adjust.disable = 1;
 	link->adjust.auth_delay = 3;
 	link->adjust.hdcp1.disable = 0;
drivers/gpu/drm/amd/display/dc/core/dc_link.c +7 -7
index c16af3983fdb..60bf091dc123 100644
@@ -3169,17 +3169,17 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
 {
 	struct cp_psp *cp_psp = &pipe_ctx->stream->ctx->cp_psp;
 	if (cp_psp && cp_psp->funcs.update_stream_config) {
-		struct cp_psp_stream_config config;
-
-		memset(&config, 0, sizeof(config));
+		struct cp_psp_stream_config config = {0};
+		enum dp_panel_mode panel_mode =
+				dp_get_panel_mode(pipe_ctx->stream->link);
 
 		config.otg_inst = (uint8_t) pipe_ctx->stream_res.tg->inst;
-		/*stream_enc_inst*/
-		config.stream_enc_inst = (uint8_t) pipe_ctx->stream_res.stream_enc->stream_enc_inst;
-		config.link_enc_inst = pipe_ctx->stream->link->link_enc_hw_inst;
+		config.dig_fe = (uint8_t) pipe_ctx->stream_res.stream_enc->stream_enc_inst;
+		config.dig_be = pipe_ctx->stream->link->link_enc_hw_inst;
 		config.dpms_off = dpms_off;
 		config.dm_stream_ctx = pipe_ctx->stream->dm_stream_context;
-		config.mst_supported = (pipe_ctx->stream->signal ==
+		config.assr_enabled = (panel_mode == DP_PANEL_MODE_EDP);
+		config.mst_enabled = (pipe_ctx->stream->signal ==
 				SIGNAL_TYPE_DISPLAY_PORT_MST);
 		cp_psp->funcs.update_stream_config(cp_psp->handle, &config);
 	}
drivers/gpu/drm/amd/display/dc/dm_cp_psp.h +4 -3
index 5da7677627a1..cac0b2c0d31b 100644
@@ -30,9 +30,10 @@ struct dc_link;
 
 struct cp_psp_stream_config {
 	uint8_t otg_inst;
-	uint8_t link_enc_inst;
-	uint8_t stream_enc_inst;
-	uint8_t mst_supported;
+	uint8_t dig_be;
+	uint8_t dig_fe;
+	uint8_t assr_enabled;
+	uint8_t mst_enabled;
 	void *dm_stream_ctx;
 	bool dpms_off;
 };
drivers/gpu/drm/amd/display/modules/hdcp/hdcp.h +1 -1
index 6c678cfb82e3..5c22cf7e6118 100644
@@ -397,7 +397,7 @@ static inline uint8_t is_dp_hdcp(struct mod_hdcp *hdcp)
 static inline uint8_t is_dp_mst_hdcp(struct mod_hdcp *hdcp)
 {
 	return (hdcp->connection.link.mode == MOD_HDCP_MODE_DP &&
-			hdcp->connection.link.dp.mst_supported);
+			hdcp->connection.link.dp.mst_enabled);
 }
 
 static inline uint8_t is_hdmi_dvi_sl_hdcp(struct mod_hdcp *hdcp)
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c +1 -1
index 3a367a5968ae..b26ed64eaf98 100644
@@ -106,7 +106,7 @@ enum mod_hdcp_status mod_hdcp_add_display_to_topology(struct mod_hdcp *hdcp,
 	dtm_cmd->dtm_in_message.topology_update_v2.dig_be = link->dig_be;
 	dtm_cmd->dtm_in_message.topology_update_v2.dig_fe = display->dig_fe;
 	if (is_dp_hdcp(hdcp))
-		dtm_cmd->dtm_in_message.topology_update_v2.is_assr = link->dp.assr_supported;
+		dtm_cmd->dtm_in_message.topology_update_v2.is_assr = link->dp.assr_enabled;
 
 	dtm_cmd->dtm_in_message.topology_update_v2.dp_mst_vcid = display->vc_id;
 	dtm_cmd->dtm_in_message.topology_update_v2.max_hdcp_supported_version =
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h +2 -2
index eed560eecbab..d223ed3be5d3 100644
@@ -101,8 +101,8 @@ enum mod_hdcp_status {
 
 struct mod_hdcp_displayport {
 	uint8_t rev;
-	uint8_t assr_supported;
-	uint8_t mst_supported;
+	uint8_t assr_enabled;
+	uint8_t mst_enabled;
 };
 
 struct mod_hdcp_hdmi {
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#9 lore raw

PATCH 9/12 drm/amd/display: [FW Promotion] Release 0.0.49

In reply to Anson Jacob

From: Anthony Koo <[email protected]>

- Add field for passing line time for a frame

---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +3 -2
index a50bdd6c7131..78841fe7e30d 100644
@@ -47,10 +47,10 @@
 
 /* Firmware versioning. */
 #ifdef DMUB_EXPOSE_VERSION
-#define DMUB_FW_VERSION_GIT_HASH 0xf09c02ae3
+#define DMUB_FW_VERSION_GIT_HASH 0xf2f2f3a96
 #define DMUB_FW_VERSION_MAJOR 0
 #define DMUB_FW_VERSION_MINOR 0
-#define DMUB_FW_VERSION_REVISION 48
+#define DMUB_FW_VERSION_REVISION 49
 #define DMUB_FW_VERSION_TEST 0
 #define DMUB_FW_VERSION_VBIOS 0
 #define DMUB_FW_VERSION_HOTFIX 0
@@ -648,6 +648,7 @@ struct dmub_cmd_psr_copy_settings_data {
 	uint8_t multi_disp_optimizations_en;
 	uint16_t init_sdp_deadline;
 	uint16_t pad2;
+	uint32_t line_time_in_us;
 };
 
 struct dmub_rb_cmd_psr_copy_settings {
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#8 lore raw

PATCH 8/12 drm/amd/display: Add more Clock Sources to DCN2.1

In reply to Anson Jacob

From: Sung Lee <[email protected]>

[WHY]
When enabling HDMI on ComboPHY, there is not enough clock sources to complete display detection.

[HOW]
Initialize more clock sources.

---
 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +10 -0
index b000b43a820d..674376428916 100644
@@ -906,6 +906,8 @@ enum dcn20_clk_src_array_id {
 	DCN20_CLK_SRC_PLL0,
 	DCN20_CLK_SRC_PLL1,
 	DCN20_CLK_SRC_PLL2,
+	DCN20_CLK_SRC_PLL3,
+	DCN20_CLK_SRC_PLL4,
 	DCN20_CLK_SRC_TOTAL_DCN21
 };
 
@@ -2030,6 +2032,14 @@ static bool dcn21_resource_construct(
 			dcn21_clock_source_create(ctx, ctx->dc_bios,
 				CLOCK_SOURCE_COMBO_PHY_PLL2,
 				&clk_src_regs[2], false);
+	pool->base.clock_sources[DCN20_CLK_SRC_PLL3] =
+			dcn21_clock_source_create(ctx, ctx->dc_bios,
+				CLOCK_SOURCE_COMBO_PHY_PLL3,
+				&clk_src_regs[3], false);
+	pool->base.clock_sources[DCN20_CLK_SRC_PLL4] =
+			dcn21_clock_source_create(ctx, ctx->dc_bios,
+				CLOCK_SOURCE_COMBO_PHY_PLL4,
+				&clk_src_regs[4], false);
 
 	pool->base.clk_src_count = DCN20_CLK_SRC_TOTAL_DCN21;
 
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#12 lore raw

PATCH 12/12 drm/amd/display: revert "drm/amd/display: Fix EDID parsing after resume from suspend"

In reply to Anson Jacob

From: Stylon Wang <[email protected]>

This reverts commit b24bdc37d03a0478189e20a50286092840f414fa. It caused memory leak after S3 on 4K HDMI displays.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 7a2aee616755..6566912dff71 100644
@@ -2348,7 +2348,6 @@ void amdgpu_dm_update_connector_after_detect(
 
 			drm_connector_update_edid_property(connector,
 							   aconnector->edid);
-			drm_add_edid_modes(connector, aconnector->edid);
 
 			if (aconnector->dc_link->aux_mode)
 				drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#10 lore raw

PATCH 10/12 drm/amd/display: 3.2.120

In reply to Anson Jacob

From: Aric Cyr <[email protected]>

This DC update brings improvements in multiple areas. In summary, we highlight:
- Fix display detection on HDMI ComboPHY
- Drop SOC bounding box hookup
- Fix DPCD values

---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index a41bd5a1a187..40227e09b6d5 100644
@@ -42,7 +42,7 @@
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.2.119"
+#define DC_VER "3.2.120"
 
 #define MAX_SURFACES 3
 #define MAX_PLANES 6
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#11 lore raw

PATCH 11/12 drm/amd/display: fix calculation for the pwl backlight curve

In reply to Anson Jacob

From: Anthony Koo <[email protected]>

[Why]
The PWL backlight curve is used by the firmware to convert between brightness and linear PWM value.
Driver has a backlight LUT, but the firmware holds a PWL curve and interpolates between points.

The calculations are incorrect leading to slightly off backlight values being programmed.

[How]
Fix the PWL backlight curve threshold/offset calculations

---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +1 -1
index 3d4c66933f51..6270ecbd2438 100644
@@ -266,7 +266,7 @@ static void fill_backlight_transform_table_v_2_2(struct dmcu_iram_parameters par
 	 * format U4.10.
 	 */
 	for (i = 1; i+1 < num_entries; i++) {
-		lut_index = (params.backlight_lut_array_size - 1) * i / (num_entries - 1);
+		lut_index = DIV_ROUNDUP((i * params.backlight_lut_array_size), num_entries);
 		ASSERT(lut_index < params.backlight_lut_array_size);
 
 		table->backlight_thresholds[i] = (big_endian) ?
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Tested-by on the v1 series
#13 lore raw
In reply to Anson Jacob

[AMD Public Use]

Hi all,

This week I tested on an AMD Radeon RX 6800, and a HP Envy 360 with an AMD Ryzen 5 4500U APU. This week we are not recommending a promotion due to multiple visual impacts with MST.

Thank you,

Dan Wheeler
Technologist  |  AMD
SW Display
O +(1) 905-882-2600 ext. 74665
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook |  Twitter |  amd.com

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Anson Jacob
Sent: January 22, 2021 3:07 PM
To: [email protected]
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 00/12] DC Patches Jan 22, 2021

This DC patchset brings improvements in multiple areas. In summary, we have:

* Fix display detection on HDMI ComboPHY
* FiX PWL backlight calculations
* Drop SOC bounding box hookup
* Fix DPCD values
* Reverted a change that caused memory leak after sleep(S3) state on 4K HDMI displays

Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.49 drm/amd/display: fix calculation for the pwl backlight curve

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

Bhawanpreet Lakha (1):
drm/amd/display: reuse current context instead of recreating one

Brendan Steve Leder (1):
drm/amd/display: initialize i2c speed if not initialized in
dcnxxx__resource.c

George Shen (1):
drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL

Lewis Huang (1):
drm/amd/display: Set power gated default to true in seamless boot pipe

Michael Strauss (1):
drm/amd/display: Add null pointer check to is_dig_enabled func

Nicholas Kazlauskas (1):
drm/amd/display: Drop SOC bounding box hookup in DM/DC

Stylon Wang (1):
drm/amd/display: revert "drm/amd/display: Fix EDID parsing after
resume from suspend"

Sung Lee (1):
drm/amd/display: Add more Clock Sources to DCN2.1

Wenjing Liu (1):
drm/amd/display: correct some hdcp variable naming

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  30 ++---
 .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c    |   7 +-
 .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c    |   3 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  32 +++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  14 +--
 .../gpu/drm/amd/display/dc/core/dc_link_dp.c  |   6 +-
 drivers/gpu/drm/amd/display/dc/dc.h           |   8 +-
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |   3 +-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c |   1 +
 .../drm/amd/display/dc/dcn20/dcn20_resource.c | 111 ------------------  .../drm/amd/display/dc/dcn21/dcn21_resource.c |  10 ++  .../drm/amd/display/dc/dcn30/dcn30_resource.c | 107 +----------------
 .../amd/display/dc/dcn301/dcn301_resource.c   | 107 +----------------
 drivers/gpu/drm/amd/display/dc/dm_cp_psp.h    |   7 +-
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |   5 +-
 .../gpu/drm/amd/display/modules/hdcp/hdcp.h   |   2 +-
 .../drm/amd/display/modules/hdcp/hdcp_psp.c   |   2 +-
 .../drm/amd/display/modules/inc/mod_hdcp.h    |   4 +-
 .../amd/display/modules/power/power_helpers.c |   2 +-
 19 files changed, 80 insertions(+), 381 deletions(-)

--
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cdaniel.wheeler%40amd.com%7Cb1754266d1e248b56d5808d8bf1149ea%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637469428281419527%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=0NfFlEvn54wU5sYNiWqVcczahkKKgb7ByVZOax%2Fs3Zk%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Tested-by
#14 lore raw

[AMD Public Use]

Disregard the tested by portion. Forgot to remove it from my email template, sorry for the confusion.

To confirm, please do not apply this patch set.

Thank you,

Dan Wheeler
Technologist  |  AMD
SW Display
O +(1) 905-882-2600 ext. 74665
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook |  Twitter |  amd.com

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Wheeler, Daniel
Sent: January 22, 2021 5:33 PM
To: Jacob, Anson <[email protected]>; [email protected]
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Lakha, Bhawanpreet <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Wentland, Harry <[email protected]>; R, Bindu <[email protected]>
Subject: RE: [PATCH 00/12] DC Patches Jan 22, 2021

[AMD Public Use]

Hi all,

This week I tested on an AMD Radeon RX 6800, and a HP Envy 360 with an AMD Ryzen 5 4500U APU. This week we are not recommending a promotion due to multiple visual impacts with MST.

Thank you,

Dan Wheeler
Technologist  |  AMD
SW Display
O +(1) 905-882-2600 ext. 74665
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6 Facebook |  Twitter |  amd.com

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Anson Jacob
Sent: January 22, 2021 3:07 PM
To: [email protected]
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 00/12] DC Patches Jan 22, 2021

This DC patchset brings improvements in multiple areas. In summary, we have:

* Fix display detection on HDMI ComboPHY
* FiX PWL backlight calculations
* Drop SOC bounding box hookup
* Fix DPCD values
* Reverted a change that caused memory leak after sleep(S3) state on 4K HDMI displays

Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.49 drm/amd/display: fix calculation for the pwl backlight curve

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

Bhawanpreet Lakha (1):
drm/amd/display: reuse current context instead of recreating one

Brendan Steve Leder (1):
drm/amd/display: initialize i2c speed if not initialized in
dcnxxx__resource.c

George Shen (1):
drm/amd/display: Fix DPCD translation for LTTPR AUX_RD_INTERVAL

Lewis Huang (1):
drm/amd/display: Set power gated default to true in seamless boot pipe

Michael Strauss (1):
drm/amd/display: Add null pointer check to is_dig_enabled func

Nicholas Kazlauskas (1):
drm/amd/display: Drop SOC bounding box hookup in DM/DC

Stylon Wang (1):
drm/amd/display: revert "drm/amd/display: Fix EDID parsing after
resume from suspend"

Sung Lee (1):
drm/amd/display: Add more Clock Sources to DCN2.1

Wenjing Liu (1):
drm/amd/display: correct some hdcp variable naming

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  30 ++---
 .../amd/display/amdgpu_dm/amdgpu_dm_hdcp.c    |   7 +-
 .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c    |   3 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  32 +++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c |  14 +--
 .../gpu/drm/amd/display/dc/core/dc_link_dp.c  |   6 +-
 drivers/gpu/drm/amd/display/dc/dc.h           |   8 +-
 drivers/gpu/drm/amd/display/dc/dc_stream.h    |   3 +-
 .../amd/display/dc/dcn10/dcn10_hw_sequencer.c |   1 +
 .../drm/amd/display/dc/dcn20/dcn20_resource.c | 111 ------------------  .../drm/amd/display/dc/dcn21/dcn21_resource.c |  10 ++  .../drm/amd/display/dc/dcn30/dcn30_resource.c | 107 +----------------
 .../amd/display/dc/dcn301/dcn301_resource.c   | 107 +----------------
 drivers/gpu/drm/amd/display/dc/dm_cp_psp.h    |   7 +-
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |   5 +-
 .../gpu/drm/amd/display/modules/hdcp/hdcp.h   |   2 +-
 .../drm/amd/display/modules/hdcp/hdcp_psp.c   |   2 +-
 .../drm/amd/display/modules/inc/mod_hdcp.h    |   4 +-
 .../amd/display/modules/power/power_helpers.c |   2 +-
 19 files changed, 80 insertions(+), 381 deletions(-)

--
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cdaniel.wheeler%40amd.com%7C26e5de69949f479b003608d8bf25bd55%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637469516133833459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=8IaBqOjVlehR0vNvG3btImdlR2%2FM6pt1IniAgLW2Q88%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cdaniel.wheeler%40amd.com%7C26e5de69949f479b003608d8bf25bd55%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637469516133833459%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=8IaBqOjVlehR0vNvG3btImdlR2%2FM6pt1IniAgLW2Q88%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx