fimc-is-errno.h 7.4 KB

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