Skip to contentSkip to conversation

dal patches for nov 30, 2016

PATCH New Harry Wentland 1 participant 8 messages Nov 30, 2016 1 message not in the archive

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

cover dal patches for nov 30, 2016

* program scrambler bits for hdmi2 and dp1.2
* some minor cleanups

Amy Zhang (1):
drm/amd/dal: Track windowed_fullscreen state in freesync module

Harry Wentland (4):
drm/amd/dal: Remove extra newline
drm/amd/dal: program HDMI_DATA_SCRAMBLER bit for HDMI 2.0 drm/amd/dal: Program DPHY_SCRAM_CNTL for HBR2 compliance pattern drm/amd/dal: Remove unneccessary macro

Zeyu Fan (2):
drm/amd/dal: DCE clock source consoldiation and refactor. drm/amd/dal: Pass in shift and mask values for I2C of DCE100 and up.

 drivers/gpu/drm/amd/dal/dc/dce/Makefile            |   3 +-
 drivers/gpu/drm/amd/dal/dc/dce/dce_audio.h         |   5 +-
 .../dce_clock_source.c}                            | 455 +++++++++++++--------
 .../dce_clock_source.h}                            |  59 ++-
 drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c  |   7 +
 drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.h  |   3 +
 .../gpu/drm/amd/dal/dc/dce/dce_stream_encoder.c    |  39 +-
 .../gpu/drm/amd/dal/dc/dce/dce_stream_encoder.h    |   4 +
 .../gpu/drm/amd/dal/dc/dce100/dce100_resource.c    |  53 +--
 drivers/gpu/drm/amd/dal/dc/dce110/Makefile         |   2 +-
 .../gpu/drm/amd/dal/dc/dce110/dce110_resource.c    |  43 +-
 drivers/gpu/drm/amd/dal/dc/dce112/Makefile         |   2 +-
 .../drm/amd/dal/dc/dce112/dce112_clock_source.c    | 278 -------------
 .../drm/amd/dal/dc/dce112/dce112_clock_source.h    |  59 ---
 .../gpu/drm/amd/dal/dc/dce112/dce112_resource.c    |  66 +--
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c  |  50 ++-
 .../drm/amd/dal/dc/i2caux/dce100/i2caux_dce100.c   |  12 +-
 .../dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c    |  55 +--
 .../dal/dc/i2caux/dce110/i2c_hw_engine_dce110.h    | 124 +++++-
 .../drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.c   |  18 +-
 .../drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.h   |   6 +-
 .../drm/amd/dal/dc/i2caux/dce112/i2caux_dce112.c   |  12 +-
 drivers/gpu/drm/amd/dal/include/dal_asic_id.h      |   1 -
 .../gpu/drm/amd/dal/modules/freesync/freesync.c    |   7 +-
 drivers/gpu/drm/amd/dal/modules/inc/mod_freesync.h |   2 +
 25 files changed, 718 insertions(+), 647 deletions(-)
 rename drivers/gpu/drm/amd/dal/dc/{dce110/dce110_clock_source.c => dce/dce_clock_source.c} (76%)
 rename drivers/gpu/drm/amd/dal/dc/{dce110/dce110_clock_source.h => dce/dce_clock_source.h} (53%)
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.h
Signature · 6 lines
2.9.3

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

A message that is not in the archive (sent off-list or not yet received): 20161130192013.11043-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 1/7 drm/amd/dal: DCE clock source consoldiation and refactor.

From: Zeyu Fan <[email protected]>

