WsbmWrapper.h revision 5094bbf4cbe9b244d79ce5ec52a9285978fff311
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)
20extern "C" {
21#endif
22
23extern int psbWsbmInitialize(int drmFD);
24extern void psbWsbmTakedown();
25extern int psbWsbmAllocateFromUB(uint32_t size, uint32_t align, void ** buf, void *user_pt);
26extern int psbWsbmAllocateTTMBuffer(uint32_t size, uint32_t align,void ** buf);
27extern int psbWsbmDestroyTTMBuffer(void * buf);
28extern void * psbWsbmGetCPUAddress(void * buf);
29extern uint32_t psbWsbmGetGttOffset(void * buf);
30extern int psbWsbmWrapTTMBuffer(uint32_t handle, void **buf);
31extern int psbWsbmWrapTTMBuffer2(uint32_t handle, void **buf);
32extern int psbWsbmCreateFromUB(void *buf, uint32_t size, void *vaddr);
33extern int psbWsbmUnReference(void *buf);
34extern int psbWsbmWaitIdle(void *buf);
35uint32_t psbWsbmGetKBufHandle(void *buf);
36
37#if defined(__cplusplus)
38}
39#endif
40
41#endif /*WSBM_WRAPPER_H*/
42