1 /*
2 // Copyright (c) 2014 Intel Corporation 
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 #ifndef WSBM_WRAPPER_H
17 #define WSBM_WRAPPER_H
18 
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22 
23 extern int psbWsbmInitialize(int drmFD);
24 extern void psbWsbmTakedown();
25 extern int psbWsbmAllocateFromUB(uint32_t size, uint32_t align, void ** buf, void *user_pt);
26 extern int psbWsbmAllocateTTMBuffer(uint32_t size, uint32_t align,void ** buf);
27 extern int psbWsbmDestroyTTMBuffer(void * buf);
28 extern void * psbWsbmGetCPUAddress(void * buf);
29 extern uint32_t psbWsbmGetGttOffset(void * buf);
30 extern int psbWsbmWrapTTMBuffer(uint64_t handle, void **buf);
31 extern int psbWsbmWrapTTMBuffer2(uint64_t handle, void **buf);
32 extern int psbWsbmCreateFromUB(void *buf, uint32_t size, void *vaddr);
33 extern int psbWsbmUnReference(void *buf);
34 extern int psbWsbmWaitIdle(void *buf);
35 uint32_t psbWsbmGetKBufHandle(void *buf);
36 
37 #if defined(__cplusplus)
38 }
39 #endif
40 
41 #endif /*WSBM_WRAPPER_H*/
42