imx-vdoa.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef IMX_VDOA_H
  14. #define IMX_VDOA_H
  15. struct vdoa_data;
  16. struct vdoa_ctx;
  17. #if (defined CONFIG_VIDEO_IMX_VDOA || defined CONFIG_VIDEO_IMX_VDOA_MODULE)
  18. struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa);
  19. int vdoa_context_configure(struct vdoa_ctx *ctx,
  20. unsigned int width, unsigned int height,
  21. u32 pixelformat);
  22. void vdoa_context_destroy(struct vdoa_ctx *ctx);
  23. void vdoa_device_run(struct vdoa_ctx *ctx, dma_addr_t dst, dma_addr_t src);
  24. int vdoa_wait_for_completion(struct vdoa_ctx *ctx);
  25. #else
  26. static inline struct vdoa_ctx *vdoa_context_create(struct vdoa_data *vdoa)
  27. {
  28. return NULL;
  29. }
  30. static inline int vdoa_context_configure(struct vdoa_ctx *ctx,
  31. unsigned int width,
  32. unsigned int height,
  33. u32 pixelformat)
  34. {
  35. return 0;
  36. }
  37. static inline void vdoa_context_destroy(struct vdoa_ctx *ctx) { };
  38. static inline void vdoa_device_run(struct vdoa_ctx *ctx,
  39. dma_addr_t dst, dma_addr_t src) { };
  40. static inline int vdoa_wait_for_completion(struct vdoa_ctx *ctx)
  41. {
  42. return 0;
  43. };
  44. #endif
  45. #endif /* IMX_VDOA_H */