imx-vdoa.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2016 Pengutronix
  4. */
  5. #ifndef IMX_VDOA_H
  6. #define IMX_VDOA_H
  7. struct vdoa_data;
  8. struct vdoa_ctx;
  9. #if (defined CONFIG_VIDEO_IMX_VDOA || defined CONFIG_VIDEO_IMX_VDOA_MODULE)
  10. struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa);
  11. int vdoa_context_configure(struct vdoa_ctx *ctx,
  12. unsigned int width, unsigned int height,
  13. u32 pixelformat);
  14. void vdoa_context_destroy(struct vdoa_ctx *ctx);
  15. void vdoa_device_run(struct vdoa_ctx *ctx, dma_addr_t dst, dma_addr_t src);
  16. int vdoa_wait_for_completion(struct vdoa_ctx *ctx);
  17. #else
  18. static inline struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa)
  19. {
  20. return NULL;
  21. }
  22. static inline int vdoa_context_configure(struct vdoa_ctx *ctx,
  23. unsigned int width,
  24. unsigned int height,
  25. u32 pixelformat)
  26. {
  27. return 0;
  28. }
  29. static inline void vdoa_context_destroy(struct vdoa_ctx *ctx) { };
  30. static inline void vdoa_device_run(struct vdoa_ctx *ctx,
  31. dma_addr_t dst, dma_addr_t src) { };
  32. static inline int vdoa_wait_for_completion(struct vdoa_ctx *ctx)
  33. {
  34. return 0;
  35. };
  36. #endif
  37. #endif /* IMX_VDOA_H */