162306a36Sopenharmony_ci/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * include/linux/v4l2-common.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Common V4L2 and V4L2 subdev definitions. 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Users are advised to #include this file either through videodev2.h 862306a36Sopenharmony_ci * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer 962306a36Sopenharmony_ci * to this file directly. 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * Copyright (C) 2012 Nokia Corporation 1262306a36Sopenharmony_ci * Contact: Sakari Ailus <sakari.ailus@iki.fi> 1362306a36Sopenharmony_ci */ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#ifndef __V4L2_COMMON__ 1662306a36Sopenharmony_ci#define __V4L2_COMMON__ 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci#include <linux/types.h> 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/* 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * Selection interface definitions 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/* Current cropping area */ 2762306a36Sopenharmony_ci#define V4L2_SEL_TGT_CROP 0x0000 2862306a36Sopenharmony_ci/* Default cropping area */ 2962306a36Sopenharmony_ci#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 3062306a36Sopenharmony_ci/* Cropping bounds */ 3162306a36Sopenharmony_ci#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 3262306a36Sopenharmony_ci/* Native frame size */ 3362306a36Sopenharmony_ci#define V4L2_SEL_TGT_NATIVE_SIZE 0x0003 3462306a36Sopenharmony_ci/* Current composing area */ 3562306a36Sopenharmony_ci#define V4L2_SEL_TGT_COMPOSE 0x0100 3662306a36Sopenharmony_ci/* Default composing area */ 3762306a36Sopenharmony_ci#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 3862306a36Sopenharmony_ci/* Composing bounds */ 3962306a36Sopenharmony_ci#define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 4062306a36Sopenharmony_ci/* Current composing area plus all padding pixels */ 4162306a36Sopenharmony_ci#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci/* Selection flags */ 4462306a36Sopenharmony_ci#define V4L2_SEL_FLAG_GE (1 << 0) 4562306a36Sopenharmony_ci#define V4L2_SEL_FLAG_LE (1 << 1) 4662306a36Sopenharmony_ci#define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2) 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_cistruct v4l2_edid { 4962306a36Sopenharmony_ci __u32 pad; 5062306a36Sopenharmony_ci __u32 start_block; 5162306a36Sopenharmony_ci __u32 blocks; 5262306a36Sopenharmony_ci __u32 reserved[5]; 5362306a36Sopenharmony_ci __u8 *edid; 5462306a36Sopenharmony_ci}; 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci#ifndef __KERNEL__ 5762306a36Sopenharmony_ci/* Backward compatibility target definitions --- to be removed. */ 5862306a36Sopenharmony_ci#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP 5962306a36Sopenharmony_ci#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE 6062306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP 6162306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE 6262306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS 6362306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci/* Backward compatibility flag definitions --- to be removed. */ 6662306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE 6762306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE 6862306a36Sopenharmony_ci#define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG 6962306a36Sopenharmony_ci#endif 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#endif /* __V4L2_COMMON__ */ 72