1e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * include/linux/v4l2-common.h 4607ca46eSDavid Howells * 5607ca46eSDavid Howells * Common V4L2 and V4L2 subdev definitions. 6607ca46eSDavid Howells * 7607ca46eSDavid Howells * Users are advised to #include this file either through videodev2.h 8607ca46eSDavid Howells * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer 9607ca46eSDavid Howells * to this file directly. 10607ca46eSDavid Howells * 11607ca46eSDavid Howells * Copyright (C) 2012 Nokia Corporation 12607ca46eSDavid Howells * Contact: Sakari Ailus <sakari.ailus@iki.fi> 13607ca46eSDavid Howells */ 14607ca46eSDavid Howells 15607ca46eSDavid Howells #ifndef __V4L2_COMMON__ 16607ca46eSDavid Howells #define __V4L2_COMMON__ 17607ca46eSDavid Howells 18773bcf8cSMauro Carvalho Chehab #include <linux/types.h> 19773bcf8cSMauro Carvalho Chehab 20607ca46eSDavid Howells /* 21607ca46eSDavid Howells * 22607ca46eSDavid Howells * Selection interface definitions 23607ca46eSDavid Howells * 24607ca46eSDavid Howells */ 25607ca46eSDavid Howells 26607ca46eSDavid Howells /* Current cropping area */ 27607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP 0x0000 28607ca46eSDavid Howells /* Default cropping area */ 29607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 30607ca46eSDavid Howells /* Cropping bounds */ 31607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 320b4bc768SSakari Ailus /* Native frame size */ 330b4bc768SSakari Ailus #define V4L2_SEL_TGT_NATIVE_SIZE 0x0003 34607ca46eSDavid Howells /* Current composing area */ 35607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE 0x0100 36607ca46eSDavid Howells /* Default composing area */ 37607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 38607ca46eSDavid Howells /* Composing bounds */ 39607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 40607ca46eSDavid Howells /* Current composing area plus all padding pixels */ 41607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 42607ca46eSDavid Howells 43607ca46eSDavid Howells /* Selection flags */ 44607ca46eSDavid Howells #define V4L2_SEL_FLAG_GE (1 << 0) 45607ca46eSDavid Howells #define V4L2_SEL_FLAG_LE (1 << 1) 46607ca46eSDavid Howells #define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2) 47607ca46eSDavid Howells 48254a4777SHans Verkuil struct v4l2_edid { 49254a4777SHans Verkuil __u32 pad; 50254a4777SHans Verkuil __u32 start_block; 51254a4777SHans Verkuil __u32 blocks; 52254a4777SHans Verkuil __u32 reserved[5]; 532dd477dbSHans Verkuil __u8 *edid; 54254a4777SHans Verkuil }; 55254a4777SHans Verkuil 56177bbc67SHans Verkuil #ifndef __KERNEL__ 57177bbc67SHans Verkuil /* Backward compatibility target definitions --- to be removed. */ 58177bbc67SHans Verkuil #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP 59177bbc67SHans Verkuil #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE 60177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP 61177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE 62177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS 63177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS 64177bbc67SHans Verkuil 65177bbc67SHans Verkuil /* Backward compatibility flag definitions --- to be removed. */ 66177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE 67177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE 68177bbc67SHans Verkuil #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG 69177bbc67SHans Verkuil #endif 70177bbc67SHans Verkuil 71607ca46eSDavid Howells #endif /* __V4L2_COMMON__ */ 72