Skip to contentSkip to conversation

DC Patches Dec 1, 2017

PATCH New Harry Wentland 1 participant 21 messages Dec 1, 2017 1 message not in the archive

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

cover DC Patches Dec 1, 2017

* Bunch of fixes for DCN BW
* DCN programming sequence optimizations
* Leave Freesync disabled unless usermode turns it on
* Print DC version at initialization

Dmytro Laktyushkin (4):
drm/amd/display: set chroma taps to 1 when not scaling drm/amd/display: Add dppclk to dcn_bw_clocks drm/amd/display: add assert to verify dcn_calc input validity drm/amd/display: use clamping rather than truncation for CM fp
conversions

Eric Bernstein (2):
drm/amd/display: use REG_UPDATE for MPC mux drm/amd/display: Move OPP mpc tree initialization to hw_init

Eric Yang (1):
drm/amd/display: fix missing pixel clock adjustment for dongle

Harry Wentland (4):
drm/amd/display: Print DC_VER at DC init drm/amd/display: Remove redundant NULL check in DCE11 HWSS drm/amd/display: Remove grph_object_id.c and move function to
bios_parser
drm/amd/display: Add TODO item to remove vector.c

Leo (Sunpeng) Li (1):
drm/amd/display: Disable freesync by default

Tony Cheng (2):
drm/amd/display: really fix time out in init sequence drm/amd/display: dal 3.1.25

Vitaly Prosyak (2):
drm/amd/display: Move unity TF type to predefined types drm/amd/display: Correct fixed point calculation.

Yongqiang Sun (1):
drm/amd/display: Move wait for hpd ready out from edp power control.

Yue Hin Lau (3):
drm/amd/display: dpp clean up
drm/amd/display: OPTC cleanup/implementation drm/amd/display: remove format_control from set_cursor_attributes

 drivers/gpu/drm/amd/display/TODO                   |   3 +
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |   8 +-
 drivers/gpu/drm/amd/display/dc/basics/Makefile     |   2 +-
 drivers/gpu/drm/amd/display/dc/basics/conversion.c |   2 +-
 drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c |  24 +-
 .../gpu/drm/amd/display/dc/basics/grph_object_id.c |  75 -----
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  |  46 +++
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c   |  20 ++
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |  29 +-
 drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c |  11 +-
 drivers/gpu/drm/amd/display/dc/dc.h                |   4 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h     |   3 +-
 .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c  |  15 -
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    |  19 +-
 .../amd/display/dc/dce110/dce110_hw_sequencer.h    |   4 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c |  18 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c   |  16 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h   |   3 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c    |   4 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c  |   5 +-
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |   8 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c   |   8 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c   |   7 -
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |  10 +-
 .../amd/display/dc/dcn10/dcn10_timing_generator.c  | 316 ++++++++++-----------
 .../amd/display/dc/dcn10/dcn10_timing_generator.h  |  90 +++++-
 drivers/gpu/drm/amd/display/dc/inc/core_types.h    |   1 +
 drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h  |   7 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/opp.h        |   1 +
 drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h  |   1 +
 drivers/gpu/drm/amd/display/include/fixed31_32.h   |   4 +-
 .../gpu/drm/amd/display/include/grph_object_id.h   |   4 -
 32 files changed, 413 insertions(+), 355 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c
Signature · 6 lines
2.14.1

_______________________________________________
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): 20171201142554.11672-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 1/20 drm/amd/display: really fix time out in init sequence

From: Tony Cheng <[email protected]>

