Commit 64754233 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Refactor debugfs display info code

Pull the crtc dumping stuff into a nice function so the
loop over the crtcs doesn't look like crap.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-5-ville.syrjala@linux.intel.comReviewed-by: default avatarRamalingam C <ramalingam.c@intel.com>
parent 9de83372
......@@ -2638,25 +2638,11 @@ static void intel_scaler_info(struct seq_file *m, struct intel_crtc *crtc)
}
}
static int i915_display_info(struct seq_file *m, void *unused)
static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
{
struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct drm_device *dev = &dev_priv->drm;
struct intel_crtc *crtc;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
intel_wakeref_t wakeref;
wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
seq_printf(m, "CRTC info\n");
seq_printf(m, "---------\n");
for_each_intel_crtc(dev, crtc) {
const struct intel_crtc_state *crtc_state;
drm_modeset_lock(&crtc->base.mutex, NULL);
crtc_state = to_intel_crtc_state(crtc->base.state);
const struct intel_crtc_state *crtc_state =
to_intel_crtc_state(crtc->base.state);
seq_printf(m, "CRTC %d: pipe: %c, active=%s, (size=%dx%d), dither=%s, bpp=%d\n",
crtc->base.base.id, pipe_name(crtc->pipe),
......@@ -2667,16 +2653,34 @@ static int i915_display_info(struct seq_file *m, void *unused)
if (crtc_state->hw.active) {
struct intel_encoder *encoder;
for_each_encoder_on_crtc(dev, &crtc->base, encoder)
for_each_encoder_on_crtc(&dev_priv->drm, &crtc->base, encoder)
intel_encoder_info(m, crtc, encoder);
intel_scaler_info(m, crtc);
intel_plane_info(m, crtc);
}
seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s \n",
seq_printf(m, "\tunderrun reporting: cpu=%s pch=%s\n",
yesno(!crtc->cpu_fifo_underrun_disabled),
yesno(!crtc->pch_fifo_underrun_disabled));
}
static int i915_display_info(struct seq_file *m, void *unused)
{
struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct drm_device *dev = &dev_priv->drm;
struct intel_crtc *crtc;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
intel_wakeref_t wakeref;
wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
seq_printf(m, "CRTC info\n");
seq_printf(m, "---------\n");
for_each_intel_crtc(dev, crtc) {
drm_modeset_lock(&crtc->base.mutex, NULL);
intel_crtc_info(m, crtc);
drm_modeset_unlock(&crtc->base.mutex);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment