msm: camera: import HTC camera stack
HTC kernel version: villeu-jb-crc-3.4.10-ae8b65e
Change-Id: I2d6e652d40c9bcd4a1e46b8a6717e751619f4f08
diff --git a/include/media/msm_isp.h b/include/media/msm_isp.h
index 19953ac..984bb40 100644
--- a/include/media/msm_isp.h
+++ b/include/media/msm_isp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -15,7 +15,6 @@
#define BIT(nr) (1UL << (nr))
-/* ISP message IDs */
#define MSG_ID_RESET_ACK 0
#define MSG_ID_START_ACK 1
#define MSG_ID_STOP_ACK 2
@@ -59,21 +58,9 @@
#define MSG_ID_OUTPUT_PRIMARY 40
#define MSG_ID_OUTPUT_SECONDARY 41
#define MSG_ID_STATS_COMPOSITE 42
-#define MSG_ID_OUTPUT_TERTIARY1 43
+#define MSG_ID_HDR_SOF_ACK 43
#define MSG_ID_STOP_LS_ACK 44
-#define MSG_ID_OUTPUT_TERTIARY2 45
-#define MSG_ID_STATS_BG 46
-#define MSG_ID_STATS_BF 47
-#define MSG_ID_STATS_BHIST 48
-#define MSG_ID_RDI0_UPDATE_ACK 49
-#define MSG_ID_RDI1_UPDATE_ACK 50
-#define MSG_ID_RDI2_UPDATE_ACK 51
-#define MSG_ID_PIX0_UPDATE_ACK 52
-#define MSG_ID_PREV_STOP_ACK 53
-#define MSG_ID_OUTPUT_TERTIARY3 54
-
-/* ISP command IDs */
#define VFE_CMD_DUMMY_0 0
#define VFE_CMD_SET_CLK 1
#define VFE_CMD_RESET 2
@@ -213,34 +200,6 @@
#define VFE_CMD_CAPTURE_RAW 136
#define VFE_CMD_STOP_LIVESHOT 137
#define VFE_CMD_RECONFIG_VFE 138
-#define VFE_CMD_STATS_REQBUF 139
-#define VFE_CMD_STATS_ENQUEUEBUF 140
-#define VFE_CMD_STATS_FLUSH_BUFQ 141
-#define VFE_CMD_STATS_UNREGBUF 142
-#define VFE_CMD_STATS_BG_START 143
-#define VFE_CMD_STATS_BG_STOP 144
-#define VFE_CMD_STATS_BF_START 145
-#define VFE_CMD_STATS_BF_STOP 146
-#define VFE_CMD_STATS_BHIST_START 147
-#define VFE_CMD_STATS_BHIST_STOP 148
-#define VFE_CMD_RESET_2 149
-#define VFE_CMD_FOV_ENC_CFG 150
-#define VFE_CMD_FOV_VIEW_CFG 151
-#define VFE_CMD_FOV_ENC_UPDATE 152
-#define VFE_CMD_FOV_VIEW_UPDATE 153
-#define VFE_CMD_SCALER_ENC_CFG 154
-#define VFE_CMD_SCALER_VIEW_CFG 155
-#define VFE_CMD_SCALER_ENC_UPDATE 156
-#define VFE_CMD_SCALER_VIEW_UPDATE 157
-#define VFE_CMD_COLORXFORM_ENC_CFG 158
-#define VFE_CMD_COLORXFORM_VIEW_CFG 159
-#define VFE_CMD_COLORXFORM_ENC_UPDATE 160
-#define VFE_CMD_COLORXFORM_VIEW_UPDATE 161
-#define VFE_CMD_TEST_GEN_CFG 162
-#define VFE_CMD_SELECT_RDI 163
-#define VFE_CMD_SET_STATS_VER 164
-#define VFE_CMD_RGB_ALL_CFG 165
-#define VFE_CMD_RGB_ALL_UPDATE 166
struct msm_isp_cmd {
int32_t id;
@@ -263,16 +222,15 @@
#define VPE_CMD_ZOOM 13
#define VPE_CMD_MAX 14
-#define MSM_PP_CMD_TYPE_NOT_USED 0 /* not used */
-#define MSM_PP_CMD_TYPE_VPE 1 /* VPE cmd */
-#define MSM_PP_CMD_TYPE_MCTL 2 /* MCTL cmd */
+#define MSM_PP_CMD_TYPE_NOT_USED 0
+#define MSM_PP_CMD_TYPE_VPE 1
+#define MSM_PP_CMD_TYPE_MCTL 2
-#define MCTL_CMD_DUMMY_0 0 /* not used */
-#define MCTL_CMD_GET_FRAME_BUFFER 1 /* reserve a free frame buffer */
-#define MCTL_CMD_PUT_FRAME_BUFFER 2 /* return the free frame buffer */
-#define MCTL_CMD_DIVERT_FRAME_PP_PATH 3 /* divert frame for pp */
+#define MCTL_CMD_DUMMY_0 0
+#define MCTL_CMD_GET_FRAME_BUFFER 1
+#define MCTL_CMD_PUT_FRAME_BUFFER 2
+#define MCTL_CMD_DIVERT_FRAME_PP_PATH 3
-/* event typese sending to MCTL PP module */
#define MCTL_PP_EVENT_NOTUSED 0
#define MCTL_PP_EVENT_CMD_ACK 1
@@ -332,35 +290,41 @@
struct msm_vpe_clock_rate {
uint32_t rate;
};
-
+struct msm_pp_crop {
+ uint32_t src_x;
+ uint32_t src_y;
+ uint32_t src_w;
+ uint32_t src_h;
+ uint32_t dst_x;
+ uint32_t dst_y;
+ uint32_t dst_w;
+ uint32_t dst_h;
+ uint8_t update_flag;
+};
#define MSM_MCTL_PP_VPE_FRAME_ACK (1<<0)
#define MSM_MCTL_PP_VPE_FRAME_TO_APP (1<<1)
-#define VFE_OUTPUTS_MAIN_AND_PREVIEW BIT(0)
-#define VFE_OUTPUTS_MAIN_AND_VIDEO BIT(1)
-#define VFE_OUTPUTS_MAIN_AND_THUMB BIT(2)
-#define VFE_OUTPUTS_THUMB_AND_MAIN BIT(3)
-#define VFE_OUTPUTS_PREVIEW_AND_VIDEO BIT(4)
-#define VFE_OUTPUTS_VIDEO_AND_PREVIEW BIT(5)
-#define VFE_OUTPUTS_PREVIEW BIT(6)
-#define VFE_OUTPUTS_VIDEO BIT(7)
-#define VFE_OUTPUTS_RAW BIT(8)
-#define VFE_OUTPUTS_JPEG_AND_THUMB BIT(9)
-#define VFE_OUTPUTS_THUMB_AND_JPEG BIT(10)
-#define VFE_OUTPUTS_RDI0 BIT(11)
-#define VFE_OUTPUTS_RDI1 BIT(12)
-#define VFE_OUTPUTS_RDI2 BIT(13)
-
-#define VFE_RDI_COMPOSITE (1 << 0)
-#define VFE_RDI_NON_COMPOSITE (1 << 1)
-
-#define VFE_STATS_TYPE_LEGACY 0
-#define VFE_STATS_TYPE_BAYER (1 << 2)
-
-struct msm_frame_info {
- uint32_t inst_handle;
- uint32_t path;
+struct msm_mctl_pp_frame_cmd {
+ uint32_t cookie;
+ uint8_t vpe_output_action;
+ uint32_t src_buf_handle;
+ uint32_t dest_buf_handle;
+ struct msm_pp_crop crop;
+ int path;
+
};
-#endif /*__MSM_ISP_H__*/
+#define VFE_OUTPUTS_MAIN_AND_PREVIEW BIT(0)
+#define VFE_OUTPUTS_MAIN_AND_VIDEO BIT(1)
+#define VFE_OUTPUTS_MAIN_AND_THUMB BIT(2)
+#define VFE_OUTPUTS_THUMB_AND_MAIN BIT(3)
+#define VFE_OUTPUTS_PREVIEW_AND_VIDEO BIT(4)
+#define VFE_OUTPUTS_VIDEO_AND_PREVIEW BIT(5)
+#define VFE_OUTPUTS_PREVIEW BIT(6)
+#define VFE_OUTPUTS_VIDEO BIT(7)
+#define VFE_OUTPUTS_RAW BIT(8)
+#define VFE_OUTPUTS_JPEG_AND_THUMB BIT(9)
+#define VFE_OUTPUTS_THUMB_AND_JPEG BIT(10)
+
+#endif