aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
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
parentb617f059ad45517bded1f2d8c8e3a52b60e80bd7 (diff)
downloadexternal-libdrm-f3091bac21a963f1a3d8ce5db85c0f2b4acbeb49.tar.gz
external-libdrm-f3091bac21a963f1a3d8ce5db85c0f2b4acbeb49.tar.xz
external-libdrm-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')
-rw-r--r--amdgpu/amdgpu.h4
-rw-r--r--amdgpu/amdgpu_vm.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index 597fc2ba..df85a24c 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1496,7 +1496,7 @@ void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info,
1496 * 1496 *
1497 * \return 0 on success otherwise POSIX Error code 1497 * \return 0 on success otherwise POSIX Error code
1498*/ 1498*/
1499int amdgpu_vm_reserve_vmid(amdgpu_context_handle context, uint32_t flags); 1499int amdgpu_vm_reserve_vmid(amdgpu_device_handle dev, uint32_t flags);
1500 1500
1501/** 1501/**
1502 * Free reserved VMID 1502 * Free reserved VMID
@@ -1505,7 +1505,7 @@ int amdgpu_vm_reserve_vmid(amdgpu_context_handle context, uint32_t flags);
1505 * 1505 *
1506 * \return 0 on success otherwise POSIX Error code 1506 * \return 0 on success otherwise POSIX Error code
1507*/ 1507*/
1508int amdgpu_vm_unreserve_vmid(amdgpu_context_handle context, uint32_t flags); 1508int amdgpu_vm_unreserve_vmid(amdgpu_device_handle dev, uint32_t flags);
1509 1509
1510#ifdef __cplusplus 1510#ifdef __cplusplus
1511} 1511}
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}