diff mbox

Framebuffer compression with 2.6.32-rc

Message ID 20091015000159.45e46e3d@schatten.dmk.lab (mailing list archive)
State Rejected
Headers show

Commit Message

Florian Mickler Oct. 14, 2009, 10:01 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index f8ce9a3..b634512 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -348,6 +348,20 @@  static int i915_ringbuffer_info(struct seq_file *m, void *data)
 	return 0;
 }
 
+static int i915_fbc_info(struct seq_file *m, void *data)
+{
+	struct drm_info_node *node = (struct drm_info_node *) m->private;
+	struct drm_device *dev = node->minor->dev;
+	drm_i915_private_t *dev_priv = dev->dev_private;
+
+	unsigned int enabled = I915_READ(FBC_STATUS) & FBC_STAT_COMPRESSING;
+
+	seq_printf(m, "Framebuffer compression enabled :  %s\n",
+			enabled ? "yes" : "no");
+
+	return 0;
+}
+
 static int i915_error_state(struct seq_file *m, void *unused)
 {
 	struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -427,6 +441,7 @@  static struct drm_info_list i915_debugfs_list[] = {
 	{"i915_ringbuffer_info", i915_ringbuffer_info, 0},
 	{"i915_batchbuffers", i915_batchbuffer_info, 0},
 	{"i915_error_state", i915_error_state, 0},
+	{"i915_fbc", i915_fbc_info, 0},
 };
 #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)