Commit 3138872c authored by Chris Wilson's avatar Chris Wilson

drm/i915: Show FBC worker status in debugfs

Include the pending update from the FBC worker in i915_fbc_status.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171220205848.8510-1-chris@chris-wilson.co.ukReviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
parent 20bdc112
...@@ -1581,18 +1581,23 @@ static int i915_frontbuffer_tracking(struct seq_file *m, void *unused) ...@@ -1581,18 +1581,23 @@ static int i915_frontbuffer_tracking(struct seq_file *m, void *unused)
static int i915_fbc_status(struct seq_file *m, void *unused) static int i915_fbc_status(struct seq_file *m, void *unused)
{ {
struct drm_i915_private *dev_priv = node_to_i915(m->private); struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct intel_fbc *fbc = &dev_priv->fbc;
if (!HAS_FBC(dev_priv)) if (!HAS_FBC(dev_priv))
return -ENODEV; return -ENODEV;
intel_runtime_pm_get(dev_priv); intel_runtime_pm_get(dev_priv);
mutex_lock(&dev_priv->fbc.lock); mutex_lock(&fbc->lock);
if (intel_fbc_is_active(dev_priv)) if (intel_fbc_is_active(dev_priv))
seq_puts(m, "FBC enabled\n"); seq_puts(m, "FBC enabled\n");
else else
seq_printf(m, "FBC disabled: %s\n", seq_printf(m, "FBC disabled: %s\n", fbc->no_fbc_reason);
dev_priv->fbc.no_fbc_reason);
if (fbc->work.scheduled)
seq_printf(m, "FBC worker scheduled on vblank %u, now %llu\n",
fbc->work.scheduled_vblank,
drm_crtc_vblank_count(&fbc->crtc->base));
if (intel_fbc_is_active(dev_priv)) { if (intel_fbc_is_active(dev_priv)) {
u32 mask; u32 mask;
...@@ -1612,7 +1617,7 @@ static int i915_fbc_status(struct seq_file *m, void *unused) ...@@ -1612,7 +1617,7 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
seq_printf(m, "Compressing: %s\n", yesno(mask)); seq_printf(m, "Compressing: %s\n", yesno(mask));
} }
mutex_unlock(&dev_priv->fbc.lock); mutex_unlock(&fbc->lock);
intel_runtime_pm_put(dev_priv); intel_runtime_pm_put(dev_priv);
return 0; return 0;
......
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