1/* 2 * Broadcom BM2835 V4L2 driver 3 * 4 * Copyright © 2013 Raspberry Pi (Trading) Ltd. 5 * 6 * This file is subject to the terms and conditions of the GNU General Public 7 * License. See the file COPYING in the main directory of this archive 8 * for more details. 9 * 10 * Authors: Vincent Sanders <vincent.sanders@collabora.co.uk> 11 * Dave Stevenson <dsteve@broadcom.com> 12 * Simon Mellor <simellor@broadcom.com> 13 * Luke Diamand <luked@broadcom.com> 14 * 15 * MMAL structures 16 * 17 */ 18 19#define MMAL_FOURCC(a, b, c, d) ((a) | (b << 8) | (c << 16) | (d << 24)) 20#define MMAL_MAGIC MMAL_FOURCC('m', 'm', 'a', 'l') 21 22/** Special value signalling that time is not known */ 23#define MMAL_TIME_UNKNOWN (1LL<<63) 24 25/* mapping between v4l and mmal video modes */ 26struct mmal_fmt { 27 char *name; 28 u32 fourcc; /* v4l2 format id */ 29 int flags; /* v4l2 flags field */ 30 u32 mmal; 31 int depth; 32 u32 mmal_component; /* MMAL component index to be used to encode */ 33 u32 ybbp; /* depth of first Y plane for planar formats */ 34}; 35 36/* buffer for one video frame */ 37struct mmal_buffer { 38 /* v4l buffer data -- must be first */ 39 struct vb2_v4l2_buffer vb; 40 41 /* list of buffers available */ 42 struct list_head list; 43 44 void *buffer; /* buffer pointer */ 45 unsigned long buffer_size; /* size of allocated buffer */ 46}; 47 48/* */ 49struct mmal_colourfx { 50 s32 enable; 51 u32 u; 52 u32 v; 53}; 54