PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / media / platform / exynos4-is / fimc-is-errno.h
blob3de6f6da6f87058e9c0bc8e12a6658b8764d96b7
1 /*
2 * Samsung Exynos4 SoC series FIMC-IS slave interface driver
4 * FIMC-IS error code definition
6 * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd.
8 * Authors: Younghwan Joo <yhwan.joo@samsung.com>
9 * Sylwester Nawrocki <s.nawrocki@samsung.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #ifndef FIMC_IS_ERR_H_
17 #define FIMC_IS_ERR_H_
19 #define IS_ERROR_VER 011 /* IS ERROR VERSION 0.11 */
21 enum {
22 IS_ERROR_NONE,
24 /* General 1 ~ 99 */
25 IS_ERROR_INVALID_COMMAND,
26 IS_ERROR_REQUEST_FAIL,
27 IS_ERROR_INVALID_SCENARIO,
28 IS_ERROR_INVALID_SENSORID,
29 IS_ERROR_INVALID_MODE_CHANGE,
30 IS_ERROR_INVALID_MAGIC_NUMBER,
31 IS_ERROR_INVALID_SETFILE_HDR,
32 IS_ERROR_BUSY,
33 IS_ERROR_SET_PARAMETER,
34 IS_ERROR_INVALID_PATH,
35 IS_ERROR_OPEN_SENSOR_FAIL,
36 IS_ERROR_ENTRY_MSG_THREAD_DOWN,
37 IS_ERROR_ISP_FRAME_END_NOT_DONE,
38 IS_ERROR_DRC_FRAME_END_NOT_DONE,
39 IS_ERROR_SCALERC_FRAME_END_NOT_DONE,
40 IS_ERROR_ODC_FRAME_END_NOT_DONE,
41 IS_ERROR_DIS_FRAME_END_NOT_DONE,
42 IS_ERROR_TDNR_FRAME_END_NOT_DONE,
43 IS_ERROR_SCALERP_FRAME_END_NOT_DONE,
44 IS_ERROR_WAIT_STREAM_OFF_NOT_DONE,
45 IS_ERROR_NO_MSG_IS_RECEIVED,
46 IS_ERROR_SENSOR_MSG_FAIL,
47 IS_ERROR_ISP_MSG_FAIL,
48 IS_ERROR_DRC_MSG_FAIL,
49 IS_ERROR_SCALERC_MSG_FAIL,
50 IS_ERROR_ODC_MSG_FAIL,
51 IS_ERROR_DIS_MSG_FAIL,
52 IS_ERROR_TDNR_MSG_FAIL,
53 IS_ERROR_SCALERP_MSG_FAIL,
54 IS_ERROR_LHFD_MSG_FAIL,
55 IS_ERROR_LHFD_INTERNAL_STOP,
57 /* Sensor 100 ~ 199 */
58 IS_ERROR_SENSOR_PWRDN_FAIL = 100,
59 IS_ERROR_SENSOR_STREAM_ON_FAIL,
60 IS_ERROR_SENSOR_STREAM_OFF_FAIL,
62 /* ISP 200 ~ 299 */
63 IS_ERROR_ISP_PWRDN_FAIL = 200,
64 IS_ERROR_ISP_MULTIPLE_INPUT,
65 IS_ERROR_ISP_ABSENT_INPUT,
66 IS_ERROR_ISP_ABSENT_OUTPUT,
67 IS_ERROR_ISP_NONADJACENT_OUTPUT,
68 IS_ERROR_ISP_FORMAT_MISMATCH,
69 IS_ERROR_ISP_WIDTH_MISMATCH,
70 IS_ERROR_ISP_HEIGHT_MISMATCH,
71 IS_ERROR_ISP_BITWIDTH_MISMATCH,
72 IS_ERROR_ISP_FRAME_END_TIME_OUT,
74 /* DRC 300 ~ 399 */
75 IS_ERROR_DRC_PWRDN_FAIL = 300,
76 IS_ERROR_DRC_MULTIPLE_INPUT,
77 IS_ERROR_DRC_ABSENT_INPUT,
78 IS_ERROR_DRC_NONADJACENT_INPUT,
79 IS_ERROR_DRC_ABSENT_OUTPUT,
80 IS_ERROR_DRC_NONADJACENT_OUTPUT,
81 IS_ERROR_DRC_FORMAT_MISMATCH,
82 IS_ERROR_DRC_WIDTH_MISMATCH,
83 IS_ERROR_DRC_HEIGHT_MISMATCH,
84 IS_ERROR_DRC_BITWIDTH_MISMATCH,
85 IS_ERROR_DRC_FRAME_END_TIME_OUT,
87 /* SCALERC 400 ~ 499 */
88 IS_ERROR_SCALERC_PWRDN_FAIL = 400,
90 /* ODC 500 ~ 599 */
91 IS_ERROR_ODC_PWRDN_FAIL = 500,
93 /* DIS 600 ~ 699 */
94 IS_ERROR_DIS_PWRDN_FAIL = 600,
96 /* TDNR 700 ~ 799 */
97 IS_ERROR_TDNR_PWRDN_FAIL = 700,
99 /* SCALERC 800 ~ 899 */
100 IS_ERROR_SCALERP_PWRDN_FAIL = 800,
102 /* FD 900 ~ 999 */
103 IS_ERROR_FD_PWRDN_FAIL = 900,
104 IS_ERROR_FD_MULTIPLE_INPUT,
105 IS_ERROR_FD_ABSENT_INPUT,
106 IS_ERROR_FD_NONADJACENT_INPUT,
107 IS_ERROR_LHFD_FRAME_END_TIME_OUT,
109 IS_ERROR_UNKNOWN = 1000,
112 #define IS_ERROR_TIME_OUT_FLAG 0x80000000
114 /* Set parameter error enum */
115 enum fimc_is_error {
116 /* Common error (0~99) */
117 ERROR_COMMON_NONE = 0,
118 ERROR_COMMON_CMD = 1, /* Invalid command */
119 ERROR_COMMON_PARAMETER = 2, /* Invalid parameter */
120 /* setfile is not loaded before adjusting */
121 ERROR_COMMON_SETFILE_LOAD = 3,
122 /* setfile is not Adjusted before runnng. */
123 ERROR_COMMON_SETFILE_ADJUST = 4,
124 /* Index of setfile is not valid (0~MAX_SETFILE_NUM-1) */
125 ERROR_COMMON_SETFILE_INDEX = 5,
126 /* Input path can be changed in ready state(stop) */
127 ERROR_COMMON_INPUT_PATH = 6,
128 /* IP can not start if input path is not set */
129 ERROR_COMMON_INPUT_INIT = 7,
130 /* Output path can be changed in ready state (stop) */
131 ERROR_COMMON_OUTPUT_PATH = 8,
132 /* IP can not start if output path is not set */
133 ERROR_COMMON_OUTPUT_INIT = 9,
135 ERROR_CONTROL_NONE = ERROR_COMMON_NONE,
136 ERROR_CONTROL_BYPASS = 11, /* Enable or Disable */
138 ERROR_OTF_INPUT_NONE = ERROR_COMMON_NONE,
139 ERROR_OTF_INPUT_CMD = 21,
140 /* invalid format (DRC: YUV444, FD: YUV444, 422, 420) */
141 ERROR_OTF_INPUT_FORMAT = 22,
142 /* invalid width (DRC: 128~8192, FD: 32~8190) */
143 ERROR_OTF_INPUT_WIDTH = 23,
144 /* invalid height (DRC: 64~8192, FD: 16~8190) */
145 ERROR_OTF_INPUT_HEIGHT = 24,
146 /* invalid bit-width (DRC: 8~12bits, FD: 8bit) */
147 ERROR_OTF_INPUT_BIT_WIDTH = 25,
148 /* invalid FrameTime for ISP */
149 ERROR_OTF_INPUT_USER_FRAMETIIME = 26,
151 ERROR_DMA_INPUT_NONE = ERROR_COMMON_NONE,
152 /* invalid width (DRC: 128~8192, FD: 32~8190) */
153 ERROR_DMA_INPUT_WIDTH = 31,
154 /* invalid height (DRC: 64~8192, FD: 16~8190) */
155 ERROR_DMA_INPUT_HEIGHT = 32,
156 /* invalid format (DRC: YUV444 or YUV422, FD: YUV444, 422, 420) */
157 ERROR_DMA_INPUT_FORMAT = 33,
158 /* invalid bit-width (DRC: 8~12bit, FD: 8bit) */
159 ERROR_DMA_INPUT_BIT_WIDTH = 34,
160 /* invalid order(DRC: YYCbCrorYCbYCr, FD:NO,YYCbCr,YCbYCr,CbCr,CrCb) */
161 ERROR_DMA_INPUT_ORDER = 35,
162 /* invalid palne (DRC: 3, FD: 1, 2, 3) */
163 ERROR_DMA_INPUT_PLANE = 36,
165 ERROR_OTF_OUTPUT_NONE = ERROR_COMMON_NONE,
166 /* invalid width (DRC: 128~8192) */
167 ERROR_OTF_OUTPUT_WIDTH = 41,
168 /* invalid height (DRC: 64~8192) */
169 ERROR_OTF_OUTPUT_HEIGHT = 42,
170 /* invalid format (DRC: YUV444) */
171 ERROR_OTF_OUTPUT_FORMAT = 43,
172 /* invalid bit-width (DRC: 8~12bits) */
173 ERROR_OTF_OUTPUT_BIT_WIDTH = 44,
175 ERROR_DMA_OUTPUT_NONE = ERROR_COMMON_NONE,
176 ERROR_DMA_OUTPUT_WIDTH = 51, /* invalid width */
177 ERROR_DMA_OUTPUT_HEIGHT = 52, /* invalid height */
178 ERROR_DMA_OUTPUT_FORMAT = 53, /* invalid format */
179 ERROR_DMA_OUTPUT_BIT_WIDTH = 54, /* invalid bit-width */
180 ERROR_DMA_OUTPUT_PLANE = 55, /* invalid plane */
181 ERROR_DMA_OUTPUT_ORDER = 56, /* invalid order */
183 ERROR_GLOBAL_SHOTMODE_NONE = ERROR_COMMON_NONE,
185 /* SENSOR Error(100~199) */
186 ERROR_SENSOR_NONE = ERROR_COMMON_NONE,
187 ERROR_SENSOR_I2C_FAIL = 101,
188 ERROR_SENSOR_INVALID_FRAMERATE,
189 ERROR_SENSOR_INVALID_EXPOSURETIME,
190 ERROR_SENSOR_INVALID_SIZE,
191 ERROR_SENSOR_INVALID_SETTING,
192 ERROR_SENSOR_ACTURATOR_INIT_FAIL,
193 ERROR_SENSOR_INVALID_AF_POS,
194 ERROR_SENSOR_UNSUPPORT_FUNC,
195 ERROR_SENSOR_UNSUPPORT_PERI,
196 ERROR_SENSOR_UNSUPPORT_AF,
198 /* ISP Error (200~299) */
199 ERROR_ISP_AF_NONE = ERROR_COMMON_NONE,
200 ERROR_ISP_AF_BUSY = 201,
201 ERROR_ISP_AF_INVALID_COMMAND = 202,
202 ERROR_ISP_AF_INVALID_MODE = 203,
203 ERROR_ISP_FLASH_NONE = ERROR_COMMON_NONE,
204 ERROR_ISP_AWB_NONE = ERROR_COMMON_NONE,
205 ERROR_ISP_IMAGE_EFFECT_NONE = ERROR_COMMON_NONE,
206 ERROR_ISP_ISO_NONE = ERROR_COMMON_NONE,
207 ERROR_ISP_ADJUST_NONE = ERROR_COMMON_NONE,
208 ERROR_ISP_METERING_NONE = ERROR_COMMON_NONE,
209 ERROR_ISP_AFC_NONE = ERROR_COMMON_NONE,
211 /* DRC Error (300~399) */
213 /* FD Error (400~499) */
214 ERROR_FD_NONE = ERROR_COMMON_NONE,
215 /* Invalid max number (1~16) */
216 ERROR_FD_CONFIG_MAX_NUMBER_STATE = 401,
217 ERROR_FD_CONFIG_MAX_NUMBER_INVALID = 402,
218 ERROR_FD_CONFIG_YAW_ANGLE_STATE = 403,
219 ERROR_FD_CONFIG_YAW_ANGLE_INVALID = 404,
220 ERROR_FD_CONFIG_ROLL_ANGLE_STATE = 405,
221 ERROR_FD_CONFIG_ROLL_ANGLE_INVALID = 406,
222 ERROR_FD_CONFIG_SMILE_MODE_INVALID = 407,
223 ERROR_FD_CONFIG_BLINK_MODE_INVALID = 408,
224 ERROR_FD_CONFIG_EYES_DETECT_INVALID = 409,
225 ERROR_FD_CONFIG_MOUTH_DETECT_INVALID = 410,
226 ERROR_FD_CONFIG_ORIENTATION_STATE = 411,
227 ERROR_FD_CONFIG_ORIENTATION_INVALID = 412,
228 ERROR_FD_CONFIG_ORIENTATION_VALUE_INVALID = 413,
229 /* PARAM_FdResultStr can be only applied in ready-state or stream off */
230 ERROR_FD_RESULT = 414,
231 /* PARAM_FdModeStr can be only applied in ready-state or stream off */
232 ERROR_FD_MODE = 415,
233 /* Scaler Error (500 ~ 599) */
234 ERROR_SCALER_NO_NONE = ERROR_COMMON_NONE,
235 ERROR_SCALER_DMA_OUTSEL = 501,
236 ERROR_SCALER_H_RATIO = 502,
237 ERROR_SCALER_V_RATIO = 503,
239 ERROR_SCALER_IMAGE_EFFECT = 510,
241 ERROR_SCALER_ROTATE = 520,
242 ERROR_SCALER_FLIP = 521,
245 const char * const fimc_is_strerr(unsigned int error);
246 const char * const fimc_is_param_strerr(unsigned int error);
248 #endif /* FIMC_IS_ERR_H_ */