xref: /linux/drivers/media/pci/bt8xx/btcx-risc.h (revision 90ca8bef9082c2036a200dd2cd17924944cd339b)
1*90ca8befSHans Verkuil struct btcx_riscmem {
2*90ca8befSHans Verkuil 	unsigned int   size;
3*90ca8befSHans Verkuil 	__le32         *cpu;
4*90ca8befSHans Verkuil 	__le32         *jmp;
5*90ca8befSHans Verkuil 	dma_addr_t     dma;
6*90ca8befSHans Verkuil };
7*90ca8befSHans Verkuil 
8*90ca8befSHans Verkuil struct btcx_skiplist {
9*90ca8befSHans Verkuil 	int start;
10*90ca8befSHans Verkuil 	int end;
11*90ca8befSHans Verkuil };
12*90ca8befSHans Verkuil 
13*90ca8befSHans Verkuil int  btcx_riscmem_alloc(struct pci_dev *pci,
14*90ca8befSHans Verkuil 			struct btcx_riscmem *risc,
15*90ca8befSHans Verkuil 			unsigned int size);
16*90ca8befSHans Verkuil void btcx_riscmem_free(struct pci_dev *pci,
17*90ca8befSHans Verkuil 		       struct btcx_riscmem *risc);
18*90ca8befSHans Verkuil 
19*90ca8befSHans Verkuil int btcx_screen_clips(int swidth, int sheight, struct v4l2_rect *win,
20*90ca8befSHans Verkuil 		      struct v4l2_clip *clips, unsigned int n);
21*90ca8befSHans Verkuil int btcx_align(struct v4l2_rect *win, struct v4l2_clip *clips,
22*90ca8befSHans Verkuil 	       unsigned int n, int mask);
23*90ca8befSHans Verkuil void btcx_sort_clips(struct v4l2_clip *clips, unsigned int nclips);
24*90ca8befSHans Verkuil void btcx_calc_skips(int line, int width, int *maxy,
25*90ca8befSHans Verkuil 		     struct btcx_skiplist *skips, unsigned int *nskips,
26*90ca8befSHans Verkuil 		     const struct v4l2_clip *clips, unsigned int nclips);
27