aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch')
-rw-r--r--meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch80
1 files changed, 0 insertions, 80 deletions
diff --git a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch b/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch
deleted file mode 100644
index e4e15e21..00000000
--- a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/0878-drm-amd-amdgpu-Add-write-method-to-VRAM-debugfs-entr.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From f203e0f5d119a7ebab00cbf837876cc475830ae6 Mon Sep 17 00:00:00 2001
-From: Tom St Denis <tom.stdenis@amd.com>
-Date: Tue, 29 Aug 2017 08:36:52 -0400
-Subject: [PATCH 0878/4131] drm/amd/amdgpu: Add write() method to VRAM debugfs
- entry (v2)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Allows writing data to vram via debugfs.
-
-Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
-Reviewed-by: Christian König <christian.koenig@amd.com>
-
-(v2): Call get_user before holding spinlock.
-
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 42 ++++++++++++++++++++++++++++++++-
- 1 file changed, 41 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-index d2431cc..bbe7d2b 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-@@ -1914,10 +1914,50 @@ static ssize_t amdgpu_ttm_vram_read(struct file *f, char __user *buf,
- return result;
- }
-
-+static ssize_t amdgpu_ttm_vram_write(struct file *f, const char __user *buf,
-+ size_t size, loff_t *pos)
-+{
-+ struct amdgpu_device *adev = file_inode(f)->i_private;
-+ ssize_t result = 0;
-+ int r;
-+
-+ if (size & 0x3 || *pos & 0x3)
-+ return -EINVAL;
-+
-+ if (*pos >= adev->mc.mc_vram_size)
-+ return -ENXIO;
-+
-+ while (size) {
-+ unsigned long flags;
-+ uint32_t value;
-+
-+ if (*pos >= adev->mc.mc_vram_size)
-+ return result;
-+
-+ r = get_user(value, (uint32_t *)buf);
-+ if (r)
-+ return r;
-+
-+ spin_lock_irqsave(&adev->mmio_idx_lock, flags);
-+ WREG32(mmMM_INDEX, ((uint32_t)*pos) | 0x80000000);
-+ WREG32(mmMM_INDEX_HI, *pos >> 31);
-+ WREG32(mmMM_DATA, value);
-+ spin_unlock_irqrestore(&adev->mmio_idx_lock, flags);
-+
-+ result += 4;
-+ buf += 4;
-+ *pos += 4;
-+ size -= 4;
-+ }
-+
-+ return result;
-+}
-+
- static const struct file_operations amdgpu_ttm_vram_fops = {
- .owner = THIS_MODULE,
- .read = amdgpu_ttm_vram_read,
-- .llseek = default_llseek
-+ .write = amdgpu_ttm_vram_write,
-+ .llseek = default_llseek,
- };
-
- #ifdef CONFIG_DRM_AMDGPU_GART_DEBUGFS
---
-2.7.4
-