diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-04 04:20:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-11 12:31:18 -0400 |
commit | 0ea54b9b6c4ebc04cc6f68246b03577a25dbd4bb (patch) | |
tree | f9f9f4e15d258cc6ccb72799ff6b2238af6502ca /drivers/gpu/drm/amd | |
parent | 4d9c514d8ccff2b4bd0db5d3e178c0c0b3f3bc77 (diff) |
drm/amdgpu: make the VMID owner always 64bit
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: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 | ||||
-rw-r--r-- | 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 e42b0a357fb8..130c0a7c65d1 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 { | |||
897 | struct amdgpu_sync active; | 897 | struct amdgpu_sync active; |
898 | struct fence *last_flush; | 898 | struct fence *last_flush; |
899 | struct amdgpu_ring *last_user; | 899 | struct amdgpu_ring *last_user; |
900 | atomic_long_t owner; | 900 | atomic64_t owner; |
901 | 901 | ||
902 | uint64_t pd_gpu_addr; | 902 | uint64_t pd_gpu_addr; |
903 | /* last flushed PD/PT update */ | 903 | /* 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 62ce7253e917..cd578987d6c0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -185,7 +185,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, | |||
185 | if (!id) | 185 | if (!id) |
186 | continue; | 186 | continue; |
187 | 187 | ||
188 | if (atomic_long_read(&id->owner) != vm->client_id) | 188 | if (atomic64_read(&id->owner) != vm->client_id) |
189 | continue; | 189 | continue; |
190 | 190 | ||
191 | if (pd_addr != id->pd_gpu_addr) | 191 | if (pd_addr != id->pd_gpu_addr) |
@@ -261,7 +261,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, | |||
261 | 261 | ||
262 | list_move_tail(&id->list, &adev->vm_manager.ids_lru); | 262 | list_move_tail(&id->list, &adev->vm_manager.ids_lru); |
263 | id->last_user = ring; | 263 | id->last_user = ring; |
264 | atomic_long_set(&id->owner, vm->client_id); | 264 | atomic64_set(&id->owner, vm->client_id); |
265 | vm->ids[ring->idx] = id; | 265 | vm->ids[ring->idx] = id; |
266 | 266 | ||
267 | *vm_id = id - adev->vm_manager.ids; | 267 | *vm_id = id - adev->vm_manager.ids; |