diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_debugfs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 7933de4aff2e..8e1592368cce 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c | |||
@@ -157,7 +157,23 @@ nouveau_debugfs_vbios_image(struct seq_file *m, void *data) | |||
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | 159 | ||
160 | static int | ||
161 | nouveau_debugfs_evict_vram(struct seq_file *m, void *data) | ||
162 | { | ||
163 | struct drm_info_node *node = (struct drm_info_node *) m->private; | ||
164 | struct drm_nouveau_private *dev_priv = node->minor->dev->dev_private; | ||
165 | int ret; | ||
166 | |||
167 | ret = ttm_bo_evict_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); | ||
168 | if (ret) | ||
169 | seq_printf(m, "failed: %d", ret); | ||
170 | else | ||
171 | seq_printf(m, "succeeded\n"); | ||
172 | return 0; | ||
173 | } | ||
174 | |||
160 | static struct drm_info_list nouveau_debugfs_list[] = { | 175 | static struct drm_info_list nouveau_debugfs_list[] = { |
176 | { "evict_vram", nouveau_debugfs_evict_vram, 0, NULL }, | ||
161 | { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, | 177 | { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, |
162 | { "memory", nouveau_debugfs_memory_info, 0, NULL }, | 178 | { "memory", nouveau_debugfs_memory_info, 0, NULL }, |
163 | { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, | 179 | { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, |