From bbab4f817e65657e491d991aaa05632bdc72bb96 Mon Sep 17 00:00:00 2001 From: "Leo (Sunpeng) Li" Date: Tue, 17 Jul 2018 17:05:17 -0400 Subject: [PATCH] drm/amd/display: Debug prints for BUG_ON in atomic check Change-Id: Ie6bcdade94c85a07acced7645fd30a3e4ae86d5f Signed-off-by: Leo (Sunpeng) Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 952691c..3471518 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4896,6 +4896,40 @@ static int dm_update_crtcs_state(struct amdgpu_display_manager *dm, if (!(enable && aconnector && new_crtc_state->enable && new_crtc_state->active)) continue; + + printk("Old stream: %d new stream %d\n", + dm_old_crtc_state->stream != NULL, + dm_new_crtc_state->stream != NULL); + printk("Stream unchanged? %d, scaling unchanged? %d\n", + dc_is_stream_unchanged(new_stream, dm_old_crtc_state->stream), + dc_is_stream_scaling_unchanged(new_stream, dm_old_crtc_state->stream)); + printk("CRTC %d aconnector->dc_sink %d ->mst_port %d\n", + crtc->base.id, aconnector->dc_sink != NULL, + aconnector->mst_port != NULL); + printk("Freesync old %d new %d\n", + dm_old_crtc_state->freesync_enabled, + dm_new_crtc_state->freesync_enabled); + printk("Old crtc id:%d: enable:%d, active:%d, " + "planes_changed:%d, mode_changed:%d, active_changed:%d, " + "connectors_changed:%d\n", + acrtc->crtc_id, + old_crtc_state->enable, + old_crtc_state->active, + old_crtc_state->planes_changed, + old_crtc_state->mode_changed, + old_crtc_state->active_changed, + old_crtc_state->connectors_changed); + printk("New crtc id:%d: enable:%d, active:%d, " + "planes_changed:%d, mode_changed:%d, active_changed:%d, " + "connectors_changed:%d\n", + acrtc->crtc_id, + new_crtc_state->enable, + new_crtc_state->active, + new_crtc_state->planes_changed, + new_crtc_state->mode_changed, + new_crtc_state->active_changed, + new_crtc_state->connectors_changed); + /* * Given above conditions, the dc state cannot be NULL because: * 1. We're in the process of enabling CRTCs (just been added -- 2.7.4