18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2016 Pengutronix 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef IMX_VDOA_H 78c2ecf20Sopenharmony_ci#define IMX_VDOA_H 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct vdoa_data; 108c2ecf20Sopenharmony_cistruct vdoa_ctx; 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#if (defined CONFIG_VIDEO_IMX_VDOA || defined CONFIG_VIDEO_IMX_VDOA_MODULE) 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa); 158c2ecf20Sopenharmony_ciint vdoa_context_configure(struct vdoa_ctx *ctx, 168c2ecf20Sopenharmony_ci unsigned int width, unsigned int height, 178c2ecf20Sopenharmony_ci u32 pixelformat); 188c2ecf20Sopenharmony_civoid vdoa_context_destroy(struct vdoa_ctx *ctx); 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_civoid vdoa_device_run(struct vdoa_ctx *ctx, dma_addr_t dst, dma_addr_t src); 218c2ecf20Sopenharmony_ciint vdoa_wait_for_completion(struct vdoa_ctx *ctx); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#else 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistatic inline struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa) 268c2ecf20Sopenharmony_ci{ 278c2ecf20Sopenharmony_ci return NULL; 288c2ecf20Sopenharmony_ci} 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistatic inline int vdoa_context_configure(struct vdoa_ctx *ctx, 318c2ecf20Sopenharmony_ci unsigned int width, 328c2ecf20Sopenharmony_ci unsigned int height, 338c2ecf20Sopenharmony_ci u32 pixelformat) 348c2ecf20Sopenharmony_ci{ 358c2ecf20Sopenharmony_ci return 0; 368c2ecf20Sopenharmony_ci} 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_cistatic inline void vdoa_context_destroy(struct vdoa_ctx *ctx) { }; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cistatic inline void vdoa_device_run(struct vdoa_ctx *ctx, 418c2ecf20Sopenharmony_ci dma_addr_t dst, dma_addr_t src) { }; 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_cistatic inline int vdoa_wait_for_completion(struct vdoa_ctx *ctx) 448c2ecf20Sopenharmony_ci{ 458c2ecf20Sopenharmony_ci return 0; 468c2ecf20Sopenharmony_ci}; 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#endif 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci#endif /* IMX_VDOA_H */ 51