summaryrefslogtreecommitdiff
path: root/isp/omap3isp-priv.h
blob: fe03d965e003f1121cb97ae2afe43218b617158a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * OMAP3 ISP library - OMAP3 ISP private header
 *
 * Copyright (C) 2010-2011 Ideas on board SPRL
 *
 * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef __OMAP3ISP_PRIV_H
#define __OMAP3ISP_PRIV_H

#include "omap3isp.h"

/*
 * struct omap3_isp_video - OMAP3 video device
 * @subdev: Sub-device from which video is captured for this device
 * @node: Output video node entity
 * @video: V4L2 capture device
 * @format: Current video format
 * @pool: Buffers pool
 * @scaler: Whether scaling should be performed on the ISP or the sensor
 * @dequeued: Bitmask of dequeued buffers that belong to the application
 * @queued: Number of buffers queued to the driver
 * @running: Whether video capture is running on the device
 */
struct omap3_isp_video {
	struct media_entity *subdev;
	struct media_entity *node;
	struct v4l2_device *video;
	struct v4l2_mbus_framefmt format;
	struct v4l2_buffers_pool *pool;
	enum omap3_isp_scaler scaler;
	unsigned int dequeued;
	unsigned int queued;
	bool running;
};

struct omap3_isp_device {
	struct media_device *mdev;

	struct media_entity *ccdc;
	struct media_entity *preview;
	struct media_entity *resizer;
	struct media_entity *sensor;

	struct v4l2_mbus_framefmt sensor_format;

	struct omap3_isp_video viewfinder;
	struct omap3_isp_video snapshot;

	const struct omap3_isp_operations *ops;
};

#endif