Change-Id Ic1b6dc1b70479e30b050659d2231ade0d40e09c9
---
 drivers/gpu/drm/amd/dal/dc/dce/Makefile            |   3 +-
 .../dce_clock_source.c}                            | 455 +++++++++++++--------
 .../dce_clock_source.h}                            |  59 ++-
 .../gpu/drm/amd/dal/dc/dce100/dce100_resource.c    |  53 +--
 drivers/gpu/drm/amd/dal/dc/dce110/Makefile         |   2 +-
 .../gpu/drm/amd/dal/dc/dce110/dce110_resource.c    |  43 +-
 drivers/gpu/drm/amd/dal/dc/dce112/Makefile         |   2 +-
 .../drm/amd/dal/dc/dce112/dce112_clock_source.c    | 278 -------------
 .../drm/amd/dal/dc/dce112/dce112_clock_source.h    |  59 ---
 .../gpu/drm/amd/dal/dc/dce112/dce112_resource.c    |  66 +--
 drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c  |  50 ++-
 11 files changed, 467 insertions(+), 603 deletions(-)
 rename drivers/gpu/drm/amd/dal/dc/{dce110/dce110_clock_source.c => dce/dce_clock_source.c} (76%)
 rename drivers/gpu/drm/amd/dal/dc/{dce110/dce110_clock_source.h => dce/dce_clock_source.h} (53%)
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.c
 delete mode 100644 drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.h
drivers/gpu/drm/amd/dal/dc/dce/Makefile +2 -1
index 87e5f11024ca..cbf73500d361 100644
@@ -6,7 +6,8 @@
 #     offset/shift/mask stored in dce_hw struct
 
 DCE = dce_audio.o dce_stream_encoder.o dce_link_encoder.o dce_hwseq.o \
-dce_mem_input.o dce_scl_filters.o dce_transform.o
+dce_mem_input.o dce_clock_source.o dce_scl_filters.o dce_transform.o
+
 
 AMD_DAL_DCE = $(addprefix $(AMDDALPATH)/dc/dce/,$(DCE))
 
drivers/gpu/drm/amd/dal/dc/dce/dce_clock_source.c renamed from drivers/gpu/drm/amd/dal/dc/dce110/dce110_clock_source.c +294 -161

557 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce/dce_clock_source.h renamed from drivers/gpu/drm/amd/dal/dc/dce110/dce110_clock_source.h +52 -7

80 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce100/dce100_resource.c +30 -23

98 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce110/Makefile +1 -1
index cb6bb24e6298..526fc7f8d395 100644
@@ -6,7 +6,7 @@ DCE110 = dce110_ipp.o dce110_ipp_cursor.o \
 dce110_ipp_gamma.o dce110_opp.o dce110_opp_csc.o \
 dce110_timing_generator.o dce110_opp_formatter.o dce110_opp_regamma.o \
 dce110_compressor.o dce110_mem_input.o dce110_hw_sequencer.o \
-dce110_resource.o dce110_clock_source.o \
+dce110_resource.o \
 dce110_opp_regamma_v.o dce110_opp_csc_v.o dce110_timing_generator_v.o \
 dce110_mem_input_v.o dce110_opp_v.o dce110_transform_v.o
 
drivers/gpu/drm/amd/dal/dc/dce110/dce110_resource.c +25 -18

74 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce112/Makefile +1 -1
index 010e10b48042..5499bcf86cf0 100644
@@ -3,7 +3,7 @@
 # It provides the control and status of HW CRTC block.
 
 DCE112 = dce112_compressor.o dce112_hw_sequencer.o \
-dce112_resource.o dce112_clock_source.o dce112_mem_input.o dce112_opp_formatter.o \
+dce112_resource.o dce112_mem_input.o dce112_opp_formatter.o \
 dce112_opp.o
 
 AMD_DAL_DCE112 = $(addprefix $(AMDDALPATH)/dc/dce112/,$(DCE112))
drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.c deleted +0 -278

278 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce112/dce112_clock_source.h deleted +0 -59

59 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce112/dce112_resource.c +34 -32

126 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/dce80/dce80_resource.c +28 -22

89 lines not on this page · raw message

Signature · 6 lines
2.9.3

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

PATCH 2/7 drm/amd/dal: Pass in shift and mask values for I2C of DCE100 and up.

In reply to a message not in the archive

From: Zeyu Fan <[email protected]>

Change-Id Ibe3a78a8a5b633e0e785611a5a16c2627937e91a
---
 .../drm/amd/dal/dc/i2caux/dce100/i2caux_dce100.c   |  12 +-
 .../dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c    |  55 ++++-----
 .../dal/dc/i2caux/dce110/i2c_hw_engine_dce110.h    | 124 ++++++++++++++++++++-
 .../drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.c   |  18 ++-
 .../drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.h   |   6 +-
 .../drm/amd/dal/dc/i2caux/dce112/i2caux_dce112.c   |  12 +-
 6 files changed, 195 insertions(+), 32 deletions(-)
