videobuf-msm-mem.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * helper functions for physically contiguous PMEM capture buffers
  13. */
  14. #ifndef _VIDEOBUF_PMEM_CONTIG_H
  15. #define _VIDEOBUF_PMEM_CONTIG_H
  16. #include <media/videobuf-core.h>
  17. struct videobuf_contig_pmem {
  18. u32 magic;
  19. void *vaddr;
  20. int phyaddr;
  21. unsigned long size;
  22. int is_userptr;
  23. uint32_t y_off;
  24. uint32_t cbcr_off;
  25. int buffer_type;
  26. struct file *file;
  27. };
  28. void videobuf_queue_pmem_contig_init(struct videobuf_queue *q,
  29. const struct videobuf_queue_ops *ops,
  30. struct device *dev,
  31. spinlock_t *irqlock,
  32. enum v4l2_buf_type type,
  33. enum v4l2_field field,
  34. unsigned int msize,
  35. void *priv,
  36. struct mutex *ext_lock);
  37. int videobuf_to_pmem_contig(struct videobuf_buffer *buf);
  38. int videobuf_pmem_contig_free(struct videobuf_queue *q,
  39. struct videobuf_buffer *buf);
  40. #endif /* _VIDEOBUF_PMEM_CONTIG_H */