aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch')
-rw-r--r--meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch b/meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch
new file mode 100644
index 00000000..5004c7f6
--- /dev/null
+++ b/meta-amdfalconx86/recipes-kernel/linux/files/1074-drm-amdgpu-make-the-VMID-owner-always-64bit.patch
@@ -0,0 +1,56 @@
+From 6660641e1b3c7161aba6e1b63407f9333746db6e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 4 May 2016 10:20:01 +0200
+Subject: [PATCH 1074/1110] drm/amdgpu: make the VMID owner always 64bit
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise we could (in theory) run into problems on 32bit systems.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 98bb206..0b6ef3d 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -897,7 +897,7 @@ struct amdgpu_vm_id {
+ struct amdgpu_sync active;
+ struct fence *last_flush;
+ struct amdgpu_ring *last_user;
+- atomic_long_t owner;
++ atomic64_t owner;
+
+ uint64_t pd_gpu_addr;
+ /* last flushed PD/PT update */
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index fd691d0..b6df43d 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -192,7 +192,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
+ if (!id)
+ continue;
+
+- if (atomic_long_read(&id->owner) != vm->client_id)
++ if (atomic64_read(&id->owner) != vm->client_id)
+ continue;
+
+ if (pd_addr != id->pd_gpu_addr)
+@@ -268,7 +268,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
+
+ list_move_tail(&id->list, &adev->vm_manager.ids_lru);
+ id->last_user = ring;
+- atomic_long_set(&id->owner, vm->client_id);
++ atomic64_set(&id->owner, vm->client_id);
+ vm->ids[ring->idx] = id;
+
+ *vm_id = id - adev->vm_manager.ids;
+--
+2.7.4
+