Skip to contentSkip to conversation

drm/amd/display: Fix and cleanup analog encoders

PATCH In review Timur Kristóf 3 participants 16 messages Feb 2 – Feb 18

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

cover drm/amd/display: Fix and cleanup analog encoders

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

 .../drm/amd/display/dc/bios/command_table.c   |  3 +-
 .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
 .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
 .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
 .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
 .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
 .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
 .../drm/amd/display/dc/link/link_factory.c    |  1 -
 .../dc/resource/dce100/dce100_resource.c      |  8 ++-
 .../dc/resource/dce60/dce60_resource.c        | 11 ++--
 .../dc/resource/dce80/dce80_resource.c        |  8 ++-
 13 files changed, 127 insertions(+), 81 deletions(-)
Signature · 1 line
2.52.0
#1 lore raw

PATCH 1/8 drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors

DCE 6 should use the DCE 6 specific link encoder.
This was a copy paste mistake.

Fixes 0fbe321a93ce ("drm/amd/display: Implement DCE analog link encoders (v2)")
---
 drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +1 -1
index f0152933bee2..068fb1df8d88 100644
@@ -734,7 +734,7 @@ static struct link_encoder *dce60_link_encoder_create(
 		return NULL;
 
 	if (enc_init_data->connector.id == CONNECTOR_ID_VGA) {
-		dce110_link_encoder_construct(enc110,
+		dce60_link_encoder_construct(enc110,
 			enc_init_data,
 			&link_enc_feature,
 			&link_enc_regs[ENGINE_ID_DACA],
Signature · 1 line
2.52.0
#2 lore raw

Re: [PATCH 1/8] drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors

This patch is also in another series and is merged into amd-staging-drm-next as commit "25f8c8132718 drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors"

Quoted 23 lines · Timur Kristóf

DCE 6 should use the DCE 6 specific link encoder.
This was a copy paste mistake.

Fixes 0fbe321a93ce ("drm/amd/display: Implement DCE analog link encoders (v2)")
---
  drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +1 -1
index f0152933bee2..068fb1df8d88 100644
@@ -734,7 +734,7 @@ static struct link_encoder *dce60_link_encoder_create(
  		return NULL;
 
  	if (enc_init_data->connector.id == CONNECTOR_ID_VGA) {
-		dce110_link_encoder_construct(enc110,
+		dce60_link_encoder_construct(enc110,
  			enc_init_data,
  			&link_enc_feature,
  			&link_enc_regs[ENGINE_ID_DACA],
#3 lore raw

PATCH 2/8 drm/amd/display: Fix disabling fastboot on DCE 6-8

In reply to Timur Kristóf

The fast boot optimization should be enabled when the current display controller engine version is DCE 10 or newer.

This was a typo.
By mistake, it was enabled for older than DCE 10.

Fixes 7495962cbceb ("drm/amd/display: Disable fastboot on DCE 6 too")
---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +1 -1
index 4659e1b489ba..bd3a9f008699 100644
@@ -1965,7 +1965,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 	get_edp_streams(context, edp_streams, &edp_stream_num);
 
 	/* Check fastboot support, disable on DCE 6-8 because of blank screens */
-	if (edp_num && edp_stream_num && dc->ctx->dce_version < DCE_VERSION_10_0) {
+	if (edp_num && edp_stream_num && dc->ctx->dce_version >= DCE_VERSION_10_0) {
 		for (i = 0; i < edp_num; i++) {
 			edp_link = edp_links[i];
 			if (edp_link != edp_streams[0]->link)
Signature · 1 line
2.52.0
#4 lore raw

Re: [PATCH 2/8] drm/amd/display: Fix disabling fastboot on DCE 6-8

Another commit fixed it: 15ccad9e246a drm/amd/display: Correct logic check error for fastboot, and thus this patch can be dropped.

Quoted 26 lines · Timur Kristóf

The fast boot optimization should be enabled when the current display controller engine version is DCE 10 or newer.

This was a typo.
By mistake, it was enabled for older than DCE 10.

Fixes 7495962cbceb ("drm/amd/display: Disable fastboot on DCE 6 too")
---
  drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +1 -1
index 4659e1b489ba..bd3a9f008699 100644
@@ -1965,7 +1965,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
  	get_edp_streams(context, edp_streams, &edp_stream_num);
 
  	/* Check fastboot support, disable on DCE 6-8 because of blank screens */
-	if (edp_num && edp_stream_num && dc->ctx->dce_version < DCE_VERSION_10_0) {
+	if (edp_num && edp_stream_num && dc->ctx->dce_version >= DCE_VERSION_10_0) {
  		for (i = 0; i < edp_num; i++) {
  			edp_link = edp_links[i];
  			if (edp_link != edp_streams[0]->link)
#5 lore raw

PATCH 3/8 drm/amd/display: Don't call find_analog_engine() twice

In reply to Timur Kristóf

The analog engine is already there in the link_analog_engine variable and assigned to enc_init_data.analog_engine already.

I suspect this was a rebase mistake.

Fixes 740aa093701c ("drm/amd/display: Pass proper DAC encoder ID to VBIOS")
---
 drivers/gpu/drm/amd/display/dc/link/link_factory.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +0 -1
index 5fbcf04c6251..847d475ff4a1 100644
@@ -561,7 +561,6 @@ static bool construct_phy(struct dc_link *link,
 	enc_init_data.connector = link->link_id;
 	enc_init_data.channel = get_ddc_line(link);
 	enc_init_data.transmitter = transmitter_from_encoder;
-	enc_init_data.analog_engine = find_analog_engine(link, &enc_init_data.analog_encoder);
 	enc_init_data.encoder = link_encoder;
 	enc_init_data.analog_engine = link_analog_engine;
 	enc_init_data.hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
Signature · 1 line
2.52.0
#6 lore raw

PATCH 4/8 drm/amd/display: Turn off DAC in DCE link encoder using VBIOS

In reply to Timur Kristóf

Apparently, the VBIOS DAC1EncoderControl function is much more graceful about turning off the DAC. It writes various DAC registers in a specific sequence. Use that instead of just clearing the DAC_ENABLE register.

Do this in just the dce110_link_encoder_disable_output function and remove it from the HWSS.

Fixes 0fbe321a93ce ("drm/amd/display: Implement DCE analog link encoders (v2)")
---
 .../drm/amd/display/dc/dce/dce_link_encoder.c | 30 +++++++++++--------
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  3 --
 2 files changed, 17 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +17 -13
index 7f0766b5fa3d..f8fcf8d1a4dd 100644
@@ -133,6 +133,21 @@ static enum bp_result link_transmitter_control(
 	return result;
 }
 
+static enum bp_result link_dac_encoder_control(
+	struct dce110_link_encoder *link_enc,
+	enum bp_encoder_control_action action,
+	uint32_t pix_clk_100hz)
+{
+	struct dc_bios *bios = link_enc->base.ctx->dc_bios;
+	struct bp_encoder_control encoder_control = {0};
+
+	encoder_control.action = action;
+	encoder_control.engine_id = link_enc->base.analog_engine;
+	encoder_control.pixel_clock = pix_clk_100hz / 10;
+
+	return bios->funcs->encoder_control(bios, &encoder_control);
+}
+
 static void enable_phy_bypass_mode(
 	struct dce110_link_encoder *enc110,
 	bool enable)
@@ -1345,19 +1360,8 @@ void dce110_link_encoder_disable_output(
 	struct bp_transmitter_control cntl = { 0 };
 	enum bp_result result;
 
-	switch (enc->analog_engine) {
-	case ENGINE_ID_DACA:
-		REG_UPDATE(DAC_ENABLE, DAC_ENABLE, 0);
-		break;
-	case ENGINE_ID_DACB:
-		/* DACB doesn't seem to be present on DCE6+,
-		 * although there are references to it in the register file.
-		 */
-		DC_LOG_ERROR("%s DACB is unsupported\n", __func__);
-		break;
-	default:
-		break;
-	}
+	if (enc->analog_engine != ENGINE_ID_UNKNOWN)
+		link_dac_encoder_control(enc110, ENCODER_CONTROL_DISABLE, 0);
 
 	/* The code below only applies to connectors that support digital signals. */
 	if (enc->transmitter == TRANSMITTER_UNKNOWN)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +0 -3
index bd3a9f008699..c53c61a4cb5e 100644
@@ -1199,9 +1199,6 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx)
 		dccg->funcs->disable_symclk_se(dccg, stream_enc->stream_enc_inst,
 					       link_enc->transmitter - TRANSMITTER_UNIPHY_A);
 	}
-
-	if (dc_is_rgb_signal(pipe_ctx->stream->signal))
-		dce110_dac_encoder_control(pipe_ctx, false);
 }
 
 void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
Signature · 1 line
2.52.0
#7 lore raw

PATCH 5/8 drm/amd/display: Initialize DAC in DCE link encoder using VBIOS

In reply to Timur Kristóf

The VBIOS DAC1EncoderControl() function can initialize the DAC, by writing board-specific values to certain registers. Call this at link encoder hardware initialization time similarly to how the equivalent UNIPHYTransmitterControl initialization is done.

This fixes DAC output on the Radeon HD 7790.

Also remove the ENCODER_CONTROL_SETUP enum from the dac_encoder_control_prepare_params function which is actually not a supported operation for DAC encoders.

Fixes 0fbe321a93ce ("drm/amd/display: Implement DCE analog link encoders (v2)")
---
 drivers/gpu/drm/amd/display/dc/bios/command_table.c   |  3 +--
 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 10 ++++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/bios/command_table.c +1 -2
index 76a3559f0ddc..b692fa37402d 100644
@@ -1874,8 +1874,7 @@ static void dac_encoder_control_prepare_params(
 	uint8_t dac_standard)
 {
 	params->ucDacStandard = dac_standard;
-	if (action == ENCODER_CONTROL_SETUP ||
-	    action == ENCODER_CONTROL_INIT)
+	if (action == ENCODER_CONTROL_INIT)
 		params->ucAction = ATOM_ENCODER_INIT;
 	else if (action == ENCODER_CONTROL_ENABLE)
 		params->ucAction = ATOM_ENABLE;
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +10 -0
index f8fcf8d1a4dd..8903bdb89c66 100644
@@ -1036,6 +1036,16 @@ void dce110_link_encoder_hw_init(
 	cntl.coherent = false;
 	cntl.hpd_sel = enc110->base.hpd_source;
 
+	if (enc110->base.analog_engine != ENGINE_ID_UNKNOWN) {
+		result = link_dac_encoder_control(enc110, ENCODER_CONTROL_INIT, 0);
+		if (result != BP_RESULT_OK) {
+			DC_LOG_ERROR("%s: Failed to execute VBIOS command table for DAC!\n",
+				__func__);
+			BREAK_TO_DEBUGGER();
+			return;
+		}
+	}
+
 	/* The code below is only applicable to encoders with a digital transmitter. */
 	if (enc110->base.transmitter == TRANSMITTER_UNKNOWN)
 		return;
Signature · 1 line
2.52.0
#8 lore raw

PATCH 6/8 drm/amd/display: Set CRTC source for DAC using registers

In reply to Timur Kristóf

Apparently the VBIOS SelectCRTC_Source function overwrites a few registers (such as FMT_*) which DC writes in a different place, which can cause problems.

Instead of using the SelectCRTC_Source function from the VBIOS, use the DAC_SOURCE_SELECT register directly, similarly to how it is done for digital link encoders.

Fixes 3be26d81b150 ("drm/amd/display: Support DAC in dce110_hwseq")
---
 .../amd/display/dc/dce/dce_stream_encoder.c   | 23 +++++++++++++---
 .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++++++--
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 26 +------------------
 .../dc/resource/dce100/dce100_resource.c      |  6 +++--
 .../dc/resource/dce60/dce60_resource.c        |  7 +++--
 .../dc/resource/dce80/dce80_resource.c        |  6 +++--
 6 files changed, 43 insertions(+), 37 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c +19 -4
index 574618d5d4a4..87c19f17c799 100644
@@ -1498,7 +1498,10 @@ static void dig_connect_to_otg(
 {
 	struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
 
-	REG_UPDATE(DIG_FE_CNTL, DIG_SOURCE_SELECT, tg_inst);
+	if (enc->id == ENGINE_ID_DACA || enc->id == ENGINE_ID_DACB)
+		REG_UPDATE(DAC_SOURCE_SELECT, DAC_SOURCE_SELECT, tg_inst);
+	else
+		REG_UPDATE(DIG_FE_CNTL, DIG_SOURCE_SELECT, tg_inst);
 }
 
 static unsigned int dig_source_otg(
@@ -1507,7 +1510,10 @@ static unsigned int dig_source_otg(
 	uint32_t tg_inst = 0;
 	struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
 
-	REG_GET(DIG_FE_CNTL, DIG_SOURCE_SELECT, &tg_inst);
+	if (enc->id == ENGINE_ID_DACA || enc->id == ENGINE_ID_DACB)
+		REG_GET(DAC_SOURCE_SELECT, DAC_SOURCE_SELECT, &tg_inst);
+	else
+		REG_GET(DIG_FE_CNTL, DIG_SOURCE_SELECT, &tg_inst);
 
 	return tg_inst;
 }
@@ -1568,16 +1574,25 @@ void dce110_stream_encoder_construct(
 	enc110->se_mask = se_mask;
 }
 
-static const struct stream_encoder_funcs dce110_an_str_enc_funcs = {};
+static const struct stream_encoder_funcs dce110_an_str_enc_funcs = {
+	.dig_connect_to_otg  = dig_connect_to_otg,
+	.dig_source_otg = dig_source_otg,
+};
 
 void dce110_analog_stream_encoder_construct(
 	struct dce110_stream_encoder *enc110,
 	struct dc_context *ctx,
 	struct dc_bios *bp,
-	enum engine_id eng_id)
+	enum engine_id eng_id,
+	const struct dce110_stream_enc_registers *regs,
+	const struct dce_stream_encoder_shift *se_shift,
+	const struct dce_stream_encoder_mask *se_mask)
 {
 	enc110->base.funcs = &dce110_an_str_enc_funcs;
 	enc110->base.ctx = ctx;
 	enc110->base.id = eng_id;
 	enc110->base.bp = bp;
+	enc110->regs = regs;
+	enc110->se_shift = se_shift;
+	enc110->se_mask = se_mask;
 }
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h +10 -2
index 068de1392121..342c0afe6a94 100644
@@ -65,6 +65,7 @@
 	SRI(AFMT_60958_1, DIG, id), \
 	SRI(AFMT_60958_2, DIG, id), \
 	SRI(DIG_FE_CNTL, DIG, id), \
+	SR(DAC_SOURCE_SELECT), \
 	SRI(HDMI_CONTROL, DIG, id), \
 	SRI(HDMI_GC, DIG, id), \
 	SRI(HDMI_GENERIC_PACKET_CONTROL0, DIG, id), \
@@ -290,7 +291,8 @@
 #define SE_COMMON_MASK_SH_LIST_DCE80_100(mask_sh)\
 	SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh),\
 	SE_SF(TMDS_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\
-	SE_SF(TMDS_CNTL, TMDS_COLOR_FORMAT, mask_sh)
+	SE_SF(TMDS_CNTL, TMDS_COLOR_FORMAT, mask_sh),\
+	SE_SF(DAC_SOURCE_SELECT, DAC_SOURCE_SELECT, mask_sh)
 
 #define SE_COMMON_MASK_SH_LIST_DCE110(mask_sh)\
 	SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh),\
@@ -494,6 +496,7 @@ struct dce_stream_encoder_shift {
 	uint8_t DP_VID_N_MUL;
 	uint8_t DP_VID_M_DOUBLE_VALUE_EN;
 	uint8_t DIG_SOURCE_SELECT;
+	uint8_t DAC_SOURCE_SELECT;
 };
 
 struct dce_stream_encoder_mask {
@@ -626,6 +629,7 @@ struct dce_stream_encoder_mask {
 	uint32_t DP_VID_N_MUL;
 	uint32_t DP_VID_M_DOUBLE_VALUE_EN;
 	uint32_t DIG_SOURCE_SELECT;
+	uint32_t DAC_SOURCE_SELECT;
 };
 
 struct dce110_stream_enc_registers {
@@ -653,6 +657,7 @@ struct dce110_stream_enc_registers {
 	uint32_t AFMT_60958_1;
 	uint32_t AFMT_60958_2;
 	uint32_t DIG_FE_CNTL;
+	uint32_t DAC_SOURCE_SELECT;
 	uint32_t DP_MSE_RATE_CNTL;
 	uint32_t DP_MSE_RATE_UPDATE;
 	uint32_t DP_PIXEL_FORMAT;
@@ -712,7 +717,10 @@ void dce110_analog_stream_encoder_construct(
 	struct dce110_stream_encoder *enc110,
 	struct dc_context *ctx,
 	struct dc_bios *bp,
-	enum engine_id eng_id);
+	enum engine_id eng_id,
+	const struct dce110_stream_enc_registers *regs,
+	const struct dce_stream_encoder_shift *se_shift,
+	const struct dce_stream_encoder_mask *se_mask);
 
 void dce110_se_audio_mute_control(
 	struct stream_encoder *enc, bool mute);
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +1 -25
index c53c61a4cb5e..72e4bb6883a4 100644
@@ -1581,25 +1581,6 @@ static enum dc_status dce110_enable_stream_timing(
 	return DC_OK;
 }
 
-static void
-dce110_select_crtc_source(struct pipe_ctx *pipe_ctx)
-{
-	struct dc_link *link = pipe_ctx->stream->link;
-	struct dc_bios *bios = link->ctx->dc_bios;
-	struct bp_crtc_source_select crtc_source_select = {0};
-	enum engine_id engine_id = link->link_enc->preferred_engine;
-
-	if (dc_is_rgb_signal(pipe_ctx->stream->signal))
-		engine_id = link->link_enc->analog_engine;
-
-	crtc_source_select.controller_id = CONTROLLER_ID_D0 + pipe_ctx->stream_res.tg->inst;
-	crtc_source_select.color_depth = pipe_ctx->stream->timing.display_color_depth;
-	crtc_source_select.engine_id = engine_id;
-	crtc_source_select.sink_signal = pipe_ctx->stream->signal;
-
-	bios->funcs->select_crtc_source(bios, &crtc_source_select);
-}
-
 enum dc_status dce110_apply_single_controller_ctx_to_hw(
 		struct pipe_ctx *pipe_ctx,
 		struct dc_state *context,
@@ -1619,10 +1600,6 @@ enum dc_status dce110_apply_single_controller_ctx_to_hw(
 		hws->funcs.disable_stream_gating(dc, pipe_ctx);
 	}
 
-	if (pipe_ctx->stream->signal == SIGNAL_TYPE_RGB) {
-		dce110_select_crtc_source(pipe_ctx);
-	}
-
 	if (pipe_ctx->stream_res.audio != NULL) {
 		struct audio_output audio_output = {0};
 
@@ -1702,8 +1679,7 @@ enum dc_status dce110_apply_single_controller_ctx_to_hw(
 		pipe_ctx->stream_res.tg->funcs->set_static_screen_control(
 				pipe_ctx->stream_res.tg, event_triggers, 2);
 
-	if (!dc_is_virtual_signal(pipe_ctx->stream->signal) &&
-		!dc_is_rgb_signal(pipe_ctx->stream->signal))
+	if (!dc_is_virtual_signal(pipe_ctx->stream->signal))
 		pipe_ctx->stream_res.stream_enc->funcs->dig_connect_to_otg(
 			pipe_ctx->stream_res.stream_enc,
 			pipe_ctx->stream_res.tg->inst);
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +4 -2
index d40d91ec2035..c7e3feecaf85 100644
@@ -242,7 +242,8 @@ static const struct dce110_stream_enc_registers stream_enc_regs[] = {
 	stream_enc_regs(3),
 	stream_enc_regs(4),
 	stream_enc_regs(5),
-	stream_enc_regs(6)
+	stream_enc_regs(6),
+	{SR(DAC_SOURCE_SELECT),} /* DACA */
 };
 
 static const struct dce_stream_encoder_shift se_shift = {
@@ -491,7 +492,8 @@ static struct stream_encoder *dce100_stream_encoder_create(
 		return NULL;
 
 	if (eng_id == ENGINE_ID_DACA || eng_id == ENGINE_ID_DACB) {
-		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id);
+		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+			&stream_enc_regs[eng_id], &se_shift, &se_mask);
 		return &enc110->base;
 	}
 
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +5 -2
index 068fb1df8d88..a26046c5dd38 100644
@@ -258,7 +258,9 @@ static const struct dce110_stream_enc_registers stream_enc_regs[] = {
 	stream_enc_regs(2),
 	stream_enc_regs(3),
 	stream_enc_regs(4),
-	stream_enc_regs(5)
+	stream_enc_regs(5),
+	{0},
+	{SR(DAC_SOURCE_SELECT),} /* DACA */
 };
 
 static const struct dce_stream_encoder_shift se_shift = {
@@ -607,7 +609,8 @@ static struct stream_encoder *dce60_stream_encoder_create(
 		return NULL;
 
 	if (eng_id == ENGINE_ID_DACA || eng_id == ENGINE_ID_DACB) {
-		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id);
+		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+			&stream_enc_regs[eng_id], &se_shift, &se_mask);
 		return &enc110->base;
 	}
 
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +4 -2
index 8687104cabb7..809b507fb4a3 100644
@@ -258,7 +258,8 @@ static const struct dce110_stream_enc_registers stream_enc_regs[] = {
 	stream_enc_regs(3),
 	stream_enc_regs(4),
 	stream_enc_regs(5),
-	stream_enc_regs(6)
+	stream_enc_regs(6),
+	{SR(DAC_SOURCE_SELECT),} /* DACA */
 };
 
 static const struct dce_stream_encoder_shift se_shift = {
@@ -614,7 +615,8 @@ static struct stream_encoder *dce80_stream_encoder_create(
 		return NULL;
 
 	if (eng_id == ENGINE_ID_DACA || eng_id == ENGINE_ID_DACB) {
-		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id);
+		dce110_analog_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
+			&stream_enc_regs[eng_id], &se_shift, &se_mask);
 		return &enc110->base;
 	}
 
Signature · 1 line
2.52.0
#9 lore raw

PATCH 7/8 drm/amd/display: Enable DAC in DCE link encoder

In reply to Timur Kristóf

Ensure that the DAC output is enabled at the correct time by moving it to the DCE link encoder similarly to how digital outputs are enabled.

This also removes the call to DAC1EncoderControl from the DCE HWSS, which always felt like it was a hacky solution.

Fixes 0fbe321a93ce ("drm/amd/display: Implement DCE analog link encoders (v2)")
---
 .../drm/amd/display/dc/dce/dce_link_encoder.c | 18 +++++++++++++
 .../drm/amd/display/dc/dce/dce_link_encoder.h |  5 ++++
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 27 +++++++------------
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 ++
 .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 ++
 .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 +++++++++-
 6 files changed, 50 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +18 -0
index 8903bdb89c66..2ba3d3a3aac5 100644
@@ -102,6 +102,7 @@ static const struct link_encoder_funcs dce110_lnk_enc_funcs = {
 	.enable_dp_output = dce110_link_encoder_enable_dp_output,
 	.enable_dp_mst_output = dce110_link_encoder_enable_dp_mst_output,
 	.enable_lvds_output = dce110_link_encoder_enable_lvds_output,
+	.enable_analog_output = dce110_link_encoder_enable_analog_output,
 	.disable_output = dce110_link_encoder_disable_output,
 	.dp_set_lane_settings = dce110_link_encoder_dp_set_lane_settings,
 	.dp_set_phy_pattern = dce110_link_encoder_dp_set_phy_pattern,
@@ -1200,6 +1201,22 @@ void dce110_link_encoder_enable_lvds_output(
 	}
 }
 
+void dce110_link_encoder_enable_analog_output(
+	struct link_encoder *enc,
+	uint32_t pixel_clock)
+{
+	struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
+	enum bp_result result;
+
+	result = link_dac_encoder_control(enc110, ENCODER_CONTROL_ENABLE, pixel_clock);
+
+	if (result != BP_RESULT_OK) {
+		DC_LOG_ERROR("%s: Failed to execute VBIOS command table!\n",
+			__func__);
+		BREAK_TO_DEBUGGER();
+	}
+}
+
 /* enables DP PHY output */
 void dce110_link_encoder_enable_dp_output(
 	struct link_encoder *enc,
@@ -1818,6 +1835,7 @@ static const struct link_encoder_funcs dce60_lnk_enc_funcs = {
 	.enable_dp_output = dce60_link_encoder_enable_dp_output,
 	.enable_dp_mst_output = dce60_link_encoder_enable_dp_mst_output,
 	.enable_lvds_output = dce110_link_encoder_enable_lvds_output,
+	.enable_analog_output = dce110_link_encoder_enable_analog_output,
 	.disable_output = dce110_link_encoder_disable_output,
 	.dp_set_lane_settings = dce110_link_encoder_dp_set_lane_settings,
 	.dp_set_phy_pattern = dce60_link_encoder_dp_set_phy_pattern,
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +5 -0
index 9ba533aa6f88..f853e3c3fc75 100644
@@ -268,6 +268,11 @@ void dce110_link_encoder_enable_lvds_output(
 	enum clock_source_id clock_source,
 	uint32_t pixel_clock);
 
+/* enables analog output from the DAC */
+void dce110_link_encoder_enable_analog_output(
+	struct link_encoder *enc,
+	uint32_t pixel_clock);
+
 /* disable PHY output */
 void dce110_link_encoder_disable_output(
 	struct link_encoder *enc,
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +10 -17
index 72e4bb6883a4..84652fbacd21 100644
@@ -660,20 +660,6 @@ void dce110_update_info_frame(struct pipe_ctx *pipe_ctx)
 	}
 }
 
-static void
-dce110_dac_encoder_control(struct pipe_ctx *pipe_ctx, bool enable)
-{
-	struct dc_link *link = pipe_ctx->stream->link;
-	struct dc_bios *bios = link->ctx->dc_bios;
-	struct bp_encoder_control encoder_control = {0};
-
-	encoder_control.action = enable ? ENCODER_CONTROL_ENABLE : ENCODER_CONTROL_DISABLE;
-	encoder_control.engine_id = link->link_enc->analog_engine;
-	encoder_control.pixel_clock = pipe_ctx->stream->timing.pix_clk_100hz / 10;
-
-	bios->funcs->encoder_control(bios, &encoder_control);
-}
-
 void dce110_enable_stream(struct pipe_ctx *pipe_ctx)
 {
 	enum dc_lane_count lane_count =
@@ -703,9 +689,6 @@ void dce110_enable_stream(struct pipe_ctx *pipe_ctx)
 		early_control = lane_count;
 
 	tg->funcs->set_early_control(tg, early_control);
-
-	if (dc_is_rgb_signal(pipe_ctx->stream->signal))
-		dce110_dac_encoder_control(pipe_ctx, true);
 }
 
 static enum bp_result link_transmitter_control(
@@ -3277,6 +3260,15 @@ void dce110_enable_tmds_link_output(struct dc_link *link,
 	link->phy_state.symclk_state = SYMCLK_ON_TX_ON;
 }
 
+static void dce110_enable_analog_link_output(
+		struct dc_link *link,
+		uint32_t pix_clk_100hz)
+{
+	link->link_enc->funcs->enable_analog_output(
+			link->link_enc,
+			pix_clk_100hz);
+}
+
 void dce110_enable_dp_link_output(
 		struct dc_link *link,
 		const struct link_resource *link_res,
@@ -3414,6 +3406,7 @@ static const struct hw_sequencer_funcs dce110_funcs = {
 	.enable_lvds_link_output = dce110_enable_lvds_link_output,
 	.enable_tmds_link_output = dce110_enable_tmds_link_output,
 	.enable_dp_link_output = dce110_enable_dp_link_output,
+	.enable_analog_link_output = dce110_enable_analog_link_output,
 	.disable_link_output = dce110_disable_link_output,
 };
 
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +2 -0
index 51b0f0fd8fcd..4632a5761b16 100644
@@ -1184,6 +1184,8 @@ struct hw_sequencer_funcs {
 			const struct link_resource *link_res,
 			enum clock_source_id clock_source,
 			uint32_t pixel_clock);
+	void (*enable_analog_link_output)(struct dc_link *link,
+			uint32_t pixel_clock);
 	void (*disable_link_output)(struct dc_link *link,
 			const struct link_resource *link_res,
 			enum signal_type signal);
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +2 -0
index d795fc43dc9d..5abbf485d273 100644
@@ -132,6 +132,8 @@ struct link_encoder_funcs {
 	void (*enable_lvds_output)(struct link_encoder *enc,
 		enum clock_source_id clock_source,
 		uint32_t pixel_clock);
+	void (*enable_analog_output)(struct link_encoder *enc,
+		uint32_t pixel_clock);
 	void (*disable_output)(struct link_encoder *link_enc,
 		enum signal_type signal);
 	void (*dp_set_lane_settings)(struct link_encoder *enc,
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +13 -1
index 91742bde4dc2..9b1d34c3438b 100644
@@ -2155,6 +2155,18 @@ static enum dc_status enable_link_dp_mst(
 	return enable_link_dp(state, pipe_ctx);
 }
 
+static enum dc_status enable_link_analog(
+		struct dc_state *state,
+		struct pipe_ctx *pipe_ctx)
+{
+	struct dc_link *link = pipe_ctx->stream->link;
+
+	link->dc->hwss.enable_analog_link_output(
+		link, pipe_ctx->stream->timing.pix_clk_100hz);
+
+	return DC_OK;
+}
+
 static enum dc_status enable_link_virtual(struct pipe_ctx *pipe_ctx)
 {
 	struct dc_link *link = pipe_ctx->stream->link;
@@ -2210,7 +2222,7 @@ static enum dc_status enable_link(
 		status = DC_OK;
 		break;
 	case SIGNAL_TYPE_RGB:
-		status = DC_OK;
+		status = enable_link_analog(state, pipe_ctx);
 		break;
 	case SIGNAL_TYPE_VIRTUAL:
 		status = enable_link_virtual(pipe_ctx);
Signature · 1 line
2.52.0
#10 lore raw

PATCH 8/8 drm/amd/display: Remove unneeded DAC link encoder register

In reply to Timur Kristóf

Not needed anymore since we use the VBIOS function.

---
 drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h          | 3 +--
 .../gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c   | 2 +-
 drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c | 2 +-
 drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +1 -2
index f853e3c3fc75..8841000361fb 100644
@@ -101,8 +101,7 @@
 	SRI(DP_SEC_CNTL, DP, id), \
 	SRI(DP_VID_STREAM_CNTL, DP, id), \
 	SRI(DP_DPHY_FAST_TRAINING, DP, id), \
-	SRI(DP_SEC_CNTL1, DP, id), \
-	SR(DAC_ENABLE)
+	SRI(DP_SEC_CNTL1, DP, id)
 #endif
 
 #define LE_DCE80_REG_LIST(id)\
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +1 -1
index c7e3feecaf85..5e9ba6a345c6 100644
@@ -226,7 +226,7 @@ static const struct dce110_link_enc_registers link_enc_regs[] = {
 	link_regs(4),
 	link_regs(5),
 	link_regs(6),
-	{ .DAC_ENABLE = mmDAC_ENABLE },
+	{0}
 };
 
 #define stream_enc_regs(id)\
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +1 -1
index a26046c5dd38..3ba1d35e260c 100644
@@ -243,7 +243,7 @@ static const struct dce110_link_enc_registers link_enc_regs[] = {
 	link_regs(4),
 	link_regs(5),
 	{0},
-	{ .DAC_ENABLE = mmDAC_ENABLE },
+	{0}
 };
 
 #define stream_enc_regs(id)\
drivers/gpu/drm/amd/display/dc/resource/dce80/dce80_resource.c +1 -1
index 809b507fb4a3..ee7556542dfc 100644
@@ -242,7 +242,7 @@ static const struct dce110_link_enc_registers link_enc_regs[] = {
 	link_regs(4),
 	link_regs(5),
 	link_regs(6),
-	{ .DAC_ENABLE = mmDAC_ENABLE },
+	{0}
 };
 
 #define stream_enc_regs(id)\
Signature · 1 line
2.52.0
Reviewed-by on the v1 series
#11 lore raw
In reply to Timur Kristóf
Quoted 9 lines · Timur Kristóf

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Series looks good to me.

I assume Alex Hung or Harry will pull this into the DC promotion testing.

Thanks,

Alex

Quoted 28 lines

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

 .../drm/amd/display/dc/bios/command_table.c   |  3 +-
 .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
 .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
 .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
 .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
 .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
 .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
 .../drm/amd/display/dc/link/link_factory.c    |  1 -
 .../dc/resource/dce100/dce100_resource.c      |  8 ++-
 .../dc/resource/dce60/dce60_resource.c        | 11 ++--
 .../dc/resource/dce80/dce80_resource.c        |  8 ++-
 13 files changed, 127 insertions(+), 81 deletions(-)

--
2.52.0

#12 lore raw
Quoted 6 lines · Alex Deucher
Quoted 5 lines · Timur Kristóf

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

Quoted 8 lines
Quoted 4 lines

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Series looks good to me.

I assume Alex Hung or Harry will pull this into the DC promotion testing.

I will send this series to promotion test next week.

Quoted 33 lines

Thanks,

Alex

Quoted 28 lines

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

  .../drm/amd/display/dc/bios/command_table.c   |  3 +-
  .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
  .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
  .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
  .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
  .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
  .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
  .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
  .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
  .../drm/amd/display/dc/link/link_factory.c    |  1 -
  .../dc/resource/dce100/dce100_resource.c      |  8 ++-
  .../dc/resource/dce60/dce60_resource.c        | 11 ++--
  .../dc/resource/dce80/dce80_resource.c        |  8 ++-
  13 files changed, 127 insertions(+), 81 deletions(-)

--
2.52.0

#13 lore raw
Quoted 15 lines · Alex Hung
Quoted 11 lines · Alex Deucher
Quoted 9 lines · Timur Kristóf

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Quoted 5 lines
Quoted 3 lines

Series looks good to me.

I assume Alex Hung or Harry will pull this into the DC promotion testing.

I will send this series to promotion test next week.

Did this get picked up?

Alex

Quoted 35 lines
Quoted 34 lines

Thanks,

Alex

Quoted 28 lines

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

  .../drm/amd/display/dc/bios/command_table.c   |  3 +-
  .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
  .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
  .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
  .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
  .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
  .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
  .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
  .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
  .../drm/amd/display/dc/link/link_factory.c    |  1 -
  .../dc/resource/dce100/dce100_resource.c      |  8 ++-
  .../dc/resource/dce60/dce60_resource.c        | 11 ++--
  .../dc/resource/dce80/dce80_resource.c        |  8 ++-
  13 files changed, 127 insertions(+), 81 deletions(-)

--
2.52.0

#14 lore raw
Quoted 16 lines · Alex Deucher
Quoted 15 lines · Alex Hung
Quoted 11 lines · Alex Deucher
Quoted 9 lines · Timur Kristóf

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Series looks good to me.

I assume Alex Hung or Harry will pull this into the DC promotion testing.

I will send this series to promotion test next week.

Did this get picked up?

No regression was found during promotion test last week but some CI unit tests failed. I am still trying to investigate the root causes.

Quoted 38 lines

Alex

Quoted 35 lines
Quoted 34 lines

Thanks,

Alex

Quoted 28 lines

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

   .../drm/amd/display/dc/bios/command_table.c   |  3 +-
   .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
   .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
   .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
   .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
   .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
   .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
   .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
   .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
   .../drm/amd/display/dc/link/link_factory.c    |  1 -
   .../dc/resource/dce100/dce100_resource.c      |  8 ++-
   .../dc/resource/dce60/dce60_resource.c        | 11 ++--
   .../dc/resource/dce80/dce80_resource.c        |  8 ++-
   13 files changed, 127 insertions(+), 81 deletions(-)

--
2.52.0

Reviewed-by on the v1 series
#15 lore raw
In reply to Timur Kristóf

Patch 1 & 2 are no longer needed, and the series is

Quoted 34 lines · Timur Kristóf

Fix a "black screen" issue with analog connector support in DC. The Radeon HD 7790 series seems specifically affected. I recommend backporting the series to 6.19 to avoid regressions.

The series also makes the analog connector support more consistent with the rest of the DC code base so it doesn't feel like a hack anymore, ie. it brings analog connectors a bit closer to other connector types.

Timur Kristóf (8):
drm/amd/display: Use DCE 6 link encoder for DCE 6 analog connectors drm/amd/display: Fix disabling fastboot on DCE 6-8 drm/amd/display: Don't call find_analog_engine() twice drm/amd/display: Turn off DAC in DCE link encoder using VBIOS drm/amd/display: Initialize DAC in DCE link encoder using VBIOS drm/amd/display: Set CRTC source for DAC using registers drm/amd/display: Enable DAC in DCE link encoder drm/amd/display: Remove unneeded DAC link encoder register

  .../drm/amd/display/dc/bios/command_table.c   |  3 +-
  .../drm/amd/display/dc/dce/dce_link_encoder.c | 58 ++++++++++++++-----
  .../drm/amd/display/dc/dce/dce_link_encoder.h |  8 ++-
  .../amd/display/dc/dce/dce_stream_encoder.c   | 23 ++++++--
  .../amd/display/dc/dce/dce_stream_encoder.h   | 12 +++-
  .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 58 ++++---------------
  .../drm/amd/display/dc/hwss/hw_sequencer.h    |  2 +
  .../drm/amd/display/dc/inc/hw/link_encoder.h  |  2 +
  .../gpu/drm/amd/display/dc/link/link_dpms.c   | 14 ++++-
  .../drm/amd/display/dc/link/link_factory.c    |  1 -
  .../dc/resource/dce100/dce100_resource.c      |  8 ++-
  .../dc/resource/dce60/dce60_resource.c        | 11 ++--
  .../dc/resource/dce80/dce80_resource.c        |  8 ++-
  13 files changed, 127 insertions(+), 81 deletions(-)