diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-02-22 20:39:02 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-25 00:09:15 -0500 |
commit | b42861f40f5ea3261d9fa1d5533496bf1fc812cf (patch) | |
tree | 10d6b839a208f61961c9dc69506944d0829bbc9d | |
parent | e32b2c883bfe9b57c660b5db31a62cea96c0c046 (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.c | 13 |
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) | |||
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | static int | ||
148 | nouveau_debugfs_vbios_image(struct seq_file *m, void *data) | ||
149 | { | ||
150 | struct drm_info_node *node = (struct drm_info_node *) m->private; | ||
151 | struct drm_nouveau_private *dev_priv = node->minor->dev->dev_private; | ||
152 | int i; | ||
153 | |||
154 | for (i = 0; i < dev_priv->VBIOS.length; i++) | ||
155 | seq_printf(m, "%c", dev_priv->VBIOS.data[i]); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
147 | static struct drm_info_list nouveau_debugfs_list[] = { | 159 | static struct drm_info_list nouveau_debugfs_list[] = { |
148 | { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, | 160 | { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, |
149 | { "memory", nouveau_debugfs_memory_info, 0, NULL }, | 161 | { "memory", nouveau_debugfs_memory_info, 0, NULL }, |
162 | { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, | ||
150 | }; | 163 | }; |
151 | #define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list) | 164 | #define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list) |
152 | 165 | ||