From 73db8ff9b358f36cd4b34881d3688d931ed85449 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 10 May 2016 16:35:28 -0400 Subject: [PATCH] drm/radeon: add debugging output for bug 95206 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/atombios_dp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index afa9db1..0b50cf3 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -315,6 +315,10 @@ int radeon_dp_get_dp_link_config(struct drm_connector *connector, unsigned max_lane_num = drm_dp_max_lane_count(dpcd); unsigned lane_num, i, max_pix_clock; + + DRM_INFO("pix_clock %u, max_link_rate %u, max_lane_num %u\n", + pix_clock, max_link_rate, max_lane_num); + if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) == ENCODER_OBJECT_ID_NUTMEG) { for (lane_num = 1; lane_num <= max_lane_num; lane_num <<= 1) { @@ -332,12 +336,14 @@ int radeon_dp_get_dp_link_config(struct drm_connector *connector, if (max_pix_clock >= pix_clock) { *dp_lanes = lane_num; *dp_rate = link_rates[i]; + DRM_INFO("selected %u lanes %u rate\n", *dp_lanes, *dp_rate); return 0; } } } } + DRM_INFO("radeon_dp_get_dp_link_config failed\n"); return -EINVAL; } @@ -492,12 +498,17 @@ int radeon_dp_mode_valid_helper(struct drm_connector *connector, return MODE_CLOCK_HIGH; dig_connector = radeon_connector->con_priv; + DRM_INFO("radeon_dp_mode_valid_helper: %ux%u %u\n", + mode->hdisplay, mode->vdisplay, mode->clock); + ret = radeon_dp_get_dp_link_config(connector, dig_connector->dpcd, mode->clock, &dp_lanes, &dp_clock); - if (ret) + if (ret) { + DRM_INFO("radeon_dp_get_dp_link_config %d\n", ret); return MODE_CLOCK_HIGH; + } if ((dp_clock == 540000) && (!radeon_connector_is_dp12_capable(connector))) -- 2.5.5