msm_vidc_vb2.h 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _MSM_VIDC_VB2_H_
  6. #define _MSM_VIDC_VB2_H_
  7. #include <media/videobuf2-core.h>
  8. #include <media/videobuf2-v4l2.h>
  9. /* vb2_mem_ops */
  10. void *msm_vb2_get_userptr(struct device *dev, unsigned long vaddr,
  11. unsigned long size, enum dma_data_direction dma_dir);
  12. void msm_vb2_put_userptr(void *buf_priv);
  13. void* msm_vb2_attach_dmabuf(struct device* dev, struct dma_buf* dbuf,
  14. unsigned long size, enum dma_data_direction dma_dir);
  15. void msm_vb2_detach_dmabuf(void* buf_priv);
  16. int msm_vb2_map_dmabuf(void* buf_priv);
  17. void msm_vb2_unmap_dmabuf(void* buf_priv);
  18. /* vb2_ops */
  19. int msm_vidc_queue_setup(struct vb2_queue *q,
  20. unsigned int *num_buffers, unsigned int *num_planes,
  21. unsigned int sizes[], struct device *alloc_devs[]);
  22. int msm_vidc_start_streaming(struct vb2_queue *q, unsigned int count);
  23. void msm_vidc_stop_streaming(struct vb2_queue *q);
  24. void msm_vidc_buf_queue(struct vb2_buffer *vb2);
  25. void msm_vidc_buf_cleanup(struct vb2_buffer *vb);
  26. #endif // _MSM_VIDC_VB2_H_