Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185533
b: refs/heads/master
c: 4a9bef3
h: refs/heads/master
i:
  185531: 6adec6e
v: v3
  • Loading branch information
Jesse Barnes authored and Eric Anholt committed Feb 22, 2010
1 parent cef1a2c commit fc38d19
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5e50c3f56ee4aa0d0168eab5ece413ac5df76aa
refs/heads/master: 4a9bef37e5cf2c73b61ecc9ead52cad2eb4a372b
21 changes: 21 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,26 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
return 0;
}

static int i915_sr_status(struct seq_file *m, void *unused)
{
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;
bool sr_enabled = false;

if (IS_I965G(dev) || IS_I945G(dev) || IS_I945GM(dev))
sr_enabled = I915_READ(FW_BLC_SELF) & FW_BLC_SELF_EN;
else if (IS_I915GM(dev))
sr_enabled = I915_READ(INSTPM) & INSTPM_SELF_EN;
else if (IS_PINEVIEW(dev))
sr_enabled = I915_READ(DSPFW3) & PINEVIEW_SELF_REFRESH_EN;

seq_printf(m, "self-refresh: %s\n", sr_enabled ? "enabled" :
"disabled");

return 0;
}

static int
i915_wedged_open(struct inode *inode,
struct file *filp)
Expand Down Expand Up @@ -648,6 +668,7 @@ static struct drm_info_list i915_debugfs_list[] = {
{"i915_inttoext_table", i915_inttoext_table, 0},
{"i915_drpc_info", i915_drpc_info, 0},
{"i915_fbc_status", i915_fbc_status, 0},
{"i915_sr_status", i915_sr_status, 0},
};
#define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list)

Expand Down

0 comments on commit fc38d19

Please sign in to comment.