Lines Matching +full:0 +full:x0c

26 #define SOI_MARKER	0xffd8
27 #define APP9_MARKER 0xffe9
28 #define DRI_MARKER 0xffdd
29 #define DQT_MARKER 0xffdb
30 #define DHT_MARKER 0xffc4
31 #define SOF_MARKER 0xffc0
32 #define SOS_MARKER 0xffda
33 #define EOI_MARKER 0xffd9
64 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01,
65 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
68 0x08, 0x09, 0x0a, 0x0b,
73 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
74 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
76 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
77 0x08, 0x09, 0x0a, 0x0b,
82 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03,
83 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7d,
85 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12,
86 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07,
87 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08,
88 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0,
89 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16,
90 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28,
91 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
92 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
93 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
94 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
95 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
96 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
97 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98,
98 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
99 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
100 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5,
101 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4,
102 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2,
103 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea,
104 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
105 0xf9, 0xfa, /* padded to 32-bit */
110 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04,
111 0x07, 0x05, 0x04, 0x04, 0x00, 0x01, 0x02, 0x77,
113 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21,
114 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
115 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91,
116 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0,
117 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34,
118 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26,
119 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38,
120 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
121 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
122 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
123 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
124 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
125 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96,
126 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5,
127 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4,
128 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3,
129 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2,
130 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda,
131 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
132 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
133 0xf9, 0xfa, /* padded to 32-bit */
142 0x06, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x05,
143 0x05, 0x06, 0x09, 0x06, 0x05, 0x06, 0x09, 0x0b,
144 0x08, 0x06, 0x06, 0x08, 0x0b, 0x0c, 0x0a, 0x0a,
145 0x0b, 0x0a, 0x0a, 0x0c, 0x10, 0x0c, 0x0c, 0x0c,
146 0x0c, 0x0c, 0x0c, 0x10, 0x0c, 0x0c, 0x0c, 0x0c,
147 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
148 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
149 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
153 0x07, 0x07, 0x07, 0x0d, 0x0c, 0x0d, 0x18, 0x10,
154 0x10, 0x18, 0x14, 0x0e, 0x0e, 0x0e, 0x14, 0x14,
155 0x0e, 0x0e, 0x0e, 0x0e, 0x14, 0x11, 0x0c, 0x0c,
156 0x0c, 0x0c, 0x0c, 0x11, 0x11, 0x0c, 0x0c, 0x0c,
157 0x0c, 0x0c, 0x0c, 0x11, 0x0c, 0x0c, 0x0c, 0x0c,
158 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
159 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
160 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
209 for (i = 0; i < len; i += 2) { in coda_memcpy_parabuf()
219 { 0, luma_dc, sizeof(luma_dc) }, in coda_jpeg_write_tables()
225 { 512, ctx->params.jpeg_qmat_tab[0], 64 }, in coda_jpeg_write_tables()
231 for (i = 0; i < ARRAY_SIZE(huff); i++) in coda_jpeg_write_tables()
235 for (i = 0; i < ARRAY_SIZE(qmat); i++) in coda_jpeg_write_tables()
238 return 0; in coda_jpeg_write_tables()
243 void *vaddr = vb2_plane_vaddr(vb, 0); in coda_jpeg_check_buffer()
251 len = vb2_get_plane_payload(vb, 0); in coda_jpeg_check_buffer()
253 for (i = 0; i < 32; i++) { in coda_jpeg_check_buffer()
256 if (i > 0) in coda_jpeg_check_buffer()
257 vb2_set_plane_payload(vb, 0, len - i); in coda_jpeg_check_buffer()
270 u8 *buf = vb2_plane_vaddr(vb, 0); in coda_jpeg_decode_header()
271 size_t len = vb2_get_plane_payload(vb, 0); in coda_jpeg_decode_header()
285 if (ret < 0) { in coda_jpeg_decode_header()
323 for (i = 0; i < 3; i++) { in coda_jpeg_decode_header()
341 for (i = 0; i < 4; i++) { in coda_jpeg_decode_header()
349 ((i & 2) == 0 && huffman_tables[i].length > 28)) { in coda_jpeg_decode_header()
364 memset(huff_tab, 0, sizeof(*huff_tab)); in coda_jpeg_decode_header()
365 memcpy(huff_tab->luma_dc, huffman_tables[0].start, huffman_tables[0].length); in coda_jpeg_decode_header()
371 for (i = 0; i < scan_header.num_components; i++) { in coda_jpeg_decode_header()
375 for (j = 0; j < header.frame.num_components; j++) { in coda_jpeg_decode_header()
390 for (i = 0; i < 4; i++) in coda_jpeg_decode_header()
407 return 0; in coda_jpeg_decode_header()
416 for (huff_length = 0, i = 0; i < 16; i++) in coda9_jpeg_write_huff_values()
420 for (i = 0; i < num_values; i++) in coda9_jpeg_write_huff_values()
434 coda_write(dev, 0x003, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_dec_huff_setup()
435 coda_write(dev, 0x000, CODA9_REG_JPEG_HUFF_ADDR); in coda9_jpeg_dec_huff_setup()
436 for (i = 0; i < 4 * 16; i++) in coda9_jpeg_dec_huff_setup()
440 coda_write(dev, 0x403, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_dec_huff_setup()
441 coda_write(dev, 0x440, CODA9_REG_JPEG_HUFF_ADDR); in coda9_jpeg_dec_huff_setup()
442 for (i = 0; i < 4 * 16; i++) in coda9_jpeg_dec_huff_setup()
446 coda_write(dev, 0x803, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_dec_huff_setup()
447 coda_write(dev, 0x880, CODA9_REG_JPEG_HUFF_ADDR); in coda9_jpeg_dec_huff_setup()
448 for (i = 0; i < 4 * 16; i++) in coda9_jpeg_dec_huff_setup()
452 coda_write(dev, 0xc03, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_dec_huff_setup()
457 coda_write(dev, 0x000, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_dec_huff_setup()
465 coda_write(dev, index | 0x3, CODA9_REG_JPEG_QMAT_CTRL); in coda9_jpeg_write_qmat_tab()
466 for (i = 0; i < 64; i++) in coda9_jpeg_write_qmat_tab()
468 coda_write(dev, 0, CODA9_REG_JPEG_QMAT_CTRL); in coda9_jpeg_write_qmat_tab()
477 coda9_jpeg_write_qmat_tab(dev, qmat_tab[qmat_index[0]], 0x00); in coda9_jpeg_qmat_setup()
478 coda9_jpeg_write_qmat_tab(dev, qmat_tab[qmat_index[1]], 0x40); in coda9_jpeg_qmat_setup()
479 coda9_jpeg_write_qmat_tab(dev, qmat_tab[qmat_index[2]], 0x80); in coda9_jpeg_qmat_setup()
491 bbc_base_addr = vb2_dma_contig_plane_dma_addr(buf, 0); in coda9_jpeg_dec_bbc_gbu_setup()
492 end_addr = bbc_base_addr + vb2_get_plane_payload(buf, 0); in coda9_jpeg_dec_bbc_gbu_setup()
501 word_ptr &= ~0x1; in coda9_jpeg_dec_bbc_gbu_setup()
508 val = DIV_ROUND_UP(vb2_plane_size(buf, 0), 256) + 3; in coda9_jpeg_dec_bbc_gbu_setup()
517 coda_write(dev, 0, CODA9_REG_JPEG_BBC_COMMAND); in coda9_jpeg_dec_bbc_gbu_setup()
528 coda_write(dev, 0, CODA9_REG_JPEG_BBC_COMMAND); in coda9_jpeg_dec_bbc_gbu_setup()
537 coda_write(dev, 0, CODA9_REG_JPEG_GBU_TT_CNT); in coda9_jpeg_dec_bbc_gbu_setup()
539 coda_write(dev, 0, CODA9_REG_JPEG_GBU_BBSR); in coda9_jpeg_dec_bbc_gbu_setup()
542 coda_write(dev, 0, CODA9_REG_JPEG_GBU_BBIR); in coda9_jpeg_dec_bbc_gbu_setup()
543 coda_write(dev, 0, CODA9_REG_JPEG_GBU_BBHR); in coda9_jpeg_dec_bbc_gbu_setup()
573 [CODA9_JPEG_FORMAT_400] = MCU_INFO(1, 1, 5, 0, 0),
606 k = 0; in coda9_jpeg_gen_enc_huff_tab()
617 k = 0; in coda9_jpeg_gen_enc_huff_tab()
618 code = 0; in coda9_jpeg_gen_enc_huff_tab()
619 si = huff->size[0]; in coda9_jpeg_gen_enc_huff_tab()
632 for (k = 0; k < lastk; k++) { in coda9_jpeg_gen_enc_huff_tab()
640 ret = 0; in coda9_jpeg_gen_enc_huff_tab()
646 #define DC_TABLE_INDEX0 0
670 int ptr_cnt = 0, huff_code = 0, zero_flag = 0, data_flag = 0; in coda9_jpeg_gen_dec_huff_tab()
690 for (i = 0; i < 16; i++) { in coda9_jpeg_gen_dec_huff_tab()
697 zero_flag = 0; in coda9_jpeg_gen_dec_huff_tab()
713 return 0; in coda9_jpeg_gen_dec_huff_tab()
731 for (i = 0; i < 4; i++) { in coda9_jpeg_load_huff_tab()
749 for (j = 0; j < 4; j++) { in coda9_jpeg_load_huff_tab()
751 int t = (j == 0) ? AC_TABLE_INDEX0 : in coda9_jpeg_load_huff_tab()
758 for (i = 0; i < len; i++) { in coda9_jpeg_load_huff_tab()
759 if (huff->size[t][i] == 0 && huff->code[t][i] == 0) in coda9_jpeg_load_huff_tab()
760 *(huff_data++) = 0; in coda9_jpeg_load_huff_tab()
768 ret = 0; in coda9_jpeg_load_huff_tab()
781 coda_write(dev, 0x3, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_write_huff_tab()
782 for (i = 0; i < CODA9_JPEG_ENC_HUFF_DATA_SIZE; i++) in coda9_jpeg_write_huff_tab()
784 coda_write(dev, 0x0, CODA9_REG_JPEG_HUFF_CTRL); in coda9_jpeg_write_huff_tab()
792 coda_write(dev, index | 0x3, CODA9_REG_JPEG_QMAT_CTRL); in coda9_jpeg_write_qmat_quotients()
793 for (i = 0; i < 64; i++) in coda9_jpeg_write_qmat_quotients()
794 coda_write(dev, 0x80000 / qmat[i], CODA9_REG_JPEG_QMAT_DATA); in coda9_jpeg_write_qmat_quotients()
804 luma_tab = ctx->params.jpeg_qmat_tab[0]; in coda9_jpeg_load_qmat_tab()
812 coda9_jpeg_write_qmat_quotients(dev, luma_tab, 0x00); in coda9_jpeg_load_qmat_tab()
813 coda9_jpeg_write_qmat_quotients(dev, chroma_tab, 0x40); in coda9_jpeg_load_qmat_tab()
814 coda9_jpeg_write_qmat_quotients(dev, chroma_tab, 0x80); in coda9_jpeg_load_qmat_tab()
829 return 0; in coda_jpeg_put_byte()
840 return 0; in coda_jpeg_put_word()
849 if (ret < 0) in coda_jpeg_put_table()
852 if (ret < 0) in coda_jpeg_put_table()
855 for (i = 0; i < len && ret == 0; i++) in coda_jpeg_put_table()
884 if (chroma_format < 0) in coda9_jpeg_encode_header()
885 return 0; in coda9_jpeg_encode_header()
889 if (ret < 0) in coda9_jpeg_encode_header()
895 if (ret < 0) in coda9_jpeg_encode_header()
898 if (ret < 0) in coda9_jpeg_encode_header()
902 if (ret < 0) in coda9_jpeg_encode_header()
907 ret = coda_jpeg_define_quantization_table(ctx, 0x00, &stream); in coda9_jpeg_encode_header()
908 if (ret < 0) in coda9_jpeg_encode_header()
911 ret = coda_jpeg_define_quantization_table(ctx, 0x01, &stream); in coda9_jpeg_encode_header()
912 if (ret < 0) in coda9_jpeg_encode_header()
917 ret = coda_jpeg_define_huffman_table(0x00, luma_dc, 16 + 12, &stream); in coda9_jpeg_encode_header()
918 if (ret < 0) in coda9_jpeg_encode_header()
920 ret = coda_jpeg_define_huffman_table(0x10, luma_ac, 16 + 162, &stream); in coda9_jpeg_encode_header()
921 if (ret < 0) in coda9_jpeg_encode_header()
924 ret = coda_jpeg_define_huffman_table(0x01, chroma_dc, 16 + 12, in coda9_jpeg_encode_header()
926 if (ret < 0) in coda9_jpeg_encode_header()
928 ret = coda_jpeg_define_huffman_table(0x11, chroma_ac, 16 + 162, in coda9_jpeg_encode_header()
930 if (ret < 0) in coda9_jpeg_encode_header()
936 if (ret < 0) in coda9_jpeg_encode_header()
940 if (ret < 0) in coda9_jpeg_encode_header()
942 ret = coda_jpeg_put_byte(0x08, &stream); in coda9_jpeg_encode_header()
943 if (ret < 0) in coda9_jpeg_encode_header()
946 if (ret < 0) in coda9_jpeg_encode_header()
949 if (ret < 0) in coda9_jpeg_encode_header()
952 if (ret < 0) in coda9_jpeg_encode_header()
954 for (i = 0; i < comp_num; i++) { in coda9_jpeg_encode_header()
956 [CODA9_JPEG_FORMAT_420] = { 0x22, 0x11, 0x11 }, in coda9_jpeg_encode_header()
957 [CODA9_JPEG_FORMAT_422] = { 0x21, 0x11, 0x11 }, in coda9_jpeg_encode_header()
958 [CODA9_JPEG_FORMAT_224] = { 0x12, 0x11, 0x11 }, in coda9_jpeg_encode_header()
959 [CODA9_JPEG_FORMAT_444] = { 0x11, 0x11, 0x11 }, in coda9_jpeg_encode_header()
960 [CODA9_JPEG_FORMAT_400] = { 0x11 }, in coda9_jpeg_encode_header()
965 if (ret < 0) in coda9_jpeg_encode_header()
969 if (ret < 0) in coda9_jpeg_encode_header()
972 ret = coda_jpeg_put_byte((i == 0) ? 0 : 1, &stream); in coda9_jpeg_encode_header()
973 if (ret < 0) in coda9_jpeg_encode_header()
982 ret = coda_jpeg_put_byte(0x00, &stream); in coda9_jpeg_encode_header()
983 if (ret < 0) in coda9_jpeg_encode_header()
1000 for (i = 0; i < 64; i++) { in coda_scale_quant_table()
1002 if (temp <= 0) in coda_scale_quant_table()
1024 * [5,50] -> [1000..100], [51,100] -> [98..0] in coda_set_jpeg_compression_quality()
1031 if (ctx->params.jpeg_qmat_tab[0]) { in coda_set_jpeg_compression_quality()
1032 memcpy(ctx->params.jpeg_qmat_tab[0], luma_q, 64); in coda_set_jpeg_compression_quality()
1033 coda_scale_quant_table(ctx->params.jpeg_qmat_tab[0], scale); in coda_set_jpeg_compression_quality()
1051 if (ret < 0) { in coda9_jpeg_start_encoding()
1055 if (!ctx->params.jpeg_qmat_tab[0]) in coda9_jpeg_start_encoding()
1056 ctx->params.jpeg_qmat_tab[0] = kmalloc(64, GFP_KERNEL); in coda9_jpeg_start_encoding()
1061 return 0; in coda9_jpeg_start_encoding()
1081 if (vb2_get_plane_payload(&src_buf->vb2_buf, 0) == 0) in coda9_jpeg_prepare_encode()
1082 vb2_set_plane_payload(&src_buf->vb2_buf, 0, in coda9_jpeg_prepare_encode()
1083 vb2_plane_size(&src_buf->vb2_buf, 0)); in coda9_jpeg_prepare_encode()
1094 start_addr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0); in coda9_jpeg_prepare_encode()
1095 end_addr = start_addr + vb2_plane_size(&dst_buf->vb2_buf, 0); in coda9_jpeg_prepare_encode()
1098 if (chroma_format < 0) in coda9_jpeg_prepare_encode()
1112 vb2_plane_size(&dst_buf->vb2_buf, 0), in coda9_jpeg_prepare_encode()
1113 vb2_plane_vaddr(&dst_buf->vb2_buf, 0)); in coda9_jpeg_prepare_encode()
1114 if (header_len < 0) in coda9_jpeg_prepare_encode()
1121 coda_write(dev, 0, CODA9_REG_JPEG_BBC_CUR_POS); in coda9_jpeg_prepare_encode()
1125 coda_write(dev, 0, CODA9_REG_JPEG_BBC_INT_ADDR); in coda9_jpeg_prepare_encode()
1127 coda_write(dev, 0, CODA9_REG_JPEG_GBU_BT_PTR); in coda9_jpeg_prepare_encode()
1128 coda_write(dev, 0, CODA9_REG_JPEG_GBU_WD_PTR); in coda9_jpeg_prepare_encode()
1129 coda_write(dev, 0, CODA9_REG_JPEG_GBU_BBSR); in coda9_jpeg_prepare_encode()
1132 coda_write(dev, 0, CODA9_REG_JPEG_GBU_CTRL); in coda9_jpeg_prepare_encode()
1133 coda_write(dev, 0, CODA9_REG_JPEG_GBU_FF_RPTR); in coda9_jpeg_prepare_encode()
1141 coda_write(dev, 0, CODA9_REG_JPEG_SCL_INFO); in coda9_jpeg_prepare_encode()
1164 (CODA_ROT_MIR_ENABLE | ctx->params.rot_mode) : 0, in coda9_jpeg_prepare_encode()
1173 if (ktime_compare(ktime_get(), timeout) > 0) { in coda9_jpeg_prepare_encode()
1187 coda_write(dev, 0, CODA9_REG_JPEG_DPB_BASE00); in coda9_jpeg_prepare_encode()
1188 coda_write(dev, 0, CODA9_GDI_CONTROL); in coda9_jpeg_prepare_encode()
1192 coda_write(dev, 0, CODA9_GDI_WPROT_RGN_EN); in coda9_jpeg_prepare_encode()
1198 return 0; in coda9_jpeg_prepare_encode()
1209 coda_write(ctx->dev, 0, CODA9_REG_JPEG_BBC_FLUSH_CMD); in coda9_jpeg_finish_encode()
1228 start_ptr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0); in coda9_jpeg_finish_encode()
1230 vb2_set_plane_payload(&dst_buf->vb2_buf, 0, wr_ptr - start_ptr); in coda9_jpeg_finish_encode()
1234 coda_dbg(1, ctx, "ERRMB: 0x%x\n", err_mb); in coda9_jpeg_finish_encode()
1236 coda_write(dev, 0, CODA9_REG_JPEG_BBC_FLUSH_CMD); in coda9_jpeg_finish_encode()
1282 if (ctx->params.jpeg_qmat_tab[0] == luma_q) in coda9_jpeg_release()
1283 ctx->params.jpeg_qmat_tab[0] = NULL; in coda9_jpeg_release()
1286 for (i = 0; i < 3; i++) in coda9_jpeg_release()
1307 ctx->params.jpeg_qmat_index[0] = 0; in coda9_jpeg_start_decoding()
1310 ctx->params.jpeg_qmat_tab[0] = luma_q; in coda9_jpeg_start_decoding()
1318 return 0; in coda9_jpeg_start_decoding()
1342 if (vb2_get_plane_payload(&src_buf->vb2_buf, 0) == 0) in coda9_jpeg_prepare_decode()
1343 vb2_set_plane_payload(&src_buf->vb2_buf, 0, in coda9_jpeg_prepare_decode()
1344 vb2_plane_size(&src_buf->vb2_buf, 0)); in coda9_jpeg_prepare_decode()
1347 if (chroma_format < 0) in coda9_jpeg_prepare_decode()
1351 if (ret < 0) { in coda9_jpeg_prepare_decode()
1370 val = ctx->params.jpeg_huff_ac_index[0] << 12 | in coda9_jpeg_prepare_decode()
1373 ctx->params.jpeg_huff_dc_index[0] << 9 | in coda9_jpeg_prepare_decode()
1384 coda_write(dev, 0, CODA9_REG_JPEG_ROT_INFO); in coda9_jpeg_prepare_decode()
1390 val = 0; in coda9_jpeg_prepare_decode()
1404 coda_write(dev, 0, CODA9_REG_JPEG_RST_INDEX); in coda9_jpeg_prepare_decode()
1405 coda_write(dev, 0, CODA9_REG_JPEG_RST_COUNT); in coda9_jpeg_prepare_decode()
1407 coda_write(dev, 0, CODA9_REG_JPEG_DPCM_DIFF_Y); in coda9_jpeg_prepare_decode()
1408 coda_write(dev, 0, CODA9_REG_JPEG_DPCM_DIFF_CB); in coda9_jpeg_prepare_decode()
1409 coda_write(dev, 0, CODA9_REG_JPEG_DPCM_DIFF_CR); in coda9_jpeg_prepare_decode()
1411 coda_write(dev, 0, CODA9_REG_JPEG_ROT_INFO); in coda9_jpeg_prepare_decode()
1429 coda_write(dev, 0, CODA9_REG_JPEG_DPB_BASE00); in coda9_jpeg_prepare_decode()
1430 coda_write(dev, 0, CODA9_GDI_CONTROL); in coda9_jpeg_prepare_decode()
1437 return 0; in coda9_jpeg_prepare_decode()
1449 v4l2_err(&dev->v4l2_dev, "ERRMB: 0x%x\n", err_mb); in coda9_jpeg_finish_decode()
1451 coda_write(dev, 0, CODA9_REG_JPEG_BBC_FLUSH_CMD); in coda9_jpeg_finish_decode()
1472 vb2_set_plane_payload(&dst_buf->vb2_buf, 0, q_data_dst->sizeimage); in coda9_jpeg_finish_decode()
1508 if (status == 0) in coda9_jpeg_irq_handler()
1524 "ERRMB: 0x%x: rst idx %d, mcu pos (%d,%d)\n", in coda9_jpeg_irq_handler()
1525 err_mb, err_mb >> 24, (err_mb >> 12) & 0xfff, in coda9_jpeg_irq_handler()
1526 err_mb & 0xfff); in coda9_jpeg_irq_handler()