Commit 3ff11a0a authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use drm_modeset_lock_all() in debugfs display info

Make out life easier by just grabbing all modeset locks around
the display_info dump.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-7-ville.syrjala@linux.intel.comReviewed-by: default avatarRamalingam C <ramalingam.c@intel.com>
parent 5244221e
...@@ -2667,23 +2667,22 @@ static int i915_display_info(struct seq_file *m, void *unused) ...@@ -2667,23 +2667,22 @@ static int i915_display_info(struct seq_file *m, void *unused)
wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
drm_modeset_lock_all(dev);
seq_printf(m, "CRTC info\n"); seq_printf(m, "CRTC info\n");
seq_printf(m, "---------\n"); seq_printf(m, "---------\n");
for_each_intel_crtc(dev, crtc) { for_each_intel_crtc(dev, crtc)
drm_modeset_lock(&crtc->base.mutex, NULL);
intel_crtc_info(m, crtc); intel_crtc_info(m, crtc);
drm_modeset_unlock(&crtc->base.mutex);
}
seq_printf(m, "\n"); seq_printf(m, "\n");
seq_printf(m, "Connector info\n"); seq_printf(m, "Connector info\n");
seq_printf(m, "--------------\n"); seq_printf(m, "--------------\n");
mutex_lock(&dev->mode_config.mutex);
drm_connector_list_iter_begin(dev, &conn_iter); drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) drm_for_each_connector_iter(connector, &conn_iter)
intel_connector_info(m, connector); intel_connector_info(m, connector);
drm_connector_list_iter_end(&conn_iter); drm_connector_list_iter_end(&conn_iter);
mutex_unlock(&dev->mode_config.mutex);
drm_modeset_unlock_all(dev);
intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref); intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
......
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