static int fimc_is_hw_mcsc_open(struct fimc_is_hw_ip *hw_ip, u32 instance,
struct fimc_is_group *group)
{
- int ret = 0, i;
+ int ret = 0, i, j;
struct fimc_is_hw_mcsc *hw_mcsc;
struct fimc_is_hw_mcsc_cap *cap;
u32 output_id;
msdbg_hw(2, "open: [G:0x%x], framemgr[%s]", instance, hw_ip,
GROUP_ID(group->id), hw_ip->framemgr->name);
- for (i = 0; i < SENSOR_POSITION_MAX; i++)
- hw_mcsc->cur_setfile[i] = NULL;
-
+ for (i = 0; i < SENSOR_POSITION_MAX; i++) {
+ for (j = 0; j < FIMC_IS_STREAM_COUNT; j++)
+ hw_mcsc->cur_setfile[i][j] = NULL;
+ }
if (check_sc_core_running(hw_ip, cap))
return 0;
hw_mcsc = (struct fimc_is_hw_mcsc *)hw_ip->priv_info;
- hw_mcsc->cur_setfile[sensor_position] =
+ hw_mcsc->cur_setfile[sensor_position][instance] =
&hw_mcsc->setfile[sensor_position][setfile_index];
msinfo_hw("setfile (%d) scenario (%d)\n", instance, hw_ip,
vratio = (u32)((temp_height << MCSC_PRECISION) / poly_dst_height);
sensor_position = hw_ip->hardware->sensor_position[instance];
- setfile = hw_mcsc->cur_setfile[sensor_position];
+ setfile = hw_mcsc->cur_setfile[sensor_position][instance];
#if defined(USE_UVSP_CAC)
sc_coef = &setfile->sc_coef;
#else
vratio = (u32)((temp_height << MCSC_PRECISION) / dst_height);
sensor_position = hw_ip->hardware->sensor_position[instance];
- setfile = hw_mcsc->cur_setfile[sensor_position];
+ setfile = hw_mcsc->cur_setfile[sensor_position][instance];
#if defined(USE_UVSP_CAC)
sc_coef = &setfile->sc_coef;
#else
hw_mcsc->yuv_range = yuv; /* save for ISP */
sensor_position = hw_ip->hardware->sensor_position[instance];
- setfile = hw_mcsc->cur_setfile[sensor_position];
+ setfile = hw_mcsc->cur_setfile[sensor_position][instance];
#if defined(USE_UVSP_CAC)
sc_bchs = &setfile->sc_bchs[yuv];
#else
*/
#ifdef MCSC_DNR_USE_TUNING
sensor_position = hw_ip->hardware->sensor_position[atomic_read(&hw_ip->instance)];
- tdnr_tuneset = &hw_mcsc->cur_setfile[sensor_position]->tdnr_contents;
+ tdnr_tuneset = &hw_mcsc->cur_setfile[sensor_position][frame->instance]->tdnr_contents;
setfile_tdnr_enable = tdnr_tuneset->tdnr_enable;
#endif
#ifdef MCSC_DNR_USE_TUNING
instance = atomic_read(&hw_ip->instance);
sensor_position = hw_ip->hardware->sensor_position[instance];
- tdnr_tuneset = &hw_mcsc->cur_setfile[sensor_position]->tdnr_contents;
+ tdnr_tuneset = &hw_mcsc->cur_setfile[sensor_position][frame->instance]->tdnr_contents;
use_tdnr_tuning = true;
#endif
}
sensor_position = hw_ip->hardware->sensor_position[instance];
- setfile = hw_mcsc->cur_setfile[sensor_position];
+ setfile = hw_mcsc->cur_setfile[sensor_position][instance];
/* calculate cac parameters */
#ifdef FIXED_TDNR_NOISE_INDEX
return ret;
sensor_position = hw_ip->hardware->sensor_position[instance];
- setfile = hw_mcsc->cur_setfile[sensor_position];
+ setfile = hw_mcsc->cur_setfile[sensor_position][instance];
cal_info = &hw_ip->hardware->cal_info[sensor_position];
sdbg_hw(10, "TEST: get_lnr_intprl(11, 20, 1, 1, 3) = %d\n",