REG_UPDATE_2 return the reg value it write out through MMIO we need to do a REG_READ to confirm the value is written out

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +3 -2
index 1984ac2eb740..2d843b2d5f86 100644
@@ -42,13 +42,14 @@ void hubp1_set_blank(struct hubp *hubp, bool blank)
 {
 	struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
 	uint32_t blank_en = blank ? 1 : 0;
-	uint32_t reg_val = 0;
 
-	reg_val = REG_UPDATE_2(DCHUBP_CNTL,
+	REG_UPDATE_2(DCHUBP_CNTL,
 			HUBP_BLANK_EN, blank_en,
 			HUBP_TTU_DISABLE, blank_en);
 
 	if (blank) {
+		uint32_t reg_val = REG_READ(DCHUBP_CNTL);
+
 		if (reg_val) {
 			/* init sequence workaround: in case HUBP is
 			 * power gated, this wait would timeout.
Signature · 6 lines
2.14.1

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

PATCH 2/20 drm/amd/display: Print DC_VER at DC init

In reply to a message not in the archive

This has proven helpful on other OSes to give a quick state of the DC driver when a bug is reported.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
index fd7f6c5df73d..d2d9cf5e0cfc 100644
@@ -431,9 +431,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 	adev->dm.dc = dc_create(&init_data);
 
 	if (adev->dm.dc) {
-		DRM_INFO("Display Core initialized!\n");
+		DRM_INFO("Display Core initialized with v%s!\n", DC_VER);
 	} else {
-		DRM_INFO("Display Core failed to initialize!\n");
+		DRM_INFO("Display Core failed to initialize with v%s!\n", DC_VER);
 		goto error;
 	}
 
Signature · 6 lines
2.14.1

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

PATCH 3/20 drm/amd/display: Disable freesync by default

In reply to a message not in the archive

From: "Leo (Sunpeng) Li" <[email protected]>

Freesync properties are being set to the 'freesync_capable' flag, which will enable freesync on all freesync capable displays. Don't do this, since freesync should be disabled by default regardless of capabilities.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -4
index d2d9cf5e0cfc..7d86c9850b7a 100644
@@ -5005,10 +5005,6 @@ void amdgpu_dm_add_sink_to_freesync_module(struct drm_connector *connector,
 			dm_con_state->freesync_capable = true;
 		}
 	}
-
-	dm_con_state->user_enable.enable_for_gaming = dm_con_state->freesync_capable;
-	dm_con_state->user_enable.enable_for_static = dm_con_state->freesync_capable;
-	dm_con_state->user_enable.enable_for_video = dm_con_state->freesync_capable;
 }
 
 void amdgpu_dm_remove_sink_from_freesync_module(struct drm_connector *connector)
Signature · 6 lines
2.14.1

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

PATCH 4/20 drm/amd/display: set chroma taps to 1 when not scaling

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 9 +++++++++
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 9 ++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +9 -0
index b5bc9159f48e..453ec1c6c181 100644
@@ -897,6 +897,15 @@ bool dcn_validate_bandwidth(
 			v->override_vta_ps[input_idx] = pipe->plane_res.scl_data.taps.v_taps;
 			v->override_hta_pschroma[input_idx] = pipe->plane_res.scl_data.taps.h_taps_c;
 			v->override_vta_pschroma[input_idx] = pipe->plane_res.scl_data.taps.v_taps_c;
+			/*
+			 * Spreadsheet doesn't handle taps_c is one properly,
+			 * need to force Chroma to always be scaled to pass
+			 * bandwidth validation.
+			 */
+			if (v->override_hta_pschroma[input_idx] == 1)
+				v->override_hta_pschroma[input_idx] = 2;
+			if (v->override_vta_pschroma[input_idx] == 1)
+				v->override_vta_pschroma[input_idx] = 2;
 			v->source_scan[input_idx] = (pipe->plane_state->rotation % 2) ? dcn_bw_vert : dcn_bw_hor;
 		}
 		if (v->is_line_buffer_bpp_fixed == dcn_bw_yes)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +4 -5
index 5a95fa03bc17..6db1839d7155 100644
@@ -159,11 +159,10 @@ bool dpp_get_optimal_number_of_taps(
 			scl_data->taps.h_taps = 1;
 		if (IDENTITY_RATIO(scl_data->ratios.vert))
 			scl_data->taps.v_taps = 1;
-		/*
-		 * Spreadsheet doesn't handle taps_c is one properly,
-		 * need to force Chroma to always be scaled to pass
-		 * bandwidth validation.
-		 */
+		if (IDENTITY_RATIO(scl_data->ratios.horz_c))
+			scl_data->taps.h_taps_c = 1;
+		if (IDENTITY_RATIO(scl_data->ratios.vert_c))
+			scl_data->taps.v_taps_c = 1;
 	}
 
 	return true;
Signature · 6 lines
2.14.1

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

PATCH 5/20 drm/amd/display: Add dppclk to dcn_bw_clocks

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h            | 3 ++-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1 -
 drivers/gpu/drm/amd/display/dc/inc/core_types.h           | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +2 -1
index 3b0db253ac22..b73db9e78437 100644
@@ -582,7 +582,8 @@ struct dce_hwseq_registers {
 	type DOMAIN7_PGFSM_PWR_STATUS; \
 	type DCFCLK_GATE_DIS; \
 	type DCHUBBUB_GLOBAL_TIMER_REFDIV; \
-	type DENTIST_DPPCLK_WDIVIDER;
+	type DENTIST_DPPCLK_WDIVIDER; \
+	type DENTIST_DISPCLK_WDIVIDER;
 
 struct dce_hwseq_shift {
 	HWSEQ_REG_FIELD_LIST(uint8_t)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -1
index a4d756c1b97a..39a4d1a86583 100644
@@ -1335,7 +1335,6 @@ static void dcn10_enable_plane(
 	/* make sure OPP_PIPE_CLOCK_EN = 1 */
 	REG_UPDATE(OPP_PIPE_CONTROL[pipe_ctx->stream_res.tg->inst],
 			OPP_PIPE_CLOCK_EN, 1);
-	/*TODO: REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_WDIVIDER, 0x1f);*/
 
 /* TODO: enable/disable in dm as per update type.
 	if (plane_state) {
drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 -0
index d680b565af6f..9cc6bbb20714 100644
@@ -241,6 +241,7 @@ struct dce_bw_output {
 
 struct dcn_bw_clocks {
 	int dispclk_khz;
+	int dppclk_khz;
 	bool dppclk_div;
 	int dcfclk_khz;
 	int dcfclk_deep_sleep_khz;
Signature · 6 lines
2.14.1

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

PATCH 6/20 drm/amd/display: add assert to verify dcn_calc input validity

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

This reverts commit 978482d0de86 Revert noisy assert messages

---
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +11 -0
index 453ec1c6c181..47dbc953a3a9 100644
@@ -887,6 +887,17 @@ bool dcn_validate_bandwidth(
 						+ pipe->bottom_pipe->plane_res.scl_data.recout.width;
 			}
 
+			if (pipe->plane_state->rotation % 2 == 0) {
+				ASSERT(pipe->plane_res.scl_data.ratios.horz.value != dal_fixed31_32_one.value
+					|| v->scaler_rec_out_width[input_idx] == v->viewport_width[input_idx]);
+				ASSERT(pipe->plane_res.scl_data.ratios.vert.value != dal_fixed31_32_one.value
+					|| v->scaler_recout_height[input_idx] == v->viewport_height[input_idx]);
+			} else {
+				ASSERT(pipe->plane_res.scl_data.ratios.horz.value != dal_fixed31_32_one.value
+					|| v->scaler_recout_height[input_idx] == v->viewport_width[input_idx]);
+				ASSERT(pipe->plane_res.scl_data.ratios.vert.value != dal_fixed31_32_one.value
+					|| v->scaler_rec_out_width[input_idx] == v->viewport_height[input_idx]);
+			}
 			v->dcc_enable[input_idx] = pipe->plane_state->dcc.enable ? dcn_bw_yes : dcn_bw_no;
 			v->source_pixel_format[input_idx] = tl_pixel_format_to_bw_defs(
 					pipe->plane_state->format);
Signature · 6 lines
2.14.1

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

PATCH 7/20 drm/amd/display: dpp clean up

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 4 +++-
 drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h   | 7 +------
 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +3 -1
index 4c90043e7b8c..4f5125398bbc 100644
@@ -49,6 +49,8 @@
 #define FN(reg_name, field_name) \
 	dpp->tf_shift->field_name, dpp->tf_mask->field_name
 
+#define NUM_ELEMENTS(a) (sizeof(a) / sizeof((a)[0]))
+
 struct dcn10_input_csc_matrix {
 	enum dc_color_space color_space;
 	uint16_t regval[12];
@@ -270,7 +272,7 @@ void dpp1_cm_set_output_csc_default(
 	struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base);
 	struct out_csc_color_matrix tbl_entry;
 	int i, j;
-	int arr_size = sizeof(output_csc_matrix) / sizeof(struct output_csc_matrix);
+	int arr_size = NUM_ELEMENTS(output_csc_matrix);
 	uint32_t ocsc_mode = 4;
 
 	tbl_entry.color_space = colorspace;
drivers/gpu/drm/amd/display/dc/inc/hw/hw_shared.h +1 -6
index d7d027c7ae51..0f70f36a3ebe 100644
@@ -131,12 +131,7 @@ struct out_csc_color_matrix {
 	uint16_t regval[12];
 };
 
-struct output_csc_matrix {
-	enum dc_color_space color_space;
-	uint16_t regval[12];
-};
-
-static const struct output_csc_matrix output_csc_matrix[] = {
+static const struct out_csc_color_matrix output_csc_matrix[] = {
 	{ COLOR_SPACE_SRGB,
 		{ 0x2000, 0, 0, 0, 0, 0x2000, 0, 0, 0, 0, 0x2000, 0} },
 	{ COLOR_SPACE_SRGB_LIMITED,
Signature · 6 lines
2.14.1

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

PATCH 8/20 drm/amd/display: Move unity TF type to predefined types

In reply to a message not in the archive

From: Vitaly Prosyak <[email protected]>

Also handle fixpoint y values for CM curves

---
 drivers/gpu/drm/amd/display/dc/dc.h                    | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 6 ++++--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h       | 3 +--
 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 74286d3001ae..939fa6f85826 100644
@@ -343,7 +343,6 @@ enum dc_transfer_func_type {
 	TF_TYPE_PREDEFINED,
 	TF_TYPE_DISTRIBUTED_POINTS,
 	TF_TYPE_BYPASS,
-	TF_TYPE_UNITY
 };
 
 struct dc_transfer_func_distributed_points {
@@ -362,6 +361,7 @@ enum dc_transfer_func_predefined {
 	TRANSFER_FUNCTION_BT709,
 	TRANSFER_FUNCTION_PQ,
 	TRANSFER_FUNCTION_LINEAR,
+	TRANSFER_FUNCTION_UNITY,
 };
 
 struct dc_transfer_func {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +4 -2
index e132d0163787..352ae7bf9a3f 100644
@@ -168,8 +168,10 @@ bool cm_helper_convert_to_custom_float(
 		return false;
 	}
 
-	if (!convert_to_custom_float_format(arr_points[1].y, &fmt,
-					    &arr_points[1].custom_float_y)) {
+	if (fixpoint == true)
+		arr_points[1].custom_float_y = dal_fixed31_32_u0d14(arr_points[1].y);
+	else if (!convert_to_custom_float_format(arr_points[1].y, &fmt,
+		&arr_points[1].custom_float_y)) {
 		BREAK_TO_DEBUGGER();
 		return false;
 	}
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +1 -2
index 41f0c84bfa09..b6d526067cb5 100644
@@ -731,7 +731,7 @@
 	type CM_BLNDGAM_LUT_WRITE_EN_MASK; \
 	type CM_BLNDGAM_LUT_WRITE_SEL; \
 	type CM_BLNDGAM_LUT_INDEX; \
-	type CM_BLNDGAM_LUT_DATA; \
+	type BLNDGAM_MEM_PWR_FORCE; \
 	type CM_3DLUT_MODE; \
 	type CM_3DLUT_SIZE; \
 	type CM_3DLUT_INDEX; \
@@ -1147,7 +1147,6 @@ struct dcn_dpp_mask {
 	uint32_t CM_BLNDGAM_RAMA_REGION_30_31; \
 	uint32_t CM_BLNDGAM_RAMA_REGION_32_33; \
 	uint32_t CM_BLNDGAM_LUT_INDEX; \
-	uint32_t CM_BLNDGAM_LUT_DATA; \
 	uint32_t CM_3DLUT_MODE; \
 	uint32_t CM_3DLUT_INDEX; \
 	uint32_t CM_3DLUT_DATA; \
Signature · 6 lines
2.14.1

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

PATCH 9/20 drm/amd/display: OPTC cleanup/implementation

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |   2 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |  10 +-
 .../amd/display/dc/dcn10/dcn10_timing_generator.c  | 316 ++++++++++-----------
 .../amd/display/dc/dcn10/dcn10_timing_generator.h  |  90 +++++-
 4 files changed, 244 insertions(+), 174 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -1
index 39a4d1a86583..7ec87fcb22be 100644
@@ -159,7 +159,7 @@ void dcn10_log_hw_state(struct dc *dc)
 		struct timing_generator *tg = pool->timing_generators[i];
 		struct dcn_otg_state s = {0};
 
-		tgn10_read_otg_state(DCN10TG_FROM_TG(tg), &s);
+		optc1_read_otg_state(DCN10TG_FROM_TG(tg), &s);
 
 		//only print if OTG master is enabled
 		if ((s.otg_enabled & 1) == 0)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +5 -5
index a9a5d176cb70..65ce96ba6443 100644
@@ -348,18 +348,18 @@ static const struct dcn_mpc_mask mpc_mask = {
 #define tg_regs(id)\
 [id] = {TG_COMMON_REG_LIST_DCN1_0(id)}
 
-static const struct dcn_tg_registers tg_regs[] = {
+static const struct dcn_optc_registers tg_regs[] = {
 	tg_regs(0),
 	tg_regs(1),
 	tg_regs(2),
 	tg_regs(3),
 };
 
-static const struct dcn_tg_shift tg_shift = {
+static const struct dcn_optc_shift tg_shift = {
 	TG_COMMON_MASK_SH_LIST_DCN1_0(__SHIFT)
 };
 
-static const struct dcn_tg_mask tg_mask = {
+static const struct dcn_optc_mask tg_mask = {
 	TG_COMMON_MASK_SH_LIST_DCN1_0(_MASK)
 };
 
@@ -553,8 +553,8 @@ static struct timing_generator *dcn10_timing_generator_create(
 		struct dc_context *ctx,
 		uint32_t instance)
 {
-	struct dcn10_timing_generator *tgn10 =
-		kzalloc(sizeof(struct dcn10_timing_generator), GFP_KERNEL);
+	struct optc *tgn10 =
+		kzalloc(sizeof(struct optc), GFP_KERNEL);
 
 	if (!tgn10)
 		return NULL;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +158 -158

704 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h +80 -10

128 lines not on this page · raw message

Signature · 6 lines
2.14.1

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

PATCH 10/20 drm/amd/display: Correct fixed point calculation.

In reply to a message not in the archive

From: Vitaly Prosyak <[email protected]>

When convert from fixed31_32 to other fixed point format use math operation round instead of floor.

---
 drivers/gpu/drm/amd/display/dc/basics/conversion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/basics/conversion.c +1 -1
index 23c9a0ec0181..310964915a83 100644
@@ -46,7 +46,7 @@ uint16_t fixed_point_to_int_frac(
 			arg));
 
 	if (d <= (uint16_t)(1 << integer_bits) - (1 / (uint16_t)divisor))
-		numerator = (uint16_t)dal_fixed31_32_floor(
+		numerator = (uint16_t)dal_fixed31_32_round(
 			dal_fixed31_32_mul_int(
 				arg,
 				divisor));
Signature · 6 lines
2.14.1

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

PATCH 11/20 drm/amd/display: use REG_UPDATE for MPC mux

In reply to a message not in the archive

From: Eric Bernstein <[email protected]>

Use REG_UPDATE instead of REG_SET for programming MPC out mux.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +4 -4
index 1e72bd42dca4..179890b1a8c4 100644
@@ -218,7 +218,7 @@ struct mpcc *mpc1_insert_plane(
 	if (tree->opp_list == insert_above_mpcc) {
 		/* insert the toppest mpcc */
 		tree->opp_list = new_mpcc;
-		REG_SET(MUX[tree->opp_id], 0, MPC_OUT_MUX, mpcc_id);
+		REG_UPDATE(MUX[tree->opp_id], MPC_OUT_MUX, mpcc_id);
 	} else {
 		/* find insert position */
 		struct mpcc *temp_mpcc = tree->opp_list;
@@ -275,11 +275,11 @@ void mpc1_remove_mpcc(
 		if (mpcc_to_remove->mpcc_bot) {
 			/* set the next MPCC in list to be the top MPCC */
 			tree->opp_list = mpcc_to_remove->mpcc_bot;
-			REG_SET(MUX[tree->opp_id], 0, MPC_OUT_MUX, tree->opp_list->mpcc_id);
+			REG_UPDATE(MUX[tree->opp_id], MPC_OUT_MUX, tree->opp_list->mpcc_id);
 		} else {
 			/* there are no other MPCC is list */
 			tree->opp_list = NULL;
-			REG_SET(MUX[tree->opp_id], 0, MPC_OUT_MUX, 0xf);
+			REG_UPDATE(MUX[tree->opp_id], MPC_OUT_MUX, 0xf);
 		}
 	} else {
 		/* find mpcc to remove MPCC list */
@@ -359,7 +359,7 @@ void mpc1_mpc_init(struct mpc *mpc)
 
 	for (opp_id = 0; opp_id < MAX_OPP; opp_id++) {
 		if (REG(MUX[opp_id]))
-			REG_SET(MUX[opp_id], 0, MPC_OUT_MUX, 0xf);
+			REG_UPDATE(MUX[opp_id], MPC_OUT_MUX, 0xf);
 	}
 }
 
Signature · 6 lines
2.14.1

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

PATCH 12/20 drm/amd/display: Move OPP mpc tree initialization to hw_init

In reply to a message not in the archive

From: Eric Bernstein <[email protected]>

Move OPP initialization of mpc tree parameters to hw_init function.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 ++
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c          | 7 -------
 drivers/gpu/drm/amd/display/dc/inc/hw/opp.h               | 1 +
 3 files changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -0
index 7ec87fcb22be..f0be2b872668 100644
@@ -782,6 +782,8 @@ static void dcn10_init_hw(struct dc *dc)
 		hubp->opp_id = 0xf;
 		hubp->power_gated = false;
 
+		dc->res_pool->opps[i]->mpc_tree_params.opp_id = dc->res_pool->opps[i]->inst;
+		dc->res_pool->opps[i]->mpc_tree_params.opp_list = NULL;
 		dc->res_pool->opps[i]->mpcc_disconnect_pending[i] = true;
 		pipe_ctx->stream_res.opp = dc->res_pool->opps[i];
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c +0 -7
index 20d78cf46ab0..5f078868676c 100644
@@ -330,18 +330,11 @@ void dcn10_opp_construct(struct dcn10_opp *oppn10,
 	const struct dcn10_opp_shift *opp_shift,
 	const struct dcn10_opp_mask *opp_mask)
 {
-	int i;
 
 	oppn10->base.ctx = ctx;
 	oppn10->base.inst = inst;
 	oppn10->base.funcs = &dcn10_opp_funcs;
 
-	oppn10->base.mpc_tree_params.opp_id = inst;
-	oppn10->base.mpc_tree_params.opp_list = NULL;
-
-	for (i = 0; i < MAX_PIPES; i++)
-		oppn10->base.mpcc_disconnect_pending[i] = false;
-
 	oppn10->regs = regs;
 	oppn10->opp_shift = opp_shift;
 	oppn10->opp_mask = opp_mask;
drivers/gpu/drm/amd/display/dc/inc/hw/opp.h +1 -0
index 42f2bb29a5fc..6da125de9507 100644
@@ -300,6 +300,7 @@ struct opp_funcs {
 		struct output_pixel_processor *opp,
 		bool enable,
 		bool polarity);
+
 };
 
 #endif
Signature · 6 lines
2.14.1

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

PATCH 13/20 drm/amd/display: fix missing pixel clock adjustment for dongle

In reply to a message not in the archive

From: Eric Yang <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +3 -1
index 0b7058fddc2e..13995893cac5 100644
@@ -1801,7 +1801,7 @@ static void disable_link(struct dc_link *link, enum signal_type signal)
 		link->link_enc->funcs->disable_output(link->link_enc, signal);
 }
 
-bool dp_active_dongle_validate_timing(
+static bool dp_active_dongle_validate_timing(
 		const struct dc_crtc_timing *timing,
 		const struct dc_dongle_caps *dongle_caps)
 {
@@ -1833,6 +1833,8 @@ bool dp_active_dongle_validate_timing(
 	/* Check Color Depth and Pixel Clock */
 	if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR420)
 		required_pix_clk /= 2;
+	else if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR422)
+		required_pix_clk = required_pix_clk * 2 / 3;
 
 	switch (timing->display_color_depth) {
 	case COLOR_DEPTH_666:
Signature · 6 lines
2.14.1

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

PATCH 14/20 drm/amd/display: Move wait for hpd ready out from edp power control.

In reply to a message not in the archive

From: Yongqiang Sun <[email protected]>

It may take over 200ms for wait hpd ready. To optimize the resume time, we can power on eDP in init_hw, wait for hpd ready when doing link training.

also create separate eDP enable function to make sure eDP is powered up before doing and DPCD access, as HPD low will result in DPDC transaction failure.

After optimization,
setpowerstate 145ms -> 9.8ms,
DPMS 387ms -> 18.9ms

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      | 25 +++++++++++++++++++++-
 drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 11 +---------
 .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c  | 15 -------------
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 16 ++++----------
 .../amd/display/dc/dce110/dce110_hw_sequencer.h    |  4 ++++
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |  3 ++-
 drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h  |  1 +
 7 files changed, 36 insertions(+), 39 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +24 -1
index 13995893cac5..00130152f366 100644
@@ -1271,6 +1271,24 @@ static enum dc_status enable_link_dp(
 	return status;
 }
 
+static enum dc_status enable_link_edp(
+		struct dc_state *state,
+		struct pipe_ctx *pipe_ctx)
+{
+	enum dc_status status;
+	struct dc_stream_state *stream = pipe_ctx->stream;
+	struct dc_link *link = stream->sink->link;
+
+	link->dc->hwss.edp_power_control(link, true);
+	link->dc->hwss.edp_wait_for_hpd_ready(link, true);
+
+	status = enable_link_dp(state, pipe_ctx);
+
+	link->dc->hwss.edp_backlight_control(link, true);
+
+	return status;
+}
+
 static enum dc_status enable_link_dp_mst(
 		struct dc_state *state,
 		struct pipe_ctx *pipe_ctx)
@@ -1746,9 +1764,11 @@ static enum dc_status enable_link(
 	enum dc_status status = DC_ERROR_UNEXPECTED;
 	switch (pipe_ctx->stream->signal) {
 	case SIGNAL_TYPE_DISPLAY_PORT:
-	case SIGNAL_TYPE_EDP:
 		status = enable_link_dp(state, pipe_ctx);
 		break;
+	case SIGNAL_TYPE_EDP:
+		status = enable_link_edp(state, pipe_ctx);
+		break;
 	case SIGNAL_TYPE_DISPLAY_PORT_MST:
 		status = enable_link_dp_mst(state, pipe_ctx);
 		msleep(200);
@@ -2282,6 +2302,9 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx, int option)
 	if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
 		deallocate_mst_payload(pipe_ctx);
 
+	if (pipe_ctx->stream->signal == SIGNAL_TYPE_EDP)
+		core_dc->hwss.edp_backlight_control(pipe_ctx->stream->sink->link, false);
+
 	core_dc->hwss.disable_stream(pipe_ctx, option);
 
 	disable_link(pipe_ctx->stream->sink->link, pipe_ctx->stream->signal);
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +1 -10
index f2902569be2e..2096f2a179f2 100644
@@ -88,15 +88,7 @@ void dp_enable_link_phy(
 	}
 
 	if (dc_is_dp_sst_signal(signal)) {
-		if (signal == SIGNAL_TYPE_EDP) {
-			link->dc->hwss.edp_power_control(link, true);
-			link_enc->funcs->enable_dp_output(
-						link_enc,
-						link_settings,
-						clock_source);
-			link->dc->hwss.edp_backlight_control(link, true);
-		} else
-			link_enc->funcs->enable_dp_output(
+		link_enc->funcs->enable_dp_output(
 						link_enc,
 						link_settings,
 						clock_source);
@@ -138,7 +130,6 @@ void dp_disable_link_phy(struct dc_link *link, enum signal_type signal)
 		dp_receiver_power_ctrl(link, false);
 
 	if (signal == SIGNAL_TYPE_EDP) {
-		link->dc->hwss.edp_backlight_control(link, false);
 		edp_receiver_ready_T9(link);
 		link->link_enc->funcs->disable_output(link->link_enc, signal);
 		link->dc->hwss.edp_power_control(link, false);
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +0 -15
index bad70c6b3aad..a266e3f5e75f 100644
@@ -1072,21 +1072,6 @@ void dce110_link_encoder_disable_output(
 	/* disable encoder */
 	if (dc_is_dp_signal(signal))
 		link_encoder_disable(enc110);
-
-	/*
-	 * TODO: Power control cause regression, we should implement
-	 * it properly, for now just comment it.
-	 */
-//	if (enc110->base.connector.id == CONNECTOR_ID_EDP) {
-//		/* power down eDP panel */
-//		link_encoder_edp_wait_for_hpd_ready(
-//				enc,
-//				enc->connector,
-//				false);
-//
-//		link_encoder_edp_power_control(
-//				enc, false);
-//	}
 }
 
 void dce110_link_encoder_dp_set_lane_settings(
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +4 -12
index 21fc27aab909..dd8386778361 100644
@@ -870,8 +870,6 @@ void hwss_edp_power_control(
 				"%s: Skipping Panel Power action: %s\n",
 				__func__, (power_up ? "On":"Off"));
 	}
-
-	hwss_edp_wait_for_hpd_ready(link, true);
 }
 
 /*todo: cloned in stream enc, fix*/
@@ -972,11 +970,9 @@ void dce110_disable_stream(struct pipe_ctx *pipe_ctx, int option)
 	}
 
 	/* blank at encoder level */
-	if (dc_is_dp_signal(pipe_ctx->stream->signal)) {
-		if (pipe_ctx->stream->sink->link->connector_signal == SIGNAL_TYPE_EDP)
-			hwss_edp_backlight_control(link, false);
+	if (dc_is_dp_signal(pipe_ctx->stream->signal))
 		pipe_ctx->stream_res.stream_enc->funcs->dp_blank(pipe_ctx->stream_res.stream_enc);
-	}
+
 	link->link_enc->funcs->connect_dig_be_to_fe(
 			link->link_enc,
 			pipe_ctx->stream_res.stream_enc->id,
@@ -988,15 +984,12 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
 		struct dc_link_settings *link_settings)
 {
 	struct encoder_unblank_param params = { { 0 } };
-	struct dc_link *link = pipe_ctx->stream->sink->link;
 
 	/* only 3 items below are used by unblank */
 	params.pixel_clk_khz =
 		pipe_ctx->stream->timing.pix_clk_khz;
 	params.link_settings.link_rate = link_settings->link_rate;
 	pipe_ctx->stream_res.stream_enc->funcs->dp_unblank(pipe_ctx->stream_res.stream_enc, &params);
-	if (link->connector_signal == SIGNAL_TYPE_EDP)
-		hwss_edp_backlight_control(link, true);
 }
 
 
@@ -1342,10 +1335,8 @@ static void power_down_encoders(struct dc *dc)
 
 			if (!dc->links[i]->wa_flags.dp_keep_receiver_powered)
 				dp_receiver_power_ctrl(dc->links[i], false);
-			if (connector_id == CONNECTOR_ID_EDP) {
+			if (connector_id == CONNECTOR_ID_EDP)
 				signal = SIGNAL_TYPE_EDP;
-				hwss_edp_backlight_control(dc->links[i], false);
-			}
 		}
 
 		dc->links[i]->link_enc->funcs->disable_output(
@@ -2976,6 +2967,7 @@ static const struct hw_sequencer_funcs dce110_funcs = {
 	.pplib_apply_display_requirements = pplib_apply_display_requirements,
 	.edp_backlight_control = hwss_edp_backlight_control,
 	.edp_power_control = hwss_edp_power_control,
+	.edp_wait_for_hpd_ready = hwss_edp_wait_for_hpd_ready,
 };
 
 void dce110_hw_sequencer_construct(struct dc *dc)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +4 -0
index 2dd6ac637572..fc637647f643 100644
@@ -77,5 +77,9 @@ void hwss_edp_backlight_control(
 	struct dc_link *link,
 	bool enable);
 
+void hwss_edp_wait_for_hpd_ready(
+		struct dc_link *link,
+		bool power_up);
+
 #endif /* __DC_HWSS_DCE110_H__ */
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -1
index f0be2b872668..31fd6ae8f61f 100644
@@ -2368,7 +2368,8 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
 	.pplib_apply_display_requirements =
 			dcn10_pplib_apply_display_requirements,
 	.edp_backlight_control = hwss_edp_backlight_control,
-	.edp_power_control = hwss_edp_power_control
+	.edp_power_control = hwss_edp_power_control,
+	.edp_wait_for_hpd_ready = hwss_edp_wait_for_hpd_ready,
 };
 
 
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +1 -0
index 03431134c088..b6215ba514d8 100644
@@ -199,6 +199,7 @@ struct hw_sequencer_funcs {
 	void (*edp_backlight_control)(
 			struct dc_link *link,
 			bool enable);
+	void (*edp_wait_for_hpd_ready)(struct dc_link *link, bool power_up);
 
 };
 
Signature · 6 lines
2.14.1

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

PATCH 15/20 drm/amd/display: remove format_control from set_cursor_attributes

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +0 -7
index 6db1839d7155..f2a08b156cf0 100644
@@ -400,13 +400,6 @@ void dpp1_set_cursor_attributes(
 		REG_UPDATE(CURSOR0_COLOR1,
 				CUR0_COLOR1, 0xFFFFFFFF);
 	}
-
-	/* TODO: Fixed vs float */
-
-	REG_UPDATE_3(FORMAT_CONTROL,
-				CNVC_BYPASS, 0,
-				FORMAT_CONTROL__ALPHA_EN, 1,
-				FORMAT_EXPANSION_MODE, 0);
 }
 
 
Signature · 6 lines
2.14.1

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

PATCH 16/20 drm/amd/display: use clamping rather than truncation for CM fp conversions

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c | 24 ++++++++++++++++++----
 .../gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c | 14 ++++++-------
 drivers/gpu/drm/amd/display/include/fixed31_32.h   |  4 ++--
 3 files changed, 29 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/basics/fixpt31_32.c +20 -4
index 13f8b8c02212..011a97f82fb6 100644
@@ -554,6 +554,22 @@ static inline uint32_t ux_dy(
 	return result | fractional_part;
 }
 
+static inline uint32_t clamp_ux_dy(
+	int64_t value,
+	uint32_t integer_bits,
+	uint32_t fractional_bits,
+	uint32_t min_clamp)
+{
+	uint32_t truncated_val = ux_dy(value, integer_bits, fractional_bits);
+
+	if (value >= (1LL << (integer_bits + FIXED31_32_BITS_PER_FRACTIONAL_PART)))
+		return (1 << (integer_bits + fractional_bits)) - 1;
+	else if (truncated_val > min_clamp)
+		return truncated_val;
+	else
+		return min_clamp;
+}
+
 uint32_t dal_fixed31_32_u2d19(
 	struct fixed31_32 arg)
 {
@@ -566,14 +582,14 @@ uint32_t dal_fixed31_32_u0d19(
 	return ux_dy(arg.value, 0, 19);
 }
 
-uint32_t dal_fixed31_32_u0d14(
+uint32_t dal_fixed31_32_clamp_u0d14(
 	struct fixed31_32 arg)
 {
-	return ux_dy(arg.value, 1, 14);
+	return clamp_ux_dy(arg.value, 0, 14, 1);
 }
 
-uint32_t dal_fixed31_32_u0d10(
+uint32_t dal_fixed31_32_clamp_u0d10(
 	struct fixed31_32 arg)
 {
-	return ux_dy(arg.value, 1, 10);
+	return clamp_ux_dy(arg.value, 0, 10, 1);
 }
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_cm_common.c +7 -7
index 352ae7bf9a3f..53ba3600ee6a 100644
@@ -169,7 +169,7 @@ bool cm_helper_convert_to_custom_float(
 	}
 
 	if (fixpoint == true)
-		arr_points[1].custom_float_y = dal_fixed31_32_u0d14(arr_points[1].y);
+		arr_points[1].custom_float_y = dal_fixed31_32_clamp_u0d14(arr_points[1].y);
 	else if (!convert_to_custom_float_format(arr_points[1].y, &fmt,
 		&arr_points[1].custom_float_y)) {
 		BREAK_TO_DEBUGGER();
@@ -395,12 +395,12 @@ bool cm_helper_translate_curve_to_hw_format(
 		rgb->delta_blue  = dal_fixed31_32_sub(rgb_plus_1->blue,  rgb->blue);
 
 		if (fixpoint == true) {
-			rgb->delta_red_reg   = dal_fixed31_32_u0d10(rgb->delta_red);
-			rgb->delta_green_reg = dal_fixed31_32_u0d10(rgb->delta_green);
-			rgb->delta_blue_reg  = dal_fixed31_32_u0d10(rgb->delta_blue);
-			rgb->red_reg         = dal_fixed31_32_u0d14(rgb->red);
-			rgb->green_reg       = dal_fixed31_32_u0d14(rgb->green);
-			rgb->blue_reg        = dal_fixed31_32_u0d14(rgb->blue);
+			rgb->delta_red_reg   = dal_fixed31_32_clamp_u0d10(rgb->delta_red);
+			rgb->delta_green_reg = dal_fixed31_32_clamp_u0d10(rgb->delta_green);
+			rgb->delta_blue_reg  = dal_fixed31_32_clamp_u0d10(rgb->delta_blue);
+			rgb->red_reg         = dal_fixed31_32_clamp_u0d14(rgb->red);
+			rgb->green_reg       = dal_fixed31_32_clamp_u0d14(rgb->green);
+			rgb->blue_reg        = dal_fixed31_32_clamp_u0d14(rgb->blue);
 		}
 
 		++rgb_plus_1;
drivers/gpu/drm/amd/display/include/fixed31_32.h +2 -2
index c4848fadc70e..4badaedbaadd 100644
@@ -464,10 +464,10 @@ uint32_t dal_fixed31_32_u0d19(
 	struct fixed31_32 arg);
 
 
-uint32_t dal_fixed31_32_u0d14(
+uint32_t dal_fixed31_32_clamp_u0d14(
 	struct fixed31_32 arg);
 
-uint32_t dal_fixed31_32_u0d10(
+uint32_t dal_fixed31_32_clamp_u0d10(
 	struct fixed31_32 arg);
 
 #endif
Signature · 6 lines
2.14.1

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

PATCH 17/20 drm/amd/display: Remove redundant NULL check in DCE11 HWSS

In reply to a message not in the archive

We already check this a couple lines earlier.

---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +1 -2
index dd8386778361..80d36610c302 100644
@@ -2017,8 +2017,7 @@ enum dc_status dce110_apply_ctx_to_hw(
 		if (pipe_ctx->stream == pipe_ctx_old->stream)
 			continue;
 
-		if (pipe_ctx->stream && pipe_ctx_old->stream
-				&& !pipe_need_reprogram(pipe_ctx_old, pipe_ctx))
+		if (pipe_ctx_old->stream && !pipe_need_reprogram(pipe_ctx_old, pipe_ctx))
 			continue;
 
 		if (pipe_ctx->top_pipe)
Signature · 6 lines
2.14.1

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

PATCH 18/20 drm/amd/display: Remove grph_object_id.c and move function to bios_parser

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/display/dc/basics/Makefile     |  2 +-
 .../gpu/drm/amd/display/dc/basics/grph_object_id.c | 75 ----------------------
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  | 46 +++++++++++++
 .../gpu/drm/amd/display/include/grph_object_id.h   |  4 --
 4 files changed, 47 insertions(+), 80 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c
drivers/gpu/drm/amd/display/dc/basics/Makefile +1 -1
index 43c5ccdeeb72..ddc7fabedd94 100644
@@ -3,7 +3,7 @@
 # It provides the general basic services required by other DAL
 # subcomponents.
 
-BASICS = conversion.o fixpt31_32.o fixpt32_32.o grph_object_id.o \
+BASICS = conversion.o fixpt31_32.o fixpt32_32.o \
 	logger.o log_helpers.o vector.o
 
 AMD_DAL_BASICS = $(addprefix $(AMDDALPATH)/dc/basics/,$(BASICS))
drivers/gpu/drm/amd/display/dc/basics/grph_object_id.c deleted +0 -75

75 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c +46 -0

52 lines not on this page · raw message

drivers/gpu/drm/amd/display/include/grph_object_id.h +0 -4
index 03a7a9ca95ea..c4197432eb7c 100644
@@ -233,10 +233,6 @@ static inline struct graphics_object_id dal_graphics_object_id_init(
 	return result;
 }
 
-bool dal_graphics_object_id_is_equal(
-	struct graphics_object_id id1,
-	struct graphics_object_id id2);
-
 /* Based on internal data members memory layout */
 static inline uint32_t dal_graphics_object_id_to_uint(
 	struct graphics_object_id id)
Signature · 6 lines
2.14.1

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

PATCH 19/20 drm/amd/display: Add TODO item to remove vector.c

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/display/TODO | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/TODO +3 -0
index 46464678f2b3..357d59648401 100644
@@ -105,3 +105,6 @@ useless with filtering output. dynamic debug printing might be an option.
 20. Use kernel i2c device to program HDMI retimer. Some boards have an HDMI
 retimer that we need to program to pass PHY compliance. Currently that's
 bypassing the i2c device and goes directly to HW. This should be changed.
+
+21. Remove vector.c from dc/basics. It's used in DDC code which can probably
+be simplified enough to no longer need a vector implementation.
Signature · 6 lines
2.14.1

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

PATCH 20/20 drm/amd/display: dal 3.1.25

In reply to a message not in the archive

From: Tony Cheng <[email protected]>

---
 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 939fa6f85826..3b49ca3027b6 100644
@@ -38,7 +38,7 @@
 #include "inc/compressor.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.1.24"
+#define DC_VER "3.1.25"
 
 #define MAX_SURFACES 3
 #define MAX_STREAMS 6
Signature · 6 lines
2.14.1

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