Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / staging / media / davinci_vpfe / davinci-vpfe-mc.txt
1 Davinci Video processing Front End (VPFE) driver
2
3 Copyright (C) 2012 Texas Instruments Inc
4
5 Contacts: Manjunath Hadli <manjunath.hadli@ti.com>
6           Prabhakar Lad <prabhakar.lad@ti.com>
7
8
9 Introduction
10 ============
11
12 This file documents the Texas Instruments Davinci Video processing Front End
13 (VPFE) driver located under drivers/media/platform/davinci. The original driver
14 exists for Davinci VPFE, which is now being changed to Media Controller
15 Framework.
16
17 Currently the driver has been successfully used on the following
18 version of Davinci:
19
20         DM365/DM368
21
22 The driver implements V4L2, Media controller and v4l2_subdev interfaces. Sensor,
23 lens and flash drivers using the v4l2_subdev interface in the kernel are
24 supported.
25
26
27 Split to subdevs
28 ================
29
30 The Davinci VPFE is split into V4L2 subdevs, each of the blocks inside the VPFE
31 having one subdev to represent it. Each of the subdevs provide a V4L2 subdev
32 interface to userspace.
33
34         DAVINCI ISIF
35         DAVINCI IPIPEIF
36         DAVINCI IPIPE
37         DAVINCI CROP RESIZER
38         DAVINCI RESIZER A
39         DAVINCI RESIZER B
40
41 Each possible link in the VPFE is modelled by a link in the Media controller
42 interface. For an example program see [1].
43
44
45 ISIF, IPIPE, and RESIZER block IOCTLs
46 ======================================
47
48 The Davinci Video processing Front End (VPFE) driver supports standard V4L2
49 IOCTLs and controls where possible and practical. Much of the functions provided
50 by the VPFE, however, does not fall under the standard IOCTL's.
51
52 In general, there is a private ioctl for configuring each of the blocks
53 containing hardware-dependent functions.
54
55 The following private IOCTLs are supported:
56
57         VIDIOC_VPFE_ISIF_[S/G]_RAW_PARAMS
58         VIDIOC_VPFE_IPIPE_[S/G]_CONFIG
59         VIDIOC_VPFE_RSZ_[S/G]_CONFIG
60
61 The parameter structures used by these ioctl's are described in
62 include/uapi/linux/davinci_vpfe.h.
63
64 The VIDIOC_VPFE_ISIF_S_RAW_PARAMS, VIDIOC_VPFE_IPIPE_S_CONFIG and
65 VIDIOC_VPFE_RSZ_S_CONFIG are used to configure, enable and disable functions in
66 the isif, ipipe and resizer blocks respectively. These IOCTL's control several
67 functions in the blocks they control. VIDIOC_VPFE_ISIF_S_RAW_PARAMS IOCTL
68 accepts a pointer to struct vpfe_isif_raw_config as its argument. Similarly
69 VIDIOC_VPFE_IPIPE_S_CONFIG accepts a pointer to struct vpfe_ipipe_config. And
70 VIDIOC_VPFE_RSZ_S_CONFIG accepts a pointer to struct vpfe_rsz_config as its
71 argument. Similarly VIDIOC_VPFE_ISIF_G_RAW_PARAMS, VIDIOC_VPFE_IPIPE_G_CONFIG
72 and VIDIOC_VPFE_RSZ_G_CONFIG are used to get the current configuration set in
73 the isif, ipipe and resizer blocks respectively.
74
75 The detailed functions of the VPFE itself related to a given VPFE block is
76 described in the Technical Reference Manuals (TRMs) --- see the end of the
77 document for those.
78
79
80 IPIPEIF block IOCTLs
81 ======================================
82
83 The following private IOCTLs are supported:
84
85         VIDIOC_VPFE_IPIPEIF_[S/G]_CONFIG
86
87 The parameter structures used by these ioctl's are described in
88 include/uapi/linux/dm365_ipipeif.h
89
90 The VIDIOC_VPFE_IPIPEIF_S_CONFIG is used to configure the ipipeif
91 hardware block. The VIDIOC_VPFE_IPIPEIF_S_CONFIG and
92 VIDIOC_VPFE_IPIPEIF_G_CONFIG accepts a pointer to struct ipipeif_params
93 as its argument.
94
95
96 VPFE Operating Modes
97 ==========================================
98
99 a: Continuous Modes
100 ------------------------
101
102 1: tvp514x/tvp7002/mt9p031---> DAVINCI ISIF---> SDRAM
103
104 2: tvp514x/tvp7002/mt9p031---> DAVINCI ISIF---> DAVINCI IPIPEIF--->|
105                                                                    |
106    <--------------------<----------------<---------------------<---|
107    |
108    V
109  DAVINCI CROP RESIZER--->DAVINCI RESIZER [A/B]---> SDRAM
110
111 3: tvp514x/tvp7002/mt9p031---> DAVINCI ISIF---> DAVINCI IPIPEIF--->|
112                                                                    |
113    <--------------------<----------------<---------------------<---|
114    |
115    V
116  DAVINCI IPIPE---> DAVINCI CROP RESIZER--->DAVINCI RESIZER [A/B]---> SDRAM
117
118 a: Single Shot Modes
119 ------------------------
120
121 1: SDRAM---> DAVINCI IPIPEIF---> DAVINCI IPIPE---> DAVINCI CROP RESIZER--->|
122                                                                            |
123    <----------------<----------------<------------------<---------------<--|
124    |
125    V
126 DAVINCI RESIZER [A/B]---> SDRAM
127
128 2: SDRAM---> DAVINCI IPIPEIF---> DAVINCI CROP RESIZER--->|
129                                                          |
130    <----------------<----------------<---------------<---|
131    |
132    V
133 DAVINCI RESIZER [A/B]---> SDRAM
134
135
136 Technical reference manuals (TRMs) and other documentation
137 ==========================================================
138
139 Davinci DM365 TRM:
140 <URL:http://www.ti.com/lit/ds/sprs457e/sprs457e.pdf>
141 Referenced MARCH 2009-REVISED JUNE 2011
142
143 Davinci DM368 TRM:
144 <URL:http://www.ti.com/lit/ds/sprs668c/sprs668c.pdf>
145 Referenced APRIL 2010-REVISED JUNE 2011
146
147 Davinci Video Processing Front End (VPFE) DM36x
148 <URL:http://www.ti.com/lit/ug/sprufg8c/sprufg8c.pdf>
149
150
151 References
152 ==========
153
154 [1] http://git.ideasonboard.org/?p=media-ctl.git;a=summary