Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright (C) 2016 Pengutronix
0004  */
0005 
0006 #ifndef IMX_VDOA_H
0007 #define IMX_VDOA_H
0008 
0009 struct vdoa_data;
0010 struct vdoa_ctx;
0011 
0012 #if (defined CONFIG_VIDEO_IMX_VDOA || defined CONFIG_VIDEO_IMX_VDOA_MODULE)
0013 
0014 struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa);
0015 int vdoa_context_configure(struct vdoa_ctx *ctx,
0016                unsigned int width, unsigned int height,
0017                u32 pixelformat);
0018 void vdoa_context_destroy(struct vdoa_ctx *ctx);
0019 
0020 void vdoa_device_run(struct vdoa_ctx *ctx, dma_addr_t dst, dma_addr_t src);
0021 int vdoa_wait_for_completion(struct vdoa_ctx *ctx);
0022 
0023 #else
0024 
0025 static inline struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa)
0026 {
0027     return NULL;
0028 }
0029 
0030 static inline int vdoa_context_configure(struct vdoa_ctx *ctx,
0031                      unsigned int width,
0032                      unsigned int height,
0033                      u32 pixelformat)
0034 {
0035     return 0;
0036 }
0037 
0038 static inline void vdoa_context_destroy(struct vdoa_ctx *ctx) { };
0039 
0040 static inline void vdoa_device_run(struct vdoa_ctx *ctx,
0041                    dma_addr_t dst, dma_addr_t src) { };
0042 
0043 static inline int vdoa_wait_for_completion(struct vdoa_ctx *ctx)
0044 {
0045     return 0;
0046 };
0047 
0048 #endif
0049 
0050 #endif /* IMX_VDOA_H */