drm/i915: don't report compression when fbc is disabled
authorNagaraju, Vathsala <vathsala.nagaraju@intel.com>
Thu, 22 Sep 2016 08:49:53 +0000 (14:19 +0530)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 26 Sep 2016 19:56:10 +0000 (16:56 -0300)
When i915_fbc_status is read while fbc is disabled,
it reports compressing to be true, which is confusing.
Report compressing only when fbc is enabled.

v2 (from Paulo): commit message capitalization.

Signed-off-by: vathsala nagaraju <vathsala.nagaraju@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1474534193-9527-1-git-send-email-vathsala.nagaraju@intel.com
drivers/gpu/drm/i915/i915_debugfs.c

index 3c6a06df3dc9893dda86db01aa69ad3764967a0f..6dd325145a0ac6818ead08c0535e3fd24578d1df 100644 (file)
@@ -1658,7 +1658,8 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
                seq_printf(m, "FBC disabled: %s\n",
                           dev_priv->fbc.no_fbc_reason);
 
-       if (INTEL_GEN(dev_priv) >= 7)
+       if (intel_fbc_is_active(dev_priv) &&
+           INTEL_GEN(dev_priv) >= 7)
                seq_printf(m, "Compressing: %s\n",
                           yesno(I915_READ(FBC_STATUS2) &
                                 FBC_COMPRESSION_MASK));