aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs2010-02-23 11:39:02 +1000
committerBen Skeggs2010-02-25 15:09:15 +1000
commitb42861f40f5ea3261d9fa1d5533496bf1fc812cf (patch)
tree10d6b839a208f61961c9dc69506944d0829bbc9d
parente32b2c883bfe9b57c660b5db31a62cea96c0c046 (diff)
drm/nouveau: allow retrieval of vbios image from debugfs
It's very useful to be able to access this without additional tools for debugging purposes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_debugfs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
index 89e36ee057c8..ac6af471649b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c
+++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c
@@ -144,9 +144,22 @@ nouveau_debugfs_memory_info(struct seq_file *m, void *data)
return 0;
}
+static int
+nouveau_debugfs_vbios_image(struct seq_file *m, void *data)
+{
+ struct drm_info_node *node = (struct drm_info_node *) m->private;
+ struct drm_nouveau_private *dev_priv = node->minor->dev->dev_private;
+ int i;
+
+ for (i = 0; i < dev_priv->VBIOS.length; i++)
+ seq_printf(m, "%c", dev_priv->VBIOS.data[i]);
+ return 0;
+}
+
static struct drm_info_list nouveau_debugfs_list[] = {
{ "chipset", nouveau_debugfs_chipset_info, 0, NULL },
{ "memory", nouveau_debugfs_memory_info, 0, NULL },
+ { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL },
};
#define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list)