Blame view

include/media/videobuf2-dma-contig.h 866 Bytes
1a758d4e8   Pawel Osciak   [media] v4l: vide...
1
  /*
86b090551   Albert Wang   [media] videobuf2...
2
   * videobuf2-dma-contig.h - DMA contig memory allocator for videobuf2
1a758d4e8   Pawel Osciak   [media] v4l: vide...
3
4
5
   *
   * Copyright (C) 2010 Samsung Electronics
   *
950720840   Pawel Osciak   [media] Update Pa...
6
   * Author: Pawel Osciak <pawel@osciak.com>
1a758d4e8   Pawel Osciak   [media] v4l: vide...
7
8
9
10
11
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License as published by
   * the Free Software Foundation.
   */
86b090551   Albert Wang   [media] videobuf2...
12
13
  #ifndef _MEDIA_VIDEOBUF2_DMA_CONTIG_H
  #define _MEDIA_VIDEOBUF2_DMA_CONTIG_H
1a758d4e8   Pawel Osciak   [media] v4l: vide...
14

c139990e8   Junghak Sung   [media] media: vi...
15
  #include <media/videobuf2-v4l2.h>
472af2b05   Pawel Osciak   [media] videobuf2...
16
  #include <linux/dma-mapping.h>
1a758d4e8   Pawel Osciak   [media] v4l: vide...
17

472af2b05   Pawel Osciak   [media] videobuf2...
18
  static inline dma_addr_t
ba7fcb0c9   Marek Szyprowski   [media] media: vb...
19
  vb2_dma_contig_plane_dma_addr(struct vb2_buffer *vb, unsigned int plane_no)
1a758d4e8   Pawel Osciak   [media] v4l: vide...
20
  {
ba7fcb0c9   Marek Szyprowski   [media] media: vb...
21
  	dma_addr_t *addr = vb2_plane_cookie(vb, plane_no);
472af2b05   Pawel Osciak   [media] videobuf2...
22

ba7fcb0c9   Marek Szyprowski   [media] media: vb...
23
  	return *addr;
1a758d4e8   Pawel Osciak   [media] v4l: vide...
24
  }
3f0339691   Marek Szyprowski   media: vb2-dma-co...
25
26
  int vb2_dma_contig_set_max_seg_size(struct device *dev, unsigned int size);
  void vb2_dma_contig_clear_max_seg_size(struct device *dev);
1a758d4e8   Pawel Osciak   [media] v4l: vide...
27
28
29
30
  
  extern const struct vb2_mem_ops vb2_dma_contig_memops;
  
  #endif