Skip to contentSkip to conversation

amd-staging patches from upstream work

PATCH In review Harry Wentland 3 participants 12 messages Oct 2, 2017 4 messages not in the archive

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

cover amd-staging patches from upstream work

A bunch of patches for amd-staging-drm-next that came out of the upstream cleanup of DC. They already sit in drm-next-4.15-dc, some have been squashed into the first DC patch to avoid problems upstream. Either way, they don't have a formal R-B as standalone patches or look somewhat different rebased on stg, which is why I'm sending these again as a set.

These changes still leave Freesync support in the amd-staging tree until we find an upstream solution.

Harry Wentland (7):
Revert "drm/amd/display: enable static audio routing" drm/amdgpu: Add dc_log module parameter drm/amd/display: Pass log_mask from DM drm/amd/display: Reduce DC chattiness drm/amd/display: Clean Kconfig formatting drm/amd/display: Disable pre-Vega ASICs by default drm/amd/display: Remove unused dc_validate_guaranteed function

 drivers/gpu/drm/amd/amdgpu/amdgpu.h                |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         |  2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |  4 ++
 drivers/gpu/drm/amd/display/Kconfig                | 40 +++++++-----
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 75 ++++++++++++----------
 drivers/gpu/drm/amd/display/dc/basics/logger.c     | 41 ++----------
 drivers/gpu/drm/amd/display/dc/core/dc.c           | 34 +---------
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  2 +-
 drivers/gpu/drm/amd/display/dc/dc.h                |  1 +
 .../gpu/drm/amd/display/include/logger_interface.h |  2 +-
 drivers/gpu/drm/amd/display/include/logger_types.h | 35 ++++++++++
 11 files changed, 115 insertions(+), 122 deletions(-)
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): 20171002153216.1746-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 1/7 Revert "drm/amd/display: enable static audio routing"

This reverts commit c60c64b94c231bfd11805d056a9d85937a58beae.

