aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Grodzovsky2017-11-02 09:29:55 -0500
committerChristian König2017-11-03 07:07:30 -0500
commitf3091bac21a963f1a3d8ce5db85c0f2b4acbeb49 (patch)
tree7ce9b56720642fe3f92a5f004ad75139dff75f8b /amdgpu/amdgpu_vm.c
parentb617f059ad45517bded1f2d8c8e3a52b60e80bd7 (diff)
downloadexternal-libgbm-f3091bac21a963f1a3d8ce5db85c0f2b4acbeb49.tar.gz
external-libgbm-f3091bac21a963f1a3d8ce5db85c0f2b4acbeb49.tar.xz
external-libgbm-f3091bac21a963f1a3d8ce5db85c0f2b4acbeb49.zip
amdgpu: Fix wrappers for AMDGPU_VM IOCTL.
Rmove amdgpu_context_handle from the interface and use amdgpu_device_handle instead. Uupdate VMID reservation test accordingly. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_vm.c')
-rw-r--r--amdgpu/amdgpu_vm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/amdgpu/amdgpu_vm.c b/amdgpu/amdgpu_vm.c
index 304b423c..5ba7c082 100644
--- a/amdgpu/amdgpu_vm.c
+++ b/amdgpu/amdgpu_vm.c
@@ -30,24 +30,24 @@
30#include "xf86drm.h" 30#include "xf86drm.h"
31#include "amdgpu_internal.h" 31#include "amdgpu_internal.h"
32 32
33int amdgpu_vm_reserve_vmid(amdgpu_context_handle context, uint32_t flags) 33int amdgpu_vm_reserve_vmid(amdgpu_device_handle dev, uint32_t flags)
34{ 34{
35 union drm_amdgpu_vm vm; 35 union drm_amdgpu_vm vm;
36 36
37 vm.in.op = AMDGPU_VM_OP_RESERVE_VMID; 37 vm.in.op = AMDGPU_VM_OP_RESERVE_VMID;
38 vm.in.flags = flags; 38 vm.in.flags = flags;
39 39
40 return drmCommandWriteRead(context->dev->fd, DRM_AMDGPU_VM, 40 return drmCommandWriteRead(dev->fd, DRM_AMDGPU_VM,
41 &vm, sizeof(vm)); 41 &vm, sizeof(vm));
42} 42}
43 43
44int amdgpu_vm_unreserve_vmid(amdgpu_context_handle context, uint32_t flags) 44int amdgpu_vm_unreserve_vmid(amdgpu_device_handle dev, uint32_t flags)
45{ 45{
46 union drm_amdgpu_vm vm; 46 union drm_amdgpu_vm vm;
47 47
48 vm.in.op = AMDGPU_VM_OP_UNRESERVE_VMID; 48 vm.in.op = AMDGPU_VM_OP_UNRESERVE_VMID;
49 vm.in.flags = flags; 49 vm.in.flags = flags;
50 50
51 return drmCommandWriteRead(context->dev->fd, DRM_AMDGPU_VM, 51 return drmCommandWriteRead(dev->fd, DRM_AMDGPU_VM,
52 &vm, sizeof(vm)); 52 &vm, sizeof(vm));
53} 53}