[Intel-gfx] Framebuffer compression with 2.6.32-rc

Florian Mickler florian at mickler.org
Thu Oct 15 00:01:59 CEST 2009


On Tue, 13 Oct 2009 11:38:07 -0700
Eric Anholt <eric at anholt.net> wrote:

> On Tue, 2009-10-13 at 14:28 -0400, Matt Turner wrote:
> > On Tue, Oct 13, 2009 at 1:58 PM, Jesse Barnes <jbarnes at virtuousgeek.org> wrote:
> > > On Tue, 13 Oct 2009 19:23:05 +0200
> > > Tino Keitel <tino.keitel+xorg at tikei.de> wrote:
> > >
> > >> Hi folks,
> > >>
> > >> I use Xserver 1.6.4, xorg-intel 2.9.0 and kernel 2.6.32-rc4. How to I
> > >> see if framebuffer compression is enabled or not? Before KMS, I could
> > >> see in in Xorg.0.log.
> > >>
> > >> The hardware is a ThinkPad X61s with i965 graphics.
> > >
> > > You have to do a register dump and check FBC regs or enable DRM
> > > debug output and look for the "fbc enabled" messages.
> > 
> > Do we want it to be _that_ transparent?
> 
> It may very well be that we want to build an intel_gpu_powertop to track
> the runtime status of our power savings efforts, or maybe integrate it
> into upstream powertop.  But yes, this is all debugging stuff that
> should be entirely transparent.
> 

what about smth like this? it is not overly useful, but... 

cheers,
flo

From 823dc6cf318c05019d9fe4ca2bf3c787a382da2f Mon Sep 17 00:00:00 2001
From: Florian Mickler <florian at mickler.org>
Date: Wed, 14 Oct 2009 17:59:03 +0200
Subject: [PATCH] report framebuffer-compression status via debugfs

This patch adds a debugfs-knob (i915_fbc)  to query the fbc-status register.

Signed-off-by: Florian Mickler <florian at mickler.org>
---
 drivers/gpu/drm/i915/i915_debugfs.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

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)
 
-- 
1.6.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20091015/24ad764a/attachment.sig>


More information about the Intel-gfx mailing list