drivers/gpu/drm/amd/dal/dc/i2caux/dce100/i2caux_dce100.c +11 -1
index ab138464aaa2..0712cafb4c42 100644
@@ -76,6 +76,14 @@ static const struct dce110_i2c_hw_engine_registers dce100_hw_engine_regs[] = {
 		hw_engine_regs(6)
 };
 
+static const struct dce110_i2c_hw_engine_shift i2c_shift = {
+		I2C_COMMON_MASK_SH_LIST_DCE100(__SHIFT)
+};
+
+static const struct dce110_i2c_hw_engine_mask i2c_mask = {
+		I2C_COMMON_MASK_SH_LIST_DCE100(_MASK)
+};
+
 struct i2caux *dal_i2caux_dce100_create(
 	struct dc_context *ctx)
 {
@@ -91,7 +99,9 @@ struct i2caux *dal_i2caux_dce100_create(
 			i2caux_dce110,
 			ctx,
 			dce100_aux_regs,
-			dce100_hw_engine_regs))
+			dce100_hw_engine_regs,
+			&i2c_shift,
+			&i2c_mask))
 		return &i2caux_dce110->base;
 
 	ASSERT_CRITICAL(false);
drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c +29 -26

103 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.h +123 -1

145 lines not on this page · raw message

drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.c +16 -2
index a66c365edfac..1c00ed0010d9 100644
@@ -188,11 +188,21 @@ static const struct dce110_i2c_hw_engine_registers i2c_hw_engine_regs[] = {
 		hw_engine_regs(6)
 };
 
+static const struct dce110_i2c_hw_engine_shift i2c_shift = {
+		I2C_COMMON_MASK_SH_LIST_DCE110(__SHIFT)
+};
+
+static const struct dce110_i2c_hw_engine_mask i2c_mask = {
+		I2C_COMMON_MASK_SH_LIST_DCE110(_MASK)
+};
+
 bool dal_i2caux_dce110_construct(
 	struct i2caux_dce110 *i2caux_dce110,
 	struct dc_context *ctx,
 	const struct dce110_aux_registers aux_regs[],
-	const struct dce110_i2c_hw_engine_registers i2c_hw_engine_regs[])
+	const struct dce110_i2c_hw_engine_registers i2c_hw_engine_regs[],
+	const struct dce110_i2c_hw_engine_shift *i2c_shift,
+	const struct dce110_i2c_hw_engine_mask *i2c_mask)
 {
 	uint32_t i = 0;
 	uint32_t reference_frequency = 0;
@@ -237,6 +247,8 @@ bool dal_i2caux_dce110_construct(
 		hw_arg_dce110.default_speed = base->default_i2c_hw_speed;
 		hw_arg_dce110.ctx = ctx;
 		hw_arg_dce110.regs = &i2c_hw_engine_regs[i];
+		hw_arg_dce110.i2c_shift = i2c_shift;
+		hw_arg_dce110.i2c_mask = i2c_mask;
 
 		base->i2c_hw_engines[line_id] =
 			dal_i2c_hw_engine_dce110_create(&hw_arg_dce110);
@@ -298,7 +310,9 @@ struct i2caux *dal_i2caux_dce110_create(
 			i2caux_dce110,
 			ctx,
 			dce110_aux_regs,
-			i2c_hw_engine_regs))
+			i2c_hw_engine_regs,
+			&i2c_shift,
+			&i2c_mask))
 		return &i2caux_dce110->base;
 
 	ASSERT_CRITICAL(false);
drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2caux_dce110.h +5 -1
index 4d544f4e6289..fd1cc23c3d70 100644
@@ -36,6 +36,8 @@ struct i2caux_dce110 {
 
 struct dce110_aux_registers;
 struct dce110_i2c_hw_engine_registers;
+struct dce110_i2c_hw_engine_shift;
+struct dce110_i2c_hw_engine_mask;
 
 struct i2caux *dal_i2caux_dce110_create(
 	struct dc_context *ctx);
@@ -44,6 +46,8 @@ bool dal_i2caux_dce110_construct(
 	struct i2caux_dce110 *i2caux_dce110,
 	struct dc_context *ctx,
 	const struct dce110_aux_registers *aux_regs,
-	const struct dce110_i2c_hw_engine_registers *i2c_hw_engine_regs);
+	const struct dce110_i2c_hw_engine_registers *i2c_hw_engine_regs,
+	const struct dce110_i2c_hw_engine_shift *i2c_shift,
+	const struct dce110_i2c_hw_engine_mask *i2c_mask);
 
 #endif /* __DAL_I2C_AUX_DCE110_H__ */
drivers/gpu/drm/amd/dal/dc/i2caux/dce112/i2caux_dce112.c +11 -1
index 2b1456e3d367..d74f3f15d600 100644
@@ -79,6 +79,14 @@ static const struct dce110_i2c_hw_engine_registers dce112_hw_engine_regs[] = {
 		hw_engine_regs(6)
 };
 
+static const struct dce110_i2c_hw_engine_shift i2c_shift = {
+		I2C_COMMON_MASK_SH_LIST_DCE110(__SHIFT)
+};
+
+static const struct dce110_i2c_hw_engine_mask i2c_mask = {
+		I2C_COMMON_MASK_SH_LIST_DCE110(_MASK)
+};
+
 static bool construct(
 	struct i2caux_dce110 *i2caux_dce110,
 	struct dc_context *ctx)
@@ -87,7 +95,9 @@ static bool construct(
 			i2caux_dce110,
 			ctx,
 			dce112_aux_regs,
-			dce112_hw_engine_regs)) {
+			dce112_hw_engine_regs,
+			&i2c_shift,
+			&i2c_mask)) {
 		ASSERT_CRITICAL(false);
 		return false;
 	}
Signature · 6 lines
2.9.3

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

PATCH 3/7 drm/amd/dal: Track windowed_fullscreen state in freesync module

In reply to a message not in the archive

From: Amy Zhang <[email protected]>

Change-Id If5c2282838810d8ed250345aa43dada900dd1caa
---
 drivers/gpu/drm/amd/dal/modules/freesync/freesync.c | 7 ++++++-
 drivers/gpu/drm/amd/dal/modules/inc/mod_freesync.h  | 2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/dal/modules/freesync/freesync.c +6 -1
