xref: /openbmc/linux/include/uapi/linux/v4l2-common.h (revision 0b4bc768)
1607ca46eSDavid Howells /*
2607ca46eSDavid Howells  * include/linux/v4l2-common.h
3607ca46eSDavid Howells  *
4607ca46eSDavid Howells  * Common V4L2 and V4L2 subdev definitions.
5607ca46eSDavid Howells  *
6607ca46eSDavid Howells  * Users are advised to #include this file either through videodev2.h
7607ca46eSDavid Howells  * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
8607ca46eSDavid Howells  * to this file directly.
9607ca46eSDavid Howells  *
10607ca46eSDavid Howells  * Copyright (C) 2012 Nokia Corporation
11607ca46eSDavid Howells  * Contact: Sakari Ailus <sakari.ailus@iki.fi>
12607ca46eSDavid Howells  *
13607ca46eSDavid Howells  * This program is free software; you can redistribute it and/or
14607ca46eSDavid Howells  * modify it under the terms of the GNU General Public License
15607ca46eSDavid Howells  * version 2 as published by the Free Software Foundation.
16607ca46eSDavid Howells  *
17607ca46eSDavid Howells  * This program is distributed in the hope that it will be useful, but
18607ca46eSDavid Howells  * WITHOUT ANY WARRANTY; without even the implied warranty of
19607ca46eSDavid Howells  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20607ca46eSDavid Howells  * General Public License for more details.
21607ca46eSDavid Howells  *
22607ca46eSDavid Howells  * You should have received a copy of the GNU General Public License
23607ca46eSDavid Howells  * along with this program; if not, write to the Free Software
24607ca46eSDavid Howells  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25607ca46eSDavid Howells  * 02110-1301 USA
26607ca46eSDavid Howells  *
27607ca46eSDavid Howells  */
28607ca46eSDavid Howells 
29607ca46eSDavid Howells #ifndef __V4L2_COMMON__
30607ca46eSDavid Howells #define __V4L2_COMMON__
31607ca46eSDavid Howells 
32773bcf8cSMauro Carvalho Chehab #include <linux/types.h>
33773bcf8cSMauro Carvalho Chehab 
34607ca46eSDavid Howells /*
35607ca46eSDavid Howells  *
36607ca46eSDavid Howells  * Selection interface definitions
37607ca46eSDavid Howells  *
38607ca46eSDavid Howells  */
39607ca46eSDavid Howells 
40607ca46eSDavid Howells /* Current cropping area */
41607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP		0x0000
42607ca46eSDavid Howells /* Default cropping area */
43607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_DEFAULT	0x0001
44607ca46eSDavid Howells /* Cropping bounds */
45607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_BOUNDS	0x0002
460b4bc768SSakari Ailus /* Native frame size */
470b4bc768SSakari Ailus #define V4L2_SEL_TGT_NATIVE_SIZE	0x0003
48607ca46eSDavid Howells /* Current composing area */
49607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE		0x0100
50607ca46eSDavid Howells /* Default composing area */
51607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_DEFAULT	0x0101
52607ca46eSDavid Howells /* Composing bounds */
53607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_BOUNDS	0x0102
54607ca46eSDavid Howells /* Current composing area plus all padding pixels */
55607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_PADDED	0x0103
56607ca46eSDavid Howells 
57607ca46eSDavid Howells /* Backward compatibility target definitions --- to be removed. */
58607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_ACTIVE	V4L2_SEL_TGT_CROP
59607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_ACTIVE	V4L2_SEL_TGT_COMPOSE
60607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL	V4L2_SEL_TGT_CROP
61607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
62607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS	V4L2_SEL_TGT_CROP_BOUNDS
63607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
64607ca46eSDavid Howells 
65607ca46eSDavid Howells /* Selection flags */
66607ca46eSDavid Howells #define V4L2_SEL_FLAG_GE		(1 << 0)
67607ca46eSDavid Howells #define V4L2_SEL_FLAG_LE		(1 << 1)
68607ca46eSDavid Howells #define V4L2_SEL_FLAG_KEEP_CONFIG	(1 << 2)
69607ca46eSDavid Howells 
70607ca46eSDavid Howells /* Backward compatibility flag definitions --- to be removed. */
71607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_SIZE_GE	V4L2_SEL_FLAG_GE
72607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE	V4L2_SEL_FLAG_LE
73607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
74607ca46eSDavid Howells 
75254a4777SHans Verkuil struct v4l2_edid {
76254a4777SHans Verkuil 	__u32 pad;
77254a4777SHans Verkuil 	__u32 start_block;
78254a4777SHans Verkuil 	__u32 blocks;
79254a4777SHans Verkuil 	__u32 reserved[5];
802dd477dbSHans Verkuil 	__u8  *edid;
81254a4777SHans Verkuil };
82254a4777SHans Verkuil 
83607ca46eSDavid Howells #endif /* __V4L2_COMMON__ */
84