diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-11-17 07:30:08 -0500 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-11-17 10:00:35 -0500 |
commit | f698233258587b1ff7521c3c16b423376be5422d (patch) | |
tree | 984b3b6705aa413e89bf911253ce4e2eef3d7eec | |
parent | 95a2e2be952c3c3a643b8e0504f2ceef15294d4d (diff) |
drm/i915: Extract intel_link_m_n config printing into a helper
And also only dump DP config for crtcs with DP encoders.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ddcc8057aae1..c4353f8b984b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -12715,6 +12715,16 @@ static void intel_dump_crtc_timings(const struct drm_display_mode *mode) | |||
12715 | mode->crtc_vsync_end, mode->crtc_vtotal, mode->type, mode->flags); | 12715 | mode->crtc_vsync_end, mode->crtc_vtotal, mode->type, mode->flags); |
12716 | } | 12716 | } |
12717 | 12717 | ||
12718 | static inline void | ||
12719 | intel_dump_m_n_config(struct intel_crtc_state *pipe_config, char *id, | ||
12720 | struct intel_link_m_n *m_n) | ||
12721 | { | ||
12722 | DRM_DEBUG_KMS("dp: lanes: %i; %s: gmch_m: %u, gmch_n: %u, link_m: %u, link_n: %u, tu: %u\n", | ||
12723 | pipe_config->lane_count, id, | ||
12724 | m_n->gmch_m, m_n->gmch_n, | ||
12725 | m_n->link_m, m_n->link_n, m_n->tu); | ||
12726 | } | ||
12727 | |||
12718 | static void intel_dump_pipe_config(struct intel_crtc *crtc, | 12728 | static void intel_dump_pipe_config(struct intel_crtc *crtc, |
12719 | struct intel_crtc_state *pipe_config, | 12729 | struct intel_crtc_state *pipe_config, |
12720 | const char *context) | 12730 | const char *context) |
@@ -12739,21 +12749,13 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, | |||
12739 | pipe_config->fdi_m_n.gmch_m, pipe_config->fdi_m_n.gmch_n, | 12749 | pipe_config->fdi_m_n.gmch_m, pipe_config->fdi_m_n.gmch_n, |
12740 | pipe_config->fdi_m_n.link_m, pipe_config->fdi_m_n.link_n, | 12750 | pipe_config->fdi_m_n.link_m, pipe_config->fdi_m_n.link_n, |
12741 | pipe_config->fdi_m_n.tu); | 12751 | pipe_config->fdi_m_n.tu); |
12742 | DRM_DEBUG_KMS("dp: %i, lanes: %i, gmch_m: %u, gmch_n: %u, link_m: %u, link_n: %u, tu: %u\n", | 12752 | |
12743 | intel_crtc_has_dp_encoder(pipe_config), | 12753 | if (intel_crtc_has_dp_encoder(pipe_config)) { |
12744 | pipe_config->lane_count, | 12754 | intel_dump_m_n_config(pipe_config, "m_n", |
12745 | pipe_config->dp_m_n.gmch_m, pipe_config->dp_m_n.gmch_n, | 12755 | &pipe_config->dp_m_n); |
12746 | pipe_config->dp_m_n.link_m, pipe_config->dp_m_n.link_n, | 12756 | intel_dump_m_n_config(pipe_config, "m2_n2", |
12747 | pipe_config->dp_m_n.tu); | 12757 | &pipe_config->dp_m2_n2); |
12748 | 12758 | } | |
12749 | DRM_DEBUG_KMS("dp: %i, lanes: %i, gmch_m2: %u, gmch_n2: %u, link_m2: %u, link_n2: %u, tu2: %u\n", | ||
12750 | intel_crtc_has_dp_encoder(pipe_config), | ||
12751 | pipe_config->lane_count, | ||
12752 | pipe_config->dp_m2_n2.gmch_m, | ||
12753 | pipe_config->dp_m2_n2.gmch_n, | ||
12754 | pipe_config->dp_m2_n2.link_m, | ||
12755 | pipe_config->dp_m2_n2.link_n, | ||
12756 | pipe_config->dp_m2_n2.tu); | ||
12757 | 12759 | ||
12758 | DRM_DEBUG_KMS("audio: %i, infoframes: %i\n", | 12760 | DRM_DEBUG_KMS("audio: %i, infoframes: %i\n", |
12759 | pipe_config->has_audio, | 12761 | pipe_config->has_audio, |