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));
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)
/* 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);
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)) {
goto error;
}
- DRM_INFO("KMS initialized.\n");
+ DRM_DEBUG_DRIVER("KMS initialized.\n");
return 0;
error:
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);
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);
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(
}
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)
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
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);
}
* 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,
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) {
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;
}
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;
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)
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",
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) {
/*
* 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;
}
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)
&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;
*/
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;
}
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);
}
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",
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 */
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(
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(
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) {
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);