diff options
author | Saurabh Bipin Chandra | 2013-09-02 23:04:10 -0500 |
---|---|---|
committer | Saurabh Bipin Chandra | 2013-09-05 10:43:34 -0500 |
commit | 2cf99e4c810f3fe1eddd1e02469643384002079f (patch) | |
tree | 0b596827382e4c563581d1fd7e906e8238e87308 /libdce.h | |
parent | fde931439600e9be8f4556960230f6b62a474ade (diff) | |
download | hardware-ti-libdce-2cf99e4c810f3fe1eddd1e02469643384002079f.tar.gz hardware-ti-libdce-2cf99e4c810f3fe1eddd1e02469643384002079f.tar.xz hardware-ti-libdce-2cf99e4c810f3fe1eddd1e02469643384002079f.zip |
[LINUX] Expose dce_init and dce_deinit calls to user
This patch changes the declaration of dce_init() and
dce_deinit() to what is expected by Gstreamer for GLP
and exposes it. This involves returning a struct
omap_device pointer as void * during dce_init() and
receiving a struct omap_device during dce_deinit().
The IPC initialization/deinitialization has been
separated out of dce_init()/dce_deinit() into two static
functions dce_ipc_init(), dce_ipc_deinit().
These functions are now included within Engine_open(),
Engine_close() for all OSs.
Change-Id: I86f4778cbd80f0a83aa3c39d8183bb3155a2a391
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Diffstat (limited to 'libdce.h')
-rw-r--r-- | libdce.h | 31 |
1 files changed, 25 insertions, 6 deletions
@@ -38,6 +38,12 @@ | |||
38 | #include <ti/sdo/ce/video3/viddec3.h> | 38 | #include <ti/sdo/ce/video3/viddec3.h> |
39 | #include <ti/sdo/ce/video2/videnc2.h> | 39 | #include <ti/sdo/ce/video2/videnc2.h> |
40 | 40 | ||
41 | #if defined(BUILDOS_LINUX) | ||
42 | /* avoid some messy stuff in xdc/std.h which leads to gcc issues */ | ||
43 | #define xdc__ARGTOPTR | ||
44 | #define xdc__ARGTOFXN | ||
45 | #endif /* BUILDOS_LINUX */ | ||
46 | |||
41 | 47 | ||
42 | /* DCE Error Types */ | 48 | /* DCE Error Types */ |
43 | typedef enum dce_error_status { | 49 | typedef enum dce_error_status { |
@@ -60,11 +66,23 @@ void *dce_alloc(int sz); | |||
60 | void dce_free(void *ptr); | 66 | void dce_free(void *ptr); |
61 | 67 | ||
62 | 68 | ||
63 | #if defined(BUILDOS_LINUX) | 69 | /*********************************** APIs for Linux ***********************************/ |
64 | /* avoid some messy stuff in xdc/std.h which leads to gcc issues */ | 70 | /************************ Initialization/Deinitialization APIs ************************/ |
65 | #define xdc__ARGTOPTR | 71 | /*=====================================================================================*/ |
66 | #define xdc__ARGTOFXN | 72 | /** dce_init : Initialize DCE. Only Linux applications are expected to call. |
73 | * | ||
74 | * @ return : Pointer to omap_device structure. | ||
75 | */ | ||
76 | void *dce_init(void); | ||
77 | |||
78 | /*===============================================================*/ | ||
79 | /** dce_deinit : Deinitialize DCE. Only Linux applications are expected to call. | ||
80 | * | ||
81 | * @ param dev [in] : Pointer to omap_device structure. | ||
82 | */ | ||
83 | void dce_deinit(void *dev); | ||
67 | 84 | ||
85 | /************************ Input/Output Buffer Lock/Unlock APIs ************************/ | ||
68 | /*=====================================================================================*/ | 86 | /*=====================================================================================*/ |
69 | /** dce_buf_lock : Pin or lock Tiler Buffers which would be used by the codec | 87 | /** dce_buf_lock : Pin or lock Tiler Buffers which would be used by the codec |
70 | * as reference buffers. API is specific to GLP. | 88 | * as reference buffers. API is specific to GLP. |
@@ -85,10 +103,11 @@ int dce_buf_lock(int num, size_t *handle); | |||
85 | */ | 103 | */ |
86 | int dce_buf_unlock(int num, size_t *handle); | 104 | int dce_buf_unlock(int num, size_t *handle); |
87 | 105 | ||
88 | void dce_set_fd(int fd); | 106 | /******************************* OMAPDRM Get/Set FD APIs *******************************/ |
89 | int dce_get_fd(); | 107 | int dce_get_fd(); |
90 | 108 | ||
91 | #endif /* BUILDOS_LINUX */ | 109 | void dce_set_fd(int fd); |
110 | |||
92 | 111 | ||
93 | #endif /* __LIBDCE_H__ */ | 112 | #endif /* __LIBDCE_H__ */ |
94 | 113 | ||