diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-23 14:45:52 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 16:28:33 +1000 |
commit | 5f7d42ece30104dd05307f0a004c9d45895582fb (patch) | |
tree | 1f651c70323c6a578ec1b9ee6b5580e7e1c60ad5 /drivers/gpu/drm/nouveau | |
parent | 34e9d85a1aae28b090ec4e72a0f98a5483c198c4 (diff) | |
download | kernel_samsung_smdk4412-5f7d42ece30104dd05307f0a004c9d45895582fb.zip kernel_samsung_smdk4412-5f7d42ece30104dd05307f0a004c9d45895582fb.tar.gz kernel_samsung_smdk4412-5f7d42ece30104dd05307f0a004c9d45895582fb.tar.bz2 |
drm/nouveau: add debugfs file to forcibly evict everything from vram
Very useful for debugging buffer migration issues.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-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 7933de4..8e15923 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) return 0; } +static int +nouveau_debugfs_evict_vram(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 ret; + + ret = ttm_bo_evict_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); + if (ret) + seq_printf(m, "failed: %d", ret); + else + seq_printf(m, "succeeded\n"); + return 0; +} + static struct drm_info_list nouveau_debugfs_list[] = { + { "evict_vram", nouveau_debugfs_evict_vram, 0, NULL }, { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, { "memory", nouveau_debugfs_memory_info, 0, NULL }, { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, |