Skip to contentSkip to conversation

DC Linux Patches Sep 11, 2017

PATCH In review Harry Wentland 2 participants 21 messages Sep 11, 2017 2 messages not in the archive

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

cover DC Linux Patches Sep 11, 2017

* Bunch of Raven fixes and other work
* Stop powering down clock sources in atomic check
* Stop using amdgpu_connector and use our own
* Fix display unplug during S3 or fbcon

Andrew Jiang (1):
drm/amd/display: Fix context alloc failed logging

Charlene Liu (1):
drm/amd/display: fix crc_source_select use hardcoded color depth

Eric Bernstein (1):
drm/amd/display: remove output_format from ipp_setup

Harry Wentland (10):
drm/amd/display: Enable dcn10_power_on_fe log by default drm/amd/display: Don't reset clock source at unref drm/amd/display: Power down clock source at commit drm/amd/display: Remove switching of clk sources at end of commit drm/amd/display: No need to keep track of unreffed clk sources drm/amd/display: Break out amdgpu_dm_connector drm/amd/display: Create fake sink if needed when commit stream drm/amd/display: Format changes to bring in line with internal tree drm/amd/display: Change comments to bring in line with internal tree drm/amd/display: Update include to bring in line with internal tree

Hersen Wu (2):
drm/amd/display: Request to have DCN RV pipe Harvesting drm/amd/display: USB-C to HDMI dongle not light

Logatharshan Thothiralingam (1):
drm/amd/display: Get OTG info if OTG master enabled

Martin Tsai (1):
drm/amd/display: To prevent detecting new sink from spurious HPD

Roman Li (1):
drm/amd/display: Disable FBC for linear tiling

Shirish S (1):
drm/amd/display: dce110: fix plane validation

Tony Cheng (1):
drm/amd/display: fix default dithering

Vitaly Prosyak (1):
drm/amd/display: Update DPP registers

Wenjing Liu (2):
drm/amd/display: Use TPS4 instead of CP2520_3 for phy pattern 7 drm/amd/display: set CP2520 Test pattern to use
DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE

Yongqiang Sun (2):
drm/amd/display: Added negative check for vertical line start. drm/amd/display: Remove sanity check.

Yue Hin Lau (2):
drm/amd/display: seperate dpp_cm_helper functions into new file drm/amd/display: move dwb registers to header file

pana (1):
drm/amd/display: Add 2X Cursor Magnification Code

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 184 +++++++------
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h  |  55 +++-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  |  20 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c  |  16 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  34 +--
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.h    |   4 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c           |  29 +--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |  80 ++++--
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c   |   4 +-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  38 ++-
 drivers/gpu/drm/amd/display/dc/dc.h                |   8 +-
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    |  87 +++----
 .../drm/amd/display/dc/dce110/dce110_resource.c    |  19 +-
 drivers/gpu/drm/amd/display/dc/dcn10/Makefile      |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c   |   3 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h   |  23 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c    | 263 ++++++++-----------
 .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c | 123 +++++++++
 .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h |  99 +++++++
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c   | 288 +--------------------
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h   | 247 +++++++++++++++++-
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |  34 +--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c   |   2 -
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h   |  11 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |  97 ++++++-
 .../amd/display/dc/dcn10/dcn10_timing_generator.c  |  13 +-
 .../amd/display/dc/dcn10/dcn10_timing_generator.h  |   1 +
 drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c   |   1 -
 .../display/dc/i2caux/dce110/aux_engine_dce110.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h        |   3 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/transform.h  |   3 +-
 drivers/gpu/drm/amd/display/dc/inc/resource.h      |   2 +-
 drivers/gpu/drm/amd/display/include/dal_asic_id.h  |   1 +
 33 files changed, 1048 insertions(+), 748 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h
Signature · 6 lines
2.11.0

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

#2 lore raw

PATCH 1/28 drm/amd/display: Get OTG info if OTG master enabled

