aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_fence.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fence.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index a77b1c13ea43..913787085dfa 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -819,15 +819,35 @@ static int radeon_debugfs_fence_info(struct seq_file *m, void *data)
819 return 0; 819 return 0;
820} 820}
821 821
822/**
823 * radeon_debugfs_gpu_reset - manually trigger a gpu reset
824 *
825 * Manually trigger a gpu reset at the next fence wait.
826 */
827static int radeon_debugfs_gpu_reset(struct seq_file *m, void *data)
828{
829 struct drm_info_node *node = (struct drm_info_node *) m->private;
830 struct drm_device *dev = node->minor->dev;
831 struct radeon_device *rdev = dev->dev_private;
832
833 down_read(&rdev->exclusive_lock);
834 seq_printf(m, "%d\n", rdev->needs_reset);
835 rdev->needs_reset = true;
836 up_read(&rdev->exclusive_lock);
837
838 return 0;
839}
840
822static struct drm_info_list radeon_debugfs_fence_list[] = { 841static struct drm_info_list radeon_debugfs_fence_list[] = {
823 {"radeon_fence_info", &radeon_debugfs_fence_info, 0, NULL}, 842 {"radeon_fence_info", &radeon_debugfs_fence_info, 0, NULL},
843 {"radeon_gpu_reset", &radeon_debugfs_gpu_reset, 0, NULL}
824}; 844};
825#endif 845#endif
826 846
827int radeon_debugfs_fence_init(struct radeon_device *rdev) 847int radeon_debugfs_fence_init(struct radeon_device *rdev)
828{ 848{
829#if defined(CONFIG_DEBUG_FS) 849#if defined(CONFIG_DEBUG_FS)
830 return radeon_debugfs_add_files(rdev, radeon_debugfs_fence_list, 1); 850 return radeon_debugfs_add_files(rdev, radeon_debugfs_fence_list, 2);
831#else 851#else
832 return 0; 852 return 0;
833#endif 853#endif