fimc-is-errno.h 7.5 KB

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