}
#ifdef ENABLE_FAULT_HANDLER
-static void fimc_is_print_target_dva(struct camera2_shot *shot)
+static void fimc_is_print_target_dva(struct fimc_is_frame *leader_frame)
{
u32 plane_index;
for (plane_index = 0; plane_index < FIMC_IS_MAX_PLANES; plane_index++) {
- if (shot->uctl.scalerUd.sourceAddress[plane_index])
+ if (leader_frame->sourceAddress[plane_index])
pr_err("sourceAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sourceAddress[plane_index]);
- if (shot->uctl.scalerUd.txcTargetAddress[plane_index])
+ plane_index, leader_frame->sourceAddress[plane_index]);
+ if (leader_frame->txcTargetAddress[plane_index])
pr_err("txcTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.txcTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.txpTargetAddress[plane_index])
+ plane_index, leader_frame->txcTargetAddress[plane_index]);
+ if (leader_frame->txpTargetAddress[plane_index])
pr_err("txpTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.txpTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.ixcTargetAddress[plane_index])
+ plane_index, leader_frame->txpTargetAddress[plane_index]);
+ if (leader_frame->ixcTargetAddress[plane_index])
pr_err("ixcTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.ixcTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.ixpTargetAddress[plane_index])
+ plane_index, leader_frame->ixcTargetAddress[plane_index]);
+ if (leader_frame->ixpTargetAddress[plane_index])
pr_err("ixpTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.ixpTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.mexcTargetAddress[plane_index])
+ plane_index, leader_frame->ixpTargetAddress[plane_index]);
+ if (leader_frame->mexcTargetAddress[plane_index])
pr_err("mexcTargetAddress[%d] = 0x%16LX\n",
- plane_index, shot->uctl.scalerUd.mexcTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sccTargetAddress[plane_index])
+ plane_index, leader_frame->mexcTargetAddress[plane_index]);
+ if (leader_frame->sccTargetAddress[plane_index])
pr_err("sccTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sccTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.scpTargetAddress[plane_index])
+ plane_index, leader_frame->sccTargetAddress[plane_index]);
+ if (leader_frame->scpTargetAddress[plane_index])
pr_err("scpTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.scpTargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc0TargetAddress[plane_index])
+ plane_index, leader_frame->scpTargetAddress[plane_index]);
+ if (leader_frame->sc0TargetAddress[plane_index])
pr_err("sc0TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc0TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc1TargetAddress[plane_index])
+ plane_index, leader_frame->sc0TargetAddress[plane_index]);
+ if (leader_frame->sc1TargetAddress[plane_index])
pr_err("sc1TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc1TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc2TargetAddress[plane_index])
+ plane_index, leader_frame->sc1TargetAddress[plane_index]);
+ if (leader_frame->sc2TargetAddress[plane_index])
pr_err("sc2TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc2TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc3TargetAddress[plane_index])
+ plane_index, leader_frame->sc2TargetAddress[plane_index]);
+ if (leader_frame->sc3TargetAddress[plane_index])
pr_err("sc3TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc3TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc4TargetAddress[plane_index])
+ plane_index, leader_frame->sc3TargetAddress[plane_index]);
+ if (leader_frame->sc4TargetAddress[plane_index])
pr_err("sc4TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc4TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.sc5TargetAddress[plane_index])
+ plane_index, leader_frame->sc4TargetAddress[plane_index]);
+ if (leader_frame->sc5TargetAddress[plane_index])
pr_err("sc5TargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.sc5TargetAddress[plane_index]);
- if (shot->uctl.scalerUd.dxcTargetAddress[plane_index])
+ plane_index, leader_frame->sc5TargetAddress[plane_index]);
+ if (leader_frame->dxcTargetAddress[plane_index])
pr_err("dxcTargetAddress[%d] = 0x%08X\n",
- plane_index, shot->uctl.scalerUd.dxcTargetAddress[plane_index]);
+ plane_index, leader_frame->dxcTargetAddress[plane_index]);
}
}
shot = framemgr->frames[j].shot;
if (shot)
- fimc_is_print_target_dva(shot);
+ fimc_is_print_target_dva(&framemgr->frames[j]);
}
}
}
u32 dvaddr_buffer[FIMC_IS_MAX_PLANES];
ulong kvaddr_buffer[FIMC_IS_MAX_PLANES];
+ /*
+ * target address for capture node
+ * [0] invalid address, stop
+ * [others] valid address
+ */
+ u32 sourceAddress[FIMC_IS_MAX_PLANES]; /* DC1S: DCP slave input DMA */
+ u32 txcTargetAddress[FIMC_IS_MAX_PLANES]; /* 3AA capture DMA */
+ u32 txpTargetAddress[FIMC_IS_MAX_PLANES]; /* 3AA preview DMA */
+ u32 mrgTargetAddress[FIMC_IS_MAX_PLANES];
+ u32 efdTargetAddress[FIMC_IS_MAX_PLANES];
+ u32 ixcTargetAddress[FIMC_IS_MAX_PLANES];
+ u32 ixpTargetAddress[FIMC_IS_MAX_PLANES];
+ u64 mexcTargetAddress[FIMC_IS_MAX_PLANES]; /* ME out DMA */
+ u32 sccTargetAddress[FIMC_IS_MAX_PLANES]; /* DC0S: DCP master capture DMA */
+ u32 scpTargetAddress[FIMC_IS_MAX_PLANES]; /* DC1S: DCP slave capture DMA */
+ u32 sc0TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 sc1TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 sc2TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 sc3TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 sc4TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 sc5TargetAddress[FIMC_IS_MAX_PLANES];
+ u32 dxcTargetAddress[FIMC_IS_MAX_PLANES]; /* DC2S: DCP disparity capture DMA */
+
/* multi-buffer use */
u32 num_buffers; /* total number of buffers per frame */
u32 cur_buf_index; /* current processed buffer index */
}
}
- /* orientation is set by user */
- orientation = frame->shot->uctl.scalerUd.orientation;
- for (i = 0; i < INTERFACE_TYPE_MAX; i++)
- backup_mcsc_blk_port[i] = frame->shot->uctl.scalerUd.mcsc_sub_blk_port[i];
- memset(&frame->shot->uctl.scalerUd, 0, sizeof(struct camera2_scaler_uctl));
- frame->shot->uctl.scalerUd.orientation = orientation;
- for (i = 0; i < INTERFACE_TYPE_MAX; i++)
- frame->shot->uctl.scalerUd.mcsc_sub_blk_port[i] = backup_mcsc_blk_port[i];
-
frame->lindex = 0;
frame->hindex = 0;
frame->result = 0;
FIMC_BUG(1);
}
- param_set->output_kva_me[i] = frame->shot->uctl.scalerUd.mexcTargetAddress[i];
- if (frame->shot->uctl.scalerUd.mexcTargetAddress[i] == 0) {
+ param_set->output_kva_me[i] = frame->mexcTargetAddress[i];
+ if (frame->mexcTargetAddress[i] == 0) {
msdbg_hw(2, "[F:%d]mexcTargetAddress[%d] is zero",
frame->instance, hw_ip, frame->fcount, i);
}
if (param_set->dma_output_before_bds.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->planes; i++) {
- param_set->output_dva_before_bds[i] = frame->shot->uctl.scalerUd.txcTargetAddress[i];
- if (frame->shot->uctl.scalerUd.txcTargetAddress[i] == 0) {
+ param_set->output_dva_before_bds[i] = frame->txcTargetAddress[i];
+ if (frame->txcTargetAddress[i] == 0) {
msinfo_hw("[F:%d]txcTargetAddress[%d] is zero\n",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_before_bds.cmd = DMA_OUTPUT_COMMAND_DISABLE;
if (param_set->dma_output_after_bds.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->planes; i++) {
#if defined(SOC_3AAISP)
- param_set->output_dva_after_bds[i] = frame->shot->uctl.scalerUd.txcTargetAddress[i];
- if (frame->shot->uctl.scalerUd.txcTargetAddress[i] == 0) {
+ param_set->output_dva_after_bds[i] = frame->txcTargetAddress[i];
+ if (frame->txcTargetAddress[i] == 0) {
msinfo_hw("[F:%d]txcTargetAddress[%d] is zero\n",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_after_bds.cmd = DMA_OUTPUT_COMMAND_DISABLE;
}
#else
- param_set->output_dva_after_bds[i] = frame->shot->uctl.scalerUd.txpTargetAddress[i];
- if (frame->shot->uctl.scalerUd.txpTargetAddress[i] == 0) {
+ param_set->output_dva_after_bds[i] = frame->txpTargetAddress[i];
+ if (frame->txpTargetAddress[i] == 0) {
msinfo_hw("[F:%d]txpTargetAddress[%d] is zero\n",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_after_bds.cmd = DMA_OUTPUT_COMMAND_DISABLE;
if (param_set->dma_output_efd.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < param->efd_output.plane; i++) {
- param_set->output_dva_efd[i] = frame->shot->uctl.scalerUd.efdTargetAddress[i];
- if (frame->shot->uctl.scalerUd.efdTargetAddress[i] == 0) {
+ param_set->output_dva_efd[i] = frame->efdTargetAddress[i];
+ if (frame->efdTargetAddress[i] == 0) {
msinfo_hw("[F:%d]efdTargetAddress[%d] is zero\n",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_efd.cmd = DMA_OUTPUT_COMMAND_DISABLE;
if (param_set->dma_output_mrg.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->planes; i++) {
- param_set->output_dva_mrg[i] = frame->shot->uctl.scalerUd.mrgTargetAddress[i];
- if (frame->shot->uctl.scalerUd.mrgTargetAddress[i] == 0) {
+ param_set->output_dva_mrg[i] = frame->mrgTargetAddress[i];
+ if (frame->mrgTargetAddress[i] == 0) {
msinfo_hw("[F:%d]mrgTargetAddress[%d] is zero\n",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_mrg.cmd = DMA_OUTPUT_COMMAND_DISABLE;
hw_frame->out_flag = GET_OUT_FLAG_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, frame->out_flag);
hw_frame->core_flag = 0;
atomic_set(&hw_frame->shot_done_flag, 1);
- for (i = 0; i < FIMC_IS_MAX_PLANES; i++) {
- hw_frame->dvaddr_buffer[i] = frame->dvaddr_buffer[i];
- hw_frame->kvaddr_buffer[i] = frame->kvaddr_buffer[i];
- }
+
+ memcpy(hw_frame->dvaddr_buffer, frame->dvaddr_buffer, sizeof(frame->dvaddr_buffer));
+ memcpy(hw_frame->kvaddr_buffer, frame->kvaddr_buffer, sizeof(frame->kvaddr_buffer));
+ memcpy(hw_frame->txcTargetAddress, frame->txcTargetAddress, sizeof(frame->txcTargetAddress));
+ memcpy(hw_frame->txpTargetAddress, frame->txpTargetAddress, sizeof(frame->txpTargetAddress));
+ memcpy(hw_frame->mrgTargetAddress, frame->mrgTargetAddress, sizeof(frame->mrgTargetAddress));
+ memcpy(hw_frame->efdTargetAddress, frame->efdTargetAddress, sizeof(frame->efdTargetAddress));
+ memcpy(hw_frame->ixcTargetAddress, frame->ixcTargetAddress, sizeof(frame->ixcTargetAddress));
+ memcpy(hw_frame->ixpTargetAddress, frame->ixpTargetAddress, sizeof(frame->ixpTargetAddress));
+ memcpy(hw_frame->mexcTargetAddress, frame->mexcTargetAddress, sizeof(frame->mexcTargetAddress));
+ memcpy(hw_frame->sccTargetAddress, frame->sccTargetAddress, sizeof(frame->sccTargetAddress));
+ memcpy(hw_frame->scpTargetAddress, frame->scpTargetAddress, sizeof(frame->scpTargetAddress));
+ memcpy(hw_frame->sc0TargetAddress, frame->sc0TargetAddress, sizeof(frame->sc0TargetAddress));
+ memcpy(hw_frame->sc1TargetAddress, frame->sc1TargetAddress, sizeof(frame->sc1TargetAddress));
+ memcpy(hw_frame->sc2TargetAddress, frame->sc2TargetAddress, sizeof(frame->sc2TargetAddress));
+ memcpy(hw_frame->sc3TargetAddress, frame->sc3TargetAddress, sizeof(frame->sc3TargetAddress));
+ memcpy(hw_frame->sc4TargetAddress, frame->sc4TargetAddress, sizeof(frame->sc4TargetAddress));
+ memcpy(hw_frame->sc5TargetAddress, frame->sc5TargetAddress, sizeof(frame->sc5TargetAddress));
+ memcpy(hw_frame->dxcTargetAddress, frame->dxcTargetAddress, sizeof(frame->dxcTargetAddress));
+
hw_frame->instance = instance;
}
if (param_set->dma_input_s.cmd == DMA_INPUT_COMMAND_ENABLE) {
for (i = 0; i < plane; i++) {
param_set->input_dva[DCP_DMA_IN_GDC_SLAVE][i] =
- frame->shot->uctl.scalerUd.sourceAddress[i];
+ frame->sourceAddress[i];
if (param_set->input_dva[DCP_DMA_IN_GDC_SLAVE][i] == 0) {
mserr_hw("[F:%d]DCP_DMA_IN_GDC_SLAVE plane[%d]dva is zero",
frame->instance, hw_ip, frame->fcount, i);
if (param_set->dma_output_m.cmd == DMA_INPUT_COMMAND_ENABLE) {
for (i = 0; i < plane; i++) {
param_set->output_dva[DCP_DMA_OUT_MASTER][i] =
- frame->shot->uctl.scalerUd.sccTargetAddress[i];
+ frame->sccTargetAddress[i];
if (param_set->output_dva[DCP_DMA_OUT_MASTER][i] == 0) {
mserr_hw("[F:%d]DCP_DMA_OUT_MASTER plane[%d] dva is zero",
frame->instance, hw_ip, frame->fcount, i);
if (param_set->dma_output_s.cmd == DMA_INPUT_COMMAND_ENABLE) {
for (i = 0; i < plane; i++) {
param_set->output_dva[DCP_DMA_OUT_SLAVE][i] =
- frame->shot->uctl.scalerUd.scpTargetAddress[i];
+ frame->scpTargetAddress[i];
if (param_set->output_dva[DCP_DMA_OUT_SLAVE][i] == 0) {
mserr_hw("[F:%d]DCP_DMA_OUT_SLAVE plane[%d] dva is zero",
frame->instance, hw_ip, frame->fcount, i);
/* disparity output: currnet data */
param_set->output_dva[DCP_DMA_OUT_DISPARITY][0] =
- frame->shot->uctl.scalerUd.dxcTargetAddress[0];
+ frame->dxcTargetAddress[0];
if (param_set->output_dva[DCP_DMA_OUT_DISPARITY][0] == 0) {
mserr_hw("[F:%d]DCP_DMA_OUT_DISPARITY plane[%d] dva is zero",
frame->instance, hw_ip, frame->fcount, 0);
if (param_set->dma_output_m_ds.cmd == DMA_INPUT_COMMAND_ENABLE) {
for (i = 0; i < plane; i++) {
param_set->output_dva[DCP_DMA_OUT_MASTER_DS][i] =
- frame->shot->uctl.scalerUd.sccTargetAddress[8 + i];
+ frame->sccTargetAddress[8 + i];
if (param_set->output_dva[DCP_DMA_OUT_MASTER_DS][i] == 0) {
mserr_hw("[F:%d]DCP_DMA_OUT_MASTER_DS plane[%d] dva is zero",
if (param_set->dma_output_s_ds.cmd == DMA_INPUT_COMMAND_ENABLE) {
for (i = 0; i < plane; i++) {
param_set->output_dva[DCP_DMA_OUT_SLAVE_DS][i] =
- frame->shot->uctl.scalerUd.scpTargetAddress[8 + i];
+ frame->scpTargetAddress[8 + i];
if (param_set->output_dva[DCP_DMA_OUT_SLAVE_DS][i] == 0) {
mserr_hw("[F:%d]DCP_DMA_OUT_SLAVE_DS plane[%d] dva is zero",
frame->instance, hw_ip, frame->fcount, i);
FIMC_BUG(1);
}
- param_set->output_kva_me[i] = frame->shot->uctl.scalerUd.mexcTargetAddress[frame->cur_buf_index + i];
- if (frame->shot->uctl.scalerUd.mexcTargetAddress[i] == 0) {
+ param_set->output_kva_me[i] = frame->mexcTargetAddress[frame->cur_buf_index + i];
+ if (frame->mexcTargetAddress[i] == 0) {
msdbg_hw(2, "[F:%d]mexcTargetAddress[%d] is zero",
frame->instance, hw_ip, frame->fcount, i);
}
if (param_set->dma_output_chunk.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->num_buffers; i++) {
- param_set->output_dva_chunk[i] = frame->shot->uctl.scalerUd.ixpTargetAddress[frame->cur_buf_index + i];
- if (frame->shot->uctl.scalerUd.ixpTargetAddress[i] == 0) {
+ param_set->output_dva_chunk[i] = frame->ixpTargetAddress[frame->cur_buf_index + i];
+ if (frame->ixpTargetAddress[i] == 0) {
msinfo_hw("[F:%d]ixpTargetAddress[%d] is zero",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_chunk.cmd = DMA_OUTPUT_COMMAND_DISABLE;
if (param_set->dma_output_yuv.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->num_buffers; i++) {
- param_set->output_dva_yuv[i] = frame->shot->uctl.scalerUd.ixcTargetAddress[frame->cur_buf_index + i];
- if (frame->shot->uctl.scalerUd.ixcTargetAddress[i] == 0) {
+ param_set->output_dva_yuv[i] = frame->ixcTargetAddress[frame->cur_buf_index + i];
+ if (frame->ixcTargetAddress[i] == 0) {
msinfo_hw("[F:%d]ixcTargetAddress[%d] is zero",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output_yuv.cmd = DMA_OUTPUT_COMMAND_DISABLE;
lindex, hindex, frame->instance);
/* set mcsc dma out addr */
- target_addr[0] = frame->shot->uctl.scalerUd.scpTargetAddress[0];
- target_addr[1] = frame->shot->uctl.scalerUd.scpTargetAddress[1];
- target_addr[2] = frame->shot->uctl.scalerUd.scpTargetAddress[2];
+ target_addr[0] = frame->scpTargetAddress[0];
+ target_addr[1] = frame->scpTargetAddress[1];
+ target_addr[2] = frame->scpTargetAddress[2];
msdbg_hw(2, "[F:%d]shot [T:%d] cmd[%d] addr[0x%x]\n",
frame->instance, hw_ip, frame->fcount, frame->type,
switch (out_id) {
case MCSC_OUTPUT0:
- addr = frame->shot->uctl.scalerUd.sc0TargetAddress;
+ addr = frame->sc0TargetAddress;
break;
case MCSC_OUTPUT1:
- addr = frame->shot->uctl.scalerUd.sc1TargetAddress;
+ addr = frame->sc1TargetAddress;
break;
case MCSC_OUTPUT2:
- addr = frame->shot->uctl.scalerUd.sc2TargetAddress;
+ addr = frame->sc2TargetAddress;
break;
case MCSC_OUTPUT3:
- addr = frame->shot->uctl.scalerUd.sc3TargetAddress;
+ addr = frame->sc3TargetAddress;
break;
case MCSC_OUTPUT4:
- addr = frame->shot->uctl.scalerUd.sc4TargetAddress;
+ addr = frame->sc4TargetAddress;
break;
case MCSC_OUTPUT5:
- addr = frame->shot->uctl.scalerUd.sc5TargetAddress;
+ addr = frame->sc5TargetAddress;
break;
default:
err_hw("[F:%d] invalid output id(%d)\n", frame->fcount, out_id);
- addr = frame->shot->uctl.scalerUd.sc0TargetAddress;
+ addr = frame->sc0TargetAddress;
break;
}
fimc_is_hw_scp_update_register(frame->instance, hw_ip, param);
/* set scp dma out addr */
- target_addr[0] = frame->shot->uctl.scalerUd.scpTargetAddress[0];
- target_addr[1] = frame->shot->uctl.scalerUd.scpTargetAddress[1];
- target_addr[2] = frame->shot->uctl.scalerUd.scpTargetAddress[2];
+ target_addr[0] = frame->scpTargetAddress[0];
+ target_addr[1] = frame->scpTargetAddress[1];
+ target_addr[2] = frame->scpTargetAddress[2];
msdbg_hw(2, "[F:%d] target addr [0x%x]\n", frame->instance, hw_ip,
frame->fcount, target_addr[0]);
if (param_set->dma_output.cmd != DMA_OUTPUT_COMMAND_DISABLE) {
for (i = 0; i < frame->num_buffers; i++) {
- param_set->output_dva[i] = frame->shot->uctl.scalerUd.dxcTargetAddress[frame->cur_buf_index + i];
- if (frame->shot->uctl.scalerUd.dxcTargetAddress[i] == 0) {
+ param_set->output_dva[i] = frame->dxcTargetAddress[frame->cur_buf_index + i];
+ if (frame->dxcTargetAddress[i] == 0) {
msinfo_hw("[F:%d]dxcTargetAddress[%d] is zero",
frame->instance, hw_ip, frame->fcount, i);
param_set->dma_output.cmd = DMA_OUTPUT_COMMAND_DISABLE;