This commit isn't correct in all cases since we can't guarantee that we can acquire audio and stream_enc devices for same index.

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +1 -1
index b7dc31b77ea6..dcfdfebd5c62 100644
@@ -1416,7 +1416,7 @@ static struct audio *find_first_free_audio(
 {
 	int i;
 	for (i = 0; i < pool->audio_count; i++) {
-		if ((res_ctx->is_audio_acquired[i] == false) && (res_ctx->is_stream_enc_acquired[i] == true)) {
+		if (res_ctx->is_audio_acquired[i] == false) {
 			return pool->audios[i];
 		}
 	}
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/7 drm/amdgpu: Add dc_log module parameter

In reply to a message not in the archive

We want to make DC less chatty but still allow bug reporters to provide more detailed logs.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h     | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
index 71e971ffca19..b7df029a5bc2 100644
@@ -103,6 +103,7 @@ extern int amdgpu_vm_fault_stop;
 extern int amdgpu_vm_debug;
 extern int amdgpu_vm_update_mode;
 extern int amdgpu_dc;
+extern int amdgpu_dc_log;
 extern int amdgpu_sched_jobs;
 extern int amdgpu_sched_hw_submission;
 extern int amdgpu_no_evict;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -0
index 374a7a170219..21ed51bc7aa0 100644
@@ -105,6 +105,7 @@ int amdgpu_vram_page_split = 512;
 int amdgpu_vm_update_mode = -1;
 int amdgpu_exp_hw_support = 0;
 int amdgpu_dc = -1;
+int amdgpu_dc_log = 0;
 int amdgpu_sched_jobs = 32;
 int amdgpu_sched_hw_submission = 2;
 int amdgpu_no_evict = 0;
@@ -213,6 +214,9 @@ module_param_named(exp_hw_support, amdgpu_exp_hw_support, int, 0444);
 MODULE_PARM_DESC(dc, "Display Core driver (1 = enable, 0 = disable, -1 = auto (default))");
 module_param_named(dc, amdgpu_dc, int, 0444);
 
+MODULE_PARM_DESC(dc, "Display Core Log Level (0 = minimal (default), 1 = chatty");
+module_param_named(dc_log, amdgpu_dc_log, int, 0444);
+
 MODULE_PARM_DESC(sched_jobs, "the max number of jobs supported in the sw queue (default 32)");
 module_param_named(sched_jobs, amdgpu_sched_jobs, int, 0444);
 
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/7 drm/amd/display: Pass log_mask from DM

In reply to a message not in the archive

Linux and Windows often desire different log levels.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  3 +-
 drivers/gpu/drm/amd/display/dc/basics/logger.c     | 41 +++-------------------
 drivers/gpu/drm/amd/display/dc/core/dc.c           |  2 +-
 drivers/gpu/drm/amd/display/dc/dc.h                |  1 +
 .../gpu/drm/amd/display/include/logger_interface.h |  2 +-
 drivers/gpu/drm/amd/display/include/logger_types.h | 32 +++++++++++++++++
 6 files changed, 42 insertions(+), 39 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -1
index 5cfa4d7a2055..bc443c043937 100644
@@ -323,7 +323,6 @@ void amdgpu_dm_initialize_fbc(struct amdgpu_device *adev)
 }
 #endif
 
-
 /* Init display KMS
  *
  * Returns 0 on success
@@ -374,6 +373,8 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.dce_environment = DCE_ENV_PRODUCTION_DRV;
 
+	init_data.log_mask = DC_DEFAULT_LOG_MASK;
+
 #ifdef ENABLE_FBC
 	if (adev->family == FAMILY_CZ)
 		amdgpu_dm_initialize_fbc(adev);
drivers/gpu/drm/amd/display/dc/basics/logger.c +5 -36

66 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index f39fe173615e..dfb9f814a3c3 100644
@@ -493,7 +493,7 @@ static bool construct(struct dc *dc,
 	dc_ctx->asic_id = init_params->asic_id;
 
 	/* Create logger */
-	logger = dal_logger_create(dc_ctx);
+	logger = dal_logger_create(dc_ctx, init_params->log_mask);
 
 	if (!logger) {
 		/* can *not* call logger. call base driver 'print error' */
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
index 1f0521ff4614..9c0e00050753 100644
@@ -267,6 +267,7 @@ struct dc_init_data {
 	enum dce_environment dce_environment;
 
 	struct dc_config flags;
+	uint32_t log_mask;
 #ifdef ENABLE_FBC
 	uint64_t fbc_gpu_addr;
 #endif
drivers/gpu/drm/amd/display/include/logger_interface.h +1 -1
index 6641e8001e97..5aaf2dacfe38 100644
@@ -40,7 +40,7 @@ struct dc_state;
  *
  */
 
-struct dal_logger *dal_logger_create(struct dc_context *ctx);
+struct dal_logger *dal_logger_create(struct dc_context *ctx, uint32_t log_mask);
 
 uint32_t dal_logger_destroy(struct dal_logger **logger);
 
drivers/gpu/drm/amd/display/include/logger_types.h +32 -0
index 42ffb93e3172..044805ccac25 100644
@@ -70,6 +70,38 @@ enum dc_log_type {
 	LOG_SECTION_TOTAL_COUNT
 };
 
+#define DC_DEFAULT_LOG_MASK ((1 << LOG_ERROR) | \
+		(1 << LOG_WARNING) | \
+		(1 << LOG_EVENT_MODE_SET) | \
+		(1 << LOG_EVENT_DETECTION) | \
+		(1 << LOG_EVENT_LINK_TRAINING) | \
+		(1 << LOG_EVENT_LINK_LOSS) | \
+		(1 << LOG_EVENT_UNDERFLOW) | \
+		(1 << LOG_RESOURCE) | \
+		(1 << LOG_FEATURE_OVERRIDE) | \
+		(1 << LOG_DETECTION_EDID_PARSER) | \
+		(1 << LOG_DC) | \
+		(1 << LOG_HW_HOTPLUG) | \
+		(1 << LOG_HW_SET_MODE) | \
+		(1 << LOG_HW_RESUME_S3) | \
+		(1 << LOG_HW_HPD_IRQ) | \
+		(1 << LOG_SYNC) | \
+		(1 << LOG_BANDWIDTH_VALIDATION) | \
+		(1 << LOG_MST) | \
+		(1 << LOG_DETECTION_DP_CAPS) | \
+		(1 << LOG_BACKLIGHT)) | \
+		(1 << LOG_I2C_AUX) | \
+		(1 << LOG_IF_TRACE) | \
+		(1 << LOG_DTN) /* | \
+		(1 << LOG_DEBUG) | \
+		(1 << LOG_BIOS) | \
+		(1 << LOG_SURFACE) | \
+		(1 << LOG_SCALER) | \
+		(1 << LOG_DML) | \
+		(1 << LOG_HW_LINK_TRAINING) | \
+		(1 << LOG_HW_AUDIO)| \
+		(1 << LOG_BANDWIDTH_CALCS)*/
+
 union logger_flags {
 	struct {
 		uint32_t ENABLE_CONSOLE:1; /* Print to console */
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/7 drm/amd/display: Reduce DC chattiness

In reply to a message not in the archive

Log DC init but default log level to 0 (default for amdgpu_dc_log) otherwise. Bug reporters can still make DC more chatty by using the dc_log module param.
amdgpu.dc_log = 1

v2: Only provide runtime option, no compile time config

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 74 ++++++++++++----------
 drivers/gpu/drm/amd/display/include/logger_types.h |  3 +
 2 files changed, 42 insertions(+), 35 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +39 -35
index bc443c043937..8ebc0ae9fcc0 100644
@@ -333,7 +333,6 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 	adev->dm.ddev = adev->ddev;
 	adev->dm.adev = adev;
 
-	DRM_INFO("DAL is enabled\n");
 	/* Zero all the fields */
 	memset(&init_data, 0, sizeof(init_data));
 
@@ -373,7 +372,10 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.dce_environment = DCE_ENV_PRODUCTION_DRV;
 
-	init_data.log_mask = DC_DEFAULT_LOG_MASK;
+	if (amdgpu_dc_log)
+		init_data.log_mask = DC_DEFAULT_LOG_MASK;
+	else
+		init_data.log_mask = DC_MIN_LOG_MASK;
 
 #ifdef ENABLE_FBC
 	if (adev->family == FAMILY_CZ)
@@ -383,7 +385,9 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 	/* Display Core create. */
 	adev->dm.dc = dc_create(&init_data);
 
-	if (!adev->dm.dc)
+	if (adev->dm.dc)
+		DRM_INFO("Display Core initialized!\n");
+	else
 		DRM_INFO("Display Core failed to initialize!\n");
 
 	INIT_WORK(&adev->dm.mst_hotplug_work, hotplug_notify_work_func);
@@ -393,7 +397,7 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 		DRM_ERROR(
 		"amdgpu: failed to initialize freesync_module.\n");
 	} else
-		DRM_INFO("amdgpu: freesync_module init done %p.\n",
+		DRM_DEBUG_DRIVER("amdgpu: freesync_module init done %p.\n",
 				adev->dm.freesync_module);
 
 	if (amdgpu_dm_initialize_drm_device(adev)) {
@@ -417,7 +421,7 @@ int amdgpu_dm_init(struct amdgpu_device *adev)
 		goto error;
 	}
 
-	DRM_INFO("KMS initialized.\n");
+	DRM_DEBUG_DRIVER("KMS initialized.\n");
 
 	return 0;
 error:
@@ -475,7 +479,7 @@ static int detect_mst_link_for_all_connectors(struct drm_device *dev)
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 		   aconnector = to_amdgpu_dm_connector(connector);
 		if (aconnector->dc_link->type == dc_connection_mst_branch) {
-			DRM_INFO("DM_MST: starting TM on aconnector: %p [id: %d]\n",
+			DRM_DEBUG_DRIVER("DM_MST: starting TM on aconnector: %p [id: %d]\n",
 					aconnector, aconnector->base.base.id);
 
 			ret = drm_dp_mst_topology_mgr_set_mst(&aconnector->mst_mgr, true);
@@ -804,12 +808,12 @@ void amdgpu_dm_update_connector_after_detect(
 	if (aconnector->dc_sink == sink) {
 		/* We got a DP short pulse (Link Loss, DP CTS, etc...).
 		 * Do nothing!! */
-		DRM_INFO("DCHPD: connector_id=%d: dc_sink didn't change.\n",
+		DRM_DEBUG_DRIVER("DCHPD: connector_id=%d: dc_sink didn't change.\n",
 				aconnector->connector_id);
 		return;
 	}
 
-	DRM_INFO("DCHPD: connector_id=%d: Old sink=%p New sink=%p\n",
+	DRM_DEBUG_DRIVER("DCHPD: connector_id=%d: Old sink=%p New sink=%p\n",
 		aconnector->connector_id, aconnector->dc_sink, sink);
 
 	mutex_lock(&dev->mode_config.mutex);
@@ -911,7 +915,7 @@ static void dm_handle_hpd_rx_irq(struct amdgpu_dm_connector *aconnector)
 
 		process_count++;
 
-		DRM_DEBUG_KMS("ESI %02x %02x %02x\n", esi[0], esi[1], esi[2]);
+		DRM_DEBUG_DRIVER("ESI %02x %02x %02x\n", esi[0], esi[1], esi[2]);
 		/* handle HPD short pulse irq */
 		if (aconnector->mst_mgr.mst_state)
 			drm_dp_mst_hpd_irq(
@@ -949,7 +953,7 @@ static void dm_handle_hpd_rx_irq(struct amdgpu_dm_connector *aconnector)
 	}
 
 	if (process_count == max_process_count)
-		DRM_DEBUG_KMS("Loop exceeded max iterations\n");
+		DRM_DEBUG_DRIVER("Loop exceeded max iterations\n");
 }
 
 static void handle_hpd_rx_irq(void *param)
@@ -1268,7 +1272,7 @@ void amdgpu_dm_register_backlight_device(struct amdgpu_display_manager *dm)
 	if (NULL == dm->backlight_dev)
 		DRM_ERROR("DM: Backlight registration failed!\n");
 	else
-		DRM_INFO("DM: Registered Backlight device: %s\n", bl_name);
+		DRM_DEBUG_DRIVER("DM: Registered Backlight device: %s\n", bl_name);
 }
 
 #endif
@@ -2049,7 +2053,7 @@ static void update_stream_scaling_settings(
 	stream->src = src;
 	stream->dst = dst;
 
-	DRM_DEBUG_KMS("Destination Rectangle x:%d  y:%d  width:%d  height:%d\n",
+	DRM_DEBUG_DRIVER("Destination Rectangle x:%d  y:%d  width:%d  height:%d\n",
 			dst.x, dst.y, dst.width, dst.height);
 
 }
@@ -2359,7 +2363,7 @@ static struct dc_stream_state *create_stream_for_sink(
 		 * case, we call set mode ourselves to restore the previous mode
 		 * and the modelist may not be filled in in time.
 		 */
-		DRM_INFO("No preferred mode found\n");
+		DRM_DEBUG_DRIVER("No preferred mode found\n");
 	} else {
 		decide_crtc_timing_for_drm_display_mode(
 				&mode, preferred_mode,
@@ -2731,7 +2735,7 @@ static struct drm_encoder *best_encoder(struct drm_connector *connector)
 	struct drm_mode_object *obj;
 	struct drm_encoder *encoder;
 
-	DRM_DEBUG_KMS("Finding the best encoder\n");
+	DRM_DEBUG_DRIVER("Finding the best encoder\n");
 
 	/* pick the encoder ids */
 	if (enc_id) {
@@ -3000,7 +3004,7 @@ static int dm_plane_helper_prepare_fb(
 	dm_plane_state_new = to_dm_plane_state(new_state);
 
 	if (!new_state->fb) {
-		DRM_DEBUG_KMS("No FB bound\n");
+		DRM_DEBUG_DRIVER("No FB bound\n");
 		return 0;
 	}
 
@@ -3578,7 +3582,7 @@ int amdgpu_dm_connector_init(
 	struct amdgpu_i2c_adapter *i2c;
 	((struct dc_link *)link)->priv = aconnector;
 
-	DRM_DEBUG_KMS("%s()\n", __func__);
+	DRM_DEBUG_DRIVER("%s()\n", __func__);
 
 	i2c = create_i2c(link->ddc, link->link_index, &res);
 	aconnector->i2c = i2c;
@@ -3819,11 +3823,11 @@ static void handle_cursor_update(
 	if (!plane->state->fb && !old_plane_state->fb)
 		return;
 
-	DRM_DEBUG_KMS("%s: crtc_id=%d with size %d to %d\n",
-		      __func__,
-		      amdgpu_crtc->crtc_id,
-		      plane->state->crtc_w,
-		      plane->state->crtc_h);
+	DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
+		         __func__,
+		         amdgpu_crtc->crtc_id,
+		         plane->state->crtc_w,
+		         plane->state->crtc_h);
 
 	ret = get_cursor_position(plane, crtc, &position);
 	if (ret)
@@ -4126,7 +4130,7 @@ void amdgpu_dm_atomic_commit_tail(
 		new_acrtc_state = to_dm_crtc_state(new_state);
 		old_acrtc_state = to_dm_crtc_state(old_crtc_state);
 
-		DRM_DEBUG_KMS(
+		DRM_DEBUG_DRIVER(
 			"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
 			"planes_changed:%d, mode_changed:%d,active_changed:%d,"
 			"connectors_changed:%d\n",
@@ -4144,7 +4148,7 @@ void amdgpu_dm_atomic_commit_tail(
 
 		if (modeset_required(new_state, new_acrtc_state->stream, old_acrtc_state->stream)) {
 
-			DRM_INFO("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
+			DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
 
 			if (!new_acrtc_state->stream) {
 				/*
@@ -4162,7 +4166,7 @@ void amdgpu_dm_atomic_commit_tail(
 				 * have a sink to keep the pipe running so that
 				 * hw state is consistent with the sw state
 				 */
-				DRM_DEBUG_KMS("%s: Failed to create new stream for crtc %d\n",
+				DRM_DEBUG_DRIVER("%s: Failed to create new stream for crtc %d\n",
 						__func__, acrtc->base.base.id);
 				continue;
 			}
@@ -4189,7 +4193,7 @@ void amdgpu_dm_atomic_commit_tail(
 			acrtc->hw_mode = crtc->state->mode;
 			crtc->hwmode = crtc->state->mode;
 		} else if (modereset_required(new_state)) {
-			DRM_INFO("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
+			DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
 
 			/* i.e. reset mode */
 			if (old_acrtc_state->stream)
@@ -4214,7 +4218,7 @@ void amdgpu_dm_atomic_commit_tail(
 					&new_crtcs[i]->base,
 					false);
 			if (!aconnector) {
-				DRM_INFO("Atomic commit: Failed to find connector for acrtc id:%d "
+				DRM_DEBUG_DRIVER("Atomic commit: Failed to find connector for acrtc id:%d "
 					 "skipping freesync init\n",
 					 new_crtcs[i]->crtc_id);
 				continue;
@@ -4523,7 +4527,7 @@ static int dm_update_crtcs_state(
 			 */
 
 			if (!new_stream) {
-				DRM_DEBUG_KMS("%s: Failed to create new stream for crtc %d\n",
+				DRM_DEBUG_DRIVER("%s: Failed to create new stream for crtc %d\n",
 						__func__, acrtc->base.base.id);
 				break;
 			}
@@ -4534,7 +4538,7 @@ static int dm_update_crtcs_state(
 
 				crtc_state->mode_changed = false;
 
-				DRM_DEBUG_KMS("Mode change not required, setting mode_changed to %d",
+				DRM_DEBUG_DRIVER("Mode change not required, setting mode_changed to %d",
 					      crtc_state->mode_changed);
 		}
 
@@ -4542,7 +4546,7 @@ static int dm_update_crtcs_state(
 		if (!drm_atomic_crtc_needs_modeset(crtc_state))
 			goto next_crtc;
 
-		DRM_DEBUG_KMS(
+		DRM_DEBUG_DRIVER(
 			"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
 			"planes_changed:%d, mode_changed:%d,active_changed:%d,"
 			"connectors_changed:%d\n",
@@ -4560,7 +4564,7 @@ static int dm_update_crtcs_state(
 			if (!old_acrtc_state->stream)
 				goto next_crtc;
 
-			DRM_DEBUG_KMS("Disabling DRM crtc: %d\n",
+			DRM_DEBUG_DRIVER("Disabling DRM crtc: %d\n",
 					crtc->base.id);
 
 			/* i.e. reset mode */
@@ -4590,7 +4594,7 @@ static int dm_update_crtcs_state(
 				new_acrtc_state->stream = new_stream;
 				dc_stream_retain(new_stream);
 
-				DRM_DEBUG_KMS("Enabling DRM crtc: %d\n",
+				DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
 							crtc->base.id);
 
 				if (!dc_add_stream_to_ctx(
@@ -4665,7 +4669,7 @@ static int dm_update_planes_state(
 			if (!old_acrtc_state->stream)
 				continue;
 
-			DRM_DEBUG_KMS("Disabling DRM plane: %d on DRM crtc %d\n",
+			DRM_DEBUG_DRIVER("Disabling DRM plane: %d on DRM crtc %d\n",
 					plane->base.id, old_plane_crtc->base.id);
 
 			if (!dc_remove_plane_from_context(
@@ -4703,7 +4707,7 @@ static int dm_update_planes_state(
 
 			new_dm_plane_state->dc_state = dc_create_plane_state(dc);
 
-			DRM_DEBUG_KMS("Enabling DRM plane: %d on DRM crtc %d\n",
+			DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
 					plane->base.id, new_plane_crtc->base.id);
 
 			if (!new_dm_plane_state->dc_state) {
@@ -4862,9 +4866,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
 
 fail:
 	if (ret == -EDEADLK)
-		DRM_DEBUG_KMS("Atomic check stopped due to to deadlock.\n");
+		DRM_DEBUG_DRIVER("Atomic check stopped due to to deadlock.\n");
 	else if (ret == -EINTR || ret == -EAGAIN || ret == -ERESTARTSYS)
-		DRM_DEBUG_KMS("Atomic check stopped due to to signal.\n");
+		DRM_DEBUG_DRIVER("Atomic check stopped due to to signal.\n");
 	else
 		DRM_ERROR("Atomic check failed with err: %d \n", ret);
 
drivers/gpu/drm/amd/display/include/logger_types.h +3 -0
index 044805ccac25..1f22e84cedb9 100644
@@ -70,6 +70,9 @@ enum dc_log_type {
 	LOG_SECTION_TOTAL_COUNT
 };
 
+#define DC_MIN_LOG_MASK ((1 << LOG_ERROR) | \
+		(1 << LOG_DETECTION_EDID_PARSER))
+
 #define DC_DEFAULT_LOG_MASK ((1 << LOG_ERROR) | \
 		(1 << LOG_WARNING) | \
 		(1 << LOG_EVENT_MODE_SET) | \
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/7 drm/amd/display: Clean Kconfig formatting

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/display/Kconfig | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/display/Kconfig +16 -17
index 62ea9f600374..96a571f6d373 100644
@@ -2,26 +2,25 @@ menu "Display Engine Configuration"
 	depends on DRM && DRM_AMDGPU
 
 config DRM_AMD_DC
-        bool "AMD DC - Enable new display engine (will be deprecated when the development is done)"
-        help
-          Choose this option if you want to use the new display engine
-          support for AMDGPU.
-
-          Will be deprecated when the DC component is upstream.
+	bool "AMD DC - Enable new display engine"
+	help
+	  Choose this option if you want to use the new display engine
+	  support for AMDGPU. This adds required support for Vega and
+	  Raven ASICs.
 
 config DRM_AMD_DC_DCN1_0
-        bool "DCN 1.0 Raven family"
-        depends on DRM_AMD_DC && X86
-        help
-            Choose this option if you want to have
-            RV family for display engine
+	bool "DCN 1.0 Raven family"
+	depends on DRM_AMD_DC && X86
+	help
+	  Choose this option if you want to have
+	  RV family for display engine
 
 config DEBUG_KERNEL_DC
-        bool "Enable kgdb break in DC"
-        depends on DRM_AMD_DC
-        help
-         Choose this option
-         if you want to hit
-         kdgb_break in assert.
+	bool "Enable kgdb break in DC"
+	depends on DRM_AMD_DC
+	help
+	  Choose this option
+	  if you want to hit
+	  kdgb_break in assert.
 
 endmenu
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/7 drm/amd/display: Disable pre-Vega ASICs by default

In reply to a message not in the archive

v2: Clarify help text for pre-vega config

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 drivers/gpu/drm/amd/display/Kconfig        | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 24f6e3c1b114..03e86e4c108f 100644
@@ -1998,7 +1998,9 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 	case CHIP_VEGA10:
+#if defined(CONFIG_DRM_AMD_DC_PRE_VEGA)
 		return amdgpu_dc != 0;
+#endif
 	case CHIP_KABINI:
 	case CHIP_MULLINS:
 		return amdgpu_dc > 0;
drivers/gpu/drm/amd/display/Kconfig +9 -0
index 96a571f6d373..6d1086d0a277 100644
@@ -3,11 +3,20 @@ menu "Display Engine Configuration"
 
 config DRM_AMD_DC
 	bool "AMD DC - Enable new display engine"
+	default y
 	help
 	  Choose this option if you want to use the new display engine
 	  support for AMDGPU. This adds required support for Vega and
 	  Raven ASICs.
 
+config DRM_AMD_DC_PRE_VEGA
+	bool "DC support for Polaris and older ASICs"
+	default n
+	help
+	  Choose this option to enable the new DC support for older asics
+	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
+	  and Hawaii.
+
 config DRM_AMD_DC_DCN1_0
 	bool "DCN 1.0 Raven family"
 	depends on DRM_AMD_DC && X86
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): 20171002153216.1746-7-harry.wentland-5C7GfCeVMHo@public.gmane.org

#9 lore raw

RE: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

This treats Vega10 and Pre-Vega10 the same way. I don't understand how this implements Vega10-specific behavior.

Regards,
Felix

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Harry Wentland
Sent: Monday, October 02, 2017 11:32 AM
To: [email protected]
Cc: Wentland, Harry
Subject: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

v2: Clarify help text for pre-vega config

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 drivers/gpu/drm/amd/display/Kconfig        | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 24f6e3c1b114..03e86e4c108f 100644
@@ -1998,7 +1998,9 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 	case CHIP_VEGA10:
+#if defined(CONFIG_DRM_AMD_DC_PRE_VEGA)
 		return amdgpu_dc != 0;
+#endif
 	case CHIP_KABINI:
 	case CHIP_MULLINS:
 		return amdgpu_dc > 0;
drivers/gpu/drm/amd/display/Kconfig +9 -0
index 96a571f6d373..6d1086d0a277 100644
@@ -3,11 +3,20 @@ menu "Display Engine Configuration"
 
 config DRM_AMD_DC
 	bool "AMD DC - Enable new display engine"
+	default y
 	help
 	  Choose this option if you want to use the new display engine
 	  support for AMDGPU. This adds required support for Vega and
 	  Raven ASICs.
 
+config DRM_AMD_DC_PRE_VEGA
+	bool "DC support for Polaris and older ASICs"
+	default n
+	help
+	  Choose this option to enable the new DC support for older asics
+	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
+	  and Hawaii.
+
 config DRM_AMD_DC_DCN1_0
 	bool "DCN 1.0 Raven family"
 	depends on DRM_AMD_DC && X86
Signature · 10 lines
2.11.0

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): DM5PR1201MB0235A9B541F03679224CB801927D0-grEf7a3NxMBd8L2jMOIKKmrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/[email protected]

#11 lore raw

Re: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

Quoted 2 lines · Felix

This treats Vega10 and Pre-Vega10 the same way. I don't understand how this implements Vega10-specific behavior.

Thanks for spotting this. This merged wrong when cherry-picking it from the upstream tree as it was sitting on a much older commit there.

Harry

Quoted 48 lines

Regards,
Felix

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Harry Wentland
Sent: Monday, October 02, 2017 11:32 AM
To: [email protected]
Cc: Wentland, Harry
Subject: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

v2: Clarify help text for pre-vega config

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 drivers/gpu/drm/amd/display/Kconfig        | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 24f6e3c1b114..03e86e4c108f 100644
@@ -1998,7 +1998,9 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 	case CHIP_VEGA10:
+#if defined(CONFIG_DRM_AMD_DC_PRE_VEGA)
 		return amdgpu_dc != 0;
+#endif
 	case CHIP_KABINI:
 	case CHIP_MULLINS:
 		return amdgpu_dc > 0;
drivers/gpu/drm/amd/display/Kconfig +2 -0
index 96a571f6d373..6d1086d0a277 100644
@@ -3,11 +3,20 @@ menu "Display Engine Configuration"
 
 config DRM_AMD_DC
 	bool "AMD DC - Enable new display engine"
+	default y
 	help
 	  Choose this option if you want to use the new display engine
 	  support for AMDGPU. This adds required support for Vega and
 	  Raven ASICs.
 
+config DRM_AMD_DC_PRE_VEGA

drivers/gpu/drm/amd/display/Kconfig menu "Display Engine Configuration" · line 22

Quoted 10 lines
drivers/gpu/drm/amd/display/Kconfig +7 -0
+	bool "DC support for Polaris and older ASICs"
+	default n
+	help
+	  Choose this option to enable the new DC support for older asics
+	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
+	  and Hawaii.
+
 config DRM_AMD_DC_DCN1_0
 	bool "DCN 1.0 Raven family"
 	depends on DRM_AMD_DC && X86

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

Acked-by Alex Deucher
#12 lore raw

RE: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

In reply to a message not in the archive
Quoted 40 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Harry Wentland
Sent: Monday, October 02, 2017 11:32 AM
To: [email protected]
Cc: Wentland, Harry
Subject: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

v2: Clarify help text for pre-vega config

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 drivers/gpu/drm/amd/display/Kconfig        | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 24f6e3c1b114..03e86e4c108f 100644
@@ -1998,7 +1998,9 @@ bool amdgpu_device_asic_has_dc_support(enum
 amd_asic_type asic_type)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 	case CHIP_VEGA10:
+#if defined(CONFIG_DRM_AMD_DC_PRE_VEGA)
 		return amdgpu_dc != 0;
+#endif
 	case CHIP_KABINI:
 	case CHIP_MULLINS:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 		return amdgpu_dc > 0;
drivers/gpu/drm/amd/display/Kconfig +0 -0
index 96a571f6d373..6d1086d0a277 100644
@@ -3,11 +3,20 @@ menu "Display Engine Configuration"
 
 config DRM_AMD_DC

drivers/gpu/drm/amd/display/Kconfig menu "Display Engine Configuration" · line 14

Quoted 10 lines
drivers/gpu/drm/amd/display/Kconfig +4 -0
 	bool "AMD DC - Enable new display engine"
+	default y
 	help
 	  Choose this option if you want to use the new display engine
 	  support for AMDGPU. This adds required support for Vega and
 	  Raven ASICs.
 
+config DRM_AMD_DC_PRE_VEGA
+	bool "DC support for Polaris and older ASICs"
+	default n

Either drop this patch or set this to y for amd-staging. The rest of the patches are:

Alex

Quoted 11 lines
drivers/gpu/drm/amd/display/Kconfig +5 -1
+	help
+	  Choose this option to enable the new DC support for older asics
+	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
+	  and Hawaii.
+
 config DRM_AMD_DC_DCN1_0
 	bool "DCN 1.0 Raven family"
 	depends on DRM_AMD_DC && X86
--

2.11.0

Quoted 4 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

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1652C8D10AFCD168E0CD271AF77D0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#14 lore raw

Re: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

Quoted 47 lines · Alexander
Quoted 47 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Harry Wentland
Sent: Monday, October 02, 2017 11:32 AM
To: [email protected]
Cc: Wentland, Harry
Subject: [PATCH 6/7] drm/amd/display: Disable pre-Vega ASICs by default

v2: Clarify help text for pre-vega config

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
 drivers/gpu/drm/amd/display/Kconfig        | 9 +++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
index 24f6e3c1b114..03e86e4c108f 100644
@@ -1998,7 +1998,9 @@ bool amdgpu_device_asic_has_dc_support(enum
 amd_asic_type asic_type)
 	case CHIP_TONGA:
 	case CHIP_FIJI:
 	case CHIP_VEGA10:
+#if defined(CONFIG_DRM_AMD_DC_PRE_VEGA)
 		return amdgpu_dc != 0;
+#endif
 	case CHIP_KABINI:
 	case CHIP_MULLINS:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 		return amdgpu_dc > 0;
drivers/gpu/drm/amd/display/Kconfig +1 -0
index 96a571f6d373..6d1086d0a277 100644
@@ -3,11 +3,20 @@ menu "Display Engine Configuration"
 
 config DRM_AMD_DC
 	bool "AMD DC - Enable new display engine"
+	default y
 	help
 	  Choose this option if you want to use the new display engine
 	  support for AMDGPU. This adds required support for Vega and
 	  Raven ASICs.
 
Quoted 7 lines

drivers/gpu/drm/amd/display/Kconfig menu "Display Engine Configuration" · line 14

Quoted 3 lines
drivers/gpu/drm/amd/display/Kconfig +3 -0
+config DRM_AMD_DC_PRE_VEGA
+	bool "DC support for Polaris and older ASICs"
+	default n

Either drop this patch or set this to y for amd-staging. The rest of the patches are:

Was thinking of updating our config override but it's probably easier to leave it out. This is really only needed for upstream.

Harry

Quoted 13 lines

Alex

Quoted 11 lines
drivers/gpu/drm/amd/display/Kconfig +5 -1
+	help
+	  Choose this option to enable the new DC support for older asics
+	  by default. This includes Polaris, Carrizo, Tonga, Bonaire,
+	  and Hawaii.
+
 config DRM_AMD_DC_DCN1_0
 	bool "DCN 1.0 Raven family"
 	depends on DRM_AMD_DC && X86
--

2.11.0

Quoted 4 lines
Quoted 4 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

#15 lore raw

PATCH 7/7 drm/amd/display: Remove unused dc_validate_guaranteed function

In reply to a message not in the archive

It got refactored away and was never cleaned.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 32 --------------------------------
 1 file changed, 32 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -32
index dfb9f814a3c3..58c5083bef2a 100644
@@ -651,38 +651,6 @@ void dc_destroy(struct dc **dc)
 	*dc = NULL;
 }
 
-bool dc_validate_guaranteed(
-		struct dc *dc,
-		struct dc_stream_state *stream)
-{
-	enum dc_status result = DC_ERROR_UNEXPECTED;
-	struct dc_state *context;
-
-	if (!dc_validate_stream(dc, stream))
-		return false;
-
-	context = dc_create_state();
-	if (context == NULL)
-		goto context_alloc_fail;
-
-	dc_resource_state_construct(dc, dc->current_state);
-
-	result = dc->res_pool->funcs->validate_guaranteed(
-					dc, stream, context);
-
-	dc_release_state(context);
-
-context_alloc_fail:
-	if (result != DC_OK) {
-		dm_logger_write(dc->ctx->logger, LOG_WARNING,
-			"%s:guaranteed validation failed, dc_status:%d\n",
-			__func__,
-			result);
-		}
-
-	return (result == DC_OK);
-}
-
 static void program_timing_sync(
 		struct dc *dc,
 		struct dc_state *ctx)
Signature · 6 lines
2.11.0

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