2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __INPUT_SYSTEM_LOCAL_H_INCLUDED__
16 #define __INPUT_SYSTEM_LOCAL_H_INCLUDED__
18 #include "type_support.h"
19 #include "input_system_global.h"
21 #include "ibuf_ctrl.h"
24 #include "isys_stream2mmio.h"
27 typedef input_system_err_t input_system_error_t;
30 MIPI_FORMAT_SHORT1 = 0x08,
38 MIPI_FORMAT_EMBEDDED = 0x12,
39 MIPI_FORMAT_YUV420_8 = 0x18,
40 MIPI_FORMAT_YUV420_10,
41 MIPI_FORMAT_YUV420_8_LEGACY,
42 MIPI_FORMAT_YUV420_8_SHIFT = 0x1C,
43 MIPI_FORMAT_YUV420_10_SHIFT,
44 MIPI_FORMAT_YUV422_8 = 0x1E,
45 MIPI_FORMAT_YUV422_10,
46 MIPI_FORMAT_RGB444 = 0x20,
51 MIPI_FORMAT_RAW6 = 0x28,
57 MIPI_FORMAT_CUSTOM0 = 0x30,
65 //MIPI_FORMAT_RAW16, /*not supported by 2401*/
70 #define N_MIPI_FORMAT_CUSTOM 8
72 /* The number of stores for compressed format types */
73 #define N_MIPI_COMPRESSOR_CONTEXT (N_RX_CHANNEL_ID * N_MIPI_FORMAT_CUSTOM)
74 #define UNCOMPRESSED_BITS_PER_PIXEL_10 10
75 #define UNCOMPRESSED_BITS_PER_PIXEL_12 12
76 #define COMPRESSED_BITS_PER_PIXEL_6 6
77 #define COMPRESSED_BITS_PER_PIXEL_7 7
78 #define COMPRESSED_BITS_PER_PIXEL_8 8
79 enum mipi_compressor {
80 MIPI_COMPRESSOR_NONE = 0,
81 MIPI_COMPRESSOR_10_6_10,
82 MIPI_COMPRESSOR_10_7_10,
83 MIPI_COMPRESSOR_10_8_10,
84 MIPI_COMPRESSOR_12_6_12,
85 MIPI_COMPRESSOR_12_7_12,
86 MIPI_COMPRESSOR_12_8_12,
87 N_MIPI_COMPRESSOR_METHODS
91 MIPI_PREDICTOR_NONE = 0,
94 N_MIPI_PREDICTOR_TYPES
97 typedef struct input_system_state_s input_system_state_t;
98 struct input_system_state_s {
99 ibuf_ctrl_state_t ibuf_ctrl_state[N_IBUF_CTRL_ID];
100 csi_rx_fe_ctrl_state_t csi_rx_fe_ctrl_state[N_CSI_RX_FRONTEND_ID];
101 csi_rx_be_ctrl_state_t csi_rx_be_ctrl_state[N_CSI_RX_BACKEND_ID];
102 pixelgen_ctrl_state_t pixelgen_ctrl_state[N_PIXELGEN_ID];
103 stream2mmio_state_t stream2mmio_state[N_STREAM2MMIO_ID];
104 isys_irqc_state_t isys_irqc_state[N_ISYS_IRQ_ID];
106 #endif /* __INPUT_SYSTEM_LOCAL_H_INCLUDED__ */