Lines Matching +full:0 +full:x042
20 0x3333, 0x1f82, 0x3333, 0x1f82, 0x1f82, 0x147b, 0x1f82, 0x147b,
21 0x3333, 0x1f82, 0x3333, 0x1f82, 0x1f82, 0x147b, 0x1f82, 0x147b,
22 0x2e8c, 0x1d42, 0x2e8c, 0x1d42, 0x1d42, 0x1234, 0x1d42, 0x1234,
23 0x2e8c, 0x1d42, 0x2e8c, 0x1d42, 0x1d42, 0x1234, 0x1d42, 0x1234,
24 0x2762, 0x199a, 0x2762, 0x199a, 0x199a, 0x1062, 0x199a, 0x1062,
25 0x2762, 0x199a, 0x2762, 0x199a, 0x199a, 0x1062, 0x199a, 0x1062,
26 0x2492, 0x16c1, 0x2492, 0x16c1, 0x16c1, 0x0e3f, 0x16c1, 0x0e3f,
27 0x2492, 0x16c1, 0x2492, 0x16c1, 0x16c1, 0x0e3f, 0x16c1, 0x0e3f,
28 0x2000, 0x147b, 0x2000, 0x147b, 0x147b, 0x0d1b, 0x147b, 0x0d1b,
29 0x2000, 0x147b, 0x2000, 0x147b, 0x147b, 0x0d1b, 0x147b, 0x0d1b,
30 0x1c72, 0x11cf, 0x1c72, 0x11cf, 0x11cf, 0x0b4d, 0x11cf, 0x0b4d,
31 0x1c72, 0x11cf, 0x1c72, 0x11cf, 0x11cf, 0x0b4d, 0x11cf, 0x0b4d
35 0x800a, 0x800d, 0x800a, 0x800d, 0x800d, 0x8010, 0x800d, 0x8010,
36 0x800a, 0x800d, 0x800a, 0x800d, 0x800d, 0x8010, 0x800d, 0x8010,
37 0x800b, 0x800e, 0x800b, 0x800e, 0x800e, 0x8012, 0x800e, 0x8012,
38 0x800b, 0x800e, 0x800b, 0x800e, 0x800e, 0x8012, 0x800e, 0x8012,
39 0x800d, 0x8010, 0x800d, 0x8010, 0x8010, 0x8014, 0x8010, 0x8014,
40 0x800d, 0x8010, 0x800d, 0x8010, 0x8010, 0x8014, 0x8010, 0x8014,
41 0x800e, 0x8012, 0x800e, 0x8012, 0x8012, 0x8017, 0x8012, 0x8017,
42 0x800e, 0x8012, 0x800e, 0x8012, 0x8012, 0x8017, 0x8012, 0x8017,
43 0x8010, 0x8014, 0x8010, 0x8014, 0x8014, 0x8019, 0x8014, 0x8019,
44 0x8010, 0x8014, 0x8010, 0x8014, 0x8014, 0x8019, 0x8014, 0x8019,
45 0x8012, 0x8017, 0x8012, 0x8017, 0x8017, 0x801d, 0x8017, 0x801d,
46 0x8012, 0x8017, 0x8012, 0x8017, 0x8017, 0x801d, 0x8017, 0x801d
50 0x011, 0x000, 0x000, 0x000, 0x065, 0x021, 0x000, 0x000, 0x087, 0x064,
51 0x031, 0x000, 0x097, 0x086, 0x075, 0x053, 0x0a7, 0x096, 0x085, 0x063,
52 0x0b7, 0x0a6, 0x095, 0x074, 0x0df, 0x0b6, 0x0a5, 0x084, 0x0db, 0x0de,
53 0x0b5, 0x094, 0x0d8, 0x0da, 0x0dd, 0x0a4, 0x0ef, 0x0ee, 0x0d9, 0x0b4,
54 0x0eb, 0x0ea, 0x0ed, 0x0dc, 0x0ff, 0x0fe, 0x0e9, 0x0ec, 0x0fb, 0x0fa,
55 0x0fd, 0x0e8, 0x10f, 0x0f1, 0x0f9, 0x0fc, 0x10b, 0x10e, 0x10d, 0x0f8,
56 0x107, 0x10a, 0x109, 0x10c, 0x104, 0x106, 0x105, 0x108, 0x023, 0x000,
57 0x000, 0x000, 0x06b, 0x022, 0x000, 0x000, 0x067, 0x057, 0x033, 0x000,
58 0x077, 0x06a, 0x069, 0x045, 0x087, 0x066, 0x065, 0x044, 0x084, 0x076,
59 0x075, 0x056, 0x097, 0x086, 0x085, 0x068, 0x0bf, 0x096, 0x095, 0x064,
60 0x0bb, 0x0be, 0x0bd, 0x074, 0x0cf, 0x0ba, 0x0b9, 0x094, 0x0cb, 0x0ce,
61 0x0cd, 0x0bc, 0x0c8, 0x0ca, 0x0c9, 0x0b8, 0x0df, 0x0de, 0x0dd, 0x0cc,
62 0x0db, 0x0da, 0x0d9, 0x0dc, 0x0d7, 0x0eb, 0x0d6, 0x0d8, 0x0e9, 0x0e8,
63 0x0ea, 0x0d1, 0x0e7, 0x0e6, 0x0e5, 0x0e4, 0x04f, 0x000, 0x000, 0x000,
64 0x06f, 0x04e, 0x000, 0x000, 0x06b, 0x05f, 0x04d, 0x000, 0x068, 0x05c,
65 0x05e, 0x04c, 0x07f, 0x05a, 0x05b, 0x04b, 0x07b, 0x058, 0x059, 0x04a,
66 0x079, 0x06e, 0x06d, 0x049, 0x078, 0x06a, 0x069, 0x048, 0x08f, 0x07e,
67 0x07d, 0x05d, 0x08b, 0x08e, 0x07a, 0x06c, 0x09f, 0x08a, 0x08d, 0x07c,
68 0x09b, 0x09e, 0x089, 0x08c, 0x098, 0x09a, 0x09d, 0x088, 0x0ad, 0x097,
69 0x099, 0x09c, 0x0a9, 0x0ac, 0x0ab, 0x0aa, 0x0a5, 0x0a8, 0x0a7, 0x0a6,
70 0x0a1, 0x0a4, 0x0a3, 0x0a2, 0x021, 0x000, 0x000, 0x000, 0x067, 0x011,
71 0x000, 0x000, 0x064, 0x066, 0x031, 0x000, 0x063, 0x073, 0x072, 0x065,
72 0x062, 0x083, 0x082, 0x070, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
73 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
74 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
75 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
76 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
77 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
78 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
79 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
80 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
81 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
82 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
83 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
84 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
85 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
86 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
87 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
88 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
89 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
90 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
91 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
92 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
93 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
94 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
95 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
96 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
97 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
98 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
99 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
100 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
101 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
102 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x011, 0x010,
103 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
104 0x000, 0x000, 0x000, 0x000, 0x011, 0x021, 0x020, 0x000, 0x000, 0x000,
105 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
106 0x023, 0x022, 0x021, 0x020, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
107 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x023, 0x022, 0x021, 0x031,
108 0x030, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
109 0x000, 0x000, 0x023, 0x022, 0x033, 0x032, 0x031, 0x030, 0x000, 0x000,
110 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x023, 0x030,
111 0x031, 0x033, 0x032, 0x035, 0x034, 0x000, 0x000, 0x000, 0x000, 0x000,
112 0x000, 0x000, 0x000, 0x000, 0x037, 0x036, 0x035, 0x034, 0x033, 0x032,
113 0x031, 0x041, 0x051, 0x061, 0x071, 0x081, 0x091, 0x0a1, 0x0b1, 0x000,
114 0x002, 0x000, 0x0e4, 0x011, 0x0f4, 0x002, 0x024, 0x003, 0x005, 0x012,
115 0x034, 0x013, 0x065, 0x024, 0x013, 0x063, 0x015, 0x022, 0x075, 0x034,
116 0x044, 0x023, 0x023, 0x073, 0x054, 0x033, 0x033, 0x004, 0x043, 0x014,
117 0x011, 0x043, 0x014, 0x001, 0x025, 0x015, 0x035, 0x025, 0x064, 0x055,
118 0x045, 0x035, 0x074, 0x065, 0x085, 0x0d5, 0x012, 0x095, 0x055, 0x045,
119 0x095, 0x0e5, 0x084, 0x075, 0x022, 0x0a5, 0x094, 0x085, 0x032, 0x0b5,
120 0x003, 0x0c5, 0x001, 0x044, 0x0a5, 0x032, 0x0b5, 0x094, 0x0c5, 0x0a4,
121 0x0a4, 0x054, 0x0d5, 0x0b4, 0x0b4, 0x064, 0x0f5, 0x0f5, 0x053, 0x0d4,
122 0x0e5, 0x0c4, 0x105, 0x105, 0x0c4, 0x074, 0x063, 0x0e4, 0x0d4, 0x084,
123 0x073, 0x0f4, 0x004, 0x005, 0x000, 0x053, 0x000, 0x000, 0x000, 0x000,
124 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
125 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
126 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
127 0x000, 0x000, 0x011, 0x021, 0x031, 0x030, 0x011, 0x021, 0x020, 0x000,
128 0x011, 0x010, 0x000, 0x000, 0x011, 0x033, 0x032, 0x043, 0x042, 0x053,
129 0x052, 0x063, 0x062, 0x073, 0x072, 0x083, 0x082, 0x093, 0x092, 0x091,
130 0x037, 0x036, 0x035, 0x034, 0x033, 0x045, 0x044, 0x043, 0x042, 0x053,
131 0x052, 0x063, 0x062, 0x061, 0x060, 0x000, 0x045, 0x037, 0x036, 0x035,
132 0x044, 0x043, 0x034, 0x033, 0x042, 0x053, 0x052, 0x061, 0x051, 0x060,
133 0x000, 0x000, 0x053, 0x037, 0x045, 0x044, 0x036, 0x035, 0x034, 0x043,
134 0x033, 0x042, 0x052, 0x051, 0x050, 0x000, 0x000, 0x000, 0x045, 0x044,
135 0x043, 0x037, 0x036, 0x035, 0x034, 0x033, 0x042, 0x051, 0x041, 0x050,
136 0x000, 0x000, 0x000, 0x000, 0x061, 0x051, 0x037, 0x036, 0x035, 0x034,
137 0x033, 0x032, 0x041, 0x031, 0x060, 0x000, 0x000, 0x000, 0x000, 0x000,
138 0x061, 0x051, 0x035, 0x034, 0x033, 0x023, 0x032, 0x041, 0x031, 0x060,
139 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x061, 0x041, 0x051, 0x033,
140 0x023, 0x022, 0x032, 0x031, 0x060, 0x000, 0x000, 0x000, 0x000, 0x000,
141 0x000, 0x000, 0x061, 0x060, 0x041, 0x023, 0x022, 0x031, 0x021, 0x051,
142 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x051, 0x050,
143 0x031, 0x023, 0x022, 0x021, 0x041, 0x000, 0x000, 0x000, 0x000, 0x000,
144 0x000, 0x000, 0x000, 0x000, 0x040, 0x041, 0x031, 0x032, 0x011, 0x033,
145 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
146 0x040, 0x041, 0x021, 0x011, 0x031, 0x000, 0x000, 0x000, 0x000, 0x000,
147 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x030, 0x031, 0x011, 0x021,
148 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
149 0x000, 0x000, 0x020, 0x021, 0x011, 0x000, 0x000, 0x000, 0x000, 0x000,
150 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x010, 0x011,
151 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
152 0x000, 0x000, 0x000, 0x000
156 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
157 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
158 0x0040, 0x0040, 0x0040, 0x0040, 0x0060, 0x0060, 0x0060, 0x0080,
159 0x0080, 0x0080, 0x00a0, 0x00c0, 0x00c0, 0x00e0, 0x0100, 0x0120,
160 0x0140, 0x0160, 0x01a0, 0x01c0, 0x0200, 0x0240, 0x0280, 0x02e0,
161 0x0320, 0x03a0, 0x0400, 0x0480, 0x0500, 0x05a0, 0x0660, 0x0720,
162 0x0800, 0x0900, 0x0a20, 0x0b60
187 return sizes[0] < H264_VLC_BUF_SIZE ? -EINVAL : 0; in tw5864_queue_setup()
189 sizes[0] = H264_VLC_BUF_SIZE; in tw5864_queue_setup()
192 return 0; in tw5864_queue_setup()
214 *std = (std_reg & 0x70) >> 4; in tw5864_input_std_get()
216 if (std_reg & 0x80) { in tw5864_input_std_get()
222 return 0; in tw5864_input_std_get()
232 int frame_width_bus_value = 0; in tw5864_enable_input()
233 int frame_height_bus_value = 0; in tw5864_enable_input()
234 int reg_frame_bus = 0x1c; in tw5864_enable_input()
235 int fmt_reg_value = 0; in tw5864_enable_input()
236 int downscale_enabled = 0; in tw5864_enable_input()
240 input->frame_seqno = 0; in tw5864_enable_input()
241 input->frame_gop_seqno = 0; in tw5864_enable_input()
242 input->h264_idr_pic_id = 0; in tw5864_enable_input()
251 | ((0xa << 8) & TW5864_DSP_MB_DELAY) in tw5864_enable_input()
261 input->reg_interlacing = 0x4; in tw5864_enable_input()
265 frame_width_bus_value = 0x2cf; in tw5864_enable_input()
267 reg_frame_bus = 0x1c; in tw5864_enable_input()
268 fmt_reg_value = 0; in tw5864_enable_input()
269 downscale_enabled = 0; in tw5864_enable_input()
279 frame_width_bus_value = 0x2cf; in tw5864_enable_input()
281 reg_frame_bus = 0x1c; in tw5864_enable_input()
282 fmt_reg_value = 0; in tw5864_enable_input()
283 downscale_enabled = 0; in tw5864_enable_input()
293 frame_width_bus_value = 0x15f; in tw5864_enable_input()
295 reg_frame_bus = 0x07; in tw5864_enable_input()
305 frame_width_bus_value = 0x15f; in tw5864_enable_input()
307 reg_frame_bus = 0x07; in tw5864_enable_input()
350 tw_mask_shift_writel(TW5864_H264EN_CH_FMT_REG1, 0x3, 2 * nr, in tw5864_enable_input()
356 0x1f, 5 * (nr % 2), in tw5864_enable_input()
360 TW5864_FRAME_BUS2, 0xff, (nr % 2) * 8, in tw5864_enable_input()
367 return 0; in tw5864_enable_input()
387 if (input->frame_gop_seqno == 0) { in tw5864_request_encoded_frame()
403 enc_buf_id_new = tw_mask_shift_readl(TW5864_ENC_BUF_PTR_REC1, 0x3, in tw5864_request_encoded_frame()
411 tw_writel(TW5864_SLICE, 0); in tw5864_request_encoded_frame()
422 input->enabled = 0; in tw5864_disable_input()
424 return 0; in tw5864_disable_input()
434 return 0; in tw5864_start_streaming()
505 return 0; in tw5864_s_ctrl()
513 return 0; in tw5864_s_ctrl()
517 return 0; in tw5864_s_ctrl()
519 return 0; in tw5864_s_ctrl()
525 return 0; in tw5864_s_ctrl()
527 return 0; in tw5864_s_ctrl()
552 return 0; in tw5864_fmt_vid_cap()
583 return 0; in tw5864_enum_input()
588 *i = 0; in tw5864_g_input()
589 return 0; in tw5864_g_input()
596 return 0; in tw5864_s_input()
608 return 0; in tw5864_querycap()
622 return 0; in tw5864_querystd()
630 return 0; in tw5864_g_std()
641 return 0; in tw5864_s_std()
652 return 0; in tw5864_enum_fmt_vid_cap()
679 * For 1 FPS - 0x00000001 in tw5864_frame_interval_set()
695 u32 unary_framerate = 0; in tw5864_frame_interval_set()
696 int shift = 0; in tw5864_frame_interval_set()
699 for (shift = 0; shift < std_max_fps; shift += input->frame_interval) in tw5864_frame_interval_set()
700 unary_framerate |= 0x00000001 << shift; in tw5864_frame_interval_set()
702 tw_writel(TW5864_H264EN_RATE_CNTL_LO_WORD(input->nr, 0), in tw5864_frame_interval_set()
704 tw_writel(TW5864_H264EN_RATE_CNTL_HI_WORD(input->nr, 0), in tw5864_frame_interval_set()
705 unary_framerate & 0xffff); in tw5864_frame_interval_set()
729 return 0; in tw5864_frameinterval_get()
737 if (fsize->index > 0) in tw5864_enum_framesizes()
746 return 0; in tw5864_enum_framesizes()
795 cp->capturemode = 0; in tw5864_g_parm()
845 #define INDIR_SPACE_MAP_SHIFT 0x100000
854 if (reg->reg > 0x87fff) in tw5864_g_reg()
861 if (indir_addr > 0xefe) in tw5864_g_reg()
866 return 0; in tw5864_g_reg()
876 if (reg->reg > 0x87fff) in tw5864_s_reg()
882 if (indir_addr > 0xefe) in tw5864_s_reg()
886 return 0; in tw5864_s_reg()
940 .max = 2 * 0x0f,
956 for (i = 0; i < H264_BUF_CNT; i++) { in tw5864_video_init()
987 tw_indir_writeb(TW5864_INDIR_CLK0_SEL, 0x00); in tw5864_video_init()
989 tw_indir_writeb(TW5864_INDIR_DDRA_DLL_DQS_SEL0, 0x02); in tw5864_video_init()
990 tw_indir_writeb(TW5864_INDIR_DDRA_DLL_DQS_SEL1, 0x02); in tw5864_video_init()
991 tw_indir_writeb(TW5864_INDIR_DDRA_DLL_CLK90_SEL, 0x02); in tw5864_video_init()
992 tw_indir_writeb(TW5864_INDIR_DDRB_DLL_DQS_SEL0, 0x02); in tw5864_video_init()
993 tw_indir_writeb(TW5864_INDIR_DDRB_DLL_DQS_SEL1, 0x02); in tw5864_video_init()
994 tw_indir_writeb(TW5864_INDIR_DDRB_DLL_CLK90_SEL, 0x02); in tw5864_video_init()
997 tw_indir_writeb(TW5864_INDIR_RESET, 0); in tw5864_video_init()
1009 tw_writel(TW5864_FULL_HALF_MODE_SEL, 0); in tw5864_video_init()
1012 TW5864_INDIR_PV_VD_CK_POL_VD(0) | in tw5864_video_init()
1018 dev->encoder_busy = 0; in tw5864_video_init()
1019 dev->h264_buf_r_index = 0; in tw5864_video_init()
1020 dev->h264_buf_w_index = 0; in tw5864_video_init()
1027 tw_writel(TW5864_SEN_EN_CH, 0x000f); in tw5864_video_init()
1028 tw_writel(TW5864_H264EN_CH_EN, 0x000f); in tw5864_video_init()
1030 tw_writel(TW5864_H264EN_BUS0_MAP, 0x00000000); in tw5864_video_init()
1031 tw_writel(TW5864_H264EN_BUS1_MAP, 0x00001111); in tw5864_video_init()
1032 tw_writel(TW5864_H264EN_BUS2_MAP, 0x00002222); in tw5864_video_init()
1033 tw_writel(TW5864_H264EN_BUS3_MAP, 0x00003333); in tw5864_video_init()
1037 * 0x0038 is managed by HW, and by default it won't pass the pointer set in tw5864_video_init()
1038 * at 0x0010. So if you don't do encoding, 0x0038 should stay at '3' in tw5864_video_init()
1040 * 0x0010 to '1' for example, HW will take one more frame and set it to in tw5864_video_init()
1041 * buffer #0, and then you should see 0x0038 is set to '0'. There is in tw5864_video_init()
1049 * If we set 0x0010 (TW5864_ENC_BUF_PTR_REC1) to 0 (for any channel), we in tw5864_video_init()
1051 * If we set 0x0010 (TW5864_ENC_BUF_PTR_REC1) to 0x3, it starts to roll in tw5864_video_init()
1052 * continuously together with 0x0038. in tw5864_video_init()
1054 tw_writel(TW5864_ENC_BUF_PTR_REC1, 0x00ff); in tw5864_video_init()
1055 tw_writel(TW5864_PCI_INTTM_SCALE, 0); in tw5864_video_init()
1068 for (i = 0; i < TW5864_INPUTS; i++) { in tw5864_video_init()
1077 return 0; in tw5864_video_init()
1080 for (i = last_input_nr_registered; i >= 0; i--) in tw5864_video_init()
1086 for (i = last_dma_allocated; i >= 0; i--) { in tw5864_video_init()
1115 input->vidq.gfp_flags = 0; in tw5864_video_input_init()
1133 V4L2_CID_BRIGHTNESS, -128, 127, 1, 0); in tw5864_video_input_init()
1135 V4L2_CID_CONTRAST, 0, 255, 1, 100); in tw5864_video_input_init()
1137 V4L2_CID_SATURATION, 0, 255, 1, 128); in tw5864_video_input_init()
1138 v4l2_ctrl_new_std(hdl, &tw5864_ctrl_ops, V4L2_CID_HUE, -128, 127, 1, 0); in tw5864_video_input_init()
1145 V4L2_DETECT_MD_MODE_THRESHOLD_GRID, 0, in tw5864_video_input_init()
1178 tw_indir_writeb(TW5864_INDIR_VIN_E(video_nr), 0x07); in tw5864_video_input_init()
1180 tw_indir_writeb(TW5864_INDIR_VIN_F(video_nr), 0xff); in tw5864_video_input_init()
1182 return 0; in tw5864_video_input_init()
1204 for (i = 0; i < TW5864_INPUTS; i++) in tw5864_video_fini()
1207 for (i = 0; i < H264_BUF_CNT; i++) { in tw5864_video_fini()
1236 dst = vb2_plane_vaddr(&vb->vb.vb2_buf, 0); in tw5864_prepare_frame_headers()
1237 dst_space = vb2_plane_size(&vb->vb.vb2_buf, 0); in tw5864_prepare_frame_headers()
1254 if (input->frame_gop_seqno == 0) in tw5864_prepare_frame_headers()
1286 * unsigned int mb_type = (mvd >> 28) & 0x7; in tw5864_md_metric_from_mvd()
1287 * unsigned int non_zero_members = (mvd >> 20) & 0xff; in tw5864_md_metric_from_mvd()
1289 unsigned int mv_y = (mvd >> 10) & 0x3ff; in tw5864_md_metric_from_mvd()
1290 unsigned int mv_x = mvd & 0x3ff; in tw5864_md_metric_from_mvd()
1293 mv_x &= 0x0f; in tw5864_md_metric_from_mvd()
1294 mv_y &= 0x0f; in tw5864_md_metric_from_mvd()
1304 int detected = 0; in tw5864_is_motion_triggered()
1306 for (i = 0; i < MD_CELLS; i++) { in tw5864_is_motion_triggered()
1354 while (((count_len >> 2) - 1) > 0) { in tw5864_vlc_checksum()
1372 u8 tail_mask, vlc_mask = 0; in tw5864_handle_frame()
1374 u8 vlc_first_byte = ((u8 *)(frame->vlc.addr + SKIP_VLCBUF_BYTES))[0]; in tw5864_handle_frame()
1410 for (i = 0; i < 8 - input->tail_nb_bits; i++) in tw5864_handle_frame()
1412 tail_mask = (~vlc_mask) & 0xff; in tw5864_handle_frame()
1414 dst[0] = (input->tail & tail_mask) | (vlc_first_byte & vlc_mask); in tw5864_handle_frame()
1421 zero_run = 0; in tw5864_handle_frame()
1424 if (*src == 0) in tw5864_handle_frame()
1427 zero_run = 0; in tw5864_handle_frame()
1429 if ((*src & ~0x03) == 0) in tw5864_handle_frame()
1430 *dst++ = 0x03; in tw5864_handle_frame()
1431 zero_run = *src == 0; in tw5864_handle_frame()
1436 vb2_set_plane_payload(&vb->vb.vb2_buf, 0, in tw5864_handle_frame()
1437 dst - (u8 *)vb2_plane_vaddr(&vb->vb.vb2_buf, 0)); in tw5864_handle_frame()
1472 return 0; in tw5864_get_v4l2_std()
1499 tw_writel(TW5864_VLC_RD, 0x1); in tw5864_encoder_tables_upload()
1500 for (i = 0; i < VLC_LOOKUP_TABLE_LEN; i++) { in tw5864_encoder_tables_upload()
1504 tw_writel(TW5864_VLC_RD, 0x0); in tw5864_encoder_tables_upload()
1506 for (i = 0; i < QUANTIZATION_TABLE_LEN; i++) { in tw5864_encoder_tables_upload()
1511 for (i = 0; i < QUANTIZATION_TABLE_LEN; i++) { in tw5864_encoder_tables_upload()