aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch')
-rw-r--r--common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch b/common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch
new file mode 100644
index 00000000..7842efe5
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0234-drm-amdgpu-add-a-debugfs-property-to-trigger-a-GPU-r.patch
@@ -0,0 +1,61 @@
+From c1ba9e8a74d01791e480fcb4bd342ed8837ab73b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 14 Jan 2016 10:25:22 -0500
+Subject: [PATCH 0234/1110] drm/amdgpu: add a debugfs property to trigger a GPU
+ reset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Ported from similar code in radeon.
+
+Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+index 988a32d..08963fc 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+@@ -734,15 +734,33 @@ static int amdgpu_debugfs_fence_info(struct seq_file *m, void *data)
+ return 0;
+ }
+
++/**
++ * amdgpu_debugfs_gpu_reset - manually trigger a gpu reset
++ *
++ * Manually trigger a gpu reset at the next fence wait.
++ */
++static int amdgpu_debugfs_gpu_reset(struct seq_file *m, void *data)
++{
++ struct drm_info_node *node = (struct drm_info_node *) m->private;
++ struct drm_device *dev = node->minor->dev;
++ struct amdgpu_device *adev = dev->dev_private;
++
++ seq_printf(m, "gpu reset\n");
++ amdgpu_gpu_reset(adev);
++
++ return 0;
++}
++
+ static struct drm_info_list amdgpu_debugfs_fence_list[] = {
+ {"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL},
++ {"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL}
+ };
+ #endif
+
+ int amdgpu_debugfs_fence_init(struct amdgpu_device *adev)
+ {
+ #if defined(CONFIG_DEBUG_FS)
+- return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_fence_list, 1);
++ return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_fence_list, 2);
+ #else
+ return 0;
+ #endif
+--
+2.7.4
+