index 12a2dc50307a..eb912baa0169 100644
@@ -82,6 +82,7 @@ struct freesync_state {
 	bool video;
 
 	unsigned int nominal_refresh_rate_in_micro_hz;
+	bool windowed_fullscreen;
 
 	struct time_cache time;
 
@@ -710,6 +711,8 @@ void mod_freesync_update_state(struct mod_freesync *mod_freesync,
 		case FREESYNC_STATE_FULLSCREEN:
 			state->fullscreen = freesync_params->enable;
 			freesync_program_required = true;
+			state->windowed_fullscreen =
+					freesync_params->windowed_fullscreen;
 			break;
 		case FREESYNC_STATE_STATIC_SCREEN:
 			/* Static screen ramp is only enabled for embedded
@@ -770,8 +773,10 @@ bool mod_freesync_get_state(struct mod_freesync *mod_freesync,
 	} else if (core_freesync->map[index].state.video) {
 		freesync_params->state = FREESYNC_STATE_VIDEO;
 		freesync_params->enable = true;
-	} else
+	} else {
+		freesync_params->state = FREESYNC_STATE_NONE;
 		freesync_params->enable = false;
+	}
 
 	freesync_params->update_duration_in_ns =
 		core_freesync->map[index].state.time.update_duration_in_ns;
drivers/gpu/drm/amd/dal/modules/inc/mod_freesync.h +2 -0
index 947619342d08..7abfe34dc2d9 100644
@@ -64,6 +64,7 @@ struct mod_freesync {
 };
 
 enum mod_freesync_state {
+	FREESYNC_STATE_NONE,
 	FREESYNC_STATE_FULLSCREEN,
 	FREESYNC_STATE_STATIC_SCREEN,
 	FREESYNC_STATE_VIDEO
@@ -93,6 +94,7 @@ struct mod_freesync_params {
 	enum mod_freesync_state state;
 	bool enable;
 	unsigned int update_duration_in_ns;
+	bool windowed_fullscreen;
 };
 
 /*
Signature · 6 lines
2.9.3

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

PATCH 4/7 drm/amd/dal: Remove extra newline

In reply to a message not in the archive
Change-Id I808e268496422add7174cd310631351af4972a1f
---
 drivers/gpu/drm/amd/dal/include/dal_asic_id.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/dal/include/dal_asic_id.h +0 -1
index c9402c0ed0bc..119297e3bdc0 100644
@@ -31,7 +31,6 @@
  */
 
 /* DCE80 (based on ci_id.h in Perforce) */
-
 #define	CI_BONAIRE_M_A0 0x14
 #define	CI_BONAIRE_M_A1	0x15
 #define	CI_HAWAII_P_A0	0x28
Signature · 6 lines
2.9.3

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

PATCH 5/7 drm/amd/dal: program HDMI_DATA_SCRAMBLER bit for HDMI 2.0

In reply to a message not in the archive
Change-Id Iad39ffaf361001fc84572a3f902c827c9d4ee1d8
---
 .../gpu/drm/amd/dal/dc/dce/dce_stream_encoder.c    | 39 ++++++++++++++++++----
 .../gpu/drm/amd/dal/dc/dce/dce_stream_encoder.h    |  4 +++
 2 files changed, 37 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/dal/dc/dce/dce_stream_encoder.c +33 -6
index c573a87fbff3..842182ce93a8 100644
@@ -59,11 +59,6 @@ DP_COMPONENT_DEPTH_RESERVED              = 0x00000005,
 #define DP_BLANK_MAX_RETRY 20
 #define HDMI_CLOCK_CHANNEL_RATE_MORE_340M 340000
 
-#ifndef HDMI_CONTROL__HDMI_DATA_SCRAMBLE_EN_MASK
-	#define HDMI_CONTROL__HDMI_DATA_SCRAMBLE_EN_MASK 0x2
-	#define HDMI_CONTROL__HDMI_DATA_SCRAMBLE_EN__SHIFT 0x1
-#endif
-
 #ifndef TMDS_CNTL__TMDS_PIXEL_ENCODING_MASK
 	#define TMDS_CNTL__TMDS_PIXEL_ENCODING_MASK       0x00000010L
 	#define TMDS_CNTL__TMDS_COLOR_FORMAT_MASK         0x00000300L
@@ -347,11 +342,19 @@ static void dce110_stream_encoder_hdmi_set_stream_attribute(
 
 	dce110_stream_encoder_set_stream_attribute_helper(enc110, crtc_timing);
 
-	if (enc110->regs->DIG_FE_CNTL) {
+	/* setup HDMI engine */
+	if (!enc110->se_mask->HDMI_DATA_SCRAMBLE_EN) {
 		REG_UPDATE_3(HDMI_CONTROL,
 			HDMI_PACKET_GEN_VERSION, 1,
 			HDMI_KEEPOUT_MODE, 1,
 			HDMI_DEEP_COLOR_ENABLE, 0);
+	} else if (enc110->regs->DIG_FE_CNTL) {
+		REG_UPDATE_5(HDMI_CONTROL,
+			HDMI_PACKET_GEN_VERSION, 1,
+			HDMI_KEEPOUT_MODE, 1,
+			HDMI_DEEP_COLOR_ENABLE, 0,
+			HDMI_DATA_SCRAMBLE_EN, 0,
+			HDMI_CLOCK_CHANNEL_RATE, 0);
 	}
 
 	switch (crtc_timing->display_color_depth) {
@@ -377,6 +380,30 @@ static void dce110_stream_encoder_hdmi_set_stream_attribute(
 		break;
 	}
 
+	if (enc110->se_mask->HDMI_DATA_SCRAMBLE_EN) {
+		if (actual_pix_clk_khz >= HDMI_CLOCK_CHANNEL_RATE_MORE_340M) {
+			/* enable HDMI data scrambler
+			 * HDMI_CLOCK_CHANNEL_RATE_MORE_340M
+			 * Clock channel frequency is 1/4 of character rate.
+			 */
+			REG_UPDATE_2(HDMI_CONTROL,
+				HDMI_DATA_SCRAMBLE_EN, 1,
+				HDMI_CLOCK_CHANNEL_RATE, 1);
+		} else if (crtc_timing->flags.LTE_340MCSC_SCRAMBLE) {
+
+			/* TODO: New feature for DCE11, still need to implement */
+
+			/* enable HDMI data scrambler
+			 * HDMI_CLOCK_CHANNEL_FREQ_EQUAL_TO_CHAR_RATE
+			 * Clock channel frequency is the same
+			 * as character rate
+			 */
+			REG_UPDATE_2(HDMI_CONTROL,
+				HDMI_DATA_SCRAMBLE_EN, 1,
+				HDMI_CLOCK_CHANNEL_RATE, 0);
+		}
+	}
+
 	REG_UPDATE_3(HDMI_VBI_PACKET_CONTROL,
 		HDMI_GC_CONT, 1,
 		HDMI_GC_SEND, 1,
drivers/gpu/drm/amd/dal/dc/dce/dce_stream_encoder.h +4 -0
index c34b52a186b6..458a37000956 100644
@@ -196,6 +196,7 @@
 	SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh),\
 	SE_SF(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, mask_sh),\
 	SE_SF(HDMI_CONTROL, HDMI_CLOCK_CHANNEL_RATE, mask_sh),\
+	SE_SF(HDMI_CONTROL, HDMI_DATA_SCRAMBLE_EN, mask_sh),\
 	SE_SF(DIG_FE_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\
 	SE_SF(DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh)
 
@@ -203,6 +204,7 @@
 	SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh),\
 	SE_SF(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, mask_sh),\
 	SE_SF(HDMI_CONTROL, HDMI_CLOCK_CHANNEL_RATE, mask_sh),\
+	SE_SF(HDMI_CONTROL, HDMI_DATA_SCRAMBLE_EN, mask_sh),\
 	SE_SF(DIG_FE_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\
 	SE_SF(DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh),\
 	SE_SF(DP_VID_TIMING, DP_VID_M_DOUBLE_VALUE_EN, mask_sh)
@@ -252,6 +254,7 @@ struct dce_stream_encoder_shift {
 	uint8_t HDMI_GC_CONT;
 	uint8_t HDMI_GC_SEND;
 	uint8_t HDMI_NULL_SEND;
+	uint8_t HDMI_DATA_SCRAMBLE_EN;
 	uint8_t HDMI_AUDIO_INFO_SEND;
 	uint8_t AFMT_AUDIO_INFO_UPDATE;
 	uint8_t HDMI_AUDIO_INFO_LINE;
@@ -379,6 +382,7 @@ struct dce_stream_encoder_mask {
 	uint32_t HDMI_GC_CONT;
 	uint32_t HDMI_GC_SEND;
 	uint32_t HDMI_NULL_SEND;
+	uint32_t HDMI_DATA_SCRAMBLE_EN;
 	uint32_t HDMI_AUDIO_INFO_SEND;
 	uint32_t AFMT_AUDIO_INFO_UPDATE;
 	uint32_t HDMI_AUDIO_INFO_LINE;
Signature · 6 lines
2.9.3

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

PATCH 6/7 drm/amd/dal: Program DPHY_SCRAM_CNTL for HBR2 compliance pattern

In reply to a message not in the archive
Change-Id Ie76f6365870c47867dd3fb0b7346809adb4ed029
---
 drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c | 7 +++++++
 drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.h | 3 +++
 2 files changed, 10 insertions(+)
drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.c +7 -0
index 5ca59fa8bcca..86e55d028cbf 100644
@@ -455,6 +455,9 @@ static void set_dp_phy_pattern_hbr2_compliance(
 
 	dal_write_reg(ctx, addr, value);
 	 */
+	/* swap every BS with SR */
+
+	REG_UPDATE(DP_DPHY_SCRAM_CNTL, DPHY_SCRAMBLER_BS_COUNT, 0);
 
 	/*TODO add support for this test pattern
 	 * support_dp_hbr2_eye_pattern
@@ -497,6 +500,8 @@ static void set_dp_phy_pattern_passthrough_mode(
 		REG_WRITE(DP_DPHY_INTERNAL_CTRL, value);
 	}
 
+	REG_UPDATE(DP_DPHY_SCRAM_CNTL, DPHY_SCRAMBLER_BS_COUNT, 0x1FF);
+
 	/* set link training complete */
 
 	set_link_training_complete(enc110, true);
@@ -543,6 +548,8 @@ static void configure_encoder(
 	REG_SET(DP_CONFIG, 0,
 			DP_UDI_LANES, link_settings->lane_count - LANE_COUNT_ONE);
 
+	/* setup scrambler */
+	REG_UPDATE(DP_DPHY_SCRAM_CNTL, DPHY_SCRAMBLER_ADVANCE, 1);
 }
 
 static bool is_panel_powered_on(struct dce110_link_encoder *enc110)
drivers/gpu/drm/amd/dal/dc/dce/dce_link_encoder.h +3 -0
index 463dbb5c34db..1635b239402f 100644
@@ -61,6 +61,7 @@
 	SRI(DP_CONFIG, DP, id), \
 	SRI(DP_DPHY_CNTL, DP, id), \
 	SRI(DP_DPHY_PRBS_CNTL, DP, id), \
+	SRI(DP_DPHY_SCRAM_CNTL, DP, id),\
 	SRI(DP_DPHY_SYM0, DP, id), \
 	SRI(DP_DPHY_SYM1, DP, id), \
 	SRI(DP_DPHY_SYM2, DP, id), \
@@ -98,6 +99,7 @@
 		SR(BL1_PWM_USER_LEVEL), \
 		LE_COMMON_REG_LIST_BASE(id)
 
+
 struct dce110_link_enc_aux_registers {
 	uint32_t AUX_CONTROL;
 	uint32_t AUX_DPHY_RX_CONTROL0;
@@ -142,6 +144,7 @@ struct dce110_link_enc_registers {
 	uint32_t DP_DPHY_CNTL;
 	uint32_t DP_DPHY_INTERNAL_CTRL;
 	uint32_t DP_DPHY_PRBS_CNTL;
+	uint32_t DP_DPHY_SCRAM_CNTL;
 	uint32_t DP_DPHY_SYM0;
 	uint32_t DP_DPHY_SYM1;
 	uint32_t DP_DPHY_SYM2;
Signature · 6 lines
2.9.3

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

PATCH 7/7 drm/amd/dal: Remove unneccessary macro

In reply to a message not in the archive
Change-Id I756cb599927d448f7237b3a961627cca1f815a1a
---
 drivers/gpu/drm/amd/dal/dc/dce/dce_audio.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/dal/dc/dce/dce_audio.h +1 -4
index 6c9fe17569a5..bf97cd8c8221 100644
@@ -27,7 +27,7 @@
 
 #include "audio.h"
 
-#define AUD_COMMON_REG_LIST_BASE(id)\
+#define AUD_COMMON_REG_LIST(id)\
 	SRI(AZALIA_F0_CODEC_ENDPOINT_INDEX, AZF0ENDPOINT, id),\
 	SRI(AZALIA_F0_CODEC_ENDPOINT_DATA, AZF0ENDPOINT, id),\
 	SR(AZALIA_F0_CODEC_FUNCTION_PARAMETER_STREAM_FORMATS),\
@@ -39,9 +39,6 @@
 	SR(DCCG_AUDIO_DTO1_MODULE),\
 	SR(DCCG_AUDIO_DTO1_PHASE)
 
-#define AUD_COMMON_REG_LIST(id)\
-	AUD_COMMON_REG_LIST_BASE(id)
-
 
  /* set field name */
 #define SF(reg_name, field_name, post_fix)\
Signature · 6 lines
2.9.3

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