mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
misc: import T530NUUES1BPL1 camera source code
Change-Id: Ie9ff114046d45352e85bf23b1aa31f0e9450c731
This commit is contained in:
parent
77ac392db0
commit
8f8cf6ba66
37 changed files with 243 additions and 11750 deletions
|
@ -35,9 +35,6 @@
|
|||
#define fh_to_private(__fh) \
|
||||
container_of(__fh, struct camera_v4l2_private, fh)
|
||||
|
||||
extern struct task_struct *qdaemon_task;
|
||||
#define QDAEMON "mm-qcamera"
|
||||
|
||||
struct camera_v4l2_private {
|
||||
struct v4l2_fh fh;
|
||||
unsigned int stream_id;
|
||||
|
@ -583,7 +580,7 @@ static int camera_v4l2_open(struct file *filep)
|
|||
}
|
||||
|
||||
if (!atomic_read(&pvdev->opened)) {
|
||||
pm_stay_awake(&pvdev->vdev->dev);
|
||||
|
||||
/* create a new session when first opened */
|
||||
rc = msm_create_session(pvdev->vdev->num, pvdev->vdev);
|
||||
if (rc < 0) {
|
||||
|
@ -600,19 +597,8 @@ static int camera_v4l2_open(struct file *filep)
|
|||
camera_pack_event(filep, MSM_CAMERA_NEW_SESSION, 0, -1, &event);
|
||||
rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
|
||||
if (rc < 0) {
|
||||
pr_err("%s, __dbg: post fail \n", __func__);
|
||||
if (qdaemon_task) {
|
||||
if (!strncmp(qdaemon_task->comm, QDAEMON, strlen(QDAEMON))) {
|
||||
pr_err("%s, kill daemon", __func__);
|
||||
send_sig(SIGKILL, qdaemon_task, 0);
|
||||
pr_err("%s, kill this", __func__);
|
||||
send_sig(SIGKILL, current, 0);
|
||||
} else
|
||||
pr_err("%s, now (%s : %d)", __func__,
|
||||
qdaemon_task->comm, task_pid_nr(qdaemon_task));
|
||||
} else
|
||||
pr_err("error!! can't look for daemon");
|
||||
goto post_fail;
|
||||
pr_err("%s, __dbg: post fail \n",__func__);
|
||||
goto post_fail;
|
||||
}
|
||||
rc = camera_check_event_status(&event);
|
||||
if (rc < 0) {
|
||||
|
@ -638,7 +624,6 @@ post_fail:
|
|||
command_ack_q_fail:
|
||||
msm_destroy_session(pvdev->vdev->num);
|
||||
session_fail:
|
||||
pm_relax(&pvdev->vdev->dev);
|
||||
camera_v4l2_vb2_q_release(filep);
|
||||
vb2_q_fail:
|
||||
camera_v4l2_fh_release(filep);
|
||||
|
@ -695,7 +680,6 @@ static int camera_v4l2_close(struct file *filep)
|
|||
/* This should take care of both normal close
|
||||
* and application crashes */
|
||||
msm_destroy_session(pvdev->vdev->num);
|
||||
pm_relax(&pvdev->vdev->dev);
|
||||
|
||||
} else {
|
||||
camera_pack_event(filep, MSM_CAMERA_SET_PARM,
|
||||
|
@ -797,7 +781,6 @@ int camera_init_v4l2(struct device *dev, unsigned int *session)
|
|||
*session = pvdev->vdev->num;
|
||||
atomic_set(&pvdev->opened, 0);
|
||||
video_set_drvdata(pvdev->vdev, pvdev);
|
||||
device_init_wakeup(&pvdev->vdev->dev, 1);
|
||||
pr_warn("%s : Succeed!", __func__);
|
||||
goto init_end;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ static struct msm_isp_bufq *msm_isp_get_bufq(
|
|||
{
|
||||
struct msm_isp_bufq *bufq = NULL;
|
||||
uint32_t bufq_index = bufq_handle & 0xFF;
|
||||
if (bufq_index >= buf_mgr->num_buf_q)
|
||||
if (bufq_index > buf_mgr->num_buf_q)
|
||||
return bufq;
|
||||
|
||||
bufq = &buf_mgr->bufq[bufq_index];
|
||||
|
@ -121,7 +121,7 @@ static int msm_isp_prepare_v4l2_buf(struct msm_isp_buf_mgr *buf_mgr,
|
|||
ion_import_dma_buf(buf_mgr->client,
|
||||
v4l2_buf->m.planes[i].m.userptr);
|
||||
if (IS_ERR_OR_NULL(mapped_info->handle)) {
|
||||
pr_err("%s: buf has null/error ION handle %pK\n",
|
||||
pr_err("%s: buf has null/error ION handle %p\n",
|
||||
__func__, mapped_info->handle);
|
||||
goto ion_map_error;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <mach/iommu.h>
|
||||
#include <linux/ratelimit.h>
|
||||
|
||||
|
@ -977,7 +976,7 @@ static void msm_vfe40_axi_clear_wm_xbar_reg(
|
|||
vfe_dev->vfe_base + VFE40_XBAR_BASE(wm));
|
||||
}
|
||||
|
||||
#define MSM_ISP40_TOTAL_WM_UB 1140
|
||||
#define MSM_ISP40_TOTAL_WM_UB 819
|
||||
|
||||
static void msm_vfe40_cfg_axi_ub_equal_default(
|
||||
struct vfe_device *vfe_dev)
|
||||
|
@ -988,7 +987,7 @@ static void msm_vfe40_cfg_axi_ub_equal_default(
|
|||
&vfe_dev->axi_data;
|
||||
uint32_t total_image_size = 0;
|
||||
uint8_t num_used_wms = 0;
|
||||
uint64_t prop_size = 0;
|
||||
uint32_t prop_size = 0;
|
||||
uint32_t wm_ub_size;
|
||||
uint32_t delta;
|
||||
|
||||
|
@ -1003,8 +1002,8 @@ static void msm_vfe40_cfg_axi_ub_equal_default(
|
|||
for (i = 0; i < axi_data->hw_info->num_wm; i++) {
|
||||
if (axi_data->free_wm[i]) {
|
||||
delta =
|
||||
(uint32_t)DIV_ROUND_UP_ULL((prop_size *
|
||||
axi_data->wm_image_size[i]), total_image_size);
|
||||
(axi_data->wm_image_size[i] *
|
||||
prop_size)/total_image_size;
|
||||
wm_ub_size = axi_data->hw_info->min_wm_ub + delta;
|
||||
msm_camera_io_w(ub_offset << 16 | (wm_ub_size - 1),
|
||||
vfe_dev->vfe_base + VFE40_WM_BASE(i) + 0x10);
|
||||
|
@ -1348,7 +1347,7 @@ static void msm_vfe40_get_halt_restart_mask(uint32_t *irq0_mask,
|
|||
*irq1_mask = BIT(8);
|
||||
}
|
||||
static struct msm_vfe_axi_hardware_info msm_vfe40_axi_hw_info = {
|
||||
.num_wm = 6,
|
||||
.num_wm = 5,
|
||||
.num_comp_mask = 2,
|
||||
.num_rdi = 3,
|
||||
.num_rdi_master = 3,
|
||||
|
|
|
@ -236,18 +236,14 @@ void msm_isp_axi_reserve_wm(struct msm_vfe_axi_shared_data *axi_data,
|
|||
if (!axi_data->free_wm[j]) {
|
||||
axi_data->free_wm[j] =
|
||||
stream_info->stream_handle;
|
||||
axi_data->wm_image_size[j] =
|
||||
msm_isp_axi_get_plane_size(
|
||||
stream_info, i);
|
||||
axi_data->wm_image_size[j] =
|
||||
stream_info->plane_cfg[i].output_height *
|
||||
stream_info->plane_cfg[i].output_width;
|
||||
axi_data->num_used_wm++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
stream_info->wm[i] = j;
|
||||
pr_err("%s reserved WM %d for stream %d session %d\n", __func__, j, stream_info->stream_id,
|
||||
stream_info->session_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -305,14 +301,7 @@ int msm_isp_axi_check_stream_state(
|
|||
enum msm_vfe_axi_state valid_state =
|
||||
(stream_cfg_cmd->cmd == START_STREAM) ? INACTIVE : ACTIVE;
|
||||
|
||||
if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
stream_info = &axi_data->stream_info[
|
||||
HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])];
|
||||
spin_lock_irqsave(&stream_info->lock, flags);
|
||||
|
@ -321,8 +310,7 @@ int msm_isp_axi_check_stream_state(
|
|||
stream_info->state == PAUSED ||
|
||||
stream_info->state == RESUME_PENDING ||
|
||||
stream_info->state == RESUMING) &&
|
||||
(stream_cfg_cmd->cmd == STOP_STREAM ||
|
||||
stream_cfg_cmd->cmd == STOP_IMMEDIATELY)) {
|
||||
stream_cfg_cmd->cmd == STOP_STREAM) {
|
||||
stream_info->state = ACTIVE;
|
||||
} else {
|
||||
spin_unlock_irqrestore(
|
||||
|
@ -503,8 +491,8 @@ int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
&vfe_dev->axi_data, stream_cfg_cmd);
|
||||
if (rc) {
|
||||
pr_err("%s: Request validation failed\n", __func__);
|
||||
if (HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle) < MAX_NUM_STREAM)
|
||||
msm_isp_axi_destroy_stream(&vfe_dev->axi_data,HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle));
|
||||
msm_isp_axi_destroy_stream(&vfe_dev->axi_data,
|
||||
HANDLE_TO_IDX(stream_cfg_cmd->axi_stream_handle));
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -554,15 +542,11 @@ int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
int rc = 0, i;
|
||||
struct msm_vfe_axi_stream_release_cmd *stream_release_cmd = arg;
|
||||
struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
|
||||
struct msm_vfe_axi_stream *stream_info;
|
||||
struct msm_vfe_axi_stream *stream_info =
|
||||
&axi_data->stream_info[
|
||||
HANDLE_TO_IDX(stream_release_cmd->stream_handle)];
|
||||
struct msm_vfe_axi_stream_cfg_cmd stream_cfg;
|
||||
|
||||
if (HANDLE_TO_IDX(stream_release_cmd->stream_handle) >= MAX_NUM_STREAM) {
|
||||
pr_err("%s: Invalid stream handle\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
stream_info = &axi_data->stream_info[HANDLE_TO_IDX(stream_release_cmd->stream_handle)];
|
||||
|
||||
if (stream_info->state == AVALIABLE) {
|
||||
pr_err("%s: Stream already released\n", __func__);
|
||||
return -EINVAL;
|
||||
|
@ -644,9 +628,7 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev)
|
|||
}
|
||||
}
|
||||
|
||||
if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF ||
|
||||
(vfe_dev->axi_data.pipeline_update ==
|
||||
DISABLE_CAMIF_IMMEDIATELY)) {
|
||||
if (vfe_dev->axi_data.pipeline_update == DISABLE_CAMIF) {
|
||||
vfe_dev->hw_info->vfe_ops.stats_ops.
|
||||
enable_module(vfe_dev, 0xFF, 0);
|
||||
vfe_dev->axi_data.pipeline_update = NO_UPDATE;
|
||||
|
@ -785,10 +767,6 @@ static void msm_isp_process_done_buf(struct vfe_device *vfe_dev,
|
|||
uint32_t stream_idx = HANDLE_TO_IDX(stream_info->stream_handle);
|
||||
uint32_t frame_id = vfe_dev->axi_data.
|
||||
src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id;
|
||||
if (stream_idx >= MAX_NUM_STREAM) {
|
||||
pr_err("%s: Invalid stream_idx", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (buf && ts) {
|
||||
if (stream_info->buf_divert) {
|
||||
|
@ -851,10 +829,6 @@ enum msm_isp_camif_update_state
|
|||
(cur_pix_stream_cnt - pix_stream_cnt) == 0 &&
|
||||
stream_cfg_cmd->cmd == STOP_STREAM)
|
||||
return DISABLE_CAMIF;
|
||||
else if (cur_pix_stream_cnt &&
|
||||
(cur_pix_stream_cnt - pix_stream_cnt) == 0 &&
|
||||
stream_cfg_cmd->cmd == STOP_IMMEDIATELY)
|
||||
return DISABLE_CAMIF_IMMEDIATELY;
|
||||
}
|
||||
return NO_UPDATE;
|
||||
}
|
||||
|
@ -866,15 +840,7 @@ void msm_isp_update_camif_output_count(
|
|||
int i;
|
||||
struct msm_vfe_axi_stream *stream_info;
|
||||
struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
|
||||
|
||||
if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) {
|
||||
return;
|
||||
}
|
||||
stream_info =
|
||||
&axi_data->stream_info[
|
||||
HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])];
|
||||
|
@ -954,8 +920,8 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev)
|
|||
if (num_pix_streams > 0)
|
||||
total_pix_bandwidth = total_pix_bandwidth /
|
||||
num_pix_streams * (num_pix_streams - 1) +
|
||||
(unsigned long)axi_data->src_info[VFE_PIX_0].pixel_clock *
|
||||
(ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2);
|
||||
axi_data->src_info[VFE_PIX_0].pixel_clock *
|
||||
ISP_DEFAULT_FORMAT_FACTOR / ISP_Q2;
|
||||
total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth;
|
||||
|
||||
rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id,
|
||||
|
@ -975,7 +941,9 @@ static int msm_isp_axi_wait_for_cfg_done(struct vfe_device *vfe_dev,
|
|||
spin_lock_irqsave(&vfe_dev->shared_data_lock, flags);
|
||||
init_completion(&vfe_dev->stream_config_complete);
|
||||
vfe_dev->axi_data.pipeline_update = camif_update;
|
||||
#if defined(CONFIG_SEC_CONFIGURE_ISP_STOP)
|
||||
#if defined(CONFIG_MACH_AFYONLTE_TMO) \
|
||||
|| defined(CONFIG_MACH_AFYONLTE_MTR) \
|
||||
|| defined(CONFIG_SEC_RUBENS_PROJECT)
|
||||
vfe_dev->axi_data.stream_update = 1;
|
||||
#else
|
||||
vfe_dev->axi_data.stream_update = 2;
|
||||
|
@ -1049,7 +1017,9 @@ static void msm_isp_get_stream_wm_mask(
|
|||
*wm_reload_mask |= (1 << stream_info->wm[i]);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SEC_CONFIGURE_ISP_STOP)
|
||||
#if defined(CONFIG_MACH_AFYONLTE_TMO) \
|
||||
|| defined(CONFIG_MACH_AFYONLTE_MTR) \
|
||||
|| defined(CONFIG_SEC_RUBENS_PROJECT)
|
||||
|
||||
static void msm_isp_axi_stream_update_new(struct vfe_device *vfe_dev, enum msm_isp_camif_update_state camif_update)
|
||||
{
|
||||
|
@ -1081,15 +1051,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev,
|
|||
uint32_t wm_reload_mask = 0x0;
|
||||
struct msm_vfe_axi_stream *stream_info;
|
||||
struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
|
||||
|
||||
if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
stream_info = &axi_data->stream_info[
|
||||
HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])];
|
||||
src_state = axi_data->src_info[
|
||||
|
@ -1128,7 +1090,9 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev,
|
|||
vfe_dev->hw_info->vfe_ops.core_ops.
|
||||
update_camif_state(vfe_dev, camif_update);
|
||||
}
|
||||
#if defined(CONFIG_SEC_CONFIGURE_ISP_STOP)
|
||||
#if defined(CONFIG_MACH_AFYONLTE_TMO) \
|
||||
|| defined(CONFIG_MACH_AFYONLTE_MTR) \
|
||||
|| defined(CONFIG_SEC_RUBENS_PROJECT)
|
||||
if (wait_for_complete){
|
||||
msm_isp_axi_stream_update_new(vfe_dev, camif_update);
|
||||
rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, camif_update);
|
||||
|
@ -1148,20 +1112,14 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev,
|
|||
int i, rc = 0;
|
||||
struct msm_vfe_axi_stream *stream_info;
|
||||
struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
|
||||
|
||||
if (stream_cfg_cmd->num_streams > MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
if (HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]) >= MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
stream_info = &axi_data->stream_info[
|
||||
HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i])];
|
||||
stream_info->state = STOP_PENDING;
|
||||
}
|
||||
#if defined(CONFIG_SEC_CONFIGURE_ISP_STOP)
|
||||
#if defined(CONFIG_MACH_AFYONLTE_TMO) \
|
||||
|| defined (CONFIG_MACH_AFYONLTE_MTR) \
|
||||
|| defined(CONFIG_SEC_RUBENS_PROJECT)
|
||||
pr_err("[richard] %s : state [%d], camif_update [%d]\n", __func__, stream_info->state, camif_update);
|
||||
msm_isp_axi_stream_update_new(vfe_dev, DISABLE_CAMIF);
|
||||
rc = msm_isp_axi_wait_for_cfg_done(vfe_dev, NO_UPDATE);
|
||||
|
@ -1185,9 +1143,6 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev,
|
|||
if (camif_update == DISABLE_CAMIF)
|
||||
vfe_dev->hw_info->vfe_ops.core_ops.
|
||||
update_camif_state(vfe_dev, DISABLE_CAMIF);
|
||||
else if (camif_update == DISABLE_CAMIF_IMMEDIATELY)
|
||||
vfe_dev->hw_info->vfe_ops.core_ops.
|
||||
update_camif_state(vfe_dev, DISABLE_CAMIF_IMMEDIATELY);
|
||||
msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd);
|
||||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
|
@ -1244,16 +1199,8 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
/*num_stream is uint32 and update_info[] bound by MAX_NUM_STREAM*/
|
||||
if (update_cmd->num_streams > MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < update_cmd->num_streams; i++) {
|
||||
update_info = &update_cmd->update_info[i];
|
||||
if (HANDLE_TO_IDX(update_info->stream_handle) >= MAX_NUM_STREAM) {
|
||||
return -EINVAL;
|
||||
}
|
||||
stream_info = &axi_data->stream_info[
|
||||
HANDLE_TO_IDX(update_info->stream_handle)];
|
||||
if (stream_info->state != ACTIVE &&
|
||||
|
@ -1351,8 +1298,7 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev,
|
|||
for (i = 0; i < axi_data->hw_info->num_comp_mask; i++) {
|
||||
comp_info = &axi_data->composite_info[i];
|
||||
if (comp_mask & (1 << i)) {
|
||||
stream_idx = HANDLE_TO_IDX(comp_info->stream_handle);
|
||||
if ((!comp_info->stream_handle) || (stream_idx >= MAX_NUM_STREAM)) {
|
||||
if (!comp_info->stream_handle) {
|
||||
pr_err("%s: Invalid handle for composite irq\n",
|
||||
__func__);
|
||||
} else {
|
||||
|
@ -1389,12 +1335,12 @@ void msm_isp_process_axi_irq(struct vfe_device *vfe_dev,
|
|||
|
||||
for (i = 0; i < axi_data->hw_info->num_wm; i++) {
|
||||
if (wm_mask & (1 << i)) {
|
||||
stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]);
|
||||
if ((!axi_data->free_wm[i]) || (stream_idx >= MAX_NUM_STREAM)) {
|
||||
if (!axi_data->free_wm[i]) {
|
||||
pr_err("%s: Invalid handle for wm irq\n",
|
||||
__func__);
|
||||
continue;
|
||||
}
|
||||
stream_idx = HANDLE_TO_IDX(axi_data->free_wm[i]);
|
||||
stream_info = &axi_data->stream_info[stream_idx];
|
||||
ISP_DBG("%s: stream%d frame id: 0x%x\n",
|
||||
__func__,
|
||||
|
|
|
@ -23,16 +23,8 @@ static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev,
|
|||
struct msm_isp_buffer *buf;
|
||||
uint32_t pingpong_bit = 0;
|
||||
uint32_t bufq_handle = stream_info->bufq_handle;
|
||||
uint32_t stats_pingpong_offset;
|
||||
|
||||
if (STATS_IDX(stream_info->stream_handle) >=
|
||||
vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__,
|
||||
STATS_IDX(stream_info->stream_handle));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stats_pingpong_offset = STATS_IDX(stream_info->stream_handle) +
|
||||
uint32_t stats_pingpong_offset =
|
||||
STATS_IDX(stream_info->stream_handle) +
|
||||
vfe_dev->hw_info->stats_hw_info->stats_ping_pong_offset;
|
||||
|
||||
pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1);
|
||||
|
@ -158,11 +150,6 @@ int msm_isp_stats_create_stream(struct vfe_device *vfe_dev,
|
|||
stats_idx = vfe_dev->hw_info->vfe_ops.stats_ops.
|
||||
get_stats_idx(stream_req_cmd->stats_type);
|
||||
|
||||
if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, stats_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[stats_idx];
|
||||
if (stream_info->state != STATS_AVALIABLE) {
|
||||
pr_err("%s: Stats already requested\n", __func__);
|
||||
|
@ -201,7 +188,7 @@ int msm_isp_stats_create_stream(struct vfe_device *vfe_dev,
|
|||
|
||||
int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg)
|
||||
{
|
||||
int rc = -1;
|
||||
int rc = 0;
|
||||
struct msm_vfe_stats_stream_request_cmd *stream_req_cmd = arg;
|
||||
struct msm_vfe_stats_stream *stream_info = NULL;
|
||||
struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data;
|
||||
|
@ -215,12 +202,6 @@ int msm_isp_request_stats_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
}
|
||||
|
||||
stats_idx = STATS_IDX(stream_req_cmd->stream_handle);
|
||||
|
||||
if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, stats_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[stats_idx];
|
||||
|
||||
framedrop_period = msm_isp_get_framedrop_period(
|
||||
|
@ -247,14 +228,8 @@ int msm_isp_release_stats_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
struct msm_vfe_stats_stream_release_cmd *stream_release_cmd = arg;
|
||||
struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data;
|
||||
int stats_idx = STATS_IDX(stream_release_cmd->stream_handle);
|
||||
struct msm_vfe_stats_stream *stream_info = NULL;
|
||||
|
||||
if (stats_idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, stats_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[stats_idx];
|
||||
struct msm_vfe_stats_stream *stream_info =
|
||||
&stats_data->stream_info[stats_idx];
|
||||
|
||||
if (stream_info->state == STATS_AVALIABLE) {
|
||||
pr_err("%s: stream already release\n", __func__);
|
||||
|
@ -387,12 +362,6 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev,
|
|||
struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data;
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]);
|
||||
|
||||
if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[idx];
|
||||
if (stream_info->stream_handle !=
|
||||
stream_cfg_cmd->stream_handle[i]) {
|
||||
|
@ -437,12 +406,6 @@ static int msm_isp_stop_stats_stream(struct vfe_device *vfe_dev,
|
|||
struct msm_vfe_stats_shared_data *stats_data = &vfe_dev->stats_data;
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]);
|
||||
|
||||
if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[idx];
|
||||
if (stream_info->stream_handle !=
|
||||
stream_cfg_cmd->stream_handle[i]) {
|
||||
|
@ -473,12 +436,6 @@ static int msm_isp_stop_stats_stream(struct vfe_device *vfe_dev,
|
|||
|
||||
for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
|
||||
idx = STATS_IDX(stream_cfg_cmd->stream_handle[i]);
|
||||
|
||||
if (idx >= vfe_dev->hw_info->stats_hw_info->num_stats_type) {
|
||||
pr_err("%s Invalid stats index %d", __func__, idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
stream_info = &stats_data->stream_info[idx];
|
||||
msm_isp_deinit_stats_ping_pong_reg(vfe_dev, stream_info);
|
||||
}
|
||||
|
@ -492,12 +449,6 @@ int msm_isp_cfg_stats_stream(struct vfe_device *vfe_dev, void *arg)
|
|||
if (vfe_dev->stats_data.num_active_stream == 0)
|
||||
vfe_dev->hw_info->vfe_ops.stats_ops.cfg_ub(vfe_dev);
|
||||
|
||||
if (stream_cfg_cmd->num_streams > MSM_ISP_STATS_MAX) {
|
||||
pr_err("%s invalid num_streams %d\n", __func__,
|
||||
stream_cfg_cmd->num_streams);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (stream_cfg_cmd->enable)
|
||||
rc = msm_isp_start_stats_stream(vfe_dev, stream_cfg_cmd);
|
||||
else
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
static DEFINE_MUTEX(bandwidth_mgr_mutex);
|
||||
static struct msm_isp_bandwidth_mgr isp_bandwidth_mgr;
|
||||
|
||||
#define MSM_ISP_MIN_AB 300000000ULL * 2
|
||||
#define MSM_ISP_MIN_IB 450000000ULL * 2
|
||||
#define MSM_ISP_MIN_AB 300000000
|
||||
#define MSM_ISP_MIN_IB 450000000
|
||||
|
||||
|
||||
static struct msm_bus_vectors msm_isp_init_vectors[] = {
|
||||
|
@ -43,7 +43,7 @@ static struct msm_bus_vectors msm_isp_ping_vectors[] = {
|
|||
.src = MSM_BUS_MASTER_VFE,
|
||||
.dst = MSM_BUS_SLAVE_EBI_CH0,
|
||||
.ab = MSM_ISP_MIN_AB,
|
||||
.ib = (uint64_t)MSM_ISP_MIN_IB,
|
||||
.ib = MSM_ISP_MIN_IB,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ static struct msm_bus_vectors msm_isp_pong_vectors[] = {
|
|||
.src = MSM_BUS_MASTER_VFE,
|
||||
.dst = MSM_BUS_SLAVE_EBI_CH0,
|
||||
.ab = MSM_ISP_MIN_AB,
|
||||
.ib = (uint64_t)MSM_ISP_MIN_IB,
|
||||
.ib = MSM_ISP_MIN_IB,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -388,7 +388,7 @@ long msm_isp_ioctl(struct v4l2_subdev *sd,
|
|||
break;
|
||||
case VIDIOC_MSM_ISP_SET_SRC_STATE:
|
||||
mutex_lock(&vfe_dev->core_mutex);
|
||||
rc = msm_isp_set_src_state(vfe_dev, arg);
|
||||
msm_isp_set_src_state(vfe_dev, arg);
|
||||
mutex_unlock(&vfe_dev->core_mutex);
|
||||
break;
|
||||
case VIDIOC_MSM_ISP_REQUEST_STATS_STREAM:
|
||||
|
@ -429,13 +429,13 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev,
|
|||
uint32_t *cfg_data, uint32_t cmd_len)
|
||||
{
|
||||
if (!vfe_dev || !reg_cfg_cmd) {
|
||||
pr_err("%s:%d failed: vfe_dev %pK reg_cfg_cmd %pK\n", __func__,
|
||||
pr_err("%s:%d failed: vfe_dev %p reg_cfg_cmd %p\n", __func__,
|
||||
__LINE__, vfe_dev, reg_cfg_cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
if ((reg_cfg_cmd->cmd_type != VFE_CFG_MASK) &&
|
||||
(!cfg_data || !cmd_len)) {
|
||||
pr_err("%s:%d failed: cmd type %d cfg_data %pK cmd_len %d\n",
|
||||
pr_err("%s:%d failed: cmd type %d cfg_data %p cmd_len %d\n",
|
||||
__func__, __LINE__, reg_cfg_cmd->cmd_type, cfg_data,
|
||||
cmd_len);
|
||||
return -EINVAL;
|
||||
|
@ -478,8 +478,7 @@ static int msm_isp_send_hw_cmd(struct vfe_device *vfe_dev,
|
|||
case VFE_READ_DMI_16BIT:
|
||||
case VFE_READ_DMI_32BIT:
|
||||
case VFE_READ_DMI_64BIT: {
|
||||
if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT ||
|
||||
reg_cfg_cmd->cmd_type == VFE_READ_DMI_64BIT) {
|
||||
if (reg_cfg_cmd->cmd_type == VFE_WRITE_DMI_64BIT) {
|
||||
if ((reg_cfg_cmd->u.dmi_info.hi_tbl_offset <=
|
||||
reg_cfg_cmd->u.dmi_info.lo_tbl_offset) ||
|
||||
(reg_cfg_cmd->u.dmi_info.hi_tbl_offset -
|
||||
|
@ -669,11 +668,6 @@ int msm_isp_proc_cmd(struct vfe_device *vfe_dev, void *arg)
|
|||
struct msm_vfe_reg_cfg_cmd *reg_cfg_cmd;
|
||||
uint32_t *cfg_data;
|
||||
|
||||
if (!proc_cmd->num_cfg) {
|
||||
pr_err("%s: Passed num_cfg as 0\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
reg_cfg_cmd = kzalloc(sizeof(struct msm_vfe_reg_cfg_cmd)*
|
||||
proc_cmd->num_cfg, GFP_KERNEL);
|
||||
if (!reg_cfg_cmd) {
|
||||
|
@ -887,13 +881,13 @@ void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev)
|
|||
{
|
||||
struct msm_vfe_error_info *error_info = &vfe_dev->error_info;
|
||||
error_info->info_dump_frame_count++;
|
||||
if (error_info->info_dump_frame_count == 0)
|
||||
error_info->info_dump_frame_count++;
|
||||
}
|
||||
|
||||
void msm_isp_process_error_info(struct vfe_device *vfe_dev)
|
||||
{
|
||||
int i;
|
||||
uint8_t num_stats_type =
|
||||
vfe_dev->hw_info->stats_hw_info->num_stats_type;
|
||||
struct msm_vfe_error_info *error_info = &vfe_dev->error_info;
|
||||
static DEFINE_RATELIMIT_STATE(rs,
|
||||
DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);
|
||||
|
@ -909,7 +903,7 @@ void msm_isp_process_error_info(struct vfe_device *vfe_dev)
|
|||
error_info->error_mask1 = 0;
|
||||
error_info->camif_status = 0;
|
||||
error_info->violation_status = 0;
|
||||
for (i = 0; i < num_stats_type; i++) {
|
||||
for (i = 0; i < MAX_NUM_STREAM; i++) {
|
||||
if (error_info->stream_framedrop_count[i] != 0 &&
|
||||
__ratelimit(&rs)) {
|
||||
pr_err("%s: Stream[%d]: dropped %d frames\n",
|
||||
|
@ -1152,14 +1146,11 @@ void msm_isp_do_tasklet(unsigned long data)
|
|||
}
|
||||
}
|
||||
|
||||
int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg)
|
||||
void msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg)
|
||||
{
|
||||
struct msm_vfe_axi_src_state *src_state = arg;
|
||||
if (src_state->input_src >= VFE_SRC_MAX)
|
||||
return -EINVAL;
|
||||
vfe_dev->axi_data.src_info[src_state->input_src].active =
|
||||
src_state->src_active;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
||||
|
|
|
@ -66,7 +66,7 @@ int msm_isp_cal_word_per_line(uint32_t output_format,
|
|||
int msm_isp_get_bit_per_pixel(uint32_t output_format);
|
||||
int msm_isp_get_pack_format(uint32_t output_format);
|
||||
irqreturn_t msm_isp_process_irq(int irq_num, void *data);
|
||||
int msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg);
|
||||
void msm_isp_set_src_state(struct vfe_device *vfe_dev, void *arg);
|
||||
void msm_isp_do_tasklet(unsigned long data);
|
||||
void msm_isp_update_error_frame_count(struct vfe_device *vfe_dev);
|
||||
void msm_isp_process_error_info(struct vfe_device *vfe_dev);
|
||||
|
|
|
@ -98,7 +98,7 @@ static void msm_ispif_io_dump_start_reg(struct ispif_device *ispif)
|
|||
}
|
||||
|
||||
static inline int msm_ispif_is_intf_valid(uint32_t csid_version,
|
||||
enum msm_ispif_vfe_intf intf_type)
|
||||
uint8_t intf_type)
|
||||
{
|
||||
return ((csid_version <= CSID_VERSION_V2 && intf_type != VFE0) ||
|
||||
(intf_type >= VFE_MAX)) ? false : true;
|
||||
|
@ -289,23 +289,23 @@ static void msm_ispif_sel_csid_core(struct ispif_device *ispif,
|
|||
switch (intftype) {
|
||||
case PIX0:
|
||||
data &= ~(BIT(1) | BIT(0));
|
||||
data |= (uint32_t) csid;
|
||||
data |= csid;
|
||||
break;
|
||||
case RDI0:
|
||||
data &= ~(BIT(5) | BIT(4));
|
||||
data |= ((uint32_t) csid) << 4;
|
||||
data |= (csid << 4);
|
||||
break;
|
||||
case PIX1:
|
||||
data &= ~(BIT(9) | BIT(8));
|
||||
data |= ((uint32_t) csid) << 8;
|
||||
data |= (csid << 8);
|
||||
break;
|
||||
case RDI1:
|
||||
data &= ~(BIT(13) | BIT(12));
|
||||
data |= ((uint32_t) csid) << 12;
|
||||
data |= (csid << 12);
|
||||
break;
|
||||
case RDI2:
|
||||
data &= ~(BIT(21) | BIT(20));
|
||||
data |= ((uint32_t) csid) << 20;
|
||||
data |= (csid << 20);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -381,9 +381,9 @@ static void msm_ispif_enable_intf_cids(struct ispif_device *ispif,
|
|||
|
||||
data = msm_camera_io_r(ispif->base + intf_addr);
|
||||
if (enable)
|
||||
data |= (uint32_t) cid_mask;
|
||||
data |= cid_mask;
|
||||
else
|
||||
data &= ~((uint32_t) cid_mask);
|
||||
data &= ~cid_mask;
|
||||
msm_camera_io_w_mb(data, ispif->base + intf_addr);
|
||||
}
|
||||
|
||||
|
@ -894,8 +894,7 @@ static int msm_ispif_set_vfe_info(struct ispif_device *ispif,
|
|||
struct msm_ispif_vfe_info *vfe_info)
|
||||
{
|
||||
memcpy(&ispif->vfe_info, vfe_info, sizeof(struct msm_ispif_vfe_info));
|
||||
if (ispif->vfe_info.num_vfe > ispif->hw_num_isps)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -924,7 +923,7 @@ static int msm_ispif_init(struct ispif_device *ispif,
|
|||
|
||||
if (ispif->csid_version >= CSID_VERSION_V3) {
|
||||
if (!ispif->clk_mux_mem || !ispif->clk_mux_io) {
|
||||
pr_err("%s csi clk mux mem %pK io %pK\n", __func__,
|
||||
pr_err("%s csi clk mux mem %p io %p\n", __func__,
|
||||
ispif->clk_mux_mem, ispif->clk_mux_io);
|
||||
rc = -ENOMEM;
|
||||
return rc;
|
||||
|
@ -1060,8 +1059,12 @@ static long msm_ispif_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
switch (cmd) {
|
||||
case VIDIOC_MSM_ISPIF_CFG:
|
||||
return msm_ispif_cmd(sd, arg);
|
||||
case MSM_SD_SHUTDOWN:
|
||||
case MSM_SD_SHUTDOWN: {
|
||||
struct ispif_device *ispif =
|
||||
(struct ispif_device *)v4l2_get_subdevdata(sd);
|
||||
msm_ispif_release(ispif);
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
pr_err("%s: invalid cmd 0x%x received\n", __func__, cmd);
|
||||
return -ENOIOCTLCMD;
|
||||
|
|
|
@ -332,7 +332,7 @@ int msm_jpeg_hw_exec_cmds(struct msm_jpeg_hw_cmd *hw_cmd_p, uint32_t m_cmds,
|
|||
uint32_t data;
|
||||
|
||||
while (m_cmds--) {
|
||||
if (hw_cmd_p->offset >= max_size) {
|
||||
if (hw_cmd_p->offset > max_size) {
|
||||
JPEG_PR_ERR("%s:%d] %d exceed hw region %d\n", __func__,
|
||||
__LINE__, hw_cmd_p->offset, max_size);
|
||||
return -EFAULT;
|
||||
|
@ -388,7 +388,7 @@ void msm_jpeg_io_dump(void *base, int size)
|
|||
int i;
|
||||
u32 *p = (u32 *) addr;
|
||||
u32 data;
|
||||
JPEG_DBG_HIGH("%s:%d] %pK %d", __func__, __LINE__, addr, size);
|
||||
JPEG_DBG_HIGH("%s:%d] %p %d", __func__, __LINE__, addr, size);
|
||||
line_str[0] = '\0';
|
||||
p_str = line_str;
|
||||
for (i = 0; i < size/4; i++) {
|
||||
|
|
|
@ -596,7 +596,7 @@ int __msm_jpeg_open(struct msm_jpeg_device *pgmn_dev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
JPEG_DBG("%s:%d] platform resources - mem %pK, base %pK, irq %d\n",
|
||||
JPEG_DBG("%s:%d] platform resources - mem %p, base %p, irq %d\n",
|
||||
__func__, __LINE__,
|
||||
pgmn_dev->mem, pgmn_dev->base, pgmn_dev->irq);
|
||||
pgmn_dev->res_size = resource_size(pgmn_dev->mem);
|
||||
|
|
|
@ -329,11 +329,6 @@ static void msm_add_sd_in_position(struct msm_sd_subdev *msm_subdev,
|
|||
struct msm_sd_subdev *temp_sd;
|
||||
|
||||
list_for_each_entry(temp_sd, sd_list, list) {
|
||||
if (temp_sd == msm_subdev) {
|
||||
pr_err("%s :Fail to add the same sd %d\n",
|
||||
__func__, __LINE__);
|
||||
return;
|
||||
}
|
||||
if (msm_subdev->close_seq < temp_sd->close_seq) {
|
||||
list_add_tail(&msm_subdev->list, &temp_sd->list);
|
||||
return;
|
||||
|
@ -605,16 +600,6 @@ static long msm_private_ioctl(struct file *file, void *fh,
|
|||
wake_up(&cam_dummy_queue.state_wait);
|
||||
return rc;
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case MSM_CAM_V4L2_IOCTL_NOTIFY:
|
||||
case MSM_CAM_V4L2_IOCTL_CMD_ACK:
|
||||
case MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR:
|
||||
break;
|
||||
default:
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
event_data = (struct msm_v4l2_event_data *)
|
||||
((struct v4l2_event *)arg)->u.data;
|
||||
|
||||
|
@ -918,8 +903,11 @@ static int msm_open(struct file *filep)
|
|||
BUG_ON(!pvdev);
|
||||
|
||||
/* !!! only ONE open is allowed !!! */
|
||||
if (atomic_cmpxchg(&pvdev->opened, 0, 1))
|
||||
if (atomic_read(&pvdev->opened)) {
|
||||
pr_err("__dbg: Already device node is in opened state \n");
|
||||
return -EBUSY;
|
||||
}
|
||||
atomic_set(&pvdev->opened, 1);
|
||||
|
||||
spin_lock_irqsave(&msm_pid_lock, flags);
|
||||
msm_pid = get_pid(task_pid(current));
|
||||
|
|
|
@ -50,18 +50,9 @@
|
|||
#define CPP_CMD_TIMEOUT_MS 300
|
||||
#define MSM_CPP_MAX_TIMEOUT_TRIAL 10
|
||||
|
||||
#define MSM_CPP_NOMINAL_CLOCK 320000000
|
||||
#define MSM_CPP_TURBO_CLOCK 465000000
|
||||
#define MSM_CPP_NOMINAL_CLOCK 266670000
|
||||
#define MSM_CPP_TURBO_CLOCK 320000000
|
||||
|
||||
#define CPP_FW_VERSION_1_2_0 0x10020000
|
||||
#define CPP_FW_VERSION_1_4_0 0x10040000
|
||||
#define CPP_FW_VERSION_1_6_0 0x10060000
|
||||
#define CPP_FW_VERSION_1_8_0 0x10080000
|
||||
|
||||
/* stripe information offsets in frame command */
|
||||
#define STRIPE_BASE_FW_1_2_0 130
|
||||
#define STRIPE_BASE_FW_1_4_0 140
|
||||
#define STRIPE_BASE_FW_1_6_0 464
|
||||
|
||||
typedef struct _msm_cpp_timer_data_t {
|
||||
struct cpp_device *cpp_dev;
|
||||
|
@ -154,10 +145,10 @@ static void msm_cpp_empty_list_eventdata(struct msm_device_queue *queue)
|
|||
|
||||
static struct msm_cam_clk_info cpp_clk_info[] = {
|
||||
{"camss_top_ahb_clk", -1},
|
||||
{"vfe_clk_src", 320000000},
|
||||
{"vfe_clk_src", 266670000},
|
||||
{"camss_vfe_vfe_clk", -1},
|
||||
{"iface_clk", -1},
|
||||
{"cpp_core_clk", 320000000},
|
||||
{"cpp_core_clk", 266670000},
|
||||
{"cpp_iface_clk", -1},
|
||||
{"cpp_bus_clk", -1},
|
||||
{"micro_iface_clk", -1},
|
||||
|
@ -932,8 +923,7 @@ static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin)
|
|||
msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_CMD);
|
||||
msm_cpp_poll(cpp_dev->base, 0x2);
|
||||
msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_FW_VER);
|
||||
cpp_dev->fw_version = msm_cpp_read(cpp_dev->base);
|
||||
pr_info("CPP FW Version: 0x%08x\n", cpp_dev->fw_version);
|
||||
pr_info("CPP FW Version: 0x%x\n", msm_cpp_read(cpp_dev->base));
|
||||
msm_cpp_poll(cpp_dev->base, MSM_CPP_MSG_ID_TRAILER);
|
||||
|
||||
/*Disable MC clock*/
|
||||
|
@ -967,7 +957,7 @@ static int cpp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
CPP_DBG("open %d %pK\n", i, &fh->vfh);
|
||||
CPP_DBG("open %d %p\n", i, &fh->vfh);
|
||||
cpp_dev->cpp_open_cnt++;
|
||||
if (cpp_dev->cpp_open_cnt == 1) {
|
||||
cpp_init_hardware(cpp_dev);
|
||||
|
@ -1149,7 +1139,7 @@ static void msm_cpp_do_timeout_work(struct work_struct *work)
|
|||
jiffies);
|
||||
|
||||
if (!work) {
|
||||
pr_err("Invalid work:%pK\n",work);
|
||||
pr_err("Invalid work:%p\n",work);
|
||||
mutex_unlock(&cpp_timers.data.cpp_dev->mutex);
|
||||
return;
|
||||
}
|
||||
|
@ -1287,8 +1277,9 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev,
|
|||
uint16_t num_stripes = 0;
|
||||
struct msm_buf_mngr_info buff_mgr_info, dup_buff_mgr_info;
|
||||
int32_t status = 0;
|
||||
uint8_t fw_version_1_2_x = 0;
|
||||
int32_t *ret_status = 0;
|
||||
int32_t stripe_base = 0;
|
||||
|
||||
int i = 0;
|
||||
if (!new_frame) {
|
||||
pr_err("Insufficient memory. return\n");
|
||||
|
@ -1322,16 +1313,6 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev,
|
|||
}
|
||||
|
||||
new_frame->cpp_cmd_msg = cpp_frame_msg;
|
||||
if (cpp_frame_msg == NULL ||
|
||||
(new_frame->msg_len < MSM_CPP_MIN_FRAME_LENGTH)) {
|
||||
pr_err("%s %d Length is not correct or frame message is missing\n",
|
||||
__func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (cpp_frame_msg[new_frame->msg_len - 1] != MSM_CPP_MSG_ID_TRAILER) {
|
||||
pr_err("%s %d Invalid frame message\n", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev,
|
||||
&new_frame->input_buffer_info,
|
||||
|
@ -1402,35 +1383,21 @@ static int msm_cpp_cfg(struct cpp_device *cpp_dev,
|
|||
((cpp_frame_msg[12] >> 10) & 0x3FF) +
|
||||
(cpp_frame_msg[12] & 0x3FF);
|
||||
|
||||
if ((cpp_dev->fw_version & 0xffff0000) ==
|
||||
CPP_FW_VERSION_1_2_0) {
|
||||
stripe_base = STRIPE_BASE_FW_1_2_0;
|
||||
} else if ((cpp_dev->fw_version & 0xffff0000) ==
|
||||
CPP_FW_VERSION_1_4_0) {
|
||||
stripe_base = STRIPE_BASE_FW_1_4_0;
|
||||
} else if ((cpp_dev->fw_version & 0xffff0000) ==
|
||||
CPP_FW_VERSION_1_6_0) {
|
||||
stripe_base = STRIPE_BASE_FW_1_6_0;
|
||||
} else {
|
||||
pr_err("invalid fw version %08x", cpp_dev->fw_version);
|
||||
fw_version_1_2_x = 0;
|
||||
if (cpp_dev->hw_info.cpp_hw_version == 0x10010000 ||
|
||||
cpp_dev->hw_info.cpp_hw_version == 0x20000000) {
|
||||
fw_version_1_2_x = 2;
|
||||
}
|
||||
|
||||
if ((stripe_base + num_stripes*27 + 1) != new_frame->msg_len) {
|
||||
pr_err("Invalid frame message\n");
|
||||
rc = -EINVAL;
|
||||
goto ERROR3;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_stripes; i++) {
|
||||
cpp_frame_msg[stripe_base + 5 + i*27] +=
|
||||
cpp_frame_msg[(133 + fw_version_1_2_x) + i * 27] +=
|
||||
(uint32_t) in_phyaddr;
|
||||
cpp_frame_msg[stripe_base + 11 + i * 27] +=
|
||||
cpp_frame_msg[(139 + fw_version_1_2_x) + i * 27] +=
|
||||
(uint32_t) out_phyaddr0;
|
||||
cpp_frame_msg[stripe_base + 12 + i * 27] +=
|
||||
cpp_frame_msg[(140 + fw_version_1_2_x) + i * 27] +=
|
||||
(uint32_t) out_phyaddr1;
|
||||
cpp_frame_msg[stripe_base + 13 + i * 27] +=
|
||||
cpp_frame_msg[(141 + fw_version_1_2_x) + i * 27] +=
|
||||
(uint32_t) out_phyaddr0;
|
||||
cpp_frame_msg[stripe_base + 14 + i * 27] +=
|
||||
cpp_frame_msg[(142 + fw_version_1_2_x) + i * 27] +=
|
||||
(uint32_t) out_phyaddr1;
|
||||
}
|
||||
|
||||
|
@ -1495,10 +1462,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
pr_err("cpp_dev is null\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (_IOC_DIR(cmd) == _IOC_NONE) {
|
||||
pr_err("Invalid ioctl/subdev cmd %u", cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
mutex_lock(&cpp_dev->mutex);
|
||||
CPP_DBG("E cmd: %d\n", cmd);
|
||||
switch (cmd) {
|
||||
|
|
|
@ -173,7 +173,6 @@ struct cpp_device {
|
|||
char *fw_name_bin;
|
||||
struct workqueue_struct *timer_wq;
|
||||
struct msm_cpp_work_t *work;
|
||||
uint32_t fw_version;
|
||||
uint8_t stream_cnt;
|
||||
uint8_t timeout_trial_cnt;
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ static void vpe_mem_dump(const char * const name, const void * const addr,
|
|||
int i;
|
||||
u32 *p = (u32 *) addr;
|
||||
u32 data;
|
||||
VPE_DBG("%s: (%s) %pK %d\n", __func__, name, addr, size);
|
||||
VPE_DBG("%s: (%s) %p %d\n", __func__, name, addr, size);
|
||||
line_str[0] = '\0';
|
||||
p_str = line_str;
|
||||
for (i = 0; i < size/4; i++) {
|
||||
|
@ -595,7 +595,7 @@ static int vpe_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
|||
goto err_mutex_unlock;
|
||||
}
|
||||
|
||||
VPE_DBG("open %d %pK\n", i, &fh->vfh);
|
||||
VPE_DBG("open %d %p\n", i, &fh->vfh);
|
||||
vpe_dev->vpe_open_cnt++;
|
||||
if (vpe_dev->vpe_open_cnt == 1) {
|
||||
rc = vpe_init_hardware(vpe_dev);
|
||||
|
@ -651,7 +651,7 @@ static int vpe_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
VPE_DBG("close %d %pK\n", i, &fh->vfh);
|
||||
VPE_DBG("close %d %p\n", i, &fh->vfh);
|
||||
vpe_dev->vpe_open_cnt--;
|
||||
if (vpe_dev->vpe_open_cnt == 0) {
|
||||
vpe_deinit_mem(vpe_dev);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2013, The Linux Foundation. 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
|
||||
|
@ -53,11 +53,6 @@ static int32_t msm_actuator_piezo_set_default_focus(
|
|||
struct msm_camera_i2c_reg_setting reg_setting;
|
||||
CDBG("Enter\n");
|
||||
|
||||
if (a_ctrl->i2c_reg_tbl == NULL) {
|
||||
pr_err("failed. i2c reg tabl is NULL");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (a_ctrl->curr_step_pos != 0) {
|
||||
a_ctrl->i2c_tbl_index = 0;
|
||||
a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl,
|
||||
|
@ -92,11 +87,6 @@ static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
uint32_t size = a_ctrl->reg_tbl_size, i = 0;
|
||||
struct msm_camera_i2c_reg_array *i2c_tbl = a_ctrl->i2c_reg_tbl;
|
||||
struct msm_camera_i2c_seq_reg_array *i2c_seq = a_ctrl->i2c_reg_seq_tbl;
|
||||
|
||||
if (a_ctrl->i2c_reg_tbl == NULL) {
|
||||
pr_err("failed. i2c reg tabl is NULL");
|
||||
return;
|
||||
}
|
||||
CDBG("Enter\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
if (write_arr[i].reg_write_type == MSM_ACTUATOR_WRITE_DAC_SEQ) {
|
||||
|
@ -128,11 +118,6 @@ static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
i2c_byte2 = value & 0xFF;
|
||||
CDBG("byte1:0x%x, byte2:0x%x\n",
|
||||
i2c_byte1, i2c_byte2);
|
||||
if (a_ctrl->i2c_tbl_index >
|
||||
a_ctrl->total_steps) {
|
||||
pr_err("failed:i2c table index out of bound\n");
|
||||
break;
|
||||
}
|
||||
i2c_tbl[a_ctrl->i2c_tbl_index].
|
||||
reg_addr = i2c_byte1;
|
||||
i2c_tbl[a_ctrl->i2c_tbl_index].
|
||||
|
@ -153,10 +138,6 @@ static void msm_actuator_parse_i2c_params(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
i2c_byte2 = (hw_dword & write_arr[i].hw_mask) >>
|
||||
write_arr[i].hw_shift;
|
||||
}
|
||||
if (a_ctrl->i2c_tbl_index > a_ctrl->total_steps) {
|
||||
pr_err("failed: i2c table index out of bound\n");
|
||||
break;
|
||||
}
|
||||
CDBG("i2c_byte1:0x%x, i2c_byte2:0x%x\n", i2c_byte1, i2c_byte2);
|
||||
i2c_tbl[a_ctrl->i2c_tbl_index].reg_addr = i2c_byte1;
|
||||
i2c_tbl[a_ctrl->i2c_tbl_index].reg_data = i2c_byte2;
|
||||
|
@ -585,38 +566,19 @@ static int32_t msm_actuator_piezo_move_focus(
|
|||
struct msm_actuator_move_params_t *move_params)
|
||||
{
|
||||
int32_t dest_step_position = move_params->dest_step_pos;
|
||||
struct damping_params_t ringing_params_kernel;
|
||||
int32_t rc = 0;
|
||||
int32_t num_steps = move_params->num_steps;
|
||||
struct msm_camera_i2c_reg_setting reg_setting;
|
||||
CDBG("Enter\n");
|
||||
|
||||
if (copy_from_user(&ringing_params_kernel,
|
||||
&(move_params->ringing_params[0]),
|
||||
sizeof(struct damping_params_t))) {
|
||||
pr_err("copy_from_user failed\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (num_steps == 0)
|
||||
return rc;
|
||||
|
||||
if (a_ctrl->i2c_reg_tbl == NULL) {
|
||||
pr_err("failed. i2c reg tabl is NULL");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (dest_step_position > a_ctrl->total_steps) {
|
||||
pr_err("Step pos greater than total steps = %d\n",
|
||||
dest_step_position);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
a_ctrl->i2c_tbl_index = 0;
|
||||
a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl,
|
||||
(num_steps *
|
||||
a_ctrl->region_params[0].code_per_step),
|
||||
ringing_params_kernel.hw_params, 0);
|
||||
move_params->ringing_params[0].hw_params, 0);
|
||||
|
||||
reg_setting.reg_setting = a_ctrl->i2c_reg_tbl;
|
||||
reg_setting.data_type = a_ctrl->i2c_data_type;
|
||||
|
@ -844,7 +806,6 @@ static int32_t msm_actuator_move_focus(
|
|||
struct msm_actuator_move_params_t *move_params)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
struct damping_params_t ringing_params_kernel;
|
||||
int8_t sign_dir = move_params->sign_dir;
|
||||
uint16_t step_boundary = 0;
|
||||
uint16_t target_step_pos = 0;
|
||||
|
@ -854,46 +815,18 @@ static int32_t msm_actuator_move_focus(
|
|||
int dir = move_params->dir;
|
||||
int32_t num_steps = move_params->num_steps;
|
||||
|
||||
if (copy_from_user(&ringing_params_kernel,
|
||||
&(move_params->ringing_params[a_ctrl->curr_region_index]),
|
||||
sizeof(struct damping_params_t))) {
|
||||
pr_err("copy_from_user failed\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
CDBG("called, dir %d, num_steps %d\n", dir, num_steps);
|
||||
|
||||
if (dest_step_pos == a_ctrl->curr_step_pos)
|
||||
return rc;
|
||||
|
||||
if ((sign_dir > MSM_ACTUATOR_MOVE_SIGNED_NEAR) ||
|
||||
(sign_dir < MSM_ACTUATOR_MOVE_SIGNED_FAR)) {
|
||||
pr_err("Invalid sign_dir = %d\n", sign_dir);
|
||||
return -EFAULT;
|
||||
}
|
||||
if ((dir > MOVE_FAR) || (dir < MOVE_NEAR)) {
|
||||
pr_err("Invalid direction = %d\n", dir);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (a_ctrl->i2c_reg_tbl == NULL) {
|
||||
pr_err("failed. i2c reg tabl is NULL");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (dest_step_pos > a_ctrl->total_steps) {
|
||||
pr_err("Step pos greater than total steps = %d\n",
|
||||
dest_step_pos);
|
||||
return -EFAULT;
|
||||
}
|
||||
curr_lens_pos = a_ctrl->step_position_table[a_ctrl->curr_step_pos];
|
||||
a_ctrl->i2c_tbl_index = 0;
|
||||
CDBG("curr_step_pos =%d dest_step_pos =%d curr_lens_pos=%d\n",
|
||||
a_ctrl->curr_step_pos, dest_step_pos, curr_lens_pos);
|
||||
|
||||
while (a_ctrl->curr_step_pos != dest_step_pos) {
|
||||
if (a_ctrl->curr_region_index >= a_ctrl->region_size)
|
||||
break;
|
||||
step_boundary =
|
||||
a_ctrl->region_params[a_ctrl->curr_region_index].
|
||||
step_bound[dir];
|
||||
|
@ -905,7 +838,9 @@ static int32_t msm_actuator_move_focus(
|
|||
a_ctrl->step_position_table[target_step_pos];
|
||||
a_ctrl->func_tbl->actuator_write_focus(a_ctrl,
|
||||
curr_lens_pos,
|
||||
&ringing_params_kernel,
|
||||
&(move_params->
|
||||
ringing_params[a_ctrl->
|
||||
curr_region_index]),
|
||||
sign_dir,
|
||||
target_lens_pos);
|
||||
curr_lens_pos = target_lens_pos;
|
||||
|
@ -916,7 +851,8 @@ static int32_t msm_actuator_move_focus(
|
|||
a_ctrl->step_position_table[target_step_pos];
|
||||
a_ctrl->func_tbl->actuator_write_focus(a_ctrl,
|
||||
curr_lens_pos,
|
||||
&ringing_params_kernel,
|
||||
&(move_params->ringing_params[a_ctrl->
|
||||
curr_region_index]),
|
||||
sign_dir,
|
||||
target_lens_pos);
|
||||
curr_lens_pos = target_lens_pos;
|
||||
|
@ -968,13 +904,6 @@ static int32_t msm_actuator_init_step_table(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
kfree(a_ctrl->step_position_table);
|
||||
a_ctrl->step_position_table = NULL;
|
||||
|
||||
if (set_info->af_tuning_params.total_steps
|
||||
> MAX_ACTUATOR_AF_TOTAL_STEPS) {
|
||||
pr_err("Max actuator totalsteps exceeded = %d\n",
|
||||
set_info->af_tuning_params.total_steps);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
/* Fill step position table */
|
||||
a_ctrl->step_position_table =
|
||||
kmalloc(sizeof(uint16_t) *
|
||||
|
@ -1447,19 +1376,14 @@ static int32_t msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
pr_err("Actuator function table not found\n");
|
||||
return rc;
|
||||
}
|
||||
if (set_info->af_tuning_params.total_steps
|
||||
> MAX_ACTUATOR_AF_TOTAL_STEPS) {
|
||||
pr_err("Max actuator totalsteps exceeded = %d\n",
|
||||
set_info->af_tuning_params.total_steps);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (set_info->af_tuning_params.region_size > MAX_ACTUATOR_REGION) {
|
||||
a_ctrl->region_size = set_info->af_tuning_params.region_size;
|
||||
if (a_ctrl->region_size > MAX_ACTUATOR_REGION) {
|
||||
pr_err("MAX_ACTUATOR_REGION is exceeded.\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
a_ctrl->region_size = set_info->af_tuning_params.region_size;
|
||||
a_ctrl->pwd_step = set_info->af_tuning_params.pwd_step;
|
||||
a_ctrl->total_steps = set_info->af_tuning_params.total_steps;
|
||||
|
||||
if (copy_from_user(&a_ctrl->region_params,
|
||||
(void *)set_info->af_tuning_params.region_params,
|
||||
|
@ -1471,6 +1395,7 @@ static int32_t msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
cci_client->sid =
|
||||
set_info->actuator_params.i2c_addr >> 1;
|
||||
cci_client->retries = 3;
|
||||
cci_client->id_map = 0;
|
||||
cci_client->cci_i2c_master = a_ctrl->cci_master;
|
||||
} else {
|
||||
a_ctrl->i2c_client.client->addr =
|
||||
|
@ -1479,11 +1404,8 @@ static int32_t msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
|
||||
a_ctrl->i2c_data_type = set_info->actuator_params.i2c_data_type;
|
||||
a_ctrl->i2c_client.addr_type = set_info->actuator_params.i2c_addr_type;
|
||||
if (set_info->actuator_params.reg_tbl_size <=
|
||||
MAX_ACTUATOR_REG_TBL_SIZE) {
|
||||
a_ctrl->reg_tbl_size = set_info->actuator_params.reg_tbl_size;
|
||||
} else {
|
||||
a_ctrl->reg_tbl_size = 0;
|
||||
a_ctrl->reg_tbl_size = set_info->actuator_params.reg_tbl_size;
|
||||
if (a_ctrl->reg_tbl_size > MAX_ACTUATOR_REG_TBL_SIZE) {
|
||||
pr_err("MAX_ACTUATOR_REG_TBL_SIZE is exceeded.\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@ -1510,8 +1432,6 @@ static int32_t msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
goto ERROR;
|
||||
}
|
||||
|
||||
a_ctrl->total_steps = set_info->af_tuning_params.total_steps;
|
||||
|
||||
if (copy_from_user(&a_ctrl->reg_tbl,
|
||||
(void *)set_info->actuator_params.reg_tbl_params,
|
||||
a_ctrl->reg_tbl_size *
|
||||
|
@ -1519,9 +1439,7 @@ static int32_t msm_actuator_init(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
goto ERROR;
|
||||
}
|
||||
|
||||
if (set_info->actuator_params.init_setting_size &&
|
||||
set_info->actuator_params.init_setting_size
|
||||
<= MAX_ACTUATOR_REG_TBL_SIZE) {
|
||||
if (set_info->actuator_params.init_setting_size) {
|
||||
if (a_ctrl->func_tbl->actuator_init_focus) {
|
||||
struct reg_settings_t *init_settings = kmalloc(sizeof(struct reg_settings_t) *
|
||||
(set_info->actuator_params.init_setting_size),
|
||||
|
@ -1586,7 +1504,7 @@ static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
{
|
||||
struct msm_actuator_cfg_data *cdata =
|
||||
(struct msm_actuator_cfg_data *)argp;
|
||||
int32_t rc = -EINVAL;
|
||||
int32_t rc = 0;
|
||||
if (!a_ctrl) {
|
||||
pr_err("failed\n");
|
||||
return -EINVAL;
|
||||
|
@ -1608,28 +1526,22 @@ static int32_t msm_actuator_config(struct msm_actuator_ctrl_t *a_ctrl,
|
|||
break;
|
||||
|
||||
case CFG_SET_DEFAULT_FOCUS:
|
||||
if (a_ctrl->func_tbl &&
|
||||
a_ctrl->func_tbl->actuator_set_default_focus)
|
||||
rc = a_ctrl->func_tbl->actuator_set_default_focus(
|
||||
a_ctrl, &cdata->cfg.move);
|
||||
rc = a_ctrl->func_tbl->actuator_set_default_focus(a_ctrl,
|
||||
&cdata->cfg.move);
|
||||
if (rc < 0)
|
||||
pr_err("move focus failed %d\n", rc);
|
||||
break;
|
||||
|
||||
case CFG_MOVE_FOCUS:
|
||||
if (a_ctrl->func_tbl &&
|
||||
a_ctrl->func_tbl->actuator_move_focus)
|
||||
rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl,
|
||||
&cdata->cfg.move);
|
||||
rc = a_ctrl->func_tbl->actuator_move_focus(a_ctrl,
|
||||
&cdata->cfg.move);
|
||||
if (rc < 0)
|
||||
pr_err("move focus failed %d\n", rc);
|
||||
break;
|
||||
|
||||
case CFG_SET_POSITION:
|
||||
if (a_ctrl->func_tbl &&
|
||||
a_ctrl->func_tbl->actuator_set_position)
|
||||
rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl,
|
||||
&cdata->cfg.setpos);
|
||||
rc = a_ctrl->func_tbl->actuator_set_position(a_ctrl,
|
||||
&cdata->cfg.setpos);
|
||||
if (rc < 0)
|
||||
pr_err("actuator_set_position failed %d\n", rc);
|
||||
break;
|
||||
|
@ -1869,7 +1781,7 @@ static long msm_actuator_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
struct msm_actuator_ctrl_t *a_ctrl = v4l2_get_subdevdata(sd);
|
||||
void __user *argp = (void __user *)arg;
|
||||
CDBG("Enter\n");
|
||||
CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, a_ctrl, argp);
|
||||
CDBG("%s:%d a_ctrl %p argp %p\n", __func__, __LINE__, a_ctrl, argp);
|
||||
switch (cmd) {
|
||||
case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID:
|
||||
return msm_actuator_get_subdev_id(a_ctrl, argp);
|
||||
|
|
|
@ -310,11 +310,6 @@ static int32_t msm_cci_i2c_read(struct v4l2_subdev *sd,
|
|||
cci_dev = v4l2_get_subdevdata(sd);
|
||||
master = c_ctrl->cci_info->cci_i2c_master;
|
||||
read_cfg = &c_ctrl->cfg.cci_i2c_read_cfg;
|
||||
if (master >= MASTER_MAX || master < 0) {
|
||||
pr_err("%s:%d Invalid I2C master %d\n",
|
||||
__func__, __LINE__, master);
|
||||
return -EINVAL;
|
||||
}
|
||||
mutex_lock(&cci_dev->mutex);
|
||||
|
||||
/*
|
||||
|
@ -450,7 +445,7 @@ static int32_t msm_cci_i2c_read_bytes(struct v4l2_subdev *sd,
|
|||
uint16_t read_bytes = 0;
|
||||
|
||||
if (!sd || !c_ctrl) {
|
||||
pr_err("%s:%d sd %pK c_ctrl %pK\n", __func__,
|
||||
pr_err("%s:%d sd %p c_ctrl %p\n", __func__,
|
||||
__LINE__, sd, c_ctrl);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -583,7 +578,7 @@ static int32_t msm_cci_i2c_write(struct v4l2_subdev *sd,
|
|||
msm_cci_flush_queue(cci_dev, master);
|
||||
goto ERROR;
|
||||
} else {
|
||||
rc = cci_dev->cci_master_info[master].status;
|
||||
rc = 0;
|
||||
}
|
||||
CDBG("%s:%d X wait_for_completion_interruptible\n", __func__,
|
||||
__LINE__);
|
||||
|
@ -1001,7 +996,7 @@ static int __devinit msm_cci_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct cci_device *new_cci_dev;
|
||||
int rc = 0;
|
||||
CDBG("%s: pdev %pK device id = %d\n", __func__, pdev, pdev->id);
|
||||
CDBG("%s: pdev %p device id = %d\n", __func__, pdev, pdev->id);
|
||||
new_cci_dev = kzalloc(sizeof(struct cci_device), GFP_KERNEL);
|
||||
if (!new_cci_dev) {
|
||||
pr_err("%s: no enough memory\n", __func__);
|
||||
|
@ -1013,7 +1008,7 @@ static int __devinit msm_cci_probe(struct platform_device *pdev)
|
|||
ARRAY_SIZE(new_cci_dev->msm_sd.sd.name), "msm_cci");
|
||||
v4l2_set_subdevdata(&new_cci_dev->msm_sd.sd, new_cci_dev);
|
||||
platform_set_drvdata(pdev, &new_cci_dev->msm_sd.sd);
|
||||
CDBG("%s sd %pK\n", __func__, &new_cci_dev->msm_sd.sd);
|
||||
CDBG("%s sd %p\n", __func__, &new_cci_dev->msm_sd.sd);
|
||||
if (pdev->dev.of_node)
|
||||
of_property_read_u32((&pdev->dev)->of_node,
|
||||
"cell-index", &pdev->id);
|
||||
|
@ -1070,7 +1065,7 @@ static int __devinit msm_cci_probe(struct platform_device *pdev)
|
|||
pr_err("%s: failed to add child nodes, rc=%d\n", __func__, rc);
|
||||
new_cci_dev->cci_state = CCI_STATE_DISABLED;
|
||||
g_cci_subdev = &new_cci_dev->msm_sd.sd;
|
||||
CDBG("%s cci subdev %pK\n", __func__, &new_cci_dev->msm_sd.sd);
|
||||
CDBG("%s cci subdev %p\n", __func__, &new_cci_dev->msm_sd.sd);
|
||||
CDBG("%s line %d\n", __func__, __LINE__);
|
||||
pr_warn("%s : Succeed!", __func__);
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2013, The Linux Foundation. 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
|
||||
|
@ -112,7 +112,7 @@ static int msm_csid_config(struct csid_device *csid_dev,
|
|||
void __iomem *csidbase;
|
||||
csidbase = csid_dev->base;
|
||||
if (!csidbase || !csid_params) {
|
||||
pr_err("%s:%d csidbase %pK, csid params %pK\n", __func__,
|
||||
pr_err("%s:%d csidbase %p, csid params %p\n", __func__,
|
||||
__LINE__, csidbase, csid_params);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ static long msm_csid_cmd(struct csid_device *csid_dev, void *arg)
|
|||
struct csid_cfg_data *cdata = (struct csid_cfg_data *)arg;
|
||||
|
||||
if (!csid_dev || !cdata) {
|
||||
pr_err("%s:%d csid_dev %pK, cdata %pK\n", __func__, __LINE__,
|
||||
pr_err("%s:%d csid_dev %p, cdata %p\n", __func__, __LINE__,
|
||||
csid_dev, cdata);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ static long msm_csid_cmd(struct csid_device *csid_dev, void *arg)
|
|||
case CSID_CFG: {
|
||||
struct msm_camera_csid_params csid_params;
|
||||
struct msm_camera_csid_vc_cfg *vc_cfg = NULL;
|
||||
int8_t i = 0;
|
||||
int32_t i = 0;
|
||||
if (copy_from_user(&csid_params,
|
||||
(void *)cdata->cfg.csid_params,
|
||||
sizeof(struct msm_camera_csid_params))) {
|
||||
|
@ -409,13 +409,6 @@ static long msm_csid_cmd(struct csid_device *csid_dev, void *arg)
|
|||
rc = -EFAULT;
|
||||
break;
|
||||
}
|
||||
if (csid_params.lut_params.num_cid < 1 ||
|
||||
csid_params.lut_params.num_cid > MAX_CID) {
|
||||
pr_err("%s: %d num_cid outside range\n",
|
||||
__func__, __LINE__);
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < csid_params.lut_params.num_cid; i++) {
|
||||
vc_cfg = kzalloc(csid_params.lut_params.num_cid *
|
||||
sizeof(struct msm_camera_csid_vc_cfg),
|
||||
|
@ -440,10 +433,6 @@ static long msm_csid_cmd(struct csid_device *csid_dev, void *arg)
|
|||
}
|
||||
csid_params.lut_params.vc_cfg[i] = vc_cfg;
|
||||
}
|
||||
if (rc < 0) {
|
||||
pr_err("%s:%d failed\n", __func__, __LINE__);
|
||||
break;
|
||||
}
|
||||
rc = msm_csid_config(csid_dev, &csid_params);
|
||||
for (i--; i >= 0; i--)
|
||||
kfree(csid_params.lut_params.vc_cfg[i]);
|
||||
|
|
|
@ -77,7 +77,7 @@ static int msm_csiphy_lane_config(struct csiphy_device *csiphy_dev,
|
|||
val |= csiphy_params->csid_core;
|
||||
}
|
||||
msm_camera_io_w(val, csiphy_dev->clk_mux_base);
|
||||
CDBG("%s clk mux addr %pK val 0x%x\n", __func__,
|
||||
CDBG("%s clk mux addr %p val 0x%x\n", __func__,
|
||||
csiphy_dev->clk_mux_base, val);
|
||||
mb();
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg)
|
|||
struct msm_camera_csi_lane_params *csi_lane_params;
|
||||
uint16_t csi_lane_mask;
|
||||
csi_lane_params = (struct msm_camera_csi_lane_params *)arg;
|
||||
csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F);
|
||||
csi_lane_mask = csi_lane_params->csi_lane_mask;
|
||||
|
||||
if (!csiphy_dev || !csiphy_dev->ref_count) {
|
||||
pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__);
|
||||
|
@ -403,7 +403,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg)
|
|||
csiphy_dev->lane_mask[csiphy_dev->pdev->id] &=
|
||||
~(csi_lane_params->csi_lane_mask);
|
||||
i = 0;
|
||||
while (csi_lane_mask) {
|
||||
while (csi_lane_mask & 0x1F) {
|
||||
if (csi_lane_mask & 0x1) {
|
||||
msm_camera_io_w(0x0, csiphy_dev->base +
|
||||
MIPI_CSIPHY_LNn_CFG2_ADDR + 0x40*i);
|
||||
|
@ -447,7 +447,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg)
|
|||
struct msm_camera_csi_lane_params *csi_lane_params;
|
||||
uint16_t csi_lane_mask;
|
||||
csi_lane_params = (struct msm_camera_csi_lane_params *)arg;
|
||||
csi_lane_mask = (csi_lane_params->csi_lane_mask & 0x1F);
|
||||
csi_lane_mask = csi_lane_params->csi_lane_mask;
|
||||
|
||||
if (!csiphy_dev || !csiphy_dev->ref_count) {
|
||||
pr_err("%s csiphy dev NULL / ref_count ZERO\n", __func__);
|
||||
|
@ -474,7 +474,7 @@ static int msm_csiphy_release(struct csiphy_device *csiphy_dev, void *arg)
|
|||
csiphy_dev->lane_mask[csiphy_dev->pdev->id] &=
|
||||
~(csi_lane_params->csi_lane_mask);
|
||||
i = 0;
|
||||
while (csi_lane_mask) {
|
||||
while (csi_lane_mask & 0x1F) {
|
||||
if (csi_lane_mask & 0x1) {
|
||||
msm_camera_io_w(0x0, csiphy_dev->base +
|
||||
MIPI_CSIPHY_LNn_CFG2_ADDR + 0x40*i);
|
||||
|
|
|
@ -582,22 +582,16 @@ static int msm_eeprom_config(struct msm_eeprom_ctrl_t *e_ctrl,
|
|||
struct msm_eeprom_cfg_data *cdata =
|
||||
(struct msm_eeprom_cfg_data *)argp;
|
||||
int rc = 0;
|
||||
size_t length = 0;
|
||||
|
||||
CDBG("%s E\n", __func__);
|
||||
switch (cdata->cfgtype) {
|
||||
case CFG_EEPROM_GET_INFO:
|
||||
pr_info("%s E CFG_EEPROM_GET_INFO\n", __func__);
|
||||
cdata->is_supported = e_ctrl->is_supported;
|
||||
length = strlen(e_ctrl->eboard_info->eeprom_name) + 1;
|
||||
if (length > MAX_EEPROM_NAME) {
|
||||
pr_err("%s:%d invalid eeprom_name length %d\n",
|
||||
__func__, __LINE__, (int)length);
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
memcpy(cdata->cfg.eeprom_name, e_ctrl->eboard_info->eeprom_name, length);
|
||||
break;
|
||||
pr_info("%s E CFG_EEPROM_GET_INFO\n", __func__);
|
||||
cdata->is_supported = e_ctrl->is_supported;
|
||||
memcpy(cdata->cfg.eeprom_name,
|
||||
e_ctrl->eboard_info->eeprom_name,
|
||||
sizeof(cdata->cfg.eeprom_name));
|
||||
break;
|
||||
case CFG_EEPROM_GET_CAL_DATA:
|
||||
pr_info("%s E CFG_EEPROM_GET_CAL_DATA\n", __func__);
|
||||
cdata->cfg.get_data.num_bytes =
|
||||
|
@ -682,7 +676,7 @@ static long msm_eeprom_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
struct msm_eeprom_ctrl_t *e_ctrl = v4l2_get_subdevdata(sd);
|
||||
void __user *argp = (void __user *)arg;
|
||||
CDBG("%s E\n", __func__);
|
||||
CDBG("%s:%d a_ctrl %pK argp %pK\n", __func__, __LINE__, e_ctrl, argp);
|
||||
CDBG("%s:%d a_ctrl %p argp %p\n", __func__, __LINE__, e_ctrl, argp);
|
||||
switch (cmd) {
|
||||
case VIDIOC_MSM_SENSOR_GET_SUBDEV_ID:
|
||||
return msm_eeprom_get_subdev_id(e_ctrl, argp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2013, The Linux Foundation. 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
|
||||
|
@ -26,8 +26,6 @@
|
|||
#define I2C_COMPARE_MATCH 0
|
||||
#define I2C_COMPARE_MISMATCH 1
|
||||
#define I2C_POLL_MAX_ITERATION 20
|
||||
#define MAX_I2C_ADDR_TYPE_SIZE (MSM_CAMERA_I2C_3B_ADDR + 1)
|
||||
#define MAX_I2C_DATA_TYPE_SIZE (MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA + 1)
|
||||
|
||||
#if defined(CONFIG_MACH_CRATERQ_CHN_OPEN) || \
|
||||
defined (CONFIG_SEC_MILLET_PROJECT) || \
|
||||
|
@ -49,7 +47,7 @@ int32_t msm_camera_cci_i2c_read(struct msm_camera_i2c_client *client,
|
|||
enum msm_camera_i2c_data_type data_type)
|
||||
{
|
||||
int32_t rc = -EFAULT;
|
||||
unsigned char buf[MAX_I2C_ADDR_TYPE_SIZE + MAX_I2C_DATA_TYPE_SIZE];
|
||||
unsigned char buf[client->addr_type+data_type];
|
||||
struct msm_camera_cci_ctrl cci_ctrl;
|
||||
|
||||
if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR
|
||||
|
@ -94,12 +92,6 @@ int32_t msm_camera_cci_i2c_read_seq(struct msm_camera_i2c_client *client,
|
|||
|| num_byte == 0)
|
||||
return rc;
|
||||
|
||||
if (num_byte > I2C_REG_DATA_MAX) {
|
||||
pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n",
|
||||
__func__, num_byte, I2C_REG_DATA_MAX);
|
||||
return rc;
|
||||
}
|
||||
|
||||
buf = kzalloc(num_byte, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
pr_err("%s:%d no memory\n", __func__, __LINE__);
|
||||
|
@ -195,7 +187,7 @@ int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client,
|
|||
int32_t rc = -EFAULT;
|
||||
uint32_t i = 0;
|
||||
struct msm_camera_cci_ctrl cci_ctrl;
|
||||
struct msm_camera_i2c_reg_array *reg_conf_tbl = NULL;
|
||||
struct msm_camera_i2c_reg_array reg_conf_tbl[num_byte];
|
||||
|
||||
if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR
|
||||
&& client->addr_type != MSM_CAMERA_I2C_WORD_ADDR)
|
||||
|
@ -203,15 +195,9 @@ int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client,
|
|||
return rc;
|
||||
|
||||
S_I2C_DBG("%s reg addr = 0x%x num bytes: %d\n",
|
||||
__func__, addr, num_byte);
|
||||
|
||||
reg_conf_tbl = kzalloc(num_byte *
|
||||
(sizeof(struct msm_camera_i2c_reg_array)), GFP_KERNEL);
|
||||
if (!reg_conf_tbl) {
|
||||
pr_err("%s:%d no memory\n", __func__, __LINE__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
__func__, addr, num_byte);
|
||||
memset(reg_conf_tbl, 0,
|
||||
num_byte * sizeof(struct msm_camera_i2c_reg_array));
|
||||
reg_conf_tbl[0].reg_addr = addr;
|
||||
for (i = 0; i < num_byte; i++) {
|
||||
reg_conf_tbl[i].reg_data = data[i];
|
||||
|
@ -229,8 +215,6 @@ int32_t msm_camera_cci_i2c_write_seq(struct msm_camera_i2c_client *client,
|
|||
CDBG("%s line %d rc = %d\n", __func__, __LINE__, rc);
|
||||
rc = cci_ctrl.status;
|
||||
rc = 0;
|
||||
kfree(reg_conf_tbl);
|
||||
reg_conf_tbl = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -375,12 +359,6 @@ int32_t msm_camera_cci_i2c_write_seq_table(
|
|||
client_addr_type = client->addr_type;
|
||||
client->addr_type = write_setting->addr_type;
|
||||
|
||||
if (reg_setting->reg_data_size > I2C_SEQ_REG_DATA_MAX) {
|
||||
pr_err("%s: number of bytes %u exceeding the max supported %d\n",
|
||||
__func__, reg_setting->reg_data_size, I2C_SEQ_REG_DATA_MAX);
|
||||
return rc;
|
||||
}
|
||||
|
||||
for (i = 0; i < write_setting->size; i++) {
|
||||
rc = msm_camera_cci_i2c_write_seq(client, reg_setting->reg_addr,
|
||||
reg_setting->reg_data, reg_setting->reg_data_size);
|
||||
|
|
|
@ -42,7 +42,7 @@ int msm_camera_fill_vreg_params(struct camera_vreg_t *cam_vreg,
|
|||
|
||||
/* Validate input parameters */
|
||||
if (!cam_vreg || !power_setting) {
|
||||
pr_err("%s:%d failed: cam_vreg %pK power_setting %pK", __func__,
|
||||
pr_err("%s:%d failed: cam_vreg %p power_setting %p", __func__,
|
||||
__LINE__, cam_vreg, power_setting);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1209,7 +1209,7 @@ int msm_camera_power_up(struct msm_camera_power_ctrl_t *ctrl,
|
|||
|
||||
CDBG("%s:%d\n", __func__, __LINE__);
|
||||
if (!ctrl || !sensor_i2c_client) {
|
||||
pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl,
|
||||
pr_err("failed ctrl %p sensor_i2c_client %p\n", ctrl,
|
||||
sensor_i2c_client);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -1545,7 +1545,7 @@ int msm_camera_power_down(struct msm_camera_power_ctrl_t *ctrl,
|
|||
|
||||
CDBG("%s:%d\n", __func__, __LINE__);
|
||||
if (!ctrl || !sensor_i2c_client) {
|
||||
pr_err("failed ctrl %pK sensor_i2c_client %pK\n", ctrl,
|
||||
pr_err("failed ctrl %p sensor_i2c_client %p\n", ctrl,
|
||||
sensor_i2c_client);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ void msm_camera_io_dump(void __iomem *addr, int size)
|
|||
int i;
|
||||
u32 *p = (u32 *) addr;
|
||||
u32 data;
|
||||
CDBG("%s: %pK %d\n", __func__, addr, size);
|
||||
CDBG("%s: %p %d\n", __func__, addr, size);
|
||||
line_str[0] = '\0';
|
||||
p_str = line_str;
|
||||
for (i = 0; i < size/4; i++) {
|
||||
|
@ -102,7 +102,7 @@ void msm_camera_io_dump(void __iomem *addr, int size)
|
|||
void msm_camera_io_memcpy(void __iomem *dest_addr,
|
||||
void __iomem *src_addr, u32 len)
|
||||
{
|
||||
CDBG("%s: %pK %pK %d\n", __func__, dest_addr, src_addr, len);
|
||||
CDBG("%s: %p %p %d\n", __func__, dest_addr, src_addr, len);
|
||||
msm_camera_io_memcpy_toio(dest_addr, src_addr, len / 4);
|
||||
msm_camera_io_dump(dest_addr, len);
|
||||
}
|
||||
|
@ -223,12 +223,6 @@ int msm_camera_config_vreg(struct device *dev, struct camera_vreg_t *cam_vreg,
|
|||
pr_err("%s:%d vreg sequence invalid\n", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (cam_vreg == NULL) {
|
||||
pr_err("%s:%d cam_vreg sequence invalid\n", __func__, __LINE__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!num_vreg_seq)
|
||||
num_vreg_seq = num_vreg;
|
||||
|
||||
|
@ -550,7 +544,7 @@ int msm_camera_request_gpio_table(struct gpio *gpio_tbl, uint8_t size,
|
|||
int rc = 0, i = 0;
|
||||
|
||||
if (!gpio_tbl || !size) {
|
||||
pr_err("%s:%d invalid gpio_tbl %pK / size %d\n", __func__,
|
||||
pr_err("%s:%d invalid gpio_tbl %p / size %d\n", __func__,
|
||||
__LINE__, gpio_tbl, size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2011, 2013-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011, 2013, The Linux Foundation. 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
|
||||
|
@ -73,7 +73,7 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client,
|
|||
enum msm_camera_i2c_data_type data_type)
|
||||
{
|
||||
int32_t rc = -EFAULT;
|
||||
unsigned char *buf = NULL;
|
||||
unsigned char buf[client->addr_type+data_type];
|
||||
|
||||
if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR
|
||||
&& client->addr_type != MSM_CAMERA_I2C_WORD_ADDR)
|
||||
|
@ -81,17 +81,6 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client,
|
|||
&& data_type != MSM_CAMERA_I2C_WORD_DATA))
|
||||
return rc;
|
||||
|
||||
if (client->addr_type > UINT_MAX - data_type) {
|
||||
pr_err("%s: integer overflow prevented\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
buf = kzalloc(client->addr_type+data_type, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
pr_err("%s:%d no memory\n", __func__, __LINE__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) {
|
||||
buf[0] = addr;
|
||||
} else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) {
|
||||
|
@ -101,8 +90,6 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client,
|
|||
rc = msm_camera_qup_i2c_rxdata(client, buf, data_type);
|
||||
if (rc < 0) {
|
||||
S_I2C_DBG("%s fail\n", __func__);
|
||||
kfree(buf);
|
||||
buf = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -112,8 +99,6 @@ int32_t msm_camera_qup_i2c_read(struct msm_camera_i2c_client *client,
|
|||
*data = buf[0] << 8 | buf[1];
|
||||
|
||||
S_I2C_DBG("%s addr = 0x%x data: 0x%x\n", __func__, addr, *data);
|
||||
kfree(buf);
|
||||
buf = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -121,7 +106,7 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client,
|
|||
uint32_t addr, uint8_t *data, uint32_t num_byte)
|
||||
{
|
||||
int32_t rc = -EFAULT;
|
||||
unsigned char *buf = NULL;
|
||||
unsigned char buf[client->addr_type+num_byte];
|
||||
int i;
|
||||
|
||||
if ((client->addr_type != MSM_CAMERA_I2C_BYTE_ADDR
|
||||
|
@ -129,22 +114,6 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client,
|
|||
|| num_byte == 0)
|
||||
return rc;
|
||||
|
||||
if (num_byte > I2C_REG_DATA_MAX) {
|
||||
pr_err("%s: Error num_byte:0x%x exceeds 8K max supported:0x%x\n",
|
||||
__func__, num_byte, I2C_REG_DATA_MAX);
|
||||
return rc;
|
||||
}
|
||||
if (client->addr_type > UINT_MAX - num_byte) {
|
||||
pr_err("%s: integer overflow prevented\n", __func__);
|
||||
return rc;
|
||||
}
|
||||
|
||||
buf = kzalloc(client->addr_type+num_byte, GFP_KERNEL);
|
||||
if (!buf) {
|
||||
pr_err("%s:%d no memory\n", __func__, __LINE__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (client->addr_type == MSM_CAMERA_I2C_BYTE_ADDR) {
|
||||
buf[0] = addr;
|
||||
} else if (client->addr_type == MSM_CAMERA_I2C_WORD_ADDR) {
|
||||
|
@ -154,8 +123,6 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client,
|
|||
rc = msm_camera_qup_i2c_rxdata(client, buf, num_byte);
|
||||
if (rc < 0) {
|
||||
S_I2C_DBG("%s fail\n", __func__);
|
||||
kfree(buf);
|
||||
buf = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -165,8 +132,6 @@ int32_t msm_camera_qup_i2c_read_seq(struct msm_camera_i2c_client *client,
|
|||
S_I2C_DBG("Byte %d: 0x%x\n", i, buf[i]);
|
||||
S_I2C_DBG("Data: 0x%x\n", data[i]);
|
||||
}
|
||||
kfree(buf);
|
||||
buf = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -320,12 +285,6 @@ int32_t msm_camera_qup_i2c_write_seq_table(struct msm_camera_i2c_client *client,
|
|||
client_addr_type = client->addr_type;
|
||||
client->addr_type = write_setting->addr_type;
|
||||
|
||||
if (reg_setting->reg_data_size > I2C_SEQ_REG_DATA_MAX) {
|
||||
pr_err("%s: number of bytes %u exceeding the max supported %d\n",
|
||||
__func__, reg_setting->reg_data_size, I2C_SEQ_REG_DATA_MAX);
|
||||
return rc;
|
||||
}
|
||||
|
||||
for (i = 0; i < write_setting->size; i++) {
|
||||
rc = msm_camera_qup_i2c_write_seq(client, reg_setting->reg_addr,
|
||||
reg_setting->reg_data, reg_setting->reg_data_size);
|
||||
|
|
|
@ -35,7 +35,6 @@ uint16_t back_cam_fw_version = 0;
|
|||
#endif
|
||||
int led_torch_en;
|
||||
int led_flash_en;
|
||||
struct task_struct *qdaemon_task;
|
||||
|
||||
static int32_t msm_sensor_get_dt_data(struct device_node *of_node,
|
||||
struct msm_sensor_ctrl_t *s_ctrl)
|
||||
|
@ -263,7 +262,7 @@ int msm_sensor_power_down(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
int rc = 0;
|
||||
pr_err("%s\n", __func__);
|
||||
if (!power_info || !sensor_i2c_client) {
|
||||
pr_err("%s:%d failed: power_info %pK sensor_i2c_client %pK\n",
|
||||
pr_err("%s:%d failed: power_info %p sensor_i2c_client %p\n",
|
||||
__func__, __LINE__, power_info, sensor_i2c_client);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -292,7 +291,7 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
pr_err("%s\n", __func__);
|
||||
if (!s_ctrl || !power_info || !sensor_i2c_client || !slave_info ||
|
||||
!sensor_name) {
|
||||
pr_err("%s:%d failed: %pK %pK %pK %pK %pK\n",
|
||||
pr_err("%s:%d failed: %p %p %p %p %p\n",
|
||||
__func__, __LINE__, s_ctrl, power_info,
|
||||
sensor_i2c_client, slave_info, sensor_name);
|
||||
return -EINVAL;
|
||||
|
@ -304,8 +303,6 @@ int msm_sensor_power_up(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
qdaemon_task = current;
|
||||
|
||||
pr_warn("[%s:%d] %s", __func__, __LINE__,
|
||||
sensor_name);
|
||||
rc = msm_camera_power_up(power_info, s_ctrl->sensor_device_type,
|
||||
|
@ -336,7 +333,7 @@ int msm_sensor_match_id(struct msm_camera_i2c_client *sensor_i2c_client,
|
|||
enum msm_camera_i2c_data_type data_type = MSM_CAMERA_I2C_WORD_DATA;
|
||||
|
||||
if (!sensor_i2c_client || !slave_info || !sensor_name) {
|
||||
pr_err("%s:%d failed: %pK %pK %pK\n",
|
||||
pr_err("%s:%d failed: %p %p %p\n",
|
||||
__func__, __LINE__, sensor_i2c_client, slave_info,
|
||||
sensor_name);
|
||||
return -EINVAL;
|
||||
|
@ -835,10 +832,6 @@ int msm_sensor_config(struct msm_sensor_ctrl_t *s_ctrl, void __user *argp)
|
|||
rc = -EFAULT;
|
||||
break;
|
||||
}
|
||||
if(gpio_config.gpio_name < SENSOR_GPIO_RESET || gpio_config.gpio_name >= SENSOR_GPIO_MAX) {
|
||||
rc = -EINVAL;
|
||||
break;
|
||||
}
|
||||
pr_info("%s: setting gpio: %d to %d\n", __func__,
|
||||
data->gpio_conf->gpio_num_info->gpio_num[gpio_config.gpio_name],
|
||||
gpio_config.config_val);
|
||||
|
@ -1299,20 +1292,20 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl)
|
|||
struct msm_camera_cci_client *cci_client = NULL;
|
||||
struct msm_cam_clk_info *clk_info = NULL;
|
||||
if (!s_ctrl) {
|
||||
pr_err("%s:%d failed: invalid params s_ctrl %pK\n", __func__,
|
||||
pr_err("%s:%d failed: invalid params s_ctrl %p\n", __func__,
|
||||
__LINE__, s_ctrl);
|
||||
return -EINVAL;
|
||||
}
|
||||
s_ctrl->sensor_device_type = MSM_CAMERA_PLATFORM_DEVICE;
|
||||
if (!s_ctrl->sensor_i2c_client) {
|
||||
pr_err("%s:%d failed: invalid params sensor_i2c_client %pK\n",
|
||||
pr_err("%s:%d failed: invalid params sensor_i2c_client %p\n",
|
||||
__func__, __LINE__, s_ctrl->sensor_i2c_client);
|
||||
return -EINVAL;
|
||||
}
|
||||
s_ctrl->sensor_i2c_client->cci_client = kzalloc(sizeof(
|
||||
struct msm_camera_cci_client), GFP_KERNEL);
|
||||
if (!s_ctrl->sensor_i2c_client->cci_client) {
|
||||
pr_err("%s:%d failed: no memory cci_client %pK\n", __func__,
|
||||
pr_err("%s:%d failed: no memory cci_client %p\n", __func__,
|
||||
__LINE__, s_ctrl->sensor_i2c_client->cci_client);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -1327,7 +1320,7 @@ int32_t msm_sensor_init_default_params(struct msm_sensor_ctrl_t *s_ctrl)
|
|||
s_ctrl->sensor_v4l2_subdev_ops = &msm_sensor_subdev_ops;
|
||||
clk_info = kzalloc(sizeof(cam_8974_clk_info), GFP_KERNEL);
|
||||
if (!clk_info) {
|
||||
pr_err("%s:%d failed no memory clk_info %pK\n", __func__,
|
||||
pr_err("%s:%d failed no memory clk_info %p\n", __func__,
|
||||
__LINE__, clk_info);
|
||||
rc = -ENOMEM;
|
||||
goto FREE_CCI_CLIENT;
|
||||
|
|
|
@ -161,14 +161,16 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
|
||||
/* Validate input parameters */
|
||||
if (!setting) {
|
||||
pr_err("failed: slave_info %pK", setting);
|
||||
pr_err("failed: slave_info %p", setting);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Allocate memory for slave info */
|
||||
slave_info = kzalloc(sizeof(*slave_info), GFP_KERNEL);
|
||||
if (!slave_info)
|
||||
if (!slave_info) {
|
||||
pr_err("failed: no memory slave_info %p", slave_info);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (copy_from_user(slave_info, (void *)setting, sizeof(*slave_info))) {
|
||||
pr_err("failed: copy_from_user");
|
||||
|
@ -196,7 +198,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
/* Extract s_ctrl from camera id */
|
||||
s_ctrl = g_sctrl[slave_info->camera_id];
|
||||
if (!s_ctrl) {
|
||||
pr_err("failed: s_ctrl %pK for camera_id %d", s_ctrl,
|
||||
pr_err("failed: s_ctrl %p for camera_id %d", s_ctrl,
|
||||
slave_info->camera_id);
|
||||
rc = -EINVAL;
|
||||
goto FREE_SLAVE_INFO;
|
||||
|
@ -245,7 +247,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
}
|
||||
#endif
|
||||
|
||||
CDBG("s_ctrl[%d] %pK", slave_info->camera_id, s_ctrl);
|
||||
CDBG("s_ctrl[%d] %p", slave_info->camera_id, s_ctrl);
|
||||
|
||||
if (s_ctrl->is_probe_succeed == 1) {
|
||||
/*
|
||||
|
@ -262,7 +264,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
/* Allocate memory for power setting */
|
||||
power_setting = kzalloc(sizeof(*power_setting) * size, GFP_KERNEL);
|
||||
if (!power_setting) {
|
||||
pr_err("failed: no memory power_setting %pK", power_setting);
|
||||
pr_err("failed: no memory power_setting %p", power_setting);
|
||||
rc = -ENOMEM;
|
||||
goto FREE_SLAVE_INFO;
|
||||
}
|
||||
|
@ -287,7 +289,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
/* Allocate memory for power setting */
|
||||
power_off_setting = kzalloc(sizeof(*power_off_setting) * off_size, GFP_KERNEL);
|
||||
if (!power_off_setting) {
|
||||
pr_err("failed: no memory power_setting %pK", power_off_setting);
|
||||
pr_err("failed: no memory power_setting %p", power_off_setting);
|
||||
rc = -ENOMEM;
|
||||
goto FREE_POWER_SETTING;
|
||||
}
|
||||
|
@ -311,6 +313,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
|
||||
camera_info = kzalloc(sizeof(struct msm_camera_slave_info), GFP_KERNEL);
|
||||
if (!camera_info) {
|
||||
pr_err("failed: no memory slave_info %p", camera_info);
|
||||
if (is_power_off)
|
||||
goto FREE_POWER_OFF_SETTING;
|
||||
else
|
||||
|
@ -336,7 +339,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
__func__, __LINE__, camera_info->sensor_id, s_ctrl->sensordata->slave_info->sensor_id);
|
||||
/* Fill CCI master, slave address and CCI default params */
|
||||
if (!s_ctrl->sensor_i2c_client) {
|
||||
pr_err("failed: sensor_i2c_client %pK",
|
||||
pr_err("failed: sensor_i2c_client %p",
|
||||
s_ctrl->sensor_i2c_client);
|
||||
rc = -EINVAL;
|
||||
if (is_power_off)
|
||||
|
@ -350,7 +353,7 @@ int32_t msm_sensor_driver_probe(void *setting)
|
|||
|
||||
cci_client = s_ctrl->sensor_i2c_client->cci_client;
|
||||
if (!cci_client) {
|
||||
pr_err("failed: cci_client %pK", cci_client);
|
||||
pr_err("failed: cci_client %p", cci_client);
|
||||
if (is_power_off)
|
||||
goto FREE_POWER_OFF_SETTING;
|
||||
else
|
||||
|
@ -749,8 +752,10 @@ static int32_t msm_sensor_driver_parse(struct platform_device *pdev)
|
|||
|
||||
/* Create sensor control structure */
|
||||
s_ctrl = kzalloc(sizeof(*s_ctrl), GFP_KERNEL);
|
||||
if (!s_ctrl)
|
||||
if (!s_ctrl) {
|
||||
pr_err("failed: no memory s_ctrl %p", s_ctrl);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Fill platform device */
|
||||
s_ctrl->pdev = pdev;
|
||||
|
@ -759,7 +764,7 @@ static int32_t msm_sensor_driver_parse(struct platform_device *pdev)
|
|||
s_ctrl->sensor_i2c_client = kzalloc(sizeof(*s_ctrl->sensor_i2c_client),
|
||||
GFP_KERNEL);
|
||||
if (!s_ctrl->sensor_i2c_client) {
|
||||
pr_err("failed: no memory sensor_i2c_client %pK",
|
||||
pr_err("failed: no memory sensor_i2c_client %p",
|
||||
s_ctrl->sensor_i2c_client);
|
||||
goto FREE_SCTRL;
|
||||
}
|
||||
|
@ -768,7 +773,7 @@ static int32_t msm_sensor_driver_parse(struct platform_device *pdev)
|
|||
s_ctrl->msm_sensor_mutex = kzalloc(sizeof(*s_ctrl->msm_sensor_mutex),
|
||||
GFP_KERNEL);
|
||||
if (!s_ctrl->msm_sensor_mutex) {
|
||||
pr_err("failed: no memory msm_sensor_mutex %pK",
|
||||
pr_err("failed: no memory msm_sensor_mutex %p",
|
||||
s_ctrl->msm_sensor_mutex);
|
||||
goto FREE_SENSOR_I2C_CLIENT;
|
||||
}
|
||||
|
@ -800,7 +805,7 @@ static int32_t msm_sensor_driver_parse(struct platform_device *pdev)
|
|||
|
||||
/* Store sensor control structure in static database */
|
||||
g_sctrl[pdev->id] = s_ctrl;
|
||||
pr_warn("g_sctrl[%d] %pK", pdev->id, g_sctrl[pdev->id]);
|
||||
pr_warn("g_sctrl[%d] %p", pdev->id, g_sctrl[pdev->id]);
|
||||
|
||||
return rc;
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ struct yuv_userset {
|
|||
unsigned int aeawblock;
|
||||
unsigned int resolution;
|
||||
unsigned int prev_resolution;
|
||||
unsigned int flicker;
|
||||
};
|
||||
|
||||
struct yuv_ctrl {
|
||||
|
|
|
@ -61,7 +61,7 @@ static long msm_sensor_driver_cmd(struct msm_sensor_init_t *s_init, void *arg)
|
|||
|
||||
/* Validate input parameters */
|
||||
if (!s_init || !cfg) {
|
||||
pr_err("failed: s_init %pK cfg %pK", s_init, cfg);
|
||||
pr_err("failed: s_init %p cfg %p", s_init, cfg);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ static long msm_sensor_init_subdev_ioctl(struct v4l2_subdev *sd,
|
|||
|
||||
/* Validate input parameters */
|
||||
if (!s_init) {
|
||||
pr_err("failed: s_init %pK", s_init);
|
||||
pr_err("failed: s_init %p", s_init);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ static ssize_t front_camera_firmware_show(struct device *dev,
|
|||
#elif defined(CONFIG_SEC_HESTIA_PROJECT)
|
||||
char cam_fw[] = "S5K6B2YX N\n";
|
||||
#elif defined(CONFIG_SEC_ATLANTIC_PROJECT) || defined(CONFIG_MACH_MEGA2LTE_KTT)
|
||||
char cam_fw[] = "S5K6B2YX N\n";
|
||||
char cam_fw[] = "S5K6B2YX S5K6B2YX\n";
|
||||
#elif defined(CONFIG_MACH_VICTORLTE_CTC)
|
||||
char cam_fw[] = "N N\n";
|
||||
#elif defined(CONFIG_SEC_VASTALTE_CHN_CMMCC_DUOS_PROJECT)
|
||||
|
@ -360,6 +360,7 @@ static int __init msm_sensor_init_module(void)
|
|||
s_init = kzalloc(sizeof(struct msm_sensor_init_t), GFP_KERNEL);
|
||||
if (!s_init) {
|
||||
class_destroy(camera_class);
|
||||
pr_err("failed: no memory s_init %p", NULL);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
@ -193,19 +193,12 @@ int32_t sr130pc20_set_white_balance(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
|||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MACH_MILLETLTE_KOR
|
||||
int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl, int resolution)
|
||||
int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl)
|
||||
{
|
||||
if (sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) {
|
||||
if (sr130pc20_ctrl.vtcall_mode == 1) {
|
||||
if(resolution== MSM_SENSOR_RES_3) {
|
||||
CDBG("CIF size VT Init Settings");
|
||||
SR130PC20_WRITE_LIST(sr130pc20_CIF_VT_Init_Reg);
|
||||
}
|
||||
else {
|
||||
CDBG("VT Init Settings");
|
||||
SR130PC20_WRITE_LIST(sr130pc20_VT_Init_Reg);
|
||||
}
|
||||
SR130PC20_WRITE_LIST(sr130pc20_VT_Init_Reg);
|
||||
CDBG("VT Init Settings");
|
||||
}else {
|
||||
SR130PC20_WRITE_LIST(sr130pc20_Init_Reg);
|
||||
CDBG("Init settings");
|
||||
|
@ -215,31 +208,8 @@ int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl, int resolution)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int32_t sr130pc20_set_Init_reg(struct msm_sensor_ctrl_t *s_ctrl, int flicker_type)
|
||||
{
|
||||
if (sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) {
|
||||
if (sr130pc20_ctrl.vtcall_mode == 1) {
|
||||
SR130PC20_WRITE_LIST(sr130pc20_VT_Init_Reg);
|
||||
CDBG("VT Init Settings");
|
||||
}else {
|
||||
if (flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__);
|
||||
SR130PC20_WRITE_LIST(sr130pc20_Init_Reg);
|
||||
} else {
|
||||
pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__);
|
||||
SR130PC20_WRITE_LIST(sr130pc20_Init_Reg_60hz);
|
||||
}
|
||||
CDBG("Init settings");
|
||||
}
|
||||
SR130PC20_WRITE_LIST(sr130pc20_stop_stream);
|
||||
CDBG("Stop Stream Settings");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type)
|
||||
int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
CDBG("mode = %d", mode);
|
||||
|
@ -248,13 +218,8 @@ int32_t sr130pc20_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int
|
|||
rc = SR130PC20_WRITE_LIST(sr130pc20_Snapshot);
|
||||
break;
|
||||
default:
|
||||
if (flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
pr_err("%s : %d 50Hz Preview initial\n", __func__, __LINE__);
|
||||
rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_for_initial_50hz);
|
||||
} else {
|
||||
pr_err("%s : %d 60Hz Preview initial\n", __func__, __LINE__);
|
||||
rc = SR130PC20_WRITE_LIST(sr130pc20_Preview_for_initial_60hz);
|
||||
}
|
||||
rc = SR130PC20_WRITE_LIST(sr130pc20_Preview);
|
||||
pr_err("%s: Setting %d is sr130pc20_Preview\n", __func__, mode);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
@ -383,13 +348,9 @@ int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
#endif
|
||||
break;
|
||||
case CFG_SET_RESOLUTION:
|
||||
sr130pc20_set_Init_reg(s_ctrl);
|
||||
resolution = *((int32_t *)cdata->cfg.setting);
|
||||
CDBG("CFG_SET_RESOLUTION res = %d" , resolution);
|
||||
#ifdef CONFIG_MACH_MILLETLTE_KOR
|
||||
sr130pc20_set_Init_reg(s_ctrl, resolution);
|
||||
#else
|
||||
sr130pc20_set_Init_reg(s_ctrl, cdata->flicker_type);
|
||||
#endif
|
||||
break;
|
||||
case CFG_SET_STOP_STREAM:
|
||||
CDBG(" CFG_SET_STOP_STREAM writing stop stream registers: sr130pc20_stop_stream");
|
||||
|
@ -405,13 +366,7 @@ int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
{
|
||||
CDBG(" CFG_SET_START_STREAM: Preview");
|
||||
if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_RECORDING) {
|
||||
if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
pr_err("%s : %d 50Hz init setting\n", __func__, __LINE__);
|
||||
SR130PC20_WRITE_LIST(sr130pc20_Init_Reg);
|
||||
} else {
|
||||
pr_err("%s : %d 60Hz init setting\n", __func__, __LINE__);
|
||||
SR130PC20_WRITE_LIST(sr130pc20_Init_Reg_60hz);
|
||||
}
|
||||
SR130PC20_WRITE_LIST(sr130pc20_stop_stream);
|
||||
}
|
||||
if(sr130pc20_ctrl.prev_mode != CAMERA_MODE_CAPTURE) {
|
||||
|
@ -419,7 +374,7 @@ int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb);
|
||||
sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure );
|
||||
}
|
||||
sr130pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type);
|
||||
sr130pc20_set_resolution(s_ctrl , resolution );
|
||||
#if defined(CONFIG_SEC_MILLET_PROJECT) || defined(CONFIG_SEC_MATISSE_PROJECT) || defined (CONFIG_MACH_VICTOR3GDSDTV_LTN)
|
||||
if(sr130pc20_ctrl.prev_mode == CAMERA_MODE_INIT) {
|
||||
msleep(200);
|
||||
|
@ -429,18 +384,13 @@ int32_t sr130pc20_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
break;
|
||||
case CAMERA_MODE_CAPTURE:
|
||||
{
|
||||
sr130pc20_set_resolution(s_ctrl , resolution , cdata->flicker_type);
|
||||
sr130pc20_set_resolution(s_ctrl , resolution );
|
||||
sr130pc20_set_exif(s_ctrl);
|
||||
}
|
||||
break;
|
||||
case CAMERA_MODE_RECORDING:
|
||||
{
|
||||
//SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode);
|
||||
if (cdata->flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode_50hz);
|
||||
} else {
|
||||
SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode_60hz);
|
||||
}
|
||||
SR130PC20_WRITE_LIST(sr130pc20_camcorder_mode);
|
||||
sr130pc20_set_effect( s_ctrl , sr130pc20_ctrl.settings.effect);
|
||||
sr130pc20_set_white_balance( s_ctrl, sr130pc20_ctrl.settings.wb);
|
||||
sr130pc20_set_exposure_compensation( s_ctrl , sr130pc20_ctrl.settings.exposure );
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -155,7 +155,7 @@ void sr352_get_ev_data_preflash_func2(struct msm_sensor_ctrl_t *s_ctrl);
|
|||
void sr352_set_ev_data_mainFlash_func3(struct msm_sensor_ctrl_t *s_ctrl);
|
||||
void sr352_return_ev_data_func4(struct msm_sensor_ctrl_t *s_ctrl);
|
||||
void sr352_actuator_softlanding(struct msm_sensor_ctrl_t *s_ctrl);
|
||||
void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl, int flicker_type);
|
||||
void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl);
|
||||
static int sr352_is_required_flash(struct msm_sensor_ctrl_t *s_ctrl, int flash_mode);
|
||||
void sr352_set_af_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode);
|
||||
void sr352_recording_landing(struct msm_sensor_ctrl_t *s_ctrl);
|
||||
|
@ -386,12 +386,12 @@ int32_t sr352_set_scene_mode(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
|||
}
|
||||
|
||||
|
||||
int32_t sr352_set_ae_awb_lock(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type)
|
||||
int32_t sr352_set_ae_awb_lock(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
CDBG("mode = %d", mode);
|
||||
|
||||
if(flicker_type == MSM_CAM_FLICKER_60HZ) {
|
||||
if(ANTIBANDING_60HZ) {
|
||||
if(mode) {
|
||||
rc = SR352_WRITE_LIST(sr352_AEAWB_Lock_60Hz);
|
||||
} else {
|
||||
|
@ -456,7 +456,7 @@ int32_t sr352_set_metering(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
|||
return rc;
|
||||
}
|
||||
|
||||
int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int flicker_type)
|
||||
int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
CDBG("mode = %d", mode);
|
||||
|
@ -500,10 +500,10 @@ int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int fli
|
|||
else {
|
||||
rc = SR352_WRITE_LIST_BURST(sr352_recording_50Hz_HD);
|
||||
}
|
||||
if(flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
rc = SR352_WRITE_LIST(sr352_HD_50hz_setting);
|
||||
} else {
|
||||
if(ANTIBANDING_60HZ) {
|
||||
rc = SR352_WRITE_LIST(sr352_HD_60hz_setting);
|
||||
} else {
|
||||
rc = SR352_WRITE_LIST(sr352_HD_50hz_setting);
|
||||
}
|
||||
#if defined (AF_FLASH_SUPPORT)
|
||||
SR352_WRITE_LIST(sr352_HD_AF_Init_Reg);
|
||||
|
@ -523,25 +523,16 @@ int32_t sr352_set_resolution(struct msm_sensor_ctrl_t *s_ctrl, int mode, int fli
|
|||
case MSM_SENSOR_RES_6:
|
||||
rc = SR352_WRITE_LIST(sr352_preview_320_240);
|
||||
break;
|
||||
#ifdef CONFIG_MACH_MILLETLTE_KOR
|
||||
case MSM_SENSOR_RES_7:
|
||||
rc = SR352_WRITE_LIST(sr352_preview_352_288);
|
||||
break;
|
||||
case MSM_SENSOR_RES_8:
|
||||
rc = SR352_WRITE_LIST(sr352_preview_176_144);
|
||||
break;
|
||||
#else
|
||||
case MSM_SENSOR_RES_7:
|
||||
rc = SR352_WRITE_LIST(sr352_preview_176_144);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
pr_err("%s: Setting %d is invalid\n", __func__, mode);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
void sr352_init_camera(struct msm_sensor_ctrl_t *s_ctrl , int flicker_type)
|
||||
void sr352_init_camera(struct msm_sensor_ctrl_t *s_ctrl)
|
||||
{
|
||||
int32_t rc = 0;
|
||||
if(settings_type == 1) {
|
||||
|
@ -555,10 +546,10 @@ void sr352_init_camera(struct msm_sensor_ctrl_t *s_ctrl , int flicker_type)
|
|||
#if defined (AF_FLASH_SUPPORT)
|
||||
SR352_WRITE_LIST(sr352_AF_Init_Reg);
|
||||
#endif
|
||||
if(flicker_type == MSM_CAM_FLICKER_50HZ) {
|
||||
rc = SR352_WRITE_LIST(sr352_50hz_setting);
|
||||
} else {
|
||||
if(ANTIBANDING_60HZ) {
|
||||
rc = SR352_WRITE_LIST(sr352_60hz_setting);
|
||||
} else {
|
||||
rc = SR352_WRITE_LIST(sr352_50hz_setting);
|
||||
}
|
||||
if(rc <0) {
|
||||
pr_err("%s:%d error writing 50hz failed\n", __func__, __LINE__);
|
||||
|
@ -647,7 +638,6 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
int32_t rc = 0;
|
||||
int32_t i = 0;
|
||||
mutex_lock(s_ctrl->msm_sensor_mutex);
|
||||
sr352_ctrl.settings.flicker = cdata->flicker_type;
|
||||
|
||||
switch (cdata->cfgtype) {
|
||||
case CFG_GET_SENSOR_INFO:
|
||||
|
@ -677,7 +667,7 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
sr352_regs_table_init("/data/"REG_SET_FILE);
|
||||
pr_err("/data/"REG_SET_FILE" inside CFG_SET_INIT_SETTING");
|
||||
#endif
|
||||
sr352_init_camera(s_ctrl , cdata->flicker_type);
|
||||
sr352_init_camera(s_ctrl);
|
||||
|
||||
#if !defined (AF_FLASH_SUPPORT)
|
||||
//Stop stream and start in START_STREAM
|
||||
|
@ -689,7 +679,7 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING &&
|
||||
sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3) {
|
||||
|
||||
sr352_init_camera(s_ctrl , cdata->flicker_type);
|
||||
sr352_init_camera(s_ctrl);
|
||||
//Stop stream and start in START_STREAM
|
||||
SR352_WRITE_LIST(sr352_stop_stream);
|
||||
CDBG("CFG CFG_SET_RESOLUTION - HD Recording mode off");
|
||||
|
@ -718,12 +708,12 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
switch(sr352_ctrl.op_mode) {
|
||||
case CAMERA_MODE_PREVIEW:
|
||||
{
|
||||
sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution , cdata->flicker_type);
|
||||
sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution);
|
||||
#if !defined(AF_FLASH_SUPPORT)
|
||||
if (sr352_ctrl.prev_mode == CAMERA_MODE_RECORDING &&
|
||||
sr352_ctrl.settings.prev_resolution == MSM_SENSOR_RES_3) {
|
||||
|
||||
sr352_set_ae_awb_lock(s_ctrl, 0, cdata->flicker_type);
|
||||
sr352_set_ae_awb_lock(s_ctrl, 0);
|
||||
msleep(100);
|
||||
}
|
||||
|
||||
|
@ -737,21 +727,17 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
{
|
||||
#if defined (AF_FLASH_SUPPORT)
|
||||
if (!is_af_run)
|
||||
sr352_ae_stable_without_af(s_ctrl,sr352_ctrl.settings.flicker);
|
||||
sr352_ae_stable_without_af(s_ctrl);
|
||||
if (need_main_flash) {
|
||||
SR352_WRITE_LIST(sr352_stop_stream);
|
||||
if(sr352_ctrl.settings.flicker == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable4_1_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable4_1);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable4_1);
|
||||
sr352_set_ev_data_mainFlash_func3(s_ctrl);
|
||||
set_led_flash(MSM_CAMERA_LED_HIGH);
|
||||
SR352_WRITE_LIST(sr352_StartMainFlash_FlashRegTable5);
|
||||
flash_status = MSM_CAMERA_LED_HIGH;
|
||||
}
|
||||
#endif
|
||||
sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution , cdata->flicker_type);
|
||||
sr352_set_resolution(s_ctrl , sr352_ctrl.settings.resolution);
|
||||
}
|
||||
break;
|
||||
case CAMERA_MODE_RECORDING:
|
||||
|
@ -764,10 +750,10 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
#endif
|
||||
if ( sr352_ctrl.settings.resolution == MSM_SENSOR_RES_3 ) {
|
||||
CDBG("CFG writing *** sr352_recording_50Hz_HD");
|
||||
sr352_set_resolution( s_ctrl , sr352_ctrl.settings.resolution , cdata->flicker_type );
|
||||
sr352_set_resolution( s_ctrl , sr352_ctrl.settings.resolution);
|
||||
} else {
|
||||
CDBG("CFG writing *** sr352_recording_50Hz_30fps");
|
||||
sr352_set_resolution( s_ctrl , MSM_SENSOR_RES_5 , cdata->flicker_type);
|
||||
sr352_set_resolution( s_ctrl , MSM_SENSOR_RES_5);
|
||||
if(settings_type == 1) {
|
||||
rc = SR352_WRITE_LIST(sr352_recording_50Hz_30fps_01);
|
||||
}
|
||||
|
@ -793,11 +779,7 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
if (flash_status == MSM_CAMERA_LED_HIGH) {
|
||||
set_led_flash(MSM_CAMERA_LED_OFF);
|
||||
flash_status = MSM_CAMERA_LED_OFF;
|
||||
if(sr352_ctrl.settings.flicker == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6);
|
||||
sr352_return_ev_data_func4(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7);
|
||||
need_main_flash = 0;
|
||||
|
@ -1097,33 +1079,21 @@ int32_t sr352_sensor_config(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
|
||||
|
||||
#if defined (AF_FLASH_SUPPORT)
|
||||
void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl, int flicker_type)
|
||||
void sr352_ae_stable_without_af(struct msm_sensor_ctrl_t *s_ctrl)
|
||||
{
|
||||
is_preflash = sr352_is_required_flash(s_ctrl, flash_mode);
|
||||
if (is_preflash) {
|
||||
memset(&Flash, 0, sizeof(Flash));
|
||||
if(flicker_type == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1_60Hz);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2);
|
||||
set_led_flash(MSM_CAMERA_LED_LOW);
|
||||
flash_status = MSM_CAMERA_LED_LOW;
|
||||
need_main_flash = 1;
|
||||
msleep(600); /* AE become stable here */
|
||||
if(flicker_type == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3_60Hz);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4);
|
||||
msleep(50);
|
||||
set_led_flash(MSM_CAMERA_LED_OFF);
|
||||
msleep(300);
|
||||
|
@ -1942,7 +1912,7 @@ void sr352_cancel_af(struct msm_sensor_ctrl_t *s_ctrl)
|
|||
SR352_WRITE_ADDR(0x11, focus_reg);
|
||||
}
|
||||
|
||||
int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos, int flicker_type)
|
||||
int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int initial_pos)
|
||||
{
|
||||
int rc = -EINVAL;
|
||||
|
||||
|
@ -1954,15 +1924,9 @@ int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int in
|
|||
|
||||
if (is_preflash) {
|
||||
memset(&Flash, 0, sizeof(Flash));
|
||||
if(flicker_type == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1_60Hz);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_StartPreFlash_FlashRegTable1);
|
||||
sr352_get_ev_data_flash_Off_func1(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_ReadyPreFlash_FlashRegTable2);
|
||||
set_led_flash(MSM_CAMERA_LED_LOW);
|
||||
flash_status = MSM_CAMERA_LED_LOW;
|
||||
rc = SENSOR_AF_PRE_FLASH_ON;
|
||||
|
@ -1976,15 +1940,9 @@ int32_t sr352_set_af_status(struct msm_sensor_ctrl_t *s_ctrl, int status, int in
|
|||
case SENSOR_AF_PRE_FLASH_OFF:
|
||||
CDBG("SENSOR_AF_PRE_FLASH_OFF\n");
|
||||
if (is_preflash) {
|
||||
if(flicker_type == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3_60Hz);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_AfterPreFlash_FlashRegTable3);
|
||||
sr352_get_ev_data_preflash_func2(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndPreFlash_FlashRegTable4);
|
||||
if (!is_touchaf)
|
||||
msleep(100);
|
||||
|
||||
|
@ -2105,10 +2063,10 @@ int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
#if defined (AF_FLASH_SUPPORT)
|
||||
if(!flash_mode){
|
||||
CDBG("EXT_CAM_SET_AE_AWB, !flash_mode");
|
||||
sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock, sr352_ctrl.settings.flicker);
|
||||
sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock);
|
||||
}
|
||||
#else
|
||||
sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock, sr352_ctrl.settings.flicker);
|
||||
sr352_set_ae_awb_lock(s_ctrl, sr352_ctrl.settings.aeawblock);
|
||||
#endif
|
||||
break;
|
||||
#if defined (AF_FLASH_SUPPORT)
|
||||
|
@ -2122,7 +2080,7 @@ int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
CDBG("DAFF EXT_CAM_SET_AF_STATUS: %d : %d\n", cam_info->value_1, cam_info->value_2);
|
||||
|
||||
cam_info->value_1 = sr352_set_af_status(s_ctrl, cam_info->value_1,
|
||||
cam_info->value_2, sr352_ctrl.settings.flicker);
|
||||
cam_info->value_2);
|
||||
|
||||
if (!copy_to_user((void *)argp, (const void *)&cam_info,
|
||||
sizeof(cam_info)))
|
||||
|
@ -2169,11 +2127,7 @@ int32_t sr352_sensor_native_control(struct msm_sensor_ctrl_t *s_ctrl,
|
|||
if (flash_status == MSM_CAMERA_LED_HIGH) {
|
||||
set_led_flash(MSM_CAMERA_LED_OFF);
|
||||
flash_status = MSM_CAMERA_LED_OFF;
|
||||
if(sr352_ctrl.settings.flicker == MSM_CAM_FLICKER_60HZ) {
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6_60Hz);
|
||||
} else {
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6);
|
||||
}
|
||||
SR352_WRITE_LIST(sr352_AfterMainFlash_FlashRegTable6);
|
||||
sr352_return_ev_data_func4(s_ctrl);
|
||||
SR352_WRITE_LIST(sr352_EndMainFlash_FlashRegTable7);
|
||||
need_main_flash = 0;
|
||||
|
@ -2203,7 +2157,6 @@ void sr352_set_default_settings(void)
|
|||
sr352_ctrl.settings.effect = CAMERA_EFFECT_OFF;
|
||||
sr352_ctrl.settings.scenemode = CAMERA_SCENE_AUTO;
|
||||
sr352_ctrl.settings.aeawblock = 0;
|
||||
sr352_ctrl.settings.flicker = MSM_CAM_FLICKER_50HZ;
|
||||
}
|
||||
|
||||
#ifndef NO_BURST
|
||||
|
|
|
@ -17609,57 +17609,6 @@ static struct msm_camera_i2c_reg_conf sr352_preview_320_240[] ={
|
|||
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MACH_MILLETLTE_KOR
|
||||
static struct msm_camera_i2c_reg_conf sr352_preview_352_288[] ={
|
||||
{0x03, 0xc1,},
|
||||
{0x10, 0x06,}, // ssd tranfer disable
|
||||
{0xff, 0x01,},
|
||||
|
||||
{0x03, 0x00,},
|
||||
{0x01, 0x01,}, // Sleep On
|
||||
|
||||
{0x03, 0xc1,},
|
||||
{0x10, 0x07,}, // ssd tranfer enable
|
||||
|
||||
///////////////////////////////////////////
|
||||
// Scaler 352_288
|
||||
///////////////////////////////////////////
|
||||
{0x03, 0x19,},
|
||||
{0x10, 0x00,}, //hw scaler off
|
||||
{0x14, 0x03,}, //sawtooth on 320_240 176_144 pre filter //Bit[5] on
|
||||
|
||||
//Scaler
|
||||
{0x03, 0xc0,},
|
||||
{0xa0, 0x00,}, //fw scaler off
|
||||
{0xa2, 0x01,}, //width
|
||||
{0xa3, 0x60,},
|
||||
{0xa4, 0x01,}, //height
|
||||
{0xa5, 0x20,},
|
||||
|
||||
{0xa1, 0x00,}, //zoom step
|
||||
{0xa0, 0xc0,}, //fw scaler on
|
||||
|
||||
{0x03, 0x19,},
|
||||
{0x10, 0x07,}, //hw scaler on
|
||||
|
||||
///////////////////////////////////////////
|
||||
// 05 Page MIPI Size
|
||||
///////////////////////////////////////////
|
||||
{0x03, 0x05,}, // Page05
|
||||
|
||||
{0x30, 0x02,}, // l_pkt_wc_h // Pre = 352 * 2 (YUV)
|
||||
{0x31, 0xc0,}, // l_pkt_wc_l
|
||||
//------------------------------------//
|
||||
|
||||
{0x03, 0x00,},
|
||||
{0x1e, 0x01,}, // frame update
|
||||
{0x01, 0x00,}, // Sleep Off
|
||||
|
||||
{0xff, 0x01,}, //delay 10ms
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_preview_800_480[] ={
|
||||
{0x03, 0xc1,},
|
||||
{0x10, 0x06,}, // ssd tranfer disable
|
||||
|
|
|
@ -36442,7 +36442,6 @@ static struct msm_camera_i2c_reg_conf sr352_50hz_setting[] = {
|
|||
{0x03, 0xc7,},
|
||||
{0x10, 0x70,}, //AE Off (Band Off) 50hz 70, 60hz 50
|
||||
{0x12, 0x30,}, // Fast speed
|
||||
{0x13, 0x61,},
|
||||
{0x15, 0xc0,}, // SSD Patch Weight Y Mean On
|
||||
|
||||
{0x1e, 0x03,}, // Band1 Step
|
||||
|
@ -36607,7 +36606,6 @@ static struct msm_camera_i2c_reg_conf sr352_60hz_setting[] = {
|
|||
{0x03, 0xc7,},
|
||||
{0x10, 0x50,}, //AE Off (Band Off) 50hz 70, 60hz 50
|
||||
{0x12, 0x30,}, // Fast speed
|
||||
{0x13, 0x61,},
|
||||
{0x15, 0xc0,}, // SSD Patch Weight Y Mean On
|
||||
|
||||
{0x1e, 0x03,}, // Band1 Step
|
||||
|
@ -36695,7 +36693,7 @@ static struct msm_camera_i2c_reg_conf sr352_HD_60hz_setting[] = {
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
//Shutter Setting
|
||||
{0x03, 0xc7,},
|
||||
{0x10, 0x10,}, // AE Off (Band Off) 50hz 30, 60hz 10
|
||||
{0x10, 0x30,}, // AE Off (Band Off) 50hz 30, 60hz 10
|
||||
{0x12, 0x03,}, // Slow AE
|
||||
{0x15, 0xc0,}, // SSD Patch Weight Y Mean On
|
||||
|
||||
|
|
|
@ -37970,78 +37970,6 @@ static struct msm_camera_i2c_reg_conf sr352_StartPreFlash_FlashRegTable1[]={
|
|||
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_StartPreFlash_FlashRegTable1_60Hz[]={
|
||||
|
||||
{0x03, 0xc7}, //SW ExpMax 15fps
|
||||
{0xb3, 0x3f},
|
||||
{0xb4, 0x80},
|
||||
{0xb5, 0x00},
|
||||
{0xb6, 0x00},
|
||||
|
||||
{0xb7, 0x3f},
|
||||
{0xb8, 0x80},
|
||||
{0xb9, 0x00},
|
||||
{0xba, 0x00},
|
||||
|
||||
{0xbb, 0x3f},
|
||||
{0xbc, 0x80},
|
||||
{0xbd, 0x00},
|
||||
{0xbe, 0x00},
|
||||
|
||||
{0x32, 0x00},
|
||||
{0x33, 0x36},
|
||||
{0x34, 0xC9},
|
||||
{0x35, 0x00},
|
||||
{0x6F, 0x08},//SW ExpMaxStep 15fps
|
||||
|
||||
{0x03, 0x20}, //HW ExpMax 15fps
|
||||
{0x24, 0x00},
|
||||
{0x25, 0x36},
|
||||
{0x26, 0xC9},
|
||||
{0x27, 0x00},
|
||||
|
||||
{0x03, 0xD3}, // Adaptive start
|
||||
{0x85, 0x70}, // Cb _Sat_Dark1
|
||||
{0x86, 0x70}, // Cb _Sat_Dark2
|
||||
{0x8B, 0x70}, // Cr _Sat_Dark1
|
||||
{0x8C, 0x70}, // Cr _Sat_Dark2
|
||||
{0xB4, 0x80}, // LSC3_Ind_LowTmp gain g 80
|
||||
{0xB5, 0x80}, // LSC4_Ind_LowTmp gain b 80
|
||||
{0xB6, 0x7A}, // LSC5_Ind_LowTmp gain r 82
|
||||
{0xBA, 0x80}, // LSC3_Ind_MiddleTmp gain g 80
|
||||
{0xBB, 0x80}, // LSC4_Ind_MiddleTmp gain b 80
|
||||
{0xBC, 0x6E}, // LSC5_Ind_MiddleTmp gain r 74
|
||||
{0xC0, 0x80}, // LSC3_Ind_HighTmp gain g 80
|
||||
{0xC1, 0x80}, // LSC4_Ind_HighTmp gain b 80
|
||||
{0xC2, 0x6E}, // LSC5_Ind_HighTmp gain r 74
|
||||
{0xC6, 0x84}, // LSC3_Dark1_LowTmp gain g 68
|
||||
{0xC7, 0x84}, // LSC4_Dark1_LowTmp gain b 65
|
||||
{0xC8, 0x6A}, // LSC5_Dark1_LowTmp gain r 62
|
||||
{0xCC, 0x84}, // LSC3_Dark1_MiddleTmp gain g 68
|
||||
{0xCD, 0x84}, // LSC4_Dark1_MiddleTmp gain b 65
|
||||
{0xCE, 0x6A}, // LSC5_Dark1_MiddleTmp gain r 62
|
||||
{0xD2, 0x84}, // LSC3_Dark1_HighTmp gain g 68
|
||||
{0xD3, 0x84}, // LSC4_Dark1_HighTmp gain b 65
|
||||
{0xD4, 0x6A}, // LSC5_Dark1_HighTmp gain r 62
|
||||
{0xD8, 0x84}, // LSC3_Dark2 gain g 68
|
||||
{0xD9, 0x84}, // LSC4_Dark2 gain b 65
|
||||
{0xDA, 0x6A}, // LSC5_Dark2 gain r 52
|
||||
|
||||
{0x03, 0x00},
|
||||
{0xFF, 0x23}, // 350ms delay(unit=10ms)
|
||||
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0x50},
|
||||
{0x03, 0xC8},
|
||||
{0x10, 0x00},
|
||||
|
||||
{0x03, 0xCF},
|
||||
{0x2C, 0x06},
|
||||
|
||||
{0xFF, 0x0A}, // 100ms delay(unit=10ms)
|
||||
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_ReadyPreFlash_FlashRegTable2[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0xF0}, //AE on
|
||||
|
@ -38110,74 +38038,6 @@ static struct msm_camera_i2c_reg_conf sr352_ReadyPreFlash_FlashRegTable2[]={
|
|||
{0x10, 0xD3},
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_ReadyPreFlash_FlashRegTable2_60Hz[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0xD0}, //AE on 60Hz
|
||||
{0x12, 0x70}, //AE Speed Hi
|
||||
{0x03, 0xC8},
|
||||
{0x10, 0x00},
|
||||
{0x14, 0x8F},
|
||||
{0x17, 0x77}, //AWB speed1
|
||||
{0x18, 0x77}, //AWB speed2
|
||||
{0x22, 0x80}, //AWB MaxStepInc
|
||||
{0x91, 0x20},
|
||||
{0x92, 0x20},
|
||||
{0x03, 0xCA},
|
||||
{0xA1, 0x80},
|
||||
{0xA2, 0x00},
|
||||
{0xA3, 0x00},
|
||||
{0x03, 0xC8},
|
||||
|
||||
{0xEB, 0x11}, //Indoor_aCtmpWgt
|
||||
{0xEC, 0x11}, //Indoor_aCtmpWgt_a01
|
||||
{0xED, 0x11}, //Indoor_aCtmpWgt_a02
|
||||
{0xEE, 0x11}, //Indoor_aCtmpWgt_a03
|
||||
{0xEF, 0x11}, //Indoor_aCtmpWgt_a04
|
||||
{0xF0, 0x11}, //Indoor_aCtmpWgt_a05
|
||||
{0xF1, 0x11}, //Indoor_aCtmpWgt_a06
|
||||
{0xF2, 0x11}, //Indoor_aCtmpWgt_a07
|
||||
{0xF3, 0x11}, //Indoor_aCtmpWgt_a08
|
||||
{0xF4, 0x12}, //Indoor_aCtmpWgt_a09
|
||||
{0xF5, 0x64}, //Indoor_aCtmpWgt_a10
|
||||
{0xF6, 0x11}, //Indoor_aCtmpWgt_a11
|
||||
{0xF7, 0x18}, //Indoor_aCtmpWgt_a12
|
||||
{0xF8, 0xFA}, //Indoor_aCtmpWgt_a13
|
||||
{0xF9, 0x11}, //Indoor_aCtmpWgt_a14
|
||||
{0xFA, 0x48}, //Indoor_aCtmpWgt_a15
|
||||
{0xFB, 0x82}, //Indoor_aCtmpWgt_a16
|
||||
{0xFC, 0x11}, //Indoor_aCtmpWgt_a17
|
||||
{0xFD, 0x11}, //Indoor_aCtmpWgt_a18
|
||||
|
||||
{0x03, 0xC9}, //c9 page
|
||||
|
||||
{0x10, 0x11}, //Indoor_aCtmpWgt_a19
|
||||
{0x11, 0x11}, //Indoor_aCtmpWgt_a20
|
||||
{0x12, 0x11}, //Indoor_aCtmpWgt_a21
|
||||
{0x13, 0x11}, //Indoor_aCtmpWgt_a22
|
||||
{0x14, 0x11}, //Indoor_aCtmpWgt_a23
|
||||
{0x15, 0x10}, //Indoor_aCtmpWgt_a24
|
||||
|
||||
{0x2B, 0x28}, //Indoor_aRgTgtOfs
|
||||
{0x2C, 0x24}, //Indoor_aRgTgtOfs_a01
|
||||
{0x2D, 0x20}, //Indoor_aRgTgtOfs_a02
|
||||
{0x2E, 0x1C}, //Indoor_aRgTgtOfs_a03 //h80->h84 Hando Extend MaxMax choi 0618
|
||||
{0x2F, 0x18}, //Indoor_aRgTgtOfs_a04 //h04->h00 choi 0618
|
||||
{0x30, 0xB0}, //Indoor_aBgTgtOfs
|
||||
{0x31, 0xAC}, //Indoor_aBgTgtOfs_a01
|
||||
{0x32, 0xA4}, //Indoor_aBgTgtOfs_a02
|
||||
{0x33, 0x9C}, //Indoor_aBgTgtOfs_a03 //h84->h8a Hando Extend MaxMax choi 0618
|
||||
{0x34, 0x90}, //Indoor_aBgTgtOfs_a04 //h00->h84 0618 choi
|
||||
{0x35, 0x38}, //bRgDefTgt //indoor
|
||||
{0x36, 0x00}, //bBgDefTgt //indoor
|
||||
|
||||
{0x03, 0xCA},
|
||||
{0x23, 0x00}, //0x92 //bRgDefTgt //Outdoor
|
||||
{0x24, 0x8D}, //0x8D //bBgDefTgt //Outdoor
|
||||
{0x03, 0xC8},
|
||||
{0x11, 0xC1},
|
||||
{0x10, 0xD3},
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable3[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0x70}, // AE Off 50hz 70, 60hz 50
|
||||
|
@ -38186,14 +38046,6 @@ static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable3[]={
|
|||
{0xFF, 0x0D}, // 130ms delay(unit=10ms)
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable3_60Hz[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0x50}, // AE Off 50hz 70, 60hz 50
|
||||
{0x03, 0xC8}, // AWB Off
|
||||
{0x10, 0x52},
|
||||
{0xFF, 0x0D}, // 130ms delay(unit=10ms)
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_EndPreFlash_FlashRegTable4[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0xF0}, // AE ON
|
||||
|
@ -38202,13 +38054,6 @@ static struct msm_camera_i2c_reg_conf sr352_EndPreFlash_FlashRegTable4[]={
|
|||
{0xFF, 0x0D}, // 130ms delay(unit=10ms)
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_EndPreFlash_FlashRegTable4_60Hz[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0xD0}, // AE ON
|
||||
{0x03, 0xC8}, // AWB ON
|
||||
{0x10, 0xD2},
|
||||
{0xFF, 0x0D}, // 130ms delay(unit=10ms)
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable4_1[]={
|
||||
{0x03, 0xC7},
|
||||
|
@ -38220,16 +38065,6 @@ static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable4_1[]={
|
|||
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_AfterPreFlash_FlashRegTable4_1_60Hz[]={
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0x50}, // AE Off 50hz 70, 60hz 50
|
||||
{0x03, 0xC8}, // AWB Off
|
||||
{0x10, 0x52},
|
||||
|
||||
{0xFF, 0x0D}, // 130ms delay(unit=10ms)
|
||||
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_StartMainFlash_FlashRegTable5[]={
|
||||
{0xFF, 0x01}, // Array end flag
|
||||
|
||||
|
@ -38372,143 +38207,6 @@ static struct msm_camera_i2c_reg_conf sr352_AfterMainFlash_FlashRegTable6[]={
|
|||
{0x24, 0x8D}, // bBgDefTgt //Outdoor
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_AfterMainFlash_FlashRegTable6_60Hz[]={
|
||||
|
||||
{0x03, 0xC1},
|
||||
{0x10, 0x06}, // ssd tranfer disable
|
||||
|
||||
{0x03, 0xc7},
|
||||
{0xb3, 0x40},
|
||||
{0xb4, 0x12},
|
||||
{0xb5, 0x00},
|
||||
{0xb6, 0x00},
|
||||
|
||||
{0xb7, 0x40},
|
||||
{0xb8, 0x26},
|
||||
{0xb9, 0x00},
|
||||
{0xba, 0x00},
|
||||
|
||||
{0xbb, 0x40},
|
||||
{0xbc, 0x70},
|
||||
{0xbd, 0x00},
|
||||
{0xbe, 0x00},
|
||||
|
||||
{0x03, 0xc7}, // SW ExpMax 8fps
|
||||
{0x32, 0x00},
|
||||
{0x33, 0x66},
|
||||
{0x34, 0xB8},
|
||||
{0x35, 0xE0},
|
||||
{0x6F, 0x0F}, //SW ExpMaxStep 8fps
|
||||
|
||||
{0x03, 0x20}, //HW ExpMax 8fps
|
||||
{0x24, 0x00},
|
||||
{0x25, 0x66},
|
||||
{0x26, 0xB8},
|
||||
{0x27, 0xE0},
|
||||
|
||||
{0x03, 0xCA},
|
||||
{0xA1, 0x00},
|
||||
{0xA3, 0x00},
|
||||
{0x03, 0x26},
|
||||
{0x30, 0x28}, // Preview // sleep off
|
||||
{0x03, 0xC7},
|
||||
{0x10, 0x50},
|
||||
{0x03, 0xC8},
|
||||
{0x10, 0x00},
|
||||
{0x03, 0xD3}, // Adaptive
|
||||
{0x83, 0x98}, // Cb_Outdoor
|
||||
{0x84, 0x95}, // Cb _Sat_Indoor
|
||||
{0x85, 0xA0}, // Cb _Sat_Dark1
|
||||
{0x86, 0x8A}, // Cb _Sat_Dark2
|
||||
{0x87, 0x88}, // Cb _Sat_LowTemp
|
||||
{0x88, 0x96}, // Cb _Sat_HighTemp
|
||||
{0x89, 0x88}, // Cr _Sat_Outdoor
|
||||
{0x8A, 0x90}, // Cr _Sat_Indoor
|
||||
{0x8B, 0xA0}, // Cr _Sat_Dark1
|
||||
{0x8C, 0x84}, // Cr _Sat_Dark2
|
||||
{0x8D, 0x75}, // Cr _Sat_LowTemp
|
||||
{0x8E, 0x96}, // Cr _Sat_HighTemp
|
||||
{0xB4, 0x80}, // LSC3_Ind_LowTmp gain g
|
||||
{0xB5, 0x80}, // LSC4_Ind_LowTmp gain b
|
||||
{0xB6, 0x82}, // LSC5_Ind_LowTmp gain r
|
||||
{0xBA, 0x80}, // LSC3_Ind_MiddleTmp gain g
|
||||
{0xBB, 0x80}, // LSC4_Ind_MiddleTmp gain b
|
||||
{0xBC, 0x74}, // LSC5_Ind_MiddleTmp gain r
|
||||
{0xC0, 0x80}, // LSC3_Ind_HighTmp gain g
|
||||
{0xC1, 0x80}, // LSC4_Ind_HighTmp gain b
|
||||
{0xC2, 0x74}, // LSC5_Ind_HighTmp gain r
|
||||
{0xC6, 0x68}, // LSC3_Dark1_LowTmp gain g
|
||||
{0xC7, 0x65}, // LSC4_Dark1_LowTmp gain b
|
||||
{0xC8, 0x62}, // LSC5_Dark1_LowTmp gain r
|
||||
{0xCC, 0x68}, // LSC3_Dark1_MiddleTmp gain g
|
||||
{0xCD, 0x65}, // LSC4_Dark1_MiddleTmp gain b
|
||||
{0xCE, 0x62}, // LSC5_Dark1_MiddleTmp gain r
|
||||
{0xD2, 0x68}, // LSC3_Dark1_HighTmp gain g
|
||||
{0xD3, 0x65}, // LSC4_Dark1_HighTmp gain b
|
||||
{0xD4, 0x62}, // LSC5_Dark1_HighTmp gain r
|
||||
{0xD8, 0x68}, // LSC3_Dark2 gain g
|
||||
{0xD9, 0x65}, // LSC4_Dark2 gain b
|
||||
{0xDA, 0x62}, // LSC5_Dark2 gain r
|
||||
|
||||
{0x03, 0xC8}, // AWB Speed option recovery form Flash AWB
|
||||
{0x14, 0x9F},
|
||||
{0x17, 0x34}, // AWB speed1
|
||||
{0x18, 0x55}, // AWB speed2
|
||||
{0x22, 0x30}, // AWB MaxStep
|
||||
{0x03, 0xC8},
|
||||
|
||||
{0xEB, 0x11}, // Indoor_aCtmpWgt
|
||||
{0xEC, 0x11}, // Indoor_aCtmpWgt_a01
|
||||
{0xED, 0x12}, // Indoor_aCtmpWgt_a02
|
||||
{0xEE, 0x11}, // Indoor_aCtmpWgt_a03
|
||||
{0xEF, 0x11}, // Indoor_aCtmpWgt_a04
|
||||
{0xF0, 0x33}, // Indoor_aCtmpWgt_a05
|
||||
{0xF1, 0x11}, // Indoor_aCtmpWgt_a06
|
||||
{0xF2, 0x14}, // Indoor_aCtmpWgt_a07
|
||||
{0xF3, 0x43}, // Indoor_aCtmpWgt_a08
|
||||
{0xF4, 0x11}, // Indoor_aCtmpWgt_a09
|
||||
{0xF5, 0x55}, // Indoor_aCtmpWgt_a10
|
||||
{0xF6, 0x41}, // Indoor_aCtmpWgt_a11
|
||||
{0xF7, 0x16}, // Indoor_aCtmpWgt_a12
|
||||
{0xF8, 0x65}, // Indoor_aCtmpWgt_a13
|
||||
{0xF9, 0x11}, // Indoor_aCtmpWgt_a14
|
||||
{0xFA, 0x48}, // Indoor_aCtmpWgt_a15
|
||||
{0xFB, 0x61}, // Indoor_aCtmpWgt_a16
|
||||
{0xFC, 0x11}, // Indoor_aCtmpWgt_a17
|
||||
{0xFD, 0x46}, // Indoor_aCtmpWgt_a18
|
||||
|
||||
{0x03, 0xC9}, // c9 page
|
||||
|
||||
{0x10, 0x11}, // Indoor_aCtmpWgt_a19
|
||||
{0x11, 0x11}, // Indoor_aCtmpWgt_a20
|
||||
{0x12, 0x23}, // Indoor_aCtmpWgt_a21
|
||||
{0x13, 0x11}, // Indoor_aCtmpWgt_a22
|
||||
{0x14, 0x11}, // Indoor_aCtmpWgt_a23
|
||||
{0x15, 0x10}, // Indoor_aCtmpWgt_a24
|
||||
|
||||
{0x26, 0x3E}, // Indoor_aTgtAngle
|
||||
{0x27, 0x42}, // Indoor_aTgtAngle_a01
|
||||
{0x28, 0x4D}, // Indoor_aTgtAngle_a02
|
||||
{0x29, 0x52}, // Indoor_aTgtAngle_a03 //h50->h4e Hando Extend MaxMax choi 0618
|
||||
{0x2A, 0x77}, // Indoor_aTgtAngle_a04
|
||||
{0x2B, 0x12}, // Indoor_aRgTgtOfs
|
||||
{0x2C, 0x90}, // Indoor_aRgTgtOfs_a01
|
||||
{0x2D, 0x90}, // Indoor_aRgTgtOfs_a02
|
||||
{0x2E, 0x05}, // Indoor_aRgTgtOfs_a03 //h80->h84 Hando Extend MaxMax choi 0618
|
||||
{0x2F, 0x0E}, // Indoor_aRgTgtOfs_a04 //h04->h00 choi 0618
|
||||
{0x30, 0xCC}, // Indoor_aBgTgtOfs
|
||||
{0x31, 0xA7}, // Indoor_aBgTgtOfs_a01
|
||||
{0x32, 0xA7}, // Indoor_aBgTgtOfs_a02
|
||||
{0x33, 0x82}, // Indoor_aBgTgtOfs_a03 //h84->h8a Hando Extend MaxMax choi 0618
|
||||
{0x34, 0x83}, // Indoor_aBgTgtOfs_a04 //h00->h84 0618 choi
|
||||
{0x35, 0x24}, // 24 bRgDefTgt //indoor
|
||||
{0x36, 0x00}, // 00bBgDefTgt //indoor
|
||||
|
||||
{0x03, 0xCA},
|
||||
{0x23, 0x92}, // bRgDefTgt //Outdoor
|
||||
{0x24, 0x8D}, // bBgDefTgt //Outdoor
|
||||
};
|
||||
|
||||
static struct msm_camera_i2c_reg_conf sr352_EndMainFlash_FlashRegTable7[]={
|
||||
{0x03, 0xC0}, // AE, AWB frame skip
|
||||
{0x55, 0x04},
|
||||
|
|
Loading…
Reference in a new issue