aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch')
-rw-r--r--common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch117
1 files changed, 0 insertions, 117 deletions
diff --git a/common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch b/common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch
deleted file mode 100644
index 1ef8fae6..00000000
--- a/common/recipes-kernel/linux/files/0484-drm-amdgpu-use-the-ring-name-for-debugfs.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 0e8b3339a04808bff246f83eebd3dfb7ab3204d0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
-Date: Wed, 13 Apr 2016 11:34:44 +0200
-Subject: [PATCH 0484/1110] drm/amdgpu: use the ring name for debugfs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Instead of hard coding just another name in the ring code.
-
-Signed-off-by: Christian K├Ânig <christian.koenig@amd.com>
-Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 49 ++++++++++++--------------------
- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +-
- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +-
- 3 files changed, 20 insertions(+), 33 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
-index a91eca4..0fd143d 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
-@@ -413,46 +413,33 @@ static int amdgpu_debugfs_ring_info(struct seq_file *m, void *data)
- return 0;
- }
-
--/* TODO: clean this up !*/
--static int amdgpu_gfx_index = offsetof(struct amdgpu_device, gfx.gfx_ring[0]);
--static int cayman_cp1_index = offsetof(struct amdgpu_device, gfx.compute_ring[0]);
--static int cayman_cp2_index = offsetof(struct amdgpu_device, gfx.compute_ring[1]);
--static int amdgpu_dma1_index = offsetof(struct amdgpu_device, sdma.instance[0].ring);
--static int amdgpu_dma2_index = offsetof(struct amdgpu_device, sdma.instance[1].ring);
--static int r600_uvd_index = offsetof(struct amdgpu_device, uvd.ring);
--static int si_vce1_index = offsetof(struct amdgpu_device, vce.ring[0]);
--static int si_vce2_index = offsetof(struct amdgpu_device, vce.ring[1]);
--
--static const struct drm_info_list amdgpu_debugfs_ring_info_list[] = {
-- {"amdgpu_ring_gfx", amdgpu_debugfs_ring_info, 0, &amdgpu_gfx_index},
-- {"amdgpu_ring_cp1", amdgpu_debugfs_ring_info, 0, &cayman_cp1_index},
-- {"amdgpu_ring_cp2", amdgpu_debugfs_ring_info, 0, &cayman_cp2_index},
-- {"amdgpu_ring_dma1", amdgpu_debugfs_ring_info, 0, &amdgpu_dma1_index},
-- {"amdgpu_ring_dma2", amdgpu_debugfs_ring_info, 0, &amdgpu_dma2_index},
-- {"amdgpu_ring_uvd", amdgpu_debugfs_ring_info, 0, &r600_uvd_index},
-- {"amdgpu_ring_vce1", amdgpu_debugfs_ring_info, 0, &si_vce1_index},
-- {"amdgpu_ring_vce2", amdgpu_debugfs_ring_info, 0, &si_vce2_index},
--};
-+static struct drm_info_list amdgpu_debugfs_ring_info_list[AMDGPU_MAX_RINGS];
-+static char amdgpu_debugs_ring_names[AMDGPU_MAX_RINGS][32];
-
- #endif
-
--static int amdgpu_debugfs_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring)
-+static int amdgpu_debugfs_ring_init(struct amdgpu_device *adev,
-+ struct amdgpu_ring *ring)
- {
- #if defined(CONFIG_DEBUG_FS)
-+ unsigned offset = (uint8_t*)ring - (uint8_t*)adev;
- unsigned i;
-- for (i = 0; i < ARRAY_SIZE(amdgpu_debugfs_ring_info_list); ++i) {
-- const struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i];
-- int roffset = *(int*)amdgpu_debugfs_ring_info_list[i].data;
-- struct amdgpu_ring *other = (void *)(((uint8_t*)adev) + roffset);
-- unsigned r;
-
-- if (other != ring)
-+ for (i = 0; i < ARRAY_SIZE(amdgpu_debugfs_ring_info_list); ++i) {
-+ struct drm_info_list *info = &amdgpu_debugfs_ring_info_list[i];
-+ char *name = amdgpu_debugs_ring_names[i];
-+
-+ if (!info->data) {
-+ sprintf(name, "amdgpu_ring_%s", ring->name);
-+ info->name = name;
-+ info->show = amdgpu_debugfs_ring_info;
-+ info->driver_features = 0;
-+ info->data = (void*)(uintptr_t)offset;
-+ } else if (info->data != (void*)(uintptr_t)offset)
- continue;
-
-- r = amdgpu_debugfs_add_files(adev, info, 1);
-- if (r)
-- return r;
-+ return amdgpu_debugfs_add_files(adev, info, 1);
- }
- #endif
-- return 0;
-+ return -ENOSPC;
- }
-diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
-index 35d2d4a..19b07a8 100644
---- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
-+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
-@@ -4438,7 +4438,7 @@ static int gfx_v7_0_sw_init(void *handle)
- ring->me = 1; /* first MEC */
- ring->pipe = i / 8;
- ring->queue = i % 8;
-- sprintf(ring->name, "comp %d.%d.%d", ring->me, ring->pipe, ring->queue);
-+ sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
- irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
- /* type-2 packets are deprecated on MEC, use type-3 instead */
- r = amdgpu_ring_init(adev, ring, 1024,
-diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
-index d31fd9f..6419aee 100644
---- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
-+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
-@@ -1594,7 +1594,7 @@ static int gfx_v8_0_sw_init(void *handle)
- ring->me = 1; /* first MEC */
- ring->pipe = i / 8;
- ring->queue = i % 8;
-- sprintf(ring->name, "comp %d.%d.%d", ring->me, ring->pipe, ring->queue);
-+ sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
- irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
- /* type-2 packets are deprecated on MEC, use type-3 instead */
- r = amdgpu_ring_init(adev, ring, 1024,
---
-2.7.4
-