[PATCH] drm/i915/fbc: Add FBC_DEBUG_STATUS register value to debugfs interface

Jouni Högander jouni.hogander at intel.com
Fri Jan 26 12:23:22 UTC 2024


FBC_DEBUG_STATUS register contains some usable information to figure
out why FBC is not compressing. Add that to fbc debugfs interface.

Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 4 ++++
 drivers/gpu/drm/i915/i915_reg.h          | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index f17a1afb4929..a00bcc561e3f 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1896,6 +1896,7 @@ static int intel_fbc_debugfs_status_show(struct seq_file *m, void *unused)
 	struct drm_i915_private *i915 = fbc->i915;
 	struct intel_plane *plane;
 	intel_wakeref_t wakeref;
+	u32 fbc_debug;
 
 	drm_modeset_lock_all(&i915->drm);
 
@@ -1923,6 +1924,9 @@ static int intel_fbc_debugfs_status_show(struct seq_file *m, void *unused)
 			   plane_state->no_fbc_reason ?: "FBC possible");
 	}
 
+	fbc_debug = intel_de_read(fbc->i915, ILK_DPFC_FBC_DEBUG_STATUS(fbc->id));
+	seq_printf(m, "FBC_DEBUG_STATUS = 0x%08x\n", fbc_debug);
+
 	mutex_unlock(&fbc->lock);
 	intel_runtime_pm_put(&i915->runtime_pm, wakeref);
 
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 481242acc129..0a5603a1f44f 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1346,8 +1346,9 @@
 #define   DPFC_INVAL_SEG_MASK			REG_GENMASK(26, 16)
 #define   DPFC_COMP_SEG_MASK			REG_GENMASK(10, 0)
 #define DPFC_STATUS2			_MMIO(0x3214)
-#define ILK_DPFC_STATUS2(fbc_id)	_MMIO_PIPE((fbc_id), 0x43214, 0x43254)
+#define ILK_DPFC_FBC_DEBUG_STATUS(fbc_id)	_MMIO_PIPE((fbc_id), 0x43220, 0x43360)
 #define   DPFC_COMP_SEG_MASK_IVB		REG_GENMASK(11, 0)
+#define ILK_DPFC_STATUS2(fbc_id)       _MMIO_PIPE((fbc_id), 0x43214, 0x43254)
 #define DPFC_FENCE_YOFF			_MMIO(0x3218)
 #define ILK_DPFC_FENCE_YOFF(fbc_id)	_MMIO_PIPE((fbc_id), 0x43218, 0x43258)
 #define DPFC_CHICKEN			_MMIO(0x3224)
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list