262bd30a6fc747a7d49929d6954954f42605fba1
[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap-psp-2.6.32 / cam / 0043-mt9v113-Settings-from-Aptima-used-to-increase-FPS.patch
1 From 3f7280192c69d6437c5d0e7c46ab2de345b52e5d Mon Sep 17 00:00:00 2001
2 From: Vaibhav Hiremath <hvaibhav@ti.com>
3 Date: Wed, 14 Jul 2010 19:07:34 +0530
4 Subject: [PATCH 43/75] mt9v113: Settings from Aptima used to increase FPS
6 The FPS is still low at around ~15FPS, expected one is 30FPS.
8 Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
9 ---
10 drivers/media/video/mt9v113.c | 55 +++++++++++++++++++++++++---------------
11 1 files changed, 34 insertions(+), 21 deletions(-)
13 diff --git a/drivers/media/video/mt9v113.c b/drivers/media/video/mt9v113.c
14 index 9a86cce..466702e 100644
15 --- a/drivers/media/video/mt9v113.c
16 +++ b/drivers/media/video/mt9v113.c
17 @@ -119,6 +119,21 @@ static struct mt9v113_reg mt9v113_vga_reg[] = {
18 {TOK_WRITE, 0x0990, 0x0280},
19 {TOK_WRITE, 0x098C, 0x2705},
20 {TOK_WRITE, 0x0990, 0x01E0},
21 + {TOK_WRITE, 0x098C, 0x2715},
22 + {TOK_WRITE, 0x0990, 0x0001},
23 + {TOK_WRITE, 0x098C, 0x2717},
24 + {TOK_WRITE, 0x0990, 0x0026},
25 + {TOK_WRITE, 0x098C, 0x2719},
26 + {TOK_WRITE, 0x0990, 0x001A},
27 + {TOK_WRITE, 0x098C, 0x271B},
28 + {TOK_WRITE, 0x0990, 0x006B},
29 + {TOK_WRITE, 0x098C, 0x271D},
30 + {TOK_WRITE, 0x0990, 0x006B},
31 + {TOK_WRITE, 0x098C, 0x271F},
32 + {TOK_WRITE, 0x0990, 0x0202},
33 + {TOK_WRITE, 0x098C, 0x2721},
34 + {TOK_WRITE, 0x0990, 0x034A},
35 +
36 {TOK_WRITE, 0x098C, 0xA103},
37 {TOK_WRITE, 0x0990, 0x0005},
38 {TOK_DELAY, 0, 100},
39 @@ -148,8 +163,7 @@ static struct mt9v113_reg mt9v113_reg_list[] = {
40 {TOK_WRITE, 0x001E, 0x0777},
41 {TOK_WRITE, 0x0016, 0x42DF},
42 {TOK_WRITE, 0x0014, 0x2145},
43 - {TOK_WRITE, 0x0014, 0x2145},
44 - {TOK_WRITE, 0x0010, 0x0231},
45 + {TOK_WRITE, 0x0010, 0x0234},
46 {TOK_WRITE, 0x0012, 0x0000},
47 {TOK_WRITE, 0x0014, 0x244B},
48 {TOK_WRITE, 0x0014, 0x304B},
49 @@ -267,29 +281,31 @@ static struct mt9v113_reg mt9v113_reg_list[] = {
50 {TOK_WRITE, 0x0990, 0x0005},
51 {TOK_DELAY, 0, 100},
52 {TOK_WRITE, 0x098C, 0x222D},
53 - {TOK_WRITE, 0x0990, 0x0088},
54 + {TOK_WRITE, 0x0990, 0x0081},
55 {TOK_WRITE, 0x098C, 0xA408},
56 - {TOK_WRITE, 0x0990, 0x0020},
57 + {TOK_WRITE, 0x0990, 0x001F},
58 {TOK_WRITE, 0x098C, 0xA409},
59 - {TOK_WRITE, 0x0990, 0x0023},
60 + {TOK_WRITE, 0x0990, 0x0021},
61 {TOK_WRITE, 0x098C, 0xA40A},
62 - {TOK_WRITE, 0x0990, 0x0027},
63 + {TOK_WRITE, 0x0990, 0x0025},
64 {TOK_WRITE, 0x098C, 0xA40B},
65 - {TOK_WRITE, 0x0990, 0x002A},
66 + {TOK_WRITE, 0x0990, 0x0027},
67 {TOK_WRITE, 0x098C, 0x2411},
68 - {TOK_WRITE, 0x0990, 0x0088},
69 + {TOK_WRITE, 0x0990, 0x0081},
70 {TOK_WRITE, 0x098C, 0x2413},
71 - {TOK_WRITE, 0x0990, 0x00A4},
72 + {TOK_WRITE, 0x0990, 0x009A},
73 {TOK_WRITE, 0x098C, 0x2415},
74 - {TOK_WRITE, 0x0990, 0x0088},
75 + {TOK_WRITE, 0x0990, 0x0081},
76 {TOK_WRITE, 0x098C, 0x2417},
77 - {TOK_WRITE, 0x0990, 0x00A4},
78 + {TOK_WRITE, 0x0990, 0x009A},
79 {TOK_WRITE, 0x098C, 0xA404},
80 {TOK_WRITE, 0x0990, 0x0010},
81 {TOK_WRITE, 0x098C, 0xA40D},
82 {TOK_WRITE, 0x0990, 0x0002},
83 {TOK_WRITE, 0x098C, 0xA40E},
84 {TOK_WRITE, 0x0990, 0x0003},
85 + {TOK_WRITE, 0x098C, 0xA410},
86 + {TOK_WRITE, 0x0990, 0x000A},
87 {TOK_WRITE, 0x098C, 0xA103},
88 {TOK_WRITE, 0x0990, 0x0006},
89 {TOK_DELAY, 0, 100},
90 @@ -1216,13 +1232,10 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
91 struct mt9v113_decoder *decoder = s->priv;
92 int err = 0;
94 - if (decoder->state == STATE_DETECTED)
95 - return 0;
96 -
97 switch (on) {
98 case V4L2_POWER_OFF:
99 /* Power Down Sequence */
100 -/* TODO: FIXME: implement proper OFF and Standby code here */
101 + /* TODO: FIXME: implement proper OFF and Standby code here */
102 #if 0
103 err = mt9v113_write_reg(decoder->client, REG_OPERATION_MODE,
104 0x01);
105 @@ -1240,10 +1253,10 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
107 case V4L2_POWER_ON:
108 /* Enable mux for mt9v113 data path */
109 - if ((decoder->pdata->power_set) &&
110 - (decoder->state == STATE_NOT_DETECTED)) {
111 + if (decoder->state == STATE_NOT_DETECTED) {
113 - err = decoder->pdata->power_set(s, on);
114 + if (decoder->pdata->power_set)
115 + err = decoder->pdata->power_set(s, on);
117 /* Detect the sensor is not already detected */
118 err |= mt9v113_detect(decoder);
119 @@ -1252,10 +1265,10 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on)
120 "Unable to detect decoder\n");
121 return err;
122 }
123 - /* Only VGA mode for now */
124 - err |= mt9v113_configure(decoder);
125 - err |= mt9v113_vga_mode(decoder);
126 }
127 + /* Only VGA mode for now */
128 + err |= mt9v113_configure(decoder);
129 + err |= mt9v113_vga_mode(decoder);
130 break;
132 default:
133 --
134 1.6.6.1