]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/media/platform/coda/imx-vdoa.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / media / platform / coda / imx-vdoa.h
1 /*
2 * Copyright (C) 2016 Pengutronix
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14 #ifndef IMX_VDOA_H
15 #define IMX_VDOA_H
16
17 struct vdoa_data;
18 struct vdoa_ctx;
19
20 #if (defined CONFIG_VIDEO_IMX_VDOA || defined CONFIG_VIDEO_IMX_VDOA_MODULE)
21
22 struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa);
23 int vdoa_context_configure(struct vdoa_ctx *ctx,
24 unsigned int width, unsigned int height,
25 u32 pixelformat);
26 void vdoa_context_destroy(struct vdoa_ctx *ctx);
27
28 void vdoa_device_run(struct vdoa_ctx *ctx, dma_addr_t dst, dma_addr_t src);
29 int vdoa_wait_for_completion(struct vdoa_ctx *ctx);
30
31 #else
32
33 static inline struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa)
34 {
35 return NULL;
36 }
37
38 static inline int vdoa_context_configure(struct vdoa_ctx *ctx,
39 unsigned int width,
40 unsigned int height,
41 u32 pixelformat)
42 {
43 return 0;
44 }
45
46 static inline void vdoa_context_destroy(struct vdoa_ctx *ctx) { };
47
48 static inline void vdoa_device_run(struct vdoa_ctx *ctx,
49 dma_addr_t dst, dma_addr_t src) { };
50
51 static inline int vdoa_wait_for_completion(struct vdoa_ctx *ctx)
52 {
53 return 0;
54 };
55
56 #endif
57
58 #endif /* IMX_VDOA_H */