From: Logatharshan Thothiralingam <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c     | 6 +++++-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 3 +++
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +5 -1
index 7ea274475598..4fa856e9a872 100644
@@ -203,10 +203,14 @@ static void dcn10_log_hw_state(struct dc *dc)
 
 	for (i = 0; i < pool->pipe_count; i++) {
 		struct timing_generator *tg = pool->timing_generators[i];
-		struct dcn_otg_state s;
+		struct dcn_otg_state s = {0};
 
 		tgn10_read_otg_state(DCN10TG_FROM_TG(tg), &s);
 
+		//only print if OTG master is enabled
+		if ((s.otg_enabled & 1) == 0)
+			continue;
+
 		DTN_INFO("[%d]:\t %d \t %d \t %d \t %d \t "
 				"%d \t %d \t %d \t %d \t %d \t %d \t "
 				"%d \t %d \t %d \t %d \t %d \t ",
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +3 -0
index 15f1f44e102a..405f595f219a 100644
@@ -1100,6 +1100,9 @@ static bool tgn10_is_stereo_left_eye(struct timing_generator *tg)
 void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10,
 		struct dcn_otg_state *s)
 {
+	REG_GET(OTG_CONTROL,
+			OTG_MASTER_EN, &s->otg_enabled);
+
 	REG_GET_2(OTG_V_BLANK_START_END,
 			OTG_V_BLANK_START, &s->v_blank_start,
 			OTG_V_BLANK_END, &s->v_blank_end);
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h +1 -0
index 38d3dcf89d60..69da293e9b4a 100644
@@ -370,6 +370,7 @@ struct dcn_otg_state {
 	uint32_t h_sync_a_pol;
 	uint32_t h_total;
 	uint32_t underflow_occurred_status;
+	uint32_t otg_enabled;
 };
 
 void tgn10_read_otg_state(struct dcn10_timing_generator *tgn10,
Signature · 6 lines
2.11.0

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

PATCH 2/28 drm/amd/display: Added negative check for vertical line start.

In reply to a message not in the archive

From: Yongqiang Sun <[email protected]>

In case of vstartup happens before vsync, set vertical line start to 0.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c +7 -3
index 405f595f219a..2d3dd9a3a196 100644
@@ -118,7 +118,7 @@ static void tgn10_program_timing(
 	uint32_t start_point = 0;
 	uint32_t field_num = 0;
 	uint32_t h_div_2;
-	uint32_t vertial_line_start;
+	int32_t vertical_line_start;
 
 	struct dcn10_timing_generator *tgn10 = DCN10TG_FROM_TG(tg);
 
@@ -216,9 +216,13 @@ static void tgn10_program_timing(
 	/* Use OTG_VERTICAL_INTERRUPT2 replace VUPDATE interrupt,
 	 * program the reg for interrupt postition.
 	 */
-	vertial_line_start = asic_blank_end - tg->dlg_otg_param.vstartup_start + 1;
+	vertical_line_start = asic_blank_end - tg->dlg_otg_param.vstartup_start + 1;
+	if (vertical_line_start < 0) {
+		ASSERT(0);
+		vertical_line_start = 0;
+	}
 	REG_SET(OTG_VERTICAL_INTERRUPT2_POSITION, 0,
-			OTG_VERTICAL_INTERRUPT2_LINE_START, vertial_line_start);
+			OTG_VERTICAL_INTERRUPT2_LINE_START, vertical_line_start);
 
 	/* v_sync polarity */
 	v_sync_polarity = patched_crtc_timing.flags.VSYNC_POSITIVE_POLARITY ?
Signature · 6 lines
2.11.0

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

PATCH 3/28 drm/amd/display: Remove sanity check.

In reply to a message not in the archive

From: Yongqiang Sun <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +0 -6
index 4fa856e9a872..a6015c2c20c6 100644
@@ -2828,12 +2828,6 @@ void dcn10_update_pending_status(struct pipe_ctx *pipe_ctx)
 	struct dc_plane_state *plane_state = pipe_ctx->plane_state;
 	struct timing_generator *tg = pipe_ctx->stream_res.tg;
 
-	if (plane_state->ctx->dc->debug.sanity_checks) {
-		struct dc *dc = plane_state->ctx->dc;
-
-		verify_allow_pstate_change_high(dc->hwseq);
-	}
-
 	if (plane_state == NULL)
 		return;
 
Signature · 6 lines
2.11.0

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

PATCH 4/28 drm/amd/display: Use TPS4 instead of CP2520_3 for phy pattern 7

In reply to a message not in the archive

From: Wenjing Liu <[email protected]>

[Description]
We originally use TPS4 phy test pattern for test pattern 7. On RV we switched to a new method to use CP2520. CP2520 should produce the same result.
However in reality, it fails DP PHY automation test. We use the original method instead.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
index 527cc0400fd3..1aec586b0367 100644
@@ -1756,7 +1756,7 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link)
 		test_pattern = DP_TEST_PATTERN_CP2520_2;
 		break;
 	case PHY_TEST_PATTERN_CP2520_3:
-		test_pattern = DP_TEST_PATTERN_CP2520_3;
+		test_pattern = DP_TEST_PATTERN_TRAINING_PATTERN4;
 		break;
 	default:
 		test_pattern = DP_TEST_PATTERN_VIDEO_MODE;
Signature · 6 lines
2.11.0

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

PATCH 5/28 drm/amd/display: Request to have DCN RV pipe Harvesting

In reply to a message not in the archive

From: Hersen Wu <[email protected]>

TODO: Current change only work for sucessive last fused pipe, like p3, or p3,p2. It does not work for fused p1,p2.

---
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  | 55 +++++++++++++++++-----
 1 file changed, 43 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +43 -12
index fff86ad0c411..ac6d01ec0505 100644
@@ -1207,13 +1207,23 @@ static struct resource_funcs dcn10_res_pool_funcs = {
 	.add_stream_to_ctx = dcn10_add_stream_to_ctx
 };
 
+static uint32_t read_pipe_fuses(struct dc_context *ctx)
+{
+	uint32_t value = dm_read_reg_soc15(ctx, mmCC_DC_PIPE_DIS, 0);
+	/* RV1 support max 4 pipes */
+	value = value & 0xf;
+	return value;
+}
+
 static bool construct(
 	uint8_t num_virtual_links,
 	struct dc *dc,
 	struct dcn10_resource_pool *pool)
 {
 	int i;
+	int j;
 	struct dc_context *ctx = dc->ctx;
+	uint32_t pipe_fuses = read_pipe_fuses(ctx);
 
 	ctx->dc_bios->regs = &bios_regs;
 
@@ -1230,8 +1240,9 @@ static bool construct(
 	 *************************************************/
 	pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
 
-	/* TODO: Hardcode to correct number of functional controllers */
-	pool->base.pipe_count = 4;
+	/* max pipe num for ASIC before check pipe fuses */
+	pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
+
 	dc->caps.max_downscale_ratio = 200;
 	dc->caps.i2c_speed_in_khz = 100;
 	dc->caps.max_cursor_size = 256;
@@ -1355,48 +1366,68 @@ static bool construct(
 	#endif
 	}
 
+	/* index to valid pipe resource  */
+	j = 0;
 	/* mem input -> ipp -> dpp -> opp -> TG */
 	for (i = 0; i < pool->base.pipe_count; i++) {
-		pool->base.mis[i] = dcn10_mem_input_create(ctx, i);
-		if (pool->base.mis[i] == NULL) {
+		/* if pipe is disabled, skip instance of HW pipe,
+		 * i.e, skip ASIC register instance
+		 */
+		if ((pipe_fuses & (1 << i)) != 0)
+			continue;
+
+		pool->base.mis[j] = dcn10_mem_input_create(ctx, i);
+		if (pool->base.mis[j] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error(
 				"DC: failed to create memory input!\n");
 			goto mi_create_fail;
 		}
 
-		pool->base.ipps[i] = dcn10_ipp_create(ctx, i);
-		if (pool->base.ipps[i] == NULL) {
+		pool->base.ipps[j] = dcn10_ipp_create(ctx, i);
+		if (pool->base.ipps[j] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error(
 				"DC: failed to create input pixel processor!\n");
 			goto ipp_create_fail;
 		}
 
-		pool->base.transforms[i] = dcn10_dpp_create(ctx, i);
-		if (pool->base.transforms[i] == NULL) {
+		pool->base.transforms[j] = dcn10_dpp_create(ctx, i);
+		if (pool->base.transforms[j] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error(
 				"DC: failed to create dpp!\n");
 			goto dpp_create_fail;
 		}
 
-		pool->base.opps[i] = dcn10_opp_create(ctx, i);
-		if (pool->base.opps[i] == NULL) {
+		pool->base.opps[j] = dcn10_opp_create(ctx, i);
+		if (pool->base.opps[j] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error(
 				"DC: failed to create output pixel processor!\n");
 			goto opp_create_fail;
 		}
 
-		pool->base.timing_generators[i] = dcn10_timing_generator_create(
+		pool->base.timing_generators[j] = dcn10_timing_generator_create(
 				ctx, i);
-		if (pool->base.timing_generators[i] == NULL) {
+		if (pool->base.timing_generators[j] == NULL) {
 			BREAK_TO_DEBUGGER();
 			dm_error("DC: failed to create tg!\n");
 			goto otg_create_fail;
 		}
+		/* check next valid pipe */
+		j++;
 	}
+
+	/* valid pipe num */
+	pool->base.pipe_count = j;
+
+	/* within dml lib, it is hard code to 4. If ASIC pipe is fused,
+	 * the value may be changed
+	 */
+	dc->dml.ip.max_num_dpp = pool->base.pipe_count;
+	dc->dcn_ip->max_num_dpp = pool->base.pipe_count;
+
 	pool->base.mpc = dcn10_mpc_create(ctx);
 	if (pool->base.mpc == NULL) {
 		BREAK_TO_DEBUGGER();
Signature · 6 lines
2.11.0

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

PATCH 6/28 drm/amd/display: dce110: fix plane validation

In reply to a message not in the archive

From: Shirish S <[email protected]>

For MPO to work with per surface rendering and flipping, the previous logic of restricting plane[1] only as underlay needs to be removed.
validate_surface_sets() now checks only the width and height bounds in case of underlay rather than checking format.

Without this patch one cannot set underlay only.

---
 .../gpu/drm/amd/display/dc/dce110/dce110_resource.c   | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +6 -13
index 41bfddf9574e..25eda52c32ef 100644
@@ -891,21 +891,14 @@ static bool dce110_validate_surface_sets(
 		if (context->stream_status[i].plane_count > 2)
 			return false;
 
-		if (context->stream_status[i].plane_states[0]->format
-				>= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
+		if ((context->stream_status[i].plane_states[i]->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN) &&
+		    (context->stream_status[i].plane_states[i]->src_rect.width > 1920 ||
+		     context->stream_status[i].plane_states[i]->src_rect.height > 1080))
 			return false;
 
-		if (context->stream_status[i].plane_count == 2) {
-			if (context->stream_status[i].plane_states[1]->format
-					< SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
-				return false;
-			if (context->stream_status[i].plane_states[1]->src_rect.width > 1920
-					|| context->stream_status[i].plane_states[1]->src_rect.height > 1080)
-				return false;
-
-			if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB)
-				return false;
-		}
+		/* irrespective of plane format, stream should be RGB encoded */
+		if (context->streams[i]->timing.pixel_encoding != PIXEL_ENCODING_RGB)
+			return false;
 	}
 
 	return true;
Signature · 6 lines
2.11.0

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

PATCH 7/28 drm/amd/display: USB-C to HDMI dongle not light

In reply to a message not in the archive

From: Hersen Wu <[email protected]>

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  9 ++++---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c     | 32 +++++++++++++++--------
 drivers/gpu/drm/amd/display/dc/dc.h               |  8 +++++-
 3 files changed, 33 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -4
index 7a408d753be8..9b5158cceece 100644
@@ -639,7 +639,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev )
 			continue;
 
 		mutex_lock(&aconnector->hpd_lock);
-		dc_link_detect(aconnector->dc_link, false);
+		dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
 		aconnector->dc_sink = NULL;
 		amdgpu_dm_update_connector_after_detect(aconnector);
 		mutex_unlock(&aconnector->hpd_lock);
@@ -870,7 +870,7 @@ static void handle_hpd_irq(void *param)
 	 * since (for MST case) MST does this in it's own context.
 	 */
 	mutex_lock(&aconnector->hpd_lock);
-	if (dc_link_detect(aconnector->dc_link, false)) {
+	if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
 		amdgpu_dm_update_connector_after_detect(aconnector);
 
 
@@ -980,7 +980,7 @@ static void handle_hpd_rx_irq(void *param)
 	if (dc_link_handle_hpd_rx_irq(aconnector->dc_link, NULL) &&
 			!is_mst_root_connector) {
 		/* Downstream Port status changed. */
-		if (dc_link_detect(aconnector->dc_link, false)) {
+		if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPDRX)) {
 			amdgpu_dm_update_connector_after_detect(aconnector);
 
 
@@ -1368,7 +1368,8 @@ int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 			goto fail_free_encoder;
 		}
 
-		if (dc_link_detect(dc_get_link_at_index(dm->dc, i), true))
+		if (dc_link_detect(dc_get_link_at_index(dm->dc, i),
+				DETECT_REASON_BOOT))
 			amdgpu_dm_update_connector_after_detect(aconnector);
 	}
 
drivers/gpu/drm/amd/display/dc/core/dc_link.c +21 -11
index cea8dafd2edc..845ec421d861 100644
@@ -355,7 +355,9 @@ static bool is_dp_sink_present(struct dc_link *link)
  * @brief
  * Detect output sink type
  */
-static enum signal_type link_detect_sink(struct dc_link *link)
+static enum signal_type link_detect_sink(
+	struct dc_link *link,
+	enum dc_detect_reason reason)
 {
 	enum signal_type result = get_basic_signal_type(
 		link->link_enc->id, link->link_id);
@@ -388,12 +390,17 @@ static enum signal_type link_detect_sink(struct dc_link *link)
 	}
 	break;
 	case CONNECTOR_ID_DISPLAY_PORT: {
-
-		/* Check whether DP signal detected: if not -
-		 * we assume signal is DVI; it could be corrected
-		 * to HDMI after dongle detection */
-		if (!is_dp_sink_present(link))
-			result = SIGNAL_TYPE_DVI_SINGLE_LINK;
+		/* DP HPD short pulse. Passive DP dongle will not
+		 * have short pulse
+		 */
+		if (reason != DETECT_REASON_HPDRX) {
+			/* Check whether DP signal detected: if not -
+			 * we assume signal is DVI; it could be corrected
+			 * to HDMI after dongle detection
+			 */
+			if (!is_dp_sink_present(link))
+				result = SIGNAL_TYPE_DVI_SINGLE_LINK;
+		}
 	}
 	break;
 	default:
@@ -460,9 +467,10 @@ static void detect_dp(
 	struct display_sink_capability *sink_caps,
 	bool *converter_disable_audio,
 	struct audio_support *audio_support,
-	bool boot)
+	enum dc_detect_reason reason)
 {
-	sink_caps->signal = link_detect_sink(link);
+	bool boot = false;
+	sink_caps->signal = link_detect_sink(link, reason);
 	sink_caps->transaction_type =
 		get_ddc_transaction_type(sink_caps->signal);
 
@@ -513,6 +521,8 @@ static void detect_dp(
 			 * Need check ->sink usages in case ->sink = NULL
 			 * TODO: s3 resume check
 			 */
+			if (reason == DETECT_REASON_BOOT)
+				boot = true;
 
 			if (dm_helpers_dp_mst_start_top_mgr(
 				link->ctx,
@@ -531,7 +541,7 @@ static void detect_dp(
 	}
 }
 
-bool dc_link_detect(struct dc_link *link, bool boot)
+bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
 {
 	struct dc_sink_init_data sink_init_data = { 0 };
 	struct display_sink_capability sink_caps = { 0 };
@@ -596,7 +606,7 @@ bool dc_link_detect(struct dc_link *link, bool boot)
 				link,
 				&sink_caps,
 				&converter_disable_audio,
-				aud_support, boot);
+				aud_support, reason);
 
 			/* Active dongle downstream unplug */
 			if (link->type == dc_connection_active_dongle
drivers/gpu/drm/amd/display/dc/dc.h +7 -1
index f005add1aba3..bf2d42561362 100644
@@ -884,7 +884,13 @@ bool dc_link_setup_psr(struct dc_link *dc_link,
  * true otherwise. True meaning further action is required (status update
  * and OS notification).
  */
-bool dc_link_detect(struct dc_link *dc_link, bool boot);
+enum dc_detect_reason {
+	DETECT_REASON_BOOT,
+	DETECT_REASON_HPD,
+	DETECT_REASON_HPDRX,
+};
+
+bool dc_link_detect(struct dc_link *dc_link, enum dc_detect_reason reason);
 
 /* Notify DC about DP RX Interrupt (aka Short Pulse Interrupt).
  * Return:
Signature · 6 lines
2.11.0

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

#10 lore raw

Re: [PATCH 07/28] drm/amd/display: USB-C to HDMI dongle not light

This seems to lack a commit msg

Dave.

Quoted 164 lines · Harry Wentland

From: Hersen Wu <[email protected]>

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  9 ++++---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c     | 32
+++++++++++++++--------
 drivers/gpu/drm/amd/display/dc/dc.h               |  8 +++++-
 3 files changed, 33 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 7a408d753be8..9b5158cceece 100644
@@ -639,7 +639,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device
 *adev )
                        continue;
 
                mutex_lock(&aconnector->hpd_lock);
-               dc_link_detect(aconnector->dc_link, false);
+               dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
                aconnector->dc_sink = NULL;
                amdgpu_dm_update_connector_after_detect(aconnector);
                mutex_unlock(&aconnector->hpd_lock);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -3
@@ -870,7 +870,7 @@ static void handle_hpd_irq(void *param)
         * since (for MST case) MST does this in it's own context.
         */
        mutex_lock(&aconnector->hpd_lock);
-       if (dc_link_detect(aconnector->dc_link, false)) {
+       if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
                amdgpu_dm_update_connector_after_detect(aconnector);
 
 
@@ -980,7 +980,7 @@ static void handle_hpd_rx_irq(void *param)
        if (dc_link_handle_hpd_rx_irq(aconnector->dc_link, NULL) &&
                        !is_mst_root_connector) {
                /* Downstream Port status changed. */
-               if (dc_link_detect(aconnector->dc_link, false)) {
+               if (dc_link_detect(aconnector->dc_link,
 DETECT_REASON_HPDRX)) {
                        amdgpu_dm_update_connector_
 after_detect(aconnector);
@@ -1368,7 +1368,8 @@ int amdgpu_dm_initialize_drm_device(struct
 amdgpu_device *adev)
                        goto fail_free_encoder;
                }
 
-               if (dc_link_detect(dc_get_link_at_index(dm->dc, i), true))
+               if (dc_link_detect(dc_get_link_at_index(dm->dc, i),
+                               DETECT_REASON_BOOT))
                        amdgpu_dm_update_connector_
 after_detect(aconnector);
        }
drivers/gpu/drm/amd/display/dc/core/dc_link.c +14 -7
index cea8dafd2edc..845ec421d861 100644
@@ -355,7 +355,9 @@ static bool is_dp_sink_present(struct dc_link *link)
  * @brief
  * Detect output sink type
  */
-static enum signal_type link_detect_sink(struct dc_link *link)
+static enum signal_type link_detect_sink(
+       struct dc_link *link,
+       enum dc_detect_reason reason)
 {
        enum signal_type result = get_basic_signal_type(
                link->link_enc->id, link->link_id);
@@ -388,12 +390,17 @@ static enum signal_type link_detect_sink(struct
 dc_link *link)
        }
        break;
        case CONNECTOR_ID_DISPLAY_PORT: {
-
-               /* Check whether DP signal detected: if not -
-                * we assume signal is DVI; it could be corrected
-                * to HDMI after dongle detection */
-               if (!is_dp_sink_present(link))
-                       result = SIGNAL_TYPE_DVI_SINGLE_LINK;
+               /* DP HPD short pulse. Passive DP dongle will not
+                * have short pulse
+                */
+               if (reason != DETECT_REASON_HPDRX) {
+                       /* Check whether DP signal detected: if not -
+                        * we assume signal is DVI; it could be corrected
+                        * to HDMI after dongle detection
+                        */
+                       if (!is_dp_sink_present(link))
+                               result = SIGNAL_TYPE_DVI_SINGLE_LINK;
+               }
        }
        break;

default:

drivers/gpu/drm/amd/display/dc/core/dc_link.c +7 -4
@@ -460,9 +467,10 @@ static void detect_dp(
        struct display_sink_capability *sink_caps,
        bool *converter_disable_audio,
        struct audio_support *audio_support,
-       bool boot)
+       enum dc_detect_reason reason)
 {
-       sink_caps->signal = link_detect_sink(link);
+       bool boot = false;
+       sink_caps->signal = link_detect_sink(link, reason);
        sink_caps->transaction_type =
                get_ddc_transaction_type(sink_caps->signal);
 
@@ -513,6 +521,8 @@ static void detect_dp(
                         * Need check ->sink usages in case ->sink = NULL
                         * TODO: s3 resume check
                         */
+                       if (reason == DETECT_REASON_BOOT)
+                               boot = true;
 
                        if (dm_helpers_dp_mst_start_top_mgr(
                                link->ctx,
@@ -531,7 +541,7 @@ static void detect_dp(
        }
 }
 
-bool dc_link_detect(struct dc_link *link, bool boot)
+bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
 {
        struct dc_sink_init_data sink_init_data = { 0 };
        struct display_sink_capability sink_caps = { 0 };
@@ -596,7 +606,7 @@ bool dc_link_detect(struct dc_link *link, bool boot)
                                link,
                                &sink_caps,
                                &converter_disable_audio,
-                               aud_support, boot);
+                               aud_support, reason);
 
                        /* Active dongle downstream unplug */
                        if (link->type == dc_connection_active_dongle
drivers/gpu/drm/amd/display/dc/dc.h +7 -1
index f005add1aba3..bf2d42561362 100644
@@ -884,7 +884,13 @@ bool dc_link_setup_psr(struct dc_link *dc_link,
  * true otherwise. True meaning further action is required (status update
  * and OS notification).
  */
-bool dc_link_detect(struct dc_link *dc_link, bool boot);
+enum dc_detect_reason {
+       DETECT_REASON_BOOT,
+       DETECT_REASON_HPD,
+       DETECT_REASON_HPDRX,
+};
+
+bool dc_link_detect(struct dc_link *dc_link, enum dc_detect_reason
 reason);
 
 /* Notify DC about DP RX Interrupt (aka Short Pulse Interrupt).

* Return:
--
2.11.0

Quoted 5 lines

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

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

#11 lore raw

PATCH 8/28 drm/amd/display: set CP2520 Test pattern to use DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE

In reply to a message not in the archive

From: Wenjing Liu <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
index 1aec586b0367..38ccc011004d 100644
@@ -1750,7 +1750,7 @@ static void dp_test_send_phy_test_pattern(struct dc_link *link)
 		test_pattern = DP_TEST_PATTERN_80BIT_CUSTOM;
 		break;
 	case PHY_TEST_PATTERN_CP2520_1:
-		test_pattern = DP_TEST_PATTERN_CP2520_1;
+		test_pattern = DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE;
 		break;
 	case PHY_TEST_PATTERN_CP2520_2:
 		test_pattern = DP_TEST_PATTERN_CP2520_2;
Signature · 6 lines
2.11.0

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

PATCH 9/28 drm/amd/display: fix crc_source_select use hardcoded color depth

In reply to a message not in the archive

From: Charlene Liu <[email protected]>

---
 .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c  | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +19 -1
index 9fb0ba7e7b7d..47e8b582445e 100644
@@ -667,7 +667,25 @@ static enum dc_status bios_parser_crtc_source_select(
 	crtc_source_select.signal = pipe_ctx->stream->signal;
 	crtc_source_select.enable_dp_audio = false;
 	crtc_source_select.sink_signal = pipe_ctx->stream->signal;
-	crtc_source_select.display_output_bit_depth = PANEL_8BIT_COLOR;
+
+	switch (pipe_ctx->stream->timing.display_color_depth) {
+	case COLOR_DEPTH_666:
+		crtc_source_select.display_output_bit_depth = PANEL_6BIT_COLOR;
+		break;
+	case COLOR_DEPTH_888:
+		crtc_source_select.display_output_bit_depth = PANEL_8BIT_COLOR;
+		break;
+	case COLOR_DEPTH_101010:
+		crtc_source_select.display_output_bit_depth = PANEL_10BIT_COLOR;
+		break;
+	case COLOR_DEPTH_121212:
+		crtc_source_select.display_output_bit_depth = PANEL_12BIT_COLOR;
+		break;
+	default:
+		BREAK_TO_DEBUGGER();
+		crtc_source_select.display_output_bit_depth = PANEL_8BIT_COLOR;
+		break;
+	}
 
 	dcb = sink->ctx->dc_bios;
 
Signature · 6 lines
2.11.0

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

PATCH 10/28 drm/amd/display: Enable dcn10_power_on_fe log by default

In reply to a message not in the archive

This should only happen on full update. If this ever happens on regular pageflips it needs to be debugged.

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -2
index a6015c2c20c6..6b76fc417456 100644
@@ -1975,7 +1975,7 @@ static void dcn10_power_on_fe(
 	/*TODO: REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DPPCLK_WDIVIDER, 0x1f);*/
 
 	if (plane_state) {
-		dm_logger_write(dc->ctx->logger, LOG_DEBUG,
+		dm_logger_write(dc->ctx->logger, LOG_DC,
 				"Pipe:%d 0x%x: addr hi:0x%x, "
 				"addr low:0x%x, "
 				"src: %d, %d, %d,"
@@ -1993,7 +1993,7 @@ static void dcn10_power_on_fe(
 				plane_state->dst_rect.width,
 				plane_state->dst_rect.height);
 
-		dm_logger_write(dc->ctx->logger, LOG_DEBUG,
+		dm_logger_write(dc->ctx->logger, LOG_DC,
 				"Pipe %d: width, height, x, y\n"
 				"viewport:%d, %d, %d, %d\n"
 				"recout:  %d, %d, %d, %d\n",
Signature · 6 lines
2.11.0

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

PATCH 11/28 drm/amd/display: fix default dithering

In reply to a message not in the archive

From: Tony Cheng <[email protected]>

bug: default is mapped to no dithering.

default to spatial dithering based on color depth

---
 drivers/gpu/drm/amd/display/dc/core/dc.c             | 20 +++-----------------
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c    | 16 ++++++++++++++++
 .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c  | 14 +++++---------
 3 files changed, 24 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -17
index 15ba9c9887fd..0187188dafd6 100644
@@ -341,23 +341,9 @@ void set_dither_option(struct dc_stream_state *stream,
 		return;
 	if (option > DITHER_OPTION_MAX)
 		return;
-	if (option == DITHER_OPTION_DEFAULT) {
-		switch (stream->timing.display_color_depth) {
-		case COLOR_DEPTH_666:
-			stream->dither_option = DITHER_OPTION_SPATIAL6;
-			break;
-		case COLOR_DEPTH_888:
-			stream->dither_option = DITHER_OPTION_SPATIAL8;
-			break;
-		case COLOR_DEPTH_101010:
-			stream->dither_option = DITHER_OPTION_SPATIAL10;
-			break;
-		default:
-			option = DITHER_OPTION_DISABLE;
-		}
-	} else {
-		stream->dither_option = option;
-	}
+
+	stream->dither_option = option;
+
 	resource_build_bit_depth_reduction_params(stream,
 				&params);
 	stream->bit_depth_params = params;
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +16 -0
index 8e60e838b455..3eba2e55639b 100644
@@ -2607,6 +2607,22 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,
 
 	memset(fmt_bit_depth, 0, sizeof(*fmt_bit_depth));
 
+	if (option == DITHER_OPTION_DEFAULT) {
+		switch (stream->timing.display_color_depth) {
+		case COLOR_DEPTH_666:
+			option = DITHER_OPTION_SPATIAL6;
+			break;
+		case COLOR_DEPTH_888:
+			option = DITHER_OPTION_SPATIAL8;
+			break;
+		case COLOR_DEPTH_101010:
+			option = DITHER_OPTION_SPATIAL10;
+			break;
+		default:
+			option = DITHER_OPTION_DISABLE;
+		}
+	}
+
 	if (option == DITHER_OPTION_DISABLE)
 		return;
 
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +5 -9
index 47e8b582445e..b36220bc619d 100644
@@ -1104,15 +1104,11 @@ static enum dc_status apply_single_controller_ctx_to_hw(
 		stream->timing.timing_3d_format != TIMING_3D_FORMAT_NONE);
 
 
-/*vbios crtc_source_selection and encoder_setup will override fmt_C*/
-	if (pipe_ctx->stream->signal != SIGNAL_TYPE_EDP &&
-		pipe_ctx->stream->signal != SIGNAL_TYPE_LVDS) {
-	/*for embedded panel, don't override VBIOS's setting*/
-		pipe_ctx->stream_res.opp->funcs->opp_program_fmt(
-			pipe_ctx->stream_res.opp,
-			&stream->bit_depth_params,
-			&stream->clamping);
-	}
+	pipe_ctx->stream_res.opp->funcs->opp_program_fmt(
+		pipe_ctx->stream_res.opp,
+		&stream->bit_depth_params,
+		&stream->clamping);
+
 	if (dc_is_dp_signal(pipe_ctx->stream->signal))
 		pipe_ctx->stream_res.stream_enc->funcs->dp_set_stream_attribute(
 			pipe_ctx->stream_res.stream_enc,
Signature · 6 lines
2.11.0

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

PATCH 12/28 drm/amd/display: Fix context alloc failed logging

In reply to a message not in the archive

From: Andrew Jiang <[email protected]>

Since there was no return statement in the fail block immediately preceding the context_alloc_fail block, any failure within the function caused a context alloc failed error message to be printed. Since the context_alloc_fail block is only used once, move it to where the goto is directly and accompany it with a return statement.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -5
index 0187188dafd6..dd86b864efe6 100644
@@ -1270,8 +1270,10 @@ void dc_update_planes_and_stream(struct dc *dc,
 
 		/* initialize scratch memory for building context */
 		context = dm_alloc(sizeof(*context));
-		if (context == NULL)
-				goto context_alloc_fail;
+		if (context == NULL) {
+			DC_ERROR("Failed to allocate new validate context!\n");
+			return;
+		}
 
 		atomic_inc(&context->ref_count);
 
@@ -1527,9 +1529,6 @@ void dc_update_planes_and_stream(struct dc *dc,
 
 fail:
 	dc_release_state(context);
-
-context_alloc_fail:
-	DC_ERROR("Failed to allocate new validate context!\n");
 }
 
 uint8_t dc_get_current_stream_count(struct dc *dc)
Signature · 6 lines
2.11.0

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

PATCH 13/28 drm/amd/display: seperate dpp_cm_helper functions into new file

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/Makefile      |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h   |   2 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c    | 259 +++++++++------------
 .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c | 123 ++++++++++
 .../drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h |  99 ++++++++
 5 files changed, 330 insertions(+), 155 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
index 52b56d19ca40..e92ac2997a1a 100644
@@ -4,7 +4,7 @@
 DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \
 		dcn10_dpp.o dcn10_opp.o dcn10_timing_generator.o \
 		dcn10_mem_input.o dcn10_mpc.o dcn10_dwb.o \
-		dcn10_dpp_dscl.o dcn10_dpp_cm.o
+		dcn10_dpp_dscl.o dcn10_dpp_cm.o dcn10_dpp_cm_helper.o
 
 AMD_DAL_DCN10 = $(addprefix $(AMDDALPATH)/dc/dcn10/,$(DCN10))
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +2 -0
index 4bbd3b4f7ae6..70d6ba09501b 100644
@@ -1262,6 +1262,8 @@ struct dcn10_dpp {
 	bool is_write_to_ram_a_safe;
 };
 
+
+
 enum dcn10_input_csc_select {
 	INPUT_CSC_SELECT_BYPASS = 0,
 	INPUT_CSC_SELECT_ICSC,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +105 -154

392 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.c new file +123 -0

123 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm_helper.h new file +99 -0

99 lines not on this page · raw message

Signature · 6 lines
2.11.0

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

PATCH 14/28 drm/amd/display: Don't reset clock source at unref

In reply to a message not in the archive

Powering down the clock source during unref is unsafe as we might want to unref during atomic_check

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 25 ++++++++++++++--------
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 16 +++++++++-----
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |  9 +++++---
 drivers/gpu/drm/amd/display/dc/inc/resource.h      |  4 ++--
 4 files changed, 35 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +16 -9
index 3eba2e55639b..bc0cf87216dd 100644
@@ -261,31 +261,34 @@ bool resource_construct(
 }
 
 
-void resource_unreference_clock_source(
+bool resource_unreference_clock_source(
 		struct resource_context *res_ctx,
 		const struct resource_pool *pool,
-		struct clock_source **clock_source)
+		struct clock_source *clock_source)
 {
 	int i;
+	bool need_reset = false;
+
 	for (i = 0; i < pool->clk_src_count; i++) {
-		if (pool->clock_sources[i] != *clock_source)
+		if (pool->clock_sources[i] != clock_source)
 			continue;
 
 		res_ctx->clock_source_ref_count[i]--;
 
 		if (res_ctx->clock_source_ref_count[i] == 0)
-			(*clock_source)->funcs->cs_power_down(*clock_source);
+			need_reset = true;
 
 		break;
 	}
 
-	if (pool->dp_clock_source == *clock_source) {
+	if (pool->dp_clock_source == clock_source) {
 		res_ctx->dp_clock_source_ref_count--;
 
 		if (res_ctx->dp_clock_source_ref_count == 0)
-			(*clock_source)->funcs->cs_power_down(*clock_source);
+			need_reset = true;
 	}
-	*clock_source = NULL;
+
+	return need_reset;
 }
 
 void resource_reference_clock_source(
@@ -1756,10 +1759,14 @@ bool dc_validate_global_state(
 			if (dc_is_dp_signal(pipe_ctx->stream->signal) &&
 				!find_pll_sharable_stream(stream, new_ctx)) {
 
-				resource_unreference_clock_source(
+				if (resource_unreference_clock_source(
 						&new_ctx->res_ctx,
 						dc->res_pool,
-						&pipe_ctx->clock_source);
+						pipe_ctx->clock_source)) {
+					pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
+					pipe_ctx->clock_source = NULL;
+				}
+
 				pipe_ctx->clock_source = dc->res_pool->dp_clock_source;
 				resource_reference_clock_source(
 						&new_ctx->res_ctx,
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +11 -5
index b36220bc619d..75c636cba545 100644
@@ -1362,9 +1362,12 @@ static void switch_dp_clock_sources(
 
 			if (clk_src &&
 				clk_src != pipe_ctx->clock_source) {
-				resource_unreference_clock_source(
-					res_ctx, dc->res_pool,
-					&pipe_ctx->clock_source);
+				if (resource_unreference_clock_source(res_ctx,
+				    dc->res_pool, pipe_ctx->clock_source)) {
+					pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
+					pipe_ctx->clock_source = NULL;
+				}
+
 				pipe_ctx->clock_source = clk_src;
 				resource_reference_clock_source(
 						res_ctx, dc->res_pool, clk_src);
@@ -1680,9 +1683,12 @@ static void dce110_reset_hw_ctx_wrap(
 			pipe_ctx_old->stream_res.tg->funcs->disable_crtc(pipe_ctx_old->stream_res.tg);
 			pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
 					pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
-			resource_unreference_clock_source(
+			if (resource_unreference_clock_source(
 					&dc->current_state->res_ctx, dc->res_pool,
-					&pipe_ctx_old->clock_source);
+					pipe_ctx_old->clock_source)) {
+				pipe_ctx_old->clock_source->funcs->cs_power_down(pipe_ctx_old->clock_source);
+				pipe_ctx_old->clock_source = NULL;
+			}
 
 			dc->hwss.power_down_front_end(dc, pipe_ctx_old->pipe_idx);
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +6 -3
index 6b76fc417456..7460560fbefc 100644
@@ -1045,9 +1045,12 @@ static void reset_back_end_for_pipe(
 	}
 
 	if (!IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment))
-		resource_unreference_clock_source(
-			&context->res_ctx, dc->res_pool,
-			&pipe_ctx->clock_source);
+		if (resource_unreference_clock_source(&context->res_ctx,
+		    dc->res_pool, pipe_ctx->clock_source)) {
+			pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
+			pipe_ctx->clock_source = NULL;
+		}
+
 
 	for (i = 0; i < dc->res_pool->pipe_count; i++)
 		if (&dc->current_state->res_ctx.pipe_ctx[i] == pipe_ctx)
drivers/gpu/drm/amd/display/dc/inc/resource.h +2 -2
index 41437da5fb9b..cf1797c191e9 100644
@@ -92,10 +92,10 @@ enum dc_status resource_build_scaling_params_for_context(
 
 void resource_build_info_frame(struct pipe_ctx *pipe_ctx);
 
-void resource_unreference_clock_source(
+bool resource_unreference_clock_source(
 		struct resource_context *res_ctx,
 		const struct resource_pool *pool,
-		struct clock_source **clock_source);
+		struct clock_source *clock_source);
 
 void resource_reference_clock_source(
 		struct resource_context *res_ctx,
Signature · 6 lines
2.11.0

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

PATCH 15/28 drm/amd/display: Power down clock source at commit

In reply to a message not in the archive

Still one more in dc_validate_global

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 19 ++++++++++-------
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 22 ++++++++++++++------
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  | 24 ++++++++++++++--------
 drivers/gpu/drm/amd/display/dc/inc/core_types.h    |  2 ++
 4 files changed, 46 insertions(+), 21 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +12 -7
index bc0cf87216dd..b17e1f60d34f 100644
@@ -275,8 +275,10 @@ bool resource_unreference_clock_source(
 
 		res_ctx->clock_source_ref_count[i]--;
 
-		if (res_ctx->clock_source_ref_count[i] == 0)
+		if (res_ctx->clock_source_ref_count[i] == 0) {
+			res_ctx->clock_source_changed[i] = true;
 			need_reset = true;
+		}
 
 		break;
 	}
@@ -284,8 +286,10 @@ bool resource_unreference_clock_source(
 	if (pool->dp_clock_source == clock_source) {
 		res_ctx->dp_clock_source_ref_count--;
 
-		if (res_ctx->dp_clock_source_ref_count == 0)
+		if (res_ctx->dp_clock_source_ref_count == 0) {
+			res_ctx->dp_clock_source_changed = true;
 			need_reset = true;
+		}
 	}
 
 	return need_reset;
@@ -1502,6 +1506,10 @@ bool dc_remove_stream_from_ctx(
 					del_pipe->stream_res.audio,
 					false);
 
+			resource_unreference_clock_source(&new_ctx->res_ctx,
+							  dc->res_pool,
+							  del_pipe->clock_source);
+
 			memset(del_pipe, 0, sizeof(*del_pipe));
 
 			break;
@@ -1759,13 +1767,10 @@ bool dc_validate_global_state(
 			if (dc_is_dp_signal(pipe_ctx->stream->signal) &&
 				!find_pll_sharable_stream(stream, new_ctx)) {
 
-				if (resource_unreference_clock_source(
+				resource_unreference_clock_source(
 						&new_ctx->res_ctx,
 						dc->res_pool,
-						pipe_ctx->clock_source)) {
-					pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
-					pipe_ctx->clock_source = NULL;
-				}
+						pipe_ctx->clock_source);
 
 				pipe_ctx->clock_source = dc->res_pool->dp_clock_source;
 				resource_reference_clock_source(
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +16 -6
index 75c636cba545..96db166b7fba 100644
@@ -1683,18 +1683,28 @@ static void dce110_reset_hw_ctx_wrap(
 			pipe_ctx_old->stream_res.tg->funcs->disable_crtc(pipe_ctx_old->stream_res.tg);
 			pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
 					pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
-			if (resource_unreference_clock_source(
-					&dc->current_state->res_ctx, dc->res_pool,
-					pipe_ctx_old->clock_source)) {
-				pipe_ctx_old->clock_source->funcs->cs_power_down(pipe_ctx_old->clock_source);
-				pipe_ctx_old->clock_source = NULL;
-			}
 
 			dc->hwss.power_down_front_end(dc, pipe_ctx_old->pipe_idx);
 
 			pipe_ctx_old->stream = NULL;
 		}
 	}
+
+	/* power down changed clock sources */
+	for (i = 0; i < dc->res_pool->clk_src_count; i++)
+		if (context->res_ctx.clock_source_changed[i]) {
+			struct clock_source *clk = dc->res_pool->clock_sources[i];
+
+			clk->funcs->cs_power_down(clk);
+			context->res_ctx.clock_source_changed[i] = false;
+		}
+
+	if (context->res_ctx.dp_clock_source_changed) {
+		struct clock_source *clk = dc->res_pool->dp_clock_source;
+
+		clk->funcs->cs_power_down(clk);
+		context->res_ctx.clock_source_changed[i] = false;
+	}
 }
 
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +16 -8
index 7460560fbefc..a1f4a00e5e04 100644
@@ -1044,14 +1044,6 @@ static void reset_back_end_for_pipe(
 		pipe_ctx->stream_res.tg->funcs->enable_optc_clock(pipe_ctx->stream_res.tg, false);
 	}
 
-	if (!IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment))
-		if (resource_unreference_clock_source(&context->res_ctx,
-		    dc->res_pool, pipe_ctx->clock_source)) {
-			pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
-			pipe_ctx->clock_source = NULL;
-		}
-
-
 	for (i = 0; i < dc->res_pool->pipe_count; i++)
 		if (&dc->current_state->res_ctx.pipe_ctx[i] == pipe_ctx)
 			break;
@@ -1273,6 +1265,22 @@ static void reset_hw_ctx_wrap(
 			plane_atomic_power_down(dc, i);
 	}
 
+	/* power down changed clock sources */
+	for (i = 0; i < dc->res_pool->clk_src_count; i++)
+		if (context->res_ctx.clock_source_changed[i]) {
+			struct clock_source *clk = dc->res_pool->clock_sources[i];
+
+			clk->funcs->cs_power_down(clk);
+			context->res_ctx.clock_source_changed[i] = false;
+		}
+
+	if (context->res_ctx.dp_clock_source_changed) {
+		struct clock_source *clk = dc->res_pool->dp_clock_source;
+
+		clk->funcs->cs_power_down(clk);
+		context->res_ctx.dp_clock_source_changed = false;
+	}
+
 	/* Reset Back End*/
 	for (i = dc->res_pool->pipe_count - 1; i >= 0 ; i--) {
 		struct pipe_ctx *pipe_ctx_old =
drivers/gpu/drm/amd/display/dc/inc/core_types.h +2 -0
index 915d5c10361b..b6a513d6feda 100644
@@ -213,7 +213,9 @@ struct resource_context {
 	bool is_stream_enc_acquired[MAX_PIPES * 2];
 	bool is_audio_acquired[MAX_PIPES];
 	uint8_t clock_source_ref_count[MAX_CLOCK_SOURCES];
+	bool clock_source_changed[MAX_CLOCK_SOURCES];
 	uint8_t dp_clock_source_ref_count;
+	bool dp_clock_source_changed;
 };
 
 struct dce_bw_output {
Signature · 6 lines
2.11.0

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

PATCH 16/28 drm/amd/display: Remove switching of clk sources at end of commit

In reply to a message not in the archive

This should be taken care of in validate now.

All of timing sync is quite broken at the moment anyways. Will submit another patch set to address that.

---
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 36 ----------------------
 1 file changed, 36 deletions(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +0 -36
index 96db166b7fba..c57dc45d6677 100644
@@ -1344,40 +1344,6 @@ static void set_safe_displaymarks(
 	}
 }
 
-static void switch_dp_clock_sources(
-	const struct dc *dc,
-	struct resource_context *res_ctx)
-{
-	uint8_t i;
-	for (i = 0; i < MAX_PIPES; i++) {
-		struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
-
-		if (pipe_ctx->stream == NULL || pipe_ctx->top_pipe)
-			continue;
-
-		if (dc_is_dp_signal(pipe_ctx->stream->signal)) {
-			struct clock_source *clk_src =
-				resource_find_used_clk_src_for_sharing(
-						res_ctx, pipe_ctx);
-
-			if (clk_src &&
-				clk_src != pipe_ctx->clock_source) {
-				if (resource_unreference_clock_source(res_ctx,
-				    dc->res_pool, pipe_ctx->clock_source)) {
-					pipe_ctx->clock_source->funcs->cs_power_down(pipe_ctx->clock_source);
-					pipe_ctx->clock_source = NULL;
-				}
-
-				pipe_ctx->clock_source = clk_src;
-				resource_reference_clock_source(
-						res_ctx, dc->res_pool, clk_src);
-
-				dce_crtc_switch_to_clk_src(dc->hwseq, clk_src, i);
-			}
-		}
-	}
-}
-
 /*******************************************************************************
  * Public functions
  ******************************************************************************/
@@ -1939,8 +1905,6 @@ enum dc_status dce110_apply_ctx_to_hw(
 
 	dcb->funcs->set_scratch_critical_state(dcb, false);
 
-	switch_dp_clock_sources(dc, &context->res_ctx);
-
 #ifdef ENABLE_FBC
 	if (dc->fbc_compressor)
 		enable_fbc(dc, context);
Signature · 6 lines
2.11.0

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

PATCH 17/28 drm/amd/display: remove output_format from ipp_setup

In reply to a message not in the archive

From: Eric Bernstein <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c          | 3 +--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h          | 3 +--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c       | 4 ++--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 +--
 drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h               | 3 +--
 drivers/gpu/drm/amd/display/dc/inc/hw/transform.h         | 3 +--
 6 files changed, 7 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +1 -2
index 99caafb27b37..487694125ea4 100644
@@ -266,8 +266,7 @@ static void ippn10_set_degamma_format_float(
 void ippn10_cnv_setup (
 		struct transform *xfm_base,
 		enum surface_pixel_format input_format,
-		enum expansion_mode mode,
-		enum ipp_output_format cnv_out_format)
+		enum expansion_mode mode)
 {
 	uint32_t pixel_format;
 	uint32_t alpha_en;
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +1 -2
index 70d6ba09501b..34e501979b55 100644
@@ -1358,8 +1358,7 @@ void dcn10_dpp_dscl_set_scaler_manual_scale(
 void ippn10_cnv_setup (
 		struct transform *xfm_base,
 		enum surface_pixel_format input_format,
-		enum expansion_mode mode,
-		enum ipp_output_format cnv_out_format);
+		enum expansion_mode mode);
 
 void ippn10_full_bypass(struct transform *xfm_base);
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +2 -2
index 840dd0346782..d0e72acfc1d5 100644
@@ -727,11 +727,11 @@ void ippn10_full_bypass(struct transform *xfm_base)
 			FORMAT_EXPANSION_MODE, 0);
 
 	/* COLOR_KEYER_CONTROL.COLOR_KEYER_EN = 0 this should be default */
-	REG_SET(CM_CONTROL, 0, CM_BYPASS_EN, 1);
+	if (xfm->tf_mask->CM_BYPASS_EN)
+		REG_SET(CM_CONTROL, 0, CM_BYPASS_EN, 1);
 
 	/* Setting degamma bypass for now */
 	REG_SET(CM_DGAM_CONTROL, 0, CM_DGAM_LUT_MODE, 0);
-	REG_SET(CM_IGAM_CONTROL, 0, CM_IGAM_LUT_MODE, 0);
 }
 
 static bool ippn10_ingamma_ram_inuse(struct transform *xfm_base,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -2
index a1f4a00e5e04..6fee6957c1a6 100644
@@ -2316,8 +2316,7 @@ static void update_dchubp_dpp(
 
 	xfm->funcs->ipp_setup(xfm,
 			plane_state->format,
-			1,
-			IPP_OUTPUT_FORMAT_12_BIT_FIX);
+			EXPANSION_MODE_ZERO);
 
 	mpcc_cfg.mi = mi;
 	mpcc_cfg.opp = pipe_ctx->stream_res.opp;
drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h +1 -2
index 7ebfdc1c19c1..f11aa484f46e 100644
@@ -86,8 +86,7 @@ struct ipp_funcs {
 	void (*ipp_setup)(
 		struct input_pixel_processor *ipp,
 		enum surface_pixel_format input_format,
-		enum expansion_mode mode,
-		enum ipp_output_format output_format);
+		enum expansion_mode mode);
 
 	/* DCE function to setup IPP.  TODO: see if we can consolidate to setup */
 	void (*ipp_program_prescale)(
drivers/gpu/drm/amd/display/dc/inc/hw/transform.h +1 -2
index 623042d2c272..32947450e702 100644
@@ -234,8 +234,7 @@ struct transform_funcs {
 	void (*ipp_setup)(
 			struct transform *xfm_base,
 			enum surface_pixel_format input_format,
-			enum expansion_mode mode,
-			enum ipp_output_format cnv_out_format);
+			enum expansion_mode mode);
 
 	void (*ipp_full_bypass)(struct transform *xfm_base);
 
Signature · 6 lines
2.11.0

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

PATCH 18/28 drm/amd/display: move dwb registers to header file

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c   | 288 +--------------------
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h   | 247 +++++++++++++++++-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |  42 +++
 3 files changed, 289 insertions(+), 288 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.c +1 -287
index 684241cb40d7..4ec5554f0f5b 100644
@@ -29,32 +29,7 @@
 #include "resource.h"
 #include "dwb.h"
 #include "dcn10_dwb.h"
-#include "vega10/soc15ip.h"
-#include "raven1/DCN/dcn_1_0_offset.h"
-#include "raven1/DCN/dcn_1_0_sh_mask.h"
 
-/* DCN */
-#define BASE_INNER(seg) \
-	DCE_BASE__INST0_SEG ## seg
-
-#define BASE(seg) \
-	BASE_INNER(seg)
-
-#define SR(reg_name)\
-		.reg_name = BASE(mm ## reg_name ## _BASE_IDX) +  \
-					mm ## reg_name
-
-#define SRI(reg_name, block, id)\
-	.reg_name = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \
-					mm ## block ## id ## _ ## reg_name
-
-
-#define SRII(reg_name, block, id)\
-	.reg_name[id] = BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \
-					mm ## block ## id ## _ ## reg_name
-
-#define SF(reg_name, field_name, post_fix)\
-	.field_name = reg_name ## __ ## field_name ## post_fix
 
 #define REG(reg)\
 	dwbc10->dwbc_regs->reg
@@ -69,240 +44,6 @@
 #define TO_DCN10_DWBC(dwbc_base) \
 	container_of(dwbc_base, struct dcn10_dwbc, base)
 
-#define DWBC_COMMON_REG_LIST_DCN1_0(inst) \
-	SRI(WB_ENABLE, CNV, inst),\
-	SRI(WB_EC_CONFIG, CNV, inst),\
-	SRI(CNV_MODE, CNV, inst),\
-	SRI(WB_SOFT_RESET, CNV, inst),\
-	SRI(MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_PITCH, MCIF_WB, inst),\
-	SRI(MCIF_WB_ARBITRATION_CONTROL, MCIF_WB, inst),\
-	SRI(MCIF_WB_SCLK_CHANGE, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_1_ADDR_Y, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_1_ADDR_Y_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_1_ADDR_C, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_1_ADDR_C_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_2_ADDR_Y, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_2_ADDR_Y_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_2_ADDR_C, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_2_ADDR_C_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_3_ADDR_Y, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_3_ADDR_Y_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_3_ADDR_C, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_3_ADDR_C_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_4_ADDR_Y, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_4_ADDR_Y_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_4_ADDR_C, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_4_ADDR_C_OFFSET, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB, inst),\
-	SRI(MCIF_WB_NB_PSTATE_LATENCY_WATERMARK, MCIF_WB, inst),\
-	SRI(MCIF_WB_NB_PSTATE_CONTROL, MCIF_WB, inst),\
-	SRI(MCIF_WB_WATERMARK, MCIF_WB, inst),\
-	SRI(MCIF_WB_WARM_UP_CNTL, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_LUMA_SIZE, MCIF_WB, inst),\
-	SRI(MCIF_WB_BUF_CHROMA_SIZE, MCIF_WB, inst),\
-	.DWB_SOURCE_SELECT = mmDWB_SOURCE_SELECT\
-
-#define DWBC_COMMON_MASK_SH_LIST_DCN1_0(mask_sh) \
-	SF(CNV0_WB_ENABLE, WB_ENABLE, mask_sh),\
-	SF(CNV0_WB_EC_CONFIG, DISPCLK_R_WB_GATE_DIS, mask_sh),\
-	SF(CNV0_WB_EC_CONFIG, DISPCLK_G_WB_GATE_DIS, mask_sh),\
-	SF(CNV0_WB_EC_CONFIG, DISPCLK_G_WBSCL_GATE_DIS, mask_sh),\
-	SF(CNV0_WB_EC_CONFIG, WB_LB_LS_DIS, mask_sh),\
-	SF(CNV0_WB_EC_CONFIG, WB_LUT_LS_DIS, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_WINDOW_CROP_EN, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_STEREO_TYPE, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_INTERLACED_MODE, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_EYE_SELECTION, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_STEREO_POLARITY, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_INTERLACED_FIELD_ORDER, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_STEREO_SPLIT, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_NEW_CONTENT, mask_sh),\
-	SF(CNV0_CNV_MODE, CNV_FRAME_CAPTURE_EN, mask_sh),\
-	SF(CNV0_WB_SOFT_RESET, WB_SOFT_RESET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_ENABLE, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUF_DUALSIZE_REQ, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_SW_INT_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_SW_INT_ACK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_SW_SLICE_INT_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_SW_OVERRUN_INT_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUFMGR_SW_LOCK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_P_VMID, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_SW_CONTROL, MCIF_WB_BUF_ADDR_FENCE_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_PITCH, MCIF_WB_BUF_LUMA_PITCH, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_PITCH, MCIF_WB_BUF_CHROMA_PITCH, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_ARBITRATION_CONTROL, MCIF_WB_CLIENT_ARBITRATION_SLICE, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_ARBITRATION_CONTROL, MCIF_WB_TIME_PER_PIXEL, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_SCLK_CHANGE, WM_CHANGE_ACK_FORCE_ON, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_SCLK_CHANGE, MCIF_WB_CLI_WATERMARK_MASK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_1_ADDR_Y, MCIF_WB_BUF_1_ADDR_Y, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_1_ADDR_Y_OFFSET, MCIF_WB_BUF_1_ADDR_Y_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_1_ADDR_C, MCIF_WB_BUF_1_ADDR_C, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_1_ADDR_C_OFFSET, MCIF_WB_BUF_1_ADDR_C_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_2_ADDR_Y, MCIF_WB_BUF_2_ADDR_Y, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_2_ADDR_Y_OFFSET, MCIF_WB_BUF_2_ADDR_Y_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_2_ADDR_C, MCIF_WB_BUF_2_ADDR_C, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_2_ADDR_C_OFFSET, MCIF_WB_BUF_2_ADDR_C_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_3_ADDR_Y, MCIF_WB_BUF_3_ADDR_Y, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_3_ADDR_Y_OFFSET, MCIF_WB_BUF_3_ADDR_Y_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_3_ADDR_C, MCIF_WB_BUF_3_ADDR_C, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_3_ADDR_C_OFFSET, MCIF_WB_BUF_3_ADDR_C_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_4_ADDR_Y, MCIF_WB_BUF_4_ADDR_Y, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_4_ADDR_Y_OFFSET, MCIF_WB_BUF_4_ADDR_Y_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_4_ADDR_C, MCIF_WB_BUF_4_ADDR_C, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_4_ADDR_C_OFFSET, MCIF_WB_BUF_4_ADDR_C_OFFSET, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_VCE_LOCK_IGNORE, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_VCE_INT_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_VCE_INT_ACK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_VCE_SLICE_INT_EN, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_VCE_LOCK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUFMGR_VCE_CONTROL, MCIF_WB_BUFMGR_SLICE_SIZE, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_NB_PSTATE_LATENCY_WATERMARK, NB_PSTATE_CHANGE_REFRESH_WATERMARK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_NB_PSTATE_CONTROL, NB_PSTATE_CHANGE_URGENT_DURING_REQUEST, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_NB_PSTATE_CONTROL, NB_PSTATE_CHANGE_FORCE_ON, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_NB_PSTATE_CONTROL, NB_PSTATE_ALLOW_FOR_URGENT, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_NB_PSTATE_CONTROL, NB_PSTATE_CHANGE_WATERMARK_MASK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_WATERMARK, MCIF_WB_CLI_WATERMARK, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_WARM_UP_CNTL, MCIF_WB_PITCH_SIZE_WARMUP, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_LUMA_SIZE, MCIF_WB_BUF_LUMA_SIZE, mask_sh),\
-	SF(MCIF_WB0_MCIF_WB_BUF_CHROMA_SIZE, MCIF_WB_BUF_CHROMA_SIZE, mask_sh),\
-	SF(DWB_SOURCE_SELECT, OPTC_DWB0_SOURCE_SELECT, mask_sh),\
-	SF(DWB_SOURCE_SELECT, OPTC_DWB1_SOURCE_SELECT, mask_sh)
-
-#define DWBC_REG_FIELD_LIST(type) \
-	type WB_ENABLE;\
-	type DISPCLK_R_WB_GATE_DIS;\
-	type DISPCLK_G_WB_GATE_DIS;\
-	type DISPCLK_G_WBSCL_GATE_DIS;\
-	type WB_LB_LS_DIS;\
-	type WB_LB_SD_DIS;\
-	type WB_LUT_LS_DIS;\
-	type CNV_WINDOW_CROP_EN;\
-	type CNV_STEREO_TYPE;\
-	type CNV_INTERLACED_MODE;\
-	type CNV_EYE_SELECTION;\
-	type CNV_STEREO_POLARITY;\
-	type CNV_INTERLACED_FIELD_ORDER;\
-	type CNV_STEREO_SPLIT;\
-	type CNV_NEW_CONTENT;\
-	type CNV_FRAME_CAPTURE_EN;\
-	type WB_SOFT_RESET;\
-	type MCIF_WB_BUFMGR_ENABLE;\
-	type MCIF_WB_BUF_DUALSIZE_REQ;\
-	type MCIF_WB_BUFMGR_SW_INT_EN;\
-	type MCIF_WB_BUFMGR_SW_INT_ACK;\
-	type MCIF_WB_BUFMGR_SW_SLICE_INT_EN;\
-	type MCIF_WB_BUFMGR_SW_OVERRUN_INT_EN;\
-	type MCIF_WB_BUFMGR_SW_LOCK;\
-	type MCIF_WB_P_VMID;\
-	type MCIF_WB_BUF_ADDR_FENCE_EN;\
-	type MCIF_WB_BUF_LUMA_PITCH;\
-	type MCIF_WB_BUF_CHROMA_PITCH;\
-	type MCIF_WB_CLIENT_ARBITRATION_SLICE;\
-	type MCIF_WB_TIME_PER_PIXEL;\
-	type WM_CHANGE_ACK_FORCE_ON;\
-	type MCIF_WB_CLI_WATERMARK_MASK;\
-	type MCIF_WB_BUF_1_ADDR_Y;\
-	type MCIF_WB_BUF_1_ADDR_Y_OFFSET;\
-	type MCIF_WB_BUF_1_ADDR_C;\
-	type MCIF_WB_BUF_1_ADDR_C_OFFSET;\
-	type MCIF_WB_BUF_2_ADDR_Y;\
-	type MCIF_WB_BUF_2_ADDR_Y_OFFSET;\
-	type MCIF_WB_BUF_2_ADDR_C;\
-	type MCIF_WB_BUF_2_ADDR_C_OFFSET;\
-	type MCIF_WB_BUF_3_ADDR_Y;\
-	type MCIF_WB_BUF_3_ADDR_Y_OFFSET;\
-	type MCIF_WB_BUF_3_ADDR_C;\
-	type MCIF_WB_BUF_3_ADDR_C_OFFSET;\
-	type MCIF_WB_BUF_4_ADDR_Y;\
-	type MCIF_WB_BUF_4_ADDR_Y_OFFSET;\
-	type MCIF_WB_BUF_4_ADDR_C;\
-	type MCIF_WB_BUF_4_ADDR_C_OFFSET;\
-	type MCIF_WB_BUFMGR_VCE_LOCK_IGNORE;\
-	type MCIF_WB_BUFMGR_VCE_INT_EN;\
-	type MCIF_WB_BUFMGR_VCE_INT_ACK;\
-	type MCIF_WB_BUFMGR_VCE_SLICE_INT_EN;\
-	type MCIF_WB_BUFMGR_VCE_LOCK;\
-	type MCIF_WB_BUFMGR_SLICE_SIZE;\
-	type NB_PSTATE_CHANGE_REFRESH_WATERMARK;\
-	type NB_PSTATE_CHANGE_URGENT_DURING_REQUEST;\
-	type NB_PSTATE_CHANGE_FORCE_ON;\
-	type NB_PSTATE_ALLOW_FOR_URGENT;\
-	type NB_PSTATE_CHANGE_WATERMARK_MASK;\
-	type MCIF_WB_CLI_WATERMARK;\
-	type MCIF_WB_CLI_CLOCK_GATER_OVERRIDE;\
-	type MCIF_WB_PITCH_SIZE_WARMUP;\
-	type MCIF_WB_BUF_LUMA_SIZE;\
-	type MCIF_WB_BUF_CHROMA_SIZE;\
-	type OPTC_DWB0_SOURCE_SELECT;\
-	type OPTC_DWB1_SOURCE_SELECT;\
-
-struct dcn10_dwbc_registers {
-	uint32_t WB_ENABLE;
-	uint32_t WB_EC_CONFIG;
-	uint32_t CNV_MODE;
-	uint32_t WB_SOFT_RESET;
-	uint32_t MCIF_WB_BUFMGR_SW_CONTROL;
-	uint32_t MCIF_WB_BUF_PITCH;
-	uint32_t MCIF_WB_ARBITRATION_CONTROL;
-	uint32_t MCIF_WB_SCLK_CHANGE;
-	uint32_t MCIF_WB_BUF_1_ADDR_Y;
-	uint32_t MCIF_WB_BUF_1_ADDR_Y_OFFSET;
-	uint32_t MCIF_WB_BUF_1_ADDR_C;
-	uint32_t MCIF_WB_BUF_1_ADDR_C_OFFSET;
-	uint32_t MCIF_WB_BUF_2_ADDR_Y;
-	uint32_t MCIF_WB_BUF_2_ADDR_Y_OFFSET;
-	uint32_t MCIF_WB_BUF_2_ADDR_C;
-	uint32_t MCIF_WB_BUF_2_ADDR_C_OFFSET;
-	uint32_t MCIF_WB_BUF_3_ADDR_Y;
-	uint32_t MCIF_WB_BUF_3_ADDR_Y_OFFSET;
-	uint32_t MCIF_WB_BUF_3_ADDR_C;
-	uint32_t MCIF_WB_BUF_3_ADDR_C_OFFSET;
-	uint32_t MCIF_WB_BUF_4_ADDR_Y;
-	uint32_t MCIF_WB_BUF_4_ADDR_Y_OFFSET;
-	uint32_t MCIF_WB_BUF_4_ADDR_C;
-	uint32_t MCIF_WB_BUF_4_ADDR_C_OFFSET;
-	uint32_t MCIF_WB_BUFMGR_VCE_CONTROL;
-	uint32_t MCIF_WB_NB_PSTATE_LATENCY_WATERMARK;
-	uint32_t MCIF_WB_NB_PSTATE_CONTROL;
-	uint32_t MCIF_WB_WATERMARK;
-	uint32_t MCIF_WB_WARM_UP_CNTL;
-	uint32_t MCIF_WB_BUF_LUMA_SIZE;
-	uint32_t MCIF_WB_BUF_CHROMA_SIZE;
-	uint32_t DWB_SOURCE_SELECT;
-};
-struct dcn10_dwbc_mask {
-	DWBC_REG_FIELD_LIST(uint32_t)
-};
-struct dcn10_dwbc_shift {
-	DWBC_REG_FIELD_LIST(uint8_t)
-};
-struct dcn10_dwbc {
-	struct dwbc base;
-	const struct dcn10_dwbc_registers *dwbc_regs;
-	const struct dcn10_dwbc_shift *dwbc_shift;
-	const struct dcn10_dwbc_mask *dwbc_mask;
-};
-
-#define dwbc_regs(id)\
-[id] = {\
-	DWBC_COMMON_REG_LIST_DCN1_0(id),\
-}
-
-static const struct dcn10_dwbc_registers dwbc10_regs[] = {
-	dwbc_regs(0),
-	dwbc_regs(1),
-};
-
-static const struct dcn10_dwbc_shift dwbc10_shift = {
-	DWBC_COMMON_MASK_SH_LIST_DCN1_0(__SHIFT)
-};
-
-static const struct dcn10_dwbc_mask dwbc10_mask = {
-	DWBC_COMMON_MASK_SH_LIST_DCN1_0(_MASK)
-};
-
-
 static bool get_caps(struct dwbc *dwbc, struct dwb_caps *caps)
 {
 	if (caps) {
@@ -603,7 +344,7 @@ const struct dwbc_funcs dcn10_dwbc_funcs = {
 	.reset_advanced_settings = reset_advanced_settings,
 };
 
-static void dcn10_dwbc_construct(struct dcn10_dwbc *dwbc10,
+void dcn10_dwbc_construct(struct dcn10_dwbc *dwbc10,
 						  struct dc_context *ctx,
 						  const struct dcn10_dwbc_registers *dwbc_regs,
 						  const struct dcn10_dwbc_shift *dwbc_shift,
@@ -620,32 +361,5 @@ static void dcn10_dwbc_construct(struct dcn10_dwbc *dwbc10,
 	dwbc10->dwbc_mask = dwbc_mask;
 }
 
-bool dcn10_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
-{
-	int i;
-	uint32_t pipe_count = pool->res_cap->num_dwb;
-
-	ASSERT(pipe_count > 0);
 
-	for (i = 0; i < pipe_count; i++) {
-		struct dcn10_dwbc *dwbc10 = dm_alloc(sizeof(struct dcn10_dwbc));
-
-		if (!dwbc10)
-			return false;
-
-		dcn10_dwbc_construct(dwbc10, ctx,
-				&dwbc10_regs[i],
-				&dwbc10_shift,
-				&dwbc10_mask,
-				i);
-
-		pool->dwbc[i] = &dwbc10->base;
-		if (pool->dwbc[i] == NULL) {
-			BREAK_TO_DEBUGGER();
-			dm_error("DC: failed to create dwbc10!\n");
-			return false;
-		}
-	}
-	return true;
-}
 #endif
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dwb.h +246 -1

253 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +42 -0

54 lines not on this page · raw message

Signature · 6 lines
2.11.0

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

PATCH 19/28 drm/amd/display: No need to keep track of unreffed clk sources

In reply to a message not in the archive

This simplifies clock source reprogramming a bit.

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  | 18 ++--------------
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 21 +++++-------------
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  | 25 +++++++---------------
 drivers/gpu/drm/amd/display/dc/inc/core_types.h    |  2 --
 drivers/gpu/drm/amd/display/dc/inc/resource.h      |  2 +-
 5 files changed, 16 insertions(+), 52 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -16
index b17e1f60d34f..d4706578a47e 100644
@@ -261,13 +261,12 @@ bool resource_construct(
 }
 
 
-bool resource_unreference_clock_source(
+void resource_unreference_clock_source(
 		struct resource_context *res_ctx,
 		const struct resource_pool *pool,
 		struct clock_source *clock_source)
 {
 	int i;
-	bool need_reset = false;
 
 	for (i = 0; i < pool->clk_src_count; i++) {
 		if (pool->clock_sources[i] != clock_source)
@@ -275,24 +274,11 @@ bool resource_unreference_clock_source(
 
 		res_ctx->clock_source_ref_count[i]--;
 
-		if (res_ctx->clock_source_ref_count[i] == 0) {
-			res_ctx->clock_source_changed[i] = true;
-			need_reset = true;
-		}
-
 		break;
 	}
 
-	if (pool->dp_clock_source == clock_source) {
+	if (pool->dp_clock_source == clock_source)
 		res_ctx->dp_clock_source_ref_count--;
-
-		if (res_ctx->dp_clock_source_ref_count == 0) {
-			res_ctx->dp_clock_source_changed = true;
-			need_reset = true;
-		}
-	}
-
-	return need_reset;
 }
 
 void resource_reference_clock_source(
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +5 -16
index c57dc45d6677..31592e53f504 100644
@@ -1640,6 +1640,8 @@ static void dce110_reset_hw_ctx_wrap(
 
 		if (!pipe_ctx->stream ||
 				pipe_need_reprogram(pipe_ctx_old, pipe_ctx)) {
+			struct clock_source *old_clk = pipe_ctx_old->clock_source;
+
 			core_link_disable_stream(pipe_ctx_old);
 			pipe_ctx_old->stream_res.tg->funcs->set_blank(pipe_ctx_old->stream_res.tg, true);
 			if (!hwss_wait_for_blank_complete(pipe_ctx_old->stream_res.tg)) {
@@ -1650,27 +1652,14 @@ static void dce110_reset_hw_ctx_wrap(
 			pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
 					pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
 
+			if (old_clk)
+				old_clk->funcs->cs_power_down(old_clk);
+
 			dc->hwss.power_down_front_end(dc, pipe_ctx_old->pipe_idx);
 
 			pipe_ctx_old->stream = NULL;
 		}
 	}
-
-	/* power down changed clock sources */
-	for (i = 0; i < dc->res_pool->clk_src_count; i++)
-		if (context->res_ctx.clock_source_changed[i]) {
-			struct clock_source *clk = dc->res_pool->clock_sources[i];
-
-			clk->funcs->cs_power_down(clk);
-			context->res_ctx.clock_source_changed[i] = false;
-		}
-
-	if (context->res_ctx.dp_clock_source_changed) {
-		struct clock_source *clk = dc->res_pool->dp_clock_source;
-
-		clk->funcs->cs_power_down(clk);
-		context->res_ctx.clock_source_changed[i] = false;
-	}
 }
 
 
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +8 -17
index 6fee6957c1a6..c8c4b951ee1d 100644
@@ -1265,22 +1265,6 @@ static void reset_hw_ctx_wrap(
 			plane_atomic_power_down(dc, i);
 	}
 
-	/* power down changed clock sources */
-	for (i = 0; i < dc->res_pool->clk_src_count; i++)
-		if (context->res_ctx.clock_source_changed[i]) {
-			struct clock_source *clk = dc->res_pool->clock_sources[i];
-
-			clk->funcs->cs_power_down(clk);
-			context->res_ctx.clock_source_changed[i] = false;
-		}
-
-	if (context->res_ctx.dp_clock_source_changed) {
-		struct clock_source *clk = dc->res_pool->dp_clock_source;
-
-		clk->funcs->cs_power_down(clk);
-		context->res_ctx.dp_clock_source_changed = false;
-	}
-
 	/* Reset Back End*/
 	for (i = dc->res_pool->pipe_count - 1; i >= 0 ; i--) {
 		struct pipe_ctx *pipe_ctx_old =
@@ -1291,9 +1275,16 @@ static void reset_hw_ctx_wrap(
 			continue;
 
 		if (!pipe_ctx->stream ||
-				pipe_need_reprogram(pipe_ctx_old, pipe_ctx))
+				pipe_need_reprogram(pipe_ctx_old, pipe_ctx)) {
+			struct clock_source *old_clk = pipe_ctx_old->clock_source;
+
 			reset_back_end_for_pipe(dc, pipe_ctx_old, dc->current_state);
+
+			if (old_clk)
+				old_clk->funcs->cs_power_down(old_clk);
+		}
 	}
+
 }
 
 static bool patch_address_for_sbs_tb_stereo(
drivers/gpu/drm/amd/display/dc/inc/core_types.h +0 -2
index b6a513d6feda..915d5c10361b 100644
@@ -213,9 +213,7 @@ struct resource_context {
 	bool is_stream_enc_acquired[MAX_PIPES * 2];
 	bool is_audio_acquired[MAX_PIPES];
 	uint8_t clock_source_ref_count[MAX_CLOCK_SOURCES];
-	bool clock_source_changed[MAX_CLOCK_SOURCES];
 	uint8_t dp_clock_source_ref_count;
-	bool dp_clock_source_changed;
 };
 
 struct dce_bw_output {
drivers/gpu/drm/amd/display/dc/inc/resource.h +1 -1
index cf1797c191e9..614bb691ab59 100644
@@ -92,7 +92,7 @@ enum dc_status resource_build_scaling_params_for_context(
 
 void resource_build_info_frame(struct pipe_ctx *pipe_ctx);
 
-bool resource_unreference_clock_source(
+void resource_unreference_clock_source(
 		struct resource_context *res_ctx,
 		const struct resource_pool *pool,
 		struct clock_source *clock_source);
Signature · 6 lines
2.11.0

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