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