}
static int gc0310_write_reg(struct i2c_client *client, u16 data_length,
- u8 reg, u8 val)
+ u8 reg, u8 val)
{
int ret;
unsigned char data[2] = {0};
}
static int __gc0310_write_reg_is_consecutive(struct i2c_client *client,
- struct gc0310_write_ctrl *ctrl,
- const struct gc0310_reg *next)
+ struct gc0310_write_ctrl *ctrl,
+ const struct gc0310_reg *next)
{
if (ctrl->index == 0)
return 1;
* flushed before proceed.
*/
if (!__gc0310_write_reg_is_consecutive(client, &ctrl,
- next)) {
+ next)) {
err = __gc0310_flush_reg_array(client, &ctrl);
if (err)
return err;
err = __gc0310_buf_reg_array(client, &ctrl, next);
if (err) {
dev_err(&client->dev, "%s: write error, aborted\n",
- __func__);
+ __func__);
return err;
}
break;
static int gc0310_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (GC0310_F_NUMBER_DEFAULT_NUM << 24) |
- (GC0310_F_NUMBER_DEM << 16) |
- (GC0310_F_NUMBER_DEFAULT_NUM << 8) | GC0310_F_NUMBER_DEM;
+ (GC0310_F_NUMBER_DEM << 16) |
+ (GC0310_F_NUMBER_DEFAULT_NUM << 8) | GC0310_F_NUMBER_DEM;
return 0;
}
}
static int gc0310_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct gc0310_resolution *res)
+ struct camera_mipi_info *info,
+ const struct gc0310_resolution *res)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc0310_device *dev = to_gc0310_sensor(sd);
/* get integration time */
buf->coarse_integration_time_min = GC0310_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- GC0310_COARSE_INTG_TIME_MAX_MARGIN;
+ GC0310_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = GC0310_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- GC0310_FINE_INTG_TIME_MAX_MARGIN;
+ GC0310_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = GC0310_FINE_INTG_TIME_MIN;
buf->read_mode = res->bin_mode;
/* get the cropping and output resolution to ISP for this mode. */
/* Getting crop_horizontal_start */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_CROP_START_H, ®_val);
+ GC0310_H_CROP_START_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_CROP_START_L, ®_val);
+ GC0310_H_CROP_START_L, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = val | (reg_val & 0xFF);
/* Getting crop_vertical_start */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_CROP_START_H, ®_val);
+ GC0310_V_CROP_START_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_CROP_START_L, ®_val);
+ GC0310_V_CROP_START_L, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = val | (reg_val & 0xFF);
/* Getting output_width */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_OUTSIZE_H, ®_val);
+ GC0310_H_OUTSIZE_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_OUTSIZE_L, ®_val);
+ GC0310_H_OUTSIZE_L, ®_val);
if (ret)
return ret;
buf->output_width = val | (reg_val & 0xFF);
/* Getting output_height */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_OUTSIZE_H, ®_val);
+ GC0310_V_OUTSIZE_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_OUTSIZE_L, ®_val);
+ GC0310_V_OUTSIZE_L, ®_val);
if (ret)
return ret;
buf->output_height = val | (reg_val & 0xFF);
/* Getting line_length_pck */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_BLANKING_H, ®_val);
+ GC0310_H_BLANKING_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_H_BLANKING_L, ®_val);
+ GC0310_H_BLANKING_L, ®_val);
if (ret)
return ret;
hori_blanking = val | (reg_val & 0xFF);
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_SH_DELAY, ®_val);
+ GC0310_SH_DELAY, ®_val);
if (ret)
return ret;
sh_delay = reg_val;
buf->line_length_pck = buf->output_width + hori_blanking + sh_delay + 4;
- pr_info("hori_blanking=%d sh_delay=%d line_length_pck=%d\n", hori_blanking, sh_delay, buf->line_length_pck);
+ pr_info("hori_blanking=%d sh_delay=%d line_length_pck=%d\n", hori_blanking,
+ sh_delay, buf->line_length_pck);
/* Getting frame_length_lines */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_BLANKING_H, ®_val);
+ GC0310_V_BLANKING_H, ®_val);
if (ret)
return ret;
val = (reg_val & 0xFF) << 8;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_V_BLANKING_L, ®_val);
+ GC0310_V_BLANKING_L, ®_val);
if (ret)
return ret;
vert_blanking = val | (reg_val & 0xFF);
buf->frame_length_lines = buf->output_height + vert_blanking;
- pr_info("vert_blanking=%d frame_length_lines=%d\n", vert_blanking, buf->frame_length_lines);
+ pr_info("vert_blanking=%d frame_length_lines=%d\n", vert_blanking,
+ buf->frame_length_lines);
buf->binning_factor_x = res->bin_factor_x ?
- res->bin_factor_x : 1;
+ res->bin_factor_x : 1;
buf->binning_factor_y = res->bin_factor_y ?
- res->bin_factor_y : 1;
+ res->bin_factor_y : 1;
return 0;
}
/* set analog gain */
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_AGC_ADJ, again);
+ GC0310_AGC_ADJ, again);
if (ret)
return ret;
/* set digital gain */
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_DGC_ADJ, dgain);
+ GC0310_DGC_ADJ, dgain);
if (ret)
return ret;
/* set exposure */
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_AEC_PK_EXPO_L,
- coarse_itg & 0xff);
+ GC0310_AEC_PK_EXPO_L,
+ coarse_itg & 0xff);
if (ret)
return ret;
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_AEC_PK_EXPO_H,
- (coarse_itg >> 8) & 0x0f);
+ GC0310_AEC_PK_EXPO_H,
+ (coarse_itg >> 8) & 0x0f);
if (ret)
return ret;
}
static int gc0310_set_exposure(struct v4l2_subdev *sd, int exposure,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct gc0310_device *dev = to_gc0310_sensor(sd);
int ret;
}
static long gc0310_s_exposure(struct v4l2_subdev *sd,
- struct atomisp_exposure *exposure)
+ struct atomisp_exposure *exposure)
{
int exp = exposure->integration_time[0];
int gain = exposure->gain[0];
/* get exposure */
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_AEC_PK_EXPO_L,
- ®_v);
+ GC0310_AEC_PK_EXPO_L,
+ ®_v);
if (ret)
goto err;
*value = reg_v;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_AEC_PK_EXPO_H,
- ®_v);
+ GC0310_AEC_PK_EXPO_H,
+ ®_v);
if (ret)
goto err;
static const struct v4l2_ctrl_config gc0310_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "exposure",
- .min = 0x0,
- .max = 0xffff,
- .step = 0x01,
- .def = 0x00,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .min = 0x0,
+ .max = 0xffff,
+ .step = 0x01,
+ .def = 0x00,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_VFLIP,
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .name = "Flip",
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_VFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "Flip",
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_HFLIP,
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .name = "Mirror",
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_HFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "Mirror",
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focal length",
- .min = GC0310_FOCAL_LENGTH_DEFAULT,
- .max = GC0310_FOCAL_LENGTH_DEFAULT,
- .step = 0x01,
- .def = GC0310_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focal length",
+ .min = GC0310_FOCAL_LENGTH_DEFAULT,
+ .max = GC0310_FOCAL_LENGTH_DEFAULT,
+ .step = 0x01,
+ .def = GC0310_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number",
- .min = GC0310_F_NUMBER_DEFAULT,
- .max = GC0310_F_NUMBER_DEFAULT,
- .step = 0x01,
- .def = GC0310_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number",
+ .min = GC0310_F_NUMBER_DEFAULT,
+ .max = GC0310_F_NUMBER_DEFAULT,
+ .step = 0x01,
+ .def = GC0310_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number range",
- .min = GC0310_F_NUMBER_RANGE,
- .max = GC0310_F_NUMBER_RANGE,
- .step = 0x01,
- .def = GC0310_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number range",
+ .min = GC0310_F_NUMBER_RANGE,
+ .max = GC0310_F_NUMBER_RANGE,
+ .step = 0x01,
+ .def = GC0310_F_NUMBER_RANGE,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_HORZ,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "horizontal binning factor",
- .min = 0,
- .max = GC0310_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_HORZ,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "horizontal binning factor",
+ .min = 0,
+ .max = GC0310_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_VERT,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "vertical binning factor",
- .min = 0,
- .max = GC0310_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_VERT,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "vertical binning factor",
+ .min = 0,
+ .max = GC0310_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
};
static int gc0310_init(struct v4l2_subdev *sd)
match = abs(((w_ratio << 13) / h_ratio) - 8192);
if ((w_ratio < 8192) || (h_ratio < 8192) ||
- (match > LARGEST_ALLOWED_RATIO_MISMATCH))
+ (match > LARGEST_ALLOWED_RATIO_MISMATCH))
return -1;
return w_ratio + h_ratio;
return -ENODEV;
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_SC_CMMN_CHIP_ID_H, &high);
+ GC0310_SC_CMMN_CHIP_ID_H, &high);
if (ret) {
dev_err(&client->dev, "read sensor_id_high failed\n");
return -ENODEV;
}
ret = gc0310_read_reg(client, GC0310_8BIT,
- GC0310_SC_CMMN_CHIP_ID_L, &low);
+ GC0310_SC_CMMN_CHIP_ID_L, &low);
if (ret) {
dev_err(&client->dev, "read sensor_id_low failed\n");
return -ENODEV;
pr_info("sensor ID = 0x%x\n", id);
if (id != GC0310_ID) {
- dev_err(&client->dev, "sensor ID error, read id = 0x%x, target id = 0x%x\n", id, GC0310_ID);
+ dev_err(&client->dev, "sensor ID error, read id = 0x%x, target id = 0x%x\n", id,
+ GC0310_ID);
return -ENODEV;
}
if (enable) {
/* enable per frame MIPI and sensor ctrl reset */
ret = gc0310_write_reg(client, GC0310_8BIT,
- 0xFE, 0x30);
+ 0xFE, 0x30);
if (ret) {
mutex_unlock(&dev->input_lock);
return ret;
}
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_3);
+ GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_3);
if (ret) {
mutex_unlock(&dev->input_lock);
return ret;
}
ret = gc0310_write_reg(client, GC0310_8BIT, GC0310_SW_STREAM,
- enable ? GC0310_START_STREAMING :
- GC0310_STOP_STREAMING);
+ enable ? GC0310_START_STREAMING :
+ GC0310_STOP_STREAMING);
if (ret) {
mutex_unlock(&dev->input_lock);
return ret;
}
ret = gc0310_write_reg(client, GC0310_8BIT,
- GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_0);
+ GC0310_RESET_RELATED, GC0310_REGISTER_PAGE_0);
if (ret) {
mutex_unlock(&dev->input_lock);
return ret;
return -ENODEV;
dev->platform_data =
- (struct camera_sensor_platform_data *)platform_data;
+ (struct camera_sensor_platform_data *)platform_data;
mutex_lock(&dev->input_lock);
/* power off the module, then power on it in future
}
static int gc2235_write_reg(struct i2c_client *client, u16 data_length,
- u8 reg, u8 val)
+ u8 reg, u8 val)
{
int ret;
unsigned char data[4] = {0};
}
static int __gc2235_write_reg_is_consecutive(struct i2c_client *client,
- struct gc2235_write_ctrl *ctrl,
- const struct gc2235_reg *next)
+ struct gc2235_write_ctrl *ctrl,
+ const struct gc2235_reg *next)
{
if (ctrl->index == 0)
return 1;
* flushed before proceed.
*/
if (!__gc2235_write_reg_is_consecutive(client, &ctrl,
- next)) {
+ next)) {
err = __gc2235_flush_reg_array(client, &ctrl);
if (err)
return err;
err = __gc2235_buf_reg_array(client, &ctrl, next);
if (err) {
dev_err(&client->dev, "%s: write error, aborted\n",
- __func__);
+ __func__);
return err;
}
break;
static int gc2235_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (GC2235_F_NUMBER_DEFAULT_NUM << 24) |
- (GC2235_F_NUMBER_DEM << 16) |
- (GC2235_F_NUMBER_DEFAULT_NUM << 8) | GC2235_F_NUMBER_DEM;
+ (GC2235_F_NUMBER_DEM << 16) |
+ (GC2235_F_NUMBER_DEFAULT_NUM << 8) | GC2235_F_NUMBER_DEM;
return 0;
}
static int gc2235_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct gc2235_resolution *res)
+ struct camera_mipi_info *info,
+ const struct gc2235_resolution *res)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct gc2235_device *dev = to_gc2235_sensor(sd);
/* get integration time */
buf->coarse_integration_time_min = GC2235_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- GC2235_COARSE_INTG_TIME_MAX_MARGIN;
+ GC2235_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = GC2235_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- GC2235_FINE_INTG_TIME_MAX_MARGIN;
+ GC2235_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = GC2235_FINE_INTG_TIME_MIN;
buf->frame_length_lines = res->lines_per_frame;
/* get the cropping and output resolution to ISP for this mode. */
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_H_CROP_START_H, ®_val_h);
+ GC2235_H_CROP_START_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_H_CROP_START_L, ®_val);
+ GC2235_H_CROP_START_L, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = (reg_val_h << 8) | reg_val;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_V_CROP_START_H, ®_val_h);
+ GC2235_V_CROP_START_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_V_CROP_START_L, ®_val);
+ GC2235_V_CROP_START_L, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = (reg_val_h << 8) | reg_val;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_H_OUTSIZE_H, ®_val_h);
+ GC2235_H_OUTSIZE_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_H_OUTSIZE_L, ®_val);
+ GC2235_H_OUTSIZE_L, ®_val);
if (ret)
return ret;
buf->output_width = (reg_val_h << 8) | reg_val;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_V_OUTSIZE_H, ®_val_h);
+ GC2235_V_OUTSIZE_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_V_OUTSIZE_L, ®_val);
+ GC2235_V_OUTSIZE_L, ®_val);
if (ret)
return ret;
buf->output_height = (reg_val_h << 8) | reg_val;
buf->crop_horizontal_end = buf->crop_horizontal_start +
- buf->output_width - 1;
+ buf->output_width - 1;
buf->crop_vertical_end = buf->crop_vertical_start +
- buf->output_height - 1;
+ buf->output_height - 1;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_HB_H, ®_val_h);
+ GC2235_HB_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_HB_L, ®_val);
+ GC2235_HB_L, ®_val);
if (ret)
return ret;
#endif
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_SH_DELAY_H, ®_val_h);
+ GC2235_SH_DELAY_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_SH_DELAY_L, ®_val);
+ GC2235_SH_DELAY_L, ®_val);
#if 0
buf->line_length_pck = buf->output_width + 16 + dummy +
- (((u16)reg_val_h << 8) | (u16)reg_val) + 4;
+ (((u16)reg_val_h << 8) | (u16)reg_val) + 4;
#endif
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_VB_H, ®_val_h);
+ GC2235_VB_H, ®_val_h);
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_VB_L, ®_val);
+ GC2235_VB_L, ®_val);
if (ret)
return ret;
#if 0
buf->frame_length_lines = buf->output_height + 32 +
- (((u16)reg_val_h << 8) | (u16)reg_val);
+ (((u16)reg_val_h << 8) | (u16)reg_val);
#endif
buf->binning_factor_x = res->bin_factor_x ?
- res->bin_factor_x : 1;
+ res->bin_factor_x : 1;
buf->binning_factor_y = res->bin_factor_y ?
- res->bin_factor_y : 1;
+ res->bin_factor_y : 1;
return 0;
}
static long __gc2235_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
expo_coarse_l = coarse_integration & 0xff;
ret = gc2235_write_reg(client, GC2235_8BIT,
- GC2235_EXPOSURE_H, expo_coarse_h);
+ GC2235_EXPOSURE_H, expo_coarse_h);
ret = gc2235_write_reg(client, GC2235_8BIT,
- GC2235_EXPOSURE_L, expo_coarse_l);
+ GC2235_EXPOSURE_L, expo_coarse_l);
if (gain <= 0x58) {
gain_val = 0x40;
}
ret = gc2235_write_reg(client, GC2235_8BIT,
- GC2235_GLOBAL_GAIN, (u8)gain_val);
+ GC2235_GLOBAL_GAIN, (u8)gain_val);
ret = gc2235_write_reg(client, GC2235_8BIT,
- GC2235_PRE_GAIN, (u8)gain_val2);
+ GC2235_PRE_GAIN, (u8)gain_val2);
return ret;
}
static int gc2235_set_exposure(struct v4l2_subdev *sd, int exposure,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct gc2235_device *dev = to_gc2235_sensor(sd);
int ret;
}
static long gc2235_s_exposure(struct v4l2_subdev *sd,
- struct atomisp_exposure *exposure)
+ struct atomisp_exposure *exposure)
{
int exp = exposure->integration_time[0];
int gain = exposure->gain[0];
/* get exposure */
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_EXPOSURE_L,
- ®_v);
+ GC2235_EXPOSURE_L,
+ ®_v);
if (ret)
goto err;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_EXPOSURE_H,
- ®_v2);
+ GC2235_EXPOSURE_H,
+ ®_v2);
if (ret)
goto err;
static struct v4l2_ctrl_config gc2235_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "exposure",
- .min = 0x0,
- .max = 0xffff,
- .step = 0x01,
- .def = 0x00,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .min = 0x0,
+ .max = 0xffff,
+ .step = 0x01,
+ .def = 0x00,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focal length",
- .min = GC2235_FOCAL_LENGTH_DEFAULT,
- .max = GC2235_FOCAL_LENGTH_DEFAULT,
- .step = 0x01,
- .def = GC2235_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focal length",
+ .min = GC2235_FOCAL_LENGTH_DEFAULT,
+ .max = GC2235_FOCAL_LENGTH_DEFAULT,
+ .step = 0x01,
+ .def = GC2235_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number",
- .min = GC2235_F_NUMBER_DEFAULT,
- .max = GC2235_F_NUMBER_DEFAULT,
- .step = 0x01,
- .def = GC2235_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number",
+ .min = GC2235_F_NUMBER_DEFAULT,
+ .max = GC2235_F_NUMBER_DEFAULT,
+ .step = 0x01,
+ .def = GC2235_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number range",
- .min = GC2235_F_NUMBER_RANGE,
- .max = GC2235_F_NUMBER_RANGE,
- .step = 0x01,
- .def = GC2235_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number range",
+ .min = GC2235_F_NUMBER_RANGE,
+ .max = GC2235_F_NUMBER_RANGE,
+ .step = 0x01,
+ .def = GC2235_F_NUMBER_RANGE,
+ .flags = 0,
+ },
};
static int __gc2235_init(struct v4l2_subdev *sd)
return -ENODEV;
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_SENSOR_ID_H, &high);
+ GC2235_SENSOR_ID_H, &high);
if (ret) {
dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
return -ENODEV;
}
ret = gc2235_read_reg(client, GC2235_8BIT,
- GC2235_SENSOR_ID_L, &low);
+ GC2235_SENSOR_ID_L, &low);
id = ((high << 8) | low);
if (id != GC2235_ID) {
return -ENODEV;
dev->platform_data =
- (struct camera_sensor_platform_data *)platform_data;
+ (struct camera_sensor_platform_data *)platform_data;
mutex_lock(&dev->input_lock);
/* power off the module, then power on it in future
}
static int gc2235_enum_mbus_code(struct v4l2_subdev *sd,
- struct v4l2_subdev_pad_config *cfg,
- struct v4l2_subdev_mbus_code_enum *code)
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_mbus_code_enum *code)
{
if (code->index >= MAX_FMTS)
return -EINVAL;
v4l2_i2c_subdev_init(&dev->sd, client, &gc2235_ops);
gcpdev = gmin_camera_platform_data(&dev->sd,
- ATOMISP_INPUT_FORMAT_RAW_10,
- atomisp_bayer_order_grbg);
+ ATOMISP_INPUT_FORMAT_RAW_10,
+ atomisp_bayer_order_grbg);
ret = gc2235_s_config(&dev->sd, client->irq, gcpdev);
if (ret)
#define TBD_CLASS_DRV_ID 2
static int set_msr_configuration(struct i2c_client *client, uint8_t *bufptr,
- unsigned int size)
+ unsigned int size)
{
/* The configuration data contains any number of sequences where
* the first byte (that is, uint8_t) that marks the number of bytes
}
static int parse_and_apply(struct i2c_client *client, uint8_t *buffer,
- unsigned int size)
+ unsigned int size)
{
u8 *endptr8 = buffer + size;
struct tbd_data_record_header *header =
- (struct tbd_data_record_header *)buffer;
+ (struct tbd_data_record_header *)buffer;
/* There may be any number of datasets present */
unsigned int dataset = 0;
/* All data should be located within given buffer */
if ((uint8_t *)header + header->data_offset +
- header->data_size > endptr8)
+ header->data_size > endptr8)
return -EINVAL;
/* We have a new valid dataset */
int ret;
dev_info(&client->dev,
- "New MSR data for sensor driver (dataset %02d) size:%d\n",
- dataset, header->data_size);
+ "New MSR data for sensor driver (dataset %02d) size:%d\n",
+ dataset, header->data_size);
ret = set_msr_configuration(client,
- buffer + header->data_offset,
- header->data_size);
+ buffer + header->data_offset,
+ header->data_size);
if (ret)
return ret;
}
header = (struct tbd_data_record_header *)(buffer +
- header->next_offset);
+ header->next_offset);
} while (header->next_offset);
return 0;
EXPORT_SYMBOL_GPL(apply_msr_data);
int load_msr_list(struct i2c_client *client, char *name,
- const struct firmware **fw)
+ const struct firmware **fw)
{
int ret = request_firmware(fw, name, &client->dev);
return ret;
}
dev_info(&client->dev, "Received %lu bytes drv data\n",
- (unsigned long)(*fw)->size);
+ (unsigned long)(*fw)->size);
return 0;
}
struct lm3554 *flash = to_lm3554(sd);
*val = LM3554_VALUE_TO_PERCENT((u32)flash->flash_current,
- LM3554_FLASH_STEP);
+ LM3554_FLASH_STEP);
return 0;
}
struct lm3554 *flash = to_lm3554(sd);
*val = LM3554_VALUE_TO_PERCENT((u32)flash->torch_current,
- LM3554_TORCH_STEP);
+ LM3554_TORCH_STEP);
return 0;
}
struct lm3554 *flash = to_lm3554(sd);
*val = LM3554_VALUE_TO_PERCENT((u32)flash->indicator_current,
- LM3554_INDICATOR_STEP);
+ LM3554_INDICATOR_STEP);
return 0;
}
static const struct v4l2_ctrl_config lm3554_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_TIMEOUT,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Flash Timeout",
- .min = 0x0,
- .max = LM3554_MAX_TIMEOUT,
- .step = 0x01,
- .def = LM3554_DEFAULT_TIMEOUT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_TIMEOUT,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Flash Timeout",
+ .min = 0x0,
+ .max = LM3554_MAX_TIMEOUT,
+ .step = 0x01,
+ .def = LM3554_DEFAULT_TIMEOUT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_INTENSITY,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Flash Intensity",
- .min = LM3554_MIN_PERCENT,
- .max = LM3554_MAX_PERCENT,
- .step = 0x01,
- .def = LM3554_FLASH_DEFAULT_BRIGHTNESS,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_INTENSITY,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Flash Intensity",
+ .min = LM3554_MIN_PERCENT,
+ .max = LM3554_MAX_PERCENT,
+ .step = 0x01,
+ .def = LM3554_FLASH_DEFAULT_BRIGHTNESS,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_TORCH_INTENSITY,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Torch Intensity",
- .min = LM3554_MIN_PERCENT,
- .max = LM3554_MAX_PERCENT,
- .step = 0x01,
- .def = LM3554_TORCH_DEFAULT_BRIGHTNESS,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_TORCH_INTENSITY,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Torch Intensity",
+ .min = LM3554_MIN_PERCENT,
+ .max = LM3554_MAX_PERCENT,
+ .step = 0x01,
+ .def = LM3554_TORCH_DEFAULT_BRIGHTNESS,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_INDICATOR_INTENSITY,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Indicator Intensity",
- .min = LM3554_MIN_PERCENT,
- .max = LM3554_MAX_PERCENT,
- .step = 0x01,
- .def = LM3554_INDICATOR_DEFAULT_BRIGHTNESS,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_INDICATOR_INTENSITY,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Indicator Intensity",
+ .min = LM3554_MIN_PERCENT,
+ .max = LM3554_MAX_PERCENT,
+ .step = 0x01,
+ .def = LM3554_INDICATOR_DEFAULT_BRIGHTNESS,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_STROBE,
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .name = "Flash Strobe",
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_STROBE,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "Flash Strobe",
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_MODE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Flash Mode",
- .min = 0,
- .max = 100,
- .step = 1,
- .def = ATOMISP_FLASH_MODE_OFF,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_MODE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Flash Mode",
+ .min = 0,
+ .max = 100,
+ .step = 1,
+ .def = ATOMISP_FLASH_MODE_OFF,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_STATUS,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Flash Status",
- .min = ATOMISP_FLASH_STATUS_OK,
- .max = ATOMISP_FLASH_STATUS_TIMEOUT,
- .step = 1,
- .def = ATOMISP_FLASH_STATUS_OK,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_STATUS,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Flash Status",
+ .min = ATOMISP_FLASH_STATUS_OK,
+ .max = ATOMISP_FLASH_STATUS_TIMEOUT,
+ .step = 1,
+ .def = ATOMISP_FLASH_STATUS_OK,
+ .flags = 0,
+ },
#ifndef CSS15
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FLASH_STATUS_REGISTER,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Flash Status Register",
- .min = 0,
- .max = 255,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FLASH_STATUS_REGISTER,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Flash Status Register",
+ .min = 0,
+ .max = 255,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
#endif
};
static struct lm3554_platform_data platform_data;
platform_data.gpio_reset =
- desc_to_gpio(gpiod_get_index(&client->dev,
- NULL, 2, GPIOD_OUT_LOW));
+ desc_to_gpio(gpiod_get_index(&client->dev,
+ NULL, 2, GPIOD_OUT_LOW));
platform_data.gpio_strobe =
- desc_to_gpio(gpiod_get_index(&client->dev,
- NULL, 0, GPIOD_OUT_LOW));
+ desc_to_gpio(gpiod_get_index(&client->dev,
+ NULL, 0, GPIOD_OUT_LOW));
platform_data.gpio_torch =
- desc_to_gpio(gpiod_get_index(&client->dev,
- NULL, 1, GPIOD_OUT_LOW));
+ desc_to_gpio(gpiod_get_index(&client->dev,
+ NULL, 1, GPIOD_OUT_LOW));
dev_info(&client->dev, "camera pdata: lm3554: reset: %d strobe %d torch %d\n",
- platform_data.gpio_reset, platform_data.gpio_strobe,
- platform_data.gpio_torch);
+ platform_data.gpio_reset, platform_data.gpio_strobe,
+ platform_data.gpio_torch);
/* Set to TX2 mode, then ENVM/TX2 pin is a power amplifier sync input:
* ENVM/TX pin asserted, flash forced into torch;
}
if (data_length != MISENSOR_8BIT && data_length != MISENSOR_16BIT
- && data_length != MISENSOR_32BIT) {
+ && data_length != MISENSOR_32BIT) {
v4l2_err(client, "%s error, invalid data length\n", __func__);
return -EINVAL;
}
*val = data[1] + (data[0] << 8);
else
*val = data[3] + (data[2] << 8) +
- (data[1] << 16) + (data[0] << 24);
+ (data[1] << 16) + (data[0] << 24);
return 0;
}
}
if (data_length != MISENSOR_8BIT && data_length != MISENSOR_16BIT
- && data_length != MISENSOR_32BIT) {
+ && data_length != MISENSOR_32BIT) {
v4l2_err(client, "%s error, invalid data_length\n", __func__);
return -EINVAL;
}
*/
static int
misensor_rmw_reg(struct i2c_client *client, u16 data_length, u16 reg,
- u32 mask, u32 set)
+ u32 mask, u32 set)
{
int err;
u32 val;
*
*/
static int mt9m114_write_reg_array(struct i2c_client *client,
- const struct misensor_reg *reglist,
- int poll)
+ const struct misensor_reg *reglist,
+ int poll)
{
const struct misensor_reg *next = reglist;
struct mt9m114_write_ctrl ctrl;
err = __mt9m114_flush_reg_array(client, &ctrl);
err |= misensor_rmw_reg(client,
next->length &
- ~MISENSOR_TOK_RMW,
+ ~MISENSOR_TOK_RMW,
next->reg, next->val,
next->val2);
if (err) {
struct i2c_client *client = v4l2_get_subdevdata(sd);
return mt9m114_write_reg_array(client,
- mt9m114_standby_reg, POST_POLLING);
+ mt9m114_standby_reg, POST_POLLING);
}
static int mt9m114_init_common(struct v4l2_subdev *sd)
int idx = 0;
if ((*w > MT9M114_RES_960P_SIZE_H)
- || (*h > MT9M114_RES_960P_SIZE_V)) {
+ || (*h > MT9M114_RES_960P_SIZE_V)) {
*w = MT9M114_RES_960P_SIZE_H;
*h = MT9M114_RES_960P_SIZE_V;
} else {
}
static int mt9m114_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct mt9m114_res_struct *res)
+ struct camera_mipi_info *info,
+ const struct mt9m114_res_struct *res)
{
struct atomisp_sensor_mode_data *buf = &info->data;
u32 reg_val;
return -EINVAL;
ret = mt9m114_read_reg(client, MISENSOR_32BIT,
- REG_PIXEL_CLK, ®_val);
+ REG_PIXEL_CLK, ®_val);
if (ret)
return ret;
buf->vt_pix_clk_freq_mhz = reg_val;
/* get integration time */
buf->coarse_integration_time_min = MT9M114_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- MT9M114_COARSE_INTG_TIME_MAX_MARGIN;
+ MT9M114_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = MT9M114_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- MT9M114_FINE_INTG_TIME_MAX_MARGIN;
+ MT9M114_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = MT9M114_FINE_INTG_TIME_MIN;
/* get the cropping and output resolution to ISP for this mode. */
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_H_START, ®_val);
+ REG_H_START, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_V_START, ®_val);
+ REG_V_START, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_H_END, ®_val);
+ REG_H_END, ®_val);
if (ret)
return ret;
buf->crop_horizontal_end = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_V_END, ®_val);
+ REG_V_END, ®_val);
if (ret)
return ret;
buf->crop_vertical_end = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_WIDTH, ®_val);
+ REG_WIDTH, ®_val);
if (ret)
return ret;
buf->output_width = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_HEIGHT, ®_val);
+ REG_HEIGHT, ®_val);
if (ret)
return ret;
buf->output_height = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_TIMING_HTS, ®_val);
+ REG_TIMING_HTS, ®_val);
if (ret)
return ret;
buf->line_length_pck = reg_val;
ret = mt9m114_read_reg(client, MISENSOR_16BIT,
- REG_TIMING_VTS, ®_val);
+ REG_TIMING_VTS, ®_val);
if (ret)
return ret;
buf->frame_length_lines = reg_val;
buf->binning_factor_x = res->bin_factor_x ?
- res->bin_factor_x : 1;
+ res->bin_factor_x : 1;
buf->binning_factor_y = res->bin_factor_y ?
- res->bin_factor_y : 1;
+ res->bin_factor_y : 1;
return 0;
}
static int mt9m114_get_fmt(struct v4l2_subdev *sd,
- struct v4l2_subdev_pad_config *cfg,
- struct v4l2_subdev_format *format)
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_format *format)
{
struct v4l2_mbus_framefmt *fmt = &format->format;
int width, height;
case MT9M114_RES_736P:
ret = mt9m114_write_reg_array(c, mt9m114_736P_init, NO_POLLING);
ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
- MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+ MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
break;
case MT9M114_RES_864P:
ret = mt9m114_write_reg_array(c, mt9m114_864P_init, NO_POLLING);
ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
- MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+ MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
break;
case MT9M114_RES_960P:
ret = mt9m114_write_reg_array(c, mt9m114_976P_init, NO_POLLING);
/* set sensor read_mode to Normal */
ret += misensor_rmw_reg(c, MISENSOR_16BIT, MISENSOR_READ_MODE,
- MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
+ MISENSOR_R_MODE_MASK, MISENSOR_NORMAL_SET);
break;
default:
v4l2_err(sd, "set resolution: %d failed!\n", res_index->res);
}
}
ret = mt9m114_get_intg_factor(c, mt9m114_info,
- &mt9m114_res[res_index->res]);
+ &mt9m114_res[res_index->res]);
if (ret) {
dev_err(&c->dev, "failed to get integration_factor\n");
return -EINVAL;
static int mt9m114_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (MT9M114_F_NUMBER_DEFAULT_NUM << 24) |
- (MT9M114_F_NUMBER_DEM << 16) |
- (MT9M114_F_NUMBER_DEFAULT_NUM << 8) | MT9M114_F_NUMBER_DEM;
+ (MT9M114_F_NUMBER_DEM << 16) |
+ (MT9M114_F_NUMBER_DEFAULT_NUM << 8) | MT9M114_F_NUMBER_DEM;
return 0;
}
u32 data;
ret = mt9m114_read_reg(c, MISENSOR_16BIT,
- (u32)MISENSOR_READ_MODE, &data);
+ (u32)MISENSOR_READ_MODE, &data);
if (ret)
return ret;
*val = !!(data & MISENSOR_HFLIP_MASK);
u32 data;
ret = mt9m114_read_reg(c, MISENSOR_16BIT,
- (u32)MISENSOR_READ_MODE, &data);
+ (u32)MISENSOR_READ_MODE, &data);
if (ret)
return ret;
*val = !!(data & MISENSOR_VFLIP_MASK);
u32 AnalogGainToWrite = 0;
dev_dbg(&client->dev, "%s(0x%X 0x%X 0x%X)\n", __func__,
- exposure->integration_time[0], exposure->gain[0],
- exposure->gain[1]);
+ exposure->integration_time[0], exposure->gain[0],
+ exposure->gain[1]);
coarse_integration = exposure->integration_time[0];
/* fine_integration = ExposureTime.FineIntegrationTime; */
/* 3A provide real exposure time.
should not translate to any value here. */
ret = mt9m114_write_reg(client, MISENSOR_16BIT,
- REG_EXPO_COARSE, (u16)(coarse_integration));
+ REG_EXPO_COARSE, (u16)(coarse_integration));
if (ret) {
v4l2_err(client, "%s: fail to set exposure time\n", __func__);
return -EINVAL;
(u16)((DigitalGain << 12) | AnalogGainToWrite); */
AnalogGainToWrite = (u16)((DigitalGain << 12) | (u16)AnalogGain);
ret = mt9m114_write_reg(client, MISENSOR_16BIT,
- REG_GAIN, AnalogGainToWrite);
+ REG_GAIN, AnalogGainToWrite);
if (ret) {
v4l2_err(client, "%s: fail to set AnalogGainToWrite\n",
- __func__);
+ __func__);
return -EINVAL;
}
switch (val) {
case V4L2_EXPOSURE_METERING_SPOT:
ret = mt9m114_write_reg_array(client, mt9m114_exp_average,
- NO_POLLING);
+ NO_POLLING);
if (ret) {
dev_err(&client->dev, "write exp_average reg err.\n");
return ret;
case V4L2_EXPOSURE_METERING_CENTER_WEIGHTED:
default:
ret = mt9m114_write_reg_array(client, mt9m114_exp_center,
- NO_POLLING);
+ NO_POLLING);
if (ret) {
dev_err(&client->dev, "write exp_default reg err");
return ret;
{
if (aaalock)
return V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE
- | V4L2_LOCK_FOCUS;
+ | V4L2_LOCK_FOCUS;
return 0;
}
static struct v4l2_ctrl_config mt9m114_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_VFLIP,
- .name = "Image v-Flip",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_VFLIP,
+ .name = "Image v-Flip",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_HFLIP,
- .name = "Image h-Flip",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_HFLIP,
+ .name = "Image h-Flip",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .name = "focal length",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = MT9M114_FOCAL_LENGTH_DEFAULT,
- .max = MT9M114_FOCAL_LENGTH_DEFAULT,
- .step = 1,
- .def = MT9M114_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .name = "focal length",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = MT9M114_FOCAL_LENGTH_DEFAULT,
+ .max = MT9M114_FOCAL_LENGTH_DEFAULT,
+ .step = 1,
+ .def = MT9M114_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .name = "f-number",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = MT9M114_F_NUMBER_DEFAULT,
- .max = MT9M114_F_NUMBER_DEFAULT,
- .step = 1,
- .def = MT9M114_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .name = "f-number",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = MT9M114_F_NUMBER_DEFAULT,
+ .max = MT9M114_F_NUMBER_DEFAULT,
+ .step = 1,
+ .def = MT9M114_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .name = "f-number range",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = MT9M114_F_NUMBER_RANGE,
- .max = MT9M114_F_NUMBER_RANGE,
- .step = 1,
- .def = MT9M114_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .name = "f-number range",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = MT9M114_F_NUMBER_RANGE,
+ .max = MT9M114_F_NUMBER_RANGE,
+ .step = 1,
+ .def = MT9M114_F_NUMBER_RANGE,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .name = "exposure",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = 0xffff,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .name = "exposure",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = 0xffff,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
#ifndef CSS15
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ZONE_NUM,
- .name = "one-time exposure zone number",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = 0xffff,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ZONE_NUM,
+ .name = "one-time exposure zone number",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = 0xffff,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_METERING,
- .name = "metering",
- .type = V4L2_CTRL_TYPE_MENU,
- .min = 0,
- .max = 3,
- .step = 0,
- .def = 1,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_METERING,
+ .name = "metering",
+ .type = V4L2_CTRL_TYPE_MENU,
+ .min = 0,
+ .max = 3,
+ .step = 0,
+ .def = 1,
+ .flags = 0,
+ },
#endif
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_HORZ,
- .name = "horizontal binning factor",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = MT9M114_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_HORZ,
+ .name = "horizontal binning factor",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = MT9M114_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_VERT,
- .name = "vertical binning factor",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .max = MT9M114_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_VERT,
+ .name = "vertical binning factor",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 0,
+ .max = MT9M114_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE,
- .name = "exposure biasx",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = -2,
- .max = 2,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE,
+ .name = "exposure biasx",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = -2,
+ .max = 2,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_3A_LOCK,
- .name = "3a lock",
- .type = V4L2_CTRL_TYPE_BITMASK,
- .min = 0,
- .max = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE | V4L2_LOCK_FOCUS,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_3A_LOCK,
+ .name = "3a lock",
+ .type = V4L2_CTRL_TYPE_BITMASK,
+ .min = 0,
+ .max = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE | V4L2_LOCK_FOCUS,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
};
static int mt9m114_detect(struct mt9m114_device *dev, struct i2c_client *client)
}
static int mt9m114_g_frame_interval(struct v4l2_subdev *sd,
- struct v4l2_subdev_frame_interval *interval)
+ struct v4l2_subdev_frame_interval *interval)
{
struct mt9m114_device *dev = to_mt9m114_sensor(sd);
if (enable) {
ret = mt9m114_write_reg_array(c, mt9m114_chgstat_reg,
- POST_POLLING);
+ POST_POLLING);
if (ret < 0)
return ret;
}
if (data_length != OV2680_8BIT && data_length != OV2680_16BIT
- && data_length != OV2680_32BIT) {
+ && data_length != OV2680_32BIT) {
dev_err(&client->dev, "%s error, invalid data length\n",
__func__);
return -EINVAL;
}
static int ov2680_write_reg(struct i2c_client *client, u16 data_length,
- u16 reg, u16 val)
+ u16 reg, u16 val)
{
int ret;
unsigned char data[4] = {0};
}
static int __ov2680_write_reg_is_consecutive(struct i2c_client *client,
- struct ov2680_write_ctrl *ctrl,
- const struct ov2680_reg *next)
+ struct ov2680_write_ctrl *ctrl,
+ const struct ov2680_reg *next)
{
if (ctrl->index == 0)
return 1;
* If next address is not consecutive, data needs to be
* flushed before proceed.
*/
- dev_dbg(&client->dev, "+++ov2680_write_reg_array reg=%x->%x\n", next->reg, next->val);
+ dev_dbg(&client->dev, "+++ov2680_write_reg_array reg=%x->%x\n", next->reg,
+ next->val);
if (!__ov2680_write_reg_is_consecutive(client, &ctrl,
- next)) {
+ next)) {
err = __ov2680_flush_reg_array(client, &ctrl);
if (err)
return err;
err = __ov2680_buf_reg_array(client, &ctrl, next);
if (err) {
dev_err(&client->dev, "%s: write error, aborted\n",
- __func__);
+ __func__);
return err;
}
break;
static int ov2680_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (OV2680_F_NUMBER_DEFAULT_NUM << 24) |
- (OV2680_F_NUMBER_DEM << 16) |
- (OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
+ (OV2680_F_NUMBER_DEM << 16) |
+ (OV2680_F_NUMBER_DEFAULT_NUM << 8) | OV2680_F_NUMBER_DEM;
return 0;
}
}
static int ov2680_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct ov2680_resolution *res)
+ struct camera_mipi_info *info,
+ const struct ov2680_resolution *res)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2680_device *dev = to_ov2680_sensor(sd);
/* get integration time */
buf->coarse_integration_time_min = OV2680_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- OV2680_COARSE_INTG_TIME_MAX_MARGIN;
+ OV2680_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = OV2680_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- OV2680_FINE_INTG_TIME_MAX_MARGIN;
+ OV2680_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = OV2680_FINE_INTG_TIME_MIN;
buf->frame_length_lines = res->lines_per_frame;
/* get the cropping and output resolution to ISP for this mode. */
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_HORIZONTAL_START_H, ®_val);
+ OV2680_HORIZONTAL_START_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = reg_val;
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_VERTICAL_START_H, ®_val);
+ OV2680_VERTICAL_START_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = reg_val;
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_HORIZONTAL_END_H, ®_val);
+ OV2680_HORIZONTAL_END_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_end = reg_val;
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_VERTICAL_END_H, ®_val);
+ OV2680_VERTICAL_END_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_end = reg_val;
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_HORIZONTAL_OUTPUT_SIZE_H, ®_val);
+ OV2680_HORIZONTAL_OUTPUT_SIZE_H, ®_val);
if (ret)
return ret;
buf->output_width = reg_val;
ret = ov2680_read_reg(client, OV2680_16BIT,
- OV2680_VERTICAL_OUTPUT_SIZE_H, ®_val);
+ OV2680_VERTICAL_OUTPUT_SIZE_H, ®_val);
if (ret)
return ret;
buf->output_height = reg_val;
buf->binning_factor_x = res->bin_factor_x ?
- (res->bin_factor_x * 2) : 1;
+ (res->bin_factor_x * 2) : 1;
buf->binning_factor_y = res->bin_factor_y ?
- (res->bin_factor_y * 2) : 1;
+ (res->bin_factor_y * 2) : 1;
return 0;
}
static long __ov2680_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
/* group hold */
ret = ov2680_write_reg(client, OV2680_8BIT,
- OV2680_GROUP_ACCESS, 0x00);
+ OV2680_GROUP_ACCESS, 0x00);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV2680_GROUP_ACCESS);
/* Digital gain */
if (digitgain) {
ret = ov2680_write_reg(client, OV2680_16BIT,
- OV2680_MWB_RED_GAIN_H, digitgain);
+ OV2680_MWB_RED_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV2680_MWB_RED_GAIN_H);
}
ret = ov2680_write_reg(client, OV2680_16BIT,
- OV2680_MWB_GREEN_GAIN_H, digitgain);
+ OV2680_MWB_GREEN_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV2680_MWB_RED_GAIN_H);
}
ret = ov2680_write_reg(client, OV2680_16BIT,
- OV2680_MWB_BLUE_GAIN_H, digitgain);
+ OV2680_MWB_BLUE_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV2680_MWB_RED_GAIN_H);
/* Delay launch group */
ret = ov2680_write_reg(client, OV2680_8BIT,
- OV2680_GROUP_ACCESS, 0xa0);
+ OV2680_GROUP_ACCESS, 0xa0);
if (ret)
return ret;
return ret;
}
static int ov2680_set_exposure(struct v4l2_subdev *sd, int exposure,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct ov2680_device *dev = to_ov2680_sensor(sd);
int ret;
}
static long ov2680_s_exposure(struct v4l2_subdev *sd,
- struct atomisp_exposure *exposure)
+ struct atomisp_exposure *exposure)
{
u16 coarse_itg = exposure->integration_time[0];
u16 analog_gain = exposure->gain[0];
/* get exposure */
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_EXPOSURE_L,
- ®_v);
+ OV2680_EXPOSURE_L,
+ ®_v);
if (ret)
goto err;
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_EXPOSURE_M,
- ®_v2);
+ OV2680_EXPOSURE_M,
+ ®_v2);
if (ret)
goto err;
reg_v += reg_v2 << 8;
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_EXPOSURE_H,
- ®_v2);
+ OV2680_EXPOSURE_H,
+ ®_v2);
if (ret)
goto err;
val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
}
ret = ov2680_write_reg(client, OV2680_8BIT,
- OV2680_FLIP_REG, val);
+ OV2680_FLIP_REG, val);
if (ret)
return ret;
- index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT : 0);
+ index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT :
+ 0);
ov2680_info = v4l2_get_subdev_hostdata(sd);
if (ov2680_info) {
ov2680_info->raw_bayer_order = ov2680_bayer_order_mapping[index];
dev->format.code = ov2680_translate_bayer_order(
- ov2680_info->raw_bayer_order);
+ ov2680_info->raw_bayer_order);
}
return ret;
}
val &= ~OV2680_FLIP_MIRROR_BIT_ENABLE;
}
ret = ov2680_write_reg(client, OV2680_8BIT,
- OV2680_MIRROR_REG, val);
+ OV2680_MIRROR_REG, val);
if (ret)
return ret;
- index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT : 0);
+ index = (v_flag > 0 ? OV2680_FLIP_BIT : 0) | (h_flag > 0 ? OV2680_MIRROR_BIT :
+ 0);
ov2680_info = v4l2_get_subdev_hostdata(sd);
if (ov2680_info) {
ov2680_info->raw_bayer_order = ov2680_bayer_order_mapping[index];
dev->format.code = ov2680_translate_bayer_order(
- ov2680_info->raw_bayer_order);
+ ov2680_info->raw_bayer_order);
}
return ret;
}
static const struct v4l2_ctrl_config ov2680_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "exposure",
- .min = 0x0,
- .max = 0xffff,
- .step = 0x01,
- .def = 0x00,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .min = 0x0,
+ .max = 0xffff,
+ .step = 0x01,
+ .def = 0x00,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focal length",
- .min = OV2680_FOCAL_LENGTH_DEFAULT,
- .max = OV2680_FOCAL_LENGTH_DEFAULT,
- .step = 0x01,
- .def = OV2680_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focal length",
+ .min = OV2680_FOCAL_LENGTH_DEFAULT,
+ .max = OV2680_FOCAL_LENGTH_DEFAULT,
+ .step = 0x01,
+ .def = OV2680_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number",
- .min = OV2680_F_NUMBER_DEFAULT,
- .max = OV2680_F_NUMBER_DEFAULT,
- .step = 0x01,
- .def = OV2680_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number",
+ .min = OV2680_F_NUMBER_DEFAULT,
+ .max = OV2680_F_NUMBER_DEFAULT,
+ .step = 0x01,
+ .def = OV2680_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number range",
- .min = OV2680_F_NUMBER_RANGE,
- .max = OV2680_F_NUMBER_RANGE,
- .step = 0x01,
- .def = OV2680_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number range",
+ .min = OV2680_F_NUMBER_RANGE,
+ .max = OV2680_F_NUMBER_RANGE,
+ .step = 0x01,
+ .def = OV2680_F_NUMBER_RANGE,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_HORZ,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "horizontal binning factor",
- .min = 0,
- .max = OV2680_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_HORZ,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "horizontal binning factor",
+ .min = 0,
+ .max = OV2680_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_VERT,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "vertical binning factor",
- .min = 0,
- .max = OV2680_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_VERT,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "vertical binning factor",
+ .min = 0,
+ .max = OV2680_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_VFLIP,
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .name = "Flip",
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_VFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "Flip",
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_HFLIP,
- .type = V4L2_CTRL_TYPE_BOOLEAN,
- .name = "Mirror",
- .min = 0,
- .max = 1,
- .step = 1,
- .def = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_HFLIP,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ .name = "Mirror",
+ .min = 0,
+ .max = 1,
+ .step = 1,
+ .def = 0,
+ },
};
static int ov2680_init_registers(struct v4l2_subdev *sd)
match = abs(((w_ratio << 13) / h_ratio) - 8192);
if ((w_ratio < 8192) || (h_ratio < 8192) ||
- (match > LARGEST_ALLOWED_RATIO_MISMATCH))
+ (match > LARGEST_ALLOWED_RATIO_MISMATCH))
return -1;
return w_ratio + h_ratio;
cfg->try_fmt = *fmt;
mutex_unlock(&dev->input_lock);
return 0;
- }
+ }
dev->fmt_idx = get_resolution_index(fmt->width, fmt->height);
dev_dbg(&client->dev, "+++++get_resolution_index=%d+++++l\n",
- dev->fmt_idx);
+ dev->fmt_idx);
if (dev->fmt_idx == -1) {
dev_err(&client->dev, "get resolution fail\n");
mutex_unlock(&dev->input_lock);
v4l2_info(client, "__s_mbus_fmt i=%d, w=%d, h=%d\n", dev->fmt_idx,
fmt->width, fmt->height);
dev_dbg(&client->dev, "__s_mbus_fmt i=%d, w=%d, h=%d\n",
- dev->fmt_idx, fmt->width, fmt->height);
+ dev->fmt_idx, fmt->width, fmt->height);
ret = ov2680_write_reg_array(client, ov2680_res[dev->fmt_idx].regs);
if (ret)
return -ENODEV;
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_SC_CMMN_CHIP_ID_H, &high);
+ OV2680_SC_CMMN_CHIP_ID_H, &high);
if (ret) {
dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
return -ENODEV;
}
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_SC_CMMN_CHIP_ID_L, &low);
+ OV2680_SC_CMMN_CHIP_ID_L, &low);
id = ((((u16)high) << 8) | (u16)low);
if (id != OV2680_ID) {
}
ret = ov2680_read_reg(client, OV2680_8BIT,
- OV2680_SC_CMMN_SUB_ID, &high);
+ OV2680_SC_CMMN_SUB_ID, &high);
revision = (u8)high & 0x0f;
dev_info(&client->dev, "sensor_revision id = 0x%x, rev= %d\n",
dev_dbg(&client->dev, "ov2680_s_stream off\n");
ret = ov2680_write_reg(client, OV2680_8BIT, OV2680_SW_STREAM,
- enable ? OV2680_START_STREAMING :
- OV2680_STOP_STREAMING);
+ enable ? OV2680_START_STREAMING :
+ OV2680_STOP_STREAMING);
#if 0
/* restore settings */
ov2680_res = ov2680_res_preview;
return -ENODEV;
dev->platform_data =
- (struct camera_sensor_platform_data *)platform_data;
+ (struct camera_sensor_platform_data *)platform_data;
mutex_lock(&dev->input_lock);
/* power off the module, then power on it in future
};
static const struct v4l2_subdev_sensor_ops ov2680_sensor_ops = {
- .g_skip_frames = ov2680_g_skip_frames,
+ .g_skip_frames = ov2680_g_skip_frames,
};
static const struct v4l2_subdev_core_ops ov2680_core_ops = {
dev->sd.ctrl_handler = &dev->ctrl_handler;
ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
- if (ret)
- {
+ if (ret) {
ov2680_remove(client);
dev_dbg(&client->dev, "+++ remove ov2680\n");
}
}
if (data_length != OV2722_8BIT && data_length != OV2722_16BIT
- && data_length != OV2722_32BIT) {
+ && data_length != OV2722_32BIT) {
dev_err(&client->dev, "%s error, invalid data length\n",
__func__);
return -EINVAL;
}
static int ov2722_write_reg(struct i2c_client *client, u16 data_length,
- u16 reg, u16 val)
+ u16 reg, u16 val)
{
int ret;
unsigned char data[4] = {0};
}
static int __ov2722_write_reg_is_consecutive(struct i2c_client *client,
- struct ov2722_write_ctrl *ctrl,
- const struct ov2722_reg *next)
+ struct ov2722_write_ctrl *ctrl,
+ const struct ov2722_reg *next)
{
if (ctrl->index == 0)
return 1;
* flushed before proceed.
*/
if (!__ov2722_write_reg_is_consecutive(client, &ctrl,
- next)) {
+ next)) {
err = __ov2722_flush_reg_array(client, &ctrl);
if (err)
return err;
err = __ov2722_buf_reg_array(client, &ctrl, next);
if (err) {
dev_err(&client->dev, "%s: write error, aborted\n",
- __func__);
+ __func__);
return err;
}
break;
static int ov2722_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (OV2722_F_NUMBER_DEFAULT_NUM << 24) |
- (OV2722_F_NUMBER_DEM << 16) |
- (OV2722_F_NUMBER_DEFAULT_NUM << 8) | OV2722_F_NUMBER_DEM;
+ (OV2722_F_NUMBER_DEM << 16) |
+ (OV2722_F_NUMBER_DEFAULT_NUM << 8) | OV2722_F_NUMBER_DEM;
return 0;
}
static int ov2722_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct ov2722_resolution *res)
+ struct camera_mipi_info *info,
+ const struct ov2722_resolution *res)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov2722_device *dev = NULL;
/* pixel clock calculattion */
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_PLL_CTRL3, &pre_pll_clk_div);
+ OV2722_SC_CMMN_PLL_CTRL3, &pre_pll_clk_div);
if (ret)
return ret;
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_PLL_MULTIPLIER, &pll_multiplier);
+ OV2722_SC_CMMN_PLL_MULTIPLIER, &pll_multiplier);
if (ret)
return ret;
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_PLL_DEBUG_OPT, &op_pix_clk_div);
+ OV2722_SC_CMMN_PLL_DEBUG_OPT, &op_pix_clk_div);
if (ret)
return ret;
pll_multiplier = pll_multiplier & 0x7f;
op_pix_clk_div = op_pix_clk_div & 0x03;
pix_clk_freq_hz = ext_clk_freq_hz / pre_pll_clk_div * pll_multiplier
- * op_pix_clk_div / pll_invariant_div;
+ * op_pix_clk_div / pll_invariant_div;
dev->vt_pix_clk_freq_mhz = pix_clk_freq_hz;
buf->vt_pix_clk_freq_mhz = pix_clk_freq_hz;
/* get integration time */
buf->coarse_integration_time_min = OV2722_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- OV2722_COARSE_INTG_TIME_MAX_MARGIN;
+ OV2722_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = OV2722_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- OV2722_FINE_INTG_TIME_MAX_MARGIN;
+ OV2722_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = OV2722_FINE_INTG_TIME_MIN;
buf->frame_length_lines = res->lines_per_frame;
/* get the cropping and output resolution to ISP for this mode. */
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_H_CROP_START_H, ®_val);
+ OV2722_H_CROP_START_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = reg_val;
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_V_CROP_START_H, ®_val);
+ OV2722_V_CROP_START_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = reg_val;
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_H_CROP_END_H, ®_val);
+ OV2722_H_CROP_END_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_end = reg_val;
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_V_CROP_END_H, ®_val);
+ OV2722_V_CROP_END_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_end = reg_val;
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_H_OUTSIZE_H, ®_val);
+ OV2722_H_OUTSIZE_H, ®_val);
if (ret)
return ret;
buf->output_width = reg_val;
ret = ov2722_read_reg(client, OV2722_16BIT,
- OV2722_V_OUTSIZE_H, ®_val);
+ OV2722_V_OUTSIZE_H, ®_val);
if (ret)
return ret;
buf->output_height = reg_val;
buf->binning_factor_x = res->bin_factor_x ?
- res->bin_factor_x : 1;
+ res->bin_factor_x : 1;
buf->binning_factor_y = res->bin_factor_y ?
- res->bin_factor_y : 1;
+ res->bin_factor_y : 1;
return 0;
}
static long __ov2722_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
digitgain <<= 2;
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_VTS_H, vts);
+ OV2722_VTS_H, vts);
if (ret)
return ret;
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_HTS_H, hts);
+ OV2722_HTS_H, hts);
if (ret)
return ret;
/* set exposure */
ret = ov2722_write_reg(client, OV2722_8BIT,
- OV2722_AEC_PK_EXPO_L,
- coarse_itg & 0xff);
+ OV2722_AEC_PK_EXPO_L,
+ coarse_itg & 0xff);
if (ret)
return ret;
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_AEC_PK_EXPO_H,
- (coarse_itg >> 8) & 0xfff);
+ OV2722_AEC_PK_EXPO_H,
+ (coarse_itg >> 8) & 0xfff);
if (ret)
return ret;
/* set analog gain */
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_AGC_ADJ_H, gain);
+ OV2722_AGC_ADJ_H, gain);
if (ret)
return ret;
/* set digital gain */
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_MWB_GAIN_R_H, digitgain);
+ OV2722_MWB_GAIN_R_H, digitgain);
if (ret)
return ret;
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_MWB_GAIN_G_H, digitgain);
+ OV2722_MWB_GAIN_G_H, digitgain);
if (ret)
return ret;
ret = ov2722_write_reg(client, OV2722_16BIT,
- OV2722_MWB_GAIN_B_H, digitgain);
+ OV2722_MWB_GAIN_B_H, digitgain);
return ret;
}
static int ov2722_set_exposure(struct v4l2_subdev *sd, int exposure,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct ov2722_device *dev = to_ov2722_sensor(sd);
int ret;
}
static long ov2722_s_exposure(struct v4l2_subdev *sd,
- struct atomisp_exposure *exposure)
+ struct atomisp_exposure *exposure)
{
int exp = exposure->integration_time[0];
int gain = exposure->gain[0];
/* get exposure */
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_AEC_PK_EXPO_L,
- ®_v);
+ OV2722_AEC_PK_EXPO_L,
+ ®_v);
if (ret)
goto err;
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_AEC_PK_EXPO_M,
- ®_v2);
+ OV2722_AEC_PK_EXPO_M,
+ ®_v2);
if (ret)
goto err;
reg_v += reg_v2 << 8;
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_AEC_PK_EXPO_H,
- ®_v2);
+ OV2722_AEC_PK_EXPO_H,
+ ®_v2);
if (ret)
goto err;
static const struct v4l2_ctrl_config ov2722_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "exposure",
- .min = 0x0,
- .max = 0xffff,
- .step = 0x01,
- .def = 0x00,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .min = 0x0,
+ .max = 0xffff,
+ .step = 0x01,
+ .def = 0x00,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focal length",
- .min = OV2722_FOCAL_LENGTH_DEFAULT,
- .max = OV2722_FOCAL_LENGTH_DEFAULT,
- .step = 0x01,
- .def = OV2722_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focal length",
+ .min = OV2722_FOCAL_LENGTH_DEFAULT,
+ .max = OV2722_FOCAL_LENGTH_DEFAULT,
+ .step = 0x01,
+ .def = OV2722_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number",
- .min = OV2722_F_NUMBER_DEFAULT,
- .max = OV2722_F_NUMBER_DEFAULT,
- .step = 0x01,
- .def = OV2722_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number",
+ .min = OV2722_F_NUMBER_DEFAULT,
+ .max = OV2722_F_NUMBER_DEFAULT,
+ .step = 0x01,
+ .def = OV2722_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number range",
- .min = OV2722_F_NUMBER_RANGE,
- .max = OV2722_F_NUMBER_RANGE,
- .step = 0x01,
- .def = OV2722_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number range",
+ .min = OV2722_F_NUMBER_RANGE,
+ .max = OV2722_F_NUMBER_RANGE,
+ .step = 0x01,
+ .def = OV2722_F_NUMBER_RANGE,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_LINK_FREQ,
- .name = "Link Frequency",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 1,
- .max = 1500000 * 1000,
- .step = 1,
- .def = 1,
- .flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_LINK_FREQ,
+ .name = "Link Frequency",
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .min = 1,
+ .max = 1500000 * 1000,
+ .step = 1,
+ .def = 1,
+ .flags = V4L2_CTRL_FLAG_VOLATILE | V4L2_CTRL_FLAG_READ_ONLY,
+ },
};
static int ov2722_init(struct v4l2_subdev *sd)
int ret = 0;
ret = ov2722_write_reg(client, OV2722_8BIT,
- OV2722_SW_RESET, 0x01);
+ OV2722_SW_RESET, 0x01);
if (ret) {
dev_err(&client->dev, "ov2722 reset err.\n");
return ret;
}
ret = ov2722_get_intg_factor(client, ov2722_info,
- &ov2722_res[dev->fmt_idx]);
+ &ov2722_res[dev->fmt_idx]);
if (ret)
dev_err(&client->dev, "failed to get integration_factor\n");
return -ENODEV;
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_CHIP_ID_H, &high);
+ OV2722_SC_CMMN_CHIP_ID_H, &high);
if (ret) {
dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
return -ENODEV;
}
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_CHIP_ID_L, &low);
+ OV2722_SC_CMMN_CHIP_ID_L, &low);
id = (high << 8) | low;
if ((id != OV2722_ID) && (id != OV2720_ID)) {
}
ret = ov2722_read_reg(client, OV2722_8BIT,
- OV2722_SC_CMMN_SUB_ID, &high);
+ OV2722_SC_CMMN_SUB_ID, &high);
revision = (u8)high & 0x0f;
dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
mutex_lock(&dev->input_lock);
ret = ov2722_write_reg(client, OV2722_8BIT, OV2722_SW_STREAM,
- enable ? OV2722_START_STREAMING :
- OV2722_STOP_STREAMING);
+ enable ? OV2722_START_STREAMING :
+ OV2722_STOP_STREAMING);
mutex_unlock(&dev->input_lock);
return ret;
return -ENODEV;
dev->platform_data =
- (struct camera_sensor_platform_data *)platform_data;
+ (struct camera_sensor_platform_data *)platform_data;
mutex_lock(&dev->input_lock);
*/
static struct mt9m114_res_struct mt9m114_res[] = {
{
- .desc = "720P",
- .res = MT9M114_RES_736P,
- .width = 1296,
- .height = 736,
- .fps = 30,
- .used = false,
- .regs = NULL,
- .skip_frames = 1,
-
- .pixels_per_line = 0x0640,
- .lines_per_frame = 0x0307,
- .bin_factor_x = 1,
- .bin_factor_y = 1,
- .bin_mode = 0,
+ .desc = "720P",
+ .res = MT9M114_RES_736P,
+ .width = 1296,
+ .height = 736,
+ .fps = 30,
+ .used = false,
+ .regs = NULL,
+ .skip_frames = 1,
+
+ .pixels_per_line = 0x0640,
+ .lines_per_frame = 0x0307,
+ .bin_factor_x = 1,
+ .bin_factor_y = 1,
+ .bin_mode = 0,
},
{
- .desc = "848P",
- .res = MT9M114_RES_864P,
- .width = 1296,
- .height = 864,
- .fps = 30,
- .used = false,
- .regs = NULL,
- .skip_frames = 1,
-
- .pixels_per_line = 0x0640,
- .lines_per_frame = 0x03E8,
- .bin_factor_x = 1,
- .bin_factor_y = 1,
- .bin_mode = 0,
+ .desc = "848P",
+ .res = MT9M114_RES_864P,
+ .width = 1296,
+ .height = 864,
+ .fps = 30,
+ .used = false,
+ .regs = NULL,
+ .skip_frames = 1,
+
+ .pixels_per_line = 0x0640,
+ .lines_per_frame = 0x03E8,
+ .bin_factor_x = 1,
+ .bin_factor_y = 1,
+ .bin_mode = 0,
},
{
- .desc = "960P",
- .res = MT9M114_RES_960P,
- .width = 1296,
- .height = 976,
- .fps = 30,
- .used = false,
- .regs = NULL,
- .skip_frames = 1,
-
- .pixels_per_line = 0x0644, /* consistent with regs arrays */
- .lines_per_frame = 0x03E5, /* consistent with regs arrays */
- .bin_factor_x = 1,
- .bin_factor_y = 1,
- .bin_mode = 0,
+ .desc = "960P",
+ .res = MT9M114_RES_960P,
+ .width = 1296,
+ .height = 976,
+ .fps = 30,
+ .used = false,
+ .regs = NULL,
+ .skip_frames = 1,
+
+ .pixels_per_line = 0x0644, /* consistent with regs arrays */
+ .lines_per_frame = 0x03E5, /* consistent with regs arrays */
+ .bin_factor_x = 1,
+ .bin_factor_y = 1,
+ .bin_mode = 0,
},
};
#if 0 /* Currently unused */
static struct misensor_reg const mt9m114_suspend[] = {
- {MISENSOR_16BIT, 0x098E, 0xDC00},
- {MISENSOR_8BIT, 0xDC00, 0x40},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xDC00},
+ {MISENSOR_8BIT, 0xDC00, 0x40},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
static struct misensor_reg const mt9m114_streaming[] = {
- {MISENSOR_16BIT, 0x098E, 0xDC00},
- {MISENSOR_8BIT, 0xDC00, 0x34},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xDC00},
+ {MISENSOR_8BIT, 0xDC00, 0x34},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
#endif
static struct misensor_reg const mt9m114_standby_reg[] = {
- {MISENSOR_16BIT, 0x098E, 0xDC00},
- {MISENSOR_8BIT, 0xDC00, 0x50},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xDC00},
+ {MISENSOR_8BIT, 0xDC00, 0x50},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
#if 0 /* Currently unused */
static struct misensor_reg const mt9m114_wakeup_reg[] = {
- {MISENSOR_16BIT, 0x098E, 0xDC00},
- {MISENSOR_8BIT, 0xDC00, 0x54},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xDC00},
+ {MISENSOR_8BIT, 0xDC00, 0x54},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
#endif
{MISENSOR_16BIT, 0xC80C, 0x0001}, /* cam_sensor_cfg_row_speed = 1 */
/* cam_sensor_cfg_fine_integ_time_min = 219 */
{MISENSOR_16BIT, 0xC80E, 0x00DB},
- /* 0x062E //cam_sensor_cfg_fine_integ_time_max = 1459 */
+ /* 0x062E //cam_sensor_cfg_fine_integ_time_max = 1459 */
{MISENSOR_16BIT, 0xC810, 0x05B3},
/* 0x074C //cam_sensor_cfg_frame_length_lines = 1006 */
{MISENSOR_16BIT, 0xC812, 0x03E5},
#if 0 /* Currently unused */
static struct misensor_reg const mt9m114_antiflicker_50hz[] = {
- {MISENSOR_16BIT, 0x098E, 0xC88B},
- {MISENSOR_8BIT, 0xC88B, 0x32},
- {MISENSOR_8BIT, 0xDC00, 0x28},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xC88B},
+ {MISENSOR_8BIT, 0xC88B, 0x32},
+ {MISENSOR_8BIT, 0xDC00, 0x28},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
static struct misensor_reg const mt9m114_antiflicker_60hz[] = {
- {MISENSOR_16BIT, 0x098E, 0xC88B},
- {MISENSOR_8BIT, 0xC88B, 0x3C},
- {MISENSOR_8BIT, 0xDC00, 0x28},
- {MISENSOR_16BIT, 0x0080, 0x8002},
- {MISENSOR_TOK_TERM, 0, 0}
+ {MISENSOR_16BIT, 0x098E, 0xC88B},
+ {MISENSOR_8BIT, 0xC88B, 0x3C},
+ {MISENSOR_8BIT, 0xDC00, 0x28},
+ {MISENSOR_16BIT, 0x0080, 0x8002},
+ {MISENSOR_TOK_TERM, 0, 0}
};
static struct misensor_reg const mt9m114_iq[] = {
struct ov2680_reg *regs;
};
- /*
- * ov2680 device structure.
- */
- struct ov2680_device {
- struct v4l2_subdev sd;
- struct media_pad pad;
- struct v4l2_mbus_framefmt format;
- struct mutex input_lock;
+/*
+ * ov2680 device structure.
+ */
+struct ov2680_device {
+ struct v4l2_subdev sd;
+ struct media_pad pad;
+ struct v4l2_mbus_framefmt format;
+ struct mutex input_lock;
struct v4l2_ctrl_handler ctrl_handler;
- struct camera_sensor_platform_data *platform_data;
- int vt_pix_clk_freq_mhz;
- int fmt_idx;
- int run_mode;
- u8 res;
- u8 type;
- };
-
- enum ov2680_tok_type {
- OV2680_8BIT = 0x0001,
- OV2680_16BIT = 0x0002,
- OV2680_32BIT = 0x0004,
- OV2680_TOK_TERM = 0xf000, /* terminating token for reg list */
- OV2680_TOK_DELAY = 0xfe00, /* delay token for reg list */
- OV2680_TOK_MASK = 0xfff0
- };
-
- /**
- * struct ov2680_reg - MI sensor register format
- * @type: type of the register
- * @reg: 16-bit offset to register
- * @val: 8/16/32-bit register value
- *
- * Define a structure for sensor register initialization values
- */
- struct ov2680_reg {
- enum ov2680_tok_type type;
- u16 reg;
- u32 val; /* @set value for read/mod/write, @mask */
- };
-
- #define to_ov2680_sensor(x) container_of(x, struct ov2680_device, sd)
-
- #define OV2680_MAX_WRITE_BUF_SIZE 30
-
- struct ov2680_write_buffer {
- u16 addr;
- u8 data[OV2680_MAX_WRITE_BUF_SIZE];
- };
-
- struct ov2680_write_ctrl {
- int index;
- struct ov2680_write_buffer buffer;
- };
-
- static struct ov2680_reg const ov2680_global_setting[] = {
- {OV2680_8BIT, 0x0103, 0x01},
- {OV2680_8BIT, 0x3002, 0x00},
- {OV2680_8BIT, 0x3016, 0x1c},
- {OV2680_8BIT, 0x3018, 0x44},
- {OV2680_8BIT, 0x3020, 0x00},
- {OV2680_8BIT, 0x3080, 0x02},
- {OV2680_8BIT, 0x3082, 0x45},
- {OV2680_8BIT, 0x3084, 0x09},
- {OV2680_8BIT, 0x3085, 0x04},
- {OV2680_8BIT, 0x3503, 0x03},
- {OV2680_8BIT, 0x350b, 0x36},
- {OV2680_8BIT, 0x3600, 0xb4},
- {OV2680_8BIT, 0x3603, 0x39},
- {OV2680_8BIT, 0x3604, 0x24},
- {OV2680_8BIT, 0x3605, 0x00},
- {OV2680_8BIT, 0x3620, 0x26},
- {OV2680_8BIT, 0x3621, 0x37},
- {OV2680_8BIT, 0x3622, 0x04},
- {OV2680_8BIT, 0x3628, 0x00},
- {OV2680_8BIT, 0x3705, 0x3c},
- {OV2680_8BIT, 0x370c, 0x50},
- {OV2680_8BIT, 0x370d, 0xc0},
- {OV2680_8BIT, 0x3718, 0x88},
- {OV2680_8BIT, 0x3720, 0x00},
- {OV2680_8BIT, 0x3721, 0x00},
- {OV2680_8BIT, 0x3722, 0x00},
- {OV2680_8BIT, 0x3723, 0x00},
- {OV2680_8BIT, 0x3738, 0x00},
- {OV2680_8BIT, 0x3717, 0x58},
- {OV2680_8BIT, 0x3781, 0x80},
- {OV2680_8BIT, 0x3789, 0x60},
- {OV2680_8BIT, 0x3800, 0x00},
- {OV2680_8BIT, 0x3819, 0x04},
- {OV2680_8BIT, 0x4000, 0x81},
- {OV2680_8BIT, 0x4001, 0x40},
- {OV2680_8BIT, 0x4602, 0x02},
- {OV2680_8BIT, 0x481f, 0x36},
- {OV2680_8BIT, 0x4825, 0x36},
- {OV2680_8BIT, 0x4837, 0x18},
- {OV2680_8BIT, 0x5002, 0x30},
- {OV2680_8BIT, 0x5004, 0x04},//manual awb 1x
- {OV2680_8BIT, 0x5005, 0x00},
- {OV2680_8BIT, 0x5006, 0x04},
- {OV2680_8BIT, 0x5007, 0x00},
- {OV2680_8BIT, 0x5008, 0x04},
- {OV2680_8BIT, 0x5009, 0x00},
- {OV2680_8BIT, 0x5080, 0x00},
- {OV2680_8BIT, 0x3701, 0x64}, //add on 14/05/13
- {OV2680_8BIT, 0x3784, 0x0c}, //based OV2680_R1A_AM10.ovt add on 14/06/13
- {OV2680_8BIT, 0x5780, 0x3e}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
- {OV2680_8BIT, 0x5781, 0x0f},
- {OV2680_8BIT, 0x5782, 0x04},
- {OV2680_8BIT, 0x5783, 0x02},
- {OV2680_8BIT, 0x5784, 0x01},
- {OV2680_8BIT, 0x5785, 0x01},
- {OV2680_8BIT, 0x5786, 0x00},
- {OV2680_8BIT, 0x5787, 0x04},
- {OV2680_8BIT, 0x5788, 0x02},
- {OV2680_8BIT, 0x5789, 0x00},
- {OV2680_8BIT, 0x578a, 0x01},
- {OV2680_8BIT, 0x578b, 0x02},
- {OV2680_8BIT, 0x578c, 0x03},
- {OV2680_8BIT, 0x578d, 0x03},
- {OV2680_8BIT, 0x578e, 0x08},
- {OV2680_8BIT, 0x578f, 0x0c},
- {OV2680_8BIT, 0x5790, 0x08},
- {OV2680_8BIT, 0x5791, 0x04},
- {OV2680_8BIT, 0x5792, 0x00},
- {OV2680_8BIT, 0x5793, 0x00},
- {OV2680_8BIT, 0x5794, 0x03}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
- {OV2680_8BIT, 0x0100, 0x00}, //stream off
-
- {OV2680_TOK_TERM, 0, 0}
- };
+ struct camera_sensor_platform_data *platform_data;
+ int vt_pix_clk_freq_mhz;
+ int fmt_idx;
+ int run_mode;
+ u8 res;
+ u8 type;
+};
+
+enum ov2680_tok_type {
+ OV2680_8BIT = 0x0001,
+ OV2680_16BIT = 0x0002,
+ OV2680_32BIT = 0x0004,
+ OV2680_TOK_TERM = 0xf000, /* terminating token for reg list */
+ OV2680_TOK_DELAY = 0xfe00, /* delay token for reg list */
+ OV2680_TOK_MASK = 0xfff0
+};
+
+/**
+ * struct ov2680_reg - MI sensor register format
+ * @type: type of the register
+ * @reg: 16-bit offset to register
+ * @val: 8/16/32-bit register value
+ *
+ * Define a structure for sensor register initialization values
+ */
+struct ov2680_reg {
+ enum ov2680_tok_type type;
+ u16 reg;
+ u32 val; /* @set value for read/mod/write, @mask */
+};
+
+#define to_ov2680_sensor(x) container_of(x, struct ov2680_device, sd)
+
+#define OV2680_MAX_WRITE_BUF_SIZE 30
+
+struct ov2680_write_buffer {
+ u16 addr;
+ u8 data[OV2680_MAX_WRITE_BUF_SIZE];
+};
+
+struct ov2680_write_ctrl {
+ int index;
+ struct ov2680_write_buffer buffer;
+};
+
+static struct ov2680_reg const ov2680_global_setting[] = {
+ {OV2680_8BIT, 0x0103, 0x01},
+ {OV2680_8BIT, 0x3002, 0x00},
+ {OV2680_8BIT, 0x3016, 0x1c},
+ {OV2680_8BIT, 0x3018, 0x44},
+ {OV2680_8BIT, 0x3020, 0x00},
+ {OV2680_8BIT, 0x3080, 0x02},
+ {OV2680_8BIT, 0x3082, 0x45},
+ {OV2680_8BIT, 0x3084, 0x09},
+ {OV2680_8BIT, 0x3085, 0x04},
+ {OV2680_8BIT, 0x3503, 0x03},
+ {OV2680_8BIT, 0x350b, 0x36},
+ {OV2680_8BIT, 0x3600, 0xb4},
+ {OV2680_8BIT, 0x3603, 0x39},
+ {OV2680_8BIT, 0x3604, 0x24},
+ {OV2680_8BIT, 0x3605, 0x00},
+ {OV2680_8BIT, 0x3620, 0x26},
+ {OV2680_8BIT, 0x3621, 0x37},
+ {OV2680_8BIT, 0x3622, 0x04},
+ {OV2680_8BIT, 0x3628, 0x00},
+ {OV2680_8BIT, 0x3705, 0x3c},
+ {OV2680_8BIT, 0x370c, 0x50},
+ {OV2680_8BIT, 0x370d, 0xc0},
+ {OV2680_8BIT, 0x3718, 0x88},
+ {OV2680_8BIT, 0x3720, 0x00},
+ {OV2680_8BIT, 0x3721, 0x00},
+ {OV2680_8BIT, 0x3722, 0x00},
+ {OV2680_8BIT, 0x3723, 0x00},
+ {OV2680_8BIT, 0x3738, 0x00},
+ {OV2680_8BIT, 0x3717, 0x58},
+ {OV2680_8BIT, 0x3781, 0x80},
+ {OV2680_8BIT, 0x3789, 0x60},
+ {OV2680_8BIT, 0x3800, 0x00},
+ {OV2680_8BIT, 0x3819, 0x04},
+ {OV2680_8BIT, 0x4000, 0x81},
+ {OV2680_8BIT, 0x4001, 0x40},
+ {OV2680_8BIT, 0x4602, 0x02},
+ {OV2680_8BIT, 0x481f, 0x36},
+ {OV2680_8BIT, 0x4825, 0x36},
+ {OV2680_8BIT, 0x4837, 0x18},
+ {OV2680_8BIT, 0x5002, 0x30},
+ {OV2680_8BIT, 0x5004, 0x04},//manual awb 1x
+ {OV2680_8BIT, 0x5005, 0x00},
+ {OV2680_8BIT, 0x5006, 0x04},
+ {OV2680_8BIT, 0x5007, 0x00},
+ {OV2680_8BIT, 0x5008, 0x04},
+ {OV2680_8BIT, 0x5009, 0x00},
+ {OV2680_8BIT, 0x5080, 0x00},
+ {OV2680_8BIT, 0x3701, 0x64}, //add on 14/05/13
+ {OV2680_8BIT, 0x3784, 0x0c}, //based OV2680_R1A_AM10.ovt add on 14/06/13
+ {OV2680_8BIT, 0x5780, 0x3e}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
+ {OV2680_8BIT, 0x5781, 0x0f},
+ {OV2680_8BIT, 0x5782, 0x04},
+ {OV2680_8BIT, 0x5783, 0x02},
+ {OV2680_8BIT, 0x5784, 0x01},
+ {OV2680_8BIT, 0x5785, 0x01},
+ {OV2680_8BIT, 0x5786, 0x00},
+ {OV2680_8BIT, 0x5787, 0x04},
+ {OV2680_8BIT, 0x5788, 0x02},
+ {OV2680_8BIT, 0x5789, 0x00},
+ {OV2680_8BIT, 0x578a, 0x01},
+ {OV2680_8BIT, 0x578b, 0x02},
+ {OV2680_8BIT, 0x578c, 0x03},
+ {OV2680_8BIT, 0x578d, 0x03},
+ {OV2680_8BIT, 0x578e, 0x08},
+ {OV2680_8BIT, 0x578f, 0x0c},
+ {OV2680_8BIT, 0x5790, 0x08},
+ {OV2680_8BIT, 0x5791, 0x04},
+ {OV2680_8BIT, 0x5792, 0x00},
+ {OV2680_8BIT, 0x5793, 0x00},
+ {OV2680_8BIT, 0x5794, 0x03}, //based OV2680_R1A_AM10.ovt,Adjust DPC setting (57xx) on 14/06/13
+ {OV2680_8BIT, 0x0100, 0x00}, //stream off
+
+ {OV2680_TOK_TERM, 0, 0}
+};
#if 0 /* None of the definitions below are used currently */
- /*
- * 176x144 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_QCIF_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x24},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x05},
- {OV2680_8BIT, 0x3805, 0xaf},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0x47},
- {OV2680_8BIT, 0x3808, 0x00},
- {OV2680_8BIT, 0x3809, 0xC0},
- {OV2680_8BIT, 0x380a, 0x00},
- {OV2680_8BIT, 0x380b, 0xa0},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xb0},
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x04},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x04},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x4000, 0x81},
- {OV2680_8BIT, 0x4001, 0x40},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc2},
- {OV2680_8BIT, 0x3821, 0x01},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 352x288 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_CIF_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x24},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x03},
- {OV2680_8BIT, 0x3805, 0x8f},
- {OV2680_8BIT, 0x3806, 0x02},
- {OV2680_8BIT, 0x3807, 0xe7},
- {OV2680_8BIT, 0x3808, 0x01},
- {OV2680_8BIT, 0x3809, 0x70},
- {OV2680_8BIT, 0x380a, 0x01},
- {OV2680_8BIT, 0x380b, 0x30},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xb0},
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x04},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x04},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc2},
- {OV2680_8BIT, 0x3821, 0x01},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 336x256 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_QVGA_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x24},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x03},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x02},
- {OV2680_8BIT, 0x3807, 0x87},
- {OV2680_8BIT, 0x3808, 0x01},
- {OV2680_8BIT, 0x3809, 0x50},
- {OV2680_8BIT, 0x380a, 0x01},
- {OV2680_8BIT, 0x380b, 0x00},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xb0},
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x04},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x04},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc2},
- {OV2680_8BIT, 0x3821, 0x01},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 656x496 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_656x496_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x24},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x05},
- {OV2680_8BIT, 0x3805, 0xcf},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0x67},
- {OV2680_8BIT, 0x3808, 0x02},
- {OV2680_8BIT, 0x3809, 0x90},
- {OV2680_8BIT, 0x380a, 0x01},
- {OV2680_8BIT, 0x380b, 0xf0},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xb0},
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x04},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x04},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc2},
- {OV2680_8BIT, 0x3821, 0x01},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
- /*
- * 800x600 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_720x592_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x26},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0x00}, // X_ADDR_START;
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x00}, // Y_ADDR_START;
- {OV2680_8BIT, 0x3804, 0x05},
- {OV2680_8BIT, 0x3805, 0xaf}, // X_ADDR_END;
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0xaf}, // Y_ADDR_END;
- {OV2680_8BIT, 0x3808, 0x02},
- {OV2680_8BIT, 0x3809, 0xd0}, // X_OUTPUT_SIZE;
- {OV2680_8BIT, 0x380a, 0x02},
- {OV2680_8BIT, 0x380b, 0x50}, // Y_OUTPUT_SIZE;
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xac}, // HTS;
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84}, // VTS;
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x00},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x00},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5708, 0x00},
- {OV2680_8BIT, 0x5704, 0x02},
- {OV2680_8BIT, 0x5705, 0xd0}, // X_WIN;
- {OV2680_8BIT, 0x5706, 0x02},
- {OV2680_8BIT, 0x5707, 0x50}, // Y_WIN;
- {OV2680_8BIT, 0x3820, 0xc2}, // FLIP_FORMAT;
- {OV2680_8BIT, 0x3821, 0x01}, // MIRROR_FORMAT;
- {OV2680_8BIT, 0x5090, 0x00}, // PRE ISP CTRL16, default value is 0x0C;
- // BIT[3]: Mirror order, BG or GB;
- // BIT[2]: Flip order, BR or RB;
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_TOK_TERM, 0, 0}
- };
- /*
- * 800x600 30fps VBlanking 1lane 10Bit (binning)
- */
- static struct ov2680_reg const ov2680_800x600_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x01},
- {OV2680_8BIT, 0x3501, 0x26},
- {OV2680_8BIT, 0x3502, 0x40},
- {OV2680_8BIT, 0x370a, 0x23},
- {OV2680_8BIT, 0x3801, 0x00},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x00},
- {OV2680_8BIT, 0x3804, 0x06},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0xbf},
- {OV2680_8BIT, 0x3808, 0x03},
- {OV2680_8BIT, 0x3809, 0x20},
- {OV2680_8BIT, 0x380a, 0x02},
- {OV2680_8BIT, 0x380b, 0x58},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xac},
- {OV2680_8BIT, 0x380e, 0x02},
- {OV2680_8BIT, 0x380f, 0x84},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x00},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x00},
- {OV2680_8BIT, 0x3814, 0x31},
- {OV2680_8BIT, 0x3815, 0x31},
- {OV2680_8BIT, 0x5708, 0x00},
- {OV2680_8BIT, 0x5704, 0x03},
- {OV2680_8BIT, 0x5705, 0x20},
- {OV2680_8BIT, 0x5706, 0x02},
- {OV2680_8BIT, 0x5707, 0x58},
- {OV2680_8BIT, 0x3820, 0xc2},
- {OV2680_8BIT, 0x3821, 0x01},
- {OV2680_8BIT, 0x5090, 0x00},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x03},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 720p=1280*720 30fps VBlanking 1lane 10Bit (no-Scaling)
- */
- static struct ov2680_reg const ov2680_720p_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0xf2},
- {OV2680_8BIT, 0x3804, 0x05},
- {OV2680_8BIT, 0x3805, 0xbf},
- {OV2680_8BIT, 0x3806, 0x03},
- {OV2680_8BIT, 0x3807, 0xdd},
- {OV2680_8BIT, 0x3808, 0x05},
- {OV2680_8BIT, 0x3809, 0x10},
- {OV2680_8BIT, 0x380a, 0x02},
- {OV2680_8BIT, 0x380b, 0xe0},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x08},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x06},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x4008, 0x02},
- {OV2680_8BIT, 0x4009, 0x09},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 1296x976 30fps VBlanking 1lane 10Bit(no-scaling)
- */
- static struct ov2680_reg const ov2680_1296x976_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0xa0},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x05},
- {OV2680_8BIT, 0x3805, 0xbf},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0x57},
- {OV2680_8BIT, 0x3808, 0x05},
- {OV2680_8BIT, 0x3809, 0x10},
- {OV2680_8BIT, 0x380a, 0x03},
- {OV2680_8BIT, 0x380b, 0xd0},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x08},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x08},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x4008, 0x02},
- {OV2680_8BIT, 0x4009, 0x09},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00}, //miror/flip
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 1456*1096 30fps VBlanking 1lane 10bit(no-scaling)
- */
- static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0x90},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x78},
- {OV2680_8BIT, 0x3804, 0x06},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0xC0},
- {OV2680_8BIT, 0x3808, 0x05},
- {OV2680_8BIT, 0x3809, 0xb0},
- {OV2680_8BIT, 0x380a, 0x04},
- {OV2680_8BIT, 0x380b, 0x48},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x08},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x00},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x4008, 0x02},
- {OV2680_8BIT, 0x4009, 0x09},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x10},
- {OV2680_8BIT, 0x5705, 0xa0},
- {OV2680_8BIT, 0x5706, 0x0c},
- {OV2680_8BIT, 0x5707, 0x78},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00},
- // {OV2680_8BIT, 0x5090, 0x0c},
- {OV2680_TOK_TERM, 0, 0}
- };
+/*
+ * 176x144 30fps VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_QCIF_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x24},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x05},
+ {OV2680_8BIT, 0x3805, 0xaf},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0x47},
+ {OV2680_8BIT, 0x3808, 0x00},
+ {OV2680_8BIT, 0x3809, 0xC0},
+ {OV2680_8BIT, 0x380a, 0x00},
+ {OV2680_8BIT, 0x380b, 0xa0},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xb0},
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x04},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x04},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x4000, 0x81},
+ {OV2680_8BIT, 0x4001, 0x40},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc2},
+ {OV2680_8BIT, 0x3821, 0x01},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 352x288 30fps VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_CIF_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x24},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x03},
+ {OV2680_8BIT, 0x3805, 0x8f},
+ {OV2680_8BIT, 0x3806, 0x02},
+ {OV2680_8BIT, 0x3807, 0xe7},
+ {OV2680_8BIT, 0x3808, 0x01},
+ {OV2680_8BIT, 0x3809, 0x70},
+ {OV2680_8BIT, 0x380a, 0x01},
+ {OV2680_8BIT, 0x380b, 0x30},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xb0},
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x04},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x04},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc2},
+ {OV2680_8BIT, 0x3821, 0x01},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 336x256 30fps VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_QVGA_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x24},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x03},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x02},
+ {OV2680_8BIT, 0x3807, 0x87},
+ {OV2680_8BIT, 0x3808, 0x01},
+ {OV2680_8BIT, 0x3809, 0x50},
+ {OV2680_8BIT, 0x380a, 0x01},
+ {OV2680_8BIT, 0x380b, 0x00},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xb0},
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x04},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x04},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc2},
+ {OV2680_8BIT, 0x3821, 0x01},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 656x496 30fps VBlanking 1lane 10Bit (binning)
+ */
+static struct ov2680_reg const ov2680_656x496_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x24},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x05},
+ {OV2680_8BIT, 0x3805, 0xcf},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0x67},
+ {OV2680_8BIT, 0x3808, 0x02},
+ {OV2680_8BIT, 0x3809, 0x90},
+ {OV2680_8BIT, 0x380a, 0x01},
+ {OV2680_8BIT, 0x380b, 0xf0},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xb0},
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x04},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x04},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc2},
+ {OV2680_8BIT, 0x3821, 0x01},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+/*
+* 800x600 30fps VBlanking 1lane 10Bit (binning)
+*/
+static struct ov2680_reg const ov2680_720x592_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x26},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0x00}, // X_ADDR_START;
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x00}, // Y_ADDR_START;
+ {OV2680_8BIT, 0x3804, 0x05},
+ {OV2680_8BIT, 0x3805, 0xaf}, // X_ADDR_END;
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0xaf}, // Y_ADDR_END;
+ {OV2680_8BIT, 0x3808, 0x02},
+ {OV2680_8BIT, 0x3809, 0xd0}, // X_OUTPUT_SIZE;
+ {OV2680_8BIT, 0x380a, 0x02},
+ {OV2680_8BIT, 0x380b, 0x50}, // Y_OUTPUT_SIZE;
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xac}, // HTS;
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84}, // VTS;
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x00},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x00},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5708, 0x00},
+ {OV2680_8BIT, 0x5704, 0x02},
+ {OV2680_8BIT, 0x5705, 0xd0}, // X_WIN;
+ {OV2680_8BIT, 0x5706, 0x02},
+ {OV2680_8BIT, 0x5707, 0x50}, // Y_WIN;
+ {OV2680_8BIT, 0x3820, 0xc2}, // FLIP_FORMAT;
+ {OV2680_8BIT, 0x3821, 0x01}, // MIRROR_FORMAT;
+ {OV2680_8BIT, 0x5090, 0x00}, // PRE ISP CTRL16, default value is 0x0C;
+ // BIT[3]: Mirror order, BG or GB;
+ // BIT[2]: Flip order, BR or RB;
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_TOK_TERM, 0, 0}
+};
+/*
+* 800x600 30fps VBlanking 1lane 10Bit (binning)
+*/
+static struct ov2680_reg const ov2680_800x600_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x01},
+ {OV2680_8BIT, 0x3501, 0x26},
+ {OV2680_8BIT, 0x3502, 0x40},
+ {OV2680_8BIT, 0x370a, 0x23},
+ {OV2680_8BIT, 0x3801, 0x00},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x00},
+ {OV2680_8BIT, 0x3804, 0x06},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0xbf},
+ {OV2680_8BIT, 0x3808, 0x03},
+ {OV2680_8BIT, 0x3809, 0x20},
+ {OV2680_8BIT, 0x380a, 0x02},
+ {OV2680_8BIT, 0x380b, 0x58},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xac},
+ {OV2680_8BIT, 0x380e, 0x02},
+ {OV2680_8BIT, 0x380f, 0x84},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x00},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x00},
+ {OV2680_8BIT, 0x3814, 0x31},
+ {OV2680_8BIT, 0x3815, 0x31},
+ {OV2680_8BIT, 0x5708, 0x00},
+ {OV2680_8BIT, 0x5704, 0x03},
+ {OV2680_8BIT, 0x5705, 0x20},
+ {OV2680_8BIT, 0x5706, 0x02},
+ {OV2680_8BIT, 0x5707, 0x58},
+ {OV2680_8BIT, 0x3820, 0xc2},
+ {OV2680_8BIT, 0x3821, 0x01},
+ {OV2680_8BIT, 0x5090, 0x00},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x03},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 720p=1280*720 30fps VBlanking 1lane 10Bit (no-Scaling)
+ */
+static struct ov2680_reg const ov2680_720p_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0xf2},
+ {OV2680_8BIT, 0x3804, 0x05},
+ {OV2680_8BIT, 0x3805, 0xbf},
+ {OV2680_8BIT, 0x3806, 0x03},
+ {OV2680_8BIT, 0x3807, 0xdd},
+ {OV2680_8BIT, 0x3808, 0x05},
+ {OV2680_8BIT, 0x3809, 0x10},
+ {OV2680_8BIT, 0x380a, 0x02},
+ {OV2680_8BIT, 0x380b, 0xe0},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x08},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x06},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x4008, 0x02},
+ {OV2680_8BIT, 0x4009, 0x09},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 1296x976 30fps VBlanking 1lane 10Bit(no-scaling)
+ */
+static struct ov2680_reg const ov2680_1296x976_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0xa0},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x05},
+ {OV2680_8BIT, 0x3805, 0xbf},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0x57},
+ {OV2680_8BIT, 0x3808, 0x05},
+ {OV2680_8BIT, 0x3809, 0x10},
+ {OV2680_8BIT, 0x380a, 0x03},
+ {OV2680_8BIT, 0x380b, 0xd0},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x08},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x08},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x4008, 0x02},
+ {OV2680_8BIT, 0x4009, 0x09},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00}, //miror/flip
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 1456*1096 30fps VBlanking 1lane 10bit(no-scaling)
+*/
+static struct ov2680_reg const ov2680_1456x1096_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0x90},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x78},
+ {OV2680_8BIT, 0x3804, 0x06},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0xC0},
+ {OV2680_8BIT, 0x3808, 0x05},
+ {OV2680_8BIT, 0x3809, 0xb0},
+ {OV2680_8BIT, 0x380a, 0x04},
+ {OV2680_8BIT, 0x380b, 0x48},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x08},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x00},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x4008, 0x02},
+ {OV2680_8BIT, 0x4009, 0x09},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x00}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x10},
+ {OV2680_8BIT, 0x5705, 0xa0},
+ {OV2680_8BIT, 0x5706, 0x0c},
+ {OV2680_8BIT, 0x5707, 0x78},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00},
+ // {OV2680_8BIT, 0x5090, 0x0c},
+ {OV2680_TOK_TERM, 0, 0}
+};
#endif
- /*
- *1616x916 30fps VBlanking 1lane 10bit
- */
-
- static struct ov2680_reg const ov2680_1616x916_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0x00},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x96},
- {OV2680_8BIT, 0x3804, 0x06},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0x39},
- {OV2680_8BIT, 0x3808, 0x06},
- {OV2680_8BIT, 0x3809, 0x50},
- {OV2680_8BIT, 0x380a, 0x03},
- {OV2680_8BIT, 0x380b, 0x94},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x00},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x08},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x4008, 0x02},
- {OV2680_8BIT, 0x4009, 0x09},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x06},
- {OV2680_8BIT, 0x5705, 0x50},
- {OV2680_8BIT, 0x5706, 0x03},
- {OV2680_8BIT, 0x5707, 0x94},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00},
- // {OV2680_8BIT, 0x5090, 0x0C},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- /*
- * 1612x1212 30fps VBlanking 1lane 10Bit
- */
+/*
+ *1616x916 30fps VBlanking 1lane 10bit
+ */
+
+static struct ov2680_reg const ov2680_1616x916_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0x00},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x96},
+ {OV2680_8BIT, 0x3804, 0x06},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0x39},
+ {OV2680_8BIT, 0x3808, 0x06},
+ {OV2680_8BIT, 0x3809, 0x50},
+ {OV2680_8BIT, 0x380a, 0x03},
+ {OV2680_8BIT, 0x380b, 0x94},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x00},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x08},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x4008, 0x02},
+ {OV2680_8BIT, 0x4009, 0x09},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x06},
+ {OV2680_8BIT, 0x5705, 0x50},
+ {OV2680_8BIT, 0x5706, 0x03},
+ {OV2680_8BIT, 0x5707, 0x94},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00},
+ // {OV2680_8BIT, 0x5090, 0x0C},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+/*
+ * 1612x1212 30fps VBlanking 1lane 10Bit
+ */
#if 0
- static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0x00},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x86},
- {OV2680_8BIT, 0x3804, 0x06},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0xbf},
- {OV2680_8BIT, 0x3808, 0x06},
- {OV2680_8BIT, 0x3809, 0x50},
- {OV2680_8BIT, 0x380a, 0x04},
- {OV2680_8BIT, 0x380b, 0x3a},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x00},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x00},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x06},
- {OV2680_8BIT, 0x5705, 0x50},
- {OV2680_8BIT, 0x5706, 0x04},
- {OV2680_8BIT, 0x5707, 0x3a},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00},
- // {OV2680_8BIT, 0x5090, 0x0C},
- {OV2680_8BIT, 0x4008, 0x02},
- {OV2680_8BIT, 0x4009, 0x09},
- {OV2680_8BIT, 0x5081, 0x41},
- {OV2680_TOK_TERM, 0, 0}
- };
+static struct ov2680_reg const ov2680_1616x1082_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0x00},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x86},
+ {OV2680_8BIT, 0x3804, 0x06},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0xbf},
+ {OV2680_8BIT, 0x3808, 0x06},
+ {OV2680_8BIT, 0x3809, 0x50},
+ {OV2680_8BIT, 0x380a, 0x04},
+ {OV2680_8BIT, 0x380b, 0x3a},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x00},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x00},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x06},
+ {OV2680_8BIT, 0x5705, 0x50},
+ {OV2680_8BIT, 0x5706, 0x04},
+ {OV2680_8BIT, 0x5707, 0x3a},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00},
+ // {OV2680_8BIT, 0x5090, 0x0C},
+ {OV2680_8BIT, 0x4008, 0x02},
+ {OV2680_8BIT, 0x4009, 0x09},
+ {OV2680_8BIT, 0x5081, 0x41},
+ {OV2680_TOK_TERM, 0, 0}
+};
#endif
- /*
- * 1616x1216 30fps VBlanking 1lane 10Bit
- */
- static struct ov2680_reg const ov2680_1616x1216_30fps[] = {
- {OV2680_8BIT, 0x3086, 0x00},
- {OV2680_8BIT, 0x3501, 0x48},
- {OV2680_8BIT, 0x3502, 0xe0},
- {OV2680_8BIT, 0x370a, 0x21},
- {OV2680_8BIT, 0x3801, 0x00},
- {OV2680_8BIT, 0x3802, 0x00},
- {OV2680_8BIT, 0x3803, 0x00},
- {OV2680_8BIT, 0x3804, 0x06},
- {OV2680_8BIT, 0x3805, 0x4f},
- {OV2680_8BIT, 0x3806, 0x04},
- {OV2680_8BIT, 0x3807, 0xbf},
- {OV2680_8BIT, 0x3808, 0x06},
- {OV2680_8BIT, 0x3809, 0x50},//50},//4line for mirror and flip
- {OV2680_8BIT, 0x380a, 0x04},
- {OV2680_8BIT, 0x380b, 0xc0},//c0},
- {OV2680_8BIT, 0x380c, 0x06},
- {OV2680_8BIT, 0x380d, 0xa8},
- {OV2680_8BIT, 0x380e, 0x05},
- {OV2680_8BIT, 0x380f, 0x0e},
- {OV2680_8BIT, 0x3810, 0x00},
- {OV2680_8BIT, 0x3811, 0x00},
- {OV2680_8BIT, 0x3812, 0x00},
- {OV2680_8BIT, 0x3813, 0x00},
- {OV2680_8BIT, 0x3814, 0x11},
- {OV2680_8BIT, 0x3815, 0x11},
- {OV2680_8BIT, 0x4008, 0x00},
- {OV2680_8BIT, 0x4009, 0x0b},
- {OV2680_8BIT, 0x5081, 0x01},
- {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
- {OV2680_8BIT, 0x5704, 0x06},
- {OV2680_8BIT, 0x5705, 0x50},
- {OV2680_8BIT, 0x5706, 0x04},
- {OV2680_8BIT, 0x5707, 0xcc},
- {OV2680_8BIT, 0x3820, 0xc0},
- {OV2680_8BIT, 0x3821, 0x00},
- // {OV2680_8BIT, 0x5090, 0x0C},
- {OV2680_TOK_TERM, 0, 0}
- };
-
- static struct ov2680_resolution ov2680_res_preview[] = {
+/*
+ * 1616x1216 30fps VBlanking 1lane 10Bit
+ */
+static struct ov2680_reg const ov2680_1616x1216_30fps[] = {
+ {OV2680_8BIT, 0x3086, 0x00},
+ {OV2680_8BIT, 0x3501, 0x48},
+ {OV2680_8BIT, 0x3502, 0xe0},
+ {OV2680_8BIT, 0x370a, 0x21},
+ {OV2680_8BIT, 0x3801, 0x00},
+ {OV2680_8BIT, 0x3802, 0x00},
+ {OV2680_8BIT, 0x3803, 0x00},
+ {OV2680_8BIT, 0x3804, 0x06},
+ {OV2680_8BIT, 0x3805, 0x4f},
+ {OV2680_8BIT, 0x3806, 0x04},
+ {OV2680_8BIT, 0x3807, 0xbf},
+ {OV2680_8BIT, 0x3808, 0x06},
+ {OV2680_8BIT, 0x3809, 0x50},//50},//4line for mirror and flip
+ {OV2680_8BIT, 0x380a, 0x04},
+ {OV2680_8BIT, 0x380b, 0xc0},//c0},
+ {OV2680_8BIT, 0x380c, 0x06},
+ {OV2680_8BIT, 0x380d, 0xa8},
+ {OV2680_8BIT, 0x380e, 0x05},
+ {OV2680_8BIT, 0x380f, 0x0e},
+ {OV2680_8BIT, 0x3810, 0x00},
+ {OV2680_8BIT, 0x3811, 0x00},
+ {OV2680_8BIT, 0x3812, 0x00},
+ {OV2680_8BIT, 0x3813, 0x00},
+ {OV2680_8BIT, 0x3814, 0x11},
+ {OV2680_8BIT, 0x3815, 0x11},
+ {OV2680_8BIT, 0x4008, 0x00},
+ {OV2680_8BIT, 0x4009, 0x0b},
+ {OV2680_8BIT, 0x5081, 0x01},
+ {OV2680_8BIT, 0x5708, 0x01}, //add for full size flip off and mirror off 2014/09/11
+ {OV2680_8BIT, 0x5704, 0x06},
+ {OV2680_8BIT, 0x5705, 0x50},
+ {OV2680_8BIT, 0x5706, 0x04},
+ {OV2680_8BIT, 0x5707, 0xcc},
+ {OV2680_8BIT, 0x3820, 0xc0},
+ {OV2680_8BIT, 0x3821, 0x00},
+ // {OV2680_8BIT, 0x5090, 0x0C},
+ {OV2680_TOK_TERM, 0, 0}
+};
+
+static struct ov2680_resolution ov2680_res_preview[] = {
{
.desc = "ov2680_1616x1216_30fps",
.width = 1616,
*/
static uint up_delay = 30;
module_param(up_delay, uint, 0644);
-MODULE_PARM_DESC(up_delay, "Delay prior to the first CCI transaction for ov5693");
+MODULE_PARM_DESC(up_delay,
+ "Delay prior to the first CCI transaction for ov5693");
static int vcm_ad_i2c_wr8(struct i2c_client *client, u8 reg, u8 val)
{
}
if (data_length != OV5693_8BIT && data_length != OV5693_16BIT
- && data_length != OV5693_32BIT) {
+ && data_length != OV5693_32BIT) {
dev_err(&client->dev, "%s error, invalid data length\n",
__func__);
return -EINVAL;
}
static int ov5693_write_reg(struct i2c_client *client, u16 data_length,
- u16 reg, u16 val)
+ u16 reg, u16 val)
{
int ret;
unsigned char data[4] = {0};
}
static int __ov5693_write_reg_is_consecutive(struct i2c_client *client,
- struct ov5693_write_ctrl *ctrl,
- const struct ov5693_reg *next)
+ struct ov5693_write_ctrl *ctrl,
+ const struct ov5693_reg *next)
{
if (ctrl->index == 0)
return 1;
* flushed before proceed.
*/
if (!__ov5693_write_reg_is_consecutive(client, &ctrl,
- next)) {
+ next)) {
err = __ov5693_flush_reg_array(client, &ctrl);
if (err)
return err;
static int ov5693_g_fnumber_range(struct v4l2_subdev *sd, s32 *val)
{
*val = (OV5693_F_NUMBER_DEFAULT_NUM << 24) |
- (OV5693_F_NUMBER_DEM << 16) |
- (OV5693_F_NUMBER_DEFAULT_NUM << 8) | OV5693_F_NUMBER_DEM;
+ (OV5693_F_NUMBER_DEM << 16) |
+ (OV5693_F_NUMBER_DEFAULT_NUM << 8) | OV5693_F_NUMBER_DEM;
return 0;
}
}
static int ov5693_get_intg_factor(struct i2c_client *client,
- struct camera_mipi_info *info,
- const struct ov5693_resolution *res)
+ struct camera_mipi_info *info,
+ const struct ov5693_resolution *res)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
struct ov5693_device *dev = to_ov5693_sensor(sd);
/* get integration time */
buf->coarse_integration_time_min = OV5693_COARSE_INTG_TIME_MIN;
buf->coarse_integration_time_max_margin =
- OV5693_COARSE_INTG_TIME_MAX_MARGIN;
+ OV5693_COARSE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_min = OV5693_FINE_INTG_TIME_MIN;
buf->fine_integration_time_max_margin =
- OV5693_FINE_INTG_TIME_MAX_MARGIN;
+ OV5693_FINE_INTG_TIME_MAX_MARGIN;
buf->fine_integration_time_def = OV5693_FINE_INTG_TIME_MIN;
buf->frame_length_lines = res->lines_per_frame;
/* get the cropping and output resolution to ISP for this mode. */
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_HORIZONTAL_START_H, ®_val);
+ OV5693_HORIZONTAL_START_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_start = reg_val;
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_VERTICAL_START_H, ®_val);
+ OV5693_VERTICAL_START_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_start = reg_val;
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_HORIZONTAL_END_H, ®_val);
+ OV5693_HORIZONTAL_END_H, ®_val);
if (ret)
return ret;
buf->crop_horizontal_end = reg_val;
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_VERTICAL_END_H, ®_val);
+ OV5693_VERTICAL_END_H, ®_val);
if (ret)
return ret;
buf->crop_vertical_end = reg_val;
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_HORIZONTAL_OUTPUT_SIZE_H, ®_val);
+ OV5693_HORIZONTAL_OUTPUT_SIZE_H, ®_val);
if (ret)
return ret;
buf->output_width = reg_val;
ret = ov5693_read_reg(client, OV5693_16BIT,
- OV5693_VERTICAL_OUTPUT_SIZE_H, ®_val);
+ OV5693_VERTICAL_OUTPUT_SIZE_H, ®_val);
if (ret)
return ret;
buf->output_height = reg_val;
buf->binning_factor_x = res->bin_factor_x ?
- res->bin_factor_x : 1;
+ res->bin_factor_x : 1;
buf->binning_factor_y = res->bin_factor_y ?
- res->bin_factor_y : 1;
+ res->bin_factor_y : 1;
return 0;
}
static long __ov5693_set_exposure(struct v4l2_subdev *sd, int coarse_itg,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct i2c_client *client = v4l2_get_subdevdata(sd);
}
/* group hold */
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_GROUP_ACCESS, 0x00);
+ OV5693_GROUP_ACCESS, 0x00);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_GROUP_ACCESS);
}
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_TIMING_HTS_H, (hts >> 8) & 0xFF);
+ OV5693_TIMING_HTS_H, (hts >> 8) & 0xFF);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_TIMING_HTS_H);
}
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_TIMING_HTS_L, hts & 0xFF);
+ OV5693_TIMING_HTS_L, hts & 0xFF);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_TIMING_HTS_L);
vts = (u16)coarse_itg + OV5693_INTEGRATION_TIME_MARGIN;
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_TIMING_VTS_H, (vts >> 8) & 0xFF);
+ OV5693_TIMING_VTS_H, (vts >> 8) & 0xFF);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_TIMING_VTS_H);
}
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_TIMING_VTS_L, vts & 0xFF);
+ OV5693_TIMING_VTS_L, vts & 0xFF);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_TIMING_VTS_L);
/* Analog gain */
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_AGC_L, gain & 0xff);
+ OV5693_AGC_L, gain & 0xff);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_AGC_L);
}
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_AGC_H, (gain >> 8) & 0xff);
+ OV5693_AGC_H, (gain >> 8) & 0xff);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_AGC_H);
/* Digital gain */
if (digitgain) {
ret = ov5693_write_reg(client, OV5693_16BIT,
- OV5693_MWB_RED_GAIN_H, digitgain);
+ OV5693_MWB_RED_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_MWB_RED_GAIN_H);
}
ret = ov5693_write_reg(client, OV5693_16BIT,
- OV5693_MWB_GREEN_GAIN_H, digitgain);
+ OV5693_MWB_GREEN_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_MWB_RED_GAIN_H);
}
ret = ov5693_write_reg(client, OV5693_16BIT,
- OV5693_MWB_BLUE_GAIN_H, digitgain);
+ OV5693_MWB_BLUE_GAIN_H, digitgain);
if (ret) {
dev_err(&client->dev, "%s: write %x error, aborted\n",
__func__, OV5693_MWB_RED_GAIN_H);
/* End group */
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_GROUP_ACCESS, 0x10);
+ OV5693_GROUP_ACCESS, 0x10);
if (ret)
return ret;
/* Delay launch group */
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_GROUP_ACCESS, 0xa0);
+ OV5693_GROUP_ACCESS, 0xa0);
if (ret)
return ret;
return ret;
}
static int ov5693_set_exposure(struct v4l2_subdev *sd, int exposure,
- int gain, int digitgain)
+ int gain, int digitgain)
{
struct ov5693_device *dev = to_ov5693_sensor(sd);
int ret;
}
static long ov5693_s_exposure(struct v4l2_subdev *sd,
- struct atomisp_exposure *exposure)
+ struct atomisp_exposure *exposure)
{
u16 coarse_itg = exposure->integration_time[0];
u16 analog_gain = exposure->gain[0];
for (index = 0; index <= size; index++) {
pVal = (u16 *)(buf + index);
ret =
- ov5693_read_reg(client, OV5693_8BIT, addr + index,
+ ov5693_read_reg(client, OV5693_8BIT, addr + index,
pVal);
if (ret)
return ret;
dev->otp_size = 0;
for (i = 1; i < OV5693_OTP_BANK_MAX; i++) {
/*set bank NO and OTP read mode. */
- ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_BANK_REG, (i | 0xc0)); //[7:6] 2'b11 [5:0] bank no
+ ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_BANK_REG,
+ (i | 0xc0)); //[7:6] 2'b11 [5:0] bank no
if (ret) {
dev_err(&client->dev, "failed to prepare OTP page\n");
return ret;
//pr_debug("write 0x%x->0x%x\n",OV5693_OTP_BANK_REG,(i|0xc0));
/*enable read */
- ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_READ_REG, OV5693_OTP_MODE_READ); // enable :1
+ ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_OTP_READ_REG,
+ OV5693_OTP_MODE_READ); // enable :1
if (ret) {
dev_err(&client->dev,
"failed to set OTP reading mode page");
b = buf;
continue;
}
- } else if (i == 24) { //if the first 320bytes data doesn't not exist, try to read the next 32bytes data.
+ } else if (i ==
+ 24) { //if the first 320bytes data doesn't not exist, try to read the next 32bytes data.
if ((*b) == 0) {
dev->otp_size = 32;
break;
b = buf;
continue;
}
- } else if (i == 27) { //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
+ } else if (i ==
+ 27) { //if the prvious 32bytes data doesn't exist, try to read the next 32bytes data again.
if ((*b) == 0) {
dev->otp_size = 32;
break;
/* get exposure */
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_EXPOSURE_L,
- ®_v);
+ OV5693_EXPOSURE_L,
+ ®_v);
if (ret)
goto err;
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_EXPOSURE_M,
- ®_v2);
+ OV5693_EXPOSURE_M,
+ ®_v2);
if (ret)
goto err;
reg_v += reg_v2 << 8;
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_EXPOSURE_H,
- ®_v2);
+ OV5693_EXPOSURE_H,
+ ®_v2);
if (ret)
goto err;
/* set reg VCM_CODE_MSB Bit[1:0] */
vcm_code = (vcm_code & VCM_CODE_MSB_MASK) |
- ((val >> 8) & ~VCM_CODE_MSB_MASK);
+ ((val >> 8) & ~VCM_CODE_MSB_MASK);
ret = ad5823_i2c_write(client, AD5823_REG_VCM_CODE_MSB, vcm_code);
if (ret)
return ret;
/* set required vcm move time */
vcm_code = AD5823_RESONANCE_PERIOD / AD5823_RESONANCE_COEF
- - AD5823_HIGH_FREQ_RANGE;
+ - AD5823_HIGH_FREQ_RANGE;
ret = ad5823_i2c_write(client, AD5823_REG_VCM_MOVE_TIME, vcm_code);
return ret;
struct ov5693_device *dev = to_ov5693_sensor(sd);
ktime_t temptime;
ktime_t timedelay = ns_to_ktime(min_t(u32,
- abs(dev->number_of_steps) * DELAY_PER_STEP_NS,
- DELAY_MAX_PER_STEP_NS));
+ abs(dev->number_of_steps) * DELAY_PER_STEP_NS,
+ DELAY_MAX_PER_STEP_NS));
temptime = ktime_sub(ktime_get(), (dev->timestamp_t_focus_abs));
if (ktime_compare(temptime, timedelay) <= 0) {
static const struct v4l2_ctrl_config ov5693_controls[] = {
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_EXPOSURE_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "exposure",
- .min = 0x0,
- .max = 0xffff,
- .step = 0x01,
- .def = 0x00,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_EXPOSURE_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "exposure",
+ .min = 0x0,
+ .max = 0xffff,
+ .step = 0x01,
+ .def = 0x00,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCAL_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focal length",
- .min = OV5693_FOCAL_LENGTH_DEFAULT,
- .max = OV5693_FOCAL_LENGTH_DEFAULT,
- .step = 0x01,
- .def = OV5693_FOCAL_LENGTH_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCAL_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focal length",
+ .min = OV5693_FOCAL_LENGTH_DEFAULT,
+ .max = OV5693_FOCAL_LENGTH_DEFAULT,
+ .step = 0x01,
+ .def = OV5693_FOCAL_LENGTH_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number",
- .min = OV5693_F_NUMBER_DEFAULT,
- .max = OV5693_F_NUMBER_DEFAULT,
- .step = 0x01,
- .def = OV5693_F_NUMBER_DEFAULT,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number",
+ .min = OV5693_F_NUMBER_DEFAULT,
+ .max = OV5693_F_NUMBER_DEFAULT,
+ .step = 0x01,
+ .def = OV5693_F_NUMBER_DEFAULT,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FNUMBER_RANGE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "f-number range",
- .min = OV5693_F_NUMBER_RANGE,
- .max = OV5693_F_NUMBER_RANGE,
- .step = 0x01,
- .def = OV5693_F_NUMBER_RANGE,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FNUMBER_RANGE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "f-number range",
+ .min = OV5693_F_NUMBER_RANGE,
+ .max = OV5693_F_NUMBER_RANGE,
+ .step = 0x01,
+ .def = OV5693_F_NUMBER_RANGE,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCUS_ABSOLUTE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focus move absolute",
- .min = 0,
- .max = OV5693_VCM_MAX_FOCUS_POS,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCUS_ABSOLUTE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focus move absolute",
+ .min = 0,
+ .max = OV5693_VCM_MAX_FOCUS_POS,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCUS_RELATIVE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focus move relative",
- .min = OV5693_VCM_MAX_FOCUS_NEG,
- .max = OV5693_VCM_MAX_FOCUS_POS,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCUS_RELATIVE,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focus move relative",
+ .min = OV5693_VCM_MAX_FOCUS_NEG,
+ .max = OV5693_VCM_MAX_FOCUS_POS,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_FOCUS_STATUS,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "focus status",
- .min = 0,
- .max = 100, /* allow enum to grow in the future */
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_FOCUS_STATUS,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "focus status",
+ .min = 0,
+ .max = 100, /* allow enum to grow in the future */
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_VCM_SLEW,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "vcm slew",
- .min = 0,
- .max = OV5693_VCM_SLEW_STEP_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_VCM_SLEW,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "vcm slew",
+ .min = 0,
+ .max = OV5693_VCM_SLEW_STEP_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_VCM_TIMEING,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "vcm step time",
- .min = 0,
- .max = OV5693_VCM_SLEW_TIME_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_VCM_TIMEING,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "vcm step time",
+ .min = 0,
+ .max = OV5693_VCM_SLEW_TIME_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_HORZ,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "horizontal binning factor",
- .min = 0,
- .max = OV5693_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_HORZ,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "horizontal binning factor",
+ .min = 0,
+ .max = OV5693_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
{
- .ops = &ctrl_ops,
- .id = V4L2_CID_BIN_FACTOR_VERT,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "vertical binning factor",
- .min = 0,
- .max = OV5693_BIN_FACTOR_MAX,
- .step = 1,
- .def = 0,
- .flags = 0,
- },
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_BIN_FACTOR_VERT,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "vertical binning factor",
+ .min = 0,
+ .max = OV5693_BIN_FACTOR_MAX,
+ .step = 1,
+ .def = 0,
+ .flags = 0,
+ },
};
static int ov5693_init(struct v4l2_subdev *sd)
dev_err(&client->dev,
"vcm enable ringing failed\n");
ret = ad5823_i2c_write(client, AD5823_REG_MODE,
- AD5823_ARC_RES1);
+ AD5823_ARC_RES1);
if (ret)
dev_err(&client->dev,
"vcm change mode failed\n");
int ret = 0;
ret = ov5693_write_reg(client, OV5693_8BIT,
- OV5693_SW_RESET, 0x01);
+ OV5693_SW_RESET, 0x01);
if (ret) {
dev_err(&client->dev, "ov5693 reset err.\n");
return ret;
* data yet. So add stop streaming here.
*/
ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_SW_STREAM,
- OV5693_STOP_STREAMING);
+ OV5693_STOP_STREAMING);
if (ret)
dev_warn(&client->dev, "ov5693 stream off err\n");
ret = ov5693_get_intg_factor(client, ov5693_info,
- &ov5693_res[dev->fmt_idx]);
+ &ov5693_res[dev->fmt_idx]);
if (ret) {
dev_err(&client->dev, "failed to get integration_factor\n");
goto err;
return -ENODEV;
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_SC_CMMN_CHIP_ID_H, &high);
+ OV5693_SC_CMMN_CHIP_ID_H, &high);
if (ret) {
dev_err(&client->dev, "sensor_id_high = 0x%x\n", high);
return -ENODEV;
}
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_SC_CMMN_CHIP_ID_L, &low);
+ OV5693_SC_CMMN_CHIP_ID_L, &low);
id = ((((u16)high) << 8) | (u16)low);
if (id != OV5693_ID) {
}
ret = ov5693_read_reg(client, OV5693_8BIT,
- OV5693_SC_CMMN_SUB_ID, &high);
+ OV5693_SC_CMMN_SUB_ID, &high);
revision = (u8)high & 0x0f;
dev_dbg(&client->dev, "sensor_revision = 0x%x\n", revision);
mutex_lock(&dev->input_lock);
ret = ov5693_write_reg(client, OV5693_8BIT, OV5693_SW_STREAM,
- enable ? OV5693_START_STREAMING :
- OV5693_STOP_STREAMING);
+ enable ? OV5693_START_STREAMING :
+ OV5693_STOP_STREAMING);
mutex_unlock(&dev->input_lock);
return -ENODEV;
dev->platform_data =
- (struct camera_sensor_platform_data *)platform_data;
+ (struct camera_sensor_platform_data *)platform_data;
mutex_lock(&dev->input_lock);
/* power off the module, then power on it in future
i2c = gmin_get_var_int(&client->dev, "I2CAddr", -1);
if (i2c != -1) {
dev_info(&client->dev,
- "Overriding firmware-provided I2C address (0x%x) with 0x%x\n",
+ "Overriding firmware-provided I2C address (0x%x) with 0x%x\n",
client->addr, i2c);
client->addr = i2c;
}
* This specifies the region
*/
struct atomisp_zoom_region {
- struct atomisp_zoom_point origin; /* Starting point coordinates for the region */
+ struct atomisp_zoom_point
+ origin; /* Starting point coordinates for the region */
struct atomisp_resolution resolution; /* Region resolution */
};
struct camera_sensor_platform_data *plat_data,
enum intel_v4l2_subdev_type type);
struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter,
- struct i2c_board_info *board_info);
+ struct i2c_board_info *board_info);
int atomisp_gmin_remove_subdev(struct v4l2_subdev *sd);
int gmin_get_var_int(struct device *dev, const char *var, int def);
int camera_sensor_csi(struct v4l2_subdev *sd, u32 port,
u32 lanes, u32 format, u32 bayer_order, int flag);
struct camera_sensor_platform_data *gmin_camera_platform_data(
- struct v4l2_subdev *subdev,
- enum atomisp_input_format csi_format,
- enum atomisp_bayer_order csi_bayer);
+ struct v4l2_subdev *subdev,
+ enum atomisp_input_format csi_format,
+ enum atomisp_bayer_order csi_bayer);
int atomisp_gmin_register_vcm_control(struct camera_vcm_control *);
struct camera_vcm_ops {
int (*power_up)(struct v4l2_subdev *sd, struct camera_vcm_control *vcm);
int (*power_down)(struct v4l2_subdev *sd,
- struct camera_vcm_control *vcm);
+ struct camera_vcm_control *vcm);
int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc,
- struct camera_vcm_control *vcm);
+ struct camera_vcm_control *vcm);
int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl,
- struct camera_vcm_control *vcm);
+ struct camera_vcm_control *vcm);
int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl,
- struct camera_vcm_control *vcm);
+ struct camera_vcm_control *vcm);
};
struct camera_vcm_control {
int (*v1p8_ctrl)(struct v4l2_subdev *subdev, int on);
int (*v2p8_ctrl)(struct v4l2_subdev *subdev, int on);
int (*v1p2_ctrl)(struct v4l2_subdev *subdev, int on);
- struct camera_vcm_control * (*get_vcm_ctrl)(struct v4l2_subdev *subdev,
- char *module_id);
+ struct camera_vcm_control *(*get_vcm_ctrl)(struct v4l2_subdev *subdev,
+ char *module_id);
};
struct camera_mipi_info {
struct firmware;
int load_msr_list(struct i2c_client *client, char *path,
- const struct firmware **fw);
+ const struct firmware **fw);
int apply_msr_data(struct i2c_client *client, const struct firmware *fw);
void release_msr_list(struct i2c_client *client,
- const struct firmware *fw);
+ const struct firmware *fw);
#endif /* ifndef __LIBMSRLISTHELPER_H__ */
struct atomisp_acc_fw *acc_fw;
list_for_each_entry(acc_fw, &asd->acc.fw, list)
- if (acc_fw->handle == handle)
- return acc_fw;
+ if (acc_fw->handle == handle)
+ return acc_fw;
return NULL;
}
struct atomisp_acc_fw_load_to_pipe *user_fw)
{
static const unsigned int pipeline_flags =
- ATOMISP_ACC_FW_LOAD_FL_PREVIEW | ATOMISP_ACC_FW_LOAD_FL_COPY |
- ATOMISP_ACC_FW_LOAD_FL_VIDEO |
- ATOMISP_ACC_FW_LOAD_FL_CAPTURE | ATOMISP_ACC_FW_LOAD_FL_ACC;
+ ATOMISP_ACC_FW_LOAD_FL_PREVIEW | ATOMISP_ACC_FW_LOAD_FL_COPY |
+ ATOMISP_ACC_FW_LOAD_FL_VIDEO |
+ ATOMISP_ACC_FW_LOAD_FL_CAPTURE | ATOMISP_ACC_FW_LOAD_FL_ACC;
struct atomisp_acc_fw *acc_fw;
int handle;
if (acc_fw->fw->type == ia_css_isp_firmware) {
static const int type_to_css[] = {
[ATOMISP_ACC_FW_LOAD_TYPE_OUTPUT] =
- IA_CSS_ACC_OUTPUT,
+ IA_CSS_ACC_OUTPUT,
[ATOMISP_ACC_FW_LOAD_TYPE_VIEWFINDER] =
- IA_CSS_ACC_VIEWFINDER,
+ IA_CSS_ACC_VIEWFINDER,
[ATOMISP_ACC_FW_LOAD_TYPE_STANDALONE] =
- IA_CSS_ACC_STANDALONE,
+ IA_CSS_ACC_STANDALONE,
};
acc_fw->fw->info.isp.type = type_to_css[acc_fw->type];
}
return 0;
}
-int atomisp_acc_unmap(struct atomisp_sub_device *asd, struct atomisp_acc_map *map)
+int atomisp_acc_unmap(struct atomisp_sub_device *asd,
+ struct atomisp_acc_map *map)
{
struct atomisp_map *atomisp_map;
if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
ret = atomisp_css_load_acc_extension(asd,
- acc_fw->fw,
- acc_flag_to_pipe[i].pipe_id,
- acc_fw->type);
+ acc_fw->fw,
+ acc_flag_to_pipe[i].pipe_id,
+ acc_fw->type);
if (ret)
goto error;
while (--i >= 0) {
if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
atomisp_css_unload_acc_extension(asd, acc_fw->fw,
- acc_flag_to_pipe[i].pipe_id);
+ acc_flag_to_pipe[i].pipe_id);
}
}
continue;
if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
atomisp_css_unload_acc_extension(asd,
- acc_fw->fw,
- acc_flag_to_pipe[i].pipe_id);
+ acc_fw->fw,
+ acc_flag_to_pipe[i].pipe_id);
}
}
}
for (i = ARRAY_SIZE(acc_flag_to_pipe) - 1; i >= 0; i--) {
if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
atomisp_css_unload_acc_extension(asd,
- acc_fw->fw,
- acc_flag_to_pipe[i].pipe_id);
+ acc_fw->fw,
+ acc_flag_to_pipe[i].pipe_id);
}
}
}
for (i = 0; i < ARRAY_SIZE(acc_flag_to_pipe); i++) {
if (acc_fw->flags & acc_flag_to_pipe[i].flag) {
pipe = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- pipes[acc_flag_to_pipe[i].pipe_id];
+ pipes[acc_flag_to_pipe[i].pipe_id];
r = ia_css_pipe_set_qos_ext_state(pipe, acc_fw->handle,
enable);
if (r != IA_CSS_SUCCESS)
struct atomisp_video_pipe *atomisp_to_video_pipe(struct video_device *dev)
{
return (struct atomisp_video_pipe *)
- container_of(dev, struct atomisp_video_pipe, vdev);
+ container_of(dev, struct atomisp_video_pipe, vdev);
}
/*
struct atomisp_acc_pipe *atomisp_to_acc_pipe(struct video_device *dev)
{
return (struct atomisp_acc_pipe *)
- container_of(dev, struct atomisp_acc_pipe, vdev);
+ container_of(dev, struct atomisp_acc_pipe, vdev);
}
static unsigned short atomisp_get_sensor_fps(struct atomisp_sub_device *asd)
if (isp_sspm1 & ISP_FREQ_VALID_MASK) {
dev_dbg(isp->dev, "clearing ISPSSPM1 valid bit.\n");
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, ISPSSPM1,
- isp_sspm1 & ~(1 << ISP_FREQ_VALID_OFFSET));
+ isp_sspm1 & ~(1 << ISP_FREQ_VALID_OFFSET));
}
ratio = (2 * isp->hpll_freq + new_freq / 2) / new_freq - 1;
for (i = 0; i < ISP_DFS_TRY_TIMES; i++) {
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, ISPSSPM1,
- isp_sspm1
- | ratio << ISP_REQ_FREQ_OFFSET
- | 1 << ISP_FREQ_VALID_OFFSET
- | guar_ratio << ISP_REQ_GUAR_FREQ_OFFSET);
+ isp_sspm1
+ | ratio << ISP_REQ_FREQ_OFFSET
+ | 1 << ISP_FREQ_VALID_OFFSET
+ | guar_ratio << ISP_REQ_GUAR_FREQ_OFFSET);
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, ISPSSPM1, &isp_sspm1);
timeout = 20;
}
if ((isp->pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
- ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
+ ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
isp->dfs = &dfs_config_cht_soc;
dfs = isp->dfs;
curr_rules.run_mode = ATOMISP_RUN_MODE_SDV;
else
curr_rules.run_mode =
- ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE;
+ ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE;
}
/* search for the target frequency by looping freq rules*/
v4l2_event_queue(asd->subdev.devnode, &event);
}
-static void atomisp_3a_stats_ready_event(struct atomisp_sub_device *asd, uint8_t exp_id)
+static void atomisp_3a_stats_ready_event(struct atomisp_sub_device *asd,
+ uint8_t exp_id)
{
struct v4l2_event event = {0};
}
static void atomisp_metadata_ready_event(struct atomisp_sub_device *asd,
- enum atomisp_metadata_type md_type)
+ enum atomisp_metadata_type md_type)
{
struct v4l2_event event = {0};
* start processing next frame from sensor before old
* one is completely done. */
if (atomic_read(&asd->sequence) == atomic_read(
- &asd->sequence_temp))
+ &asd->sequence_temp))
atomic_set(&asd->sequence_temp,
- atomic_read(&asd->sof_count));
+ atomic_read(&asd->sof_count));
}
if (irq_infos & CSS_IRQ_INFO_EVENTS_READY)
atomic_set(&asd->sequence,
{
#ifndef ISP2401
return asd->video_out_capture.buffers_in_css ||
- asd->video_out_vf.buffers_in_css ||
- asd->video_out_preview.buffers_in_css ||
- asd->video_out_video_capture.buffers_in_css ?
- true : false;
+ asd->video_out_vf.buffers_in_css ||
+ asd->video_out_preview.buffers_in_css ||
+ asd->video_out_video_capture.buffers_in_css ?
+ true : false;
#else
return pipe->buffers_in_css ? true : false;
#endif
dev_dbg(isp->dev, "atomisp_io_base:%p\n", atomisp_io_base);
dev_dbg(isp->dev, "%s, addr:0x%x, size: %d, size32: %d\n", __func__,
- addr, size, size32);
+ addr, size, size32);
if (size32 * 4 + addr > 0x4000) {
dev_err(isp->dev, "illegal size (%d) or addr (0x%x)\n",
- size32, addr);
+ size32, addr);
return;
}
addr += SP_DMEM_BASE;
}
static struct videobuf_buffer *atomisp_css_frame_to_vbuf(
- struct atomisp_video_pipe *pipe, struct atomisp_css_frame *frame)
+ struct atomisp_video_pipe *pipe, struct atomisp_css_frame *frame)
{
struct videobuf_vmalloc_memory *vm_mem;
struct atomisp_css_frame *handle;
pipe->capq.bufs[i]->state == VIDEOBUF_QUEUED) {
pipe->capq.bufs[i]->ts = ktime_get_ns();
pipe->capq.bufs[i]->field_count =
- atomic_read(&asd->sequence) << 1;
+ atomic_read(&asd->sequence) << 1;
dev_dbg(asd->isp->dev, "release buffers on device %s\n",
pipe->vdev.name);
if (pipe->capq.bufs[i]->state == VIDEOBUF_QUEUED)
/* find atomisp_video_pipe with css pipe id, buffer type and atomisp run_mode */
static struct atomisp_video_pipe *__atomisp_get_pipe(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id,
- enum atomisp_css_buffer_type buf_type)
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id,
+ enum atomisp_css_buffer_type buf_type)
{
struct atomisp_device *isp = asd->isp;
if (css_pipe_id == CSS_PIPE_ID_COPY &&
isp->inputs[asd->input_curr].camera_caps->
- sensor[asd->sensor_curr].stream_num > 1) {
+ sensor[asd->sensor_curr].stream_num > 1) {
switch (stream_id) {
case ATOMISP_INPUT_STREAM_PREVIEW:
return &asd->video_out_preview;
enum atomisp_metadata_type
atomisp_get_metadata_type(struct atomisp_sub_device *asd,
- enum ia_css_pipe_id pipe_id)
-{
+ enum ia_css_pipe_id pipe_id) {
if (!asd->continuous_mode->val)
return ATOMISP_MAIN_METADATA;
list_for_each_entry_safe(s3a_buf, _s3a_buf_tmp,
&asd->s3a_stats_in_css, list) {
if (s3a_buf->s3a_data ==
- buffer.css_buffer.data.stats_3a) {
+ buffer.css_buffer.data.stats_3a) {
list_del_init(&s3a_buf->list);
list_add_tail(&s3a_buf->list,
&asd->s3a_stats_ready);
list_for_each_entry_safe(md_buf, _md_buf_tmp,
&asd->metadata_in_css[md_type], list) {
if (md_buf->metadata ==
- buffer.css_buffer.data.metadata) {
+ buffer.css_buffer.data.metadata) {
list_del_init(&md_buf->list);
list_add_tail(&md_buf->list,
&asd->metadata_ready[md_type]);
break;
case CSS_BUFFER_TYPE_DIS_STATISTICS:
list_for_each_entry_safe(dis_buf, _dis_buf_tmp,
- &asd->dis_stats_in_css, list) {
+ &asd->dis_stats_in_css, list) {
if (dis_buf->dis_data ==
- buffer.css_buffer.data.stats_dvs) {
+ buffer.css_buffer.data.stats_dvs) {
spin_lock_irqsave(&asd->dis_stats_lock,
irqflags);
list_del_init(&dis_buf->list);
if (IS_BYT && buf_type == CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME &&
asd->continuous_mode->val && ATOMISP_USE_YUVPP(asd))
frame->exp_id = (asd->postview_exp_id++) %
- (ATOMISP_MAX_EXP_ID + 1);
+ (ATOMISP_MAX_EXP_ID + 1);
dev_dbg(isp->dev, "%s: vf frame with exp_id %d is ready\n",
__func__, frame->exp_id);
if (css_pipe_id == IA_CSS_PIPE_ID_CAPTURE &&
asd->pending_capture_request > 0) {
err = atomisp_css_offline_capture_configure(asd,
- asd->params.offline_parm.num_captures,
- asd->params.offline_parm.skip_frames,
- asd->params.offline_parm.offset);
+ asd->params.offline_parm.num_captures,
+ asd->params.offline_parm.skip_frames,
+ asd->params.offline_parm.offset);
#ifndef ISP2401
asd->pending_capture_request--;
dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
err);
#else
- asd->pending_capture_request--;
- asd->re_trigger_capture = false;
- dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
- err);
- } else {
- asd->re_trigger_capture = true;
- }
+ asd->pending_capture_request--;
+ asd->re_trigger_capture = false;
+ dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
+ err);
+ } else {
+ asd->re_trigger_capture = true;
+ }
#endif
}
break;
if (IS_BYT && buf_type == CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME &&
asd->continuous_mode->val && ATOMISP_USE_YUVPP(asd))
frame->exp_id = (asd->preview_exp_id++) %
- (ATOMISP_MAX_EXP_ID + 1);
+ (ATOMISP_MAX_EXP_ID + 1);
dev_dbg(isp->dev, "%s: main frame with exp_id %d is ready\n",
__func__, frame->exp_id);
pipe->frame_params[vb->i]->params.dvs_6axis)
asd->params.dvs_6axis = NULL;
atomisp_free_css_parameters(
- &pipe->frame_params[vb->i]->params);
+ &pipe->frame_params[vb->i]->params);
kvfree(pipe->frame_params[vb->i]);
pipe->frame_params[vb->i] = NULL;
}
if (frame->flash_state
== CSS_FRAME_FLASH_STATE_PARTIAL) {
asd->frame_status[vb->i] =
- ATOMISP_FRAME_STATUS_FLASH_PARTIAL;
+ ATOMISP_FRAME_STATUS_FLASH_PARTIAL;
dev_dbg(isp->dev, "%s partially flashed\n",
- __func__);
+ __func__);
} else if (frame->flash_state
== CSS_FRAME_FLASH_STATE_FULL) {
asd->frame_status[vb->i] =
- ATOMISP_FRAME_STATUS_FLASH_EXPOSED;
+ ATOMISP_FRAME_STATUS_FLASH_EXPOSED;
asd->params.num_flash_frames--;
dev_dbg(isp->dev, "%s completely flashed\n",
- __func__);
+ __func__);
} else {
asd->frame_status[vb->i] =
- ATOMISP_FRAME_STATUS_OK;
+ ATOMISP_FRAME_STATUS_OK;
dev_dbg(isp->dev,
- "%s no flash in this frame\n",
- __func__);
+ "%s no flash in this frame\n",
+ __func__);
}
/* Check if flashing sequence is done */
if (asd->frame_status[vb->i] ==
- ATOMISP_FRAME_STATUS_FLASH_EXPOSED)
+ ATOMISP_FRAME_STATUS_FLASH_EXPOSED)
asd->params.flash_state = ATOMISP_FLASH_DONE;
} else if (isp->flash) {
if (v4l2_g_ctrl(isp->flash->ctrl_handler, &ctrl) ==
css_pipe_id == CSS_PIPE_ID_VIDEO) {
asd->latest_preview_exp_id = frame->exp_id;
} else if (css_pipe_id ==
- CSS_PIPE_ID_CAPTURE) {
+ CSS_PIPE_ID_CAPTURE) {
if (asd->run_mode->val ==
- ATOMISP_RUN_MODE_VIDEO)
+ ATOMISP_RUN_MODE_VIDEO)
dev_dbg(isp->dev, "SDV capture raw buffer id: %u\n",
- frame->exp_id);
+ frame->exp_id);
else
dev_dbg(isp->dev, "ZSL capture raw buffer id: %u\n",
- frame->exp_id);
+ frame->exp_id);
}
}
/*
* be locked automatically, so record it here.
*/
if (((css_pipe_id == CSS_PIPE_ID_PREVIEW) ||
- (css_pipe_id == CSS_PIPE_ID_VIDEO)) &&
+ (css_pipe_id == CSS_PIPE_ID_VIDEO)) &&
asd->enable_raw_buffer_lock->val &&
asd->continuous_mode->val) {
atomisp_set_raw_buffer_bitmap(asd, frame->exp_id);
&asd->params.css_param);
if (asd->params.css_param.update_flag.dz_config)
atomisp_css_set_dz_config(asd,
- &asd->params.css_param.dz_config);
+ &asd->params.css_param.dz_config);
/* New global dvs 6axis config should be blocked
* here if there's a buffer with per-frame parameters
* pending in CSS frame buffer queue.
*/
if (asd->params.dvs_6axis)
atomisp_css_set_dvs_6axis(asd,
- asd->params.dvs_6axis);
+ asd->params.dvs_6axis);
else
asd->params.css_update_params_needed = false;
/* The update flag should not be cleaned here
default:
break;
}
- if (vb) {
+ if (vb)
+ {
vb->ts = ktime_get_ns();
vb->field_count = atomic_read(&asd->sequence) << 1;
/*mark videobuffer done for dequeue*/
* Requeue should only be done for 3a and dis buffers.
* Queue/dequeue order will change if driver recycles image buffers.
*/
- if (requeue) {
+ if (requeue)
+ {
err = atomisp_css_queue_buffer(asd,
stream_id, css_pipe_id,
buf_type, &buffer);
if (err)
dev_err(isp->dev, "%s, q to css fails: %d\n",
- __func__, err);
+ __func__, err);
return;
}
if (!error && q_buffers)
void atomisp_delayed_init_work(struct work_struct *work)
{
struct atomisp_sub_device *asd = container_of(work,
- struct atomisp_sub_device,
- delayed_init_work);
+ struct atomisp_sub_device,
+ delayed_init_work);
/*
* to SOC camera, use yuvpp pipe and no support continuous mode.
*/
struct ia_css_pipeline_stage *stage;
for (stage = acc_pipeline->stages; stage;
- stage = stage->next) {
+ stage = stage->next) {
const struct ia_css_fw_info *fw;
fw = stage->firmware;
/* stream off sensor */
ret = v4l2_subdev_call(
- isp->inputs[asd->input_curr].
- camera, video, s_stream, 0);
+ isp->inputs[asd->input_curr].
+ camera, video, s_stream, 0);
if (ret)
dev_warn(isp->dev,
- "can't stop streaming on sensor!\n");
+ "can't stop streaming on sensor!\n");
atomisp_acc_unload_extensions(asd);
if (isp->inputs[asd->input_curr].type != FILE_INPUT)
atomisp_css_input_set_mode(asd,
- CSS_INPUT_MODE_SENSOR);
+ CSS_INPUT_MODE_SENSOR);
css_pipe_id = atomisp_get_css_pipe_id(asd);
if (atomisp_css_start(asd, css_pipe_id, true))
dev_warn(isp->dev,
- "start SP failed, so do not set streaming to be enable!\n");
+ "start SP failed, so do not set streaming to be enable!\n");
else
asd->streaming = ATOMISP_DEVICE_STREAMING_ENABLED;
if (!isp->sw_contex.file_input) {
atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
- atomisp_css_valid_sof(isp));
+ atomisp_css_valid_sof(isp));
if (atomisp_freq_scaling(isp, ATOMISP_DFS_MODE_AUTO, true) < 0)
dev_dbg(isp->dev, "dfs failed!\n");
reinit_completion(&asd->init_done);
asd->delayed_init = ATOMISP_DELAYED_INIT_QUEUED;
queue_work(asd->delayed_init_workq,
- &asd->delayed_init_work);
+ &asd->delayed_init_work);
}
/*
* dequeueing buffers is not needed. CSS will recycle
}
ret = v4l2_subdev_call(
- isp->inputs[asd->input_curr].camera, video,
- s_stream, 1);
+ isp->inputs[asd->input_curr].camera, video,
+ s_stream, 1);
if (ret)
dev_warn(isp->dev,
"can't start streaming on sensor!\n");
void atomisp_wdt_work(struct work_struct *work)
{
struct atomisp_device *isp = container_of(work, struct atomisp_device,
- wdt_work);
+ wdt_work);
int i;
#ifdef ISP2401
unsigned int pipe_wdt_cnt[MAX_STREAM_NUM][4] = { {0} };
struct atomisp_sub_device *asd = &isp->asd[i];
pipe_wdt_cnt[i][0] +=
- atomic_read(&asd->video_out_capture.wdt_count);
+ atomic_read(&asd->video_out_capture.wdt_count);
pipe_wdt_cnt[i][1] +=
- atomic_read(&asd->video_out_vf.wdt_count);
+ atomic_read(&asd->video_out_vf.wdt_count);
pipe_wdt_cnt[i][2] +=
- atomic_read(&asd->video_out_preview.wdt_count);
+ atomic_read(&asd->video_out_preview.wdt_count);
pipe_wdt_cnt[i][3] +=
- atomic_read(&asd->video_out_video_capture.wdt_count);
+ atomic_read(&asd->video_out_video_capture.wdt_count);
css_recover =
- (pipe_wdt_cnt[i][0] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
- pipe_wdt_cnt[i][1] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
- pipe_wdt_cnt[i][2] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
- pipe_wdt_cnt[i][3] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT)
- ? true : false;
- dev_err(isp->dev, "pipe on asd%d timeout cnt: (%d, %d, %d, %d) of %d, recover = %d\n",
+ (pipe_wdt_cnt[i][0] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+ pipe_wdt_cnt[i][1] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+ pipe_wdt_cnt[i][2] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT &&
+ pipe_wdt_cnt[i][3] <= ATOMISP_ISP_MAX_TIMEOUT_COUNT)
+ ? true : false;
+ dev_err(isp->dev,
+ "pipe on asd%d timeout cnt: (%d, %d, %d, %d) of %d, recover = %d\n",
asd->index, pipe_wdt_cnt[i][0], pipe_wdt_cnt[i][1],
pipe_wdt_cnt[i][2], pipe_wdt_cnt[i][3],
ATOMISP_ISP_MAX_TIMEOUT_COUNT, css_recover);
struct atomisp_sub_device *asd = &isp->asd[i];
if (asd->streaming ==
- ATOMISP_DEVICE_STREAMING_ENABLED) {
+ ATOMISP_DEVICE_STREAMING_ENABLED) {
atomisp_wdt_refresh(asd,
- isp->sw_contex.file_input ?
- ATOMISP_ISP_FILE_TIMEOUT_DURATION :
- ATOMISP_ISP_TIMEOUT_DURATION);
+ isp->sw_contex.file_input ?
+ ATOMISP_ISP_FILE_TIMEOUT_DURATION :
+ ATOMISP_ISP_TIMEOUT_DURATION);
}
}
#endif
struct atomisp_sub_device *asd = &isp->asd[i];
if (asd->streaming !=
- ATOMISP_DEVICE_STREAMING_ENABLED)
+ ATOMISP_DEVICE_STREAMING_ENABLED)
continue;
atomisp_wdt_refresh(asd,
#ifdef ISP2401
atomic_inc(&pipe->wdt_count);
dev_warn(isp->dev,
- "[WARNING]asd %d pipe %s ISP timeout %d!\n",
- asd->index, pipe->vdev.name,
- atomic_read(&pipe->wdt_count));
+ "[WARNING]asd %d pipe %s ISP timeout %d!\n",
+ asd->index, pipe->vdev.name,
+ atomic_read(&pipe->wdt_count));
#endif
if (atomic_read(&isp->wdt_work_queued)) {
dev_dbg(isp->dev, "ISP watchdog was put into workqueue\n");
void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay)
#else
void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
- unsigned int delay)
+ unsigned int delay)
#endif
{
unsigned long next;
* Get internal fmt according to V4L2 fmt
*/
static enum atomisp_css_frame_format
-v4l2_fmt_to_sh_fmt(u32 fmt)
-{
- switch (fmt) {
+v4l2_fmt_to_sh_fmt(u32 fmt) {
+ switch (fmt)
+ {
case V4L2_PIX_FMT_YUV420:
- return CSS_FRAME_FORMAT_YUV420;
+ return CSS_FRAME_FORMAT_YUV420;
case V4L2_PIX_FMT_YVU420:
return CSS_FRAME_FORMAT_YV12;
case V4L2_PIX_FMT_YUV422P:
#ifdef ISP2401
int atomisp_set_sensor_runmode(struct atomisp_sub_device *asd,
- struct atomisp_s_runmode *runmode)
+ struct atomisp_s_runmode *runmode)
{
struct atomisp_device *isp = asd->isp;
struct v4l2_ctrl *c;
CI_MODE_VIDEO,
CI_MODE_STILL_CAPTURE,
CI_MODE_CONTINUOUS,
- CI_MODE_PREVIEW };
+ CI_MODE_PREVIEW
+ };
if (!(runmode && (runmode->mode & RUNMODE_MASK)))
return -EINVAL;
} else {
/* Set tnr config to isp parameters */
memcpy(&asd->params.css_param.tnr_config, config,
- sizeof(struct atomisp_css_tnr_config));
+ sizeof(struct atomisp_css_tnr_config));
atomisp_css_set_tnr_config(asd, &asd->params.css_param.tnr_config);
asd->params.css_update_params_needed = true;
}
* Function to update gamma correction parameters
*/
int atomisp_gamma_correction(struct atomisp_sub_device *asd, int flag,
- struct atomisp_gc_config *config)
+ struct atomisp_gc_config *config)
{
if (flag == 0) {
/* Get gamma correction params from current setup */
}
int atomisp_compare_grid(struct atomisp_sub_device *asd,
- struct atomisp_grid_info *atomgrid)
+ struct atomisp_grid_info *atomgrid)
{
struct atomisp_grid_info tmp = {0};
for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
ret = copy_to_user(config->coordinates_x[i],
- tab.coordinates_x[i], tab.height *
- tab.width * sizeof(*tab.coordinates_x[i]));
+ tab.coordinates_x[i], tab.height *
+ tab.width * sizeof(*tab.coordinates_x[i]));
if (ret) {
dev_err(isp->dev,
"Failed to copy to User for x\n");
return -EFAULT;
}
ret = copy_to_user(config->coordinates_y[i],
- tab.coordinates_y[i], tab.height *
- tab.width * sizeof(*tab.coordinates_y[i]));
+ tab.coordinates_y[i], tab.height *
+ tab.width * sizeof(*tab.coordinates_y[i]));
if (ret) {
dev_err(isp->dev,
"Failed to copy to User for y\n");
}
} else {
struct atomisp_css_morph_table *tab =
- asd->params.css_param.morph_table;
+ asd->params.css_param.morph_table;
/* free first if we have one */
if (tab) {
for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
ret = copy_from_user(tab->coordinates_x[i],
- config->coordinates_x[i],
- config->height * config->width *
- sizeof(*config->coordinates_x[i]));
+ config->coordinates_x[i],
+ config->height * config->width *
+ sizeof(*config->coordinates_x[i]));
if (ret) {
dev_err(isp->dev,
- "Failed to copy from User for x, ret %d\n",
- ret);
+ "Failed to copy from User for x, ret %d\n",
+ ret);
atomisp_css_morph_table_free(tab);
return -EFAULT;
}
ret = copy_from_user(tab->coordinates_y[i],
- config->coordinates_y[i],
- config->height * config->width *
- sizeof(*config->coordinates_y[i]));
+ config->coordinates_y[i],
+ config->height * config->width *
+ sizeof(*config->coordinates_y[i]));
if (ret) {
dev_err(isp->dev,
- "Failed to copy from User for y, ret is %d\n",
- ret);
+ "Failed to copy from User for y, ret is %d\n",
+ ret);
atomisp_css_morph_table_free(tab);
return -EFAULT;
}
* Function set camrea_prefiles.xml current sensor pixel array size
*/
int atomisp_set_array_res(struct atomisp_sub_device *asd,
- struct atomisp_resolution *config)
+ struct atomisp_resolution *config)
{
dev_dbg(asd->isp->dev, ">%s start\n", __func__);
if (!config) {
* Function to get DVS2 BQ resolution settings
*/
int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
- struct atomisp_dvs2_bq_resolutions *bq_res)
+ struct atomisp_dvs2_bq_resolutions *bq_res)
{
struct ia_css_pipe_config *pipe_cfg = NULL;
struct ia_css_stream_config *stream_cfg = NULL;
struct ia_css_stream_input_config *input_config = NULL;
struct ia_css_stream *stream =
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
if (!stream) {
dev_warn(asd->isp->dev, "stream is not created");
return -EAGAIN;
}
pipe_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[CSS_PIPE_ID_VIDEO];
+ .pipe_configs[CSS_PIPE_ID_VIDEO];
stream_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .stream_config;
+ .stream_config;
input_config = &stream_cfg->input_config;
if (!bq_res)
/* the GDC input resolution */
if (!asd->continuous_mode->val) {
bq_res->source_bq.width_bq = bq_res->output_bq.width_bq +
- pipe_cfg->dvs_envelope.width / 2;
+ pipe_cfg->dvs_envelope.width / 2;
bq_res->source_bq.height_bq = bq_res->output_bq.height_bq +
- pipe_cfg->dvs_envelope.height / 2;
+ pipe_cfg->dvs_envelope.height / 2;
/*
* Bad pixels caused by spatial filter processing
* ISP filter resolution should be given by CSS/FW, but for now
if (asd->params.video_dis_en) {
bq_res->envelope_bq.width_bq = pipe_cfg->dvs_envelope.width
- / 2 - bq_res->ispfilter_bq.width_bq;
+ / 2 - bq_res->ispfilter_bq.width_bq;
bq_res->envelope_bq.height_bq = pipe_cfg->dvs_envelope.height
- / 2 - bq_res->ispfilter_bq.height_bq;
+ / 2 - bq_res->ispfilter_bq.height_bq;
}
} else {
unsigned int w_padding;
* effective_input / bayer_ds_ratio
*/
bq_res->source_bq.width_bq =
- (input_config->effective_res.width *
- pipe_cfg->bayer_ds_out_res.width /
- input_config->effective_res.width + 1) / 2;
+ (input_config->effective_res.width *
+ pipe_cfg->bayer_ds_out_res.width /
+ input_config->effective_res.width + 1) / 2;
bq_res->source_bq.height_bq =
- (input_config->effective_res.height *
- pipe_cfg->bayer_ds_out_res.height /
- input_config->effective_res.height + 1) / 2;
+ (input_config->effective_res.height *
+ pipe_cfg->bayer_ds_out_res.height /
+ input_config->effective_res.height + 1) / 2;
if (!asd->params.video_dis_en) {
/*
* formula for SDV.
*/
bq_res->ispfilter_bq.width_bq = 128 *
- pipe_cfg->bayer_ds_out_res.width /
- input_config->effective_res.width / 2;
+ pipe_cfg->bayer_ds_out_res.width /
+ input_config->effective_res.width / 2;
bq_res->ispfilter_bq.height_bq = 128 *
- pipe_cfg->bayer_ds_out_res.width /
- input_config->effective_res.width / 2;
+ pipe_cfg->bayer_ds_out_res.width /
+ input_config->effective_res.width / 2;
if (IS_HWREVISION(asd->isp, ATOMISP_HW_REVISION_ISP2401)) {
/* No additional left padding for ISYS2401 */
* gdc_shift_bq = w_padding/BDS/2 + ispfilter_bq/2
*/
gdc_effective_input =
- input_config->effective_res.width +
- pipe_cfg->dvs_envelope.width;
+ input_config->effective_res.width +
+ pipe_cfg->dvs_envelope.width;
w_padding = roundup(gdc_effective_input, 128) -
- input_config->effective_res.width;
+ input_config->effective_res.width;
w_padding = w_padding *
- pipe_cfg->bayer_ds_out_res.width /
- input_config->effective_res.width + 1;
+ pipe_cfg->bayer_ds_out_res.width /
+ input_config->effective_res.width + 1;
w_padding = roundup(w_padding / 2, 1);
bq_res->gdc_shift_bq.width_bq = bq_res->ispfilter_bq.width_bq / 2
- + w_padding;
+ + w_padding;
bq_res->gdc_shift_bq.height_bq = 4 / 2;
}
} else {
if (w_padding < 12)
w_padding = 12;
bq_res->gdc_shift_bq.width_bq = 4 / 2 +
- ((w_padding - 12) *
- pipe_cfg->bayer_ds_out_res.width /
- input_config->effective_res.width + 1) / 2;
+ ((w_padding - 12) *
+ pipe_cfg->bayer_ds_out_res.width /
+ input_config->effective_res.width + 1) / 2;
bq_res->gdc_shift_bq.height_bq = 4 / 2;
}
pipe_cfg->output_info[0].res.height / 5,
ATOM_ISP_STEP_HEIGHT);
bq_res->envelope_bq.width_bq =
- min((dvs_w / 2), (dvs_w_max / 2)) -
- bq_res->ispfilter_bq.width_bq;
+ min((dvs_w / 2), (dvs_w_max / 2)) -
+ bq_res->ispfilter_bq.width_bq;
bq_res->envelope_bq.height_bq =
- min((dvs_h / 2), (dvs_h_max / 2)) -
- bq_res->ispfilter_bq.height_bq;
+ min((dvs_h / 2), (dvs_h_max / 2)) -
+ bq_res->ispfilter_bq.height_bq;
}
}
- dev_dbg(asd->isp->dev, "source_bq.width_bq %d, source_bq.height_bq %d,\nispfilter_bq.width_bq %d, ispfilter_bq.height_bq %d,\ngdc_shift_bq.width_bq %d, gdc_shift_bq.height_bq %d,\nenvelope_bq.width_bq %d, envelope_bq.height_bq %d,\noutput_bq.width_bq %d, output_bq.height_bq %d\n",
- bq_res->source_bq.width_bq, bq_res->source_bq.height_bq,
- bq_res->ispfilter_bq.width_bq, bq_res->ispfilter_bq.height_bq,
- bq_res->gdc_shift_bq.width_bq, bq_res->gdc_shift_bq.height_bq,
- bq_res->envelope_bq.width_bq, bq_res->envelope_bq.height_bq,
- bq_res->output_bq.width_bq, bq_res->output_bq.height_bq);
+ dev_dbg(asd->isp->dev,
+ "source_bq.width_bq %d, source_bq.height_bq %d,\nispfilter_bq.width_bq %d, ispfilter_bq.height_bq %d,\ngdc_shift_bq.width_bq %d, gdc_shift_bq.height_bq %d,\nenvelope_bq.width_bq %d, envelope_bq.height_bq %d,\noutput_bq.width_bq %d, output_bq.height_bq %d\n",
+ bq_res->source_bq.width_bq, bq_res->source_bq.height_bq,
+ bq_res->ispfilter_bq.width_bq, bq_res->ispfilter_bq.height_bq,
+ bq_res->gdc_shift_bq.width_bq, bq_res->gdc_shift_bq.height_bq,
+ bq_res->envelope_bq.width_bq, bq_res->envelope_bq.height_bq,
+ bq_res->output_bq.width_bq, bq_res->output_bq.height_bq);
return 0;
}
}
s3a_buf = list_entry(asd->s3a_stats_ready.next,
- struct atomisp_s3a_buf, list);
+ struct atomisp_s3a_buf, list);
if (s3a_buf->s3a_map)
ia_css_translate_3a_statistics(
- asd->params.s3a_user_stat, s3a_buf->s3a_map);
+ asd->params.s3a_user_stat, s3a_buf->s3a_map);
else
ia_css_get_3a_statistics(asd->params.s3a_user_stat,
- s3a_buf->s3a_data);
+ s3a_buf->s3a_data);
config->exp_id = s3a_buf->s3a_data->exp_id;
config->isp_config_id = s3a_buf->s3a_data->isp_config_id;
asd->params.s3a_output_bytes);
if (ret) {
dev_err(isp->dev, "copy to user failed: copied %lu bytes\n",
- ret);
+ ret);
return -EFAULT;
}
/* Move to free buffer list */
list_del_init(&s3a_buf->list);
list_add_tail(&s3a_buf->list, &asd->s3a_stats);
- dev_dbg(isp->dev, "%s: finish getting exp_id %d 3a stat, isp_config_id %d\n", __func__,
+ dev_dbg(isp->dev, "%s: finish getting exp_id %d 3a stat, isp_config_id %d\n",
+ __func__,
config->exp_id, config->isp_config_id);
return 0;
}
return -EINVAL;
stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_config;
+ stream_config;
stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_info;
+ stream_info;
/* We always return the resolution and stride even if there is
* no valid metadata. This allows the caller to get the information
}
mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
if (!mipi_info)
return -EINVAL;
if (mipi_info->metadata_effective_width) {
for (i = 0; i < md->height; i++)
md->effective_width[i] =
- mipi_info->metadata_effective_width[i];
+ mipi_info->metadata_effective_width[i];
}
md_buf = list_entry(asd->metadata_ready[md_type].next,
stream_info->metadata_info.size);
} else {
hmm_load(md_buf->metadata->address,
- asd->params.metadata_user[md_type],
- stream_info->metadata_info.size);
+ asd->params.metadata_user[md_type],
+ stream_info->metadata_info.size);
ret = copy_to_user(md->data,
asd->params.metadata_user[md_type],
return -EINVAL;
stream_config = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_config;
+ stream_config;
stream_info = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_info;
+ stream_info;
/* We always return the resolution and stride even if there is
* no valid metadata. This allows the caller to get the information
}
mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
if (!mipi_info)
return -EINVAL;
if (mipi_info->metadata_effective_width) {
for (i = 0; i < md->height; i++)
md->effective_width[i] =
- mipi_info->metadata_effective_width[i];
+ mipi_info->metadata_effective_width[i];
}
md_buf = list_entry(asd->metadata_ready[md_type].next,
stream_info->metadata_info.size);
} else {
hmm_load(md_buf->metadata->address,
- asd->params.metadata_user[md_type],
- stream_info->metadata_info.size);
+ asd->params.metadata_user[md_type],
+ stream_info->metadata_info.size);
ret = copy_to_user(md->data,
asd->params.metadata_user[md_type],
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct atomisp_resolution eff_res, out_res;
#ifdef ISP2401
int w_offset, h_offset;
return 0;
if (css_pipe_id != IA_CSS_PIPE_ID_PREVIEW
- && css_pipe_id != IA_CSS_PIPE_ID_CAPTURE) {
+ && css_pipe_id != IA_CSS_PIPE_ID_CAPTURE) {
dev_err(asd->isp->dev, "%s the set pipe no support crop region"
, __func__);
return -EINVAL;
}
eff_res.width =
- stream_env->stream_config.input_config.effective_res.width;
+ stream_env->stream_config.input_config.effective_res.width;
eff_res.height =
- stream_env->stream_config.input_config.effective_res.height;
+ stream_env->stream_config.input_config.effective_res.height;
if (eff_res.width == 0 || eff_res.height == 0) {
dev_err(asd->isp->dev, "%s err effective resolution"
- , __func__);
+ , __func__);
return -EINVAL;
}
if (dz_config->zoom_region.resolution.width
- == asd->sensor_array_res.width
- || dz_config->zoom_region.resolution.height
- == asd->sensor_array_res.height) {
+ == asd->sensor_array_res.width
+ || dz_config->zoom_region.resolution.height
+ == asd->sensor_array_res.height) {
/*no need crop region*/
dz_config->zoom_region.origin.x = 0;
dz_config->zoom_region.origin.y = 0;
*/
#ifdef ISP2401
out_res.width =
- stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
+ stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
out_res.height =
- stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
+ stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
if (out_res.width == 0 || out_res.height == 0) {
dev_err(asd->isp->dev, "%s err current pipe output resolution"
- , __func__);
+ , __func__);
return -EINVAL;
}
if (asd->sensor_array_res.width * out_res.height
- < out_res.width * asd->sensor_array_res.height) {
+ < out_res.width * asd->sensor_array_res.height) {
h_offset = asd->sensor_array_res.height -
- asd->sensor_array_res.width
- * out_res.height / out_res.width;
+ asd->sensor_array_res.width
+ * out_res.height / out_res.width;
h_offset = h_offset / 2;
if (dz_config->zoom_region.origin.y < h_offset)
dz_config->zoom_region.origin.y = 0;
else
dz_config->zoom_region.origin.y =
- dz_config->zoom_region.origin.y - h_offset;
+ dz_config->zoom_region.origin.y - h_offset;
w_offset = 0;
} else {
w_offset = asd->sensor_array_res.width -
- asd->sensor_array_res.height
- * out_res.width / out_res.height;
+ asd->sensor_array_res.height
+ * out_res.width / out_res.height;
w_offset = w_offset / 2;
if (dz_config->zoom_region.origin.x < w_offset)
dz_config->zoom_region.origin.x = 0;
else
dz_config->zoom_region.origin.x =
- dz_config->zoom_region.origin.x - w_offset;
+ dz_config->zoom_region.origin.x - w_offset;
h_offset = 0;
}
#endif
dz_config->zoom_region.origin.x =
- dz_config->zoom_region.origin.x
- * eff_res.width
+ dz_config->zoom_region.origin.x
+ * eff_res.width
#ifndef ISP2401
- / asd->sensor_array_res.width;
+ / asd->sensor_array_res.width;
#else
- / (asd->sensor_array_res.width -
- 2 * w_offset);
+ / (asd->sensor_array_res.width -
+ 2 * w_offset);
#endif
dz_config->zoom_region.origin.y =
- dz_config->zoom_region.origin.y
- * eff_res.height
+ dz_config->zoom_region.origin.y
+ * eff_res.height
#ifndef ISP2401
- / asd->sensor_array_res.height;
+ / asd->sensor_array_res.height;
#else
- / (asd->sensor_array_res.height -
- 2 * h_offset);
+ / (asd->sensor_array_res.height -
+ 2 * h_offset);
#endif
dz_config->zoom_region.resolution.width =
- dz_config->zoom_region.resolution.width
- * eff_res.width
+ dz_config->zoom_region.resolution.width
+ * eff_res.width
#ifndef ISP2401
- / asd->sensor_array_res.width;
+ / asd->sensor_array_res.width;
#else
- / (asd->sensor_array_res.width -
- 2 * w_offset);
+ / (asd->sensor_array_res.width -
+ 2 * w_offset);
#endif
dz_config->zoom_region.resolution.height =
- dz_config->zoom_region.resolution.height
- * eff_res.height
+ dz_config->zoom_region.resolution.height
+ * eff_res.height
#ifndef ISP2401
- / asd->sensor_array_res.height;
+ / asd->sensor_array_res.height;
#else
- / (asd->sensor_array_res.height -
- 2 * h_offset);
+ / (asd->sensor_array_res.height -
+ 2 * h_offset);
#endif
/*
*/
#ifndef ISP2401
out_res.width =
- stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
+ stream_env->pipe_configs[css_pipe_id].output_info[0].res.width;
out_res.height =
- stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
+ stream_env->pipe_configs[css_pipe_id].output_info[0].res.height;
if (out_res.width == 0 || out_res.height == 0) {
dev_err(asd->isp->dev, "%s err current pipe output resolution"
- , __func__);
+ , __func__);
return -EINVAL;
}
#endif
if (out_res.width * dz_config->zoom_region.resolution.height
- > dz_config->zoom_region.resolution.width * out_res.height) {
+ > dz_config->zoom_region.resolution.width * out_res.height) {
dz_config->zoom_region.resolution.height =
- dz_config->zoom_region.resolution.width
- * out_res.height / out_res.width;
+ dz_config->zoom_region.resolution.width
+ * out_res.height / out_res.width;
} else {
dz_config->zoom_region.resolution.width =
- dz_config->zoom_region.resolution.height
- * out_res.width / out_res.height;
- }
- dev_dbg(asd->isp->dev, "%s crop region:(%d,%d),(%d,%d) eff_res(%d, %d) array_size(%d,%d) out_res(%d, %d)\n",
- __func__, dz_config->zoom_region.origin.x,
- dz_config->zoom_region.origin.y,
- dz_config->zoom_region.resolution.width,
- dz_config->zoom_region.resolution.height,
- eff_res.width, eff_res.height,
- asd->sensor_array_res.width,
- asd->sensor_array_res.height,
- out_res.width, out_res.height);
+ dz_config->zoom_region.resolution.height
+ * out_res.width / out_res.height;
+ }
+ dev_dbg(asd->isp->dev,
+ "%s crop region:(%d,%d),(%d,%d) eff_res(%d, %d) array_size(%d,%d) out_res(%d, %d)\n",
+ __func__, dz_config->zoom_region.origin.x,
+ dz_config->zoom_region.origin.y,
+ dz_config->zoom_region.resolution.width,
+ dz_config->zoom_region.resolution.height,
+ eff_res.width, eff_res.height,
+ asd->sensor_array_res.width,
+ asd->sensor_array_res.height,
+ out_res.width, out_res.height);
if ((dz_config->zoom_region.origin.x +
- dz_config->zoom_region.resolution.width
- > eff_res.width) ||
- (dz_config->zoom_region.origin.y +
- dz_config->zoom_region.resolution.height
- > eff_res.height))
+ dz_config->zoom_region.resolution.width
+ > eff_res.width) ||
+ (dz_config->zoom_region.origin.y +
+ dz_config->zoom_region.resolution.height
+ > eff_res.height))
return -EINVAL;
return 0;
* Function to check the zoom region whether is effective
*/
static bool atomisp_check_zoom_region(
- struct atomisp_sub_device *asd,
- struct ia_css_dz_config *dz_config)
+ struct atomisp_sub_device *asd,
+ struct ia_css_dz_config *dz_config)
{
struct atomisp_resolution config;
bool flag = false;
config.width = asd->sensor_array_res.width;
config.height = asd->sensor_array_res.height;
w = dz_config->zoom_region.origin.x +
- dz_config->zoom_region.resolution.width;
+ dz_config->zoom_region.resolution.width;
h = dz_config->zoom_region.origin.y +
- dz_config->zoom_region.resolution.height;
+ dz_config->zoom_region.resolution.height;
if ((w <= config.width) && (h <= config.height) && w > 0 && h > 0)
flag = true;
else
/* setting error zoom region */
- dev_err(asd->isp->dev, "%s zoom region ERROR:dz_config:(%d,%d),(%d,%d)array_res(%d, %d)\n",
+ dev_err(asd->isp->dev,
+ "%s zoom region ERROR:dz_config:(%d,%d),(%d,%d)array_res(%d, %d)\n",
__func__, dz_config->zoom_region.origin.x,
dz_config->zoom_region.origin.y,
dz_config->zoom_region.resolution.width,
}
void atomisp_apply_css_parameters(
- struct atomisp_sub_device *asd,
- struct atomisp_css_params *css_param)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_params *css_param)
{
if (css_param->update_flag.wb_config)
atomisp_css_set_wb_config(asd, &css_param->wb_config);
if (css_param->update_flag.yuv2rgb_cc_config)
atomisp_css_set_yuv2rgb_cc_config(asd,
- &css_param->yuv2rgb_cc_config);
+ &css_param->yuv2rgb_cc_config);
if (css_param->update_flag.rgb2yuv_cc_config)
atomisp_css_set_rgb2yuv_cc_config(asd,
- &css_param->rgb2yuv_cc_config);
+ &css_param->rgb2yuv_cc_config);
if (css_param->update_flag.macc_table)
atomisp_css_set_macc_table(asd, &css_param->macc_table);
if (css_param->update_flag.dvs2_coefs) {
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(
- &asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(
+ &asd->params.curr_grid_info);
if (dvs_grid_info && dvs_grid_info->enable)
atomisp_css_set_dvs2_coefs(asd, css_param->dvs2_coeff);
}
static unsigned int long copy_from_compatible(void *to, const void *from,
- unsigned long n, bool from_user)
+ unsigned long n, bool from_user)
{
if (from_user)
return copy_from_user(to, (void __user *)from, n);
if (arg->wb_config && (from_user || !cur_config->wb_config)) {
if (copy_from_compatible(&css_param->wb_config, arg->wb_config,
- sizeof(struct atomisp_css_wb_config),
- from_user))
+ sizeof(struct atomisp_css_wb_config),
+ from_user))
return -EFAULT;
css_param->update_flag.wb_config =
- (struct atomisp_wb_config *)&css_param->wb_config;
+ (struct atomisp_wb_config *)&css_param->wb_config;
}
if (arg->ob_config && (from_user || !cur_config->ob_config)) {
if (copy_from_compatible(&css_param->ob_config, arg->ob_config,
- sizeof(struct atomisp_css_ob_config),
- from_user))
+ sizeof(struct atomisp_css_ob_config),
+ from_user))
return -EFAULT;
css_param->update_flag.ob_config =
- (struct atomisp_ob_config *)&css_param->ob_config;
+ (struct atomisp_ob_config *)&css_param->ob_config;
}
if (arg->dp_config && (from_user || !cur_config->dp_config)) {
if (copy_from_compatible(&css_param->dp_config, arg->dp_config,
- sizeof(struct atomisp_css_dp_config),
- from_user))
+ sizeof(struct atomisp_css_dp_config),
+ from_user))
return -EFAULT;
css_param->update_flag.dp_config =
- (struct atomisp_dp_config *)&css_param->dp_config;
+ (struct atomisp_dp_config *)&css_param->dp_config;
}
if (asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
if (arg->dz_config && (from_user || !cur_config->dz_config)) {
if (copy_from_compatible(&css_param->dz_config,
- arg->dz_config,
- sizeof(struct atomisp_css_dz_config),
- from_user))
+ arg->dz_config,
+ sizeof(struct atomisp_css_dz_config),
+ from_user))
return -EFAULT;
if (!atomisp_check_zoom_region(asd,
- &css_param->dz_config)) {
+ &css_param->dz_config)) {
dev_err(asd->isp->dev, "crop region error!");
return -EINVAL;
}
css_param->update_flag.dz_config =
- (struct atomisp_dz_config *)
- &css_param->dz_config;
+ (struct atomisp_dz_config *)
+ &css_param->dz_config;
}
}
if (arg->nr_config && (from_user || !cur_config->nr_config)) {
if (copy_from_compatible(&css_param->nr_config, arg->nr_config,
- sizeof(struct atomisp_css_nr_config),
- from_user))
+ sizeof(struct atomisp_css_nr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.nr_config =
- (struct atomisp_nr_config *)&css_param->nr_config;
+ (struct atomisp_nr_config *)&css_param->nr_config;
}
if (arg->ee_config && (from_user || !cur_config->ee_config)) {
if (copy_from_compatible(&css_param->ee_config, arg->ee_config,
- sizeof(struct atomisp_css_ee_config),
- from_user))
+ sizeof(struct atomisp_css_ee_config),
+ from_user))
return -EFAULT;
css_param->update_flag.ee_config =
- (struct atomisp_ee_config *)&css_param->ee_config;
+ (struct atomisp_ee_config *)&css_param->ee_config;
}
if (arg->tnr_config && (from_user || !cur_config->tnr_config)) {
if (copy_from_compatible(&css_param->tnr_config,
- arg->tnr_config,
- sizeof(struct atomisp_css_tnr_config),
- from_user))
+ arg->tnr_config,
+ sizeof(struct atomisp_css_tnr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.tnr_config =
- (struct atomisp_tnr_config *)
- &css_param->tnr_config;
+ (struct atomisp_tnr_config *)
+ &css_param->tnr_config;
}
if (arg->a3a_config && (from_user || !cur_config->a3a_config)) {
if (copy_from_compatible(&css_param->s3a_config,
- arg->a3a_config,
- sizeof(struct atomisp_css_3a_config),
- from_user))
+ arg->a3a_config,
+ sizeof(struct atomisp_css_3a_config),
+ from_user))
return -EFAULT;
css_param->update_flag.a3a_config =
- (struct atomisp_3a_config *)&css_param->s3a_config;
+ (struct atomisp_3a_config *)&css_param->s3a_config;
}
if (arg->ctc_config && (from_user || !cur_config->ctc_config)) {
if (copy_from_compatible(&css_param->ctc_config,
- arg->ctc_config,
- sizeof(struct atomisp_css_ctc_config),
- from_user))
+ arg->ctc_config,
+ sizeof(struct atomisp_css_ctc_config),
+ from_user))
return -EFAULT;
css_param->update_flag.ctc_config =
- (struct atomisp_ctc_config *)
- &css_param->ctc_config;
+ (struct atomisp_ctc_config *)
+ &css_param->ctc_config;
}
if (arg->cnr_config && (from_user || !cur_config->cnr_config)) {
if (copy_from_compatible(&css_param->cnr_config,
- arg->cnr_config,
- sizeof(struct atomisp_css_cnr_config),
- from_user))
+ arg->cnr_config,
+ sizeof(struct atomisp_css_cnr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.cnr_config =
- (struct atomisp_cnr_config *)
- &css_param->cnr_config;
+ (struct atomisp_cnr_config *)
+ &css_param->cnr_config;
}
if (arg->ecd_config && (from_user || !cur_config->ecd_config)) {
if (copy_from_compatible(&css_param->ecd_config,
- arg->ecd_config,
- sizeof(struct atomisp_css_ecd_config),
- from_user))
+ arg->ecd_config,
+ sizeof(struct atomisp_css_ecd_config),
+ from_user))
return -EFAULT;
css_param->update_flag.ecd_config =
- (struct atomisp_ecd_config *)
- &css_param->ecd_config;
+ (struct atomisp_ecd_config *)
+ &css_param->ecd_config;
}
if (arg->ynr_config && (from_user || !cur_config->ynr_config)) {
if (copy_from_compatible(&css_param->ynr_config,
- arg->ynr_config,
- sizeof(struct atomisp_css_ynr_config),
- from_user))
+ arg->ynr_config,
+ sizeof(struct atomisp_css_ynr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.ynr_config =
- (struct atomisp_ynr_config *)
- &css_param->ynr_config;
+ (struct atomisp_ynr_config *)
+ &css_param->ynr_config;
}
if (arg->fc_config && (from_user || !cur_config->fc_config)) {
if (copy_from_compatible(&css_param->fc_config,
- arg->fc_config,
- sizeof(struct atomisp_css_fc_config),
- from_user))
+ arg->fc_config,
+ sizeof(struct atomisp_css_fc_config),
+ from_user))
return -EFAULT;
css_param->update_flag.fc_config =
- (struct atomisp_fc_config *)&css_param->fc_config;
+ (struct atomisp_fc_config *)&css_param->fc_config;
}
if (arg->macc_config && (from_user || !cur_config->macc_config)) {
if (copy_from_compatible(&css_param->macc_config,
- arg->macc_config,
- sizeof(struct atomisp_css_macc_config),
- from_user))
+ arg->macc_config,
+ sizeof(struct atomisp_css_macc_config),
+ from_user))
return -EFAULT;
css_param->update_flag.macc_config =
- (struct atomisp_macc_config *)
- &css_param->macc_config;
+ (struct atomisp_macc_config *)
+ &css_param->macc_config;
}
if (arg->aa_config && (from_user || !cur_config->aa_config)) {
if (copy_from_compatible(&css_param->aa_config, arg->aa_config,
- sizeof(struct atomisp_css_aa_config),
- from_user))
+ sizeof(struct atomisp_css_aa_config),
+ from_user))
return -EFAULT;
css_param->update_flag.aa_config =
- (struct atomisp_aa_config *)&css_param->aa_config;
+ (struct atomisp_aa_config *)&css_param->aa_config;
}
if (arg->anr_config && (from_user || !cur_config->anr_config)) {
if (copy_from_compatible(&css_param->anr_config,
- arg->anr_config,
- sizeof(struct atomisp_css_anr_config),
- from_user))
+ arg->anr_config,
+ sizeof(struct atomisp_css_anr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.anr_config =
- (struct atomisp_anr_config *)
- &css_param->anr_config;
+ (struct atomisp_anr_config *)
+ &css_param->anr_config;
}
if (arg->xnr_config && (from_user || !cur_config->xnr_config)) {
if (copy_from_compatible(&css_param->xnr_config,
- arg->xnr_config,
- sizeof(struct atomisp_css_xnr_config),
- from_user))
+ arg->xnr_config,
+ sizeof(struct atomisp_css_xnr_config),
+ from_user))
return -EFAULT;
css_param->update_flag.xnr_config =
- (struct atomisp_xnr_config *)
- &css_param->xnr_config;
+ (struct atomisp_xnr_config *)
+ &css_param->xnr_config;
}
if (arg->yuv2rgb_cc_config &&
- (from_user || !cur_config->yuv2rgb_cc_config)) {
+ (from_user || !cur_config->yuv2rgb_cc_config)) {
if (copy_from_compatible(&css_param->yuv2rgb_cc_config,
- arg->yuv2rgb_cc_config,
- sizeof(struct atomisp_css_cc_config),
- from_user))
+ arg->yuv2rgb_cc_config,
+ sizeof(struct atomisp_css_cc_config),
+ from_user))
return -EFAULT;
css_param->update_flag.yuv2rgb_cc_config =
- (struct atomisp_cc_config *)
- &css_param->yuv2rgb_cc_config;
+ (struct atomisp_cc_config *)
+ &css_param->yuv2rgb_cc_config;
}
if (arg->rgb2yuv_cc_config &&
- (from_user || !cur_config->rgb2yuv_cc_config)) {
+ (from_user || !cur_config->rgb2yuv_cc_config)) {
if (copy_from_compatible(&css_param->rgb2yuv_cc_config,
- arg->rgb2yuv_cc_config,
- sizeof(struct atomisp_css_cc_config),
- from_user))
+ arg->rgb2yuv_cc_config,
+ sizeof(struct atomisp_css_cc_config),
+ from_user))
return -EFAULT;
css_param->update_flag.rgb2yuv_cc_config =
- (struct atomisp_cc_config *)
- &css_param->rgb2yuv_cc_config;
+ (struct atomisp_cc_config *)
+ &css_param->rgb2yuv_cc_config;
}
if (arg->macc_table && (from_user || !cur_config->macc_table)) {
if (copy_from_compatible(&css_param->macc_table,
- arg->macc_table,
- sizeof(struct atomisp_css_macc_table),
- from_user))
+ arg->macc_table,
+ sizeof(struct atomisp_css_macc_table),
+ from_user))
return -EFAULT;
css_param->update_flag.macc_table =
- (struct atomisp_macc_table *)
- &css_param->macc_table;
+ (struct atomisp_macc_table *)
+ &css_param->macc_table;
}
if (arg->xnr_table && (from_user || !cur_config->xnr_table)) {
if (copy_from_compatible(&css_param->xnr_table,
- arg->xnr_table,
- sizeof(struct atomisp_css_xnr_table),
- from_user))
+ arg->xnr_table,
+ sizeof(struct atomisp_css_xnr_table),
+ from_user))
return -EFAULT;
css_param->update_flag.xnr_table =
- (struct atomisp_xnr_table *)&css_param->xnr_table;
+ (struct atomisp_xnr_table *)&css_param->xnr_table;
}
if (arg->r_gamma_table && (from_user || !cur_config->r_gamma_table)) {
if (copy_from_compatible(&css_param->r_gamma_table,
- arg->r_gamma_table,
- sizeof(struct atomisp_css_rgb_gamma_table),
- from_user))
+ arg->r_gamma_table,
+ sizeof(struct atomisp_css_rgb_gamma_table),
+ from_user))
return -EFAULT;
css_param->update_flag.r_gamma_table =
- (struct atomisp_rgb_gamma_table *)
- &css_param->r_gamma_table;
+ (struct atomisp_rgb_gamma_table *)
+ &css_param->r_gamma_table;
}
if (arg->g_gamma_table && (from_user || !cur_config->g_gamma_table)) {
if (copy_from_compatible(&css_param->g_gamma_table,
- arg->g_gamma_table,
- sizeof(struct atomisp_css_rgb_gamma_table),
- from_user))
+ arg->g_gamma_table,
+ sizeof(struct atomisp_css_rgb_gamma_table),
+ from_user))
return -EFAULT;
css_param->update_flag.g_gamma_table =
- (struct atomisp_rgb_gamma_table *)
- &css_param->g_gamma_table;
+ (struct atomisp_rgb_gamma_table *)
+ &css_param->g_gamma_table;
}
if (arg->b_gamma_table && (from_user || !cur_config->b_gamma_table)) {
if (copy_from_compatible(&css_param->b_gamma_table,
- arg->b_gamma_table,
- sizeof(struct atomisp_css_rgb_gamma_table),
- from_user))
+ arg->b_gamma_table,
+ sizeof(struct atomisp_css_rgb_gamma_table),
+ from_user))
return -EFAULT;
css_param->update_flag.b_gamma_table =
- (struct atomisp_rgb_gamma_table *)
- &css_param->b_gamma_table;
+ (struct atomisp_rgb_gamma_table *)
+ &css_param->b_gamma_table;
}
if (arg->anr_thres && (from_user || !cur_config->anr_thres)) {
if (copy_from_compatible(&css_param->anr_thres, arg->anr_thres,
- sizeof(struct atomisp_css_anr_thres),
- from_user))
+ sizeof(struct atomisp_css_anr_thres),
+ from_user))
return -EFAULT;
css_param->update_flag.anr_thres =
- (struct atomisp_anr_thres *)&css_param->anr_thres;
+ (struct atomisp_anr_thres *)&css_param->anr_thres;
}
if (from_user)
#endif
return -EINVAL;
#ifdef ISP2401
- }
-#endif
}
+#endif
+}
- /* Shading table size per color */
+/* Shading table size per color */
#ifndef ISP2401
- if (source_st->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
- source_st->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
+if (source_st->width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+ source_st->height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
#else
- if (st.width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
- st.height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
- dev_err(asd->isp->dev, "shading table w/h validate failed!");
+if (st.width > SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
+ st.height > SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
+ dev_err(asd->isp->dev, "shading table w/h validate failed!");
#endif
- return -EINVAL;
+ return -EINVAL;
#ifdef ISP2401
- }
+}
#endif
#ifndef ISP2401
- shading_table = atomisp_css_shading_table_alloc(source_st->width,
- source_st->height);
- if (!shading_table)
- return -ENOMEM;
+shading_table = atomisp_css_shading_table_alloc(source_st->width,
+ source_st->height);
+if (!shading_table)
+ return -ENOMEM;
#else
- shading_table = atomisp_css_shading_table_alloc(st.width,
- st.height);
- if (!shading_table) {
- dev_err(asd->isp->dev, "shading table alloc failed!");
- return -ENOMEM;
- }
+shading_table = atomisp_css_shading_table_alloc(st.width,
+ st.height);
+if (!shading_table) {
+ dev_err(asd->isp->dev, "shading table alloc failed!");
+ return -ENOMEM;
+}
#endif
#ifndef ISP2401
- len_table = source_st->width * source_st->height * ATOMISP_SC_TYPE_SIZE;
+len_table = source_st->width * source_st->height * ATOMISP_SC_TYPE_SIZE;
#else
- len_table = st.width * st.height * ATOMISP_SC_TYPE_SIZE;
+len_table = st.width * st.height * ATOMISP_SC_TYPE_SIZE;
#endif
- for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
- if (copy_from_compatible(shading_table->data[i],
+for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
+ if (copy_from_compatible(shading_table->data[i],
#ifndef ISP2401
- source_st->data[i], len_table, from_user)) {
+ source_st->data[i], len_table, from_user)) {
#else
- st.data[i], len_table, from_user)) {
+ st.data[i], len_table, from_user)) {
#endif
- atomisp_css_shading_table_free(shading_table);
- return -EFAULT;
- }
+ atomisp_css_shading_table_free(shading_table);
+ return -EFAULT;
}
+}
#ifndef ISP2401
- shading_table->sensor_width = source_st->sensor_width;
- shading_table->sensor_height = source_st->sensor_height;
- shading_table->fraction_bits = source_st->fraction_bits;
- shading_table->enable = source_st->enable;
+shading_table->sensor_width = source_st->sensor_width;
+shading_table->sensor_height = source_st->sensor_height;
+shading_table->fraction_bits = source_st->fraction_bits;
+shading_table->enable = source_st->enable;
#else
- shading_table->sensor_width = st.sensor_width;
- shading_table->sensor_height = st.sensor_height;
- shading_table->fraction_bits = st.fraction_bits;
- shading_table->enable = st.enable;
+shading_table->sensor_width = st.sensor_width;
+shading_table->sensor_height = st.sensor_height;
+shading_table->fraction_bits = st.fraction_bits;
+shading_table->enable = st.enable;
#endif
- /* No need to update shading table if it is the same */
- if (old_table &&
- old_table->sensor_width == shading_table->sensor_width &&
- old_table->sensor_height == shading_table->sensor_height &&
- old_table->width == shading_table->width &&
- old_table->height == shading_table->height &&
- old_table->fraction_bits == shading_table->fraction_bits &&
- old_table->enable == shading_table->enable) {
- bool data_is_same = true;
-
- for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
- if (memcmp(shading_table->data[i], old_table->data[i],
- len_table) != 0) {
- data_is_same = false;
- break;
- }
- }
+/* No need to update shading table if it is the same */
+if (old_table &&
+ old_table->sensor_width == shading_table->sensor_width &&
+ old_table->sensor_height == shading_table->sensor_height &&
+ old_table->width == shading_table->width &&
+ old_table->height == shading_table->height &&
+ old_table->fraction_bits == shading_table->fraction_bits &&
+ old_table->enable == shading_table->enable) {
+ bool data_is_same = true;
- if (data_is_same) {
- atomisp_css_shading_table_free(shading_table);
- return 0;
+ for (i = 0; i < ATOMISP_NUM_SC_COLORS; i++) {
+ if (memcmp(shading_table->data[i], old_table->data[i],
+ len_table) != 0) {
+ data_is_same = false;
+ break;
}
}
+ if (data_is_same) {
+ atomisp_css_shading_table_free(shading_table);
+ return 0;
+ }
+}
+
set_lsc:
- /* set LSC to CSS */
- css_param->shading_table = shading_table;
- css_param->update_flag.shading_table =
- (struct atomisp_shading_table *)shading_table;
- asd->params.sc_en = shading_table;
+/* set LSC to CSS */
+css_param->shading_table = shading_table;
+css_param->update_flag.shading_table =
+ (struct atomisp_shading_table *)shading_table;
+asd->params.sc_en = shading_table;
- if (old_table)
- atomisp_css_shading_table_free(old_table);
+if (old_table)
+ atomisp_css_shading_table_free(old_table);
- return 0;
+return 0;
}
int atomisp_css_cp_dvs2_coefs(struct atomisp_sub_device *asd,
bool from_user)
{
struct atomisp_css_dvs_grid_info *cur =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
int dvs_hor_coef_bytes, dvs_ver_coef_bytes;
#ifdef ISP2401
struct ia_css_dvs2_coefficients dvs2_coefs;
dvs_ver_coef_bytes = asd->params.dvs_ver_coef_bytes;
if (copy_from_compatible(css_param->dvs2_coeff->hor_coefs.odd_real,
#ifndef ISP2401
- coefs->hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
+ coefs->hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
#else
- dvs2_coefs.hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
+ dvs2_coefs.hor_coefs.odd_real, dvs_hor_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->hor_coefs.odd_imag,
#ifndef ISP2401
- coefs->hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
+ coefs->hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
#else
- dvs2_coefs.hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
+ dvs2_coefs.hor_coefs.odd_imag, dvs_hor_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->hor_coefs.even_real,
#ifndef ISP2401
- coefs->hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
+ coefs->hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
#else
- dvs2_coefs.hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
+ dvs2_coefs.hor_coefs.even_real, dvs_hor_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->hor_coefs.even_imag,
#ifndef ISP2401
- coefs->hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
+ coefs->hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
#else
- dvs2_coefs.hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
+ dvs2_coefs.hor_coefs.even_imag, dvs_hor_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->ver_coefs.odd_real,
#ifndef ISP2401
- coefs->ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
+ coefs->ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
#else
- dvs2_coefs.ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
+ dvs2_coefs.ver_coefs.odd_real, dvs_ver_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->ver_coefs.odd_imag,
#ifndef ISP2401
- coefs->ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
+ coefs->ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
#else
- dvs2_coefs.ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
+ dvs2_coefs.ver_coefs.odd_imag, dvs_ver_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->ver_coefs.even_real,
#ifndef ISP2401
- coefs->ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
+ coefs->ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
#else
- dvs2_coefs.ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
+ dvs2_coefs.ver_coefs.even_real, dvs_ver_coef_bytes, from_user) ||
#endif
copy_from_compatible(css_param->dvs2_coeff->ver_coefs.even_imag,
#ifndef ISP2401
- coefs->ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
+ coefs->ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
#else
- dvs2_coefs.ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
+ dvs2_coefs.ver_coefs.even_imag, dvs_ver_coef_bytes, from_user)) {
#endif
ia_css_dvs2_coefficients_free(css_param->dvs2_coeff);
css_param->dvs2_coeff = NULL;
}
int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
- struct atomisp_dvs_6axis_config *source_6axis_config,
- struct atomisp_css_params *css_param,
- bool from_user)
+ struct atomisp_dvs_6axis_config *source_6axis_config,
+ struct atomisp_css_params *css_param,
+ bool from_user)
{
struct atomisp_css_dvs_6axis_config *dvs_6axis_config;
struct atomisp_css_dvs_6axis_config *old_6axis_config;
struct atomisp_css_dvs_6axis_config t_6axis_config;
#endif
struct ia_css_stream *stream =
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
int ret = -EFAULT;
if (!stream) {
#ifdef ISP2401
if (copy_from_compatible(&t_6axis_config, source_6axis_config,
- sizeof(struct atomisp_dvs_6axis_config),
- from_user)) {
+ sizeof(struct atomisp_dvs_6axis_config),
+ from_user)) {
dev_err(asd->isp->dev, "copy morph table failed!");
return -EFAULT;
}
if (copy_from_compatible(dvs_6axis_config->xcoords_y,
#ifndef ISP2401
- source_6axis_config->xcoords_y,
- source_6axis_config->width_y *
- source_6axis_config->height_y *
- sizeof(*source_6axis_config->xcoords_y),
+ source_6axis_config->xcoords_y,
+ source_6axis_config->width_y *
+ source_6axis_config->height_y *
+ sizeof(*source_6axis_config->xcoords_y),
#else
- t_6axis_config.xcoords_y,
- t_6axis_config.width_y *
- t_6axis_config.height_y *
- sizeof(*dvs_6axis_config->xcoords_y),
+ t_6axis_config.xcoords_y,
+ t_6axis_config.width_y *
+ t_6axis_config.height_y *
+ sizeof(*dvs_6axis_config->xcoords_y),
#endif
- from_user))
+ from_user))
goto error;
if (copy_from_compatible(dvs_6axis_config->ycoords_y,
#ifndef ISP2401
- source_6axis_config->ycoords_y,
- source_6axis_config->width_y *
- source_6axis_config->height_y *
- sizeof(*source_6axis_config->ycoords_y),
+ source_6axis_config->ycoords_y,
+ source_6axis_config->width_y *
+ source_6axis_config->height_y *
+ sizeof(*source_6axis_config->ycoords_y),
#else
- t_6axis_config.ycoords_y,
- t_6axis_config.width_y *
- t_6axis_config.height_y *
- sizeof(*dvs_6axis_config->ycoords_y),
+ t_6axis_config.ycoords_y,
+ t_6axis_config.width_y *
+ t_6axis_config.height_y *
+ sizeof(*dvs_6axis_config->ycoords_y),
#endif
- from_user))
+ from_user))
goto error;
if (copy_from_compatible(dvs_6axis_config->xcoords_uv,
#ifndef ISP2401
- source_6axis_config->xcoords_uv,
- source_6axis_config->width_uv *
- source_6axis_config->height_uv *
- sizeof(*source_6axis_config->xcoords_uv),
+ source_6axis_config->xcoords_uv,
+ source_6axis_config->width_uv *
+ source_6axis_config->height_uv *
+ sizeof(*source_6axis_config->xcoords_uv),
#else
- t_6axis_config.xcoords_uv,
- t_6axis_config.width_uv *
- t_6axis_config.height_uv *
- sizeof(*dvs_6axis_config->xcoords_uv),
+ t_6axis_config.xcoords_uv,
+ t_6axis_config.width_uv *
+ t_6axis_config.height_uv *
+ sizeof(*dvs_6axis_config->xcoords_uv),
#endif
- from_user))
+ from_user))
goto error;
if (copy_from_compatible(dvs_6axis_config->ycoords_uv,
#ifndef ISP2401
- source_6axis_config->ycoords_uv,
- source_6axis_config->width_uv *
- source_6axis_config->height_uv *
- sizeof(*source_6axis_config->ycoords_uv),
+ source_6axis_config->ycoords_uv,
+ source_6axis_config->width_uv *
+ source_6axis_config->height_uv *
+ sizeof(*source_6axis_config->ycoords_uv),
#else
- t_6axis_config.ycoords_uv,
- t_6axis_config.width_uv *
- t_6axis_config.height_uv *
- sizeof(*dvs_6axis_config->ycoords_uv),
+ t_6axis_config.ycoords_uv,
+ t_6axis_config.width_uv *
+ t_6axis_config.height_uv *
+ sizeof(*dvs_6axis_config->ycoords_uv),
#endif
- from_user))
+ from_user))
goto error;
css_param->dvs_6axis = dvs_6axis_config;
css_param->update_flag.dvs_6axis_config =
- (struct atomisp_dvs_6axis_config *)dvs_6axis_config;
+ (struct atomisp_dvs_6axis_config *)dvs_6axis_config;
return 0;
error:
}
int atomisp_cp_morph_table(struct atomisp_sub_device *asd,
- struct atomisp_morph_table *source_morph_table,
- struct atomisp_css_params *css_param,
- bool from_user)
+ struct atomisp_morph_table *source_morph_table,
+ struct atomisp_css_params *css_param,
+ bool from_user)
{
int ret = -EFAULT;
unsigned int i;
#endif
morph_table = atomisp_css_morph_table_allocate(
#ifndef ISP2401
- source_morph_table->width,
- source_morph_table->height);
+ source_morph_table->width,
+ source_morph_table->height);
#else
- mtbl.width,
- mtbl.height);
+ mtbl.width,
+ mtbl.height);
#endif
if (!morph_table)
return -ENOMEM;
for (i = 0; i < CSS_MORPH_TABLE_NUM_PLANES; i++) {
if (copy_from_compatible(morph_table->coordinates_x[i],
- (__force void *)source_morph_table->coordinates_x[i],
+ (__force void *)source_morph_table->coordinates_x[i],
#ifndef ISP2401
- source_morph_table->height * source_morph_table->width *
- sizeof(*source_morph_table->coordinates_x[i]),
+ source_morph_table->height * source_morph_table->width *
+ sizeof(*source_morph_table->coordinates_x[i]),
#else
- mtbl.height * mtbl.width *
- sizeof(*morph_table->coordinates_x[i]),
+ mtbl.height * mtbl.width *
+ sizeof(*morph_table->coordinates_x[i]),
#endif
- from_user))
+ from_user))
goto error;
if (copy_from_compatible(morph_table->coordinates_y[i],
- (__force void *)source_morph_table->coordinates_y[i],
+ (__force void *)source_morph_table->coordinates_y[i],
#ifndef ISP2401
- source_morph_table->height * source_morph_table->width *
- sizeof(*source_morph_table->coordinates_y[i]),
+ source_morph_table->height * source_morph_table->width *
+ sizeof(*source_morph_table->coordinates_y[i]),
#else
- mtbl.height * mtbl.width *
- sizeof(*morph_table->coordinates_y[i]),
+ mtbl.height * mtbl.width *
+ sizeof(*morph_table->coordinates_y[i]),
#endif
- from_user))
+ from_user))
goto error;
}
if (old_morph_table)
atomisp_css_morph_table_free(old_morph_table);
css_param->update_flag.morph_table =
- (struct atomisp_morph_table *)morph_table;
+ (struct atomisp_morph_table *)morph_table;
return 0;
error:
if (ret)
return ret;
ret = atomisp_css_cp_dvs2_coefs(asd,
- (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
- css_param, false);
+ (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
+ css_param, false);
if (ret)
return ret;
ret = atomisp_cp_dvs_6axis_config(asd, arg->dvs_6axis_config,
return;
list_for_each_entry_safe(vb, vb_tmp,
- &pipe->buffers_waiting_for_param, queue) {
+ &pipe->buffers_waiting_for_param, queue) {
if (pipe->frame_request_config_id[vb->i]) {
list_for_each_entry_safe(param, param_tmp,
- &pipe->per_frame_params, list) {
+ &pipe->per_frame_params, list) {
if (pipe->frame_request_config_id[vb->i] !=
param->params.isp_config_id)
continue;
atomisp_wdt_start(pipe);
else
atomisp_wdt_refresh_pipe(pipe,
- ATOMISP_WDT_KEEP_CURRENT_DELAY);
+ ATOMISP_WDT_KEEP_CURRENT_DELAY);
}
#endif
}
* Function to configure ISP parameters
*/
int atomisp_set_parameters(struct video_device *vdev,
- struct atomisp_parameters *arg)
+ struct atomisp_parameters *arg)
{
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
struct atomisp_sub_device *asd = pipe->asd;
return -EINVAL;
}
- dev_dbg(asd->isp->dev, "%s: set parameter(per_frame_setting %d) for asd%d with isp_config_id %d of %s\n",
+ dev_dbg(asd->isp->dev,
+ "%s: set parameter(per_frame_setting %d) for asd%d with isp_config_id %d of %s\n",
__func__, arg->per_frame_setting, asd->index,
arg->isp_config_id, vdev->name);
#ifdef ISP2401
goto apply_parameter_failed;
ret = atomisp_css_cp_dvs2_coefs(asd,
- (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
- css_param, true);
+ (struct ia_css_dvs2_coefficients *)arg->dvs2_coefs,
+ css_param, true);
if (ret)
goto apply_parameter_failed;
{
struct atomisp_device *isp = asd->isp;
struct ia_css_pipe_config *vp_cfg =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- pipe_configs[IA_CSS_PIPE_ID_VIDEO];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
+ pipe_configs[IA_CSS_PIPE_ID_VIDEO];
/* Read parameter for 3A binary info */
if (flag == 0) {
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(
- &asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(
+ &asd->params.curr_grid_info);
if (!&config->info) {
dev_err(isp->dev, "ERROR: NULL pointer in grid_info\n");
/* update dvs grid info */
if (dvs_grid_info)
memcpy(&config->dvs_grid,
- dvs_grid_info,
- sizeof(struct atomisp_css_dvs_grid_info));
+ dvs_grid_info,
+ sizeof(struct atomisp_css_dvs_grid_info));
if (asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
config->dvs_envelop.width = 0;
if (!asd->continuous_mode->val) {
config->dvs_envelop.width = vp_cfg->dvs_envelope.width;
config->dvs_envelop.height =
- vp_cfg->dvs_envelope.height;
+ vp_cfg->dvs_envelope.height;
} else {
unsigned int dvs_w, dvs_h, dvs_w_max, dvs_h_max;
} else {
/* Set bad pixel to isp parameters */
memcpy(&asd->params.css_param.dp_config, config,
- sizeof(asd->params.css_param.dp_config));
+ sizeof(asd->params.css_param.dp_config));
atomisp_css_set_dp_config(asd, &asd->params.css_param.dp_config);
asd->params.css_update_params_needed = true;
}
static int
atomisp_v4l2_framebuffer_to_css_frame(const struct v4l2_framebuffer *arg,
- struct atomisp_css_frame **result)
+ struct atomisp_css_frame **result)
{
struct atomisp_css_frame *res = NULL;
unsigned int padded_width;
sh_format = v4l2_fmt_to_sh_fmt(arg->fmt.pixelformat);
padded_width = atomisp_bytesperline_to_padded_width(
- arg->fmt.bytesperline, sh_format);
+ arg->fmt.bytesperline, sh_format);
/* Note: the padded width on an atomisp_css_frame is in elements, not in
bytes. The RAW frame we use here should always be a 16bit RAW
frame. This is why we bytesperline/2 is equal to the padded with */
if (atomisp_css_frame_allocate(&res, arg->fmt.width, arg->fmt.height,
- sh_format, padded_width, 0)) {
+ sh_format, padded_width, 0)) {
ret = -ENOMEM;
goto err;
}
* Function to configure white balance params
*/
int atomisp_white_balance_param(struct atomisp_sub_device *asd, int flag,
- struct atomisp_wb_config *config)
+ struct atomisp_wb_config *config)
{
if (flag == 0) {
/* Get white balance from current setup */
struct atomisp_device *isp = asd->isp;
mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
if (!mipi_info)
return -EINVAL;
}
static void __atomisp_update_stream_env(struct atomisp_sub_device *asd,
- u16 stream_index, struct atomisp_input_stream_info *stream_info)
+ u16 stream_index, struct atomisp_input_stream_info *stream_info)
{
int i;
asd->stream_env[stream_index].isys_configs = stream_info->isys_configs;
for (i = 0; i < stream_info->isys_configs; i++) {
asd->stream_env[stream_index].isys_info[i].input_format =
- stream_info->isys_info[i].input_format;
+ stream_info->isys_info[i].input_format;
asd->stream_env[stream_index].isys_info[i].width =
- stream_info->isys_info[i].width;
+ stream_info->isys_info[i].width;
asd->stream_env[stream_index].isys_info[i].height =
- stream_info->isys_info[i].height;
+ stream_info->isys_info[i].height;
}
}
static void __atomisp_init_stream_info(u16 stream_index,
- struct atomisp_input_stream_info *stream_info)
+ struct atomisp_input_stream_info *stream_info)
{
int i;
/* This function looks up the closest available resolution. */
int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
- bool *res_overflow)
+ bool *res_overflow)
{
struct atomisp_device *isp = video_get_drvdata(vdev);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
/* app vs isp */
f->fmt.pix.width = rounddown(
- clamp_t(u32, f->fmt.pix.width, ATOM_ISP_MIN_WIDTH,
- ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
+ clamp_t(u32, f->fmt.pix.width, ATOM_ISP_MIN_WIDTH,
+ ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
f->fmt.pix.height = rounddown(
- clamp_t(u32, f->fmt.pix.height, ATOM_ISP_MIN_HEIGHT,
- ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
+ clamp_t(u32, f->fmt.pix.height, ATOM_ISP_MIN_HEIGHT,
+ ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
return 0;
}
}
enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
- enum atomisp_camera_port port)
+ enum atomisp_camera_port port)
{
switch (port) {
case ATOMISP_CAMERA_PORT_PRIMARY:
- return MIPI_PORT0_ID;
+ return MIPI_PORT0_ID;
case ATOMISP_CAMERA_PORT_SECONDARY:
return MIPI_PORT1_ID;
case ATOMISP_CAMERA_PORT_TERTIARY:
if (MIPI_PORT1_ID + 1 != N_MIPI_PORT_ID)
return MIPI_PORT1_ID + 1;
- /* go through down for else case */
+ /* go through down for else case */
default:
dev_err(isp->dev, "unsupported port: %d\n", port);
return MIPI_PORT0_ID;
}
static inline int atomisp_set_sensor_mipi_to_isp(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- struct camera_mipi_info *mipi_info)
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ struct camera_mipi_info *mipi_info)
{
struct v4l2_control ctrl;
struct atomisp_device *isp = asd->isp;
if (asd->stream_env[stream_id].isys_configs == 1) {
input_format =
- asd->stream_env[stream_id].isys_info[0].input_format;
+ asd->stream_env[stream_id].isys_info[0].input_format;
atomisp_css_isys_set_format(asd, stream_id,
- input_format, IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX);
+ input_format, IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX);
} else if (asd->stream_env[stream_id].isys_configs == 2) {
atomisp_css_isys_two_stream_cfg_update_stream1(
- asd, stream_id,
- asd->stream_env[stream_id].isys_info[0].input_format,
- asd->stream_env[stream_id].isys_info[0].width,
- asd->stream_env[stream_id].isys_info[0].height);
+ asd, stream_id,
+ asd->stream_env[stream_id].isys_info[0].input_format,
+ asd->stream_env[stream_id].isys_info[0].width,
+ asd->stream_env[stream_id].isys_info[0].height);
atomisp_css_isys_two_stream_cfg_update_stream2(
- asd, stream_id,
- asd->stream_env[stream_id].isys_info[1].input_format,
- asd->stream_env[stream_id].isys_info[1].width,
- asd->stream_env[stream_id].isys_info[1].height);
+ asd, stream_id,
+ asd->stream_env[stream_id].isys_info[1].input_format,
+ asd->stream_env[stream_id].isys_info[1].width,
+ asd->stream_env[stream_id].isys_info[1].height);
}
/* Compatibility for sensors which provide no media bus code
/* Input stream config is still needs configured */
/* TODO: Check if this is necessary */
fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
- mipi_info->input_format);
+ mipi_info->input_format);
if (!fc)
return -EINVAL;
input_format = fc->css_stream_fmt;
atomisp_css_input_set_bayer_order(asd, stream_id, bayer_order);
fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
- mipi_info->metadata_format);
+ mipi_info->metadata_format);
if (!fc)
return -EINVAL;
input_format = fc->css_stream_fmt;
atomisp_css_input_configure_port(asd,
- __get_mipi_port(asd->isp, mipi_info->port),
- mipi_info->num_lanes,
- 0xffff4, mipi_freq,
- input_format,
- mipi_info->metadata_width,
- mipi_info->metadata_height);
+ __get_mipi_port(asd->isp, mipi_info->port),
+ mipi_info->num_lanes,
+ 0xffff4, mipi_freq,
+ input_format,
+ mipi_info->metadata_width,
+ mipi_info->metadata_height);
return 0;
}
#endif
/* in case of ANR, force capture pipe to offline mode */
atomisp_css_capture_enable_online(asd, ATOMISP_INPUT_STREAM_GENERAL,
- asd->params.low_light ? false : !enable);
+ asd->params.low_light ? false : !enable);
atomisp_css_preview_enable_online(asd, ATOMISP_INPUT_STREAM_GENERAL,
- !enable);
+ !enable);
atomisp_css_enable_continuous(asd, enable);
atomisp_css_enable_cvf(asd, asd->continuous_viewfinder->val);
if (atomisp_css_continuous_set_num_raw_frames(asd,
- asd->continuous_raw_buffer_size->val)) {
+ asd->continuous_raw_buffer_size->val)) {
dev_err(isp->dev, "css_continuous_set_num_raw_frames failed\n");
return -EINVAL;
}
* handled in CSS when the input resolution is changed.
*/
static int css_input_resolution_changed(struct atomisp_sub_device *asd,
- struct v4l2_mbus_framefmt *ffmt)
+ struct v4l2_mbus_framefmt *ffmt)
{
struct atomisp_metadata_buf *md_buf = NULL, *_md_buf;
unsigned int i;
}
static int atomisp_set_fmt_to_isp(struct video_device *vdev,
- struct atomisp_css_frame_info *output_info,
- struct atomisp_css_frame_info *raw_output_info,
- struct v4l2_pix_format *pix,
- unsigned int source_pad)
+ struct atomisp_css_frame_info *output_info,
+ struct atomisp_css_frame_info *raw_output_info,
+ struct v4l2_pix_format *pix,
+ unsigned int source_pad)
{
struct camera_mipi_info *mipi_info;
struct atomisp_device *isp = video_get_drvdata(vdev);
unsigned int width, unsigned int height,
unsigned int min_width,
enum atomisp_css_frame_format sh_fmt) =
- configure_output_nop;
+ configure_output_nop;
int (*get_frame_info)(struct atomisp_sub_device *asd,
struct atomisp_css_frame_info *finfo) =
- get_frame_info_nop;
+ get_frame_info_nop;
int (*configure_pp_input)(struct atomisp_sub_device *asd,
unsigned int width, unsigned int height) =
- configure_pp_input_nop;
+ configure_pp_input_nop;
u16 stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
const struct atomisp_in_fmt_conv *fc;
int ret;
v4l2_fh_init(&fh.vfh, vdev);
isp_sink_crop = atomisp_subdev_get_rect(
- &asd->subdev, NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
+ &asd->subdev, NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK, V4L2_SEL_TGT_CROP);
format = atomisp_get_format_bridge(pix->pixelformat);
if (!format)
return -EINVAL;
if (isp->inputs[asd->input_curr].type != TEST_PATTERN &&
- isp->inputs[asd->input_curr].type != FILE_INPUT) {
+ isp->inputs[asd->input_curr].type != FILE_INPUT) {
mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
if (!mipi_info) {
dev_err(isp->dev, "mipi_info is NULL\n");
return -EINVAL;
}
if (atomisp_set_sensor_mipi_to_isp(asd, stream_index,
- mipi_info))
+ mipi_info))
return -EINVAL;
fc = atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
- mipi_info->input_format);
+ mipi_info->input_format);
if (!fc)
fc = atomisp_find_in_fmt_conv(
- atomisp_subdev_get_ffmt(&asd->subdev,
- NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK)->code);
+ atomisp_subdev_get_ffmt(&asd->subdev,
+ NULL, V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK)->code);
if (!fc)
return -EINVAL;
if (format->sh_fmt == CSS_FRAME_FORMAT_RAW &&
- raw_output_format_match_input(fc->css_stream_fmt,
- pix->pixelformat))
+ raw_output_format_match_input(fc->css_stream_fmt,
+ pix->pixelformat))
return -EINVAL;
}
if (asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER) {
atomisp_css_video_configure_viewfinder(asd,
- vf_size.width, vf_size.height, 0,
- asd->video_out_vf.sh_fmt);
+ vf_size.width, vf_size.height, 0,
+ asd->video_out_vf.sh_fmt);
} else if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO)
atomisp_css_video_configure_viewfinder(asd,
- vf_size.width, vf_size.height, 0,
- asd->video_out_vf.sh_fmt);
+ vf_size.width, vf_size.height, 0,
+ asd->video_out_vf.sh_fmt);
else
atomisp_css_capture_configure_viewfinder(asd,
vf_size.width, vf_size.height, 0,
asd->video_out_vf.sh_fmt);
} else if (source_pad != ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
- asd->vfpp->val == ATOMISP_VFPP_DISABLE_LOWLAT) {
+ asd->vfpp->val == ATOMISP_VFPP_DISABLE_LOWLAT) {
atomisp_css_capture_configure_viewfinder(asd,
vf_size.width, vf_size.height, 0,
asd->video_out_vf.sh_fmt);
atomisp_css_input_set_mode(asd, CSS_INPUT_MODE_SENSOR);
atomisp_css_disable_vf_pp(asd,
- asd->vfpp->val != ATOMISP_VFPP_ENABLE);
+ asd->vfpp->val != ATOMISP_VFPP_ENABLE);
/* ISP2401 new input system need to use copy pipe */
if (asd->copy_mode) {
if (!asd->continuous_mode->val) {
configure_output = atomisp_css_video_configure_output;
get_frame_info =
- atomisp_css_video_get_output_frame_info;
+ atomisp_css_video_get_output_frame_info;
pipe_id = CSS_PIPE_ID_VIDEO;
} else {
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ||
source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
configure_output =
- atomisp_css_video_configure_output;
+ atomisp_css_video_configure_output;
get_frame_info =
- atomisp_css_video_get_output_frame_info;
+ atomisp_css_video_get_output_frame_info;
configure_pp_input =
- atomisp_css_video_configure_pp_input;
+ atomisp_css_video_configure_pp_input;
pipe_id = CSS_PIPE_ID_VIDEO;
} else {
configure_output =
- atomisp_css_capture_configure_output;
+ atomisp_css_capture_configure_output;
get_frame_info =
- atomisp_css_capture_get_output_frame_info;
+ atomisp_css_capture_get_output_frame_info;
configure_pp_input =
- atomisp_css_capture_configure_pp_input;
+ atomisp_css_capture_configure_pp_input;
pipe_id = CSS_PIPE_ID_CAPTURE;
atomisp_update_capture_mode(asd);
if (!asd->continuous_mode->val)
/* in case of ANR, force capture pipe to offline mode */
atomisp_css_capture_enable_online(asd, stream_index,
- asd->params.low_light ?
- false : asd->params.online_process);
+ asd->params.low_light ?
+ false : asd->params.online_process);
configure_output = atomisp_css_capture_configure_output;
get_frame_info = atomisp_css_capture_get_output_frame_info;
if (!asd->params.online_process &&
!asd->continuous_mode->val) {
ret = atomisp_css_capture_get_output_raw_frame_info(asd,
- raw_output_info);
+ raw_output_info);
if (ret)
return ret;
}
if (!asd->continuous_mode->val && asd->run_mode->val
!= ATOMISP_RUN_MODE_STILL_CAPTURE) {
dev_err(isp->dev,
- "Need to set the running mode first\n");
+ "Need to set the running mode first\n");
asd->run_mode->val = ATOMISP_RUN_MODE_STILL_CAPTURE;
}
}
if (asd->copy_mode)
ret = atomisp_css_copy_configure_output(asd, stream_index,
- pix->width, pix->height,
- format->planar ? pix->bytesperline :
- pix->bytesperline * 8 / format->depth,
- format->sh_fmt);
+ pix->width, pix->height,
+ format->planar ? pix->bytesperline :
+ pix->bytesperline * 8 / format->depth,
+ format->sh_fmt);
else
ret = configure_output(asd, pix->width, pix->height,
format->planar ? pix->bytesperline :
}
if (asd->copy_mode)
ret = atomisp_css_copy_get_output_frame_info(asd, stream_index,
- output_info);
+ output_info);
else
ret = get_frame_info(asd, output_info);
if (ret) {
if (!asd->continuous_mode->val &&
!asd->params.online_process && !isp->sw_contex.file_input &&
- atomisp_css_frame_allocate_from_info(&asd->raw_output_frame,
- raw_output_info))
+ atomisp_css_frame_allocate_from_info(&asd->raw_output_frame,
+ raw_output_info))
return -ENOMEM;
return 0;
}
static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int *dvs_env_w, unsigned int *dvs_env_h)
+ unsigned int width, unsigned int height,
+ unsigned int *dvs_env_w, unsigned int *dvs_env_h)
{
struct atomisp_device *isp = asd->isp;
}
static void atomisp_check_copy_mode(struct atomisp_sub_device *asd,
- int source_pad, struct v4l2_format *f)
+ int source_pad, struct v4l2_format *f)
{
#if defined(ISP2401_NEW_INPUT_SYSTEM)
struct v4l2_mbus_framefmt *sink, *src;
sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK);
+ V4L2_SUBDEV_FORMAT_ACTIVE, ATOMISP_SUBDEV_PAD_SINK);
src = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
+ V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
if ((sink->code == src->code &&
- sink->width == f->fmt.pix.width &&
- sink->height == f->fmt.pix.height) ||
+ sink->width == f->fmt.pix.width &&
+ sink->height == f->fmt.pix.height) ||
((asd->isp->inputs[asd->input_curr].type == SOC_CAMERA) &&
- (asd->isp->inputs[asd->input_curr].camera_caps->
- sensor[asd->sensor_curr].stream_num > 1)))
+ (asd->isp->inputs[asd->input_curr].camera_caps->
+ sensor[asd->sensor_curr].stream_num > 1)))
asd->copy_mode = true;
else
#endif
}
static int atomisp_set_fmt_to_snr(struct video_device *vdev,
- struct v4l2_format *f, unsigned int pixelformat,
- unsigned int padding_w, unsigned int padding_h,
- unsigned int dvs_env_w, unsigned int dvs_env_h)
+ struct v4l2_format *f, unsigned int pixelformat,
+ unsigned int padding_w, unsigned int padding_h,
+ unsigned int dvs_env_w, unsigned int dvs_env_h)
{
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
const struct atomisp_format_bridge *format;
source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
vformat.which = V4L2_SUBDEV_FORMAT_TRY;
ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- pad, set_fmt, &pad_cfg, &vformat);
+ pad, set_fmt, &pad_cfg, &vformat);
if (ret)
return ret;
if (ffmt->width < req_ffmt->width ||
req_ffmt->width -= dvs_env_w;
ffmt = req_ffmt;
dev_warn(isp->dev,
- "can not enable video dis due to sensor limitation.");
+ "can not enable video dis due to sensor limitation.");
asd->params.video_dis_en = false;
}
}
if (ffmt->width < ATOM_ISP_STEP_WIDTH ||
ffmt->height < ATOM_ISP_STEP_HEIGHT)
- return -EINVAL;
+ return -EINVAL;
if (asd->params.video_dis_en &&
source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO &&
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VF ||
(source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW
- && asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)) {
+ && asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)) {
if (asd->fmt_auto->val) {
struct v4l2_rect *capture_comp;
struct v4l2_rect r = {0};
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
capture_comp = atomisp_subdev_get_rect(
- &asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SOURCE_VIDEO,
- V4L2_SEL_TGT_COMPOSE);
+ &asd->subdev, NULL,
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SOURCE_VIDEO,
+ V4L2_SEL_TGT_COMPOSE);
else
capture_comp = atomisp_subdev_get_rect(
- &asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE,
- V4L2_SEL_TGT_COMPOSE);
+ &asd->subdev, NULL,
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE,
+ V4L2_SEL_TGT_COMPOSE);
if (capture_comp->width < r.width
|| capture_comp->height < r.height) {
}
atomisp_subdev_set_selection(
- &asd->subdev, fh.pad,
- V4L2_SUBDEV_FORMAT_ACTIVE, source_pad,
- V4L2_SEL_TGT_COMPOSE, 0, &r);
+ &asd->subdev, fh.pad,
+ V4L2_SUBDEV_FORMAT_ACTIVE, source_pad,
+ V4L2_SEL_TGT_COMPOSE, 0, &r);
f->fmt.pix.width = r.width;
f->fmt.pix.height = r.height;
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
(asd->isp->inputs[asd->input_curr].type == SOC_CAMERA) &&
(asd->isp->inputs[asd->input_curr].camera_caps->
- sensor[asd->sensor_curr].stream_num > 1)) {
+ sensor[asd->sensor_curr].stream_num > 1)) {
/* For M10MO outputing YUV preview images. */
u16 video_index =
- atomisp_source_pad_to_stream_id(asd,
- ATOMISP_SUBDEV_PAD_SOURCE_VIDEO);
+ atomisp_source_pad_to_stream_id(asd,
+ ATOMISP_SUBDEV_PAD_SOURCE_VIDEO);
ret = atomisp_css_copy_get_output_frame_info(asd,
video_index, &output_info);
if (ret) {
dev_err(isp->dev,
- "copy_get_output_frame_info ret %i", ret);
+ "copy_get_output_frame_info ret %i", ret);
return -EINVAL;
}
if (!asd->yuvpp_mode) {
*/
asd->yuvpp_mode = true;
ret = atomisp_css_copy_configure_output(
- asd, video_index, 0, 0, 0, 0);
+ asd, video_index, 0, 0, 0, 0);
if (ret) {
dev_err(isp->dev,
"failed to disable copy pipe");
return -EINVAL;
}
ret = atomisp_css_yuvpp_configure_output(
- asd, video_index,
- output_info.res.width,
- output_info.res.height,
- output_info.padded_width,
- output_info.format);
+ asd, video_index,
+ output_info.res.width,
+ output_info.res.height,
+ output_info.padded_width,
+ output_info.format);
if (ret) {
dev_err(isp->dev,
"failed to set up yuvpp pipe\n");
}
atomisp_css_video_enable_online(asd, false);
atomisp_css_preview_enable_online(asd,
- ATOMISP_INPUT_STREAM_GENERAL, false);
+ ATOMISP_INPUT_STREAM_GENERAL, false);
}
atomisp_css_yuvpp_configure_viewfinder(asd, video_index,
- f->fmt.pix.width, f->fmt.pix.height,
- format_bridge->planar ? f->fmt.pix.bytesperline
- : f->fmt.pix.bytesperline * 8
- / format_bridge->depth, format_bridge->sh_fmt);
+ f->fmt.pix.width, f->fmt.pix.height,
+ format_bridge->planar ? f->fmt.pix.bytesperline
+ : f->fmt.pix.bytesperline * 8
+ / format_bridge->depth, format_bridge->sh_fmt);
atomisp_css_yuvpp_get_viewfinder_frame_info(
- asd, video_index, &output_info);
+ asd, video_index, &output_info);
} else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW) {
atomisp_css_video_configure_viewfinder(asd,
- f->fmt.pix.width, f->fmt.pix.height,
- format_bridge->planar ? f->fmt.pix.bytesperline
- : f->fmt.pix.bytesperline * 8
- / format_bridge->depth, format_bridge->sh_fmt);
+ f->fmt.pix.width, f->fmt.pix.height,
+ format_bridge->planar ? f->fmt.pix.bytesperline
+ : f->fmt.pix.bytesperline * 8
+ / format_bridge->depth, format_bridge->sh_fmt);
atomisp_css_video_get_viewfinder_frame_info(asd,
- &output_info);
+ &output_info);
asd->copy_mode = false;
} else {
atomisp_css_capture_configure_viewfinder(asd,
: f->fmt.pix.bytesperline * 8
/ format_bridge->depth, format_bridge->sh_fmt);
atomisp_css_capture_get_viewfinder_frame_info(asd,
- &output_info);
+ &output_info);
asd->copy_mode = false;
}
f->fmt.pix.height = snr_fmt.fmt.pix.height;
snr_format_bridge =
- atomisp_get_format_bridge(snr_fmt.fmt.pix.pixelformat);
+ atomisp_get_format_bridge(snr_fmt.fmt.pix.pixelformat);
if (!snr_format_bridge)
return -EINVAL;
atomisp_subdev_get_ffmt(&asd->subdev, NULL,
V4L2_SUBDEV_FORMAT_ACTIVE,
ATOMISP_SUBDEV_PAD_SINK)->code =
- snr_format_bridge->mbus_code;
+ snr_format_bridge->mbus_code;
isp_sink_fmt = *atomisp_subdev_get_ffmt(&asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK);
isp_source_fmt.code = format_bridge->mbus_code;
atomisp_subdev_set_ffmt(&asd->subdev, fh.pad,
/* construct resolution supported by isp */
if (res_overflow && !asd->continuous_mode->val) {
f->fmt.pix.width = rounddown(
- clamp_t(u32, f->fmt.pix.width - padding_w,
- ATOM_ISP_MIN_WIDTH,
- ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
+ clamp_t(u32, f->fmt.pix.width - padding_w,
+ ATOM_ISP_MIN_WIDTH,
+ ATOM_ISP_MAX_WIDTH), ATOM_ISP_STEP_WIDTH);
f->fmt.pix.height = rounddown(
- clamp_t(u32, f->fmt.pix.height - padding_h,
- ATOM_ISP_MIN_HEIGHT,
- ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
+ clamp_t(u32, f->fmt.pix.height - padding_h,
+ ATOM_ISP_MIN_HEIGHT,
+ ATOM_ISP_MAX_HEIGHT), ATOM_ISP_STEP_HEIGHT);
}
atomisp_get_dis_envelop(asd, f->fmt.pix.width, f->fmt.pix.height,
if (!asd->continuous_mode->val ||
isp_sink_fmt.width < (f->fmt.pix.width + padding_w + dvs_env_w) ||
isp_sink_fmt.height < (f->fmt.pix.height + padding_h +
- dvs_env_h)) {
+ dvs_env_h)) {
/*
* For jpeg or custom raw format the sensor will return constant
* width and height. Because we already had quried try_mbus_fmt,
s_fmt.fmt.pix.height = backup_fmt.fmt.pix.height;
}
ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
- f->fmt.pix.pixelformat, padding_w,
- padding_h, dvs_env_w, dvs_env_h);
+ f->fmt.pix.pixelformat, padding_w,
+ padding_h, dvs_env_w, dvs_env_h);
if (ret)
return -EINVAL;
asd->yuvpp_mode = false; /* Reset variable */
isp_sink_crop = *atomisp_subdev_get_rect(&asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK,
- V4L2_SEL_TGT_CROP);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK,
+ V4L2_SEL_TGT_CROP);
/* Try to enable YUV downscaling if ISP input is 10 % (either
* width or height) bigger than the desired result. */
if (isp_sink_crop.width * 9 / 10 < f->fmt.pix.width ||
isp_sink_crop.height * 9 / 10 < f->fmt.pix.height ||
(atomisp_subdev_format_conversion(asd, source_pad) &&
- ((asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
+ ((asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
!asd->continuous_mode->val) ||
asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER))) {
/* for continuous mode, preview size might be smaller than
&& source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW
&& !crop_needs_override) {
isp_sink_crop.width =
- max_t(unsigned int, f->fmt.pix.width,
- isp_sink_crop.width);
+ max_t(unsigned int, f->fmt.pix.width,
+ isp_sink_crop.width);
isp_sink_crop.height =
- max_t(unsigned int, f->fmt.pix.height,
- isp_sink_crop.height);
+ max_t(unsigned int, f->fmt.pix.height,
+ isp_sink_crop.height);
} else {
isp_sink_crop.width = f->fmt.pix.width;
isp_sink_crop.height = f->fmt.pix.height;
main_compose.width = isp_sink_crop.width;
main_compose.height =
- DIV_ROUND_UP(main_compose.width * f->fmt.pix.height,
- f->fmt.pix.width);
+ DIV_ROUND_UP(main_compose.width * f->fmt.pix.height,
+ f->fmt.pix.width);
if (main_compose.height > isp_sink_crop.height) {
main_compose.height = isp_sink_crop.height;
main_compose.width =
- DIV_ROUND_UP(main_compose.height *
- f->fmt.pix.width,
- f->fmt.pix.height);
+ DIV_ROUND_UP(main_compose.height *
+ f->fmt.pix.width,
+ f->fmt.pix.height);
}
atomisp_subdev_set_selection(&asd->subdev, fh.pad,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- source_pad,
- V4L2_SEL_TGT_COMPOSE, 0,
- &main_compose);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ source_pad,
+ V4L2_SEL_TGT_COMPOSE, 0,
+ &main_compose);
} else {
struct v4l2_rect sink_crop = {0};
struct v4l2_rect main_compose = {0};
isp_sink_crop.height * main_compose.width) {
sink_crop.height = isp_sink_crop.height;
sink_crop.width = DIV_NEAREST_STEP(
- sink_crop.height *
- f->fmt.pix.width,
- f->fmt.pix.height,
- ATOM_ISP_STEP_WIDTH);
+ sink_crop.height *
+ f->fmt.pix.width,
+ f->fmt.pix.height,
+ ATOM_ISP_STEP_WIDTH);
} else {
sink_crop.width = isp_sink_crop.width;
sink_crop.height = DIV_NEAREST_STEP(
- sink_crop.width *
- f->fmt.pix.height,
- f->fmt.pix.width,
- ATOM_ISP_STEP_HEIGHT);
+ sink_crop.width *
+ f->fmt.pix.height,
+ f->fmt.pix.width,
+ ATOM_ISP_STEP_HEIGHT);
}
atomisp_subdev_set_selection(&asd->subdev, fh.pad,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK,
- V4L2_SEL_TGT_CROP,
- V4L2_SEL_FLAG_KEEP_CONFIG,
- &sink_crop);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK,
+ V4L2_SEL_TGT_CROP,
+ V4L2_SEL_FLAG_KEEP_CONFIG,
+ &sink_crop);
}
atomisp_subdev_set_selection(&asd->subdev, fh.pad,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- source_pad,
- V4L2_SEL_TGT_COMPOSE, 0,
- &main_compose);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ source_pad,
+ V4L2_SEL_TGT_COMPOSE, 0,
+ &main_compose);
}
set_fmt_to_isp:
if (format_bridge->planar) {
pipe->pix.bytesperline = output_info.padded_width;
pipe->pix.sizeimage = PAGE_ALIGN(f->fmt.pix.height *
- DIV_ROUND_UP(format_bridge->depth *
- output_info.padded_width, 8));
+ DIV_ROUND_UP(format_bridge->depth *
+ output_info.padded_width, 8));
} else {
pipe->pix.bytesperline =
- DIV_ROUND_UP(format_bridge->depth *
- output_info.padded_width, 8);
+ DIV_ROUND_UP(format_bridge->depth *
+ output_info.padded_width, 8);
pipe->pix.sizeimage =
- PAGE_ALIGN(f->fmt.pix.height * pipe->pix.bytesperline);
+ PAGE_ALIGN(f->fmt.pix.height * pipe->pix.bytesperline);
}
if (f->fmt.pix.field == V4L2_FIELD_ANY)
f->fmt.pix.field = V4L2_FIELD_NONE;
format_bridge = atomisp_get_format_bridge(f->fmt.pix.pixelformat);
if (!format_bridge) {
dev_dbg(isp->dev, "atomisp_get_format_bridge err! fmt:0x%x\n",
- f->fmt.pix.pixelformat);
+ f->fmt.pix.pixelformat);
return -EINVAL;
}
pipe->pix = f->fmt.pix;
atomisp_css_input_set_mode(asd, CSS_INPUT_MODE_FIFO);
atomisp_css_input_configure_port(asd,
- __get_mipi_port(isp, ATOMISP_CAMERA_PORT_PRIMARY), 2, 0xffff4,
- 0, 0, 0, 0);
+ __get_mipi_port(isp, ATOMISP_CAMERA_PORT_PRIMARY), 2, 0xffff4,
+ 0, 0, 0, 0);
ffmt.width = f->fmt.pix.width;
ffmt.height = f->fmt.pix.height;
ffmt.code = format_bridge->mbus_code;
}
int atomisp_set_shading_table(struct atomisp_sub_device *asd,
- struct atomisp_shading_table *user_shading_table)
+ struct atomisp_shading_table *user_shading_table)
{
struct atomisp_css_shading_table *shading_table;
struct atomisp_css_shading_table *free_table;
return -EINVAL;
shading_table = atomisp_css_shading_table_alloc(
- user_shading_table->width, user_shading_table->height);
+ user_shading_table->width, user_shading_table->height);
if (!shading_table)
return -ENOMEM;
}
int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
- struct atomisp_cont_capture_conf *cvf_config)
+ struct atomisp_cont_capture_conf *cvf_config)
{
struct v4l2_ctrl *c;
if (asd->enable_raw_buffer_lock->val) {
init_raw_num =
- ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
+ ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
asd->params.video_dis_en)
init_raw_num +=
ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
} else {
init_raw_num =
- ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
+ ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
}
/* TODO: this can be removed once user-space
* has been updated to use control API */
asd->continuous_raw_buffer_size->val =
- max_t(int,
- asd->continuous_raw_buffer_size->val,
- asd->params.offline_parm.
- num_captures + init_raw_num);
+ max_t(int,
+ asd->continuous_raw_buffer_size->val,
+ asd->params.offline_parm.
+ num_captures + init_raw_num);
asd->continuous_raw_buffer_size->val =
- min_t(int, ATOMISP_CONT_RAW_FRAMES,
- asd->continuous_raw_buffer_size->val);
+ min_t(int, ATOMISP_CONT_RAW_FRAMES,
+ asd->continuous_raw_buffer_size->val);
}
asd->continuous_mode->val = true;
} else {
if (num_frames < 0) {
dev_dbg(isp->dev, "%s ERROR: num_frames: %d\n", __func__,
- num_frames);
+ num_frames);
return -EINVAL;
}
/* a requested flash is still in progress. */
if (num_frames && asd->params.flash_state != ATOMISP_FLASH_IDLE) {
dev_dbg(isp->dev, "%s flash busy: %d frames left: %d\n",
- __func__, asd->params.flash_state,
- asd->params.num_flash_frames);
+ __func__, asd->params.flash_state,
+ asd->params.num_flash_frames);
return -EBUSY;
}
}
int atomisp_source_pad_to_stream_id(struct atomisp_sub_device *asd,
- uint16_t source_pad)
+ uint16_t source_pad)
{
int stream_id;
struct atomisp_device *isp = asd->isp;
if (isp->inputs[asd->input_curr].camera_caps->
- sensor[asd->sensor_curr].stream_num == 1)
+ sensor[asd->sensor_curr].stream_num == 1)
return ATOMISP_INPUT_STREAM_GENERAL;
switch (source_pad) {
/* WORKAROUND unlock the raw buffer compulsively */
ret = atomisp_css_exp_id_unlock(asd, exp_id);
if (ret) {
- dev_err(asd->isp->dev, "%s exp_id is wrapping back to %d but force unlock failed,, err %d.\n",
+ dev_err(asd->isp->dev,
+ "%s exp_id is wrapping back to %d but force unlock failed,, err %d.\n",
__func__, exp_id, ret);
return ret;
}
(*bitmap) &= ~(1 << bit);
asd->raw_buffer_locked_count--;
spin_unlock_irqrestore(&asd->raw_buffer_bitmap_lock, flags);
- dev_warn(asd->isp->dev, "%s exp_id is wrapping back to %d but it is still locked so force unlock it, raw_buffer_locked_count %d\n",
- __func__, exp_id, asd->raw_buffer_locked_count);
+ dev_warn(asd->isp->dev,
+ "%s exp_id is wrapping back to %d but it is still locked so force unlock it, raw_buffer_locked_count %d\n",
+ __func__, exp_id, asd->raw_buffer_locked_count);
}
return 0;
}
}
int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
- unsigned int *enable)
+ unsigned int *enable)
{
bool value;
/* fail through */
dev_warn(asd->isp->dev, "%s failed to find proper pipe\n",
- __func__);
+ __func__);
return CSS_PIPE_ID_CAPTURE;
}
int atomisp_get_invalid_frame_num(struct video_device *vdev,
- int *invalid_frame_num)
+ int *invalid_frame_num)
{
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
struct atomisp_sub_device *asd = pipe->asd;
int ret;
if (asd->isp->inputs[asd->input_curr].camera_caps->
- sensor[asd->sensor_curr].stream_num > 1) {
+ sensor[asd->sensor_curr].stream_num > 1) {
/* External ISP */
*invalid_frame_num = 0;
return 0;
pipe_id = atomisp_get_pipe_id(pipe);
if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].pipes[pipe_id]) {
- dev_warn(asd->isp->dev, "%s pipe %d has not been created yet, do SET_FMT first!\n",
- __func__, pipe_id);
+ dev_warn(asd->isp->dev,
+ "%s pipe %d has not been created yet, do SET_FMT first!\n",
+ __func__, pipe_id);
return -EINVAL;
}
ret = ia_css_pipe_get_info(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipes[pipe_id], &p_info);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
+ .pipes[pipe_id], &p_info);
if (ret == IA_CSS_SUCCESS) {
*invalid_frame_num = p_info.num_invalid_frames;
return 0;
irqreturn_t atomisp_isr(int irq, void *dev);
irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr);
const struct atomisp_format_bridge *get_atomisp_format_bridge_from_mbus(
- u32 mbus_code);
+ u32 mbus_code);
bool atomisp_is_mbuscode_raw(uint32_t code);
int atomisp_get_frame_pgnr(struct atomisp_device *isp,
const struct atomisp_css_frame *frame, u32 *p_pgnr);
* ATOMISP_IOC_S_SENSOR_RUNMODE ioctl was called
*/
int atomisp_set_sensor_runmode(struct atomisp_sub_device *asd,
- struct atomisp_s_runmode *runmode);
+ struct atomisp_s_runmode *runmode);
/*
#endif
* Function to enable/disable lens geometry distortion correction (GDC) and
int atomisp_xnr(struct atomisp_sub_device *asd, int flag, int *arg);
int atomisp_formats(struct atomisp_sub_device *asd, int flag,
- struct atomisp_formats_config *config);
+ struct atomisp_formats_config *config);
/*
* Function to configure noise reduction
* Function to update gamma correction parameters
*/
int atomisp_gamma_correction(struct atomisp_sub_device *asd, int flag,
- struct atomisp_gc_config *config);
+ struct atomisp_gc_config *config);
/*
* Function to update Gdc table for gdc
* Function to get DVS2 BQ resolution settings
*/
int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
- struct atomisp_dvs2_bq_resolutions *bq_res);
+ struct atomisp_dvs2_bq_resolutions *bq_res);
/*
* Function to set the DIS coefficients.
struct atomisp_metadata *config);
int atomisp_get_metadata_by_type(struct atomisp_sub_device *asd, int flag,
- struct atomisp_metadata_with_type *config);
+ struct atomisp_metadata_with_type *config);
int atomisp_set_parameters(struct video_device *vdev,
- struct atomisp_parameters *arg);
+ struct atomisp_parameters *arg);
/*
* Function to set/get isp parameters to isp
*/
* Function set camera_prefiles.xml current sensor pixel array size
*/
int atomisp_set_array_res(struct atomisp_sub_device *asd,
- struct atomisp_resolution *config);
+ struct atomisp_resolution *config);
/*
* Function to calculate real zoom region for every pipe
*/
int atomisp_calculate_real_zoom_region(struct atomisp_sub_device *asd,
- struct atomisp_css_dz_config *dz_config,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct atomisp_css_dz_config *dz_config,
+ enum atomisp_css_pipe_id css_pipe_id);
int atomisp_cp_general_isp_parameters(struct atomisp_sub_device *asd,
struct atomisp_parameters *arg,
bool from_user);
int atomisp_cp_dvs_6axis_config(struct atomisp_sub_device *asd,
- struct atomisp_dvs_6axis_config *user_6axis_config,
- struct atomisp_css_params *css_param,
- bool from_user);
+ struct atomisp_dvs_6axis_config *user_6axis_config,
+ struct atomisp_css_params *css_param,
+ bool from_user);
int atomisp_makeup_css_parameters(struct atomisp_sub_device *asd,
struct atomisp_parameters *arg,
struct atomisp_css_params *css_param);
int atomisp_compare_grid(struct atomisp_sub_device *asd,
- struct atomisp_grid_info *atomgrid);
+ struct atomisp_grid_info *atomgrid);
int atomisp_get_sensor_mode_data(struct atomisp_sub_device *asd,
struct atomisp_sensor_mode_data *config);
/* This function looks up the closest available resolution. */
int atomisp_try_fmt(struct video_device *vdev, struct v4l2_format *f,
- bool *res_overflow);
+ bool *res_overflow);
int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f);
int atomisp_set_fmt_file(struct video_device *vdev, struct v4l2_format *f);
struct atomisp_shading_table *shading_table);
int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
- struct atomisp_cont_capture_conf *cvf_config);
+ struct atomisp_cont_capture_conf *cvf_config);
int atomisp_ospm_dphy_down(struct atomisp_device *isp);
int atomisp_ospm_dphy_up(struct atomisp_device *isp);
void atomisp_css_flush(struct atomisp_device *isp);
int atomisp_source_pad_to_stream_id(struct atomisp_sub_device *asd,
- uint16_t source_pad);
+ uint16_t source_pad);
/*
* Events. Only one event has to be exported for now.
void atomisp_eof_event(struct atomisp_sub_device *asd, uint8_t exp_id);
enum mipi_port_id __get_mipi_port(struct atomisp_device *isp,
- enum atomisp_camera_port port);
+ enum atomisp_camera_port port);
bool atomisp_is_vf_pipe(struct atomisp_video_pipe *pipe);
void atomisp_apply_css_parameters(
- struct atomisp_sub_device *asd,
- struct atomisp_css_params *css_param);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_params *css_param);
void atomisp_free_css_parameters(struct atomisp_css_params *css_param);
void atomisp_handle_parameter_and_buffer(struct atomisp_video_pipe *pipe);
* Function to enable/disable zoom for capture pipe
*/
int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
- unsigned int *enable);
+ unsigned int *enable);
/*
* Function to get metadata type bu pipe id
* pipeline output
*/
int atomisp_get_invalid_frame_num(struct video_device *vdev,
- int *invalid_frame_num);
+ int *invalid_frame_num);
int atomisp_mrfld_power_up(struct atomisp_device *isp);
int atomisp_mrfld_power_down(struct atomisp_device *isp);
unsigned int *infos);
void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
- unsigned int *infos);
+ unsigned int *infos);
void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
- unsigned int infos);
+ unsigned int infos);
int atomisp_css_irq_enable(struct atomisp_device *isp,
enum atomisp_css_irq_info info, bool enable);
int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
- struct videobuf_vmalloc_memory *vm_mem,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_buffer_type css_buf_type,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct videobuf_vmalloc_memory *vm_mem,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_buffer_type css_buf_type,
+ enum atomisp_css_pipe_id css_pipe_id);
int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_s3a_buf *s3a_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct atomisp_s3a_buf *s3a_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id);
int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_metadata_buf *metadata_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct atomisp_metadata_buf *metadata_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id);
int atomisp_q_dis_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_dis_buf *dis_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct atomisp_dis_buf *dis_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id);
void atomisp_css_mmu_invalidate_cache(void);
void atomisp_css_update_isp_params(struct atomisp_sub_device *asd);
void atomisp_css_update_isp_params_on_pipe(struct atomisp_sub_device *asd,
- struct ia_css_pipe *pipe);
+ struct ia_css_pipe *pipe);
int atomisp_css_queue_buffer(struct atomisp_sub_device *asd,
enum atomisp_input_stream_id stream_id,
struct atomisp_css_buffer *isp_css_buffer);
int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id pipe_id,
- enum atomisp_css_buffer_type buf_type,
- struct atomisp_css_buffer *isp_css_buffer);
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id pipe_id,
+ enum atomisp_css_buffer_type buf_type,
+ struct atomisp_css_buffer *isp_css_buffer);
int atomisp_css_allocate_stat_buffers(struct atomisp_sub_device *asd,
u16 stream_id,
void atomisp_css_free_dis_buffer(struct atomisp_dis_buf *dis_buf);
-void atomisp_css_free_metadata_buffer(struct atomisp_metadata_buf *metadata_buf);
+void atomisp_css_free_metadata_buffer(struct atomisp_metadata_buf
+ *metadata_buf);
int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
- enum atomisp_css_pipe_id pipe_id,
- int source_pad);
+ enum atomisp_css_pipe_id pipe_id,
+ int source_pad);
int atomisp_alloc_3a_output_buf(struct atomisp_sub_device *asd);
enum atomisp_input_format input_format);
void atomisp_css_isys_two_stream_cfg_update_stream1(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format input_format,
- unsigned int width, unsigned int height);
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format input_format,
+ unsigned int width, unsigned int height);
void atomisp_css_isys_two_stream_cfg_update_stream2(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format input_format,
- unsigned int width, unsigned int height);
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format input_format,
+ unsigned int width, unsigned int height);
int atomisp_css_input_set_resolution(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- struct v4l2_mbus_framefmt *ffmt);
+ enum atomisp_input_stream_id stream_id,
+ struct v4l2_mbus_framefmt *ffmt);
void atomisp_css_input_set_binning_factor(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- unsigned int bin_factor);
+ enum atomisp_input_stream_id stream_id,
+ unsigned int bin_factor);
void atomisp_css_input_set_bayer_order(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_bayer_order bayer_order);
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_bayer_order bayer_order);
void atomisp_css_input_set_format(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format format);
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format format);
int atomisp_css_input_set_effective_resolution(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- unsigned int width,
- unsigned int height);
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ unsigned int width,
+ unsigned int height);
void atomisp_css_video_set_dis_envelope(struct atomisp_sub_device *asd,
unsigned int dvs_w, unsigned int dvs_h);
void atomisp_css_input_set_two_pixels_per_clock(
- struct atomisp_sub_device *asd,
- bool two_ppc);
+ struct atomisp_sub_device *asd,
+ bool two_ppc);
void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
- bool enable);
+ bool enable);
void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable);
void atomisp_css_capture_set_mode(struct atomisp_sub_device *asd,
- enum atomisp_css_capture_mode mode);
+ enum atomisp_css_capture_mode mode);
void atomisp_css_input_set_mode(struct atomisp_sub_device *asd,
enum atomisp_css_input_mode mode);
void atomisp_css_capture_enable_online(struct atomisp_sub_device *asd,
- unsigned short stream_index, bool enable);
+ unsigned short stream_index, bool enable);
void atomisp_css_preview_enable_online(struct atomisp_sub_device *asd,
- unsigned short stream_index, bool enable);
+ unsigned short stream_index, bool enable);
void atomisp_css_video_enable_online(struct atomisp_sub_device *asd,
- bool enable);
+ bool enable);
void atomisp_css_enable_continuous(struct atomisp_sub_device *asd,
- bool enable);
+ bool enable);
void atomisp_css_enable_cvf(struct atomisp_sub_device *asd,
- bool enable);
+ bool enable);
int atomisp_css_input_configure_port(struct atomisp_sub_device *asd,
- enum mipi_port_id port,
- unsigned int num_lanes,
- unsigned int timeout,
- unsigned int mipi_freq,
- enum atomisp_input_format metadata_format,
- unsigned int metadata_width,
- unsigned int metadata_height);
+ enum mipi_port_id port,
+ unsigned int num_lanes,
+ unsigned int timeout,
+ unsigned int mipi_freq,
+ enum atomisp_input_format metadata_format,
+ unsigned int metadata_width,
+ unsigned int metadata_height);
int atomisp_css_frame_allocate(struct atomisp_css_frame **frame,
- unsigned int width, unsigned int height,
- enum atomisp_css_frame_format format,
- unsigned int padded_width,
- unsigned int raw_bit_depth);
+ unsigned int width, unsigned int height,
+ enum atomisp_css_frame_format format,
+ unsigned int padded_width,
+ unsigned int raw_bit_depth);
int atomisp_css_frame_allocate_from_info(struct atomisp_css_frame **frame,
- const struct atomisp_css_frame_info *info);
+ const struct atomisp_css_frame_info *info);
void atomisp_css_frame_free(struct atomisp_css_frame *frame);
int atomisp_css_frame_map(struct atomisp_css_frame **frame,
- const struct atomisp_css_frame_info *info,
- const void __user *data, uint16_t attribute,
- void *context);
+ const struct atomisp_css_frame_info *info,
+ const void __user *data, uint16_t attribute,
+ void *context);
int atomisp_css_set_black_frame(struct atomisp_sub_device *asd,
- const struct atomisp_css_frame *raw_black_frame);
+ const struct atomisp_css_frame *raw_black_frame);
int atomisp_css_allocate_continuous_frames(bool init_time,
- struct atomisp_sub_device *asd);
+ struct atomisp_sub_device *asd);
void atomisp_css_update_continuous_frames(struct atomisp_sub_device *asd);
void atomisp_destroy_pipes_stream_force(struct atomisp_sub_device *asd);
int atomisp_css_stop(struct atomisp_sub_device *asd,
- enum atomisp_css_pipe_id pipe_id, bool in_reset);
+ enum atomisp_css_pipe_id pipe_id, bool in_reset);
int atomisp_css_continuous_set_num_raw_frames(
- struct atomisp_sub_device *asd,
- int num_frames);
+ struct atomisp_sub_device *asd,
+ int num_frames);
void atomisp_css_disable_vf_pp(struct atomisp_sub_device *asd,
bool disable);
int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int padded_width,
- enum atomisp_css_frame_format format);
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int padded_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_yuvpp_configure_output(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int padded_width,
- enum atomisp_css_frame_format format);
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int padded_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_yuvpp_configure_viewfinder(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_yuvpp_get_output_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info);
int atomisp_css_yuvpp_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info);
int atomisp_css_preview_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_capture_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_video_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
- u16 source_pad,
- struct atomisp_css_frame_info *frame_info);
+ u16 source_pad,
+ struct atomisp_css_frame_info *frame_info);
int atomisp_css_video_configure_viewfinder(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_capture_configure_viewfinder(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format);
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format);
int atomisp_css_video_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_capture_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_copy_get_output_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info);
int atomisp_css_capture_get_output_raw_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_preview_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_capture_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_video_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info);
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info);
int atomisp_css_preview_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height);
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height);
int atomisp_css_capture_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height);
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height);
int atomisp_css_video_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height);
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height);
int atomisp_css_offline_capture_configure(struct atomisp_sub_device *asd,
- int num_captures, unsigned int skip, int offset);
+ int num_captures, unsigned int skip, int offset);
int atomisp_css_exp_id_capture(struct atomisp_sub_device *asd, int exp_id);
int atomisp_css_exp_id_unlock(struct atomisp_sub_device *asd, int exp_id);
void atomisp_css_request_flash(struct atomisp_sub_device *asd);
void atomisp_css_set_wb_config(struct atomisp_sub_device *asd,
- struct atomisp_css_wb_config *wb_config);
+ struct atomisp_css_wb_config *wb_config);
void atomisp_css_set_ob_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ob_config *ob_config);
+ struct atomisp_css_ob_config *ob_config);
void atomisp_css_set_dp_config(struct atomisp_sub_device *asd,
- struct atomisp_css_dp_config *dp_config);
+ struct atomisp_css_dp_config *dp_config);
void atomisp_css_set_de_config(struct atomisp_sub_device *asd,
- struct atomisp_css_de_config *de_config);
+ struct atomisp_css_de_config *de_config);
void atomisp_css_set_dz_config(struct atomisp_sub_device *asd,
- struct atomisp_css_dz_config *dz_config);
+ struct atomisp_css_dz_config *dz_config);
void atomisp_css_set_default_de_config(struct atomisp_sub_device *asd);
void atomisp_css_set_ce_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ce_config *ce_config);
+ struct atomisp_css_ce_config *ce_config);
void atomisp_css_set_nr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_nr_config *nr_config);
+ struct atomisp_css_nr_config *nr_config);
void atomisp_css_set_ee_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ee_config *ee_config);
+ struct atomisp_css_ee_config *ee_config);
void atomisp_css_set_tnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_tnr_config *tnr_config);
+ struct atomisp_css_tnr_config *tnr_config);
void atomisp_css_set_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *cc_config);
+ struct atomisp_css_cc_config *cc_config);
void atomisp_css_set_macc_table(struct atomisp_sub_device *asd,
- struct atomisp_css_macc_table *macc_table);
+ struct atomisp_css_macc_table *macc_table);
void atomisp_css_set_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_gamma_table *gamma_table);
+ struct atomisp_css_gamma_table *gamma_table);
void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
- struct atomisp_css_ctc_table *ctc_table);
+ struct atomisp_css_ctc_table *ctc_table);
void atomisp_css_set_gc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_gc_config *gc_config);
+ struct atomisp_css_gc_config *gc_config);
void atomisp_css_set_3a_config(struct atomisp_sub_device *asd,
- struct atomisp_css_3a_config *s3a_config);
+ struct atomisp_css_3a_config *s3a_config);
void atomisp_css_video_set_dis_vector(struct atomisp_sub_device *asd,
- struct atomisp_dis_vector *vector);
+ struct atomisp_dis_vector *vector);
void atomisp_css_set_dvs2_coefs(struct atomisp_sub_device *asd,
struct ia_css_dvs2_coefficients *coefs);
int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
- struct atomisp_dis_coefficients *coefs);
+ struct atomisp_dis_coefficients *coefs);
void atomisp_css_set_zoom_factor(struct atomisp_sub_device *asd,
- unsigned int zoom);
+ unsigned int zoom);
int atomisp_css_get_wb_config(struct atomisp_sub_device *asd,
- struct atomisp_wb_config *config);
+ struct atomisp_wb_config *config);
int atomisp_css_get_ob_config(struct atomisp_sub_device *asd,
- struct atomisp_ob_config *config);
+ struct atomisp_ob_config *config);
int atomisp_css_get_dp_config(struct atomisp_sub_device *asd,
- struct atomisp_dp_config *config);
+ struct atomisp_dp_config *config);
int atomisp_css_get_de_config(struct atomisp_sub_device *asd,
- struct atomisp_de_config *config);
+ struct atomisp_de_config *config);
int atomisp_css_get_nr_config(struct atomisp_sub_device *asd,
- struct atomisp_nr_config *config);
+ struct atomisp_nr_config *config);
int atomisp_css_get_ee_config(struct atomisp_sub_device *asd,
- struct atomisp_ee_config *config);
+ struct atomisp_ee_config *config);
int atomisp_css_get_tnr_config(struct atomisp_sub_device *asd,
- struct atomisp_tnr_config *config);
+ struct atomisp_tnr_config *config);
int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
- struct atomisp_ctc_table *config);
+ struct atomisp_ctc_table *config);
int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_gamma_table *config);
+ struct atomisp_gamma_table *config);
int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
- struct atomisp_gc_config *config);
+ struct atomisp_gc_config *config);
int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
- struct atomisp_3a_config *config);
+ struct atomisp_3a_config *config);
int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
- struct atomisp_formats_config *formats_config);
+ struct atomisp_formats_config *formats_config);
void atomisp_css_set_formats_config(struct atomisp_sub_device *asd,
- struct atomisp_css_formats_config *formats_config);
+ struct atomisp_css_formats_config *formats_config);
int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
- unsigned int *zoom);
+ unsigned int *zoom);
struct atomisp_css_shading_table *atomisp_css_shading_table_alloc(
- unsigned int width, unsigned int height);
+ unsigned int width, unsigned int height);
void atomisp_css_set_shading_table(struct atomisp_sub_device *asd,
- struct atomisp_css_shading_table *table);
+ struct atomisp_css_shading_table *table);
void atomisp_css_shading_table_free(struct atomisp_css_shading_table *table);
struct atomisp_css_morph_table *atomisp_css_morph_table_allocate(
- unsigned int width, unsigned int height);
+ unsigned int width, unsigned int height);
void atomisp_css_set_morph_table(struct atomisp_sub_device *asd,
- struct atomisp_css_morph_table *table);
+ struct atomisp_css_morph_table *table);
void atomisp_css_get_morph_table(struct atomisp_sub_device *asd,
- struct atomisp_css_morph_table *table);
+ struct atomisp_css_morph_table *table);
void atomisp_css_morph_table_free(struct atomisp_css_morph_table *table);
void atomisp_css_set_cont_prev_start_time(struct atomisp_device *isp,
- unsigned int overlap);
+ unsigned int overlap);
int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
- struct atomisp_dis_statistics *stats);
+ struct atomisp_dis_statistics *stats);
int atomisp_css_update_stream(struct atomisp_sub_device *asd);
void atomisp_css_destroy_acc_pipe(struct atomisp_sub_device *asd);
int atomisp_css_load_acc_extension(struct atomisp_sub_device *asd,
- struct atomisp_css_fw_info *fw,
- enum atomisp_css_pipe_id pipe_id,
- unsigned int type);
+ struct atomisp_css_fw_info *fw,
+ enum atomisp_css_pipe_id pipe_id,
+ unsigned int type);
void atomisp_css_unload_acc_extension(struct atomisp_sub_device *asd,
- struct atomisp_css_fw_info *fw,
- enum atomisp_css_pipe_id pipe_id);
+ struct atomisp_css_fw_info *fw,
+ enum atomisp_css_pipe_id pipe_id);
int atomisp_css_wait_acc_finish(struct atomisp_sub_device *asd);
void atomisp_css_acc_done(struct atomisp_sub_device *asd);
int atomisp_css_load_acc_binary(struct atomisp_sub_device *asd,
- struct atomisp_css_fw_info *fw,
- unsigned int index);
+ struct atomisp_css_fw_info *fw,
+ unsigned int index);
void atomisp_css_unload_acc_binary(struct atomisp_sub_device *asd);
}
*mmu_base_addr = sh_mmu_mrfld.get_pd_base(&bo_device.mmu,
- bo_device.mmu.base_address);
+ bo_device.mmu.base_address);
return 0;
}
static void atomisp_isp_parameters_clean_up(
- struct atomisp_css_isp_config *config)
+ struct atomisp_css_isp_config *config)
{
/*
* Set NULL to configs pointer to avoid they are set into isp again when
pe_config = &stream_env->pipe_extra_configs[pipe_id];
dev_dbg(isp->dev, "dumping pipe[%d] config:\n", pipe_id);
dev_dbg(isp->dev,
- "pipe_config.pipe_mode:%d.\n", p_config->mode);
+ "pipe_config.pipe_mode:%d.\n", p_config->mode);
dev_dbg(isp->dev,
- "pipe_config.output_info[0] w=%d, h=%d.\n",
- p_config->output_info[0].res.width,
- p_config->output_info[0].res.height);
+ "pipe_config.output_info[0] w=%d, h=%d.\n",
+ p_config->output_info[0].res.width,
+ p_config->output_info[0].res.height);
dev_dbg(isp->dev,
- "pipe_config.vf_pp_in_res w=%d, h=%d.\n",
- p_config->vf_pp_in_res.width,
- p_config->vf_pp_in_res.height);
+ "pipe_config.vf_pp_in_res w=%d, h=%d.\n",
+ p_config->vf_pp_in_res.width,
+ p_config->vf_pp_in_res.height);
dev_dbg(isp->dev,
- "pipe_config.capt_pp_in_res w=%d, h=%d.\n",
- p_config->capt_pp_in_res.width,
- p_config->capt_pp_in_res.height);
+ "pipe_config.capt_pp_in_res w=%d, h=%d.\n",
+ p_config->capt_pp_in_res.width,
+ p_config->capt_pp_in_res.height);
dev_dbg(isp->dev,
- "pipe_config.output.padded w=%d.\n",
- p_config->output_info[0].padded_width);
+ "pipe_config.output.padded w=%d.\n",
+ p_config->output_info[0].padded_width);
dev_dbg(isp->dev,
- "pipe_config.vf_output_info[0] w=%d, h=%d.\n",
- p_config->vf_output_info[0].res.width,
- p_config->vf_output_info[0].res.height);
+ "pipe_config.vf_output_info[0] w=%d, h=%d.\n",
+ p_config->vf_output_info[0].res.width,
+ p_config->vf_output_info[0].res.height);
dev_dbg(isp->dev,
- "pipe_config.bayer_ds_out_res w=%d, h=%d.\n",
- p_config->bayer_ds_out_res.width,
- p_config->bayer_ds_out_res.height);
+ "pipe_config.bayer_ds_out_res w=%d, h=%d.\n",
+ p_config->bayer_ds_out_res.width,
+ p_config->bayer_ds_out_res.height);
dev_dbg(isp->dev,
- "pipe_config.envelope w=%d, h=%d.\n",
- p_config->dvs_envelope.width,
- p_config->dvs_envelope.height);
+ "pipe_config.envelope w=%d, h=%d.\n",
+ p_config->dvs_envelope.width,
+ p_config->dvs_envelope.height);
dev_dbg(isp->dev,
- "pipe_config.dvs_frame_delay=%d.\n",
- p_config->dvs_frame_delay);
+ "pipe_config.dvs_frame_delay=%d.\n",
+ p_config->dvs_frame_delay);
dev_dbg(isp->dev,
- "pipe_config.isp_pipe_version:%d.\n",
+ "pipe_config.isp_pipe_version:%d.\n",
p_config->isp_pipe_version);
dev_dbg(isp->dev,
- "pipe_config.acc_extension=%p.\n",
- p_config->acc_extension);
+ "pipe_config.acc_extension=%p.\n",
+ p_config->acc_extension);
dev_dbg(isp->dev,
- "pipe_config.acc_stages=%p.\n",
- p_config->acc_stages);
+ "pipe_config.acc_stages=%p.\n",
+ p_config->acc_stages);
dev_dbg(isp->dev,
- "pipe_config.num_acc_stages=%d.\n",
- p_config->num_acc_stages);
+ "pipe_config.num_acc_stages=%d.\n",
+ p_config->num_acc_stages);
dev_dbg(isp->dev,
- "pipe_config.acc_num_execs=%d.\n",
- p_config->acc_num_execs);
+ "pipe_config.acc_num_execs=%d.\n",
+ p_config->acc_num_execs);
dev_dbg(isp->dev,
- "pipe_config.default_capture_config.capture_mode=%d.\n",
- p_config->default_capture_config.mode);
+ "pipe_config.default_capture_config.capture_mode=%d.\n",
+ p_config->default_capture_config.mode);
dev_dbg(isp->dev,
- "pipe_config.enable_dz=%d.\n",
- p_config->enable_dz);
+ "pipe_config.enable_dz=%d.\n",
+ p_config->enable_dz);
dev_dbg(isp->dev,
- "pipe_config.default_capture_config.enable_xnr=%d.\n",
- p_config->default_capture_config.enable_xnr);
+ "pipe_config.default_capture_config.enable_xnr=%d.\n",
+ p_config->default_capture_config.enable_xnr);
dev_dbg(isp->dev,
- "dumping pipe[%d] extra config:\n", pipe_id);
+ "dumping pipe[%d] extra config:\n", pipe_id);
dev_dbg(isp->dev,
- "pipe_extra_config.enable_raw_binning:%d.\n",
- pe_config->enable_raw_binning);
+ "pipe_extra_config.enable_raw_binning:%d.\n",
+ pe_config->enable_raw_binning);
dev_dbg(isp->dev,
- "pipe_extra_config.enable_yuv_ds:%d.\n",
- pe_config->enable_yuv_ds);
+ "pipe_extra_config.enable_yuv_ds:%d.\n",
+ pe_config->enable_yuv_ds);
dev_dbg(isp->dev,
- "pipe_extra_config.enable_high_speed:%d.\n",
- pe_config->enable_high_speed);
+ "pipe_extra_config.enable_high_speed:%d.\n",
+ pe_config->enable_high_speed);
dev_dbg(isp->dev,
- "pipe_extra_config.enable_dvs_6axis:%d.\n",
- pe_config->enable_dvs_6axis);
+ "pipe_extra_config.enable_dvs_6axis:%d.\n",
+ pe_config->enable_dvs_6axis);
dev_dbg(isp->dev,
- "pipe_extra_config.enable_reduced_pipe:%d.\n",
- pe_config->enable_reduced_pipe);
+ "pipe_extra_config.enable_reduced_pipe:%d.\n",
+ pe_config->enable_reduced_pipe);
dev_dbg(isp->dev,
- "pipe_(extra_)config.enable_dz:%d.\n",
- p_config->enable_dz);
+ "pipe_(extra_)config.enable_dz:%d.\n",
+ p_config->enable_dz);
dev_dbg(isp->dev,
- "pipe_extra_config.disable_vf_pp:%d.\n",
- pe_config->disable_vf_pp);
+ "pipe_extra_config.disable_vf_pp:%d.\n",
+ pe_config->disable_vf_pp);
}
}
static void __dump_stream_config(struct atomisp_sub_device *asd,
- struct atomisp_stream_env *stream_env)
+ struct atomisp_stream_env *stream_env)
{
struct atomisp_device *isp = asd->isp;
struct ia_css_stream_config *s_config;
if (s_config->mode == IA_CSS_INPUT_MODE_SENSOR ||
s_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
dev_dbg(isp->dev, "stream_config.source.port.port=%d.\n",
- s_config->source.port.port);
+ s_config->source.port.port);
dev_dbg(isp->dev, "stream_config.source.port.num_lanes=%d.\n",
- s_config->source.port.num_lanes);
+ s_config->source.port.num_lanes);
dev_dbg(isp->dev, "stream_config.source.port.timeout=%d.\n",
- s_config->source.port.timeout);
+ s_config->source.port.timeout);
dev_dbg(isp->dev, "stream_config.source.port.rxcount=0x%x.\n",
- s_config->source.port.rxcount);
+ s_config->source.port.rxcount);
dev_dbg(isp->dev, "stream_config.source.port.compression.type=%d.\n",
- s_config->source.port.compression.type);
- dev_dbg(isp->dev, "stream_config.source.port.compression.compressed_bits_per_pixel=%d.\n",
- s_config->source.port.compression.
- compressed_bits_per_pixel);
- dev_dbg(isp->dev, "stream_config.source.port.compression.uncompressed_bits_per_pixel=%d.\n",
- s_config->source.port.compression.
- uncompressed_bits_per_pixel);
+ s_config->source.port.compression.type);
+ dev_dbg(isp->dev,
+ "stream_config.source.port.compression.compressed_bits_per_pixel=%d.\n",
+ s_config->source.port.compression.
+ compressed_bits_per_pixel);
+ dev_dbg(isp->dev,
+ "stream_config.source.port.compression.uncompressed_bits_per_pixel=%d.\n",
+ s_config->source.port.compression.
+ uncompressed_bits_per_pixel);
} else if (s_config->mode == IA_CSS_INPUT_MODE_TPG) {
dev_dbg(isp->dev, "stream_config.source.tpg.id=%d.\n",
- s_config->source.tpg.id);
+ s_config->source.tpg.id);
dev_dbg(isp->dev, "stream_config.source.tpg.mode=%d.\n",
- s_config->source.tpg.mode);
+ s_config->source.tpg.mode);
dev_dbg(isp->dev, "stream_config.source.tpg.x_mask=%d.\n",
- s_config->source.tpg.x_mask);
+ s_config->source.tpg.x_mask);
dev_dbg(isp->dev, "stream_config.source.tpg.x_delta=%d.\n",
- s_config->source.tpg.x_delta);
+ s_config->source.tpg.x_delta);
dev_dbg(isp->dev, "stream_config.source.tpg.y_mask=%d.\n",
- s_config->source.tpg.y_mask);
+ s_config->source.tpg.y_mask);
dev_dbg(isp->dev, "stream_config.source.tpg.y_delta=%d.\n",
- s_config->source.tpg.y_delta);
+ s_config->source.tpg.y_delta);
dev_dbg(isp->dev, "stream_config.source.tpg.xy_mask=%d.\n",
- s_config->source.tpg.xy_mask);
+ s_config->source.tpg.xy_mask);
} else if (s_config->mode == IA_CSS_INPUT_MODE_PRBS) {
dev_dbg(isp->dev, "stream_config.source.prbs.id=%d.\n",
- s_config->source.prbs.id);
+ s_config->source.prbs.id);
dev_dbg(isp->dev, "stream_config.source.prbs.h_blank=%d.\n",
- s_config->source.prbs.h_blank);
+ s_config->source.prbs.h_blank);
dev_dbg(isp->dev, "stream_config.source.prbs.v_blank=%d.\n",
- s_config->source.prbs.v_blank);
+ s_config->source.prbs.v_blank);
dev_dbg(isp->dev, "stream_config.source.prbs.seed=%d.\n",
- s_config->source.prbs.seed);
+ s_config->source.prbs.seed);
dev_dbg(isp->dev, "stream_config.source.prbs.seed1=%d.\n",
- s_config->source.prbs.seed1);
+ s_config->source.prbs.seed1);
}
for (j = 0; j < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; j++) {
s_config->input_config.bayer_order);
dev_dbg(isp->dev, "stream_config.pixels_per_clock=%d.\n",
- s_config->pixels_per_clock);
+ s_config->pixels_per_clock);
dev_dbg(isp->dev, "stream_config.online=%d.\n", s_config->online);
dev_dbg(isp->dev, "stream_config.continuous=%d.\n",
- s_config->continuous);
+ s_config->continuous);
dev_dbg(isp->dev, "stream_config.disable_cont_viewfinder=%d.\n",
- s_config->disable_cont_viewfinder);
+ s_config->disable_cont_viewfinder);
dev_dbg(isp->dev, "stream_config.channel_id=%d.\n",
- s_config->channel_id);
+ s_config->channel_id);
dev_dbg(isp->dev, "stream_config.init_num_cont_raw_buf=%d.\n",
- s_config->init_num_cont_raw_buf);
+ s_config->init_num_cont_raw_buf);
dev_dbg(isp->dev, "stream_config.target_num_cont_raw_buf=%d.\n",
- s_config->target_num_cont_raw_buf);
+ s_config->target_num_cont_raw_buf);
dev_dbg(isp->dev, "stream_config.left_padding=%d.\n",
- s_config->left_padding);
+ s_config->left_padding);
dev_dbg(isp->dev, "stream_config.sensor_binning_factor=%d.\n",
- s_config->sensor_binning_factor);
+ s_config->sensor_binning_factor);
dev_dbg(isp->dev, "stream_config.pixels_per_clock=%d.\n",
- s_config->pixels_per_clock);
+ s_config->pixels_per_clock);
dev_dbg(isp->dev, "stream_config.pack_raw_pixels=%d.\n",
- s_config->pack_raw_pixels);
+ s_config->pack_raw_pixels);
dev_dbg(isp->dev, "stream_config.flash_gpio_pin=%d.\n",
- s_config->flash_gpio_pin);
+ s_config->flash_gpio_pin);
dev_dbg(isp->dev, "stream_config.mipi_buffer_config.size_mem_words=%d.\n",
- s_config->mipi_buffer_config.size_mem_words);
+ s_config->mipi_buffer_config.size_mem_words);
dev_dbg(isp->dev, "stream_config.mipi_buffer_config.contiguous=%d.\n",
- s_config->mipi_buffer_config.contiguous);
+ s_config->mipi_buffer_config.contiguous);
dev_dbg(isp->dev, "stream_config.metadata_config.data_type=%d.\n",
- s_config->metadata_config.data_type);
+ s_config->metadata_config.data_type);
dev_dbg(isp->dev, "stream_config.metadata_config.resolution w=%d, h=%d.\n",
- s_config->metadata_config.resolution.width,
- s_config->metadata_config.resolution.height);
+ s_config->metadata_config.resolution.width,
+ s_config->metadata_config.resolution.height);
}
static int __destroy_stream(struct atomisp_sub_device *asd,
- struct atomisp_stream_env *stream_env, bool force)
+ struct atomisp_stream_env *stream_env, bool force)
{
struct atomisp_device *isp = asd->isp;
int i;
return 0;
stream_env->stream_config.target_num_cont_raw_buf =
- asd->continuous_raw_buffer_size->val;
+ asd->continuous_raw_buffer_size->val;
stream_env->stream_config.channel_id = stream_env->ch_id;
stream_env->stream_config.ia_css_enable_raw_buffer_locking =
- asd->enable_raw_buffer_lock->val;
+ asd->enable_raw_buffer_lock->val;
__dump_stream_config(asd, stream_env);
if (ia_css_stream_create(&stream_env->stream_config,
- pipe_index, multi_pipes, &stream_env->stream) != IA_CSS_SUCCESS)
+ pipe_index, multi_pipes, &stream_env->stream) != IA_CSS_SUCCESS)
return -EINVAL;
if (ia_css_stream_get_info(stream_env->stream,
- &stream_env->stream_info) != IA_CSS_SUCCESS) {
+ &stream_env->stream_info) != IA_CSS_SUCCESS) {
ia_css_stream_destroy(stream_env->stream);
stream_env->stream = NULL;
return -EINVAL;
}
static void __apply_additional_pipe_config(
- struct atomisp_sub_device *asd,
- struct atomisp_stream_env *stream_env,
- enum ia_css_pipe_id pipe_id)
+ struct atomisp_sub_device *asd,
+ struct atomisp_stream_env *stream_env,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
if (pipe_id < 0 || pipe_id >= IA_CSS_PIPE_ID_NUM) {
dev_err(isp->dev,
- "wrong pipe_id for additional pipe config.\n");
+ "wrong pipe_id for additional pipe config.\n");
return;
}
/* apply default pipe config */
stream_env->pipe_configs[pipe_id].isp_pipe_version = 2;
stream_env->pipe_configs[pipe_id].enable_dz =
- asd->disable_dz->val ? false : true;
+ asd->disable_dz->val ? false : true;
/* apply isp 2.2 specific config for baytrail*/
switch (pipe_id) {
case IA_CSS_PIPE_ID_CAPTURE:
/* enable capture pp/dz manually or digital zoom would
* fail*/
if (stream_env->pipe_configs[pipe_id].
- default_capture_config.mode == CSS_CAPTURE_MODE_RAW)
+ default_capture_config.mode == CSS_CAPTURE_MODE_RAW)
stream_env->pipe_configs[pipe_id].enable_dz = false;
#ifdef ISP2401
/* the isp default to use ISP2.2 and the camera hal will
* control whether use isp2.7 */
if (asd->select_isp_version->val ==
- ATOMISP_CSS_ISP_PIPE_VERSION_2_7)
+ ATOMISP_CSS_ISP_PIPE_VERSION_2_7)
stream_env->pipe_configs[pipe_id].isp_pipe_version =
- SH_CSS_ISP_PIPE_VERSION_2_7;
+ SH_CSS_ISP_PIPE_VERSION_2_7;
else
stream_env->pipe_configs[pipe_id].isp_pipe_version =
- SH_CSS_ISP_PIPE_VERSION_2_2;
+ SH_CSS_ISP_PIPE_VERSION_2_2;
#endif
break;
case IA_CSS_PIPE_ID_VIDEO:
/* enable reduced pipe to have binary
* video_dz_2_min selected*/
stream_env->pipe_extra_configs[pipe_id]
- .enable_reduced_pipe = true;
+ .enable_reduced_pipe = true;
stream_env->pipe_configs[pipe_id]
- .enable_dz = false;
+ .enable_dz = false;
if (ATOMISP_SOC_CAMERA(asd))
stream_env->pipe_configs[pipe_id].enable_dz = true;
if (asd->params.video_dis_en) {
stream_env->pipe_extra_configs[pipe_id]
- .enable_dvs_6axis = true;
+ .enable_dvs_6axis = true;
stream_env->pipe_configs[pipe_id]
- .dvs_frame_delay =
- ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+ .dvs_frame_delay =
+ ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
}
break;
case IA_CSS_PIPE_ID_PREVIEW:
}
static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd,
- enum ia_css_pipe_id pipe_id)
+ enum ia_css_pipe_id pipe_id)
{
if (!asd)
return false;
else
return false;
}
- /* fall through to ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE */
+ /* fall through to ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE */
case ATOMISP_RUN_MODE_CONTINUOUS_CAPTURE:
if (pipe_id == IA_CSS_PIPE_ID_CAPTURE ||
pipe_id == IA_CSS_PIPE_ID_PREVIEW)
else
return false;
}
- /* fall through to ATOMISP_RUN_MODE_SDV */
+ /* fall through to ATOMISP_RUN_MODE_SDV */
case ATOMISP_RUN_MODE_SDV:
if (pipe_id == IA_CSS_PIPE_ID_CAPTURE ||
pipe_id == IA_CSS_PIPE_ID_VIDEO)
&stream_env->pipe_extra_configs[pipe_id],
sizeof(extra_config)))
ret = ia_css_pipe_create(
- &stream_env->pipe_configs[pipe_id],
- &stream_env->pipes[pipe_id]);
+ &stream_env->pipe_configs[pipe_id],
+ &stream_env->pipes[pipe_id]);
else
ret = ia_css_pipe_create_extra(
- &stream_env->pipe_configs[pipe_id],
- &stream_env->pipe_extra_configs[pipe_id],
- &stream_env->pipes[pipe_id]);
+ &stream_env->pipe_configs[pipe_id],
+ &stream_env->pipe_extra_configs[pipe_id],
+ &stream_env->pipes[pipe_id]);
if (ret != IA_CSS_SUCCESS)
dev_err(isp->dev, "create pipe[%d] error.\n", pipe_id);
return ret;
isp->css_env.isp_css_env.print_env.debug_print = NULL;
else if (opt == 1)
isp->css_env.isp_css_env.print_env.debug_print =
- atomisp_css2_dbg_ftrace_print;
+ atomisp_css2_dbg_ftrace_print;
else if (opt == 2)
isp->css_env.isp_css_env.print_env.debug_print =
- atomisp_css2_dbg_print;
+ atomisp_css2_dbg_print;
else
ret = -EINVAL;
isp->css_env.isp_css_fw.bytes = isp->firmware->size;
isp->css_env.isp_css_env.hw_access_env.store_8 =
- atomisp_css2_hw_store_8;
+ atomisp_css2_hw_store_8;
isp->css_env.isp_css_env.hw_access_env.store_16 =
- atomisp_css2_hw_store_16;
+ atomisp_css2_hw_store_16;
isp->css_env.isp_css_env.hw_access_env.store_32 =
- atomisp_css2_hw_store_32;
+ atomisp_css2_hw_store_32;
isp->css_env.isp_css_env.hw_access_env.load_8 = atomisp_css2_hw_load_8;
isp->css_env.isp_css_env.hw_access_env.load_16 =
- atomisp_css2_hw_load_16;
+ atomisp_css2_hw_load_16;
isp->css_env.isp_css_env.hw_access_env.load_32 =
- atomisp_css2_hw_load_32;
+ atomisp_css2_hw_load_32;
isp->css_env.isp_css_env.hw_access_env.load = atomisp_css2_hw_load;
isp->css_env.isp_css_env.hw_access_env.store = atomisp_css2_hw_store;
err = ia_css_irq_translate(infos);
if (err != IA_CSS_SUCCESS) {
dev_warn(isp->dev,
- "%s:failed to translate irq (err = %d,infos = %d)\n",
- __func__, err, *infos);
+ "%s:failed to translate irq (err = %d,infos = %d)\n",
+ __func__, err, *infos);
return -EINVAL;
}
}
void atomisp_css_rx_get_irq_info(enum mipi_port_id port,
- unsigned int *infos)
+ unsigned int *infos)
{
#ifndef ISP2401_NEW_INPUT_SYSTEM
ia_css_isys_rx_get_irq_info(port, infos);
}
void atomisp_css_rx_clear_irq_info(enum mipi_port_id port,
- unsigned int infos)
+ unsigned int infos)
{
#ifndef ISP2401_NEW_INPUT_SYSTEM
ia_css_isys_rx_clear_irq_info(port, infos);
}
int atomisp_css_irq_enable(struct atomisp_device *isp,
- enum atomisp_css_irq_info info, bool enable)
+ enum atomisp_css_irq_info info, bool enable)
{
if (ia_css_irq_enable(info, enable) != IA_CSS_SUCCESS) {
dev_warn(isp->dev, "%s:Invalid irq info.\n", __func__);
asd->stream_env[i].pipes[j] = NULL;
asd->stream_env[i].update_pipe[j] = false;
ia_css_pipe_config_defaults(
- &asd->stream_env[i].pipe_configs[j]);
+ &asd->stream_env[i].pipe_configs[j]);
ia_css_pipe_extra_config_defaults(
- &asd->stream_env[i].pipe_extra_configs[j]);
+ &asd->stream_env[i].pipe_extra_configs[j]);
}
ia_css_stream_config_defaults(&asd->stream_env[i].stream_config);
}
}
int atomisp_q_video_buffer_to_css(struct atomisp_sub_device *asd,
- struct videobuf_vmalloc_memory *vm_mem,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_buffer_type css_buf_type,
- enum atomisp_css_pipe_id css_pipe_id)
+ struct videobuf_vmalloc_memory *vm_mem,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_buffer_type css_buf_type,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
struct ia_css_buffer css_buf = {0};
css_buf.data.frame = vm_mem->vaddr;
err = ia_css_pipe_enqueue_buffer(
- stream_env->pipes[css_pipe_id], &css_buf);
+ stream_env->pipes[css_pipe_id], &css_buf);
if (err != IA_CSS_SUCCESS)
return -EINVAL;
}
int atomisp_q_metadata_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_metadata_buf *metadata_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id)
+ struct atomisp_metadata_buf *metadata_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
struct ia_css_buffer buffer = {0};
buffer.type = IA_CSS_BUFFER_TYPE_METADATA;
buffer.data.metadata = metadata_buf->metadata;
if (ia_css_pipe_enqueue_buffer(stream_env->pipes[css_pipe_id],
- &buffer)) {
+ &buffer)) {
dev_err(isp->dev, "failed to q meta data buffer\n");
return -EINVAL;
}
}
int atomisp_q_s3a_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_s3a_buf *s3a_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id)
+ struct atomisp_s3a_buf *s3a_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
struct ia_css_buffer buffer = {0};
buffer.type = IA_CSS_BUFFER_TYPE_3A_STATISTICS;
buffer.data.stats_3a = s3a_buf->s3a_data;
if (ia_css_pipe_enqueue_buffer(
- stream_env->pipes[css_pipe_id],
- &buffer)) {
+ stream_env->pipes[css_pipe_id],
+ &buffer)) {
dev_dbg(isp->dev, "failed to q s3a stat buffer\n");
return -EINVAL;
}
}
int atomisp_q_dis_buffer_to_css(struct atomisp_sub_device *asd,
- struct atomisp_dis_buf *dis_buf,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id)
+ struct atomisp_dis_buf *dis_buf,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct atomisp_stream_env *stream_env = &asd->stream_env[stream_id];
struct ia_css_buffer buffer = {0};
buffer.type = IA_CSS_BUFFER_TYPE_DIS_STATISTICS;
buffer.data.stats_dvs = dis_buf->dis_data;
if (ia_css_pipe_enqueue_buffer(
- stream_env->pipes[css_pipe_id],
- &buffer)) {
+ stream_env->pipes[css_pipe_id],
+ &buffer)) {
dev_dbg(isp->dev, "failed to q dvs stat buffer\n");
return -EINVAL;
}
}
int atomisp_css_start(struct atomisp_sub_device *asd,
- enum atomisp_css_pipe_id pipe_id, bool in_reset)
+ enum atomisp_css_pipe_id pipe_id, bool in_reset)
{
struct atomisp_device *isp = asd->isp;
bool sp_is_started = false;
if (asd->copy_mode) {
dev_warn(asd->isp->dev,
"%s: ia_css_stream_set_isp_config() not supported in copy mode!.\n",
- __func__);
+ __func__);
return;
}
ia_css_stream_set_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &asd->params.config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &asd->params.config);
atomisp_isp_parameters_clean_up(&asd->params.config);
}
void atomisp_css_update_isp_params_on_pipe(struct atomisp_sub_device *asd,
- struct ia_css_pipe *pipe)
+ struct ia_css_pipe *pipe)
{
enum ia_css_err ret;
return;
}
- dev_dbg(asd->isp->dev, "%s: apply parameter for ia_css_frame %p with isp_config_id %d on pipe %p.\n",
+ dev_dbg(asd->isp->dev,
+ "%s: apply parameter for ia_css_frame %p with isp_config_id %d on pipe %p.\n",
__func__, asd->params.config.output_frame,
asd->params.config.isp_config_id, pipe);
ret = ia_css_stream_set_isp_config_on_pipe(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &asd->params.config, pipe);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &asd->params.config, pipe);
if (ret != IA_CSS_SUCCESS)
dev_warn(asd->isp->dev, "%s: ia_css_stream_set_isp_config_on_pipe failed %d\n",
- __func__, ret);
+ __func__, ret);
atomisp_isp_parameters_clean_up(&asd->params.config);
}
{
if (ia_css_pipe_enqueue_buffer(
asd->stream_env[stream_id].pipes[pipe_id],
- &isp_css_buffer->css_buffer)
- != IA_CSS_SUCCESS)
+ &isp_css_buffer->css_buffer)
+ != IA_CSS_SUCCESS)
return -EINVAL;
return 0;
}
int atomisp_css_dequeue_buffer(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id pipe_id,
- enum atomisp_css_buffer_type buf_type,
- struct atomisp_css_buffer *isp_css_buffer)
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id pipe_id,
+ enum atomisp_css_buffer_type buf_type,
+ struct atomisp_css_buffer *isp_css_buffer)
{
struct atomisp_device *isp = asd->isp;
enum ia_css_err err;
err = ia_css_pipe_dequeue_buffer(
- asd->stream_env[stream_id].pipes[pipe_id],
- &isp_css_buffer->css_buffer);
+ asd->stream_env[stream_id].pipes[pipe_id],
+ &isp_css_buffer->css_buffer);
if (err != IA_CSS_SUCCESS) {
dev_err(isp->dev,
"ia_css_pipe_dequeue_buffer failed: 0x%x\n", err);
{
struct atomisp_device *isp = asd->isp;
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
if (s3a_buf && asd->params.curr_grid_info.s3a_grid.enable) {
void *s3a_ptr;
s3a_buf->s3a_data = ia_css_isp_3a_statistics_allocate(
- &asd->params.curr_grid_info.s3a_grid);
+ &asd->params.curr_grid_info.s3a_grid);
if (!s3a_buf->s3a_data) {
dev_err(isp->dev, "3a buf allocation failed.\n");
return -EINVAL;
s3a_ptr = hmm_vmap(s3a_buf->s3a_data->data_ptr, true);
s3a_buf->s3a_map = ia_css_isp_3a_statistics_map_allocate(
- s3a_buf->s3a_data, s3a_ptr);
+ s3a_buf->s3a_data, s3a_ptr);
}
if (dis_buf && dvs_grid_info && dvs_grid_info->enable) {
dvs_ptr = hmm_vmap(dis_buf->dis_data->data_ptr, true);
dis_buf->dvs_map = ia_css_isp_dvs_statistics_map_allocate(
- dis_buf->dis_data, dvs_ptr);
+ dis_buf->dis_data, dvs_ptr);
}
if (asd->stream_env[stream_id].stream_info.
- metadata_info.size && md_buf) {
+ metadata_info.size && md_buf) {
md_buf->metadata = ia_css_metadata_allocate(
- &asd->stream_env[stream_id].stream_info.metadata_info);
+ &asd->stream_env[stream_id].stream_info.metadata_info);
if (!md_buf->metadata) {
if (s3a_buf)
ia_css_isp_3a_statistics_free(s3a_buf->s3a_data);
struct atomisp_dis_buf *dis_buf, *_dis_buf;
struct atomisp_metadata_buf *md_buf, *_md_buf;
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
unsigned int i;
/* 3A statistics use vmalloc, DIS use kmalloc */
asd->params.dvs_ver_coef_bytes = 0;
asd->params.dis_proj_data_valid = false;
list_for_each_entry_safe(dis_buf, _dis_buf,
- &asd->dis_stats, list) {
+ &asd->dis_stats, list) {
atomisp_css_free_dis_buffer(dis_buf);
list_del(&dis_buf->list);
kfree(dis_buf);
}
list_for_each_entry_safe(dis_buf, _dis_buf,
- &asd->dis_stats_in_css, list) {
+ &asd->dis_stats_in_css, list) {
atomisp_css_free_dis_buffer(dis_buf);
list_del(&dis_buf->list);
kfree(dis_buf);
asd->params.s3a_user_stat = NULL;
asd->params.s3a_output_bytes = 0;
list_for_each_entry_safe(s3a_buf, _s3a_buf,
- &asd->s3a_stats, list) {
+ &asd->s3a_stats, list) {
atomisp_css_free_3a_buffer(s3a_buf);
list_del(&s3a_buf->list);
kfree(s3a_buf);
}
list_for_each_entry_safe(s3a_buf, _s3a_buf,
- &asd->s3a_stats_in_css, list) {
+ &asd->s3a_stats_in_css, list) {
atomisp_css_free_3a_buffer(s3a_buf);
list_del(&s3a_buf->list);
kfree(s3a_buf);
}
list_for_each_entry_safe(s3a_buf, _s3a_buf,
- &asd->s3a_stats_ready, list) {
+ &asd->s3a_stats_ready, list) {
atomisp_css_free_3a_buffer(s3a_buf);
list_del(&s3a_buf->list);
kfree(s3a_buf);
for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
list_for_each_entry_safe(md_buf, _md_buf,
- &asd->metadata[i], list) {
+ &asd->metadata[i], list) {
atomisp_css_free_metadata_buffer(md_buf);
list_del(&md_buf->list);
kfree(md_buf);
}
list_for_each_entry_safe(md_buf, _md_buf,
- &asd->metadata_in_css[i], list) {
+ &asd->metadata_in_css[i], list) {
atomisp_css_free_metadata_buffer(md_buf);
list_del(&md_buf->list);
kfree(md_buf);
}
list_for_each_entry_safe(md_buf, _md_buf,
- &asd->metadata_ready[i], list) {
+ &asd->metadata_ready[i], list) {
atomisp_css_free_metadata_buffer(md_buf);
list_del(&md_buf->list);
kfree(md_buf);
}
int atomisp_css_get_grid_info(struct atomisp_sub_device *asd,
- enum atomisp_css_pipe_id pipe_id,
- int source_pad)
+ enum atomisp_css_pipe_id pipe_id,
+ int source_pad)
{
struct ia_css_pipe_info p_info;
struct ia_css_grid_info old_info;
struct atomisp_device *isp = asd->isp;
int stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
int md_width = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_config.metadata_config.resolution.width;
+ stream_config.metadata_config.resolution.width;
memset(&p_info, 0, sizeof(struct ia_css_pipe_info));
memset(&old_info, 0, sizeof(struct ia_css_grid_info));
}
memcpy(&old_info, &asd->params.curr_grid_info,
- sizeof(struct ia_css_grid_info));
+ sizeof(struct ia_css_grid_info));
memcpy(&asd->params.curr_grid_info, &p_info.grid_info,
- sizeof(struct ia_css_grid_info));
+ sizeof(struct ia_css_grid_info));
/*
* Record which css pipe enables s3a_grid.
* Currently would have one css pipe that need it
if (asd->params.curr_grid_info.s3a_grid.enable) {
if (asd->params.s3a_enabled_pipe != CSS_PIPE_ID_NUM)
dev_dbg(isp->dev, "css pipe %d enabled s3a grid replaced by: %d.\n",
- asd->params.s3a_enabled_pipe, pipe_id);
+ asd->params.s3a_enabled_pipe, pipe_id);
asd->params.s3a_enabled_pipe = pipe_id;
}
* DIS statistics buffers are allocated or buffer size would be zero
* then no need to do anything. */
if (((!memcmp(&old_info, &asd->params.curr_grid_info, sizeof(old_info))
- && asd->params.s3a_user_stat && asd->params.dvs_stat)
- || asd->params.curr_grid_info.s3a_grid.width == 0
- || asd->params.curr_grid_info.s3a_grid.height == 0)
+ && asd->params.s3a_user_stat && asd->params.dvs_stat)
+ || asd->params.curr_grid_info.s3a_grid.width == 0
+ || asd->params.curr_grid_info.s3a_grid.height == 0)
&& asd->params.metadata_width_size == md_width) {
dev_dbg(isp->dev,
"grid info change escape. memcmp=%d, s3a_user_stat=%d,dvs_stat=%d, s3a.width=%d, s3a.height=%d, metadata width =%d\n",
!memcmp(&old_info, &asd->params.curr_grid_info,
- sizeof(old_info)),
- !!asd->params.s3a_user_stat, !!asd->params.dvs_stat,
- asd->params.curr_grid_info.s3a_grid.width,
- asd->params.curr_grid_info.s3a_grid.height,
- asd->params.metadata_width_size);
+ sizeof(old_info)),
+ !!asd->params.s3a_user_stat, !!asd->params.dvs_stat,
+ asd->params.curr_grid_info.s3a_grid.width,
+ asd->params.curr_grid_info.s3a_grid.height,
+ asd->params.metadata_width_size);
return -EINVAL;
}
asd->params.metadata_width_size = md_width;
int atomisp_alloc_3a_output_buf(struct atomisp_sub_device *asd)
{
if (!asd->params.curr_grid_info.s3a_grid.width ||
- !asd->params.curr_grid_info.s3a_grid.height)
+ !asd->params.curr_grid_info.s3a_grid.height)
return 0;
asd->params.s3a_user_stat = ia_css_3a_statistics_allocate(
- &asd->params.curr_grid_info.s3a_grid);
+ &asd->params.curr_grid_info.s3a_grid);
if (!asd->params.s3a_user_stat)
return -ENOMEM;
/* 3A statistics. These can be big, so we use vmalloc. */
int atomisp_alloc_dis_coef_buf(struct atomisp_sub_device *asd)
{
struct atomisp_css_dvs_grid_info *dvs_grid =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
if (!dvs_grid)
return 0;
/* DIS coefficients. */
asd->params.css_param.dvs2_coeff = ia_css_dvs2_coefficients_allocate(
- dvs_grid);
+ dvs_grid);
if (!asd->params.css_param.dvs2_coeff)
return -ENOMEM;
asd->params.dvs_hor_coef_bytes = dvs_grid->num_hor_coefs *
- sizeof(*asd->params.css_param.dvs2_coeff->hor_coefs.odd_real);
+ sizeof(*asd->params.css_param.dvs2_coeff->hor_coefs.odd_real);
asd->params.dvs_ver_coef_bytes = dvs_grid->num_ver_coefs *
- sizeof(*asd->params.css_param.dvs2_coeff->ver_coefs.odd_real);
+ sizeof(*asd->params.css_param.dvs2_coeff->ver_coefs.odd_real);
/* DIS projections. */
asd->params.dis_proj_data_valid = false;
return -ENOMEM;
asd->params.dvs_hor_proj_bytes =
- dvs_grid->aligned_height * dvs_grid->aligned_width *
- sizeof(*asd->params.dvs_stat->hor_prod.odd_real);
+ dvs_grid->aligned_height * dvs_grid->aligned_width *
+ sizeof(*asd->params.dvs_stat->hor_prod.odd_real);
asd->params.dvs_ver_proj_bytes =
- dvs_grid->aligned_height * dvs_grid->aligned_width *
- sizeof(*asd->params.dvs_stat->ver_prod.odd_real);
+ dvs_grid->aligned_height * dvs_grid->aligned_width *
+ sizeof(*asd->params.dvs_stat->ver_prod.odd_real);
return 0;
}
* space */
for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
asd->params.metadata_user[i] = kvmalloc(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
- stream_info.metadata_info.size, GFP_KERNEL);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].
+ stream_info.metadata_info.size, GFP_KERNEL);
if (!asd->params.metadata_user[i]) {
while (--i >= 0) {
kvfree(asd->params.metadata_user[i]);
if (asd->params.dvs_stat) {
if (dvs_map)
ia_css_translate_dvs2_statistics(
- asd->params.dvs_stat, dvs_map);
+ asd->params.dvs_stat, dvs_map);
else
ia_css_get_dvs2_statistics(asd->params.dvs_stat,
- isp_css_buffer->css_buffer.data.stats_dvs);
+ isp_css_buffer->css_buffer.data.stats_dvs);
}
}
}
void atomisp_css_temp_pipe_to_pipe_id(struct atomisp_sub_device *asd,
- struct atomisp_css_event *current_event)
+ struct atomisp_css_event *current_event)
{
/*
* FIXME!
int isys_stream)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
if (isys_stream >= IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH)
return -EINVAL;
}
int atomisp_css_input_set_resolution(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- struct v4l2_mbus_framefmt *ffmt)
+ enum atomisp_input_stream_id stream_id,
+ struct v4l2_mbus_framefmt *ffmt)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->input_config.input_res.width = ffmt->width;
s_config->input_config.input_res.height = ffmt->height;
}
void atomisp_css_input_set_binning_factor(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- unsigned int bin_factor)
+ enum atomisp_input_stream_id stream_id,
+ unsigned int bin_factor)
{
asd->stream_env[stream_id]
- .stream_config.sensor_binning_factor = bin_factor;
+ .stream_config.sensor_binning_factor = bin_factor;
}
void atomisp_css_input_set_bayer_order(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_bayer_order bayer_order)
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_bayer_order bayer_order)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->input_config.bayer_order = bayer_order;
}
int isys_stream)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[isys_stream].linked_isys_stream_id = link;
}
int isys_stream)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[isys_stream].valid = valid;
}
int isys_stream)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[isys_stream].format = format;
}
void atomisp_css_input_set_format(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format format)
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format format)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->input_config.format = format;
}
{
int i;
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
/*
* Set all isys configs to not valid.
* Currently we support only one stream per channel
enum atomisp_input_format input_format)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.width =
- s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width;
+ s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.height =
- s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height / 2;
+ s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height / 2;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].linked_isys_stream_id
- = IA_CSS_STREAM_ISYS_STREAM_0;
+ = IA_CSS_STREAM_ISYS_STREAM_0;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].format =
- ATOMISP_INPUT_FORMAT_USER_DEF1;
+ ATOMISP_INPUT_FORMAT_USER_DEF1;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].format =
- ATOMISP_INPUT_FORMAT_USER_DEF2;
+ ATOMISP_INPUT_FORMAT_USER_DEF2;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].valid = true;
return 0;
}
void atomisp_css_isys_two_stream_cfg_update_stream1(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format input_format,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format input_format,
+ unsigned int width, unsigned int height)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.width =
- width;
+ width;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].input_res.height =
- height;
+ height;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].format =
- input_format;
+ input_format;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_0].valid = true;
}
void atomisp_css_isys_two_stream_cfg_update_stream2(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_input_format input_format,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_input_format input_format,
+ unsigned int width, unsigned int height)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.width =
- width;
+ width;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].input_res.height =
- height;
+ height;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].linked_isys_stream_id
- = IA_CSS_STREAM_ISYS_STREAM_0;
+ = IA_CSS_STREAM_ISYS_STREAM_0;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].format =
- input_format;
+ input_format;
s_config->isys_config[IA_CSS_STREAM_ISYS_STREAM_1].valid = true;
}
int atomisp_css_input_set_effective_resolution(
- struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ enum atomisp_input_stream_id stream_id,
+ unsigned int width, unsigned int height)
{
struct ia_css_stream_config *s_config =
- &asd->stream_env[stream_id].stream_config;
+ &asd->stream_env[stream_id].stream_config;
s_config->input_config.effective_res.width = width;
s_config->input_config.effective_res.height = height;
return 0;
unsigned int dvs_w, unsigned int dvs_h)
{
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.width = dvs_w;
+ .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.width = dvs_w;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.height = dvs_h;
+ .pipe_configs[IA_CSS_PIPE_ID_VIDEO].dvs_envelope.height = dvs_h;
}
void atomisp_css_input_set_two_pixels_per_clock(
- struct atomisp_sub_device *asd,
- bool two_ppc)
+ struct atomisp_sub_device *asd,
+ bool two_ppc)
{
int i;
if (asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .stream_config.pixels_per_clock == (two_ppc ? 2 : 1))
+ .stream_config.pixels_per_clock == (two_ppc ? 2 : 1))
return;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .stream_config.pixels_per_clock = (two_ppc ? 2 : 1);
+ .stream_config.pixels_per_clock = (two_ppc ? 2 : 1);
for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
.update_pipe[i] = true;
}
void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
- bool enable)
+ bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
unsigned int pipe;
if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)
stream_env->update_pipe[pipe] = true;
if (enable)
stream_env->pipe_configs[pipe].output_info[0].padded_width =
- stream_env->stream_config.input_config.effective_res.width;
+ stream_env->stream_config.input_config.effective_res.width;
}
void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable)
for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[i].enable_dz = enable;
+ .pipe_configs[i].enable_dz = enable;
}
void atomisp_css_capture_set_mode(struct atomisp_sub_device *asd,
- enum atomisp_css_capture_mode mode)
+ enum atomisp_css_capture_mode mode)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
if (stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
- .default_capture_config.mode == mode)
+ .default_capture_config.mode == mode)
return;
stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
- default_capture_config.mode = mode;
+ default_capture_config.mode = mode;
stream_env->update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
}
if (isp->inputs[asd->input_curr].type == TEST_PATTERN) {
struct ia_css_stream_config *s_config =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_config;
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_config;
s_config->mode = IA_CSS_INPUT_MODE_TPG;
s_config->source.tpg.mode = IA_CSS_TPG_MODE_CHECKERBOARD;
s_config->source.tpg.x_mask = (1 << 4) - 1;
* Here using a large safe value.
*/
struct ia_css_stream_config *s_config =
- &asd->stream_env[i].stream_config;
+ &asd->stream_env[i].stream_config;
if (s_config->input_config.input_res.width == 0)
continue;
if (ia_css_mipi_frame_calculate_size(
- s_config->input_config.input_res.width,
- s_config->input_config.input_res.height,
- s_config->input_config.format,
- true,
- 0x13000,
- &size_mem_words) != IA_CSS_SUCCESS) {
+ s_config->input_config.input_res.width,
+ s_config->input_config.input_res.height,
+ s_config->input_config.format,
+ true,
+ 0x13000,
+ &size_mem_words) != IA_CSS_SUCCESS) {
if (intel_mid_identify_cpu() ==
- INTEL_MID_CPU_CHIP_TANGIER)
+ INTEL_MID_CPU_CHIP_TANGIER)
size_mem_words = CSS_MIPI_FRAME_BUFFER_SIZE_2;
else
size_mem_words = CSS_MIPI_FRAME_BUFFER_SIZE_1;
dev_warn(asd->isp->dev,
- "ia_css_mipi_frame_calculate_size failed,applying pre-defined MIPI buffer size %u.\n",
- size_mem_words);
+ "ia_css_mipi_frame_calculate_size failed,applying pre-defined MIPI buffer size %u.\n",
+ size_mem_words);
}
s_config->mipi_buffer_config.size_mem_words = size_mem_words;
s_config->mipi_buffer_config.nof_mipi_buffers = 2;
}
void atomisp_css_capture_enable_online(struct atomisp_sub_device *asd,
- unsigned short stream_index, bool enable)
+ unsigned short stream_index, bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[stream_index];
+ &asd->stream_env[stream_index];
if (stream_env->stream_config.online == !!enable)
return;
}
void atomisp_css_preview_enable_online(struct atomisp_sub_device *asd,
- unsigned short stream_index, bool enable)
+ unsigned short stream_index, bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[stream_index];
+ &asd->stream_env[stream_index];
int i;
if (stream_env->stream_config.online != !!enable) {
}
void atomisp_css_video_enable_online(struct atomisp_sub_device *asd,
- bool enable)
+ bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO];
int i;
if (stream_env->stream_config.online != enable) {
}
void atomisp_css_enable_continuous(struct atomisp_sub_device *asd,
- bool enable)
+ bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
int i;
/*
}
void atomisp_css_enable_cvf(struct atomisp_sub_device *asd,
- bool enable)
+ bool enable)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
int i;
if (stream_env->stream_config.disable_cont_viewfinder != !enable) {
}
int atomisp_css_input_configure_port(
- struct atomisp_sub_device *asd,
- enum mipi_port_id port,
- unsigned int num_lanes,
- unsigned int timeout,
- unsigned int mipi_freq,
- enum atomisp_input_format metadata_format,
- unsigned int metadata_width,
- unsigned int metadata_height)
+ struct atomisp_sub_device *asd,
+ enum mipi_port_id port,
+ unsigned int num_lanes,
+ unsigned int timeout,
+ unsigned int mipi_freq,
+ enum atomisp_input_format metadata_format,
+ unsigned int metadata_width,
+ unsigned int metadata_height)
{
int i;
struct atomisp_stream_env *stream_env;
* 10-bit fixed points for improved accuracy.
*/
const unsigned int rxcount =
- min(((mipi_freq / 46000) - 1280) >> 10, 0xffU) * 0x01010101U;
+ min(((mipi_freq / 46000) - 1280) >> 10, 0xffU) * 0x01010101U;
for (i = 0; i < ATOMISP_INPUT_STREAM_NUM; i++) {
stream_env = &asd->stream_env[i];
if (mipi_freq)
stream_env->stream_config.source.port.rxcount = rxcount;
stream_env->stream_config.
- metadata_config.data_type = metadata_format;
+ metadata_config.data_type = metadata_format;
stream_env->stream_config.
- metadata_config.resolution.width = metadata_width;
+ metadata_config.resolution.width = metadata_width;
stream_env->stream_config.
- metadata_config.resolution.height = metadata_height;
+ metadata_config.resolution.height = metadata_height;
}
return 0;
}
int atomisp_css_frame_allocate(struct atomisp_css_frame **frame,
- unsigned int width, unsigned int height,
- enum atomisp_css_frame_format format,
- unsigned int padded_width,
- unsigned int raw_bit_depth)
+ unsigned int width, unsigned int height,
+ enum atomisp_css_frame_format format,
+ unsigned int padded_width,
+ unsigned int raw_bit_depth)
{
if (ia_css_frame_allocate(frame, width, height, format,
- padded_width, raw_bit_depth) != IA_CSS_SUCCESS)
+ padded_width, raw_bit_depth) != IA_CSS_SUCCESS)
return -ENOMEM;
return 0;
}
int atomisp_css_frame_allocate_from_info(struct atomisp_css_frame **frame,
- const struct atomisp_css_frame_info *info)
+ const struct atomisp_css_frame_info *info)
{
if (ia_css_frame_allocate_from_info(frame, info) != IA_CSS_SUCCESS)
return -ENOMEM;
}
int atomisp_css_frame_map(struct atomisp_css_frame **frame,
- const struct atomisp_css_frame_info *info,
- const void __user *data, uint16_t attribute,
- void *context)
+ const struct atomisp_css_frame_info *info,
+ const void __user *data, uint16_t attribute,
+ void *context)
{
if (ia_css_frame_map(frame, info, data, attribute, context)
!= IA_CSS_SUCCESS)
}
int atomisp_css_allocate_continuous_frames(bool init_time,
- struct atomisp_sub_device *asd)
+ struct atomisp_sub_device *asd)
{
if (ia_css_alloc_continuous_frame_remain(
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream)
- != IA_CSS_SUCCESS)
+ != IA_CSS_SUCCESS)
return -EINVAL;
return 0;
}
void atomisp_css_update_continuous_frames(struct atomisp_sub_device *asd)
{
ia_css_update_continuous_frames(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
}
int atomisp_css_stop(struct atomisp_sub_device *asd,
- enum atomisp_css_pipe_id pipe_id, bool in_reset)
+ enum atomisp_css_pipe_id pipe_id, bool in_reset)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_s3a_buf *s3a_buf;
stream_env = &asd->stream_env[i];
for (j = 0; j < IA_CSS_PIPE_ID_NUM; j++) {
ia_css_pipe_config_defaults(
- &stream_env->pipe_configs[j]);
+ &stream_env->pipe_configs[j]);
ia_css_pipe_extra_config_defaults(
- &stream_env->pipe_extra_configs[j]);
+ &stream_env->pipe_extra_configs[j]);
}
ia_css_stream_config_defaults(
- &stream_env->stream_config);
+ &stream_env->stream_config);
}
atomisp_isp_parameters_clean_up(&asd->params.config);
asd->params.css_update_params_needed = false;
/* move stats buffers to free queue list */
while (!list_empty(&asd->s3a_stats_in_css)) {
s3a_buf = list_entry(asd->s3a_stats_in_css.next,
- struct atomisp_s3a_buf, list);
+ struct atomisp_s3a_buf, list);
list_del(&s3a_buf->list);
list_add_tail(&s3a_buf->list, &asd->s3a_stats);
}
while (!list_empty(&asd->s3a_stats_ready)) {
s3a_buf = list_entry(asd->s3a_stats_ready.next,
- struct atomisp_s3a_buf, list);
+ struct atomisp_s3a_buf, list);
list_del(&s3a_buf->list);
list_add_tail(&s3a_buf->list, &asd->s3a_stats);
}
spin_lock_irqsave(&asd->dis_stats_lock, irqflags);
while (!list_empty(&asd->dis_stats_in_css)) {
dis_buf = list_entry(asd->dis_stats_in_css.next,
- struct atomisp_dis_buf, list);
+ struct atomisp_dis_buf, list);
list_del(&dis_buf->list);
list_add_tail(&dis_buf->list, &asd->dis_stats);
}
for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
while (!list_empty(&asd->metadata_in_css[i])) {
md_buf = list_entry(asd->metadata_in_css[i].next,
- struct atomisp_metadata_buf, list);
+ struct atomisp_metadata_buf, list);
list_del(&md_buf->list);
list_add_tail(&md_buf->list, &asd->metadata[i]);
}
while (!list_empty(&asd->metadata_ready[i])) {
md_buf = list_entry(asd->metadata_ready[i].next,
- struct atomisp_metadata_buf, list);
+ struct atomisp_metadata_buf, list);
list_del(&md_buf->list);
list_add_tail(&md_buf->list, &asd->metadata[i]);
}
}
int atomisp_css_continuous_set_num_raw_frames(
- struct atomisp_sub_device *asd,
- int num_frames)
+ struct atomisp_sub_device *asd,
+ int num_frames)
{
if (asd->enable_raw_buffer_lock->val) {
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
.stream_config.init_num_cont_raw_buf =
- ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
+ ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES_LOCK_EN;
if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
asd->params.video_dis_en)
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
.stream_config.init_num_cont_raw_buf +=
- ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+ ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
} else {
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
.stream_config.init_num_cont_raw_buf =
- ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
+ ATOMISP_CSS2_NUM_OFFLINE_INIT_CONTINUOUS_FRAMES;
}
if (asd->params.video_dis_en)
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .stream_config.init_num_cont_raw_buf +=
- ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
+ .stream_config.init_num_cont_raw_buf +=
+ ATOMISP_CSS2_NUM_DVS_FRAME_DELAY;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .stream_config.target_num_cont_raw_buf = num_frames;
+ .stream_config.target_num_cont_raw_buf = num_frames;
return 0;
}
}
static enum ia_css_pipe_mode __pipe_id_to_pipe_mode(
- struct atomisp_sub_device *asd,
- enum ia_css_pipe_id pipe_id)
+ struct atomisp_sub_device *asd,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
struct camera_mipi_info *mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
switch (pipe_id) {
case IA_CSS_PIPE_ID_COPY:
* YUV420_Legacy format.
*/
if (mipi_info && mipi_info->input_format ==
- ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY)
+ ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY)
return IA_CSS_PIPE_MODE_YUVPP;
return IA_CSS_PIPE_MODE_COPY;
case IA_CSS_PIPE_ID_PREVIEW:
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[stream_index];
+ &asd->stream_env[stream_index];
struct ia_css_stream_config *s_config = &stream_env->stream_config;
stream_env->pipe_configs[pipe_id].mode =
- __pipe_id_to_pipe_mode(asd, pipe_id);
+ __pipe_id_to_pipe_mode(asd, pipe_id);
stream_env->update_pipe[pipe_id] = true;
stream_env->pipe_configs[pipe_id].output_info[0].res.width = width;
}
static void __configure_video_preview_output(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum ia_css_frame_format format,
- enum ia_css_pipe_id pipe_id)
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum ia_css_frame_format format,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[stream_index];
+ &asd->stream_env[stream_index];
struct ia_css_frame_info *css_output_info;
struct ia_css_stream_config *stream_config = &stream_env->stream_config;
stream_env->pipe_configs[pipe_id].mode =
- __pipe_id_to_pipe_mode(asd, pipe_id);
+ __pipe_id_to_pipe_mode(asd, pipe_id);
stream_env->update_pipe[pipe_id] = true;
/*
*/
if (asd->continuous_mode->val)
css_output_info = &stream_env->pipe_configs[pipe_id].
- output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+ output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
else
css_output_info = &stream_env->pipe_configs[pipe_id].
- output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+ output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
css_output_info->res.width = width;
css_output_info->res.height = height;
* downscaling input resolution.
*/
static void __configure_capture_pp_input(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- enum ia_css_pipe_id pipe_id)
+ unsigned int width, unsigned int height,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct ia_css_stream_config *stream_config = &stream_env->stream_config;
struct ia_css_pipe_config *pipe_configs =
- &stream_env->pipe_configs[pipe_id];
+ &stream_env->pipe_configs[pipe_id];
struct ia_css_pipe_extra_config *pipe_extra_configs =
- &stream_env->pipe_extra_configs[pipe_id];
+ &stream_env->pipe_extra_configs[pipe_id];
unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
if (width == 0 && height == 0)
return;
/* here just copy the calculation in css */
hor_ds_factor = CEIL_DIV(width >> 1,
- pipe_configs->output_info[0].res.width);
+ pipe_configs->output_info[0].res.width);
ver_ds_factor = CEIL_DIV(height >> 1,
- pipe_configs->output_info[0].res.height);
+ pipe_configs->output_info[0].res.height);
if ((asd->isp->media_dev.hw_revision <
- (ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT) ||
- IS_CHT) && hor_ds_factor != ver_ds_factor) {
+ (ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT) ||
+ IS_CHT) && hor_ds_factor != ver_ds_factor) {
dev_warn(asd->isp->dev,
- "Cropping for capture due to FW limitation");
+ "Cropping for capture due to FW limitation");
return;
}
pipe_extra_configs->enable_yuv_ds = true;
pipe_configs->capt_pp_in_res.width =
- stream_config->input_config.effective_res.width;
+ stream_config->input_config.effective_res.width;
pipe_configs->capt_pp_in_res.height =
- stream_config->input_config.effective_res.height;
+ stream_config->input_config.effective_res.height;
dev_dbg(isp->dev, "configuring pipe[%d]capture pp input w=%d.h=%d.\n",
pipe_id, width, height);
* yuv downscaling, which needs addtional configurations.
*/
static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- enum ia_css_pipe_id pipe_id)
+ unsigned int width, unsigned int height,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
int out_width, out_height, yuv_ds_in_width, yuv_ds_in_height;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct ia_css_stream_config *stream_config = &stream_env->stream_config;
struct ia_css_pipe_config *pipe_configs =
- &stream_env->pipe_configs[pipe_id];
+ &stream_env->pipe_configs[pipe_id];
struct ia_css_pipe_extra_config *pipe_extra_configs =
- &stream_env->pipe_extra_configs[pipe_id];
+ &stream_env->pipe_extra_configs[pipe_id];
struct ia_css_resolution *bayer_ds_out_res =
- &pipe_configs->bayer_ds_out_res;
+ &pipe_configs->bayer_ds_out_res;
struct ia_css_resolution *vf_pp_in_res =
- &pipe_configs->vf_pp_in_res;
+ &pipe_configs->vf_pp_in_res;
struct ia_css_resolution *effective_res =
- &stream_config->input_config.effective_res;
+ &stream_config->input_config.effective_res;
const struct bayer_ds_factor bds_fct[] = {{2, 1}, {3, 2}, {5, 4} };
/*
* online == 1 or continuous == 0 or raw_binning = 0
*/
if (stream_config->online || !stream_config->continuous ||
- !pipe_extra_configs->enable_raw_binning) {
+ !pipe_extra_configs->enable_raw_binning) {
bayer_ds_out_res->width = 0;
bayer_ds_out_res->height = 0;
} else {
}
if (vf_pp_in_res->width == out_width &&
- vf_pp_in_res->height == out_height) {
+ vf_pp_in_res->height == out_height) {
pipe_extra_configs->enable_yuv_ds = false;
vf_pp_in_res->width = 0;
vf_pp_in_res->height = 0;
* yuv downscaling, which needs addtional configurations.
*/
static void __configure_video_pp_input(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- enum ia_css_pipe_id pipe_id)
+ unsigned int width, unsigned int height,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
int out_width, out_height;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct ia_css_stream_config *stream_config = &stream_env->stream_config;
struct ia_css_pipe_config *pipe_configs =
- &stream_env->pipe_configs[pipe_id];
+ &stream_env->pipe_configs[pipe_id];
struct ia_css_pipe_extra_config *pipe_extra_configs =
- &stream_env->pipe_extra_configs[pipe_id];
+ &stream_env->pipe_extra_configs[pipe_id];
struct ia_css_resolution *bayer_ds_out_res =
- &pipe_configs->bayer_ds_out_res;
+ &pipe_configs->bayer_ds_out_res;
struct ia_css_resolution *effective_res =
- &stream_config->input_config.effective_res;
+ &stream_config->input_config.effective_res;
const struct bayer_ds_factor bds_factors[] = {
- {8, 1}, {6, 1}, {4, 1}, {3, 1}, {2, 1}, {3, 2} };
+ {8, 1}, {6, 1}, {4, 1}, {3, 1}, {2, 1}, {3, 2}
+ };
unsigned int i;
if (width == 0 && height == 0)
effective_res->height >= out_height *
bds_factors[i].numerator / bds_factors[i].denominator) {
bayer_ds_out_res->width = effective_res->width *
- bds_factors[i].denominator /
- bds_factors[i].numerator;
+ bds_factors[i].denominator /
+ bds_factors[i].numerator;
bayer_ds_out_res->height = effective_res->height *
- bds_factors[i].denominator /
- bds_factors[i].numerator;
+ bds_factors[i].denominator /
+ bds_factors[i].numerator;
break;
}
}
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
stream_env->pipe_configs[pipe_id].mode =
- __pipe_id_to_pipe_mode(asd, pipe_id);
+ __pipe_id_to_pipe_mode(asd, pipe_id);
stream_env->update_pipe[pipe_id] = true;
stream_env->pipe_configs[pipe_id].vf_output_info[0].res.width = width;
stream_env->pipe_configs[pipe_id].vf_output_info[0].res.height = height;
stream_env->pipe_configs[pipe_id].vf_output_info[0].format = format;
stream_env->pipe_configs[pipe_id].vf_output_info[0].padded_width =
- min_width;
+ min_width;
dev_dbg(isp->dev,
"configuring pipe[%d] vf output info w=%d.h=%d.f=%d.\n",
- pipe_id, width, height, format);
+ pipe_id, width, height, format);
}
static void __configure_video_vf_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format,
- enum ia_css_pipe_id pipe_id)
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct ia_css_frame_info *css_output_info;
stream_env->pipe_configs[pipe_id].mode =
- __pipe_id_to_pipe_mode(asd, pipe_id);
+ __pipe_id_to_pipe_mode(asd, pipe_id);
stream_env->update_pipe[pipe_id] = true;
/*
*/
if (asd->continuous_mode->val)
css_output_info = &stream_env->pipe_configs[pipe_id].
- vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+ vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
else
css_output_info = &stream_env->pipe_configs[pipe_id].
- vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+ vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
css_output_info->res.width = width;
css_output_info->res.height = height;
css_output_info->padded_width = min_width;
dev_dbg(isp->dev,
"configuring pipe[%d] vf output info w=%d.h=%d.f=%d.\n",
- pipe_id, width, height, format);
+ pipe_id, width, height, format);
}
static int __get_frame_info(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info,
- enum frame_info_type type,
- enum ia_css_pipe_id pipe_id)
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info,
+ enum frame_info_type type,
+ enum ia_css_pipe_id pipe_id)
{
struct atomisp_device *isp = asd->isp;
enum ia_css_err ret;
goto stream_err;
ret = ia_css_pipe_get_info(
- asd->stream_env[stream_index]
- .pipes[pipe_id], &p_info);
+ asd->stream_env[stream_index]
+ .pipes[pipe_id], &p_info);
if (ret == IA_CSS_SUCCESS) {
switch (type) {
case ATOMISP_CSS_VF_FRAME:
}
static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
- uint16_t source_pad)
+ uint16_t source_pad)
{
struct atomisp_device *isp = asd->isp;
/*
return IA_CSS_PIPE_ID_CAPTURE;
case ATOMISP_SUBDEV_PAD_SOURCE_VF:
if (!atomisp_is_mbuscode_raw(
- asd->fmt[asd->capture_pad].fmt.code))
+ asd->fmt[asd->capture_pad].fmt.code))
return IA_CSS_PIPE_ID_CAPTURE;
case ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW:
if (asd->yuvpp_mode)
}
int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
- u16 source_pad,
- struct atomisp_css_frame_info *frame_info)
+ u16 source_pad,
+ struct atomisp_css_frame_info *frame_info)
{
struct ia_css_pipe_info info;
int pipe_index = atomisp_get_pipe_index(asd, source_pad);
stream_index = atomisp_source_pad_to_stream_id(asd, source_pad);
else {
stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
- ATOMISP_INPUT_STREAM_VIDEO :
- atomisp_source_pad_to_stream_id(asd, source_pad);
+ ATOMISP_INPUT_STREAM_VIDEO :
+ atomisp_source_pad_to_stream_id(asd, source_pad);
}
if (IA_CSS_SUCCESS != ia_css_pipe_get_info(asd->stream_env[stream_index]
- .pipes[pipe_index], &info)) {
+ .pipes[pipe_index], &info)) {
dev_err(isp->dev, "ia_css_pipe_get_info FAILED");
return -EINVAL;
}
case ATOMISP_SUBDEV_PAD_SOURCE_VIDEO:
if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
*frame_info = info.
- output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+ output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
else
*frame_info = info.
- output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+ output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
break;
case ATOMISP_SUBDEV_PAD_SOURCE_VF:
if (stream_index == ATOMISP_INPUT_STREAM_POSTVIEW)
pipe_index == IA_CSS_PIPE_ID_YUVPP))
if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
*frame_info = info.
- vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+ vf_output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
else
*frame_info = info.
- vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+ vf_output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
else if (ATOMISP_USE_YUVPP(asd) && asd->continuous_mode->val)
*frame_info =
- info.output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
+ info.output_info[ATOMISP_CSS_OUTPUT_SECOND_INDEX];
else
*frame_info =
- info.output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
+ info.output_info[ATOMISP_CSS_OUTPUT_DEFAULT_INDEX];
break;
default:
}
int atomisp_css_copy_configure_output(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int padded_width,
- enum atomisp_css_frame_format format)
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int padded_width,
+ enum atomisp_css_frame_format format)
{
asd->stream_env[stream_index].pipe_configs[IA_CSS_PIPE_ID_COPY].
- default_capture_config.mode =
- CSS_CAPTURE_MODE_RAW;
+ default_capture_config.mode =
+ CSS_CAPTURE_MODE_RAW;
__configure_output(asd, stream_index, width, height, padded_width,
format, IA_CSS_PIPE_ID_COPY);
}
int atomisp_css_yuvpp_configure_output(struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int padded_width,
- enum atomisp_css_frame_format format)
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int padded_width,
+ enum atomisp_css_frame_format format)
{
asd->stream_env[stream_index].pipe_configs[IA_CSS_PIPE_ID_YUVPP].
- default_capture_config.mode =
- CSS_CAPTURE_MODE_RAW;
+ default_capture_config.mode =
+ CSS_CAPTURE_MODE_RAW;
__configure_output(asd, stream_index, width, height, padded_width,
format, IA_CSS_PIPE_ID_YUVPP);
}
int atomisp_css_yuvpp_configure_viewfinder(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[stream_index];
+ &asd->stream_env[stream_index];
enum ia_css_pipe_id pipe_id = IA_CSS_PIPE_ID_YUVPP;
stream_env->pipe_configs[pipe_id].mode =
- __pipe_id_to_pipe_mode(asd, pipe_id);
+ __pipe_id_to_pipe_mode(asd, pipe_id);
stream_env->update_pipe[pipe_id] = true;
stream_env->pipe_configs[pipe_id].vf_output_info[0].res.width = width;
stream_env->pipe_configs[pipe_id].vf_output_info[0].res.height = height;
stream_env->pipe_configs[pipe_id].vf_output_info[0].format = format;
stream_env->pipe_configs[pipe_id].vf_output_info[0].padded_width =
- min_width;
+ min_width;
return 0;
}
int atomisp_css_yuvpp_get_output_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info)
{
return __get_frame_info(asd, stream_index, info,
- ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_YUVPP);
+ ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_YUVPP);
}
int atomisp_css_yuvpp_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info)
{
return __get_frame_info(asd, stream_index, info,
- ATOMISP_CSS_VF_FRAME, IA_CSS_PIPE_ID_YUVPP);
+ ATOMISP_CSS_VF_FRAME, IA_CSS_PIPE_ID_YUVPP);
}
int atomisp_css_preview_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
/*
* to SOC camera, use yuvpp pipe.
*/
if (ATOMISP_USE_YUVPP(asd))
- __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
- min_width, format, IA_CSS_PIPE_ID_YUVPP);
+ __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width,
+ height,
+ min_width, format, IA_CSS_PIPE_ID_YUVPP);
else
__configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
- min_width, format, IA_CSS_PIPE_ID_PREVIEW);
+ min_width, format, IA_CSS_PIPE_ID_PREVIEW);
return 0;
}
int atomisp_css_capture_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
enum ia_css_pipe_id pipe_id;
pipe_id = IA_CSS_PIPE_ID_CAPTURE;
__configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
- min_width, format, pipe_id);
+ min_width, format, pipe_id);
return 0;
}
int atomisp_css_video_configure_output(struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
/*
* to SOC camera, use yuvpp pipe.
*/
if (ATOMISP_USE_YUVPP(asd))
- __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
- min_width, format, IA_CSS_PIPE_ID_YUVPP);
+ __configure_video_preview_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width,
+ height,
+ min_width, format, IA_CSS_PIPE_ID_YUVPP);
else
__configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL, width, height,
- min_width, format, IA_CSS_PIPE_ID_VIDEO);
+ min_width, format, IA_CSS_PIPE_ID_VIDEO);
return 0;
}
int atomisp_css_video_configure_viewfinder(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
/*
* to SOC camera, video will use yuvpp pipe.
*/
if (ATOMISP_USE_YUVPP(asd))
__configure_video_vf_output(asd, width, height, min_width, format,
- IA_CSS_PIPE_ID_YUVPP);
+ IA_CSS_PIPE_ID_YUVPP);
else
__configure_vf_output(asd, width, height, min_width, format,
- IA_CSS_PIPE_ID_VIDEO);
+ IA_CSS_PIPE_ID_VIDEO);
return 0;
}
int atomisp_css_capture_configure_viewfinder(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height,
- unsigned int min_width,
- enum atomisp_css_frame_format format)
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height,
+ unsigned int min_width,
+ enum atomisp_css_frame_format format)
{
enum ia_css_pipe_id pipe_id;
pipe_id = IA_CSS_PIPE_ID_CAPTURE;
__configure_vf_output(asd, width, height, min_width, format,
- pipe_id);
+ pipe_id);
return 0;
}
int atomisp_css_video_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
enum ia_css_pipe_id pipe_id;
enum frame_info_type frame_type = ATOMISP_CSS_VF_FRAME;
}
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- frame_type, pipe_id);
+ frame_type, pipe_id);
}
int atomisp_css_capture_get_viewfinder_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
enum ia_css_pipe_id pipe_id;
pipe_id = IA_CSS_PIPE_ID_CAPTURE;
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- ATOMISP_CSS_VF_FRAME, pipe_id);
+ ATOMISP_CSS_VF_FRAME, pipe_id);
}
int atomisp_css_capture_get_output_raw_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
if (ATOMISP_USE_YUVPP(asd))
return 0;
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- ATOMISP_CSS_RAW_FRAME, IA_CSS_PIPE_ID_CAPTURE);
+ ATOMISP_CSS_RAW_FRAME, IA_CSS_PIPE_ID_CAPTURE);
}
int atomisp_css_copy_get_output_frame_info(
- struct atomisp_sub_device *asd,
- unsigned int stream_index,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ unsigned int stream_index,
+ struct atomisp_css_frame_info *info)
{
return __get_frame_info(asd, stream_index, info,
- ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_COPY);
+ ATOMISP_CSS_OUTPUT_FRAME, IA_CSS_PIPE_ID_COPY);
}
int atomisp_css_preview_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
enum ia_css_pipe_id pipe_id;
enum frame_info_type frame_type = ATOMISP_CSS_OUTPUT_FRAME;
}
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- frame_type, pipe_id);
+ frame_type, pipe_id);
}
int atomisp_css_capture_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
enum ia_css_pipe_id pipe_id;
pipe_id = IA_CSS_PIPE_ID_CAPTURE;
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- ATOMISP_CSS_OUTPUT_FRAME, pipe_id);
+ ATOMISP_CSS_OUTPUT_FRAME, pipe_id);
}
int atomisp_css_video_get_output_frame_info(
- struct atomisp_sub_device *asd,
- struct atomisp_css_frame_info *info)
+ struct atomisp_sub_device *asd,
+ struct atomisp_css_frame_info *info)
{
enum ia_css_pipe_id pipe_id;
enum frame_info_type frame_type = ATOMISP_CSS_OUTPUT_FRAME;
}
return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
- frame_type, pipe_id);
+ frame_type, pipe_id);
}
int atomisp_css_preview_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
__configure_preview_pp_input(asd, width, height,
- ATOMISP_USE_YUVPP(asd) ?
- IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_PREVIEW);
+ ATOMISP_USE_YUVPP(asd) ?
+ IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_PREVIEW);
if (width > stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
- capt_pp_in_res.width)
+ capt_pp_in_res.width)
__configure_capture_pp_input(asd, width, height,
- ATOMISP_USE_YUVPP(asd) ?
- IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+ ATOMISP_USE_YUVPP(asd) ?
+ IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
return 0;
}
int atomisp_css_capture_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height)
{
__configure_capture_pp_input(asd, width, height,
- ATOMISP_USE_YUVPP(asd) ?
- IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+ ATOMISP_USE_YUVPP(asd) ?
+ IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
return 0;
}
int atomisp_css_video_configure_pp_input(
- struct atomisp_sub_device *asd,
- unsigned int width, unsigned int height)
+ struct atomisp_sub_device *asd,
+ unsigned int width, unsigned int height)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
__configure_video_pp_input(asd, width, height,
- ATOMISP_USE_YUVPP(asd) ?
- IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_VIDEO);
+ ATOMISP_USE_YUVPP(asd) ?
+ IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_VIDEO);
if (width > stream_env->pipe_configs[IA_CSS_PIPE_ID_CAPTURE].
- capt_pp_in_res.width)
+ capt_pp_in_res.width)
__configure_capture_pp_input(asd, width, height,
- ATOMISP_USE_YUVPP(asd) ?
- IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
+ ATOMISP_USE_YUVPP(asd) ?
+ IA_CSS_PIPE_ID_YUVPP : IA_CSS_PIPE_ID_CAPTURE);
return 0;
}
int atomisp_css_offline_capture_configure(struct atomisp_sub_device *asd,
- int num_captures, unsigned int skip, int offset)
+ int num_captures, unsigned int skip, int offset)
{
enum ia_css_err ret;
#ifdef ISP2401
dev_dbg(asd->isp->dev, "%s num_capture:%d skip:%d offset:%d\n",
- __func__, num_captures, skip, offset);
+ __func__, num_captures, skip, offset);
#endif
ret = ia_css_stream_capture(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- num_captures, skip, offset);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ num_captures, skip, offset);
if (ret != IA_CSS_SUCCESS)
return -EINVAL;
enum ia_css_err ret;
ret = ia_css_stream_capture_frame(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- exp_id);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ exp_id);
if (ret == IA_CSS_ERR_QUEUE_IS_FULL) {
/* capture cmd queue is full */
return -EBUSY;
enum ia_css_err ret;
ret = ia_css_unlock_raw_frame(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- exp_id);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ exp_id);
if (ret == IA_CSS_ERR_QUEUE_IS_FULL)
return -EAGAIN;
else if (ret != IA_CSS_SUCCESS)
bool enable)
{
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
- .default_capture_config.enable_xnr = enable;
+ .pipe_configs[IA_CSS_PIPE_ID_CAPTURE]
+ .default_capture_config.enable_xnr = enable;
asd->params.capture_config.enable_xnr = enable;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
+ .update_pipe[IA_CSS_PIPE_ID_CAPTURE] = true;
return 0;
}
unsigned int height)
{
ia_css_stream_send_input_frame(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- data, width, height);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ data, width, height);
}
bool atomisp_css_isp_has_started(void)
void atomisp_css_request_flash(struct atomisp_sub_device *asd)
{
ia_css_stream_request_flash(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream);
}
void atomisp_css_set_wb_config(struct atomisp_sub_device *asd,
- struct atomisp_css_wb_config *wb_config)
+ struct atomisp_css_wb_config *wb_config)
{
asd->params.config.wb_config = wb_config;
}
void atomisp_css_set_ob_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ob_config *ob_config)
+ struct atomisp_css_ob_config *ob_config)
{
asd->params.config.ob_config = ob_config;
}
void atomisp_css_set_dp_config(struct atomisp_sub_device *asd,
- struct atomisp_css_dp_config *dp_config)
+ struct atomisp_css_dp_config *dp_config)
{
asd->params.config.dp_config = dp_config;
}
void atomisp_css_set_de_config(struct atomisp_sub_device *asd,
- struct atomisp_css_de_config *de_config)
+ struct atomisp_css_de_config *de_config)
{
asd->params.config.de_config = de_config;
}
void atomisp_css_set_dz_config(struct atomisp_sub_device *asd,
- struct atomisp_css_dz_config *dz_config)
+ struct atomisp_css_dz_config *dz_config)
{
asd->params.config.dz_config = dz_config;
}
}
void atomisp_css_set_ce_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ce_config *ce_config)
+ struct atomisp_css_ce_config *ce_config)
{
asd->params.config.ce_config = ce_config;
}
void atomisp_css_set_nr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_nr_config *nr_config)
+ struct atomisp_css_nr_config *nr_config)
{
asd->params.config.nr_config = nr_config;
}
void atomisp_css_set_ee_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ee_config *ee_config)
+ struct atomisp_css_ee_config *ee_config)
{
asd->params.config.ee_config = ee_config;
}
void atomisp_css_set_tnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_tnr_config *tnr_config)
+ struct atomisp_css_tnr_config *tnr_config)
{
asd->params.config.tnr_config = tnr_config;
}
void atomisp_css_set_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *cc_config)
+ struct atomisp_css_cc_config *cc_config)
{
asd->params.config.cc_config = cc_config;
}
void atomisp_css_set_macc_table(struct atomisp_sub_device *asd,
- struct atomisp_css_macc_table *macc_table)
+ struct atomisp_css_macc_table *macc_table)
{
asd->params.config.macc_table = macc_table;
}
void atomisp_css_set_macc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_macc_config *macc_config)
+ struct atomisp_css_macc_config *macc_config)
{
asd->params.config.macc_config = macc_config;
}
void atomisp_css_set_ecd_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ecd_config *ecd_config)
+ struct atomisp_css_ecd_config *ecd_config)
{
asd->params.config.ecd_config = ecd_config;
}
void atomisp_css_set_ynr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ynr_config *ynr_config)
+ struct atomisp_css_ynr_config *ynr_config)
{
asd->params.config.ynr_config = ynr_config;
}
void atomisp_css_set_fc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_fc_config *fc_config)
+ struct atomisp_css_fc_config *fc_config)
{
asd->params.config.fc_config = fc_config;
}
void atomisp_css_set_ctc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ctc_config *ctc_config)
+ struct atomisp_css_ctc_config *ctc_config)
{
asd->params.config.ctc_config = ctc_config;
}
void atomisp_css_set_cnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cnr_config *cnr_config)
+ struct atomisp_css_cnr_config *cnr_config)
{
asd->params.config.cnr_config = cnr_config;
}
void atomisp_css_set_aa_config(struct atomisp_sub_device *asd,
- struct atomisp_css_aa_config *aa_config)
+ struct atomisp_css_aa_config *aa_config)
{
asd->params.config.aa_config = aa_config;
}
void atomisp_css_set_baa_config(struct atomisp_sub_device *asd,
- struct atomisp_css_baa_config *baa_config)
+ struct atomisp_css_baa_config *baa_config)
{
asd->params.config.baa_config = baa_config;
}
void atomisp_css_set_anr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_anr_config *anr_config)
+ struct atomisp_css_anr_config *anr_config)
{
asd->params.config.anr_config = anr_config;
}
void atomisp_css_set_xnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_xnr_config *xnr_config)
+ struct atomisp_css_xnr_config *xnr_config)
{
asd->params.config.xnr_config = xnr_config;
}
void atomisp_css_set_yuv2rgb_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *yuv2rgb_cc_config)
+ struct atomisp_css_cc_config *yuv2rgb_cc_config)
{
asd->params.config.yuv2rgb_cc_config = yuv2rgb_cc_config;
}
void atomisp_css_set_rgb2yuv_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *rgb2yuv_cc_config)
+ struct atomisp_css_cc_config *rgb2yuv_cc_config)
{
asd->params.config.rgb2yuv_cc_config = rgb2yuv_cc_config;
}
void atomisp_css_set_xnr_table(struct atomisp_sub_device *asd,
- struct atomisp_css_xnr_table *xnr_table)
+ struct atomisp_css_xnr_table *xnr_table)
{
asd->params.config.xnr_table = xnr_table;
}
void atomisp_css_set_r_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *r_gamma_table)
+ struct atomisp_css_rgb_gamma_table *r_gamma_table)
{
asd->params.config.r_gamma_table = r_gamma_table;
}
void atomisp_css_set_g_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *g_gamma_table)
+ struct atomisp_css_rgb_gamma_table *g_gamma_table)
{
asd->params.config.g_gamma_table = g_gamma_table;
}
void atomisp_css_set_b_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *b_gamma_table)
+ struct atomisp_css_rgb_gamma_table *b_gamma_table)
{
asd->params.config.b_gamma_table = b_gamma_table;
}
void atomisp_css_set_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_gamma_table *gamma_table)
+ struct atomisp_css_gamma_table *gamma_table)
{
asd->params.config.gamma_table = gamma_table;
}
void atomisp_css_set_ctc_table(struct atomisp_sub_device *asd,
- struct atomisp_css_ctc_table *ctc_table)
+ struct atomisp_css_ctc_table *ctc_table)
{
int i;
u16 *vamem_ptr = ctc_table->data.vamem_1;
}
void atomisp_css_set_anr_thres(struct atomisp_sub_device *asd,
- struct atomisp_css_anr_thres *anr_thres)
+ struct atomisp_css_anr_thres *anr_thres)
{
asd->params.config.anr_thres = anr_thres;
}
void atomisp_css_set_dvs_6axis(struct atomisp_sub_device *asd,
- struct atomisp_css_dvs_6axis *dvs_6axis)
+ struct atomisp_css_dvs_6axis *dvs_6axis)
{
asd->params.config.dvs_6axis_config = dvs_6axis;
}
void atomisp_css_set_gc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_gc_config *gc_config)
+ struct atomisp_css_gc_config *gc_config)
{
asd->params.config.gc_config = gc_config;
}
void atomisp_css_set_3a_config(struct atomisp_sub_device *asd,
- struct atomisp_css_3a_config *s3a_config)
+ struct atomisp_css_3a_config *s3a_config)
{
asd->params.config.s3a_config = s3a_config;
}
void atomisp_css_video_set_dis_vector(struct atomisp_sub_device *asd,
- struct atomisp_dis_vector *vector)
+ struct atomisp_dis_vector *vector)
{
if (!asd->params.config.motion_vector)
asd->params.config.motion_vector = &asd->params.css_param.motion_vector;
memset(asd->params.config.motion_vector,
- 0, sizeof(struct ia_css_vector));
+ 0, sizeof(struct ia_css_vector));
asd->params.css_param.motion_vector.x = vector->x;
asd->params.css_param.motion_vector.y = vector->y;
}
static int atomisp_compare_dvs_grid(struct atomisp_sub_device *asd,
- struct atomisp_dvs_grid_info *atomgrid)
+ struct atomisp_dvs_grid_info *atomgrid)
{
struct atomisp_css_dvs_grid_info *cur =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
if (!cur) {
dev_err(asd->isp->dev, "dvs grid not available!\n");
}
void atomisp_css_set_dvs2_coefs(struct atomisp_sub_device *asd,
- struct ia_css_dvs2_coefficients *coefs)
+ struct ia_css_dvs2_coefficients *coefs)
{
asd->params.config.dvs2_coefs = coefs;
}
int atomisp_css_set_dis_coefs(struct atomisp_sub_device *asd,
- struct atomisp_dis_coefficients *coefs)
+ struct atomisp_dis_coefficients *coefs)
{
if (atomisp_compare_dvs_grid(asd, &coefs->grid_info) != 0)
/* If the grid info in the argument differs from the current
return -EINVAL;
if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.odd_real,
- coefs->hor_coefs.odd_real, asd->params.dvs_hor_coef_bytes))
+ coefs->hor_coefs.odd_real, asd->params.dvs_hor_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.odd_imag,
- coefs->hor_coefs.odd_imag, asd->params.dvs_hor_coef_bytes))
+ coefs->hor_coefs.odd_imag, asd->params.dvs_hor_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.even_real,
- coefs->hor_coefs.even_real, asd->params.dvs_hor_coef_bytes))
+ coefs->hor_coefs.even_real, asd->params.dvs_hor_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->hor_coefs.even_imag,
- coefs->hor_coefs.even_imag, asd->params.dvs_hor_coef_bytes))
+ coefs->hor_coefs.even_imag, asd->params.dvs_hor_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.odd_real,
- coefs->ver_coefs.odd_real, asd->params.dvs_ver_coef_bytes))
+ coefs->ver_coefs.odd_real, asd->params.dvs_ver_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.odd_imag,
- coefs->ver_coefs.odd_imag, asd->params.dvs_ver_coef_bytes))
+ coefs->ver_coefs.odd_imag, asd->params.dvs_ver_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.even_real,
- coefs->ver_coefs.even_real, asd->params.dvs_ver_coef_bytes))
+ coefs->ver_coefs.even_real, asd->params.dvs_ver_coef_bytes))
return -EFAULT;
if (copy_from_user(asd->params.css_param.dvs2_coeff->ver_coefs.even_imag,
- coefs->ver_coefs.even_imag, asd->params.dvs_ver_coef_bytes))
+ coefs->ver_coefs.even_imag, asd->params.dvs_ver_coef_bytes))
return -EFAULT;
asd->params.css_param.update_flag.dvs2_coefs =
- (struct atomisp_dvs2_coefficients *)
- asd->params.css_param.dvs2_coeff;
+ (struct atomisp_dvs2_coefficients *)
+ asd->params.css_param.dvs2_coeff;
/* FIXME! */
-/* asd->params.dis_proj_data_valid = false; */
+ /* asd->params.dis_proj_data_valid = false; */
asd->params.css_update_params_needed = true;
return 0;
}
void atomisp_css_set_zoom_factor(struct atomisp_sub_device *asd,
- unsigned int zoom)
+ unsigned int zoom)
{
struct atomisp_device *isp = asd->isp;
if (zoom == asd->params.css_param.dz_config.dx &&
- zoom == asd->params.css_param.dz_config.dy) {
+ zoom == asd->params.css_param.dz_config.dy) {
dev_dbg(isp->dev, "same zoom scale. skipped.\n");
return;
}
memset(&asd->params.css_param.dz_config, 0,
- sizeof(struct ia_css_dz_config));
+ sizeof(struct ia_css_dz_config));
asd->params.css_param.dz_config.dx = zoom;
asd->params.css_param.dz_config.dy = zoom;
asd->params.css_param.update_flag.dz_config =
- (struct atomisp_dz_config *)&asd->params.css_param.dz_config;
+ (struct atomisp_dz_config *)&asd->params.css_param.dz_config;
asd->params.css_update_params_needed = true;
}
void atomisp_css_set_formats_config(struct atomisp_sub_device *asd,
- struct atomisp_css_formats_config *formats_config)
+ struct atomisp_css_formats_config *formats_config)
{
asd->params.config.formats_config = formats_config;
}
int atomisp_css_get_wb_config(struct atomisp_sub_device *asd,
- struct atomisp_wb_config *config)
+ struct atomisp_wb_config *config)
{
struct atomisp_css_wb_config wb_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.wb_config = &wb_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &wb_config, sizeof(*config));
return 0;
}
int atomisp_css_get_ob_config(struct atomisp_sub_device *asd,
- struct atomisp_ob_config *config)
+ struct atomisp_ob_config *config)
{
struct atomisp_css_ob_config ob_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.ob_config = &ob_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &ob_config, sizeof(*config));
return 0;
}
int atomisp_css_get_dp_config(struct atomisp_sub_device *asd,
- struct atomisp_dp_config *config)
+ struct atomisp_dp_config *config)
{
struct atomisp_css_dp_config dp_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.dp_config = &dp_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &dp_config, sizeof(*config));
return 0;
}
int atomisp_css_get_de_config(struct atomisp_sub_device *asd,
- struct atomisp_de_config *config)
+ struct atomisp_de_config *config)
{
struct atomisp_css_de_config de_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.de_config = &de_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &de_config, sizeof(*config));
return 0;
}
int atomisp_css_get_nr_config(struct atomisp_sub_device *asd,
- struct atomisp_nr_config *config)
+ struct atomisp_nr_config *config)
{
struct atomisp_css_nr_config nr_config;
struct ia_css_isp_config isp_config;
isp_config.nr_config = &nr_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &nr_config, sizeof(*config));
return 0;
}
int atomisp_css_get_ee_config(struct atomisp_sub_device *asd,
- struct atomisp_ee_config *config)
+ struct atomisp_ee_config *config)
{
struct atomisp_css_ee_config ee_config;
struct ia_css_isp_config isp_config;
if (!asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream) {
dev_err(isp->dev, "%s called after streamoff, skipping.\n",
- __func__);
+ __func__);
return -EINVAL;
}
memset(&ee_config, 0, sizeof(struct atomisp_css_ee_config));
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.ee_config = &ee_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &ee_config, sizeof(*config));
return 0;
}
int atomisp_css_get_tnr_config(struct atomisp_sub_device *asd,
- struct atomisp_tnr_config *config)
+ struct atomisp_tnr_config *config)
{
struct atomisp_css_tnr_config tnr_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.tnr_config = &tnr_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, &tnr_config, sizeof(*config));
return 0;
}
int atomisp_css_get_ctc_table(struct atomisp_sub_device *asd,
- struct atomisp_ctc_table *config)
+ struct atomisp_ctc_table *config)
{
struct atomisp_css_ctc_table *tab;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.ctc_table = tab;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, tab, sizeof(*tab));
vfree(tab);
}
int atomisp_css_get_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_gamma_table *config)
+ struct atomisp_gamma_table *config)
{
struct atomisp_css_gamma_table *tab;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.gamma_table = tab;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
memcpy(config, tab, sizeof(*tab));
vfree(tab);
}
int atomisp_css_get_gc_config(struct atomisp_sub_device *asd,
- struct atomisp_gc_config *config)
+ struct atomisp_gc_config *config)
{
struct atomisp_css_gc_config gc_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.gc_config = &gc_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
/* Get gamma correction params from current setup */
memcpy(config, &gc_config, sizeof(*config));
}
int atomisp_css_get_3a_config(struct atomisp_sub_device *asd,
- struct atomisp_3a_config *config)
+ struct atomisp_3a_config *config)
{
struct atomisp_css_3a_config s3a_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.s3a_config = &s3a_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
/* Get white balance from current setup */
memcpy(config, &s3a_config, sizeof(*config));
}
int atomisp_css_get_formats_config(struct atomisp_sub_device *asd,
- struct atomisp_formats_config *config)
+ struct atomisp_formats_config *config)
{
struct atomisp_css_formats_config formats_config;
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(isp_config));
isp_config.formats_config = &formats_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
/* Get narrow gamma from current setup */
memcpy(config, &formats_config, sizeof(*config));
}
int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd,
- unsigned int *zoom)
+ unsigned int *zoom)
{
struct ia_css_dz_config dz_config; /** Digital Zoom */
struct ia_css_isp_config isp_config;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.dz_config = &dz_config;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
*zoom = dz_config.dx;
return 0;
* Function to set/get image stablization statistics
*/
int atomisp_css_get_dis_stat(struct atomisp_sub_device *asd,
- struct atomisp_dis_statistics *stats)
+ struct atomisp_dis_statistics *stats)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_dis_buf *dis_buf;
}
dis_buf = list_entry(asd->dis_stats.next,
- struct atomisp_dis_buf, list);
+ struct atomisp_dis_buf, list);
list_del_init(&dis_buf->list);
spin_unlock_irqrestore(&asd->dis_stats_lock, flags);
if (dis_buf->dvs_map)
ia_css_translate_dvs2_statistics(
- asd->params.dvs_stat, dis_buf->dvs_map);
+ asd->params.dvs_stat, dis_buf->dvs_map);
else
ia_css_get_dvs2_statistics(asd->params.dvs_stat,
- dis_buf->dis_data);
+ dis_buf->dis_data);
stats->exp_id = dis_buf->dis_data->exp_id;
spin_lock_irqsave(&asd->dis_stats_lock, flags);
}
struct atomisp_css_shading_table *atomisp_css_shading_table_alloc(
- unsigned int width, unsigned int height)
+ unsigned int width, unsigned int height)
{
return ia_css_shading_table_alloc(width, height);
}
void atomisp_css_set_shading_table(struct atomisp_sub_device *asd,
- struct atomisp_css_shading_table *table)
+ struct atomisp_css_shading_table *table)
{
asd->params.config.shading_table = table;
}
}
struct atomisp_css_morph_table *atomisp_css_morph_table_allocate(
- unsigned int width, unsigned int height)
+ unsigned int width, unsigned int height)
{
return ia_css_morph_table_allocate(width, height);
}
void atomisp_css_set_morph_table(struct atomisp_sub_device *asd,
- struct atomisp_css_morph_table *table)
+ struct atomisp_css_morph_table *table)
{
asd->params.config.morph_table = table;
}
void atomisp_css_get_morph_table(struct atomisp_sub_device *asd,
- struct atomisp_css_morph_table *table)
+ struct atomisp_css_morph_table *table)
{
struct ia_css_isp_config isp_config;
struct atomisp_device *isp = asd->isp;
memset(&isp_config, 0, sizeof(struct ia_css_isp_config));
isp_config.morph_table = table;
ia_css_stream_get_isp_config(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- &isp_config);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ &isp_config);
}
void atomisp_css_morph_table_free(struct atomisp_css_morph_table *table)
}
void atomisp_css_set_cont_prev_start_time(struct atomisp_device *isp,
- unsigned int overlap)
+ unsigned int overlap)
{
/* CSS 2.0 doesn't support this API. */
dev_dbg(isp->dev, "set cont prev start time is not supported.\n");
/* Unlock the isp mutex taken in IOCTL handler before sleeping! */
rt_mutex_unlock(&isp->mutex);
if (wait_for_completion_interruptible_timeout(&asd->acc.acc_done,
- ATOMISP_ISP_TIMEOUT_DURATION) == 0) {
+ ATOMISP_ISP_TIMEOUT_DURATION) == 0) {
dev_err(isp->dev, "<%s: completion timeout\n", __func__);
atomisp_css_debug_dump_sp_sw_debug_info();
atomisp_css_debug_dump_debug_info(__func__);
continue;
ia_css_isp_param_set_css_mem_init(&acc_fw->fw->mem_initializers,
- IA_CSS_PARAM_CLASS_PARAM, mem,
- acc_fw->args[mem].css_ptr,
- acc_fw->args[mem].length);
+ IA_CSS_PARAM_CLASS_PARAM, mem,
+ acc_fw->args[mem].css_ptr,
+ acc_fw->args[mem].length);
}
return 0;
fw->next = NULL;
hd = &(asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[pipe_id].acc_extension);
+ .pipe_configs[pipe_id].acc_extension);
while (*hd)
hd = &(*hd)->next;
*hd = fw;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .update_pipe[pipe_id] = true;
+ .update_pipe[pipe_id] = true;
return 0;
}
/* Unload acc binary extension */
void atomisp_css_unload_acc_extension(struct atomisp_sub_device *asd,
- struct atomisp_css_fw_info *fw,
- enum atomisp_css_pipe_id pipe_id)
+ struct atomisp_css_fw_info *fw,
+ enum atomisp_css_pipe_id pipe_id)
{
struct atomisp_css_fw_info **hd;
hd = &(asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[pipe_id].acc_extension);
+ .pipe_configs[pipe_id].acc_extension);
while (*hd && *hd != fw)
hd = &(*hd)->next;
if (!*hd) {
fw->next = NULL;
asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .update_pipe[pipe_id] = true;
+ .update_pipe[pipe_id] = true;
}
int atomisp_css_create_acc_pipe(struct atomisp_sub_device *asd)
struct atomisp_device *isp = asd->isp;
struct ia_css_pipe_config *pipe_config;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
if (stream_env->acc_stream) {
if (stream_env->acc_stream_state == CSS_STREAM_STARTED) {
if (ia_css_stream_stop(stream_env->acc_stream)
- != IA_CSS_SUCCESS) {
+ != IA_CSS_SUCCESS) {
dev_err(isp->dev, "stop acc_stream failed.\n");
return -EBUSY;
}
}
if (ia_css_stream_destroy(stream_env->acc_stream)
- != IA_CSS_SUCCESS) {
+ != IA_CSS_SUCCESS) {
dev_err(isp->dev, "destroy acc_stream failed.\n");
return -EBUSY;
}
pipe_config = &stream_env->pipe_configs[CSS_PIPE_ID_ACC];
ia_css_pipe_config_defaults(pipe_config);
asd->acc.acc_stages = kzalloc(MAX_ACC_STAGES *
- sizeof(void *), GFP_KERNEL);
+ sizeof(void *), GFP_KERNEL);
if (!asd->acc.acc_stages)
return -ENOMEM;
pipe_config->acc_stages = asd->acc.acc_stages;
{
struct atomisp_device *isp = asd->isp;
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
struct ia_css_pipe_config *pipe_config =
- &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC];
+ &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC];
if (ia_css_pipe_create(pipe_config,
- &stream_env->pipes[IA_CSS_PIPE_ID_ACC]) != IA_CSS_SUCCESS) {
+ &stream_env->pipes[IA_CSS_PIPE_ID_ACC]) != IA_CSS_SUCCESS) {
dev_err(isp->dev, "%s: ia_css_pipe_create failed\n",
- __func__);
+ __func__);
return -EBADE;
}
memset(&stream_env->acc_stream_config, 0,
- sizeof(struct ia_css_stream_config));
+ sizeof(struct ia_css_stream_config));
if (ia_css_stream_create(&stream_env->acc_stream_config, 1,
- &stream_env->pipes[IA_CSS_PIPE_ID_ACC],
- &stream_env->acc_stream) != IA_CSS_SUCCESS) {
+ &stream_env->pipes[IA_CSS_PIPE_ID_ACC],
+ &stream_env->acc_stream) != IA_CSS_SUCCESS) {
dev_err(isp->dev, "%s: create acc_stream error.\n", __func__);
return -EINVAL;
}
}
if (ia_css_stream_start(stream_env->acc_stream)
- != IA_CSS_SUCCESS) {
+ != IA_CSS_SUCCESS) {
dev_err(isp->dev, "acc_stream start error.\n");
return -EIO;
}
int atomisp_css_stop_acc_pipe(struct atomisp_sub_device *asd)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
if (stream_env->acc_stream_state == CSS_STREAM_STARTED) {
ia_css_stream_stop(stream_env->acc_stream);
stream_env->acc_stream_state = CSS_STREAM_STOPPED;
void atomisp_css_destroy_acc_pipe(struct atomisp_sub_device *asd)
{
struct atomisp_stream_env *stream_env =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
if (stream_env->acc_stream) {
if (ia_css_stream_destroy(stream_env->acc_stream)
!= IA_CSS_SUCCESS)
dev_warn(asd->isp->dev,
- "destroy acc_stream failed.\n");
+ "destroy acc_stream failed.\n");
stream_env->acc_stream = NULL;
}
if (stream_env->pipes[IA_CSS_PIPE_ID_ACC]) {
if (ia_css_pipe_destroy(stream_env->pipes[IA_CSS_PIPE_ID_ACC])
- != IA_CSS_SUCCESS)
+ != IA_CSS_SUCCESS)
dev_warn(asd->isp->dev,
- "destroy ACC pipe failed.\n");
+ "destroy ACC pipe failed.\n");
stream_env->pipes[IA_CSS_PIPE_ID_ACC] = NULL;
stream_env->update_pipe[IA_CSS_PIPE_ID_ACC] = false;
ia_css_pipe_config_defaults(
- &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC]);
+ &stream_env->pipe_configs[IA_CSS_PIPE_ID_ACC]);
ia_css_pipe_extra_config_defaults(
- &stream_env->pipe_extra_configs[IA_CSS_PIPE_ID_ACC]);
+ &stream_env->pipe_extra_configs[IA_CSS_PIPE_ID_ACC]);
}
asd->acc.pipeline = NULL;
}
int atomisp_css_load_acc_binary(struct atomisp_sub_device *asd,
- struct atomisp_css_fw_info *fw,
- unsigned int index)
+ struct atomisp_css_fw_info *fw,
+ unsigned int index)
{
struct ia_css_pipe_config *pipe_config =
- &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
- .pipe_configs[IA_CSS_PIPE_ID_ACC];
+ &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
+ .pipe_configs[IA_CSS_PIPE_ID_ACC];
if (index >= MAX_ACC_STAGES) {
dev_dbg(asd->isp->dev, "%s: index(%d) out of range\n",
- __func__, index);
+ __func__, index);
return -ENOMEM;
}
}
static struct atomisp_sub_device *__get_atomisp_subdev(
- struct ia_css_pipe *css_pipe,
- struct atomisp_device *isp,
- enum atomisp_input_stream_id *stream_id)
+ struct ia_css_pipe *css_pipe,
+ struct atomisp_device *isp,
+ enum atomisp_input_stream_id *stream_id)
{
int i, j, k;
struct atomisp_sub_device *asd;
stream_env = &asd->stream_env[j];
for (k = 0; k < IA_CSS_PIPE_ID_NUM; k++) {
if (stream_env->pipes[k] &&
- stream_env->pipes[k] == css_pipe) {
- *stream_id = j;
- return asd;
- }
+ stream_env->pipes[k] == css_pipe) {
+ *stream_id = j;
+ return asd;
}
+ }
}
}
while (!atomisp_css_dequeue_event(¤t_event)) {
if (current_event.event.type ==
- IA_CSS_EVENT_TYPE_FW_ASSERT) {
+ IA_CSS_EVENT_TYPE_FW_ASSERT) {
/*
* Received FW assertion signal,
* trigger WDT to recover
*/
- dev_err(isp->dev, "%s: ISP reports FW_ASSERT event! fw_assert_module_id %d fw_assert_line_no %d\n",
+ dev_err(isp->dev,
+ "%s: ISP reports FW_ASSERT event! fw_assert_module_id %d fw_assert_line_no %d\n",
__func__,
current_event.event.fw_assert_module_id,
current_event.event.fw_assert_line_no);
return -EINVAL;
} else if (current_event.event.type == IA_CSS_EVENT_TYPE_FW_WARNING) {
dev_warn(isp->dev, "%s: ISP reports warning, code is %d, exp_id %d\n",
- __func__, current_event.event.fw_warning,
- current_event.event.exp_id);
+ __func__, current_event.event.fw_warning,
+ current_event.event.exp_id);
continue;
}
asd = __get_atomisp_subdev(current_event.event.pipe,
- isp, &stream_id);
+ isp, &stream_id);
if (!asd) {
if (current_event.event.type == CSS_EVENT_TIMER)
dev_dbg(isp->dev,
"event: Timer event.");
else
dev_warn(isp->dev, "%s:no subdev.event:%d",
- __func__,
- current_event.event.type);
+ __func__,
+ current_event.event.type);
continue;
}
break;
default:
dev_dbg(isp->dev, "unhandled css stored event: 0x%x\n",
- current_event.event.type);
+ current_event.event.type);
break;
}
}
if (!atomisp_buffers_queued(asd))
atomisp_wdt_stop(asd, false);
else if (reset_wdt_timer[i])
- /* SOF irq should not reset wdt timer. */
+ /* SOF irq should not reset wdt timer. */
atomisp_wdt_refresh(asd,
- ATOMISP_WDT_KEEP_CURRENT_DELAY);
+ ATOMISP_WDT_KEEP_CURRENT_DELAY);
}
#endif
/* Loop for each css vc stream */
for (j = 0; j < ATOMISP_INPUT_STREAM_NUM; j++) {
if (asd->stream_env[j].stream &&
- asd->stream_env[j].stream_config.mode ==
- IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ asd->stream_env[j].stream_config.mode ==
+ IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
return false;
}
}
}
void atomisp_css_set_isp_config_id(struct atomisp_sub_device *asd,
- uint32_t isp_config_id)
+ uint32_t isp_config_id)
{
asd->params.config.isp_config_id = isp_config_id;
}
void atomisp_css_set_isp_config_applied_frame(struct atomisp_sub_device *asd,
- struct atomisp_css_frame *output_frame)
+ struct atomisp_css_frame *output_frame)
{
asd->params.config.output_frame = output_frame;
}
void atomisp_en_dz_capt_pipe(struct atomisp_sub_device *asd, bool enable)
{
ia_css_en_dz_capt_pipe(
- asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
- enable);
+ asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream,
+ enable);
}
struct atomisp_css_dvs_grid_info *atomisp_css_get_dvs_grid_info(
- struct atomisp_css_grid_info *grid_info)
+ struct atomisp_css_grid_info *grid_info)
{
if (!grid_info)
return NULL;
};
void atomisp_css_set_macc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_macc_config *macc_config);
+ struct atomisp_css_macc_config *macc_config);
void atomisp_css_set_ecd_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ecd_config *ecd_config);
+ struct atomisp_css_ecd_config *ecd_config);
void atomisp_css_set_ynr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ynr_config *ynr_config);
+ struct atomisp_css_ynr_config *ynr_config);
void atomisp_css_set_fc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_fc_config *fc_config);
+ struct atomisp_css_fc_config *fc_config);
void atomisp_css_set_aa_config(struct atomisp_sub_device *asd,
- struct atomisp_css_aa_config *aa_config);
+ struct atomisp_css_aa_config *aa_config);
void atomisp_css_set_baa_config(struct atomisp_sub_device *asd,
- struct atomisp_css_baa_config *baa_config);
+ struct atomisp_css_baa_config *baa_config);
void atomisp_css_set_anr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_anr_config *anr_config);
+ struct atomisp_css_anr_config *anr_config);
void atomisp_css_set_xnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_xnr_config *xnr_config);
+ struct atomisp_css_xnr_config *xnr_config);
void atomisp_css_set_cnr_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cnr_config *cnr_config);
+ struct atomisp_css_cnr_config *cnr_config);
void atomisp_css_set_ctc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_ctc_config *ctc_config);
+ struct atomisp_css_ctc_config *ctc_config);
void atomisp_css_set_yuv2rgb_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *yuv2rgb_cc_config);
+ struct atomisp_css_cc_config *yuv2rgb_cc_config);
void atomisp_css_set_rgb2yuv_cc_config(struct atomisp_sub_device *asd,
- struct atomisp_css_cc_config *rgb2yuv_cc_config);
+ struct atomisp_css_cc_config *rgb2yuv_cc_config);
void atomisp_css_set_xnr_table(struct atomisp_sub_device *asd,
- struct atomisp_css_xnr_table *xnr_table);
+ struct atomisp_css_xnr_table *xnr_table);
void atomisp_css_set_r_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *r_gamma_table);
+ struct atomisp_css_rgb_gamma_table *r_gamma_table);
void atomisp_css_set_g_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *g_gamma_table);
+ struct atomisp_css_rgb_gamma_table *g_gamma_table);
void atomisp_css_set_b_gamma_table(struct atomisp_sub_device *asd,
- struct atomisp_css_rgb_gamma_table *b_gamma_table);
+ struct atomisp_css_rgb_gamma_table *b_gamma_table);
void atomisp_css_set_anr_thres(struct atomisp_sub_device *asd,
- struct atomisp_css_anr_thres *anr_thres);
+ struct atomisp_css_anr_thres *anr_thres);
int atomisp_css_check_firmware_version(struct atomisp_device *isp);
void atomisp_css_unload_firmware(struct atomisp_device *isp);
void atomisp_css_set_dvs_6axis(struct atomisp_sub_device *asd,
- struct atomisp_css_dvs_6axis *dvs_6axis);
+ struct atomisp_css_dvs_6axis *dvs_6axis);
unsigned int atomisp_css_debug_get_dtrace_level(void);
int atomisp_css_dump_blob_infor(void);
void atomisp_css_set_isp_config_id(struct atomisp_sub_device *asd,
- uint32_t isp_config_id);
+ uint32_t isp_config_id);
void atomisp_css_set_isp_config_applied_frame(struct atomisp_sub_device *asd,
- struct atomisp_css_frame *output_frame);
+ struct atomisp_css_frame *output_frame);
int atomisp_get_css_dbgfunc(void);
int atomisp_set_css_dbgfunc(struct atomisp_device *isp, int opt);
struct atomisp_css_dvs_grid_info *atomisp_css_get_dvs_grid_info(
- struct atomisp_css_grid_info *grid_info);
+ struct atomisp_css_grid_info *grid_info);
#endif
#include "atomisp_compat_ioctl32.h"
static int get_atomisp_histogram32(struct atomisp_histogram *kp,
- struct atomisp_histogram32 __user *up)
+ struct atomisp_histogram32 __user *up)
{
compat_uptr_t tmp;
}
static int put_atomisp_histogram32(struct atomisp_histogram *kp,
- struct atomisp_histogram32 __user *up)
+ struct atomisp_histogram32 __user *up)
{
compat_uptr_t tmp = (compat_uptr_t)((uintptr_t)kp->data);
}
static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp,
- struct v4l2_pix_format __user *up)
+ struct v4l2_pix_format __user *up)
{
if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format)))
return -EFAULT;
}
static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp,
- struct v4l2_pix_format __user *up)
+ struct v4l2_pix_format __user *up)
{
if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format)))
return -EFAULT;
}
static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp,
- struct v4l2_framebuffer32 __user *up)
+ struct v4l2_framebuffer32 __user *up)
{
compat_uptr_t tmp;
}
static int get_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
- struct atomisp_dis_statistics32 __user *up)
+ struct atomisp_dis_statistics32 __user *up)
{
compat_uptr_t hor_prod_odd_real;
compat_uptr_t hor_prod_odd_imag;
}
static int put_atomisp_dis_statistics32(struct atomisp_dis_statistics *kp,
- struct atomisp_dis_statistics32 __user *up)
+ struct atomisp_dis_statistics32 __user *up)
{
compat_uptr_t hor_prod_odd_real =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_real);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_real);
compat_uptr_t hor_prod_odd_imag =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_imag);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.odd_imag);
compat_uptr_t hor_prod_even_real =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_real);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_real);
compat_uptr_t hor_prod_even_imag =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_imag);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.hor_prod.even_imag);
compat_uptr_t ver_prod_odd_real =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_real);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_real);
compat_uptr_t ver_prod_odd_imag =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_imag);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.odd_imag);
compat_uptr_t ver_prod_even_real =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_real);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_real);
compat_uptr_t ver_prod_even_imag =
- (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_imag);
+ (compat_uptr_t)((uintptr_t)kp->dvs2_stat.ver_prod.even_imag);
if (!access_ok(up, sizeof(struct atomisp_dis_statistics32)) ||
copy_to_user(up, kp, sizeof(struct atomisp_dvs_grid_info)) ||
}
static int get_atomisp_dis_coefficients32(struct atomisp_dis_coefficients *kp,
- struct atomisp_dis_coefficients32 __user *up)
+ struct atomisp_dis_coefficients32 __user *up)
{
compat_uptr_t hor_coefs_odd_real;
compat_uptr_t hor_coefs_odd_imag;
}
static int get_atomisp_dvs_6axis_config32(struct atomisp_dvs_6axis_config *kp,
- struct atomisp_dvs_6axis_config32 __user *up)
-{ compat_uptr_t xcoords_y;
+ struct atomisp_dvs_6axis_config32 __user *up)
+{
+ compat_uptr_t xcoords_y;
compat_uptr_t ycoords_y;
compat_uptr_t xcoords_uv;
compat_uptr_t ycoords_uv;
}
static int get_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
- struct atomisp_3a_statistics32 __user *up)
+ struct atomisp_3a_statistics32 __user *up)
{
compat_uptr_t data;
compat_uptr_t rgby_data;
}
static int put_atomisp_3a_statistics32(struct atomisp_3a_statistics *kp,
- struct atomisp_3a_statistics32 __user *up)
+ struct atomisp_3a_statistics32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
compat_uptr_t rgby_data = (compat_uptr_t)((uintptr_t)kp->rgby_data);
}
static int get_atomisp_metadata_stat32(struct atomisp_metadata *kp,
- struct atomisp_metadata32 __user *up)
+ struct atomisp_metadata32 __user *up)
{
compat_uptr_t data;
compat_uptr_t effective_width;
}
static int put_atomisp_metadata_stat32(struct atomisp_metadata *kp,
- struct atomisp_metadata32 __user *up)
+ struct atomisp_metadata32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
compat_uptr_t effective_width =
- (compat_uptr_t)((uintptr_t)kp->effective_width);
+ (compat_uptr_t)((uintptr_t)kp->effective_width);
if (!access_ok(up, sizeof(struct atomisp_metadata32)) ||
put_user(data, &up->data) ||
put_user(kp->width, &up->width) ||
}
static int put_atomisp_metadata_by_type_stat32(
- struct atomisp_metadata_with_type *kp,
- struct atomisp_metadata_with_type32 __user *up)
+ struct atomisp_metadata_with_type *kp,
+ struct atomisp_metadata_with_type32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
compat_uptr_t effective_width =
- (compat_uptr_t)((uintptr_t)kp->effective_width);
+ (compat_uptr_t)((uintptr_t)kp->effective_width);
if (!access_ok(up, sizeof(struct atomisp_metadata_with_type32)) ||
put_user(data, &up->data) ||
put_user(kp->width, &up->width) ||
}
static int get_atomisp_metadata_by_type_stat32(
- struct atomisp_metadata_with_type *kp,
- struct atomisp_metadata_with_type32 __user *up)
+ struct atomisp_metadata_with_type *kp,
+ struct atomisp_metadata_with_type32 __user *up)
{
compat_uptr_t data;
compat_uptr_t effective_width;
}
static int get_atomisp_morph_table32(struct atomisp_morph_table *kp,
- struct atomisp_morph_table32 __user *up)
+ struct atomisp_morph_table32 __user *up)
{
unsigned int n = ATOMISP_MORPH_TABLE_NUM_PLANES;
}
static int put_atomisp_morph_table32(struct atomisp_morph_table *kp,
- struct atomisp_morph_table32 __user *up)
+ struct atomisp_morph_table32 __user *up)
{
unsigned int n = ATOMISP_MORPH_TABLE_NUM_PLANES;
}
static int get_atomisp_overlay32(struct atomisp_overlay *kp,
- struct atomisp_overlay32 __user *up)
+ struct atomisp_overlay32 __user *up)
{
compat_uptr_t frame;
}
static int put_atomisp_overlay32(struct atomisp_overlay *kp,
- struct atomisp_overlay32 __user *up)
+ struct atomisp_overlay32 __user *up)
{
compat_uptr_t frame = (compat_uptr_t)((uintptr_t)kp->frame);
}
static int get_atomisp_calibration_group32(
- struct atomisp_calibration_group *kp,
- struct atomisp_calibration_group32 __user *up)
+ struct atomisp_calibration_group *kp,
+ struct atomisp_calibration_group32 __user *up)
{
compat_uptr_t calb_grp_values;
}
static int put_atomisp_calibration_group32(
- struct atomisp_calibration_group *kp,
- struct atomisp_calibration_group32 __user *up)
+ struct atomisp_calibration_group *kp,
+ struct atomisp_calibration_group32 __user *up)
{
compat_uptr_t calb_grp_values =
- (compat_uptr_t)((uintptr_t)kp->calb_grp_values);
+ (compat_uptr_t)((uintptr_t)kp->calb_grp_values);
if (!access_ok(up, sizeof(struct atomisp_calibration_group32)) ||
put_user(kp->size, &up->size) ||
}
static int get_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
- struct atomisp_acc_fw_load32 __user *up)
+ struct atomisp_acc_fw_load32 __user *up)
{
compat_uptr_t data;
}
static int put_atomisp_acc_fw_load32(struct atomisp_acc_fw_load *kp,
- struct atomisp_acc_fw_load32 __user *up)
+ struct atomisp_acc_fw_load32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
}
static int get_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
- struct atomisp_acc_fw_arg32 __user *up)
+ struct atomisp_acc_fw_arg32 __user *up)
{
compat_uptr_t value;
}
static int put_atomisp_acc_fw_arg32(struct atomisp_acc_fw_arg *kp,
- struct atomisp_acc_fw_arg32 __user *up)
+ struct atomisp_acc_fw_arg32 __user *up)
{
compat_uptr_t value = (compat_uptr_t)((uintptr_t)kp->value);
}
static int get_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
- struct v4l2_private_int_data32 __user *up)
+ struct v4l2_private_int_data32 __user *up)
{
compat_uptr_t data;
}
static int put_v4l2_private_int_data32(struct v4l2_private_int_data *kp,
- struct v4l2_private_int_data32 __user *up)
+ struct v4l2_private_int_data32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
}
static int get_atomisp_shading_table32(struct atomisp_shading_table *kp,
- struct atomisp_shading_table32 __user *up)
+ struct atomisp_shading_table32 __user *up)
{
unsigned int n = ATOMISP_NUM_SC_COLORS;
}
static int get_atomisp_acc_map32(struct atomisp_acc_map *kp,
- struct atomisp_acc_map32 __user *up)
+ struct atomisp_acc_map32 __user *up)
{
compat_uptr_t user_ptr;
}
static int put_atomisp_acc_map32(struct atomisp_acc_map *kp,
- struct atomisp_acc_map32 __user *up)
+ struct atomisp_acc_map32 __user *up)
{
compat_uptr_t user_ptr = (compat_uptr_t)((uintptr_t)kp->user_ptr);
}
static int get_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
- struct atomisp_acc_s_mapped_arg32 __user *up)
+ struct atomisp_acc_s_mapped_arg32 __user *up)
{
if (!access_ok(up, sizeof(struct atomisp_acc_s_mapped_arg32)) ||
get_user(kp->fw_handle, &up->fw_handle) ||
}
static int put_atomisp_acc_s_mapped_arg32(struct atomisp_acc_s_mapped_arg *kp,
- struct atomisp_acc_s_mapped_arg32 __user *up)
+ struct atomisp_acc_s_mapped_arg32 __user *up)
{
if (!access_ok(up, sizeof(struct atomisp_acc_s_mapped_arg32)) ||
put_user(kp->fw_handle, &up->fw_handle) ||
}
static int get_atomisp_parameters32(struct atomisp_parameters *kp,
- struct atomisp_parameters32 __user *up)
+ struct atomisp_parameters32 __user *up)
{
int n = offsetof(struct atomisp_parameters32, output_frame) /
- sizeof(compat_uptr_t);
+ sizeof(compat_uptr_t);
unsigned int size, offset = 0;
void __user *user_ptr;
unsigned int stp, mtp, dcp, dscp = 0;
} karg;
size = sizeof(struct atomisp_shading_table) +
- sizeof(struct atomisp_morph_table) +
- sizeof(struct atomisp_dis_coefficients) +
- sizeof(struct atomisp_dvs_6axis_config);
+ sizeof(struct atomisp_morph_table) +
+ sizeof(struct atomisp_dis_coefficients) +
+ sizeof(struct atomisp_dvs_6axis_config);
user_ptr = compat_alloc_user_space(size);
/* handle shading table */
if (stp != 0) {
if (get_atomisp_shading_table32(&karg.shading_table,
- (struct atomisp_shading_table32 __user *)
- (uintptr_t)stp))
+ (struct atomisp_shading_table32 __user *)
+ (uintptr_t)stp))
return -EFAULT;
kp->shading_table = (void __force *)user_ptr + offset;
/* handle morph table */
if (mtp != 0) {
if (get_atomisp_morph_table32(&karg.morph_table,
- (struct atomisp_morph_table32 __user *)
- (uintptr_t)mtp))
+ (struct atomisp_morph_table32 __user *)
+ (uintptr_t)mtp))
return -EFAULT;
kp->morph_table = (void __force *)user_ptr + offset;
/* handle dvs2 coefficients */
if (dcp != 0) {
if (get_atomisp_dis_coefficients32(&karg.dvs2_coefs,
- (struct atomisp_dis_coefficients32 __user *)
- (uintptr_t)dcp))
+ (struct atomisp_dis_coefficients32 __user *)
+ (uintptr_t)dcp))
return -EFAULT;
kp->dvs2_coefs = (void __force *)user_ptr + offset;
/* handle dvs 6axis configuration */
if (dscp != 0) {
if (get_atomisp_dvs_6axis_config32(&karg.dvs_6axis_config,
- (struct atomisp_dvs_6axis_config32 __user *)
- (uintptr_t)dscp))
+ (struct atomisp_dvs_6axis_config32 __user *)
+ (uintptr_t)dscp))
return -EFAULT;
kp->dvs_6axis_config = (void __force *)user_ptr + offset;
}
static int get_atomisp_acc_fw_load_to_pipe32(
- struct atomisp_acc_fw_load_to_pipe *kp,
- struct atomisp_acc_fw_load_to_pipe32 __user *up)
+ struct atomisp_acc_fw_load_to_pipe *kp,
+ struct atomisp_acc_fw_load_to_pipe32 __user *up)
{
compat_uptr_t data;
}
static int put_atomisp_acc_fw_load_to_pipe32(
- struct atomisp_acc_fw_load_to_pipe *kp,
- struct atomisp_acc_fw_load_to_pipe32 __user *up)
+ struct atomisp_acc_fw_load_to_pipe *kp,
+ struct atomisp_acc_fw_load_to_pipe32 __user *up)
{
compat_uptr_t data = (compat_uptr_t)((uintptr_t)kp->data);
}
static int get_atomisp_sensor_ae_bracketing_lut(
- struct atomisp_sensor_ae_bracketing_lut *kp,
- struct atomisp_sensor_ae_bracketing_lut32 __user *up)
+ struct atomisp_sensor_ae_bracketing_lut *kp,
+ struct atomisp_sensor_ae_bracketing_lut32 __user *up)
{
compat_uptr_t lut;
}
static long atomisp_do_compat_ioctl(struct file *file,
- unsigned int cmd, unsigned long arg)
+ unsigned int cmd, unsigned long arg)
{
union {
struct atomisp_histogram his;
break;
case ATOMISP_IOC_G_METADATA_BY_TYPE:
err = get_atomisp_metadata_by_type_stat32(&karg.md_with_type,
- up);
+ up);
break;
case ATOMISP_IOC_S_SENSOR_AE_BRACKETING_LUT:
err = get_atomisp_sensor_ae_bracketing_lut(&karg.lut, up);
break;
case ATOMISP_IOC_G_METADATA_BY_TYPE:
err = put_atomisp_metadata_by_type_stat32(&karg.md_with_type,
- up);
+ up);
break;
}
default:
dev_warn(isp->dev,
- "%s: unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
- __func__, _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd),
- cmd);
+ "%s: unknown ioctl '%c', dir=%d, #%d (0x%08x)\n",
+ __func__, _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd),
+ cmd);
break;
}
return ret;
compat_uptr_t tnr_2500_config; /* Skylake: TNR config */
compat_uptr_t dpc_2500_config; /* Skylake: DPC config */
compat_uptr_t awb_2500_config; /* Skylake: auto white balance config */
- compat_uptr_t awb_fr_2500_config; /* Skylake: auto white balance filter response config */
+ compat_uptr_t
+ awb_fr_2500_config; /* Skylake: auto white balance filter response config */
compat_uptr_t anr_2500_config; /* Skylake: ANR config */
compat_uptr_t af_2500_config; /* Skylake: auto focus config */
compat_uptr_t ae_2500_config; /* Skylake: auto exposure config */
compat_uptr_t bds_2500_config; /* Skylake: bayer downscaler config */
- compat_uptr_t dvs_2500_config; /* Skylake: digital video stabilization config */
+ compat_uptr_t
+ dvs_2500_config; /* Skylake: digital video stabilization config */
compat_uptr_t res_mgr_2500_config;
/*
#include "atomisp-regs.h"
static struct v4l2_mbus_framefmt *__csi2_get_format(struct
- atomisp_mipi_csi2_device
- * csi2,
- struct
- v4l2_subdev_pad_config * cfg,
- enum
- v4l2_subdev_format_whence
- which, unsigned int pad)
-{
+ atomisp_mipi_csi2_device
+ * csi2,
+ struct
+ v4l2_subdev_pad_config *cfg,
+ enum
+ v4l2_subdev_format_whence
+ which, unsigned int pad) {
if (which == V4L2_SUBDEV_FORMAT_TRY)
return v4l2_subdev_get_try_format(&csi2->subdev, cfg, pad);
else
struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
struct v4l2_mbus_framefmt *actual_ffmt =
#ifndef ISP2401
- __csi2_get_format(csi2, cfg, which, pad);
+ __csi2_get_format(csi2, cfg, which, pad);
#else
__csi2_get_format(csi2, cfg, which, pad);
#endif
actual_ffmt->code = atomisp_in_fmt_conv[0].code;
actual_ffmt->width = clamp_t(
- u32, ffmt->width, ATOM_ISP_MIN_WIDTH,
- ATOM_ISP_MAX_WIDTH);
+ u32, ffmt->width, ATOM_ISP_MIN_WIDTH,
+ ATOM_ISP_MAX_WIDTH);
actual_ffmt->height = clamp_t(
- u32, ffmt->height, ATOM_ISP_MIN_HEIGHT,
- ATOM_ISP_MAX_HEIGHT);
+ u32, ffmt->height, ATOM_ISP_MIN_HEIGHT,
+ ATOM_ISP_MAX_HEIGHT);
tmp_ffmt = *ffmt = *actual_ffmt;
/* FIXME: DPCM decompression */
*actual_ffmt = *ffmt =
#ifndef ISP2401
- *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
+ *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
#else
- *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
+ *__csi2_get_format(csi2, cfg, which, CSI2_PAD_SINK);
#endif
return 0;
* return -EINVAL or zero on success
*/
static int csi2_link_setup(struct media_entity *entity,
- const struct media_pad *local,
- const struct media_pad *remote, u32 flags)
+ const struct media_pad *local,
+ const struct media_pad *remote, u32 flags)
{
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
struct atomisp_mipi_csi2_device *csi2 = v4l2_get_subdevdata(sd);
* return -ENOMEM or zero on success
*/
static int mipi_csi2_init_entities(struct atomisp_mipi_csi2_device *csi2,
- int port)
+ int port)
{
struct v4l2_subdev *sd = &csi2->subdev;
struct media_pad *pads = csi2->pads;
return ret;
csi2->formats[CSI2_PAD_SINK].code =
- csi2->formats[CSI2_PAD_SOURCE].code =
+ csi2->formats[CSI2_PAD_SOURCE].code =
atomisp_in_fmt_conv[0].code;
return 0;
}
int atomisp_mipi_csi2_register_entities(struct atomisp_mipi_csi2_device *csi2,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
int ret;
int n;
mipi_info = atomisp_to_sensor_mipi_info(
- isp->inputs[asd->input_curr].camera);
+ isp->inputs[asd->input_curr].camera);
port = mipi_info->port;
ctrl.id = V4L2_CID_LINK_FREQ;
mipi_freq = ctrl.value;
clk_termen = atomisp_csi2_configure_calc(coeff_clk_termen,
- mipi_freq, TERMEN_DEFAULT);
+ mipi_freq, TERMEN_DEFAULT);
clk_settle = atomisp_csi2_configure_calc(coeff_clk_settle,
- mipi_freq, SETTLE_DEFAULT);
+ mipi_freq, SETTLE_DEFAULT);
dat_termen = atomisp_csi2_configure_calc(coeff_dat_termen,
- mipi_freq, TERMEN_DEFAULT);
+ mipi_freq, TERMEN_DEFAULT);
dat_settle = atomisp_csi2_configure_calc(coeff_dat_settle,
- mipi_freq, SETTLE_DEFAULT);
+ mipi_freq, SETTLE_DEFAULT);
for (n = 0; n < csi2_port_lanes[port] + 1; n++) {
hrt_address base = csi2_port_base[port] + csi2_lane_base[n];
u32 output; /* output direction */
};
-int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
+int atomisp_csi2_set_ffmt(struct v4l2_subdev *sd,
+ struct v4l2_subdev_pad_config *cfg,
unsigned int which, uint16_t pad,
struct v4l2_mbus_framefmt *ffmt);
int atomisp_mipi_csi2_init(struct atomisp_device *isp);
void atomisp_mipi_csi2_cleanup(struct atomisp_device *isp);
void atomisp_mipi_csi2_unregister_entities(
- struct atomisp_mipi_csi2_device *csi2);
+ struct atomisp_mipi_csi2_device *csi2);
int atomisp_mipi_csi2_register_entities(struct atomisp_mipi_csi2_device *csi2,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
void atomisp_csi2_configure(struct atomisp_sub_device *asd);
};
static inline int iunit_dump_dbgopt(struct atomisp_device *isp,
- unsigned int opt)
+ unsigned int opt)
{
int ret = 0;
}
static ssize_t iunit_dbglvl_store(struct device_driver *drv, const char *buf,
- size_t size)
+ size_t size)
{
if (kstrtouint(buf, 10, &iunit_debug.dbglvl)
- || iunit_debug.dbglvl < 1
- || iunit_debug.dbglvl > 9) {
+ || iunit_debug.dbglvl < 1
+ || iunit_debug.dbglvl > 9) {
return -ERANGE;
}
atomisp_css_debug_set_dtrace_level(iunit_debug.dbglvl);
}
static ssize_t iunit_dbgfun_store(struct device_driver *drv, const char *buf,
- size_t size)
+ size_t size)
{
unsigned int opt;
int ret;
}
static ssize_t iunit_dbgopt_store(struct device_driver *drv, const char *buf,
- size_t size)
+ size_t size)
{
unsigned int opt;
int ret;
static void file_work(struct work_struct *work)
{
struct atomisp_file_device *file_dev =
- container_of(work, struct atomisp_file_device, work);
+ container_of(work, struct atomisp_file_device, work);
struct atomisp_device *isp = file_dev->isp;
/* only support file injection on subdev0 */
struct atomisp_sub_device *asd = &isp->asd[0];
}
int atomisp_file_input_register_entities(struct atomisp_file_device *file_dev,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
/* Register the subdev and video nodes. */
return v4l2_device_register_subdev(vdev, &file_dev->sd);
void atomisp_file_input_cleanup(struct atomisp_device *isp);
int atomisp_file_input_init(struct atomisp_device *isp);
void atomisp_file_input_unregister_entities(
- struct atomisp_file_device *file_dev);
+ struct atomisp_file_device *file_dev);
int atomisp_file_input_register_entities(struct atomisp_file_device *file_dev,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
#endif /* __ATOMISP_FILE_H__ */
}
static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_pipe_id css_pipe_id)
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct atomisp_metadata_buf *metadata_buf;
enum atomisp_metadata_type md_type =
- atomisp_get_metadata_type(asd, css_pipe_id);
+ atomisp_get_metadata_type(asd, css_pipe_id);
struct list_head *metadata_list;
if (asd->metadata_bufs_in_css[stream_id][css_pipe_id] >=
- ATOMISP_CSS_Q_DEPTH)
+ ATOMISP_CSS_Q_DEPTH)
return 0; /* we have reached CSS queue depth */
if (!list_empty(&asd->metadata[md_type])) {
metadata_list = &asd->metadata_ready[md_type];
} else {
dev_warn(asd->isp->dev, "%s: No metadata buffers available for type %d!\n",
- __func__, md_type);
+ __func__, md_type);
return -EINVAL;
}
list_del_init(&metadata_buf->list);
if (atomisp_q_metadata_buffer_to_css(asd, metadata_buf,
- stream_id, css_pipe_id)) {
+ stream_id, css_pipe_id)) {
list_add(&metadata_buf->list, metadata_list);
return -EINVAL;
} else {
list_add_tail(&metadata_buf->list,
- &asd->metadata_in_css[md_type]);
+ &asd->metadata_in_css[md_type]);
}
asd->metadata_bufs_in_css[stream_id][css_pipe_id]++;
s3a_list = &asd->s3a_stats_ready;
} else {
dev_warn(asd->isp->dev, "%s: No s3a buffers available!\n",
- __func__);
+ __func__);
return -EINVAL;
}
list_add_tail(&s3a_buf->list, &asd->s3a_stats_in_css);
if (s3a_list == &asd->s3a_stats_ready)
dev_warn(asd->isp->dev, "%s: drop one s3a stat which has exp_id %d!\n",
- __func__, exp_id);
+ __func__, exp_id);
}
asd->s3a_bufs_in_css[css_pipe_id]++;
if (list_empty(&asd->dis_stats)) {
spin_unlock_irqrestore(&asd->dis_stats_lock, irqflags);
dev_warn(asd->isp->dev, "%s: No dis buffers available!\n",
- __func__);
+ __func__);
return -EINVAL;
}
dis_buf = list_entry(asd->dis_stats.prev,
- struct atomisp_dis_buf, list);
+ struct atomisp_dis_buf, list);
list_del_init(&dis_buf->list);
spin_unlock_irqrestore(&asd->dis_stats_lock, irqflags);
}
int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
- struct atomisp_video_pipe *pipe,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_buffer_type css_buf_type,
- enum atomisp_css_pipe_id css_pipe_id)
+ struct atomisp_video_pipe *pipe,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_buffer_type css_buf_type,
+ enum atomisp_css_pipe_id css_pipe_id)
{
struct videobuf_vmalloc_memory *vm_mem;
struct atomisp_css_params_with_list *param;
struct atomisp_css_dvs_grid_info *dvs_grid =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
unsigned long irqflags;
int err = 0;
param = pipe->frame_params[vb->i];
if (param) {
atomisp_makeup_css_parameters(asd,
- &asd->params.css_param.update_flag,
- ¶m->params);
+ &asd->params.css_param.update_flag,
+ ¶m->params);
atomisp_apply_css_parameters(asd, ¶m->params);
if (param->params.update_flag.dz_config &&
- asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
+ asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO) {
err = atomisp_calculate_real_zoom_region(asd,
¶m->params.dz_config, css_pipe_id);
if (!err)
atomisp_css_set_dz_config(asd,
- ¶m->params.dz_config);
+ ¶m->params.dz_config);
}
atomisp_css_set_isp_config_applied_frame(asd,
- vm_mem->vaddr);
+ vm_mem->vaddr);
atomisp_css_update_isp_params_on_pipe(asd,
- asd->stream_env[stream_id].pipes[css_pipe_id]);
+ asd->stream_env[stream_id].pipes[css_pipe_id]);
asd->params.dvs_6axis = (struct atomisp_css_dvs_6axis *)
- param->params.dvs_6axis;
+ param->params.dvs_6axis;
/*
* WORKAROUND:
* zoom region,I will set it to global setting.
*/
if (param->params.update_flag.dz_config &&
- asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO
- && !err) {
+ asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO
+ && !err) {
memcpy(&asd->params.css_param.dz_config,
- ¶m->params.dz_config,
- sizeof(struct ia_css_dz_config));
+ ¶m->params.dz_config,
+ sizeof(struct ia_css_dz_config));
asd->params.css_param.update_flag.dz_config =
- (struct atomisp_dz_config *)
- &asd->params.css_param.dz_config;
+ (struct atomisp_dz_config *)
+ &asd->params.css_param.dz_config;
asd->params.css_update_params_needed = true;
}
}
/* Enqueue buffer */
err = atomisp_q_video_buffer_to_css(asd, vm_mem, stream_id,
- css_buf_type, css_pipe_id);
+ css_buf_type, css_pipe_id);
if (err) {
spin_lock_irqsave(&pipe->irq_lock, irqflags);
list_add_tail(&vb->queue, &pipe->activeq);
vb->state = VIDEOBUF_QUEUED;
spin_unlock_irqrestore(&pipe->irq_lock, irqflags);
dev_err(asd->isp->dev, "%s, css q fails: %d\n",
- __func__, err);
+ __func__, err);
return -EINVAL;
}
pipe->buffers_in_css++;
/* enqueue 3A/DIS/metadata buffers */
if (asd->params.curr_grid_info.s3a_grid.enable &&
- css_pipe_id == asd->params.s3a_enabled_pipe &&
- css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+ css_pipe_id == asd->params.s3a_enabled_pipe &&
+ css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
atomisp_q_one_s3a_buffer(asd, stream_id,
- css_pipe_id);
+ css_pipe_id);
if (asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream_info.
- metadata_info.size &&
- css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+ metadata_info.size &&
+ css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
atomisp_q_one_metadata_buffer(asd, stream_id,
- css_pipe_id);
+ css_pipe_id);
if (dvs_grid && dvs_grid->enable &&
- css_pipe_id == CSS_PIPE_ID_VIDEO &&
- css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
+ css_pipe_id == CSS_PIPE_ID_VIDEO &&
+ css_buf_type == CSS_BUFFER_TYPE_OUTPUT_FRAME)
atomisp_q_one_dis_buffer(asd, stream_id,
- css_pipe_id);
+ css_pipe_id);
}
return 0;
if (ATOMISP_USE_YUVPP(asd)) {
/* when run ZSL case */
if (asd->continuous_mode->val &&
- asd->run_mode->val == ATOMISP_RUN_MODE_PREVIEW) {
+ asd->run_mode->val == ATOMISP_RUN_MODE_PREVIEW) {
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE)
return CSS_BUFFER_TYPE_OUTPUT_FRAME;
else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
/*when run SDV case*/
if (asd->continuous_mode->val &&
- asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
+ asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE)
return CSS_BUFFER_TYPE_OUTPUT_FRAME;
else if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW)
video_pipe = &asd->video_out_video_capture;
buf_type = atomisp_get_css_buf_type(
- asd, css_preview_pipe_id,
- atomisp_subdev_source_pad(&preview_pipe->vdev));
+ asd, css_preview_pipe_id,
+ atomisp_subdev_source_pad(&preview_pipe->vdev));
input_stream_id = ATOMISP_INPUT_STREAM_PREVIEW;
atomisp_q_video_buffers_to_css(asd, preview_pipe,
input_stream_id,
buf_type, css_preview_pipe_id);
buf_type = atomisp_get_css_buf_type(asd, css_capture_pipe_id,
- atomisp_subdev_source_pad(&capture_pipe->vdev));
+ atomisp_subdev_source_pad(&capture_pipe->vdev));
input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
atomisp_q_video_buffers_to_css(asd, capture_pipe,
- input_stream_id,
- buf_type, css_capture_pipe_id);
+ input_stream_id,
+ buf_type, css_capture_pipe_id);
buf_type = atomisp_get_css_buf_type(asd, css_video_pipe_id,
- atomisp_subdev_source_pad(&video_pipe->vdev));
+ atomisp_subdev_source_pad(&video_pipe->vdev));
input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
atomisp_q_video_buffers_to_css(asd, video_pipe,
- input_stream_id,
- buf_type, css_video_pipe_id);
+ input_stream_id,
+ buf_type, css_video_pipe_id);
return 0;
}
if (capture_pipe) {
buf_type = atomisp_get_css_buf_type(
- asd, css_capture_pipe_id,
- atomisp_subdev_source_pad(&capture_pipe->vdev));
+ asd, css_capture_pipe_id,
+ atomisp_subdev_source_pad(&capture_pipe->vdev));
input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
/*
if (vf_pipe) {
buf_type = atomisp_get_css_buf_type(
- asd, css_capture_pipe_id,
- atomisp_subdev_source_pad(&vf_pipe->vdev));
+ asd, css_capture_pipe_id,
+ atomisp_subdev_source_pad(&vf_pipe->vdev));
if (asd->stream_env[ATOMISP_INPUT_STREAM_POSTVIEW].stream)
input_stream_id = ATOMISP_INPUT_STREAM_POSTVIEW;
else
if (preview_pipe) {
buf_type = atomisp_get_css_buf_type(
- asd, css_preview_pipe_id,
- atomisp_subdev_source_pad(&preview_pipe->vdev));
+ asd, css_preview_pipe_id,
+ atomisp_subdev_source_pad(&preview_pipe->vdev));
if (ATOMISP_SOC_CAMERA(asd) && css_preview_pipe_id == CSS_PIPE_ID_YUVPP)
input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
- /* else for ext isp use case */
+ /* else for ext isp use case */
else if (css_preview_pipe_id == CSS_PIPE_ID_YUVPP)
input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
else if (asd->stream_env[ATOMISP_INPUT_STREAM_PREVIEW].stream)
if (video_pipe) {
buf_type = atomisp_get_css_buf_type(
- asd, css_video_pipe_id,
- atomisp_subdev_source_pad(&video_pipe->vdev));
+ asd, css_video_pipe_id,
+ atomisp_subdev_source_pad(&video_pipe->vdev));
if (asd->stream_env[ATOMISP_INPUT_STREAM_VIDEO].stream)
input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
else
INIT_LIST_HEAD(&pipe->buffers_waiting_for_param);
INIT_LIST_HEAD(&pipe->per_frame_params);
memset(pipe->frame_request_config_id, 0,
- VIDEO_MAX_FRAME * sizeof(unsigned int));
+ VIDEO_MAX_FRAME * sizeof(unsigned int));
memset(pipe->frame_params, 0,
- VIDEO_MAX_FRAME *
- sizeof(struct atomisp_css_params_with_list *));
+ VIDEO_MAX_FRAME *
+ sizeof(struct atomisp_css_params_with_list *));
return 0;
}
if (pipe->capq.streaming)
dev_warn(isp->dev,
- "%s: ISP still streaming while closing!",
- __func__);
+ "%s: ISP still streaming while closing!",
+ __func__);
if (pipe->capq.streaming &&
__atomisp_streamoff(file, NULL, V4L2_BUF_TYPE_VIDEO_CAPTURE)) {
atomisp_css_free_stat_buffers(asd);
atomisp_free_internal_buffers(asd);
ret = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- core, s_power, 0);
+ core, s_power, 0);
if (ret)
dev_warn(isp->dev, "Failed to power-off sensor\n");
done:
if (!acc_node) {
atomisp_subdev_set_selection(&asd->subdev, fh.pad,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- atomisp_subdev_source_pad(vdev),
- V4L2_SEL_TGT_COMPOSE, 0,
- &clear_compose);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ atomisp_subdev_source_pad(vdev),
+ V4L2_SEL_TGT_COMPOSE, 0,
+ &clear_compose);
}
rt_mutex_unlock(&isp->mutex);
mutex_unlock(&isp->streamoff_mutex);
}
static int frame_mmap(struct atomisp_device *isp,
- const struct atomisp_css_frame *frame, struct vm_area_struct *vma)
+ const struct atomisp_css_frame *frame, struct vm_area_struct *vma)
{
ia_css_ptr isp_virt;
u32 host_virt;
}
int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
- struct vm_area_struct *vma)
+ struct vm_area_struct *vma)
{
u32 offset = vma->vm_pgoff << PAGE_SHIFT;
int ret = -EINVAL, i;
struct atomisp_device *isp =
- ((struct atomisp_video_pipe *)(q->priv_data))->isp;
+ ((struct atomisp_video_pipe *)(q->priv_data))->isp;
struct videobuf_vmalloc_memory *vm_mem;
struct videobuf_mapping *map;
* There is also padding on the right (padded_width - width).
*/
static int remove_pad_from_frame(struct atomisp_device *isp,
- struct atomisp_css_frame *in_frame, __u32 width, __u32 height)
+ struct atomisp_css_frame *in_frame, __u32 width, __u32 height)
{
unsigned int i;
unsigned short *buffer;
}
ret = remove_pad_from_frame(isp, raw_virt_addr,
- pipe->pix.width, pipe->pix.height);
+ pipe->pix.width, pipe->pix.height);
if (ret < 0) {
dev_err(isp->dev, "remove pad failed.\n");
goto error;
}
static __poll_t atomisp_poll(struct file *file,
- struct poll_table_struct *pt)
+ struct poll_table_struct *pt)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
#include "atomisp_subdev.h"
int atomisp_q_video_buffers_to_css(struct atomisp_sub_device *asd,
- struct atomisp_video_pipe *pipe,
- enum atomisp_input_stream_id stream_id,
- enum atomisp_css_buffer_type css_buf_type,
- enum atomisp_css_pipe_id css_pipe_id);
+ struct atomisp_video_pipe *pipe,
+ enum atomisp_input_stream_id stream_id,
+ enum atomisp_css_buffer_type css_buf_type,
+ enum atomisp_css_pipe_id css_pipe_id);
unsigned int atomisp_dev_users(struct atomisp_device *isp);
unsigned int atomisp_sub_dev_users(struct atomisp_sub_device *asd);
*/
int atomisp_videobuf_mmap_mapper(struct videobuf_queue *q,
- struct vm_area_struct *vma);
+ struct vm_area_struct *vma);
int atomisp_qbuf_to_css(struct atomisp_device *isp,
struct atomisp_video_pipe *pipe,
#define atomisp_is_wdt_running(a) timer_pending(&(a)->wdt)
#ifdef ISP2401
void atomisp_wdt_refresh_pipe(struct atomisp_video_pipe *pipe,
- unsigned int delay);
+ unsigned int delay);
#endif
void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay);
#ifndef ISP2401
.name = "3a lock",
.minimum = 0,
.maximum = V4L2_LOCK_EXPOSURE | V4L2_LOCK_WHITE_BALANCE
- | V4L2_LOCK_FOCUS,
+ | V4L2_LOCK_FOCUS,
.step = 1,
.default_value = 0,
},
},
#if 0
{
- /* This is a custom format being used by M10MO to send the RAW data */
+ /* This is a custom format being used by M10MO to send the RAW data */
.pixelformat = V4L2_PIX_FMT_CUSTOM_M10MO_RAW,
.depth = 8,
.mbus_code = V4L2_MBUS_FMT_CUSTOM_M10MO_RAW,
};
const struct atomisp_format_bridge *atomisp_get_format_bridge(
- unsigned int pixelformat)
+ unsigned int pixelformat)
{
unsigned int i;
}
const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(
- u32 mbus_code)
+ u32 mbus_code)
{
unsigned int i;
strncpy(cap->bus_info, BUS_INFO, sizeof(cap->card) - 1);
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
- V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT;
+ V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT;
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}
* enum input are used to check primary/secondary camera
*/
static int atomisp_enum_input(struct file *file, void *fh,
- struct v4l2_input *input)
+ struct v4l2_input *input)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static unsigned int atomisp_subdev_streaming_count(
- struct atomisp_sub_device *asd)
+ struct atomisp_sub_device *asd)
{
return asd->video_out_preview.capq.streaming
- + asd->video_out_capture.capq.streaming
- + asd->video_out_video_capture.capq.streaming
- + asd->video_out_vf.capq.streaming
- + asd->video_in.capq.streaming;
+ + asd->video_out_capture.capq.streaming
+ + asd->video_out_video_capture.capq.streaming
+ + asd->video_out_vf.capq.streaming
+ + asd->video_in.capq.streaming;
}
unsigned int atomisp_streaming_count(struct atomisp_device *isp)
for (i = 0, sum = 0; i < isp->num_of_streams; i++)
sum += isp->asd[i].streaming ==
- ATOMISP_DEVICE_STREAMING_ENABLED;
+ ATOMISP_DEVICE_STREAMING_ENABLED;
return sum;
}
*/
if (isp->inputs[input].asd && isp->inputs[input].asd != asd) {
dev_err(isp->dev,
- "%s, camera is already used by stream: %d\n", __func__,
- isp->inputs[input].asd->index);
+ "%s, camera is already used by stream: %d\n", __func__,
+ isp->inputs[input].asd->index);
ret = -EBUSY;
goto error;
}
if (atomisp_subdev_streaming_count(asd)) {
dev_err(isp->dev,
- "ISP is still streaming, stop first\n");
+ "ISP is still streaming, stop first\n");
ret = -EINVAL;
goto error;
}
core, s_power, 0);
if (ret)
dev_warn(isp->dev,
- "Failed to power-off sensor\n");
+ "Failed to power-off sensor\n");
/* clear the asd field to show this camera is not used */
isp->inputs[asd->input_curr].asd = NULL;
}
/* select operating sensor */
ret = v4l2_subdev_call(isp->inputs[input].camera, video, s_routing,
- 0, isp->inputs[input].sensor_index, 0);
+ 0, isp->inputs[input].sensor_index, 0);
if (ret && (ret != -ENOIOCTLCMD)) {
dev_err(isp->dev, "Failed to select sensor\n");
goto error;
}
static int atomisp_enum_fmt_cap(struct file *file, void *fh,
- struct v4l2_fmtdesc *f)
+ struct v4l2_fmtdesc *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera, pad,
enum_mbus_code, NULL, &code);
if (rval == -ENOIOCTLCMD) {
- dev_warn(isp->dev, "enum_mbus_code pad op not supported. Please fix your sensor driver!\n");
- // rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- // video, enum_mbus_fmt, 0, &code.code);
+ dev_warn(isp->dev,
+ "enum_mbus_code pad op not supported. Please fix your sensor driver!\n");
+ // rval = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
+ // video, enum_mbus_fmt, 0, &code.code);
}
rt_mutex_unlock(&isp->mutex);
for (i = 0; i < ARRAY_SIZE(atomisp_output_fmts); i++) {
const struct atomisp_format_bridge *format =
- &atomisp_output_fmts[i];
+ &atomisp_output_fmts[i];
/*
* Is the atomisp-supported format is valid for the
}
static int atomisp_g_fmt_cap(struct file *file, void *fh,
- struct v4l2_format *f)
+ struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static int atomisp_g_fmt_file(struct file *file, void *fh,
- struct v4l2_format *f)
+ struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
/* This function looks up the closest available resolution. */
static int atomisp_try_fmt_cap(struct file *file, void *fh,
- struct v4l2_format *f)
+ struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static int atomisp_s_fmt_cap(struct file *file, void *fh,
- struct v4l2_format *f)
+ struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static int atomisp_s_fmt_file(struct file *file, void *fh,
- struct v4l2_format *f)
+ struct v4l2_format *f)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
- uint16_t stream_id)
+ uint16_t stream_id)
{
struct atomisp_device *isp = asd->isp;
struct atomisp_s3a_buf *s3a_buf = NULL, *_s3a_buf;
struct atomisp_metadata_buf *md_buf = NULL, *_md_buf;
int count;
struct atomisp_css_dvs_grid_info *dvs_grid_info =
- atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
+ atomisp_css_get_dvs_grid_info(&asd->params.curr_grid_info);
unsigned int i;
if (list_empty(&asd->s3a_stats) &&
- asd->params.curr_grid_info.s3a_grid.enable) {
+ asd->params.curr_grid_info.s3a_grid.enable) {
count = ATOMISP_CSS_Q_DEPTH +
ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL;
dev_dbg(isp->dev, "allocating %d 3a buffers\n", count);
goto error;
if (atomisp_css_allocate_stat_buffers(
- asd, stream_id, s3a_buf, NULL, NULL)) {
+ asd, stream_id, s3a_buf, NULL, NULL)) {
kfree(s3a_buf);
goto error;
}
}
if (list_empty(&asd->dis_stats) && dvs_grid_info &&
- dvs_grid_info->enable) {
+ dvs_grid_info->enable) {
count = ATOMISP_CSS_Q_DEPTH + 1;
dev_dbg(isp->dev, "allocating %d dis buffers\n", count);
while (count--) {
goto error;
}
if (atomisp_css_allocate_stat_buffers(
- asd, stream_id, NULL, dis_buf, NULL)) {
+ asd, stream_id, NULL, dis_buf, NULL)) {
kfree(dis_buf);
goto error;
}
goto error;
if (atomisp_css_allocate_stat_buffers(
- asd, stream_id, NULL, NULL, md_buf)) {
+ asd, stream_id, NULL, NULL, md_buf)) {
kfree(md_buf);
goto error;
}
for (i = 0; i < ATOMISP_METADATA_TYPE_NUM; i++) {
list_for_each_entry_safe(md_buf, _md_buf, &asd->metadata[i],
- list) {
+ list) {
atomisp_css_free_metadata_buffer(md_buf);
list_del(&md_buf->list);
kfree(md_buf);
* Initiate Memory Mapping or User Pointer I/O
*/
int __atomisp_reqbufs(struct file *file, void *fh,
- struct v4l2_requestbuffers *req)
+ struct v4l2_requestbuffers *req)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
mutex_unlock(&pipe->capq.vb_lock);
/* clear request config id */
memset(pipe->frame_request_config_id, 0,
- VIDEO_MAX_FRAME * sizeof(unsigned int));
+ VIDEO_MAX_FRAME * sizeof(unsigned int));
memset(pipe->frame_params, 0,
- VIDEO_MAX_FRAME *
- sizeof(struct atomisp_css_params_with_list *));
+ VIDEO_MAX_FRAME *
+ sizeof(struct atomisp_css_params_with_list *));
return 0;
}
}
int atomisp_reqbufs(struct file *file, void *fh,
- struct v4l2_requestbuffers *req)
+ struct v4l2_requestbuffers *req)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static int atomisp_reqbufs_file(struct file *file, void *fh,
- struct v4l2_requestbuffers *req)
+ struct v4l2_requestbuffers *req)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
/* application query the status of a buffer */
static int atomisp_querybuf(struct file *file, void *fh,
- struct v4l2_buffer *buf)
+ struct v4l2_buffer *buf)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
}
static int atomisp_querybuf_file(struct file *file, void *fh,
- struct v4l2_buffer *buf)
+ struct v4l2_buffer *buf)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
if (asd->streaming == ATOMISP_DEVICE_STREAMING_STOPPING) {
dev_err(isp->dev, "%s: reject, as ISP at stopping.\n",
- __func__);
+ __func__);
ret = -EIO;
goto error;
}
if (!buf || buf->index >= VIDEO_MAX_FRAME ||
- !pipe->capq.bufs[buf->index]) {
+ !pipe->capq.bufs[buf->index]) {
dev_err(isp->dev, "Invalid index for qbuf.\n");
ret = -EINVAL;
goto error;
goto done;
if (atomisp_get_css_frame_info(asd,
- atomisp_subdev_source_pad(vdev), &frame_info)) {
+ atomisp_subdev_source_pad(vdev), &frame_info)) {
ret = -EIO;
goto error;
}
#ifdef CONFIG_ION
#ifndef ISP2401
attributes.type = buf->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_ION
- ? HRT_USR_ION : HRT_USR_PTR;
+ ? HRT_USR_ION : HRT_USR_PTR;
#else
if (buf->reserved & ATOMISP_BUFFER_TYPE_IS_ION) {
attributes.type = HRT_USR_ION;
if (asd->ion_dev_fd->val != ION_FD_UNSET) {
dev_dbg(isp->dev, "ION buffer queued, share_fd=%lddev_fd=%d.\n",
- buf->m.userptr, asd->ion_dev_fd->val);
+ buf->m.userptr, asd->ion_dev_fd->val);
/*
* Make sure the shared fd we just got
* from user space isn't larger than
* the space we have for it.
*/
if ((buf->m.userptr &
- (ATOMISP_ION_DEVICE_FD_MASK)) != 0) {
+ (ATOMISP_ION_DEVICE_FD_MASK)) != 0) {
dev_err(isp->dev,
- "Error: v4l2 buffer fd:0X%0lX > 0XFFFF.\n",
- buf->m.userptr);
+ "Error: v4l2 buffer fd:0X%0lX > 0XFFFF.\n",
+ buf->m.userptr);
ret = -EINVAL;
goto error;
}
buf->m.userptr |= asd->ion_dev_fd->val <<
- ATOMISP_ION_DEVICE_FD_OFFSET;
+ ATOMISP_ION_DEVICE_FD_OFFSET;
} else {
dev_err(isp->dev, "v4l2 buffer type is ION, \
but no dev fd set from userspace.\n");
attributes.type = HRT_USR_PTR;
#endif
ret = atomisp_css_frame_map(&handle, &frame_info,
- (void __user *)buf->m.userptr,
- 0, &attributes);
+ (void __user *)buf->m.userptr,
+ 0, &attributes);
if (ret) {
dev_err(isp->dev, "Failed to map user buffer\n");
goto error;
(buf->reserved2 & ATOMISP_BUFFER_HAS_PER_FRAME_SETTING)) {
/* this buffer will have a per-frame parameter */
pipe->frame_request_config_id[buf->index] = buf->reserved2 &
- ~ATOMISP_BUFFER_HAS_PER_FRAME_SETTING;
- dev_dbg(isp->dev, "This buffer requires per_frame setting which has isp_config_id %d\n",
+ ~ATOMISP_BUFFER_HAS_PER_FRAME_SETTING;
+ dev_dbg(isp->dev,
+ "This buffer requires per_frame setting which has isp_config_id %d\n",
pipe->frame_request_config_id[buf->index]);
} else {
pipe->frame_request_config_id[buf->index] = 0;
atomisp_wdt_start(asd);
#else
if (!atomisp_is_wdt_running(pipe) &&
- atomisp_buffers_queued_pipe(pipe))
+ atomisp_buffers_queued_pipe(pipe))
atomisp_wdt_start(pipe);
#endif
}
asd->pending_capture_request++;
dev_dbg(isp->dev, "Add one pending capture request.\n");
#else
- if (asd->re_trigger_capture) {
+ if (asd->re_trigger_capture) {
ret = atomisp_css_offline_capture_configure(asd,
asd->params.offline_parm.num_captures,
asd->params.offline_parm.skip_frames,
dev_dbg(isp->dev, "%s Trigger capture again ret=%d\n",
__func__, ret);
- } else {
+ } else {
asd->pending_capture_request++;
asd->re_trigger_capture = false;
dev_dbg(isp->dev, "Add one pending capture request.\n");
- }
+ }
#endif
}
rt_mutex_unlock(&isp->mutex);
}
static int atomisp_qbuf_file(struct file *file, void *fh,
- struct v4l2_buffer *buf)
+ struct v4l2_buffer *buf)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
if (!buf || buf->index >= VIDEO_MAX_FRAME ||
- !pipe->outq.bufs[buf->index]) {
+ !pipe->outq.bufs[buf->index]) {
dev_err(isp->dev, "Invalid index for qbuf.\n");
ret = -EINVAL;
goto error;
}
static int __get_frame_exp_id(struct atomisp_video_pipe *pipe,
- struct v4l2_buffer *buf)
+ struct v4l2_buffer *buf)
{
struct videobuf_vmalloc_memory *vm_mem;
struct atomisp_css_frame *handle;
if (asd->streaming == ATOMISP_DEVICE_STREAMING_STOPPING) {
rt_mutex_unlock(&isp->mutex);
dev_err(isp->dev, "%s: reject, as ISP at stopping.\n",
- __func__);
+ __func__);
return -EIO;
}
buf->reserved2 = pipe->frame_config_id[buf->index];
rt_mutex_unlock(&isp->mutex);
- dev_dbg(isp->dev, "dqbuf buffer %d (%s) for asd%d with exp_id %d, isp_config_id %d\n",
+ dev_dbg(isp->dev,
+ "dqbuf buffer %d (%s) for asd%d with exp_id %d, isp_config_id %d\n",
buf->index, vdev->name, asd->index, buf->reserved >> 16,
buf->reserved2);
return 0;
case ATOMISP_RUN_MODE_VIDEO:
return CSS_PIPE_ID_VIDEO;
case ATOMISP_RUN_MODE_STILL_CAPTURE:
- /* fall through */
+ /* fall through */
default:
return CSS_PIPE_ID_CAPTURE;
}
if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO ||
(asd->run_mode->val == ATOMISP_RUN_MODE_STILL_CAPTURE &&
!atomisp_is_mbuscode_raw(
- asd->fmt[
- asd->capture_pad].fmt.code) &&
+ asd->fmt[
+ asd->capture_pad].fmt.code) &&
!asd->continuous_mode->val))
return 2;
else
int sensor_index = isp->asd[i].input_curr;
if (isp->inputs[sensor_index].camera_caps->
- sensor[isp->asd[i].sensor_curr].is_slave)
+ sensor[isp->asd[i].sensor_curr].is_slave)
slave = sensor_index;
else
master = sensor_index;
/* FIXME! */
#ifndef ISP2401
static void __wdt_on_master_slave_sensor(struct atomisp_device *isp,
- unsigned int wdt_duration)
+ unsigned int wdt_duration)
#else
static void __wdt_on_master_slave_sensor(struct atomisp_video_pipe *pipe,
- unsigned int wdt_duration,
- bool enable)
+ unsigned int wdt_duration,
+ bool enable)
#endif
{
#ifndef ISP2401
int sensor_index = isp->asd[i].input_curr;
if (isp->inputs[sensor_index].camera_caps->
- sensor[isp->asd[i].sensor_curr].is_slave) {
+ sensor[isp->asd[i].sensor_curr].is_slave) {
v4l2_event_queue(isp->asd[i].subdev.devnode, &event);
break;
}
* This ioctl start the capture during streaming I/O.
*/
static int atomisp_streamon(struct file *file, void *fh,
- enum v4l2_buf_type type)
+ enum v4l2_buf_type type)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
flush_work(&asd->delayed_init_work);
rt_mutex_unlock(&isp->mutex);
if (wait_for_completion_interruptible(
- &asd->init_done) != 0)
+ &asd->init_done) != 0)
return -ERESTARTSYS;
rt_mutex_lock(&isp->mutex);
}
atomisp_apply_css_parameters(asd, &asd->params.css_param);
if (asd->params.css_param.update_flag.dz_config)
atomisp_css_set_dz_config(asd,
- &asd->params.css_param.dz_config);
+ &asd->params.css_param.dz_config);
atomisp_css_update_isp_params(asd);
asd->params.css_update_params_needed = false;
memset(&asd->params.css_param.update_flag, 0,
if (!isp->sw_contex.file_input) {
atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
- atomisp_css_valid_sof(isp));
+ atomisp_css_valid_sof(isp));
atomisp_csi2_configure(asd);
/*
* set freq to max when streaming count > 1 which indicate
*/
if (atomisp_streaming_count(isp) > 1) {
if (atomisp_freq_scaling(isp,
- ATOMISP_DFS_MODE_MAX, false) < 0)
+ ATOMISP_DFS_MODE_MAX, false) < 0)
dev_dbg(isp->dev, "dfs failed!\n");
} else {
if (atomisp_freq_scaling(isp,
- ATOMISP_DFS_MODE_AUTO, false) < 0)
+ ATOMISP_DFS_MODE_AUTO, false) < 0)
dev_dbg(isp->dev, "dfs failed!\n");
}
} else {
}
if (asd->depth_mode->val && atomisp_streaming_count(isp) ==
- ATOMISP_DEPTH_SENSOR_STREAMON_COUNT) {
+ ATOMISP_DEPTH_SENSOR_STREAMON_COUNT) {
ret = atomisp_stream_on_master_slave_sensor(isp, false);
if (ret) {
dev_err(isp->dev, "master slave sensor stream on failed!\n");
#endif
goto start_delay_wq;
} else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
- ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
+ ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
#ifdef ISP2401
__wdt_on_master_slave_sensor(pipe, wdt_duration, false);
#endif
/* Enable the CSI interface on ANN B0/K0 */
if (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
- ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
+ ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
pci_write_config_word(isp->pdev, MRFLD_PCI_CSI_CONTROL,
isp->saved_regs.csi_control |
MRFLD_PCI_CSI_CONTROL_CSI_READY);
struct v4l2_mbus_framefmt *sink;
sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
- V4L2_SUBDEV_FORMAT_ACTIVE,
- ATOMISP_SUBDEV_PAD_SINK);
+ V4L2_SUBDEV_FORMAT_ACTIVE,
+ ATOMISP_SUBDEV_PAD_SINK);
reinit_completion(&asd->init_done);
asd->delayed_init = ATOMISP_DELAYED_INIT_QUEUED;
queue_work(asd->delayed_init_workq, &asd->delayed_init_work);
atomisp_css_set_cont_prev_start_time(isp,
- ATOMISP_CALC_CSS_PREV_OVERLAP(sink->height));
+ ATOMISP_CALC_CSS_PREV_OVERLAP(sink->height));
} else {
asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
}
* case of continuous capture
*/
if ((asd->continuous_mode->val ||
- isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) &&
+ isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) &&
atomisp_subdev_source_pad(vdev) !=
- ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
+ ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
atomisp_subdev_source_pad(vdev) !=
- ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
+ ATOMISP_SUBDEV_PAD_SOURCE_VIDEO) {
if (isp->inputs[asd->input_curr].camera_caps->multi_stream_ctrl) {
v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- video, s_stream, 0);
+ video, s_stream, 0);
} else if (atomisp_subdev_source_pad(vdev)
- == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE) {
+ == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE) {
/* stop continuous still capture if needed */
if (asd->params.offline_parm.num_captures == -1)
atomisp_css_offline_capture_configure(asd,
- 0, 0, 0);
+ 0, 0, 0);
atomisp_freq_scaling(isp, ATOMISP_DFS_MODE_AUTO, false);
}
/*
*/
if (isp->sw_contex.file_input)
v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- video, s_stream, 0);
+ video, s_stream, 0);
rt_mutex_lock(&isp->mutex);
atomisp_acc_unload_extensions(asd);
if (!isp->sw_contex.file_input)
atomisp_css_irq_enable(isp, CSS_IRQ_INFO_CSS_RECEIVER_SOF,
- false);
+ false);
if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED) {
cancel_work_sync(&asd->delayed_init_work);
/* Disable the CSI interface on ANN B0/K0 */
if (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
- ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
+ ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
pci_write_config_word(isp->pdev, MRFLD_PCI_CSI_CONTROL,
isp->saved_regs.csi_control &
~MRFLD_PCI_CSI_CONTROL_CSI_READY);
for (i = 0; i < isp->num_of_streams; i++) {
if (isp->asd[i].stream_prepared) {
atomisp_destroy_pipes_stream_force(&isp->
- asd[i]);
+ asd[i]);
recreate_streams[i] = true;
}
}
/* disable PUNIT/ISP acknowlede/handshake - SRSE=3 */
pci_write_config_dword(isp->pdev, PCI_I_CONTROL, isp->saved_regs.i_control |
- MRFLD_PCI_I_CONTROL_SRSE_RESET_MASK);
+ MRFLD_PCI_I_CONTROL_SRSE_RESET_MASK);
dev_err(isp->dev, "atomisp_reset");
atomisp_reset(isp);
for (i = 0; i < isp->num_of_streams; i++) {
* call this ioctl with a pointer to this structure
*/
static int atomisp_g_ctrl(struct file *file, void *fh,
- struct v4l2_control *control)
+ struct v4l2_control *control)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
}
static int atomisp_camera_g_ext_ctrls(struct file *file, void *fh,
- struct v4l2_ext_controls *c)
+ struct v4l2_ext_controls *c)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
break;
case V4L2_CID_G_SKIP_FRAMES:
ret = v4l2_subdev_call(
- isp->inputs[asd->input_curr].camera,
- sensor, g_skip_frames, (u32 *)&ctrl.value);
+ isp->inputs[asd->input_curr].camera,
+ sensor, g_skip_frames, (u32 *)&ctrl.value);
break;
default:
ret = -EINVAL;
/* This ioctl allows the application to get multiple controls by class */
static int atomisp_g_ext_ctrls(struct file *file, void *fh,
- struct v4l2_ext_controls *c)
+ struct v4l2_ext_controls *c)
{
struct v4l2_control ctrl;
int i, ret = 0;
}
static int atomisp_camera_s_ext_ctrls(struct file *file, void *fh,
- struct v4l2_ext_controls *c)
+ struct v4l2_ext_controls *c)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
* flash state */
if (ctrl.id == V4L2_CID_FLASH_MODE) {
asd->params.flash_state =
- ATOMISP_FLASH_IDLE;
+ ATOMISP_FLASH_IDLE;
asd->params.num_flash_frames = 0;
}
}
/* This ioctl allows the application to set multiple controls by class */
static int atomisp_s_ext_ctrls(struct file *file, void *fh,
- struct v4l2_ext_controls *c)
+ struct v4l2_ext_controls *c)
{
struct v4l2_control ctrl;
int i, ret = 0;
* vidioc_g/s_param are used to switch isp running mode
*/
static int atomisp_g_parm(struct file *file, void *fh,
- struct v4l2_streamparm *parm)
+ struct v4l2_streamparm *parm)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_sub_device *asd = atomisp_to_video_pipe(vdev)->asd;
}
static int atomisp_s_parm(struct file *file, void *fh,
- struct v4l2_streamparm *parm)
+ struct v4l2_streamparm *parm)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static int atomisp_s_parm_file(struct file *file, void *fh,
- struct v4l2_streamparm *parm)
+ struct v4l2_streamparm *parm)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
}
static long atomisp_vidioc_default(struct file *file, void *fh,
- bool valid_prio, unsigned int cmd, void *arg)
+ bool valid_prio, unsigned int cmd, void *arg)
{
struct video_device *vdev = video_devdata(file);
struct atomisp_device *isp = video_get_drvdata(vdev);
case ATOMISP_IOC_S_DIS_COEFS:
err = atomisp_css_cp_dvs2_coefs(asd, arg,
- &asd->params.css_param, true);
+ &asd->params.css_param, true);
if (!err && arg)
asd->params.css_update_params_needed = true;
break;
case ATOMISP_IOC_S_DIS_VECTOR:
err = atomisp_cp_dvs_6axis_config(asd, arg,
- &asd->params.css_param, true);
+ &asd->params.css_param, true);
if (!err && arg)
asd->params.css_update_params_needed = true;
break;
#endif
#ifndef ISP2401
err = v4l2_subdev_call(
- isp->inputs[asd->input_curr].motor,
- core, ioctl, cmd, arg);
+ isp->inputs[asd->input_curr].motor,
+ core, ioctl, cmd, arg);
#else
err = v4l2_subdev_call(
- isp->motor,
- core, ioctl, cmd, arg);
+ isp->motor,
+ core, ioctl, cmd, arg);
#endif
else
err = v4l2_subdev_call(
- isp->inputs[asd->input_curr].camera,
- core, ioctl, cmd, arg);
+ isp->inputs[asd->input_curr].camera,
+ core, ioctl, cmd, arg);
break;
case ATOMISP_IOC_S_EXPOSURE:
case ATOMISP_IOC_G_UPDATE_EXPOSURE:
#endif
err = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- core, ioctl, cmd, arg);
+ core, ioctl, cmd, arg);
break;
case ATOMISP_IOC_ACC_LOAD:
break;
case ATOMISP_IOC_EXT_ISP_CTRL:
err = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
- core, ioctl, cmd, arg);
+ core, ioctl, cmd, arg);
break;
case ATOMISP_IOC_EXP_ID_UNLOCK:
err = atomisp_exp_id_unlock(asd, arg);
extern const struct atomisp_format_bridge atomisp_output_fmts[];
const struct atomisp_format_bridge *atomisp_get_format_bridge(
- unsigned int pixelformat);
+ unsigned int pixelformat);
#ifndef ISP2401
const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(
- u32 mbus_code);
+ u32 mbus_code);
#else
const struct atomisp_format_bridge *atomisp_get_format_bridge_from_mbus(u32
- mbus_code);
+ mbus_code);
#endif
int atomisp_alloc_css_stat_bufs(struct atomisp_sub_device *asd,
- uint16_t stream_id);
+ uint16_t stream_id);
int __atomisp_streamoff(struct file *file, void *fh, enum v4l2_buf_type type);
int __atomisp_reqbufs(struct file *file, void *fh,
- struct v4l2_requestbuffers *req);
+ struct v4l2_requestbuffers *req);
int atomisp_reqbufs(struct file *file, void *fh,
- struct v4l2_requestbuffers *req);
+ struct v4l2_requestbuffers *req);
enum atomisp_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device
- *asd);
+ *asd);
void atomisp_videobuf_free_buf(struct videobuf_buffer *vb);
long atomisp_compat_ioctl32(struct file *file,
unsigned int cmd, unsigned long arg);
-int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp, bool isp_timeout);
+int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
+ bool isp_timeout);
#endif /* __ATOMISP_IOCTL_H__ */
}
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
- enum atomisp_input_format atomisp_in_fmt)
+ enum atomisp_input_format atomisp_in_fmt)
{
int i;
V4L2_SUBDEV_FORMAT_ACTIVE, source_pad);
return atomisp_is_mbuscode_raw(sink->code)
- && !atomisp_is_mbuscode_raw(src->code);
+ && !atomisp_is_mbuscode_raw(src->code);
}
uint16_t atomisp_subdev_source_pad(struct video_device *vdev)
* Return 0 on success or a negative error code otherwise.
*/
static long isp_subdev_ioctl(struct v4l2_subdev *sd,
- unsigned int cmd, void *arg)
+ unsigned int cmd, void *arg)
{
return 0;
}
return -EINVAL;
if (sub->type == V4L2_EVENT_FRAME_SYNC &&
- !atomisp_css_valid_sof(isp))
+ !atomisp_css_valid_sof(isp))
return -EINVAL;
return v4l2_event_subscribe(fh, sub, 16, NULL);
}
struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
- struct v4l2_subdev_pad_config *cfg,
- u32 which, uint32_t pad,
- uint32_t target)
+ struct v4l2_subdev_pad_config *cfg,
+ u32 which, uint32_t pad,
+ uint32_t target)
{
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
{
struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
- *comp[ATOMISP_SUBDEV_PADS_NUM];
+ *comp[ATOMISP_SUBDEV_PADS_NUM];
if (flags & V4L2_SEL_FLAG_KEEP_CONFIG)
return;
return rval;
rec = atomisp_subdev_get_rect(sd, cfg, sel->which, sel->pad,
- sel->target);
+ sel->target);
if (!rec)
return -EINVAL;
"ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE",
"ATOMISP_SUBDEV_PAD_SOURCE_VF",
"ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW",
- "ATOMISP_SUBDEV_PAD_SOURCE_VIDEO"};
+ "ATOMISP_SUBDEV_PAD_SOURCE_VIDEO"
+ };
int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
- *comp[ATOMISP_SUBDEV_PADS_NUM];
+ *comp[ATOMISP_SUBDEV_PADS_NUM];
enum atomisp_input_stream_id stream_id;
unsigned int i;
unsigned int padding_w = pad_w;
/* Workaround for BYT 1080p perfectshot since the maxinum resolution of
* front camera ov2722 is 1932x1092 and cannot use pad_w > 12*/
if (!strncmp(isp->inputs[isp_sd->input_curr].camera->name,
- "ov2722", 6) && crop[pad]->height == 1092) {
+ "ov2722", 6) && crop[pad]->height == 1092) {
padding_w = 12;
padding_h = 12;
}
struct v4l2_rect tmp = *crop[pad];
atomisp_subdev_set_selection(
- sd, cfg, which, i, V4L2_SEL_TGT_COMPOSE,
- flags, &tmp);
+ sd, cfg, which, i, V4L2_SEL_TGT_COMPOSE,
+ flags, &tmp);
}
}
atomisp_css_video_set_dis_envelope(isp_sd, dvs_w, dvs_h);
atomisp_css_input_set_effective_resolution(isp_sd, stream_id,
- crop[pad]->width, crop[pad]->height);
+ crop[pad]->width, crop[pad]->height);
break;
}
comp[pad]->height = r->height;
if (r->width == 0 || r->height == 0 ||
- crop[ATOMISP_SUBDEV_PAD_SINK]->width == 0 ||
- crop[ATOMISP_SUBDEV_PAD_SINK]->height == 0)
+ crop[ATOMISP_SUBDEV_PAD_SINK]->width == 0 ||
+ crop[ATOMISP_SUBDEV_PAD_SINK]->height == 0)
break;
/*
* do cropping on sensor input if ratio of required resolution
*
*/
if (r->width * crop[ATOMISP_SUBDEV_PAD_SINK]->height <
- crop[ATOMISP_SUBDEV_PAD_SINK]->width * r->height)
+ crop[ATOMISP_SUBDEV_PAD_SINK]->width * r->height)
atomisp_css_input_set_effective_resolution(isp_sd,
stream_id,
rounddown(crop[ATOMISP_SUBDEV_PAD_SINK]->
- height * r->width / r->height,
- ATOM_ISP_STEP_WIDTH),
+ height * r->width / r->height,
+ ATOM_ISP_STEP_WIDTH),
crop[ATOMISP_SUBDEV_PAD_SINK]->height);
else
atomisp_css_input_set_effective_resolution(isp_sd,
stream_id,
crop[ATOMISP_SUBDEV_PAD_SINK]->width,
rounddown(crop[ATOMISP_SUBDEV_PAD_SINK]->
- width * r->height / r->width,
- ATOM_ISP_STEP_WIDTH));
+ width * r->height / r->width,
+ ATOM_ISP_STEP_WIDTH));
break;
}
int ret;
if (isp->inputs[asd->input_curr].type == FILE_INPUT ||
- isp->inputs[asd->input_curr].type == TEST_PATTERN)
+ isp->inputs[asd->input_curr].type == TEST_PATTERN)
return 0;
ctrl.id = V4L2_CID_BIN_FACTOR_HORZ;
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
struct atomisp_device *isp = isp_sd->isp;
struct v4l2_mbus_framefmt *__ffmt =
- atomisp_subdev_get_ffmt(sd, cfg, which, pad);
+ atomisp_subdev_get_ffmt(sd, cfg, which, pad);
u16 vdev_pad = atomisp_subdev_source_pad(sd->devnode);
enum atomisp_input_stream_id stream_id;
switch (pad) {
case ATOMISP_SUBDEV_PAD_SINK: {
const struct atomisp_in_fmt_conv *fc =
- atomisp_find_in_fmt_conv(ffmt->code);
+ atomisp_find_in_fmt_conv(ffmt->code);
if (!fc) {
fc = atomisp_in_fmt_conv;
if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
atomisp_css_input_set_resolution(isp_sd,
- stream_id, ffmt);
+ stream_id, ffmt);
atomisp_css_input_set_binning_factor(isp_sd,
- stream_id,
- atomisp_get_sensor_bin_factor(isp_sd));
+ stream_id,
+ atomisp_get_sensor_bin_factor(isp_sd));
atomisp_css_input_set_bayer_order(isp_sd, stream_id,
fc->bayer_order);
atomisp_css_input_set_format(isp_sd, stream_id,
- fc->css_stream_fmt);
+ fc->css_stream_fmt);
atomisp_css_set_default_isys_config(isp_sd, stream_id,
ffmt);
}
/* V4L2 subdev core operations */
static const struct v4l2_subdev_core_ops isp_subdev_v4l2_core_ops = {
- .ioctl = isp_subdev_ioctl, .s_power = isp_subdev_set_power,
- .subscribe_event = isp_subdev_subscribe_event,
- .unsubscribe_event = isp_subdev_unsubscribe_event,
+ .ioctl = isp_subdev_ioctl, .s_power = isp_subdev_set_power,
+ .subscribe_event = isp_subdev_subscribe_event,
+ .unsubscribe_event = isp_subdev_unsubscribe_event,
};
/* V4L2 subdev pad operations */
* return -EINVAL or zero on success
*/
static int isp_subdev_link_setup(struct media_entity *entity,
- const struct media_pad *local,
- const struct media_pad *remote, u32 flags)
+ const struct media_pad *local,
+ const struct media_pad *remote, u32 flags)
{
struct v4l2_subdev *sd = media_entity_to_v4l2_subdev(entity);
struct atomisp_sub_device *isp_sd = v4l2_get_subdevdata(sd);
/* read from memory */
if (flags & MEDIA_LNK_FL_ENABLED) {
if (isp_sd->input >= ATOMISP_SUBDEV_INPUT_CSI2_PORT1 &&
- isp_sd->input < (ATOMISP_SUBDEV_INPUT_CSI2_PORT1
- + ATOMISP_CAMERA_NR_PORTS))
+ isp_sd->input < (ATOMISP_SUBDEV_INPUT_CSI2_PORT1
+ + ATOMISP_CAMERA_NR_PORTS))
return -EBUSY;
isp_sd->input = ATOMISP_SUBDEV_INPUT_MEMORY;
} else {
/* media operations */
static const struct media_entity_operations isp_subdev_media_ops = {
- .link_setup = isp_subdev_link_setup,
- .link_validate = v4l2_subdev_link_validate,
-/* .set_power = v4l2_subdev_set_power, */
+ .link_setup = isp_subdev_link_setup,
+ .link_validate = v4l2_subdev_link_validate,
+ /* .set_power = v4l2_subdev_set_power, */
};
static int __atomisp_update_run_mode(struct atomisp_sub_device *asd)
static int s_ctrl(struct v4l2_ctrl *ctrl)
{
struct atomisp_sub_device *asd = container_of(
- ctrl->handler, struct atomisp_sub_device, ctrl_handler);
+ ctrl->handler, struct atomisp_sub_device, ctrl_handler);
switch (ctrl->id) {
case V4L2_CID_RUN_MODE:
return __atomisp_update_run_mode(asd);
case V4L2_CID_DEPTH_MODE:
if (asd->streaming != ATOMISP_DEVICE_STREAMING_DISABLED) {
- dev_err(asd->isp->dev, "ISP is streaming, it is not supported to change the depth mode\n");
+ dev_err(asd->isp->dev,
+ "ISP is streaming, it is not supported to change the depth mode\n");
return -EINVAL;
}
break;
.def = 1,
};
-static const char * const ctrl_run_mode_menu[] = {
+static const char *const ctrl_run_mode_menu[] = {
NULL,
"Video",
"Still capture",
.qmenu = ctrl_run_mode_menu,
};
-static const char * const ctrl_vfpp_mode_menu[] = {
+static const char *const ctrl_vfpp_mode_menu[] = {
"Enable", /* vfpp always enabled */
"Disable to scaler mode", /* CSS into video mode and disable */
"Disable to low latency mode", /* CSS into still mode and disable */
* this fd will be used to map shared fd to buffer.
*/
static const struct v4l2_ctrl_config ctrl_ion_dev_fd = {
- .ops = &ctrl_ops,
- .id = V4L2_CID_ATOMISP_ION_DEVICE_FD,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Ion Device Fd",
- .min = -1,
- .max = 1024,
- .step = 1,
- .def = ION_FD_UNSET
+ .ops = &ctrl_ops,
+ .id = V4L2_CID_ATOMISP_ION_DEVICE_FD,
+ .type = V4L2_CTRL_TYPE_INTEGER,
+ .name = "Ion Device Fd",
+ .min = -1,
+ .max = 1024,
+ .step = 1,
+ .def = ION_FD_UNSET
};
#endif
#endif
static void atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
- struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
+ struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
{
pipe->type = buf_type;
pipe->asd = asd;
0, VIDEO_MAX_FRAME * sizeof(unsigned int));
memset(pipe->frame_params,
0, VIDEO_MAX_FRAME *
- sizeof(struct atomisp_css_params_with_list *));
+ sizeof(struct atomisp_css_params_with_list *));
}
static void atomisp_init_acc_pipe(struct atomisp_sub_device *asd,
- struct atomisp_acc_pipe *pipe)
+ struct atomisp_acc_pipe *pipe)
{
pipe->asd = asd;
pipe->isp = asd->isp;
pads[ATOMISP_SUBDEV_PAD_SOURCE_VIDEO].flags = MEDIA_PAD_FL_SOURCE;
asd->fmt[ATOMISP_SUBDEV_PAD_SINK].fmt.code =
- MEDIA_BUS_FMT_SBGGR10_1X10;
+ MEDIA_BUS_FMT_SBGGR10_1X10;
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW].fmt.code =
- MEDIA_BUS_FMT_SBGGR10_1X10;
+ MEDIA_BUS_FMT_SBGGR10_1X10;
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_VF].fmt.code =
- MEDIA_BUS_FMT_SBGGR10_1X10;
+ MEDIA_BUS_FMT_SBGGR10_1X10;
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE].fmt.code =
- MEDIA_BUS_FMT_SBGGR10_1X10;
+ MEDIA_BUS_FMT_SBGGR10_1X10;
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_VIDEO].fmt.code =
- MEDIA_BUS_FMT_SBGGR10_1X10;
+ MEDIA_BUS_FMT_SBGGR10_1X10;
me->ops = &isp_subdev_media_ops;
me->function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
return ret;
asd->fmt_auto = v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_fmt_auto, NULL);
+ &ctrl_fmt_auto, NULL);
asd->run_mode = v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_run_mode, NULL);
+ &ctrl_run_mode, NULL);
asd->vfpp = v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_vfpp, NULL);
+ &ctrl_vfpp, NULL);
asd->continuous_mode = v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_continuous_mode, NULL);
+ &ctrl_continuous_mode, NULL);
asd->continuous_viewfinder = v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_continuous_viewfinder,
- NULL);
+ &ctrl_continuous_viewfinder,
+ NULL);
asd->continuous_raw_buffer_size =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_continuous_raw_buffer_size,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_continuous_raw_buffer_size,
+ NULL);
asd->enable_raw_buffer_lock =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_enable_raw_buffer_lock,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_enable_raw_buffer_lock,
+ NULL);
asd->depth_mode =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_depth_mode,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_depth_mode,
+ NULL);
asd->disable_dz =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_disable_dz,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_disable_dz,
+ NULL);
#ifdef ISP2401
asd->select_isp_version =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_select_isp_version,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_select_isp_version,
+ NULL);
#ifdef CONFIG_ION
asd->ion_dev_fd =
- v4l2_ctrl_new_custom(&asd->ctrl_handler,
- &ctrl_ion_dev_fd,
- NULL);
+ v4l2_ctrl_new_custom(&asd->ctrl_handler,
+ &ctrl_ion_dev_fd,
+ NULL);
#endif
#endif
for (i = 0; i < isp->input_cnt - 2; i++) {
ret = media_create_pad_link(&isp->inputs[i].camera->entity, 0,
&isp->csi2_port[isp->inputs[i].
- port].subdev.entity,
+ port].subdev.entity,
CSI2_PAD_SINK,
MEDIA_LNK_FL_ENABLED |
MEDIA_LNK_FL_IMMUTABLE);
unsigned int i, pending_event;
list_for_each_entry_safe(fh, fh_tmp,
- &asd->subdev.devnode->fh_list, list) {
+ &asd->subdev.devnode->fh_list, list) {
pending_event = v4l2_event_pending(fh);
for (i = 0; i < pending_event; i++)
v4l2_event_dequeue(fh, &event, 1);
}
int atomisp_subdev_register_entities(struct atomisp_sub_device *asd,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
int ret;
*/
isp->num_of_streams = 2;
isp->asd = devm_kzalloc(isp->dev, sizeof(struct atomisp_sub_device) *
- isp->num_of_streams, GFP_KERNEL);
+ isp->num_of_streams, GFP_KERNEL);
if (!isp->asd)
return -ENOMEM;
for (i = 0; i < isp->num_of_streams; i++) {
unsigned int dis_bufs_in_css;
unsigned int metadata_bufs_in_css
- [ATOMISP_INPUT_STREAM_NUM][CSS_PIPE_ID_NUM];
+ [ATOMISP_INPUT_STREAM_NUM][CSS_PIPE_ID_NUM];
/* The list of free and available metadata buffers for CSS */
struct list_head metadata[ATOMISP_METADATA_TYPE_NUM];
/* The list of metadata buffers which have been en-queued to CSS */
bool copy_mode; /* CSI2+ use copy mode */
bool yuvpp_mode; /* CSI2+ yuvpp pipe */
- int raw_buffer_bitmap[ATOMISP_MAX_EXP_ID / 32 + 1]; /* Record each Raw Buffer lock status */
+ int raw_buffer_bitmap[ATOMISP_MAX_EXP_ID / 32 +
+ 1]; /* Record each Raw Buffer lock status */
int raw_buffer_locked_count;
spinlock_t raw_buffer_bitmap_lock;
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv(u32 code);
#ifndef ISP2401
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(
- enum atomisp_input_format atomisp_in_fmt);
+ enum atomisp_input_format atomisp_in_fmt);
#else
const struct atomisp_in_fmt_conv
- *atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
- atomisp_in_fmt);
+*atomisp_find_in_fmt_conv_by_atomisp_in_fmt(enum atomisp_input_format
+ atomisp_in_fmt);
#endif
const struct atomisp_in_fmt_conv *atomisp_find_in_fmt_conv_compressed(u32 code);
bool atomisp_subdev_format_conversion(struct atomisp_sub_device *asd,
struct v4l2_subdev_pad_config *cfg, uint32_t which,
uint32_t pad);
struct v4l2_rect *atomisp_subdev_get_rect(struct v4l2_subdev *sd,
- struct v4l2_subdev_pad_config *cfg,
- u32 which, uint32_t pad,
- uint32_t target);
+ struct v4l2_subdev_pad_config *cfg,
+ u32 which, uint32_t pad,
+ uint32_t target);
int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_pad_config *cfg,
u32 which, uint32_t pad, uint32_t target,
void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd);
int atomisp_subdev_register_entities(struct atomisp_sub_device *asd,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
int atomisp_subdev_init(struct atomisp_device *isp);
void atomisp_subdev_cleanup(struct atomisp_device *isp);
int atomisp_create_pads_links(struct atomisp_device *isp);
/*Skin whiten image effect table*/
static struct atomisp_css_macc_table skin_low_macc_table = {
.data = {
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 7168, 0, 2048, 8192,
- 5120, -1024, 2048, 8192,
- 8192, 2048, -1024, 5120,
- 8192, 2048, 0, 7168,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 7168, 0, 2048, 8192,
+ 5120, -1024, 2048, 8192,
+ 8192, 2048, -1024, 5120,
+ 8192, 2048, 0, 7168,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192
}
};
static struct atomisp_css_macc_table skin_medium_macc_table = {
.data = {
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 5120, 0, 6144, 8192,
- 3072, -1024, 2048, 6144,
- 6144, 2048, -1024, 3072,
- 8192, 6144, 0, 5120,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 5120, 0, 6144, 8192,
+ 3072, -1024, 2048, 6144,
+ 6144, 2048, -1024, 3072,
+ 8192, 6144, 0, 5120,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192
}
};
static struct atomisp_css_macc_table skin_high_macc_table = {
.data = {
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 4096, 0, 8192, 8192,
- 0, -2048, 4096, 6144,
- 6144, 4096, -2048, 0,
- 8192, 8192, 0, 4096,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 4096, 0, 8192, 8192,
+ 0, -2048, 4096, 6144,
+ 6144, 4096, -2048, 0,
+ 8192, 8192, 0, 4096,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192
}
};
/*Blue enhencement image effect table*/
static struct atomisp_css_macc_table blue_macc_table = {
.data = {
- 9728, -3072, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 9728, 0, -3072, 8192,
- 12800, 1536, -3072, 8192,
- 11264, 0, 0, 11264,
- 9728, -3072, 0, 11264
+ 9728, -3072, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 9728, 0, -3072, 8192,
+ 12800, 1536, -3072, 8192,
+ 11264, 0, 0, 11264,
+ 9728, -3072, 0, 11264
}
};
/*Green enhencement image effect table*/
static struct atomisp_css_macc_table green_macc_table = {
.data = {
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 10240, 4096, 0, 8192,
- 10240, 4096, 0, 12288,
- 12288, 0, 0, 12288,
- 14336, -2048, 4096, 8192,
- 10240, 0, 4096, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192,
- 8192, 0, 0, 8192
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 10240, 4096, 0, 8192,
+ 10240, 4096, 0, 12288,
+ 12288, 0, 0, 12288,
+ 14336, -2048, 4096, 8192,
+ 10240, 0, 4096, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192
}
};
static struct atomisp_css_ctc_table vivid_ctc_table = {
.data.vamem_2 = {
- 0, 384, 837, 957, 1011, 1062, 1083, 1080,
- 1078, 1077, 1053, 1039, 1012, 992, 969, 951,
- 929, 906, 886, 866, 845, 823, 809, 790,
- 772, 758, 741, 726, 711, 701, 688, 675,
- 666, 656, 648, 639, 633, 626, 618, 612,
- 603, 594, 582, 572, 557, 545, 529, 516,
- 504, 491, 480, 467, 459, 447, 438, 429,
- 419, 412, 404, 397, 389, 382, 376, 368,
- 363, 357, 351, 345, 340, 336, 330, 326,
- 321, 318, 312, 308, 304, 300, 297, 294,
- 291, 286, 284, 281, 278, 275, 271, 268,
- 261, 257, 251, 245, 240, 235, 232, 225,
- 223, 218, 213, 209, 206, 204, 199, 197,
- 193, 189, 186, 185, 183, 179, 177, 175,
- 172, 170, 169, 167, 164, 164, 162, 160,
- 158, 157, 156, 154, 154, 152, 151, 150,
- 149, 148, 146, 147, 146, 144, 143, 143,
- 142, 141, 140, 141, 139, 138, 138, 138,
- 137, 136, 136, 135, 134, 134, 134, 133,
- 132, 132, 131, 130, 131, 130, 129, 128,
- 129, 127, 127, 127, 127, 125, 125, 125,
- 123, 123, 122, 120, 118, 115, 114, 111,
- 110, 108, 106, 105, 103, 102, 100, 99,
- 97, 97, 96, 95, 94, 93, 93, 91,
- 91, 91, 90, 90, 89, 89, 88, 88,
- 89, 88, 88, 87, 87, 87, 87, 86,
- 87, 87, 86, 87, 86, 86, 84, 84,
- 82, 80, 78, 76, 74, 72, 70, 68,
- 67, 65, 62, 60, 58, 56, 55, 54,
- 53, 51, 49, 49, 47, 45, 45, 45,
- 41, 40, 39, 39, 34, 33, 34, 32,
- 25, 23, 24, 20, 13, 9, 12, 0,
- 0
+ 0, 384, 837, 957, 1011, 1062, 1083, 1080,
+ 1078, 1077, 1053, 1039, 1012, 992, 969, 951,
+ 929, 906, 886, 866, 845, 823, 809, 790,
+ 772, 758, 741, 726, 711, 701, 688, 675,
+ 666, 656, 648, 639, 633, 626, 618, 612,
+ 603, 594, 582, 572, 557, 545, 529, 516,
+ 504, 491, 480, 467, 459, 447, 438, 429,
+ 419, 412, 404, 397, 389, 382, 376, 368,
+ 363, 357, 351, 345, 340, 336, 330, 326,
+ 321, 318, 312, 308, 304, 300, 297, 294,
+ 291, 286, 284, 281, 278, 275, 271, 268,
+ 261, 257, 251, 245, 240, 235, 232, 225,
+ 223, 218, 213, 209, 206, 204, 199, 197,
+ 193, 189, 186, 185, 183, 179, 177, 175,
+ 172, 170, 169, 167, 164, 164, 162, 160,
+ 158, 157, 156, 154, 154, 152, 151, 150,
+ 149, 148, 146, 147, 146, 144, 143, 143,
+ 142, 141, 140, 141, 139, 138, 138, 138,
+ 137, 136, 136, 135, 134, 134, 134, 133,
+ 132, 132, 131, 130, 131, 130, 129, 128,
+ 129, 127, 127, 127, 127, 125, 125, 125,
+ 123, 123, 122, 120, 118, 115, 114, 111,
+ 110, 108, 106, 105, 103, 102, 100, 99,
+ 97, 97, 96, 95, 94, 93, 93, 91,
+ 91, 91, 90, 90, 89, 89, 88, 88,
+ 89, 88, 88, 87, 87, 87, 87, 86,
+ 87, 87, 86, 87, 86, 86, 84, 84,
+ 82, 80, 78, 76, 74, 72, 70, 68,
+ 67, 65, 62, 60, 58, 56, 55, 54,
+ 53, 51, 49, 49, 47, 45, 45, 45,
+ 41, 40, 39, 39, 34, 33, 34, 32,
+ 25, 23, 24, 20, 13, 9, 12, 0,
+ 0
}
};
#endif
}
int atomisp_tpg_register_entities(struct atomisp_tpg_device *tpg,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
int ret;
/* Register the subdev and video nodes. */
int atomisp_tpg_init(struct atomisp_device *isp);
void atomisp_tpg_unregister_entities(struct atomisp_tpg_device *tpg);
int atomisp_tpg_register_entities(struct atomisp_tpg_device *tpg,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
#endif /* __ATOMISP_TPG_H__ */
#include <linux/string.h>
TRACE_EVENT(camera_meminfo,
- TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
- int sys_res_size, int cam_sys_use, int cam_dyc_use,
- int cam_res_use),
+ TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
+ int sys_res_size, int cam_sys_use, int cam_dyc_use,
+ int cam_res_use),
- TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
- cam_dyc_use, cam_res_use),
+ TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
+ cam_dyc_use, cam_res_use),
- TP_STRUCT__entry(
+ TP_STRUCT__entry(
__array(char, name, 24)
__field(int, uptr_size)
__field(int, counter)
__field(int, cam_res_use)
__field(int, cam_dyc_use)
__field(int, cam_sys_use)
- ),
+ ),
- TP_fast_assign(
+ TP_fast_assign(
strlcpy(__entry->name, name, 24);
__entry->uptr_size = uptr_size;
__entry->counter = counter;
__entry->cam_res_use = cam_res_use;
__entry->cam_dyc_use = cam_dyc_use;
__entry->cam_sys_use = cam_sys_use;
- ),
+ ),
- TP_printk(
+ TP_printk(
"<%s> User ptr memory:%d pages,\tISP private memory used:%d pages:\tsysFP system size:%d,\treserved size:%d\tcamFP sysUse:%d,\tdycUse:%d,\tresUse:%d.\n",
__entry->name, __entry->uptr_size, __entry->counter,
__entry->sys_size, __entry->sys_res_size, __entry->cam_sys_use,
__entry->cam_dyc_use, __entry->cam_res_use)
-);
+ );
TRACE_EVENT(camera_debug,
- TP_PROTO(const char *name, char *info, const int line),
+ TP_PROTO(const char *name, char *info, const int line),
- TP_ARGS(name, info, line),
+ TP_ARGS(name, info, line),
- TP_STRUCT__entry(
+ TP_STRUCT__entry(
__array(char, name, 24)
__array(char, info, 24)
__field(int, line)
- ),
+ ),
- TP_fast_assign(
+ TP_fast_assign(
strlcpy(__entry->name, name, 24);
strlcpy(__entry->info, info, 24);
__entry->line = line;
- ),
+ ),
- TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
- __entry->info)
-);
+ TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
+ __entry->info)
+ );
TRACE_EVENT(ipu_cstate,
- TP_PROTO(int cstate),
+ TP_PROTO(int cstate),
- TP_ARGS(cstate),
+ TP_ARGS(cstate),
- TP_STRUCT__entry(
- __field(int, cstate)
- ),
+ TP_STRUCT__entry(
+ __field(int, cstate)
+ ),
- TP_fast_assign(
- __entry->cstate = cstate;
- ),
+ TP_fast_assign(
+ __entry->cstate = cstate;
+ ),
- TP_printk("cstate=%d", __entry->cstate)
-);
+ TP_printk("cstate=%d", __entry->cstate)
+ );
TRACE_EVENT(ipu_pstate,
- TP_PROTO(int freq, int util),
+ TP_PROTO(int freq, int util),
- TP_ARGS(freq, util),
+ TP_ARGS(freq, util),
- TP_STRUCT__entry(
- __field(int, freq)
- __field(int, util)
- ),
+ TP_STRUCT__entry(
+ __field(int, freq)
+ __field(int, util)
+ ),
- TP_fast_assign(
- __entry->freq = freq;
- __entry->util = util;
- ),
+ TP_fast_assign(
+ __entry->freq = freq;
+ __entry->util = util;
+ ),
- TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
-);
+ TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
+ );
#endif
#undef TRACE_INCLUDE_PATH
static unsigned int repool_pgnr;
module_param(repool_pgnr, uint, 0644);
MODULE_PARM_DESC(repool_pgnr,
- "Set the reserved memory pool size in page (default:0)");
+ "Set the reserved memory pool size in page (default:0)");
/* set dynamic memory pool size in page */
unsigned int dypool_pgnr = UINT_MAX;
module_param(dypool_pgnr, uint, 0644);
MODULE_PARM_DESC(dypool_pgnr,
- "Set the dynamic memory pool size in page (default:0)");
+ "Set the dynamic memory pool size in page (default:0)");
bool dypool_enable;
module_param(dypool_enable, bool, 0644);
MODULE_PARM_DESC(dypool_enable,
- "dynamic memory pool enable/disable (default:disable)");
+ "dynamic memory pool enable/disable (default:disable)");
/* memory optimization: deferred firmware loading */
bool defer_fw_load;
module_param(defer_fw_load, bool, 0644);
MODULE_PARM_DESC(defer_fw_load,
- "Defer FW loading until device is opened (default:disable)");
+ "Defer FW loading until device is opened (default:disable)");
/* cross componnet debug message flag */
int dbg_level;
int dbg_func = 2;
module_param(dbg_func, int, 0644);
MODULE_PARM_DESC(dbg_func,
- "log function switch non/trace_printk/printk (default:printk)");
+ "log function switch non/trace_printk/printk (default:printk)");
int mipicsi_flag;
module_param(mipicsi_flag, int, 0644);
}
int atomisp_video_register(struct atomisp_video_pipe *video,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
int ret;
}
int atomisp_acc_register(struct atomisp_acc_pipe *video,
- struct v4l2_device *vdev)
+ struct v4l2_device *vdev)
{
int ret;
&isp->saved_regs.pmcs);
/* Ensure read/write combining is enabled. */
pci_read_config_dword(dev, PCI_I_CONTROL,
- &isp->saved_regs.i_control);
+ &isp->saved_regs.i_control);
isp->saved_regs.i_control |=
- MRFLD_PCI_I_CONTROL_ENABLE_READ_COMBINING |
- MRFLD_PCI_I_CONTROL_ENABLE_WRITE_COMBINING;
+ MRFLD_PCI_I_CONTROL_ENABLE_READ_COMBINING |
+ MRFLD_PCI_I_CONTROL_ENABLE_WRITE_COMBINING;
pci_read_config_dword(dev, MRFLD_PCI_CSI_ACCESS_CTRL_VIOL,
&isp->saved_regs.csi_access_viol);
pci_read_config_dword(dev, MRFLD_PCI_CSI_RCOMP_CONTROL,
* For both issues, setting this bit is a workaround.
*/
isp->saved_regs.csi_rcomp_config |=
- MRFLD_PCI_CSI_HS_OVR_CLK_GATE_ON_UPDATE;
+ MRFLD_PCI_CSI_HS_OVR_CLK_GATE_ON_UPDATE;
pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
&isp->saved_regs.csi_afe_dly);
pci_read_config_dword(dev, MRFLD_PCI_CSI_CONTROL,
if (isp->media_dev.hw_revision >=
(ATOMISP_HW_REVISION_ISP2401 << ATOMISP_HW_REVISION_SHIFT))
isp->saved_regs.csi_control |=
- MRFLD_PCI_CSI_CONTROL_PARPATHEN;
+ MRFLD_PCI_CSI_CONTROL_PARPATHEN;
/*
* On CHT CSI_READY bit should be enabled before stream on
*/
if (IS_CHT && (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
- ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)))
+ ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)))
isp->saved_regs.csi_control |=
- MRFLD_PCI_CSI_CONTROL_CSI_READY;
+ MRFLD_PCI_CSI_CONTROL_CSI_READY;
pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_RCOMP_CONTROL,
&isp->saved_regs.csi_afe_rcomp_config);
pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_HS_CONTROL,
pci_write_config_dword(dev, PCI_INTERRUPT_CTRL,
isp->saved_regs.interrupt_control);
pci_write_config_dword(dev, PCI_I_CONTROL,
- isp->saved_regs.i_control);
+ isp->saved_regs.i_control);
pci_write_config_dword(dev, MRFLD_PCI_PMCS,
- isp->saved_regs.pmcs);
+ isp->saved_regs.pmcs);
pci_write_config_dword(dev, MRFLD_PCI_CSI_ACCESS_CTRL_VIOL,
- isp->saved_regs.csi_access_viol);
+ isp->saved_regs.csi_access_viol);
pci_write_config_dword(dev, MRFLD_PCI_CSI_RCOMP_CONTROL,
- isp->saved_regs.csi_rcomp_config);
+ isp->saved_regs.csi_rcomp_config);
pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
- isp->saved_regs.csi_afe_dly);
+ isp->saved_regs.csi_afe_dly);
pci_write_config_dword(dev, MRFLD_PCI_CSI_CONTROL,
- isp->saved_regs.csi_control);
+ isp->saved_regs.csi_control);
pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_RCOMP_CONTROL,
- isp->saved_regs.csi_afe_rcomp_config);
+ isp->saved_regs.csi_afe_rcomp_config);
pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_HS_CONTROL,
- isp->saved_regs.csi_afe_hs_control);
+ isp->saved_regs.csi_afe_hs_control);
pci_write_config_dword(dev, MRFLD_PCI_CSI_DEADLINE_CONTROL,
- isp->saved_regs.csi_deadline_control);
+ isp->saved_regs.csi_deadline_control);
/*
* for MRFLD, Software/firmware needs to write a 1 to bit0
atomisp_load_uint32(MRFLD_INTR_STATUS_REG, &irq);
if (irq != 0) {
dev_err(isp->dev,
- "%s: fail to clear isp interrupt status reg=0x%x\n",
- __func__, irq);
+ "%s: fail to clear isp interrupt status reg=0x%x\n",
+ __func__, irq);
spin_unlock_irqrestore(&isp->lock, flags);
return -EAGAIN;
} else {
goto done;
}
dev_err(isp->dev,
- "%s: error in iunit interrupt. status reg=0x%x\n",
- __func__, irq);
+ "%s: error in iunit interrupt. status reg=0x%x\n",
+ __func__, irq);
spin_unlock_irqrestore(&isp->lock, flags);
return -EAGAIN;
}
return 0;
}
- /*
- * WA for DDR DVFS enable/disable
- * By default, ISP will force DDR DVFS 1600MHz before disable DVFS
- */
+/*
+* WA for DDR DVFS enable/disable
+* By default, ISP will force DDR DVFS 1600MHz before disable DVFS
+*/
static void punit_ddr_dvfs_enable(bool enable)
{
int door_bell = 1 << 8;
while (1) {
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSPM0, ®_value);
dev_dbg(isp->dev, "power-off in progress, ISPSSPM0: 0x%x\n",
- reg_value);
+ reg_value);
/* wait until ISPSSPM0 bit[25:24] shows 0x3 */
if ((reg_value >> MRFLD_ISPSSPM0_ISPSSS_OFFSET) ==
- MRFLD_ISPSSPM0_IUNIT_POWER_OFF) {
+ MRFLD_ISPSSPM0_IUNIT_POWER_OFF) {
trace_ipu_cstate(0);
return 0;
}
while (1) {
iosf_mbi_read(BT_MBI_UNIT_PMC, MBI_REG_READ, MRFLD_ISPSSPM0, ®_value);
dev_dbg(isp->dev, "power-on in progress, ISPSSPM0: 0x%x\n",
- reg_value);
+ reg_value);
/* wait until ISPSSPM0 bit[25:24] shows 0x0 */
if ((reg_value >> MRFLD_ISPSSPM0_ISPSSS_OFFSET) ==
- MRFLD_ISPSSPM0_IUNIT_POWER_ON) {
+ MRFLD_ISPSSPM0_IUNIT_POWER_ON) {
trace_ipu_cstate(1);
return 0;
}
int atomisp_runtime_suspend(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
- dev_get_drvdata(dev);
+ dev_get_drvdata(dev);
int ret;
ret = atomisp_mrfld_pre_power_down(isp);
int atomisp_runtime_resume(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
- dev_get_drvdata(dev);
+ dev_get_drvdata(dev);
int ret;
ret = atomisp_mrfld_power_up(isp);
if (ret)
- return ret;
+ return ret;
cpu_latency_qos_update_request(&isp->pm_qos, isp->max_isr_latency);
if (isp->sw_contex.power_state == ATOM_ISP_POWER_DOWN) {
static int __maybe_unused atomisp_suspend(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
- dev_get_drvdata(dev);
+ dev_get_drvdata(dev);
/* FIXME: only has one isp_subdev at present */
struct atomisp_sub_device *asd = &isp->asd[0];
unsigned long flags;
static int __maybe_unused atomisp_resume(struct device *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
- dev_get_drvdata(dev);
+ dev_get_drvdata(dev);
int ret;
ret = atomisp_mrfld_power_up(isp);
int port3_lanes_shift;
if (isp->media_dev.hw_revision <
- ATOMISP_HW_REVISION_ISP2401_LEGACY <<
- ATOMISP_HW_REVISION_SHIFT) {
+ ATOMISP_HW_REVISION_ISP2401_LEGACY <<
+ ATOMISP_HW_REVISION_SHIFT) {
/* Merrifield */
port_config_mask = MRFLD_PORT_CONFIG_MASK;
port3_lanes_shift = MRFLD_PORT3_LANES_SHIFT;
}
if (isp->media_dev.hw_revision <
- ATOMISP_HW_REVISION_ISP2401 <<
- ATOMISP_HW_REVISION_SHIFT) {
+ ATOMISP_HW_REVISION_ISP2401 <<
+ ATOMISP_HW_REVISION_SHIFT) {
/* Merrifield / Moorefield legacy input system */
nportconfigs = MRFLD_PORT_CONFIG_NUM;
} else {
pci_read_config_dword(isp->pdev, MRFLD_PCI_CSI_CONTROL, &csi_control);
csi_control &= ~port_config_mask;
csi_control |= (portconfigs[i].code << MRFLD_PORT_CONFIGCODE_SHIFT)
- | (portconfigs[i].lanes[0] ? 0 : (1 << MRFLD_PORT1_ENABLE_SHIFT))
- | (portconfigs[i].lanes[1] ? 0 : (1 << MRFLD_PORT2_ENABLE_SHIFT))
- | (portconfigs[i].lanes[2] ? 0 : (1 << MRFLD_PORT3_ENABLE_SHIFT))
- | (((1 << portconfigs[i].lanes[0]) - 1) << MRFLD_PORT1_LANES_SHIFT)
- | (((1 << portconfigs[i].lanes[1]) - 1) << MRFLD_PORT2_LANES_SHIFT)
- | (((1 << portconfigs[i].lanes[2]) - 1) << port3_lanes_shift);
+ | (portconfigs[i].lanes[0] ? 0 : (1 << MRFLD_PORT1_ENABLE_SHIFT))
+ | (portconfigs[i].lanes[1] ? 0 : (1 << MRFLD_PORT2_ENABLE_SHIFT))
+ | (portconfigs[i].lanes[2] ? 0 : (1 << MRFLD_PORT3_ENABLE_SHIFT))
+ | (((1 << portconfigs[i].lanes[0]) - 1) << MRFLD_PORT1_LANES_SHIFT)
+ | (((1 << portconfigs[i].lanes[1]) - 1) << MRFLD_PORT2_LANES_SHIFT)
+ | (((1 << portconfigs[i].lanes[2]) - 1) << port3_lanes_shift);
pci_write_config_dword(isp->pdev, MRFLD_PCI_CSI_CONTROL, csi_control);
for (subdevs = pdata->subdevs; subdevs->type; ++subdevs) {
struct v4l2_subdev *subdev;
struct i2c_board_info *board_info =
- &subdevs->v4l2_subdev.board_info;
+ &subdevs->v4l2_subdev.board_info;
struct i2c_adapter *adapter =
- i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
+ i2c_get_adapter(subdevs->v4l2_subdev.i2c_adapter_id);
int sensor_num, i;
if (!adapter) {
*/
isp->inputs[isp->input_cnt].frame_size.pixel_format = 0;
isp->inputs[isp->input_cnt].camera_caps =
- atomisp_get_default_camera_caps();
+ atomisp_get_default_camera_caps();
sensor_num = isp->inputs[isp->input_cnt]
- .camera_caps->sensor_num;
+ .camera_caps->sensor_num;
isp->input_cnt++;
for (i = 1; i < sensor_num; i++) {
if (isp->input_cnt >= ATOM_ISP_MAX_INPUTS) {
dev_warn(isp->dev,
- "atomisp inputs out of range\n");
+ "atomisp inputs out of range\n");
break;
}
isp->inputs[isp->input_cnt] =
- isp->inputs[isp->input_cnt - 1];
+ isp->inputs[isp->input_cnt - 1];
isp->inputs[isp->input_cnt].sensor_index = i;
isp->input_cnt++;
}
atomisp_mipi_csi2_unregister_entities(&isp->csi2_port[i]);
list_for_each_entry_safe(sd, next, &isp->v4l2_dev.subdevs, list)
- v4l2_device_unregister_subdev(sd);
+ v4l2_device_unregister_subdev(sd);
v4l2_device_unregister(&isp->v4l2_dev);
media_device_unregister(&isp->media_dev);
/* Register internal entities */
for (i = 0; i < ATOMISP_CAMERA_NR_PORTS; i++) {
ret = atomisp_mipi_csi2_register_entities(&isp->csi2_port[i],
- &isp->v4l2_dev);
+ &isp->v4l2_dev);
if (ret == 0)
continue;
/* deregister all registered CSI ports */
while (i--)
atomisp_mipi_csi2_unregister_entities(
- &isp->csi2_port[i]);
+ &isp->csi2_port[i]);
goto csi_and_subdev_probe_failed;
}
ret =
- atomisp_file_input_register_entities(&isp->file_dev, &isp->v4l2_dev);
+ atomisp_file_input_register_entities(&isp->file_dev, &isp->v4l2_dev);
if (ret < 0) {
dev_err(isp->dev, "atomisp_file_input_register_entities\n");
goto file_input_register_failed;
"atomisp_subdev_register_entities fail\n");
for (; i > 0; i--)
atomisp_subdev_unregister_entities(
- &isp->asd[i - 1]);
+ &isp->asd[i - 1]);
goto subdev_register_failed;
}
}
init_completion(&asd->init_done);
asd->delayed_init_workq =
- alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
- 1);
+ alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
+ 1);
if (!asd->delayed_init_workq) {
dev_err(isp->dev,
- "Failed to initialize delayed init workq\n");
+ "Failed to initialize delayed init workq\n");
ret = -ENOMEM;
for (; i > 0; i--)
destroy_workqueue(isp->asd[i - 1].
- delayed_init_workq);
+ delayed_init_workq);
goto wq_alloc_failed;
}
INIT_WORK(&asd->delayed_init_work, atomisp_delayed_init_work);
for (i = 0; i < isp->input_cnt; i++) {
if (isp->inputs[i].port >= ATOMISP_CAMERA_NR_PORTS) {
dev_err(isp->dev, "isp->inputs port %d not supported\n",
- isp->inputs[i].port);
+ isp->inputs[i].port);
ret = -EINVAL;
goto link_failed;
}
isp->inputs[isp->input_cnt].type = FILE_INPUT;
isp->inputs[isp->input_cnt].port = -1;
isp->inputs[isp->input_cnt].camera_caps =
- atomisp_get_default_camera_caps();
+ atomisp_get_default_camera_caps();
isp->inputs[isp->input_cnt++].camera = &isp->file_dev.sd;
if (isp->input_cnt < ATOM_ISP_MAX_INPUTS) {
link_failed:
for (i = 0; i < isp->num_of_streams; i++)
destroy_workqueue(isp->asd[i].
- delayed_init_workq);
+ delayed_init_workq);
wq_alloc_failed:
for (i = 0; i < isp->num_of_streams; i++)
atomisp_subdev_unregister_entities(
- &isp->asd[i]);
+ &isp->asd[i]);
subdev_register_failed:
atomisp_tpg_unregister_entities(&isp->tpg);
tpg_register_failed:
#define ATOM_ISP_PCI_BAR 0
static int atomisp_pci_probe(struct pci_dev *dev,
- const struct pci_device_id *id)
+ const struct pci_device_id *id)
{
const struct atomisp_platform_data *pdata;
struct atomisp_device *isp;
switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK) {
case ATOMISP_PCI_DEVICE_SOC_MRFLD:
isp->media_dev.hw_revision =
- (ATOMISP_HW_REVISION_ISP2400
- << ATOMISP_HW_REVISION_SHIFT) |
- ATOMISP_HW_STEPPING_B0;
+ (ATOMISP_HW_REVISION_ISP2400
+ << ATOMISP_HW_REVISION_SHIFT) |
+ ATOMISP_HW_STEPPING_B0;
switch (id->device) {
case ATOMISP_PCI_DEVICE_SOC_MRFLD_1179:
break;
case ATOMISP_PCI_DEVICE_SOC_BYT:
isp->media_dev.hw_revision =
- (ATOMISP_HW_REVISION_ISP2400
- << ATOMISP_HW_REVISION_SHIFT) |
- ATOMISP_HW_STEPPING_B0;
+ (ATOMISP_HW_REVISION_ISP2400
+ << ATOMISP_HW_REVISION_SHIFT) |
+ ATOMISP_HW_STEPPING_B0;
#ifdef FIXME
if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, CRV2) ||
- INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
+ INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
isp->dfs = &dfs_config_byt_cr;
isp->hpll_freq = HPLL_FREQ_2000MHZ;
} else
* have specs yet for exactly how it varies. Default to
* BYT-CR but let provisioning set it via EFI variable */
isp->hpll_freq = gmin_get_var_int(&dev->dev, "HpllFreq",
- HPLL_FREQ_2000MHZ);
+ HPLL_FREQ_2000MHZ);
/*
* for BYT/CHT we are put isp into D3cold to avoid pci registers access
case ATOMISP_PCI_DEVICE_SOC_ANN:
isp->media_dev.hw_revision = (
#ifdef ISP2401_NEW_INPUT_SYSTEM
- ATOMISP_HW_REVISION_ISP2401
+ ATOMISP_HW_REVISION_ISP2401
#else
- ATOMISP_HW_REVISION_ISP2401_LEGACY
+ ATOMISP_HW_REVISION_ISP2401_LEGACY
#endif
- << ATOMISP_HW_REVISION_SHIFT);
+ << ATOMISP_HW_REVISION_SHIFT);
isp->media_dev.hw_revision |= isp->pdev->revision < 2 ?
- ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
+ ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
isp->dfs = &dfs_config_merr;
isp->hpll_freq = HPLL_FREQ_1600MHZ;
break;
case ATOMISP_PCI_DEVICE_SOC_CHT:
isp->media_dev.hw_revision = (
#ifdef ISP2401_NEW_INPUT_SYSTEM
- ATOMISP_HW_REVISION_ISP2401
+ ATOMISP_HW_REVISION_ISP2401
#else
- ATOMISP_HW_REVISION_ISP2401_LEGACY
+ ATOMISP_HW_REVISION_ISP2401_LEGACY
#endif
- << ATOMISP_HW_REVISION_SHIFT);
+ << ATOMISP_HW_REVISION_SHIFT);
isp->media_dev.hw_revision |= isp->pdev->revision < 2 ?
- ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
+ ATOMISP_HW_STEPPING_A0 : ATOMISP_HW_STEPPING_B0;
isp->dfs = &dfs_config_cht;
isp->pdev->d3cold_delay = 0;
atomisp_store_uint32(MRFLD_CSI_RECEIVER_SELECTION_REG, 1);
if ((id->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
- ATOMISP_PCI_DEVICE_SOC_MRFLD) {
+ ATOMISP_PCI_DEVICE_SOC_MRFLD) {
u32 csi_afe_trim;
/*
pci_read_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
&csi_afe_trim);
csi_afe_trim &= ~((MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
- MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
+ MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
(MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
- MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
+ MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
(MRFLD_PCI_CSI_HSRXCLKTRIM_MASK <<
- MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT));
+ MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT));
csi_afe_trim |= (MRFLD_PCI_CSI1_HSRXCLKTRIM <<
- MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
+ MRFLD_PCI_CSI1_HSRXCLKTRIM_SHIFT) |
(MRFLD_PCI_CSI2_HSRXCLKTRIM <<
- MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
+ MRFLD_PCI_CSI2_HSRXCLKTRIM_SHIFT) |
(MRFLD_PCI_CSI3_HSRXCLKTRIM <<
- MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT);
+ MRFLD_PCI_CSI3_HSRXCLKTRIM_SHIFT);
pci_write_config_dword(dev, MRFLD_PCI_CSI_AFE_TRIM_CONTROL,
- csi_afe_trim);
+ csi_afe_trim);
}
err = atomisp_initialize_modules(isp);
static void atomisp_pci_remove(struct pci_dev *dev)
{
struct atomisp_device *isp = (struct atomisp_device *)
- pci_get_drvdata(dev);
+ pci_get_drvdata(dev);
atomisp_drvfs_exit();
void atomisp_acc_init(struct atomisp_acc_pipe *video, const char *name);
void atomisp_video_unregister(struct atomisp_video_pipe *video);
int atomisp_video_register(struct atomisp_video_pipe *video,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
void atomisp_acc_unregister(struct atomisp_acc_pipe *video);
int atomisp_acc_register(struct atomisp_acc_pipe *video,
- struct v4l2_device *vdev);
+ struct v4l2_device *vdev);
const struct firmware *atomisp_load_firmware(struct atomisp_device *isp);
int atomisp_csi_lane_config(struct atomisp_device *isp);
* @param desc The descriptor set to the size using ia_css_circbuf_desc_init().
*/
void ia_css_circbuf_create(
- ia_css_circbuf_t *cb,
- ia_css_circbuf_elem_t *elems,
- ia_css_circbuf_desc_t *desc);
+ ia_css_circbuf_t *cb,
+ ia_css_circbuf_elem_t *elems,
+ ia_css_circbuf_desc_t *desc);
/**
* @brief Destroy the circular buffer.
* @param cb The pointer to the circular buffer.
*/
void ia_css_circbuf_destroy(
- ia_css_circbuf_t *cb);
+ ia_css_circbuf_t *cb);
/**
* @brief Pop a value out of the circular buffer.
* @return the pop-out value.
*/
uint32_t ia_css_circbuf_pop(
- ia_css_circbuf_t *cb);
+ ia_css_circbuf_t *cb);
/**
* @brief Extract a value out of the circular buffer.
* @return the extracted value.
*/
uint32_t ia_css_circbuf_extract(
- ia_css_circbuf_t *cb,
- int offset);
+ ia_css_circbuf_t *cb,
+ int offset);
/****************************************************************
*
* @param val The value to be set.
*/
static inline void ia_css_circbuf_elem_set_val(
- ia_css_circbuf_elem_t *elem,
- uint32_t val)
+ ia_css_circbuf_elem_t *elem,
+ uint32_t val)
{
OP___assert(elem);
* @param elem The pointer to the element.
*/
static inline void ia_css_circbuf_elem_init(
- ia_css_circbuf_elem_t *elem)
+ ia_css_circbuf_elem_t *elem)
{
OP___assert(elem);
ia_css_circbuf_elem_set_val(elem, 0);
* @param dest The element as the copy destination.
*/
static inline void ia_css_circbuf_elem_cpy(
- ia_css_circbuf_elem_t *src,
- ia_css_circbuf_elem_t *dest)
+ ia_css_circbuf_elem_t *src,
+ ia_css_circbuf_elem_t *dest)
{
OP___assert(src);
OP___assert(dest);
* @return the position at offset.
*/
static inline uint8_t ia_css_circbuf_get_pos_at_offset(
- ia_css_circbuf_t *cb,
- u32 base,
- int offset)
+ ia_css_circbuf_t *cb,
+ u32 base,
+ int offset)
{
u8 dest;
* @return the offset.
*/
static inline int ia_css_circbuf_get_offset(
- ia_css_circbuf_t *cb,
- u32 src_pos,
- uint32_t dest_pos)
+ ia_css_circbuf_t *cb,
+ u32 src_pos,
+ uint32_t dest_pos)
{
int offset;
* TODO: Test this API.
*/
static inline uint32_t ia_css_circbuf_get_size(
- ia_css_circbuf_t *cb)
+ ia_css_circbuf_t *cb)
{
OP___assert(cb);
OP___assert(cb->desc);
* @return the number of available elements.
*/
static inline uint32_t ia_css_circbuf_get_num_elems(
- ia_css_circbuf_t *cb)
+ ia_css_circbuf_t *cb)
{
int num;
* - false when it is not empty.
*/
static inline bool ia_css_circbuf_is_empty(
- ia_css_circbuf_t *cb)
+ ia_css_circbuf_t *cb)
{
OP___assert(cb);
OP___assert(cb->desc);
* @param elem The new element.
*/
static inline void ia_css_circbuf_write(
- ia_css_circbuf_t *cb,
- ia_css_circbuf_elem_t elem)
+ ia_css_circbuf_t *cb,
+ ia_css_circbuf_elem_t elem)
{
OP___assert(cb);
OP___assert(cb->desc);
* @param val The value to be pushed in.
*/
static inline void ia_css_circbuf_push(
- ia_css_circbuf_t *cb,
- uint32_t val)
+ ia_css_circbuf_t *cb,
+ uint32_t val)
{
ia_css_circbuf_elem_t elem;
* @return: The number of free elements.
*/
static inline uint32_t ia_css_circbuf_get_free_elems(
- ia_css_circbuf_t *cb)
+ ia_css_circbuf_t *cb)
{
OP___assert(cb);
OP___assert(cb->desc);
* @return the elements value.
*/
uint32_t ia_css_circbuf_peek(
- ia_css_circbuf_t *cb,
- int offset);
+ ia_css_circbuf_t *cb,
+ int offset);
/**
* @brief Get an element in Circular Buffer.
* @return the elements value.
*/
uint32_t ia_css_circbuf_peek_from_start(
- ia_css_circbuf_t *cb,
- int offset);
+ ia_css_circbuf_t *cb,
+ int offset);
/**
* @brief Increase Size of a Circular Buffer.
* false on failure
*/
bool ia_css_circbuf_increase_size(
- ia_css_circbuf_t *cb,
- unsigned int sz_delta,
- ia_css_circbuf_elem_t *elems);
+ ia_css_circbuf_t *cb,
+ unsigned int sz_delta,
+ ia_css_circbuf_elem_t *elems);
#endif /*_IA_CSS_CIRCBUF_H */
* - false when it is not empty.
*/
static inline bool ia_css_circbuf_desc_is_empty(
- ia_css_circbuf_desc_t *cb_desc)
+ ia_css_circbuf_desc_t *cb_desc)
{
OP___assert(cb_desc);
return (cb_desc->end == cb_desc->start);
* - false when it is not full.
*/
static inline bool ia_css_circbuf_desc_is_full(
- ia_css_circbuf_desc_t *cb_desc)
+ ia_css_circbuf_desc_t *cb_desc)
{
OP___assert(cb_desc);
return (OP_std_modadd(cb_desc->end, 1, cb_desc->size) == cb_desc->start);
* @param size The size of the circular buffer
*/
static inline void ia_css_circbuf_desc_init(
- ia_css_circbuf_desc_t *cb_desc,
- int8_t size)
+ ia_css_circbuf_desc_t *cb_desc,
+ int8_t size)
{
OP___assert(cb_desc);
cb_desc->size = size;
* @return the position in the circular buffer descriptor.
*/
static inline uint8_t ia_css_circbuf_desc_get_pos_at_offset(
- ia_css_circbuf_desc_t *cb_desc,
- u32 base,
- int offset)
+ ia_css_circbuf_desc_t *cb_desc,
+ u32 base,
+ int offset)
{
u8 dest;
* @return the offset.
*/
static inline int ia_css_circbuf_desc_get_offset(
- ia_css_circbuf_desc_t *cb_desc,
- u32 src_pos,
- uint32_t dest_pos)
+ ia_css_circbuf_desc_t *cb_desc,
+ u32 src_pos,
+ uint32_t dest_pos)
{
int offset;
* @return The number of available elements.
*/
static inline uint32_t ia_css_circbuf_desc_get_num_elems(
- ia_css_circbuf_desc_t *cb_desc)
+ ia_css_circbuf_desc_t *cb_desc)
{
int num;
OP___assert(cb_desc);
num = ia_css_circbuf_desc_get_offset(cb_desc,
- cb_desc->start,
- cb_desc->end);
+ cb_desc->start,
+ cb_desc->end);
return (uint32_t)num;
}
* @return: The number of free elements.
*/
static inline uint32_t ia_css_circbuf_desc_get_free_elems(
- ia_css_circbuf_desc_t *cb_desc)
+ ia_css_circbuf_desc_t *cb_desc)
{
u32 num;
OP___assert(cb_desc);
num = ia_css_circbuf_desc_get_offset(cb_desc,
- cb_desc->start,
- cb_desc->end);
+ cb_desc->start,
+ cb_desc->end);
return (cb_desc->size - num);
}
* @param chunk_dest The position to which the first element in the chunk would be shift.
*/
static inline void ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
- u32 chunk_src,
- uint32_t chunk_dest);
+ u32 chunk_src,
+ uint32_t chunk_dest);
/*
* @brief Get the "val" field in the element.
*/
void
ia_css_circbuf_create(ia_css_circbuf_t *cb,
- ia_css_circbuf_elem_t *elems,
- ia_css_circbuf_desc_t *desc)
+ ia_css_circbuf_elem_t *elems,
+ ia_css_circbuf_desc_t *desc)
{
u32 i;
* Please refer to "ia_css_circbuf.h" for details.
*/
bool ia_css_circbuf_increase_size(
- ia_css_circbuf_t *cb,
- unsigned int sz_delta,
- ia_css_circbuf_elem_t *elems)
+ ia_css_circbuf_t *cb,
+ unsigned int sz_delta,
+ ia_css_circbuf_elem_t *elems)
{
u8 curr_size;
u8 curr_end;
/* We assume cb was pre defined as global to allow
* increase in size */
/* FM: are we sure this cannot cause size to become too big? */
- if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) && ((uint8_t)sz_delta == sz_delta))
+ if (((uint8_t)(cb->desc->size + (uint8_t)sz_delta) > cb->desc->size) &&
+ ((uint8_t)sz_delta == sz_delta))
cb->desc->size += (uint8_t)sz_delta;
else
return false; /* overflow in size */
} else {
/* Move elements and fix Start*/
ia_css_circbuf_shift_chunk(cb,
- curr_size - 1,
- curr_size + sz_delta - 1);
+ curr_size - 1,
+ curr_size + sz_delta - 1);
}
}
*/
static inline void
ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb,
- u32 chunk_src, uint32_t chunk_dest)
+ u32 chunk_src, uint32_t chunk_dest)
{
int chunk_offset;
int chunk_sz;
/* get the chunk offset and size */
chunk_offset = ia_css_circbuf_get_offset(cb,
- chunk_src, chunk_dest);
+ chunk_src, chunk_dest);
chunk_sz = ia_css_circbuf_get_offset(cb, cb->desc->start, chunk_src) + 1;
/* shift each element to its terminal position */
for (i = 0; i < chunk_sz; i++) {
/* copy the element from the source to the destination */
ia_css_circbuf_elem_cpy(&cb->elems[chunk_src],
- &cb->elems[chunk_dest]);
+ &cb->elems[chunk_dest]);
/* clear the source position */
ia_css_circbuf_elem_init(&cb->elems[chunk_src]);
}
/* adjust the index "start" */
- cb->desc->start = ia_css_circbuf_get_pos_at_offset(cb, cb->desc->start, chunk_offset);
+ cb->desc->start = ia_css_circbuf_get_pos_at_offset(cb, cb->desc->start,
+ chunk_offset);
}
* return None
*/
void ia_css_refcount_clear(s32 id,
- clear_func clear_func_ptr);
+ clear_func clear_func_ptr);
/*! \brief Function to verify if object is valid
*
static struct ia_css_refcount_list myrefcount;
static struct ia_css_refcount_entry *refcount_find_entry(hrt_vaddress ptr,
- bool firstfree)
+ bool firstfree)
{
u32 i;
if (entry->id != id) {
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "ia_css_refcount_increment(): Ref count IDS do not match!\n");
+ "ia_css_refcount_increment(): Ref count IDS do not match!\n");
return mmgr_NULL;
}
valid anymore */
if (entry)
IA_CSS_ERROR("id %x, ptr 0x%x entry %p entry->id %x entry->count %d\n",
- id, ptr, entry, entry->id, entry->count);
+ id, ptr, entry, entry->id, entry->count);
else
IA_CSS_ERROR("entry NULL\n");
#ifdef ISP2401
*
*/
void ia_css_pipe_get_copy_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *copy_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *copy_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for vfpp.
*
*
*/
void ia_css_pipe_get_vfpp_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *vf_pp_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *vf_pp_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get numerator and denominator of bayer downscaling factor.
*
*
*/
enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
- unsigned int bds_factor,
- unsigned int *bds_factor_numerator,
- unsigned int *bds_factor_denominator);
+ unsigned int bds_factor,
+ unsigned int *bds_factor_numerator,
+ unsigned int *bds_factor_denominator);
/* @brief Get a binary descriptor for preview stage.
*
*
*/
enum ia_css_err ia_css_pipe_get_preview_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *preview_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *bds_out_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *preview_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *bds_out_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for video stage.
*
*
*/
enum ia_css_err ia_css_pipe_get_video_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *video_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *bds_out_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- int stream_config_left_padding);
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *video_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *bds_out_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ int stream_config_left_padding);
/* @brief Get a binary descriptor for yuv scaler stage.
*
*
*/
void ia_css_pipe_get_yuvscaler_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *yuv_scaler_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *internal_out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *yuv_scaler_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *internal_out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for capture pp stage.
*
*
*/
void ia_css_pipe_get_capturepp_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *capture_pp_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *capture_pp_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for primary capture.
*
*
*/
void ia_css_pipe_get_primary_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *prim_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- unsigned int stage_idx);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *prim_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ unsigned int stage_idx);
/* @brief Get a binary descriptor for pre gdc stage.
*
*
*/
void ia_css_pipe_get_pre_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get a binary descriptor for gdc stage.
*
*
*/
void ia_css_pipe_get_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get a binary descriptor for post gdc.
*
*
*/
void ia_css_pipe_get_post_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *post_gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *post_gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for de.
*
*
*/
void ia_css_pipe_get_pre_de_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *pre_de_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *pre_de_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get a binary descriptor for pre anr stage.
*
*
*/
void ia_css_pipe_get_pre_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *pre_anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *pre_anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get a binary descriptor for ANR stage.
*
*
*/
void ia_css_pipe_get_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Get a binary descriptor for post anr stage.
*
*
*/
void ia_css_pipe_get_post_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *post_anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *post_anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info);
/* @brief Get a binary descriptor for ldc stage.
*
*
*/
void ia_css_pipe_get_ldc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *ldc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info);
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *ldc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info);
/* @brief Calculates the required BDS factor
*
* @return IA_CSS_SUCCESS or error code upon error.
*/
enum ia_css_err binarydesc_calculate_bds_factor(
- struct ia_css_resolution input_res,
- struct ia_css_resolution output_res,
- unsigned int *bds_factor);
+ struct ia_css_resolution input_res,
+ struct ia_css_resolution output_res,
+ unsigned int *bds_factor);
#endif /* __IA_CSS_PIPE_BINARYDESC_H__ */
#include "ia_css_pipeline_common.h"
void ia_css_pipe_get_generic_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_frame *out_frame[],
- struct ia_css_frame *in_frame,
- struct ia_css_frame *vf_frame);
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_frame *out_frame[],
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *vf_frame);
void ia_css_pipe_get_firmwares_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_frame *out_frame[],
- struct ia_css_frame *in_frame,
- struct ia_css_frame *vf_frame,
- const struct ia_css_fw_info *fw,
- unsigned int mode);
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_frame *out_frame[],
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *vf_frame,
+ const struct ia_css_fw_info *fw,
+ unsigned int mode);
void ia_css_pipe_get_acc_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_fw_info *fw);
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_fw_info *fw);
void ia_css_pipe_get_sp_func_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_frame *out_frame,
- enum ia_css_pipeline_stage_sp_func sp_func,
- unsigned int max_input_width);
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_frame *out_frame,
+ enum ia_css_pipeline_stage_sp_func sp_func,
+ unsigned int max_input_width);
#endif /*__IA_CSS_PIPE_STAGEDESC__H__ */
*
*/
unsigned int ia_css_pipe_util_pipe_input_format_bpp(
- const struct ia_css_pipe * const pipe);
+ const struct ia_css_pipe *const pipe);
void ia_css_pipe_util_create_output_frames(
- struct ia_css_frame *frames[]);
+ struct ia_css_frame *frames[]);
void ia_css_pipe_util_set_output_frames(
- struct ia_css_frame *frames[],
- unsigned int idx,
- struct ia_css_frame *frame);
+ struct ia_css_frame *frames[],
+ unsigned int idx,
+ struct ia_css_frame *frame);
#endif /* __IA_CSS_PIPE_UTIL_H__ */
/* Generic descriptor for offline binaries. Internal function. */
static void pipe_binarydesc_get_offline(
- struct ia_css_pipe const * const pipe,
- const int mode,
- struct ia_css_binary_descr *descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info[],
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe const *const pipe,
+ const int mode,
+ struct ia_css_binary_descr *descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info[],
+ struct ia_css_frame_info *vf_info)
{
unsigned int i;
/* in_info, out_info, vf_info can be NULL */
}
void ia_css_pipe_get_copy_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *copy_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *copy_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info)
{
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
unsigned int i;
}
void ia_css_pipe_get_vfpp_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *vf_pp_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *vf_pp_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
unsigned int i;
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_VF_PP,
- vf_pp_descr, in_info, out_infos, NULL);
+ vf_pp_descr, in_info, out_infos, NULL);
vf_pp_descr->enable_fractional_ds = true;
IA_CSS_LEAVE_PRIVATE("");
}
};
enum ia_css_err sh_css_bds_factor_get_numerator_denominator(
- unsigned int bds_factor,
- unsigned int *bds_factor_numerator,
- unsigned int *bds_factor_denominator)
+ unsigned int bds_factor,
+ unsigned int *bds_factor_numerator,
+ unsigned int *bds_factor_denominator)
{
unsigned int i;
}
enum ia_css_err binarydesc_calculate_bds_factor(
- struct ia_css_resolution input_res,
- struct ia_css_resolution output_res,
- unsigned int *bds_factor)
+ struct ia_css_resolution input_res,
+ struct ia_css_resolution output_res,
+ unsigned int *bds_factor)
{
unsigned int i;
unsigned int in_w = input_res.width,
- in_h = input_res.height,
- out_w = output_res.width, out_h = output_res.height;
+ in_h = input_res.height,
+ out_w = output_res.width, out_h = output_res.height;
unsigned int max_bds_factor = 8;
unsigned int max_rounding_margin = 2;
/* See width-wise and height-wise if this bds_factor
* satisfies the condition */
bool cond = (out_w * num / den + delta > in_w) &&
- (out_w * num / den <= in_w) &&
- (out_h * num / den + delta > in_h) &&
- (out_h * num / den <= in_h);
+ (out_w * num / den <= in_w) &&
+ (out_h * num / den + delta > in_h) &&
+ (out_h * num / den <= in_h);
if (cond) {
*bds_factor = bds_factors_list[i].bds_factor;
}
enum ia_css_err ia_css_pipe_get_preview_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *preview_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *bds_out_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *preview_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *bds_out_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info)
{
enum ia_css_err err;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, mode,
- preview_descr, in_info, out_infos, vf_info);
+ preview_descr, in_info, out_infos, vf_info);
if (pipe->stream->config.online) {
preview_descr->online = pipe->stream->config.online;
preview_descr->two_ppc =
pipe->config.bayer_ds_out_res.width;
err =
binarydesc_calculate_bds_factor(in_info->res,
- bds_out_info->res,
- &preview_descr->required_bds_factor);
+ bds_out_info->res,
+ &preview_descr->required_bds_factor);
if (err != IA_CSS_SUCCESS)
return err;
} else {
}
enum ia_css_err ia_css_pipe_get_video_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *video_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *bds_out_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- int stream_config_left_padding)
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *video_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *bds_out_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ int stream_config_left_padding)
{
int mode = IA_CSS_BINARY_MODE_VIDEO;
unsigned int i;
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, mode,
- video_descr, in_info, out_infos, vf_info);
+ video_descr, in_info, out_infos, vf_info);
if (pipe->stream->config.online) {
video_descr->online = pipe->stream->config.online;
HRT_GDC_N));
video_descr->enable_dz = pipe->config.enable_dz
- || stream_dz_config;
+ || stream_dz_config;
video_descr->dvs_env = pipe->config.dvs_envelope;
video_descr->enable_yuv_ds = pipe->extra_config.enable_yuv_ds;
video_descr->enable_high_speed =
video_descr->enable_fractional_ds =
pipe->extra_config.enable_fractional_ds;
video_descr->enable_dpc =
- pipe->config.enable_dpc;
+ pipe->config.enable_dpc;
#ifdef ISP2401
video_descr->enable_luma_only =
- pipe->config.enable_luma_only;
+ pipe->config.enable_luma_only;
video_descr->enable_tnr =
- pipe->config.enable_tnr;
+ pipe->config.enable_tnr;
#endif
if (pipe->extra_config.enable_raw_binning) {
bds_out_info->padded_width =
pipe->config.bayer_ds_out_res.width;
err =
- binarydesc_calculate_bds_factor(
+ binarydesc_calculate_bds_factor(
in_info->res, bds_out_info->res,
&video_descr->required_bds_factor);
if (err != IA_CSS_SUCCESS)
}
void ia_css_pipe_get_yuvscaler_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *yuv_scaler_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *internal_out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *yuv_scaler_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *internal_out_info,
+ struct ia_css_frame_info *vf_info)
{
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
struct ia_css_frame_info *this_vf_info = NULL;
if (vf_info) {
this_vf_info = (vf_info->res.width == 0 &&
- vf_info->res.height == 0) ? NULL : vf_info;
+ vf_info->res.height == 0) ? NULL : vf_info;
}
pipe_binarydesc_get_offline(pipe,
- IA_CSS_BINARY_MODE_CAPTURE_PP,
- yuv_scaler_descr,
- in_info, out_infos, this_vf_info);
+ IA_CSS_BINARY_MODE_CAPTURE_PP,
+ yuv_scaler_descr,
+ in_info, out_infos, this_vf_info);
yuv_scaler_descr->enable_fractional_ds = true;
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_capturepp_binarydesc(
- struct ia_css_pipe * const pipe,
- struct ia_css_binary_descr *capture_pp_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe *const pipe,
+ struct ia_css_binary_descr *capture_pp_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe,
- IA_CSS_BINARY_MODE_CAPTURE_PP,
- capture_pp_descr,
- in_info, out_infos, vf_info);
+ IA_CSS_BINARY_MODE_CAPTURE_PP,
+ capture_pp_descr,
+ in_info, out_infos, vf_info);
capture_pp_descr->enable_capture_pp_bli =
- pipe->config.default_capture_config.enable_capture_pp_bli;
+ pipe->config.default_capture_config.enable_capture_pp_bli;
capture_pp_descr->enable_fractional_ds = true;
capture_pp_descr->enable_xnr =
- pipe->config.default_capture_config.enable_xnr != 0;
+ pipe->config.default_capture_config.enable_xnr != 0;
IA_CSS_LEAVE_PRIVATE("");
}
};
void ia_css_pipe_get_primary_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *prim_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- unsigned int stage_idx)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *prim_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ unsigned int stage_idx)
{
enum ia_css_pipe_version pipe_version = pipe->config.isp_pipe_version;
int mode;
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, mode,
- prim_descr, in_info, out_infos, vf_info);
+ prim_descr, in_info, out_infos, vf_info);
if (pipe->stream->config.online &&
pipe->stream->config.mode != IA_CSS_INPUT_MODE_MEMORY) {
pipe->extra_config.enable_fractional_ds;
#ifdef ISP2401
prim_descr->enable_luma_only =
- pipe->config.enable_luma_only;
+ pipe->config.enable_luma_only;
#endif
/* We have both striped and non-striped primary binaries,
* if continuous viewfinder is required, then we must select
prim_descr->striped = false;
else
#ifndef ISP2401
- prim_descr->striped = prim_descr->continuous && (!pipe->stream->stop_copy_preview || !pipe->stream->disable_cont_vf);
+ prim_descr->striped = prim_descr->continuous &&
+ (!pipe->stream->stop_copy_preview || !pipe->stream->disable_cont_vf);
#else
prim_descr->striped = prim_descr->continuous && !pipe->stream->disable_cont_vf;
if ((pipe->config.default_capture_config.enable_xnr != 0) &&
- (pipe->extra_config.enable_dvs_6axis == true))
- prim_descr->enable_xnr = true;
+ (pipe->extra_config.enable_dvs_6axis == true))
+ prim_descr->enable_xnr = true;
#endif
}
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_pre_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *pre_gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *pre_gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
- pre_gdc_descr, in_info, out_infos, NULL);
+ pre_gdc_descr, in_info, out_infos, NULL);
pre_gdc_descr->isp_pipe_version = pipe->config.isp_pipe_version;
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_GDC,
- gdc_descr, in_info, out_infos, NULL);
+ gdc_descr, in_info, out_infos, NULL);
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_post_gdc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *post_gdc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *post_gdc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_POST_ISP,
- post_gdc_descr, in_info, out_infos, vf_info);
+ post_gdc_descr, in_info, out_infos, vf_info);
post_gdc_descr->isp_pipe_version = pipe->config.isp_pipe_version;
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_pre_de_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *pre_de_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *pre_de_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
- pre_de_descr, in_info, out_infos, NULL);
+ pre_de_descr, in_info, out_infos, NULL);
else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2) {
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_DE,
- pre_de_descr, in_info, out_infos, NULL);
+ pre_de_descr, in_info, out_infos, NULL);
}
if (pipe->stream->config.online) {
}
void ia_css_pipe_get_pre_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *pre_anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *pre_anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_PRE_ISP,
- pre_anr_descr, in_info, out_infos, NULL);
+ pre_anr_descr, in_info, out_infos, NULL);
if (pipe->stream->config.online) {
pre_anr_descr->online = true;
}
void ia_css_pipe_get_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_ANR,
- anr_descr, in_info, out_infos, NULL);
+ anr_descr, in_info, out_infos, NULL);
anr_descr->isp_pipe_version = pipe->config.isp_pipe_version;
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_post_anr_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *post_anr_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *post_anr_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_POST_ISP,
- post_anr_descr, in_info, out_infos, vf_info);
+ post_anr_descr, in_info, out_infos, vf_info);
post_anr_descr->isp_pipe_version = pipe->config.isp_pipe_version;
IA_CSS_LEAVE_PRIVATE("");
}
void ia_css_pipe_get_ldc_binarydesc(
- struct ia_css_pipe const * const pipe,
- struct ia_css_binary_descr *ldc_descr,
- struct ia_css_frame_info *in_info,
- struct ia_css_frame_info *out_info)
+ struct ia_css_pipe const *const pipe,
+ struct ia_css_binary_descr *ldc_descr,
+ struct ia_css_frame_info *in_info,
+ struct ia_css_frame_info *out_info)
{
unsigned int i;
struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
out_infos[i] = NULL;
pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_CAPTURE_PP,
- ldc_descr, in_info, out_infos, NULL);
+ ldc_descr, in_info, out_infos, NULL);
ldc_descr->enable_dvs_6axis =
- pipe->extra_config.enable_dvs_6axis;
+ pipe->extra_config.enable_dvs_6axis;
IA_CSS_LEAVE_PRIVATE("");
}
#include "ia_css_debug.h"
void ia_css_pipe_get_generic_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_frame *out_frame[],
- struct ia_css_frame *in_frame,
- struct ia_css_frame *vf_frame)
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_frame *out_frame[],
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *vf_frame)
{
unsigned int i;
}
void ia_css_pipe_get_firmwares_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_frame *out_frame[],
- struct ia_css_frame *in_frame,
- struct ia_css_frame *vf_frame,
- const struct ia_css_fw_info *fw,
- unsigned int mode)
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_frame *out_frame[],
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *vf_frame,
+ const struct ia_css_fw_info *fw,
+ unsigned int mode)
{
unsigned int i;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_firmwares_stage_desc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_get_firmwares_stage_desc() enter:\n");
stage_desc->binary = binary;
stage_desc->firmware = fw;
stage_desc->sp_func = IA_CSS_PIPELINE_NO_FUNC;
}
void ia_css_pipe_get_acc_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_binary *binary,
- struct ia_css_fw_info *fw)
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_binary *binary,
+ struct ia_css_fw_info *fw)
{
unsigned int i;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_acc_stage_desc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_get_acc_stage_desc() enter:\n");
stage_desc->binary = binary;
stage_desc->firmware = fw;
stage_desc->sp_func = IA_CSS_PIPELINE_NO_FUNC;
}
void ia_css_pipe_get_sp_func_stage_desc(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_frame *out_frame,
- enum ia_css_pipeline_stage_sp_func sp_func,
- unsigned int max_input_width)
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_frame *out_frame,
+ enum ia_css_pipeline_stage_sp_func sp_func,
+ unsigned int max_input_width)
{
unsigned int i;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_sp_func_stage_desc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_get_sp_func_stage_desc() enter:\n");
stage_desc->binary = NULL;
stage_desc->firmware = NULL;
stage_desc->sp_func = sp_func;
#include "assert_support.h"
unsigned int ia_css_pipe_util_pipe_input_format_bpp(
- const struct ia_css_pipe * const pipe)
+ const struct ia_css_pipe *const pipe)
{
assert(pipe);
assert(pipe->stream);
return ia_css_util_input_format_bpp(pipe->stream->config.input_config.format,
- pipe->stream->config.pixels_per_clock == 2);
+ pipe->stream->config.pixels_per_clock == 2);
}
void ia_css_pipe_util_create_output_frames(
- struct ia_css_frame *frames[])
+ struct ia_css_frame *frames[])
{
unsigned int i;
}
void ia_css_pipe_util_set_output_frames(
- struct ia_css_frame *frames[],
- unsigned int idx,
- struct ia_css_frame *frame)
+ struct ia_css_frame *frames[],
+ unsigned int idx,
+ struct ia_css_frame *frame)
{
assert(idx < IA_CSS_BINARY_MAX_OUTPUT_PORTS);
*
*/
enum ia_css_err ia_css_convert_errno(
- int in_err);
+ int in_err);
/* @brief check vf frame info.
*
*
*/
enum ia_css_err ia_css_util_check_vf_info(
- const struct ia_css_frame_info * const info);
+ const struct ia_css_frame_info *const info);
/* @brief check input configuration.
*
*
*/
enum ia_css_err ia_css_util_check_input(
- const struct ia_css_stream_config * const stream_config,
- bool must_be_raw,
- bool must_be_yuv);
+ const struct ia_css_stream_config *const stream_config,
+ bool must_be_raw,
+ bool must_be_yuv);
/* @brief check vf and out frame info.
*
*
*/
enum ia_css_err ia_css_util_check_vf_out_info(
- const struct ia_css_frame_info * const out_info,
- const struct ia_css_frame_info * const vf_info);
+ const struct ia_css_frame_info *const out_info,
+ const struct ia_css_frame_info *const vf_info);
/* @brief check width and height
*
*
*/
enum ia_css_err ia_css_util_check_res(
- unsigned int width,
- unsigned int height);
+ unsigned int width,
+ unsigned int height);
#ifdef ISP2401
/* @brief compare resolutions (less or equal)
*
*/
bool ia_css_util_res_leq(
- struct ia_css_resolution a,
- struct ia_css_resolution b);
+ struct ia_css_resolution a,
+ struct ia_css_resolution b);
/**
* @brief Check if resolution is zero
* @returns true if resolution is zero
*/
bool ia_css_util_resolution_is_zero(
- const struct ia_css_resolution resolution);
+ const struct ia_css_resolution resolution);
/**
* @brief Check if resolution is even
* @returns true if resolution is even
*/
bool ia_css_util_resolution_is_even(
- const struct ia_css_resolution resolution);
+ const struct ia_css_resolution resolution);
#endif
/* @brief check width and height
*
*/
unsigned int ia_css_util_input_format_bpp(
- enum atomisp_input_format stream_format,
- bool two_ppc);
+ enum atomisp_input_format stream_format,
+ bool two_ppc);
/* @brief check if input format it raw
*
*
*/
bool ia_css_util_is_input_format_raw(
- enum atomisp_input_format stream_format);
+ enum atomisp_input_format stream_format);
/* @brief check if input format it yuv
*
*
*/
bool ia_css_util_is_input_format_yuv(
- enum atomisp_input_format stream_format);
+ enum atomisp_input_format stream_format);
#endif /* __IA_CSS_UTIL_H__ */
#include "ia_css_binary.h"
enum ia_css_err ia_css_convert_errno(
- int in_err)
+ int in_err)
{
enum ia_css_err out_err;
switch (in_err) {
- case 0:
- out_err = IA_CSS_SUCCESS;
- break;
- case EINVAL:
- out_err = IA_CSS_ERR_INVALID_ARGUMENTS;
- break;
- case ENODATA:
- out_err = IA_CSS_ERR_QUEUE_IS_EMPTY;
- break;
- case ENOSYS:
- case ENOTSUP:
- out_err = IA_CSS_ERR_INTERNAL_ERROR;
- break;
- case ENOBUFS:
- out_err = IA_CSS_ERR_QUEUE_IS_FULL;
- break;
- default:
- out_err = IA_CSS_ERR_INTERNAL_ERROR;
- break;
+ case 0:
+ out_err = IA_CSS_SUCCESS;
+ break;
+ case EINVAL:
+ out_err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ break;
+ case ENODATA:
+ out_err = IA_CSS_ERR_QUEUE_IS_EMPTY;
+ break;
+ case ENOSYS:
+ case ENOTSUP:
+ out_err = IA_CSS_ERR_INTERNAL_ERROR;
+ break;
+ case ENOBUFS:
+ out_err = IA_CSS_ERR_QUEUE_IS_FULL;
+ break;
+ default:
+ out_err = IA_CSS_ERR_INTERNAL_ERROR;
+ break;
}
return out_err;
}
/* MW: Table look-up ??? */
unsigned int ia_css_util_input_format_bpp(
- enum atomisp_input_format format,
- bool two_ppc)
+ enum atomisp_input_format format,
+ bool two_ppc)
{
unsigned int rval = 0;
}
enum ia_css_err ia_css_util_check_vf_info(
- const struct ia_css_frame_info * const info)
+ const struct ia_css_frame_info *const info)
{
enum ia_css_err err;
unsigned int max_vf_width;
}
enum ia_css_err ia_css_util_check_vf_out_info(
- const struct ia_css_frame_info * const out_info,
- const struct ia_css_frame_info * const vf_info)
+ const struct ia_css_frame_info *const out_info,
+ const struct ia_css_frame_info *const vf_info)
{
enum ia_css_err err;
bool ia_css_util_is_input_format_yuv(enum atomisp_input_format format)
{
return format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY ||
- format == ATOMISP_INPUT_FORMAT_YUV420_8 ||
- format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
- format == ATOMISP_INPUT_FORMAT_YUV420_16 ||
- format == ATOMISP_INPUT_FORMAT_YUV422_8 ||
- format == ATOMISP_INPUT_FORMAT_YUV422_10 ||
- format == ATOMISP_INPUT_FORMAT_YUV422_16;
+ format == ATOMISP_INPUT_FORMAT_YUV420_8 ||
+ format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
+ format == ATOMISP_INPUT_FORMAT_YUV420_16 ||
+ format == ATOMISP_INPUT_FORMAT_YUV422_8 ||
+ format == ATOMISP_INPUT_FORMAT_YUV422_10 ||
+ format == ATOMISP_INPUT_FORMAT_YUV422_16;
}
enum ia_css_err ia_css_util_check_input(
- const struct ia_css_stream_config * const stream_config,
- bool must_be_raw,
- bool must_be_yuv)
+ const struct ia_css_stream_config *const stream_config,
+ bool must_be_raw,
+ bool must_be_yuv)
{
assert(stream_config);
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output0_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output1_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() leave:\n");
}
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#ifdef ISP2401
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#endif
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem);
#endif /* IA_CSS_INCLUDE_CONFIGURATION */
static void
ia_css_process_aa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
if (size) {
struct sh_css_isp_aa_params *t = (struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
t->strength = params->aa_config.strength;
}
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
}
/* Code generated by genparam/gencode.c:gen_process_function() */
static void
ia_css_process_anr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() enter:\n");
ia_css_anr_encode((struct sh_css_isp_anr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->anr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->anr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() leave:\n");
}
}
}
static void
ia_css_process_anr2(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() enter:\n");
ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->anr_thres,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->anr_thres,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() leave:\n");
}
}
}
static void
ia_css_process_bh(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
ia_css_bh_encode((struct sh_css_isp_bh_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
static void
ia_css_process_cnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() enter:\n");
ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() leave:\n");
}
}
}
static void
ia_css_process_crop(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() enter:\n");
ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->crop_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->crop_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() leave:\n");
}
}
}
static void
ia_css_process_csc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() enter:\n");
ia_css_csc_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() leave:\n");
}
}
}
static void
ia_css_process_dp(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
ia_css_dp_encode((struct sh_css_isp_dp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dp_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dp_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
}
static void
ia_css_process_bnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() enter:\n");
ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() leave:\n");
}
}
}
static void
ia_css_process_de(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
ia_css_de_encode((struct sh_css_isp_de_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->de_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->de_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
}
static void
ia_css_process_ecd(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() enter:\n");
ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ecd_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ecd_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() leave:\n");
}
}
}
static void
ia_css_process_formats(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() enter:\n");
ia_css_formats_encode((struct sh_css_isp_formats_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->formats_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->formats_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() leave:\n");
}
}
}
static void
ia_css_process_fpn(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() enter:\n");
ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fpn_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fpn_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() leave:\n");
}
}
}
static void
ia_css_process_gc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_encode((struct sh_css_isp_gc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->gc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->gc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->gc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->gc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
static void
ia_css_process_ce(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
ia_css_ce_encode((struct sh_css_isp_ce_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ce_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ce_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
}
static void
ia_css_process_yuv2rgb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() enter:\n");
ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yuv2rgb_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yuv2rgb_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() leave:\n");
}
}
}
static void
ia_css_process_rgb2yuv(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() enter:\n");
ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->rgb2yuv_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->rgb2yuv_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() leave:\n");
}
}
}
static void
ia_css_process_r_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() enter:\n");
ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->r_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->r_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() leave:\n");
}
}
}
static void
ia_css_process_g_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() enter:\n");
ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->g_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->g_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() leave:\n");
}
}
}
static void
ia_css_process_b_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() enter:\n");
ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
- ¶ms->b_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+ ¶ms->b_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() leave:\n");
}
}
}
static void
ia_css_process_uds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
if (size) {
struct sh_css_sp_uds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() enter:\n");
p = (struct sh_css_sp_uds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->crop_pos = params->uds_config.crop_pos;
p->uds = params->uds_config.uds;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() leave:\n");
}
}
}
static void
ia_css_process_raa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() enter:\n");
ia_css_raa_encode((struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->raa_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->raa_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() leave:\n");
}
}
}
static void
ia_css_process_s3a(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() enter:\n");
ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() leave:\n");
}
}
}
static void
ia_css_process_ob(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_encode((struct sh_css_isp_ob_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
static void
ia_css_process_output(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() enter:\n");
ia_css_output_encode((struct sh_css_isp_output_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->output_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->output_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() leave:\n");
}
}
}
static void
ia_css_process_sc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
ia_css_sc_encode((struct sh_css_isp_sc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->sc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->sc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
}
static void
ia_css_process_bds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
if (size) {
struct sh_css_isp_bds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() enter:\n");
p = (struct sh_css_isp_bds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->baf_strength = params->bds_config.strength;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() leave:\n");
}
}
}
static void
ia_css_process_tnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() enter:\n");
ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->tnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->tnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() leave:\n");
}
}
}
static void
ia_css_process_macc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() enter:\n");
ia_css_macc_encode((struct sh_css_isp_macc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->macc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->macc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() leave:\n");
}
}
}
static void
ia_css_process_sdis_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() enter:\n");
ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() enter:\n");
ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() enter:\n");
ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() enter:\n");
ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() enter:\n");
ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() enter:\n");
ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() enter:\n");
ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() enter:\n");
ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() leave:\n");
}
}
}
static void
ia_css_process_wb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
ia_css_wb_encode((struct sh_css_isp_wb_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->wb_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->wb_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
}
static void
ia_css_process_nr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
ia_css_nr_encode((struct sh_css_isp_ynr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
}
static void
ia_css_process_yee(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() enter:\n");
ia_css_yee_encode((struct sh_css_isp_yee_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yee_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yee_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() leave:\n");
}
}
}
static void
ia_css_process_ynr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() enter:\n");
ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ynr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ynr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() leave:\n");
}
}
}
static void
ia_css_process_fc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
ia_css_fc_encode((struct sh_css_isp_fc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
}
static void
ia_css_process_ctc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ctc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ctc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->ctc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->ctc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
}
static void
ia_css_process_xnr_table(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() enter:\n");
ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->xnr_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->xnr_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() leave:\n");
}
}
}
static void
ia_css_process_xnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() enter:\n");
ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() leave:\n");
}
}
}
static void
ia_css_process_xnr3(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#ifdef ISP2401
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#endif
/* Code generated by genparam/gencode.c:gen_param_process_table() */
void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params) = {
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params) = {
ia_css_process_aa,
ia_css_process_anr,
ia_css_process_anr2,
static void
ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dp_config *config){
+ struct ia_css_dp_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() enter: config=%p\n",
+ config);
*config = params->dp_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() leave\n");
ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config)
+ const struct ia_css_dp_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DP_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_dp_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_wb_config *config){
+ struct ia_css_wb_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() enter: config=%p\n",
+ config);
*config = params->wb_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() leave\n");
ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config)
+ const struct ia_css_wb_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_WB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_wb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_tnr_config *config){
+ struct ia_css_tnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() enter: config=%p\n",
+ config);
*config = params->tnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() leave\n");
ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config)
+ const struct ia_css_tnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_TNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_tnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ob_config *config){
+ struct ia_css_ob_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() enter: config=%p\n",
+ config);
*config = params->ob_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() leave\n");
ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config)
+ const struct ia_css_ob_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ob_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_de_config(const struct ia_css_isp_parameters *params,
- struct ia_css_de_config *config){
+ struct ia_css_de_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() enter: config=%p\n",
+ config);
*config = params->de_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() leave\n");
ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config)
+ const struct ia_css_de_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_de_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_config *config){
+ struct ia_css_anr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() enter: config=%p\n",
+ config);
*config = params->anr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() leave\n");
ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config)
+ const struct ia_css_anr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_thres *config){
+ struct ia_css_anr_thres *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() enter: config=%p\n",
+ config);
*config = params->anr_thres;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() leave\n");
ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config)
+ const struct ia_css_anr_thres *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR2_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr2_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ce_config *config){
+ struct ia_css_ce_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() enter: config=%p\n",
+ config);
*config = params->ce_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() leave\n");
ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config)
+ const struct ia_css_ce_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ce_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ecd_config *config){
+ struct ia_css_ecd_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() enter: config=%p\n",
+ config);
*config = params->ecd_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() leave\n");
ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config)
+ const struct ia_css_ecd_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ECD_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ecd_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ynr_config *config){
+ struct ia_css_ynr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() enter: config=%p\n",
+ config);
*config = params->ynr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() leave\n");
ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config)
+ const struct ia_css_ynr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ynr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_fc_config *config){
+ struct ia_css_fc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() enter: config=%p\n",
+ config);
*config = params->fc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() leave\n");
ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config)
+ const struct ia_css_fc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_fc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cnr_config *config){
+ struct ia_css_cnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() enter: config=%p\n",
+ config);
*config = params->cnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() leave\n");
ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config)
+ const struct ia_css_cnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_cnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_macc_config *config){
+ struct ia_css_macc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() enter: config=%p\n",
+ config);
*config = params->macc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() leave\n");
ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config)
+ const struct ia_css_macc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_MACC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_macc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ctc_config *config){
+ struct ia_css_ctc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() enter: config=%p\n",
+ config);
*config = params->ctc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() leave\n");
ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config)
+ const struct ia_css_ctc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CTC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ctc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
- struct ia_css_aa_config *config){
+ struct ia_css_aa_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() enter: config=%p\n",
+ config);
*config = params->aa_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() leave\n");
}
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config)
+ const struct ia_css_aa_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_AA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_aa_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+ config);
*config = params->yuv2rgb_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() leave\n");
ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YUV2RGB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_yuv2rgb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+ config);
*config = params->rgb2yuv_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() leave\n");
ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_RGB2YUV_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_rgb2yuv_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() enter: config=%p\n",
+ config);
*config = params->cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() leave\n");
ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CSC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_csc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_nr_config *config){
+ struct ia_css_nr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() enter: config=%p\n",
+ config);
*config = params->nr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() leave\n");
ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config)
+ const struct ia_css_nr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_NR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_nr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_gc_config *config){
+ struct ia_css_gc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() enter: config=%p\n",
+ config);
*config = params->gc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() leave\n");
ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config)
+ const struct ia_css_gc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_GC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_gc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() leave\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horicoef_config() enter:\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() leave\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertcoef_config() enter:\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() leave\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horiproj_config() enter:\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() leave\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertproj_config() enter:\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() leave\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horicoef_config() enter:\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() leave\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertcoef_config() enter:\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() leave\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horiproj_config() enter:\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() leave\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertproj_config() enter:\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() enter: config=%p\n",
+ config);
*config = params->r_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() leave\n");
ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_R_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_r_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() enter: config=%p\n",
+ config);
*config = params->g_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() leave\n");
ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_G_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_g_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() enter: config=%p\n",
+ config);
*config = params->b_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() leave\n");
ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_B_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_b_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_table *config){
+ struct ia_css_xnr_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() enter: config=%p\n",
+ config);
*config = params->xnr_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() leave\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config)
+ const struct ia_css_xnr_table *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_xnr_table_config() enter:\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->xnr_table = *config;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_table_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
- struct ia_css_formats_config *config){
+ struct ia_css_formats_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() enter: config=%p\n",
+ config);
*config = params->formats_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() leave\n");
ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config)
+ const struct ia_css_formats_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FORMATS_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_formats_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_config *config){
+ struct ia_css_xnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() enter: config=%p\n",
+ config);
*config = params->xnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() leave\n");
ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config)
+ const struct ia_css_xnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr3_config *config){
+ struct ia_css_xnr3_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() enter: config=%p\n",
+ config);
*config = params->xnr3_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() leave\n");
ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config)
+ const struct ia_css_xnr3_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR3_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr3_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
- struct ia_css_3a_config *config){
+ struct ia_css_3a_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() enter: config=%p\n",
+ config);
*config = params->s3a_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() leave\n");
ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config)
+ const struct ia_css_3a_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_S3A_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_s3a_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_output_config(const struct ia_css_isp_parameters *params,
- struct ia_css_output_config *config){
+ struct ia_css_output_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() enter: config=%p\n",
+ config);
*config = params->output_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() leave\n");
ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config)
+ const struct ia_css_output_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OUTPUT_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_output_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_get_dp_config(params, config->dp_config);
ia_css_get_wb_config(params, config->wb_config);
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_set_dp_config(params, config->dp_config);
ia_css_set_wb_config(params, config->wb_config);
struct ia_css_pipeline_stage; /* forward declaration */
extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params);
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config);
+ const struct ia_css_dp_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config);
+ const struct ia_css_wb_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config);
+ const struct ia_css_tnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config);
+ const struct ia_css_ob_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config);
+ const struct ia_css_de_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config);
+ const struct ia_css_anr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config);
+ const struct ia_css_anr_thres *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config);
+ const struct ia_css_ce_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config);
+ const struct ia_css_ecd_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config);
+ const struct ia_css_ynr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config);
+ const struct ia_css_fc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config);
+ const struct ia_css_cnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config);
+ const struct ia_css_macc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config);
+ const struct ia_css_ctc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config);
+ const struct ia_css_aa_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config);
+ const struct ia_css_nr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config);
+ const struct ia_css_gc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config);
+ const struct ia_css_xnr_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config);
+ const struct ia_css_formats_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config);
+ const struct ia_css_xnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config);
+ const struct ia_css_xnr3_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config);
+ const struct ia_css_3a_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config);
+ const struct ia_css_output_config *config);
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
static void
ia_css_initialize_aa_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.aa.size;
unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
if (size)
- memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+ memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ 0, size);
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
if (size) {
ia_css_init_cnr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr2_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
if (size) {
ia_css_init_cnr2_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_dp_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.dp.size;
if (size) {
ia_css_init_dp_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_de_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.de.size;
if (size) {
ia_css_init_de_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_tnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
if (size) {
ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ref_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.ref.size;
if (size) {
ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ynr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
if (size) {
ia_css_init_ynr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary) = {
ia_css_initialize_aa_state,
ia_css_initialize_cnr_state,
ia_css_initialize_cnr2_state,
#include "ia_css_binary.h" /* struct ia_css_binary */
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary);
#endif /* IA_CSS_INCLUDE_STATE */
#define _DMA_V2_ZERO_EXTEND 0
#define _DMA_V2_SIGN_EXTEND 1
- /* SLAVE address map */
+/* SLAVE address map */
#define _DMA_V2_SEL_FSM_CMD 0
#define _DMA_V2_SEL_CH_REG 1
#define _DMA_V2_SEL_CONN_GROUP 2
#define HRT_GDC_BCI_COEF_BITS 14 /* 14 bits per coefficient */
#define HRT_GDC_BCI_COEF_ONE (1 << (HRT_GDC_BCI_COEF_BITS - 2)) /* We represent signed 10 bit coefficients. */
- /* The supported range is [-256, .., +256] */
- /* in 14-bit signed notation, */
- /* We need all ten bits (MSB must be zero). */
- /* -s is inserted to solve this issue, and */
- /* therefore "1" is equal to +256. */
+/* The supported range is [-256, .., +256] */
+/* in 14-bit signed notation, */
+/* We need all ten bits (MSB must be zero). */
+/* -s is inserted to solve this issue, and */
+/* therefore "1" is equal to +256. */
#define HRT_GDC_BCI_COEF_MASK ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
#define HRT_GDC_LUT_BYTES (HRT_GDC_N * 4 * 2) /* 1024 addresses, 4 coefficients per address, */
- /* 2 bytes per coefficient */
+/* 2 bytes per coefficient */
#define _HRT_GDC_REG_ALIGN 4
- // 31 30 29 25 24 0
- // |-----|---|--------|------------------------|
- // | CMD | C | Reg_ID | Value |
+// 31 30 29 25 24 0
+// |-----|---|--------|------------------------|
+// | CMD | C | Reg_ID | Value |
- // There are just two commands possible for the GDC block:
- // 1 - Configure reg
- // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
- // C - Reserved bit
- // Used in protocol to indicate whether it is C-run or other type of runs
- // In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C - Reserved bit
+// Used in protocol to indicate whether it is C-run or other type of runs
+// In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
- // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
- // Value - Value to store to the addressed register, maximum of 24 bits
+// Value - Value to store to the addressed register, maximum of 24 bits
- // Configure reg command is not followed by any other token.
- // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
- // When the first data token is received, it must be:
- // 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
- // 2. P0'X (device configured in one of the tetragon modes)
- // After the first data token is received, pre-defined number of tokens with the following meaning follow:
- // 1. two tokens: SRC address ; DST address
- // 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+// 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
+// 2. P0'X (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+// 1. two tokens: SRC address ; DST address
+// 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
#define HRT_GDC_CONFIG_CMD 1
#define HRT_GDC_DATA_CMD 0
#define _HRT_GPIO_BLOCK_REG_ALIGN 4
/* R/W registers */
-#define _gpio_block_reg_do_e 0
+#define _gpio_block_reg_do_e 0
#define _gpio_block_reg_do_select 1
-#define _gpio_block_reg_do_0 2
-#define _gpio_block_reg_do_1 3
+#define _gpio_block_reg_do_0 2
+#define _gpio_block_reg_do_1 3
#define _gpio_block_reg_do_pwm_cnt_0 4
#define _gpio_block_reg_do_pwm_cnt_1 5
#define _gpio_block_reg_do_pwm_cnt_2 6
#define _gpio_block_reg_di_active_level 15
/* read-only registers */
-#define _gpio_block_reg_di 16
+#define _gpio_block_reg_di 16
#endif /* _gpio_block_defs_h_ */
* The definitions are taken from <system>_defs.h
*/
typedef enum hrt_isp_css_irq {
- hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
- hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
- hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
- hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
- hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
- hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
- hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
- hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
- hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
- hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
- hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
- hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
- hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
- hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
- hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
- hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
- hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+ hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+ hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+ hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+ hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+ hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
#ifdef _HIVE_ISP_CSS_2401_SYSTEM
- hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+ hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
#else
- hrt_isp_css_irq_isp_pmem_error = HIVE_GP_DEV_IRQ_ISP_PMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_isp_pmem_error = HIVE_GP_DEV_IRQ_ISP_PMEM_ERROR_BIT_ID,
#endif
- hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
- hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
- hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
- hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
- hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
- /* this must (obviously) be the last on in the enum */
- hrt_isp_css_irq_num_irqs
+ hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+ hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+ hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+ hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+ hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+ /* this must (obviously) be the last on in the enum */
+ hrt_isp_css_irq_num_irqs
} hrt_isp_css_irq_t;
typedef enum hrt_isp_css_irq_status {
- hrt_isp_css_irq_status_error,
- hrt_isp_css_irq_status_more_irqs,
- hrt_isp_css_irq_status_success
+ hrt_isp_css_irq_status_error,
+ hrt_isp_css_irq_status_more_irqs,
+ hrt_isp_css_irq_status_success
} hrt_isp_css_irq_status_t;
#endif /* _HIVE_ISP_CSS_IRQ_TYPES_HRT_H_ */
#define ISP_VMEM_ELEM_PRECISION 14
#define ISP_VMEM_IS_BAMEM 1
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
- #define ISP_VMEM_BAMEM_LATENCY 5
- #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
- #define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
- #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
- #define ISP_VMEM_BAMEM_LININT 0
- #define ISP_VMEM_BAMEM_DAP_BITS 3
- #define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
- #define ISP_VMEM_BAMEM_PID_BITS 3
- #define ISP_VMEM_BAMEM_OFFSET_BITS 19
- #define ISP_VMEM_BAMEM_ADDRESS_BITS 25
- #define ISP_VMEM_BAMEM_RID_BITS 4
- #define ISP_VMEM_BAMEM_TRANSPOSITION 1
- #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
- #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
- #define ISP_VMEM_BAMEM_LUT_ELEMS 16
- #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
- #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
- #define ISP_VMEM_BAMEM_SMART_FETCH 1
- #define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
+#define ISP_VMEM_BAMEM_LATENCY 5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
+#define ISP_VMEM_BAMEM_LININT 0
+#define ISP_VMEM_BAMEM_DAP_BITS 3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
+#define ISP_VMEM_BAMEM_PID_BITS 3
+#define ISP_VMEM_BAMEM_OFFSET_BITS 19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS 25
+#define ISP_VMEM_BAMEM_RID_BITS 4
+#define ISP_VMEM_BAMEM_TRANSPOSITION 1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS 16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
+#define ISP_VMEM_BAMEM_SMART_FETCH 1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_PMEM_DEPTH 2048
#define ISP_PMEM_WIDTH 640
#define ISP_SRU_GUARDING 1
#define ISP_VLSU_GUARDING 1
-#define ISP_VRF_RAM 1
-#define ISP_SRF_RAM 1
+#define ISP_VRF_RAM 1
+#define ISP_SRF_RAM 1
#define ISP_SPLIT_VMUL_VADD_IS 0
#define ISP_RFSPLIT_FPGA 0
#define ISP_VMEM_WIDTH 896
#define ISP_VMEM_ALIGN 128
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_ALIGN_ELEM 2
+#define ISP_VMEM_ALIGN_ELEM 2
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_SIMDLSU 1
#define ISP_LSU_IMM_BITS 12
#define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
#if ISP_HAS_HIST
- #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
- #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
#endif
#endif /* _isp2400_support_h */
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output0_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output1_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() leave:\n");
}
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#ifdef ISP2401
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#endif
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem);
#endif /* IA_CSS_INCLUDE_CONFIGURATION */
static void
ia_css_process_aa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
if (size) {
struct sh_css_isp_aa_params *t = (struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
t->strength = params->aa_config.strength;
}
}
static void
ia_css_process_anr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() enter:\n");
ia_css_anr_encode((struct sh_css_isp_anr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->anr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->anr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() leave:\n");
}
}
}
static void
ia_css_process_anr2(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() enter:\n");
ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->anr_thres,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->anr_thres,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() leave:\n");
}
}
}
static void
ia_css_process_bh(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
ia_css_bh_encode((struct sh_css_isp_bh_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
static void
ia_css_process_cnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() enter:\n");
ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() leave:\n");
}
}
}
static void
ia_css_process_crop(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() enter:\n");
ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->crop_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->crop_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() leave:\n");
}
}
}
static void
ia_css_process_csc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() enter:\n");
ia_css_csc_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() leave:\n");
}
}
}
static void
ia_css_process_dp(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
ia_css_dp_encode((struct sh_css_isp_dp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dp_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dp_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
}
static void
ia_css_process_bnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() enter:\n");
ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() leave:\n");
}
}
}
static void
ia_css_process_de(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
ia_css_de_encode((struct sh_css_isp_de_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->de_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->de_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
}
static void
ia_css_process_ecd(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() enter:\n");
ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ecd_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ecd_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() leave:\n");
}
}
}
static void
ia_css_process_formats(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() enter:\n");
ia_css_formats_encode((struct sh_css_isp_formats_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->formats_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->formats_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() leave:\n");
}
}
}
static void
ia_css_process_fpn(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() enter:\n");
ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fpn_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fpn_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() leave:\n");
}
}
}
static void
ia_css_process_gc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_encode((struct sh_css_isp_gc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->gc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->gc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->gc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->gc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
static void
ia_css_process_ce(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
ia_css_ce_encode((struct sh_css_isp_ce_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ce_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ce_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
}
static void
ia_css_process_yuv2rgb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() enter:\n");
ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yuv2rgb_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yuv2rgb_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() leave:\n");
}
}
}
static void
ia_css_process_rgb2yuv(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() enter:\n");
ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->rgb2yuv_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->rgb2yuv_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() leave:\n");
}
}
}
static void
ia_css_process_r_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() enter:\n");
ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->r_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->r_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() leave:\n");
}
}
}
static void
ia_css_process_g_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() enter:\n");
ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->g_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->g_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() leave:\n");
}
}
}
static void
ia_css_process_b_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() enter:\n");
ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
- ¶ms->b_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+ ¶ms->b_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() leave:\n");
}
}
}
static void
ia_css_process_uds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
if (size) {
struct sh_css_sp_uds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() enter:\n");
p = (struct sh_css_sp_uds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->crop_pos = params->uds_config.crop_pos;
p->uds = params->uds_config.uds;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() leave:\n");
}
}
}
static void
ia_css_process_raa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() enter:\n");
ia_css_raa_encode((struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->raa_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->raa_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() leave:\n");
}
}
}
static void
ia_css_process_s3a(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() enter:\n");
ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() leave:\n");
}
}
}
static void
ia_css_process_ob(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_encode((struct sh_css_isp_ob_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
static void
ia_css_process_output(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() enter:\n");
ia_css_output_encode((struct sh_css_isp_output_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->output_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->output_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() leave:\n");
}
}
}
static void
ia_css_process_sc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
ia_css_sc_encode((struct sh_css_isp_sc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->sc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->sc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
}
static void
ia_css_process_bds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
if (size) {
struct sh_css_isp_bds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() enter:\n");
p = (struct sh_css_isp_bds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->baf_strength = params->bds_config.strength;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() leave:\n");
}
}
}
static void
ia_css_process_tnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() enter:\n");
ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->tnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->tnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() leave:\n");
}
}
}
static void
ia_css_process_macc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() enter:\n");
ia_css_macc_encode((struct sh_css_isp_macc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->macc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->macc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() leave:\n");
}
}
}
static void
ia_css_process_sdis_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() enter:\n");
ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() enter:\n");
ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() enter:\n");
ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() enter:\n");
ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() enter:\n");
ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() enter:\n");
ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() enter:\n");
ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() enter:\n");
ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() leave:\n");
}
}
}
static void
ia_css_process_wb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
ia_css_wb_encode((struct sh_css_isp_wb_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->wb_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->wb_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
}
static void
ia_css_process_nr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
ia_css_nr_encode((struct sh_css_isp_ynr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
}
static void
ia_css_process_yee(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() enter:\n");
ia_css_yee_encode((struct sh_css_isp_yee_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yee_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yee_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() leave:\n");
}
}
}
static void
ia_css_process_ynr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() enter:\n");
ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ynr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ynr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() leave:\n");
}
}
}
static void
ia_css_process_fc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
ia_css_fc_encode((struct sh_css_isp_fc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
}
static void
ia_css_process_ctc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ctc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ctc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->ctc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->ctc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
}
static void
ia_css_process_xnr_table(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() enter:\n");
ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->xnr_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->xnr_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() leave:\n");
}
}
}
static void
ia_css_process_xnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() enter:\n");
ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() leave:\n");
}
}
}
static void
ia_css_process_xnr3(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#ifdef ISP2401
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#endif
/* Code generated by genparam/gencode.c:gen_param_process_table() */
void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params) = {
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params) = {
ia_css_process_aa,
ia_css_process_anr,
ia_css_process_anr2,
static void
ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dp_config *config){
+ struct ia_css_dp_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() enter: config=%p\n",
+ config);
*config = params->dp_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() leave\n");
ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config)
+ const struct ia_css_dp_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DP_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_dp_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_wb_config *config){
+ struct ia_css_wb_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() enter: config=%p\n",
+ config);
*config = params->wb_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() leave\n");
ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config)
+ const struct ia_css_wb_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_WB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_wb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_tnr_config *config){
+ struct ia_css_tnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() enter: config=%p\n",
+ config);
*config = params->tnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() leave\n");
ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config)
+ const struct ia_css_tnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_TNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_tnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ob_config *config){
+ struct ia_css_ob_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() enter: config=%p\n",
+ config);
*config = params->ob_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() leave\n");
ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config)
+ const struct ia_css_ob_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ob_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_de_config(const struct ia_css_isp_parameters *params,
- struct ia_css_de_config *config){
+ struct ia_css_de_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() enter: config=%p\n",
+ config);
*config = params->de_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() leave\n");
ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config)
+ const struct ia_css_de_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_de_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_config *config){
+ struct ia_css_anr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() enter: config=%p\n",
+ config);
*config = params->anr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() leave\n");
ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config)
+ const struct ia_css_anr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_thres *config){
+ struct ia_css_anr_thres *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() enter: config=%p\n",
+ config);
*config = params->anr_thres;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() leave\n");
ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config)
+ const struct ia_css_anr_thres *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR2_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr2_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ce_config *config){
+ struct ia_css_ce_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() enter: config=%p\n",
+ config);
*config = params->ce_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() leave\n");
ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config)
+ const struct ia_css_ce_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ce_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ecd_config *config){
+ struct ia_css_ecd_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() enter: config=%p\n",
+ config);
*config = params->ecd_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() leave\n");
ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config)
+ const struct ia_css_ecd_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ECD_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ecd_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ynr_config *config){
+ struct ia_css_ynr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() enter: config=%p\n",
+ config);
*config = params->ynr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() leave\n");
ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config)
+ const struct ia_css_ynr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ynr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_fc_config *config){
+ struct ia_css_fc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() enter: config=%p\n",
+ config);
*config = params->fc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() leave\n");
ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config)
+ const struct ia_css_fc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_fc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cnr_config *config){
+ struct ia_css_cnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() enter: config=%p\n",
+ config);
*config = params->cnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() leave\n");
ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config)
+ const struct ia_css_cnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_cnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_macc_config *config){
+ struct ia_css_macc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() enter: config=%p\n",
+ config);
*config = params->macc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() leave\n");
ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config)
+ const struct ia_css_macc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_MACC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_macc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ctc_config *config){
+ struct ia_css_ctc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() enter: config=%p\n",
+ config);
*config = params->ctc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() leave\n");
ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config)
+ const struct ia_css_ctc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CTC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ctc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
- struct ia_css_aa_config *config){
+ struct ia_css_aa_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() enter: config=%p\n",
+ config);
*config = params->aa_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() leave\n");
}
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config)
+ const struct ia_css_aa_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_AA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_aa_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+ config);
*config = params->yuv2rgb_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() leave\n");
ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YUV2RGB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_yuv2rgb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+ config);
*config = params->rgb2yuv_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() leave\n");
ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_RGB2YUV_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_rgb2yuv_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() enter: config=%p\n",
+ config);
*config = params->cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() leave\n");
ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CSC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_csc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_nr_config *config){
+ struct ia_css_nr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() enter: config=%p\n",
+ config);
*config = params->nr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() leave\n");
ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config)
+ const struct ia_css_nr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_NR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_nr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_gc_config *config){
+ struct ia_css_gc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() enter: config=%p\n",
+ config);
*config = params->gc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() leave\n");
ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config)
+ const struct ia_css_gc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_GC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_gc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() leave\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horicoef_config() enter:\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() leave\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertcoef_config() enter:\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() leave\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horiproj_config() enter:\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() leave\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertproj_config() enter:\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() leave\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horicoef_config() enter:\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() leave\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertcoef_config() enter:\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() leave\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horiproj_config() enter:\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() leave\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertproj_config() enter:\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() enter: config=%p\n",
+ config);
*config = params->r_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() leave\n");
ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_R_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_r_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() enter: config=%p\n",
+ config);
*config = params->g_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() leave\n");
ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_G_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_g_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() enter: config=%p\n",
+ config);
*config = params->b_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() leave\n");
ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_B_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_b_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_table *config){
+ struct ia_css_xnr_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() enter: config=%p\n",
+ config);
*config = params->xnr_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() leave\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config)
+ const struct ia_css_xnr_table *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_xnr_table_config() enter:\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->xnr_table = *config;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_table_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
- struct ia_css_formats_config *config){
+ struct ia_css_formats_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() enter: config=%p\n",
+ config);
*config = params->formats_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() leave\n");
ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config)
+ const struct ia_css_formats_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FORMATS_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_formats_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_config *config){
+ struct ia_css_xnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() enter: config=%p\n",
+ config);
*config = params->xnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() leave\n");
ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config)
+ const struct ia_css_xnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr3_config *config){
+ struct ia_css_xnr3_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() enter: config=%p\n",
+ config);
*config = params->xnr3_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() leave\n");
ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config)
+ const struct ia_css_xnr3_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR3_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr3_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
- struct ia_css_3a_config *config){
+ struct ia_css_3a_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() enter: config=%p\n",
+ config);
*config = params->s3a_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() leave\n");
ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config)
+ const struct ia_css_3a_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_S3A_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_s3a_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_output_config(const struct ia_css_isp_parameters *params,
- struct ia_css_output_config *config){
+ struct ia_css_output_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() enter: config=%p\n",
+ config);
*config = params->output_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() leave\n");
ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config)
+ const struct ia_css_output_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OUTPUT_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_output_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_get_dp_config(params, config->dp_config);
ia_css_get_wb_config(params, config->wb_config);
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_set_dp_config(params, config->dp_config);
ia_css_set_wb_config(params, config->wb_config);
struct ia_css_pipeline_stage; /* forward declaration */
extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params);
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config);
+ const struct ia_css_dp_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config);
+ const struct ia_css_wb_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config);
+ const struct ia_css_tnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config);
+ const struct ia_css_ob_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config);
+ const struct ia_css_de_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config);
+ const struct ia_css_anr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config);
+ const struct ia_css_anr_thres *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config);
+ const struct ia_css_ce_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config);
+ const struct ia_css_ecd_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config);
+ const struct ia_css_ynr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config);
+ const struct ia_css_fc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config);
+ const struct ia_css_cnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config);
+ const struct ia_css_macc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config);
+ const struct ia_css_ctc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config);
+ const struct ia_css_aa_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config);
+ const struct ia_css_nr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config);
+ const struct ia_css_gc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config);
+ const struct ia_css_xnr_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config);
+ const struct ia_css_formats_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config);
+ const struct ia_css_xnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config);
+ const struct ia_css_xnr3_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config);
+ const struct ia_css_3a_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config);
+ const struct ia_css_output_config *config);
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
static void
ia_css_initialize_aa_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.aa.size;
unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
if (size)
- memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+ memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ 0, size);
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
if (size) {
ia_css_init_cnr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr2_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
if (size) {
ia_css_init_cnr2_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_dp_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.dp.size;
if (size) {
ia_css_init_dp_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_de_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.de.size;
if (size) {
ia_css_init_de_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_tnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
if (size) {
ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ref_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.ref.size;
if (size) {
ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ynr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
if (size) {
ia_css_init_ynr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary) = {
ia_css_initialize_aa_state,
ia_css_initialize_cnr_state,
ia_css_initialize_cnr2_state,
#include "ia_css_binary.h" /* struct ia_css_binary */
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary);
#endif /* IA_CSS_INCLUDE_STATE */
* Refer to "csi_rx_public.h" for details.
*/
static inline void csi_rx_fe_ctrl_get_state(
- const csi_rx_frontend_ID_t ID,
- csi_rx_fe_ctrl_state_t *state)
+ const csi_rx_frontend_ID_t ID,
+ csi_rx_fe_ctrl_state_t *state)
{
u32 i;
state->enable =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ENABLE_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ENABLE_REG_IDX);
state->nof_enable_lanes =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_NOF_ENABLED_LANES_REG_IDX);
state->error_handling =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ERROR_HANDLING_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_ERROR_HANDLING_REG_IDX);
state->status =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_REG_IDX);
state->status_dlane_hs =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_HS_REG_IDX);
state->status_dlane_lp =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_STATUS_DLANE_LP_REG_IDX);
state->clane.termen =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_CLANE_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_CLANE_REG_IDX);
state->clane.settle =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_CLANE_REG_IDX);
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_CLANE_REG_IDX);
/*
* Get the values of the register-set per
*/
for (i = 0; i < N_CSI_RX_FE_CTRL_DLANES[ID]; i++) {
csi_rx_fe_ctrl_get_dlane_state(
- ID,
- i,
- &state->dlane[i]);
+ ID,
+ i,
+ &state->dlane[i]);
}
}
* Refer to "csi_rx_public.h" for details.
*/
static inline void csi_rx_fe_ctrl_get_dlane_state(
- const csi_rx_frontend_ID_t ID,
- const u32 lane,
- csi_rx_fe_ctrl_lane_t *dlane_state)
+ const csi_rx_frontend_ID_t ID,
+ const u32 lane,
+ csi_rx_fe_ctrl_lane_t *dlane_state)
{
dlane_state->termen =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane));
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_TERMEN_DLANE_REG_IDX(lane));
dlane_state->settle =
- csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane));
+ csi_rx_fe_ctrl_reg_load(ID, _HRT_CSI_RX_DLY_CNT_SETTLE_DLANE_REG_IDX(lane));
}
/**
* Refer to "csi_rx_public.h" for details.
*/
static inline void csi_rx_fe_ctrl_dump_state(
- const csi_rx_frontend_ID_t ID,
- csi_rx_fe_ctrl_state_t *state)
+ const csi_rx_frontend_ID_t ID,
+ csi_rx_fe_ctrl_state_t *state)
{
u32 i;
- ia_css_print("CSI RX FE STATE Controller %d Enable state 0x%x\n", ID, state->enable);
- ia_css_print("CSI RX FE STATE Controller %d No Of enable lanes 0x%x\n", ID, state->nof_enable_lanes);
- ia_css_print("CSI RX FE STATE Controller %d Error handling 0x%x\n", ID, state->error_handling);
+ ia_css_print("CSI RX FE STATE Controller %d Enable state 0x%x\n", ID,
+ state->enable);
+ ia_css_print("CSI RX FE STATE Controller %d No Of enable lanes 0x%x\n", ID,
+ state->nof_enable_lanes);
+ ia_css_print("CSI RX FE STATE Controller %d Error handling 0x%x\n", ID,
+ state->error_handling);
ia_css_print("CSI RX FE STATE Controller %d Status 0x%x\n", ID, state->status);
- ia_css_print("CSI RX FE STATE Controller %d Status Dlane HS 0x%x\n", ID, state->status_dlane_hs);
- ia_css_print("CSI RX FE STATE Controller %d Status Dlane LP 0x%x\n", ID, state->status_dlane_lp);
- ia_css_print("CSI RX FE STATE Controller %d Status term enable LP 0x%x\n", ID, state->clane.termen);
- ia_css_print("CSI RX FE STATE Controller %d Status term settle LP 0x%x\n", ID, state->clane.settle);
+ ia_css_print("CSI RX FE STATE Controller %d Status Dlane HS 0x%x\n", ID,
+ state->status_dlane_hs);
+ ia_css_print("CSI RX FE STATE Controller %d Status Dlane LP 0x%x\n", ID,
+ state->status_dlane_lp);
+ ia_css_print("CSI RX FE STATE Controller %d Status term enable LP 0x%x\n", ID,
+ state->clane.termen);
+ ia_css_print("CSI RX FE STATE Controller %d Status term settle LP 0x%x\n", ID,
+ state->clane.settle);
/*
* Get the values of the register-set per
* dlane.
*/
for (i = 0; i < N_CSI_RX_FE_CTRL_DLANES[ID]; i++) {
- ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d termen 0x%x\n", ID, i, state->dlane[i].termen);
- ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d settle 0x%x\n", ID, i, state->dlane[i].settle);
+ ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d termen 0x%x\n", ID, i,
+ state->dlane[i].termen);
+ ia_css_print("CSI RX FE STATE Controller %d DLANE ID %d settle 0x%x\n", ID, i,
+ state->dlane[i].settle);
}
}
* Refer to "csi_rx_public.h" for details.
*/
static inline void csi_rx_be_ctrl_get_state(
- const csi_rx_backend_ID_t ID,
- csi_rx_be_ctrl_state_t *state)
+ const csi_rx_backend_ID_t ID,
+ csi_rx_be_ctrl_state_t *state)
{
u32 i;
state->enable =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_ENABLE_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_ENABLE_REG_IDX);
state->status =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_STATUS_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_STATUS_REG_IDX);
for (i = 0; i < N_CSI_RX_BE_MIPI_COMP_FMT_REG ; i++) {
state->comp_format_reg[i] =
- csi_rx_be_ctrl_reg_load(ID,
- _HRT_MIPI_BACKEND_COMP_FORMAT_REG0_IDX + i);
+ csi_rx_be_ctrl_reg_load(ID,
+ _HRT_MIPI_BACKEND_COMP_FORMAT_REG0_IDX + i);
}
state->raw16 =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW16_CONFIG_REG_IDX);
state->raw18 =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW18_CONFIG_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_RAW18_CONFIG_REG_IDX);
state->force_raw8 =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_FORCE_RAW8_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_FORCE_RAW8_REG_IDX);
state->irq_status =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_IRQ_STATUS_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_IRQ_STATUS_REG_IDX);
#if 0 /* device access error for these registers */
/* ToDo: rootcause this failure */
state->custom_mode_enable =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_EN_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_EN_REG_IDX);
state->custom_mode_data_state =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_DATA_STATE_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_DATA_STATE_REG_IDX);
for (i = 0; i < N_CSI_RX_BE_MIPI_CUSTOM_PEC ; i++) {
state->pec[i] =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P0_REG_IDX + i);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_EXT_S0P0_REG_IDX + i);
}
state->custom_mode_valid_eop_config =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_CUST_PIX_VALID_EOP_REG_IDX);
#endif
state->global_lut_disregard_reg =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_GLOBAL_LUT_DISREGARD_REG_IDX);
state->packet_status_stall =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_IDX);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_PKT_STALL_STATUS_REG_IDX);
/*
* Get the values of the register-set per
* lut.
*/
for (i = 0; i < N_SHORT_PACKET_LUT_ENTRIES[ID]; i++) {
state->short_packet_lut_entry[i] =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX + i);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_SP_LUT_ENTRY_0_REG_IDX + i);
}
for (i = 0; i < N_LONG_PACKET_LUT_ENTRIES[ID]; i++) {
state->long_packet_lut_entry[i] =
- csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_LP_LUT_ENTRY_0_REG_IDX + i);
+ csi_rx_be_ctrl_reg_load(ID, _HRT_MIPI_BACKEND_LP_LUT_ENTRY_0_REG_IDX + i);
}
}
* Refer to "csi_rx_public.h" for details.
*/
static inline void csi_rx_be_ctrl_dump_state(
- const csi_rx_backend_ID_t ID,
- csi_rx_be_ctrl_state_t *state)
+ const csi_rx_backend_ID_t ID,
+ csi_rx_be_ctrl_state_t *state)
{
u32 i;
ia_css_print("CSI RX BE STATE Controller %d Status 0x%x\n", ID, state->status);
for (i = 0; i < N_CSI_RX_BE_MIPI_COMP_FMT_REG ; i++) {
- ia_css_print("CSI RX BE STATE Controller %d comp format reg vc%d value 0x%x\n", ID, i, state->status);
+ ia_css_print("CSI RX BE STATE Controller %d comp format reg vc%d value 0x%x\n",
+ ID, i, state->status);
}
ia_css_print("CSI RX BE STATE Controller %d RAW16 0x%x\n", ID, state->raw16);
ia_css_print("CSI RX BE STATE Controller %d RAW18 0x%x\n", ID, state->raw18);
- ia_css_print("CSI RX BE STATE Controller %d Force RAW8 0x%x\n", ID, state->force_raw8);
- ia_css_print("CSI RX BE STATE Controller %d IRQ state 0x%x\n", ID, state->irq_status);
+ ia_css_print("CSI RX BE STATE Controller %d Force RAW8 0x%x\n", ID,
+ state->force_raw8);
+ ia_css_print("CSI RX BE STATE Controller %d IRQ state 0x%x\n", ID,
+ state->irq_status);
#if 0 /* ToDo:Getting device access error for this register */
for (i = 0; i < N_CSI_RX_BE_MIPI_CUSTOM_PEC ; i++) {
- ia_css_print("CSI RX BE STATE Controller %d PEC ID %d custom pec 0x%x\n", ID, i, state->pec[i]);
+ ia_css_print("CSI RX BE STATE Controller %d PEC ID %d custom pec 0x%x\n", ID, i,
+ state->pec[i]);
}
#endif
- ia_css_print("CSI RX BE STATE Controller %d Global LUT disregard reg 0x%x\n", ID, state->global_lut_disregard_reg);
- ia_css_print("CSI RX BE STATE Controller %d packet stall reg 0x%x\n", ID, state->packet_status_stall);
+ ia_css_print("CSI RX BE STATE Controller %d Global LUT disregard reg 0x%x\n",
+ ID, state->global_lut_disregard_reg);
+ ia_css_print("CSI RX BE STATE Controller %d packet stall reg 0x%x\n", ID,
+ state->packet_status_stall);
/*
* Get the values of the register-set per
* lut.
*/
for (i = 0; i < N_SHORT_PACKET_LUT_ENTRIES[ID]; i++) {
- ia_css_print("CSI RX BE STATE Controller ID %d Short packat entry %d shart packet lut id 0x%x\n", ID, i, state->short_packet_lut_entry[i]);
+ ia_css_print("CSI RX BE STATE Controller ID %d Short packat entry %d shart packet lut id 0x%x\n",
+ ID, i,
+ state->short_packet_lut_entry[i]);
}
for (i = 0; i < N_LONG_PACKET_LUT_ENTRIES[ID]; i++) {
- ia_css_print("CSI RX BE STATE Controller ID %d Long packat entry %d Long packet lut id 0x%x\n", ID, i, state->long_packet_lut_entry[i]);
+ ia_css_print("CSI RX BE STATE Controller ID %d Long packat entry %d Long packet lut id 0x%x\n",
+ ID, i,
+ state->long_packet_lut_entry[i]);
}
}
* Refer to "csi_rx_public.h" for details.
*/
static inline hrt_data csi_rx_fe_ctrl_reg_load(
- const csi_rx_frontend_ID_t ID,
- const hrt_address reg)
+ const csi_rx_frontend_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_CSI_RX_FRONTEND_ID);
assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);
- return ia_css_device_load_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(
+ hrt_data));
}
/**
* Refer to "ibuf_ctrl_public.h" for details.
*/
static inline void csi_rx_fe_ctrl_reg_store(
- const csi_rx_frontend_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const csi_rx_frontend_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_CSI_RX_FRONTEND_ID);
assert(CSI_RX_FE_CTRL_BASE[ID] != (hrt_address)-1);
- ia_css_device_store_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(CSI_RX_FE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+ value);
}
/**
* Refer to "csi_rx_public.h" for details.
*/
static inline hrt_data csi_rx_be_ctrl_reg_load(
- const csi_rx_backend_ID_t ID,
- const hrt_address reg)
+ const csi_rx_backend_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_CSI_RX_BACKEND_ID);
assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);
- return ia_css_device_load_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(
+ hrt_data));
}
/**
* Refer to "ibuf_ctrl_public.h" for details.
*/
static inline void csi_rx_be_ctrl_reg_store(
- const csi_rx_backend_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const csi_rx_backend_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_CSI_RX_BACKEND_ID);
assert(CSI_RX_BE_CTRL_BASE[ID] != (hrt_address)-1);
- ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+ value);
}
/* end of DLI */
* Refer to "ibuf_ctrl_public.h" for details.
*/
STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_state(
- const ibuf_ctrl_ID_t ID,
- ibuf_ctrl_state_t *state)
+ const ibuf_ctrl_ID_t ID,
+ ibuf_ctrl_state_t *state)
{
u32 i;
state->recalc_words =
- ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_RECALC_WORDS_STATUS);
+ ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_RECALC_WORDS_STATUS);
state->arbiters =
- ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_ARBITERS_STATUS);
+ ibuf_ctrl_reg_load(ID, _IBUF_CNTRL_ARBITERS_STATUS);
/*
* Get the values of the register-set per
*/
for (i = 0; i < N_IBUF_CTRL_PROCS[ID]; i++) {
ibuf_ctrl_get_proc_state(
- ID,
- i,
- &state->proc_state[i]);
+ ID,
+ i,
+ &state->proc_state[i]);
}
}
* Refer to "ibuf_ctrl_public.h" for details.
*/
STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_get_proc_state(
- const ibuf_ctrl_ID_t ID,
- const u32 proc_id,
- ibuf_ctrl_proc_state_t *state)
+ const ibuf_ctrl_ID_t ID,
+ const u32 proc_id,
+ ibuf_ctrl_proc_state_t *state)
{
hrt_address reg_bank_offset;
reg_bank_offset =
- _IBUF_CNTRL_PROC_REG_ALIGN * (1 + proc_id);
+ _IBUF_CNTRL_PROC_REG_ALIGN * (1 + proc_id);
state->num_items =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_ITEMS_PER_STORE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_ITEMS_PER_STORE);
state->num_stores =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_STORES_PER_FRAME);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_NUM_STORES_PER_FRAME);
state->dma_channel =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CHANNEL);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CHANNEL);
state->dma_command =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CMD);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_CMD);
state->ibuf_st_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_START_ADDRESS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_START_ADDRESS);
state->ibuf_stride =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_STRIDE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_STRIDE);
state->ibuf_end_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_END_ADDRESS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_BUFFER_END_ADDRESS);
state->dest_st_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_START_ADDRESS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_START_ADDRESS);
state->dest_stride =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_STRIDE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_STRIDE);
state->dest_end_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_END_ADDRESS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DEST_END_ADDRESS);
state->sync_frame =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SYNC_FRAME);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SYNC_FRAME);
state->sync_command =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_SYNC_CMD);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_SYNC_CMD);
state->store_command =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_STORE_CMD);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_STR2MMIO_STORE_CMD);
state->shift_returned_items =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SHIFT_ITEMS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_SHIFT_ITEMS);
state->elems_ibuf =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_IBUF);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_IBUF);
state->elems_dest =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_DEST);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ELEMS_P_WORD_DEST);
state->cur_stores =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_STORES);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_STORES);
state->cur_acks =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ACKS);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ACKS);
state->cur_s2m_ibuf_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_S2M_IBUF_ADDR);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_S2M_IBUF_ADDR);
state->cur_dma_ibuf_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_IBUF_ADDR);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_IBUF_ADDR);
state->cur_dma_dest_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_DEST_ADDR);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_DMA_DEST_ADDR);
state->cur_isp_dest_addr =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ISP_DEST_ADDR);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_ISP_DEST_ADDR);
state->dma_cmds_send =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_NR_DMA_CMDS_SEND);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_CUR_NR_DMA_CMDS_SEND);
state->main_cntrl_state =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_MAIN_CNTRL_STATE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_MAIN_CNTRL_STATE);
state->dma_sync_state =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_SYNC_STATE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_DMA_SYNC_STATE);
state->isp_sync_state =
- ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ISP_SYNC_STATE);
+ ibuf_ctrl_reg_load(ID, reg_bank_offset + _IBUF_CNTRL_ISP_SYNC_STATE);
}
/**
* Refer to "ibuf_ctrl_public.h" for details.
*/
STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state(
- const ibuf_ctrl_ID_t ID,
- ibuf_ctrl_state_t *state)
+ const ibuf_ctrl_ID_t ID,
+ ibuf_ctrl_state_t *state)
{
u32 i;
- ia_css_print("IBUF controller ID %d recalculate words 0x%x\n", ID, state->recalc_words);
+ ia_css_print("IBUF controller ID %d recalculate words 0x%x\n", ID,
+ state->recalc_words);
ia_css_print("IBUF controller ID %d arbiters 0x%x\n", ID, state->arbiters);
/*
* ibuf-controller process.
*/
for (i = 0; i < N_IBUF_CTRL_PROCS[ID]; i++) {
- ia_css_print("IBUF controller ID %d Process ID %d num_items 0x%x\n", ID, i, state->proc_state[i].num_items);
- ia_css_print("IBUF controller ID %d Process ID %d num_stores 0x%x\n", ID, i, state->proc_state[i].num_stores);
- ia_css_print("IBUF controller ID %d Process ID %d dma_channel 0x%x\n", ID, i, state->proc_state[i].dma_channel);
- ia_css_print("IBUF controller ID %d Process ID %d dma_command 0x%x\n", ID, i, state->proc_state[i].dma_command);
- ia_css_print("IBUF controller ID %d Process ID %d ibuf_st_addr 0x%x\n", ID, i, state->proc_state[i].ibuf_st_addr);
- ia_css_print("IBUF controller ID %d Process ID %d ibuf_stride 0x%x\n", ID, i, state->proc_state[i].ibuf_stride);
- ia_css_print("IBUF controller ID %d Process ID %d ibuf_end_addr 0x%x\n", ID, i, state->proc_state[i].ibuf_end_addr);
- ia_css_print("IBUF controller ID %d Process ID %d dest_st_addr 0x%x\n", ID, i, state->proc_state[i].dest_st_addr);
- ia_css_print("IBUF controller ID %d Process ID %d dest_stride 0x%x\n", ID, i, state->proc_state[i].dest_stride);
- ia_css_print("IBUF controller ID %d Process ID %d dest_end_addr 0x%x\n", ID, i, state->proc_state[i].dest_end_addr);
- ia_css_print("IBUF controller ID %d Process ID %d sync_frame 0x%x\n", ID, i, state->proc_state[i].sync_frame);
- ia_css_print("IBUF controller ID %d Process ID %d sync_command 0x%x\n", ID, i, state->proc_state[i].sync_command);
- ia_css_print("IBUF controller ID %d Process ID %d store_command 0x%x\n", ID, i, state->proc_state[i].store_command);
- ia_css_print("IBUF controller ID %d Process ID %d shift_returned_items 0x%x\n", ID, i, state->proc_state[i].shift_returned_items);
- ia_css_print("IBUF controller ID %d Process ID %d elems_ibuf 0x%x\n", ID, i, state->proc_state[i].elems_ibuf);
- ia_css_print("IBUF controller ID %d Process ID %d elems_dest 0x%x\n", ID, i, state->proc_state[i].elems_dest);
- ia_css_print("IBUF controller ID %d Process ID %d cur_stores 0x%x\n", ID, i, state->proc_state[i].cur_stores);
- ia_css_print("IBUF controller ID %d Process ID %d cur_acks 0x%x\n", ID, i, state->proc_state[i].cur_acks);
- ia_css_print("IBUF controller ID %d Process ID %d cur_s2m_ibuf_addr 0x%x\n", ID, i, state->proc_state[i].cur_s2m_ibuf_addr);
- ia_css_print("IBUF controller ID %d Process ID %d cur_dma_ibuf_addr 0x%x\n", ID, i, state->proc_state[i].cur_dma_ibuf_addr);
- ia_css_print("IBUF controller ID %d Process ID %d cur_dma_dest_addr 0x%x\n", ID, i, state->proc_state[i].cur_dma_dest_addr);
- ia_css_print("IBUF controller ID %d Process ID %d cur_isp_dest_addr 0x%x\n", ID, i, state->proc_state[i].cur_isp_dest_addr);
- ia_css_print("IBUF controller ID %d Process ID %d dma_cmds_send 0x%x\n", ID, i, state->proc_state[i].dma_cmds_send);
- ia_css_print("IBUF controller ID %d Process ID %d main_cntrl_state 0x%x\n", ID, i, state->proc_state[i].main_cntrl_state);
- ia_css_print("IBUF controller ID %d Process ID %d dma_sync_state 0x%x\n", ID, i, state->proc_state[i].dma_sync_state);
- ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i, state->proc_state[i].isp_sync_state);
+ ia_css_print("IBUF controller ID %d Process ID %d num_items 0x%x\n", ID, i,
+ state->proc_state[i].num_items);
+ ia_css_print("IBUF controller ID %d Process ID %d num_stores 0x%x\n", ID, i,
+ state->proc_state[i].num_stores);
+ ia_css_print("IBUF controller ID %d Process ID %d dma_channel 0x%x\n", ID, i,
+ state->proc_state[i].dma_channel);
+ ia_css_print("IBUF controller ID %d Process ID %d dma_command 0x%x\n", ID, i,
+ state->proc_state[i].dma_command);
+ ia_css_print("IBUF controller ID %d Process ID %d ibuf_st_addr 0x%x\n", ID, i,
+ state->proc_state[i].ibuf_st_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d ibuf_stride 0x%x\n", ID, i,
+ state->proc_state[i].ibuf_stride);
+ ia_css_print("IBUF controller ID %d Process ID %d ibuf_end_addr 0x%x\n", ID, i,
+ state->proc_state[i].ibuf_end_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d dest_st_addr 0x%x\n", ID, i,
+ state->proc_state[i].dest_st_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d dest_stride 0x%x\n", ID, i,
+ state->proc_state[i].dest_stride);
+ ia_css_print("IBUF controller ID %d Process ID %d dest_end_addr 0x%x\n", ID, i,
+ state->proc_state[i].dest_end_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d sync_frame 0x%x\n", ID, i,
+ state->proc_state[i].sync_frame);
+ ia_css_print("IBUF controller ID %d Process ID %d sync_command 0x%x\n", ID, i,
+ state->proc_state[i].sync_command);
+ ia_css_print("IBUF controller ID %d Process ID %d store_command 0x%x\n", ID, i,
+ state->proc_state[i].store_command);
+ ia_css_print("IBUF controller ID %d Process ID %d shift_returned_items 0x%x\n",
+ ID, i,
+ state->proc_state[i].shift_returned_items);
+ ia_css_print("IBUF controller ID %d Process ID %d elems_ibuf 0x%x\n", ID, i,
+ state->proc_state[i].elems_ibuf);
+ ia_css_print("IBUF controller ID %d Process ID %d elems_dest 0x%x\n", ID, i,
+ state->proc_state[i].elems_dest);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_stores 0x%x\n", ID, i,
+ state->proc_state[i].cur_stores);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_acks 0x%x\n", ID, i,
+ state->proc_state[i].cur_acks);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_s2m_ibuf_addr 0x%x\n", ID,
+ i,
+ state->proc_state[i].cur_s2m_ibuf_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_dma_ibuf_addr 0x%x\n", ID,
+ i,
+ state->proc_state[i].cur_dma_ibuf_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_dma_dest_addr 0x%x\n", ID,
+ i,
+ state->proc_state[i].cur_dma_dest_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d cur_isp_dest_addr 0x%x\n", ID,
+ i,
+ state->proc_state[i].cur_isp_dest_addr);
+ ia_css_print("IBUF controller ID %d Process ID %d dma_cmds_send 0x%x\n", ID, i,
+ state->proc_state[i].dma_cmds_send);
+ ia_css_print("IBUF controller ID %d Process ID %d main_cntrl_state 0x%x\n", ID,
+ i,
+ state->proc_state[i].main_cntrl_state);
+ ia_css_print("IBUF controller ID %d Process ID %d dma_sync_state 0x%x\n", ID, i,
+ state->proc_state[i].dma_sync_state);
+ ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i,
+ state->proc_state[i].isp_sync_state);
}
}
* Refer to "ibuf_ctrl_public.h" for details.
*/
STORAGE_CLASS_IBUF_CTRL_C hrt_data ibuf_ctrl_reg_load(
- const ibuf_ctrl_ID_t ID,
- const hrt_address reg)
+ const ibuf_ctrl_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_IBUF_CTRL_ID);
assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
* Refer to "ibuf_ctrl_public.h" for details.
*/
STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_reg_store(
- const ibuf_ctrl_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const ibuf_ctrl_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_IBUF_CTRL_ID);
assert(IBUF_CTRL_BASE[ID] != (hrt_address)-1);
#include "input_system_public.h"
STORAGE_CLASS_INPUT_SYSTEM_C input_system_err_t input_system_get_state(
- const input_system_ID_t ID,
- input_system_state_t *state)
+ const input_system_ID_t ID,
+ input_system_state_t *state)
{
u32 i;
/* get the states of all CSI RX frontend devices */
for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
csi_rx_fe_ctrl_get_state(
- (csi_rx_frontend_ID_t)i,
- &state->csi_rx_fe_ctrl_state[i]);
+ (csi_rx_frontend_ID_t)i,
+ &state->csi_rx_fe_ctrl_state[i]);
}
/* get the states of all CIS RX backend devices */
for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
csi_rx_be_ctrl_get_state(
- (csi_rx_backend_ID_t)i,
- &state->csi_rx_be_ctrl_state[i]);
+ (csi_rx_backend_ID_t)i,
+ &state->csi_rx_be_ctrl_state[i]);
}
/* get the states of all pixelgen devices */
for (i = 0; i < N_PIXELGEN_ID; i++) {
pixelgen_ctrl_get_state(
- (pixelgen_ID_t)i,
- &state->pixelgen_ctrl_state[i]);
+ (pixelgen_ID_t)i,
+ &state->pixelgen_ctrl_state[i]);
}
/* get the states of all stream2mmio devices */
for (i = 0; i < N_STREAM2MMIO_ID; i++) {
stream2mmio_get_state(
- (stream2mmio_ID_t)i,
- &state->stream2mmio_state[i]);
+ (stream2mmio_ID_t)i,
+ &state->stream2mmio_state[i]);
}
/* get the states of all ibuf-controller devices */
for (i = 0; i < N_IBUF_CTRL_ID; i++) {
ibuf_ctrl_get_state(
- (ibuf_ctrl_ID_t)i,
- &state->ibuf_ctrl_state[i]);
+ (ibuf_ctrl_ID_t)i,
+ &state->ibuf_ctrl_state[i]);
}
/* get the states of all isys irq controllers */
}
STORAGE_CLASS_INPUT_SYSTEM_C void input_system_dump_state(
- const input_system_ID_t ID,
- input_system_state_t *state)
+ const input_system_ID_t ID,
+ input_system_state_t *state)
{
u32 i;
/* dump the states of all CSI RX frontend devices */
for (i = 0; i < N_CSI_RX_FRONTEND_ID; i++) {
csi_rx_fe_ctrl_dump_state(
- (csi_rx_frontend_ID_t)i,
- &state->csi_rx_fe_ctrl_state[i]);
+ (csi_rx_frontend_ID_t)i,
+ &state->csi_rx_fe_ctrl_state[i]);
}
/* dump the states of all CIS RX backend devices */
for (i = 0; i < N_CSI_RX_BACKEND_ID; i++) {
csi_rx_be_ctrl_dump_state(
- (csi_rx_backend_ID_t)i,
- &state->csi_rx_be_ctrl_state[i]);
+ (csi_rx_backend_ID_t)i,
+ &state->csi_rx_be_ctrl_state[i]);
}
/* dump the states of all pixelgen devices */
for (i = 0; i < N_PIXELGEN_ID; i++) {
pixelgen_ctrl_dump_state(
- (pixelgen_ID_t)i,
- &state->pixelgen_ctrl_state[i]);
+ (pixelgen_ID_t)i,
+ &state->pixelgen_ctrl_state[i]);
}
/* dump the states of all st2mmio devices */
for (i = 0; i < N_STREAM2MMIO_ID; i++) {
stream2mmio_dump_state(
- (stream2mmio_ID_t)i,
- &state->stream2mmio_state[i]);
+ (stream2mmio_ID_t)i,
+ &state->stream2mmio_state[i]);
}
/* dump the states of all ibuf-controller devices */
for (i = 0; i < N_IBUF_CTRL_ID; i++) {
ibuf_ctrl_dump_state(
- (ibuf_ctrl_ID_t)i,
- &state->ibuf_ctrl_state[i]);
+ (ibuf_ctrl_ID_t)i,
+ &state->ibuf_ctrl_state[i]);
}
/* dump the states of all isys irq controllers */
};
void isys2401_dma_set_max_burst_size(
- const isys2401_dma_ID_t dma_id,
- uint32_t max_burst_size)
+ const isys2401_dma_ID_t dma_id,
+ uint32_t max_burst_size)
{
assert(dma_id < N_ISYS2401_DMA_ID);
assert((max_burst_size > 0x00) && (max_burst_size <= 0xFF));
isys2401_dma_reg_store(dma_id,
- DMA_DEV_INFO_REG_IDX(_DMA_V2_DEV_INTERF_MAX_BURST_IDX, HIVE_DMA_BUS_DDR_CONN),
- (max_burst_size - 1));
+ DMA_DEV_INFO_REG_IDX(_DMA_V2_DEV_INTERF_MAX_BURST_IDX, HIVE_DMA_BUS_DDR_CONN),
+ (max_burst_size - 1));
}
#include "print_support.h"
STORAGE_CLASS_ISYS2401_DMA_C void isys2401_dma_reg_store(
- const isys2401_dma_ID_t dma_id,
- const unsigned int reg,
- const hrt_data value)
+ const isys2401_dma_ID_t dma_id,
+ const unsigned int reg,
+ const hrt_data value)
{
unsigned int reg_loc;
reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
- ia_css_print("isys dma store at addr(0x%x) val(%u)\n", reg_loc, (unsigned int)value);
+ ia_css_print("isys dma store at addr(0x%x) val(%u)\n", reg_loc,
+ (unsigned int)value);
ia_css_device_store_uint32(reg_loc, value);
}
STORAGE_CLASS_ISYS2401_DMA_C hrt_data isys2401_dma_reg_load(
- const isys2401_dma_ID_t dma_id,
- const unsigned int reg)
+ const isys2401_dma_ID_t dma_id,
+ const unsigned int reg)
{
unsigned int reg_loc;
hrt_data value;
reg_loc = ISYS2401_DMA_BASE[dma_id] + (reg * sizeof(hrt_data));
value = ia_css_device_load_uint32(reg_loc);
- ia_css_print("isys dma load from addr(0x%x) val(%u)\n", reg_loc, (unsigned int)value);
+ ia_css_print("isys dma load from addr(0x%x) val(%u)\n", reg_loc,
+ (unsigned int)value);
return value;
}
/* Public interface */
STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_status_enable(
- const isys_irq_ID_t isys_irqc_id)
+ const isys_irq_ID_t isys_irqc_id)
{
assert(isys_irqc_id < N_ISYS_IRQ_ID);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Setting irq mask for port %u\n", isys_irqc_id);
- isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX, ISYS_IRQ_MASK_REG_VALUE);
- isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_CLEAR_REG_IDX, ISYS_IRQ_CLEAR_REG_VALUE);
- isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_ENABLE_REG_IDX, ISYS_IRQ_ENABLE_REG_VALUE);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Setting irq mask for port %u\n",
+ isys_irqc_id);
+ isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX,
+ ISYS_IRQ_MASK_REG_VALUE);
+ isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_CLEAR_REG_IDX,
+ ISYS_IRQ_CLEAR_REG_VALUE);
+ isys_irqc_reg_store(isys_irqc_id, ISYS_IRQ_ENABLE_REG_IDX,
+ ISYS_IRQ_ENABLE_REG_VALUE);
}
hrt_data status;
hrt_data enable;
hrt_data level_no;
-/*hrt_data clear; */ /* write-only register */
+ /*hrt_data clear; */ /* write-only register */
};
#endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */
* Refer to "isys_irq.h" for details.
*/
STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_get(
- const isys_irq_ID_t isys_irqc_id,
- isys_irqc_state_t *state)
+ const isys_irq_ID_t isys_irqc_id,
+ isys_irqc_state_t *state)
{
state->edge = isys_irqc_reg_load(isys_irqc_id, ISYS_IRQ_EDGE_REG_IDX);
state->mask = isys_irqc_reg_load(isys_irqc_id, ISYS_IRQ_MASK_REG_IDX);
* Refer to "isys_irq.h" for details.
*/
STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump(
- const isys_irq_ID_t isys_irqc_id,
- const isys_irqc_state_t *state)
+ const isys_irq_ID_t isys_irqc_id,
+ const isys_irqc_state_t *state)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "isys irq controller id %d\n\tstatus:0x%x\n\tedge:0x%x\n\tmask:0x%x\n\tenable:0x%x\n\tlevel_not_pulse:0x%x\n",
- isys_irqc_id,
- state->status, state->edge, state->mask, state->enable, state->level_no);
+ "isys irq controller id %d\n\tstatus:0x%x\n\tedge:0x%x\n\tmask:0x%x\n\tenable:0x%x\n\tlevel_not_pulse:0x%x\n",
+ isys_irqc_id,
+ state->status, state->edge, state->mask, state->enable, state->level_no);
}
/* end of NCI */
/* Support functions */
STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_reg_store(
- const isys_irq_ID_t isys_irqc_id,
- const unsigned int reg_idx,
- const hrt_data value)
+ const isys_irq_ID_t isys_irqc_id,
+ const unsigned int reg_idx,
+ const hrt_data value)
{
unsigned int reg_addr;
reg_addr = ISYS_IRQ_BASE[isys_irqc_id] + (reg_idx * sizeof(hrt_data));
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "isys irq store at addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
+ "isys irq store at addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
ia_css_device_store_uint32(reg_addr, value);
}
STORAGE_CLASS_ISYS2401_IRQ_C hrt_data isys_irqc_reg_load(
- const isys_irq_ID_t isys_irqc_id,
- const unsigned int reg_idx)
+ const isys_irq_ID_t isys_irqc_id,
+ const unsigned int reg_idx)
{
unsigned int reg_addr;
hrt_data value;
reg_addr = ISYS_IRQ_BASE[isys_irqc_id] + (reg_idx * sizeof(hrt_data));
value = ia_css_device_load_uint32(reg_addr);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "isys irq load from addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
+ "isys irq load from addr(0x%x) val(%u)\n", reg_addr, (unsigned int)value);
return value;
}
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_state(
- const stream2mmio_ID_t ID,
- stream2mmio_state_t *state)
+ const stream2mmio_ID_t ID,
+ stream2mmio_state_t *state)
{
stream2mmio_sid_ID_t i;
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_get_sid_state(
- const stream2mmio_ID_t ID,
- const stream2mmio_sid_ID_t sid_id,
- stream2mmio_sid_state_t *state)
+ const stream2mmio_ID_t ID,
+ const stream2mmio_sid_ID_t sid_id,
+ stream2mmio_sid_state_t *state)
{
state->rcv_ack =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_ACKNOWLEDGE_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_ACKNOWLEDGE_REG_ID);
state->pix_width_id =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_PIX_WIDTH_ID_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_PIX_WIDTH_ID_REG_ID);
state->start_addr =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_START_ADDR_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_START_ADDR_REG_ID);
state->end_addr =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_END_ADDR_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_END_ADDR_REG_ID);
state->strides =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_STRIDE_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_STRIDE_REG_ID);
state->num_items =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_NUM_ITEMS_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_NUM_ITEMS_REG_ID);
state->block_when_no_cmd =
- stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID);
+ stream2mmio_reg_load(ID, sid_id, STREAM2MMIO_BLOCK_WHEN_NO_CMD_REG_ID);
}
/**
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_print_sid_state(
- stream2mmio_sid_state_t *state)
+ stream2mmio_sid_state_t *state)
{
ia_css_print("\t \t Receive acks 0x%x\n", state->rcv_ack);
ia_css_print("\t \t Pixel width 0x%x\n", state->pix_width_id);
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state(
- const stream2mmio_ID_t ID,
- stream2mmio_state_t *state)
+ const stream2mmio_ID_t ID,
+ stream2mmio_state_t *state)
{
stream2mmio_sid_ID_t i;
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C hrt_data stream2mmio_reg_load(
- const stream2mmio_ID_t ID,
- const stream2mmio_sid_ID_t sid_id,
- const uint32_t reg_idx)
+ const stream2mmio_ID_t ID,
+ const stream2mmio_sid_ID_t sid_id,
+ const uint32_t reg_idx)
{
u32 reg_bank_offset;
reg_bank_offset = STREAM2MMIO_REGS_PER_SID * sid_id;
return ia_css_device_load_uint32(STREAM2MMIO_CTRL_BASE[ID] +
- (reg_bank_offset + reg_idx) * sizeof(hrt_data));
+ (reg_bank_offset + reg_idx) * sizeof(hrt_data));
}
/**
* Refer to "stream2mmio_public.h" for details.
*/
STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_reg_store(
- const stream2mmio_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const stream2mmio_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_STREAM2MMIO_ID);
assert(STREAM2MMIO_CTRL_BASE[ID] != (hrt_address)-1);
ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] +
- reg * sizeof(hrt_data), value);
+ reg * sizeof(hrt_data), value);
}
/* end of DLI */
* Refer to "pixelgen_public.h" for details.
*/
STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_get_state(
- const pixelgen_ID_t ID,
- pixelgen_ctrl_state_t *state)
+ const pixelgen_ID_t ID,
+ pixelgen_ctrl_state_t *state)
{
state->com_enable =
- pixelgen_ctrl_reg_load(ID, _PXG_COM_ENABLE_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_COM_ENABLE_REG_IDX);
state->prbs_rstval0 =
- pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG0_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG0_IDX);
state->prbs_rstval1 =
- pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG1_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_PRBS_RSTVAL_REG1_IDX);
state->syng_sid =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_SID_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_SID_REG_IDX);
state->syng_free_run =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_FREE_RUN_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_FREE_RUN_REG_IDX);
state->syng_pause =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_PAUSE_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_PAUSE_REG_IDX);
state->syng_nof_frames =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_FRAME_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_FRAME_REG_IDX);
state->syng_nof_pixels =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_PIXEL_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_PIXEL_REG_IDX);
state->syng_nof_line =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_LINE_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_NOF_LINE_REG_IDX);
state->syng_hblank_cyc =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_HBLANK_CYC_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_HBLANK_CYC_REG_IDX);
state->syng_vblank_cyc =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_VBLANK_CYC_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_VBLANK_CYC_REG_IDX);
state->syng_stat_hcnt =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_HCNT_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_HCNT_REG_IDX);
state->syng_stat_vcnt =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_VCNT_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_VCNT_REG_IDX);
state->syng_stat_fcnt =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_FCNT_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_FCNT_REG_IDX);
state->syng_stat_done =
- pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_DONE_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_SYNG_STAT_DONE_REG_IDX);
state->tpg_mode =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_MODE_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_MODE_REG_IDX);
state->tpg_hcnt_mask =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_MASK_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_MASK_REG_IDX);
state->tpg_vcnt_mask =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_MASK_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_MASK_REG_IDX);
state->tpg_xycnt_mask =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_XYCNT_MASK_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_XYCNT_MASK_REG_IDX);
state->tpg_hcnt_delta =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_DELTA_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_HCNT_DELTA_REG_IDX);
state->tpg_vcnt_delta =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_DELTA_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_VCNT_DELTA_REG_IDX);
state->tpg_r1 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_R1_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_R1_REG_IDX);
state->tpg_g1 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_G1_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_G1_REG_IDX);
state->tpg_b1 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_B1_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_B1_REG_IDX);
state->tpg_r2 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_R2_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_R2_REG_IDX);
state->tpg_g2 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_G2_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_G2_REG_IDX);
state->tpg_b2 =
- pixelgen_ctrl_reg_load(ID, _PXG_TPG_B2_REG_IDX);
+ pixelgen_ctrl_reg_load(ID, _PXG_TPG_B2_REG_IDX);
}
/**
* Refer to "pixelgen_public.h" for details.
*/
STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_dump_state(
- const pixelgen_ID_t ID,
- pixelgen_ctrl_state_t *state)
+ const pixelgen_ID_t ID,
+ pixelgen_ctrl_state_t *state)
{
ia_css_print("Pixel Generator ID %d Enable 0x%x\n", ID, state->com_enable);
- ia_css_print("Pixel Generator ID %d PRBS reset vlue 0 0x%x\n", ID, state->prbs_rstval0);
- ia_css_print("Pixel Generator ID %d PRBS reset vlue 1 0x%x\n", ID, state->prbs_rstval1);
+ ia_css_print("Pixel Generator ID %d PRBS reset vlue 0 0x%x\n", ID,
+ state->prbs_rstval0);
+ ia_css_print("Pixel Generator ID %d PRBS reset vlue 1 0x%x\n", ID,
+ state->prbs_rstval1);
ia_css_print("Pixel Generator ID %d SYNC SID 0x%x\n", ID, state->syng_sid);
- ia_css_print("Pixel Generator ID %d syng free run 0x%x\n", ID, state->syng_free_run);
+ ia_css_print("Pixel Generator ID %d syng free run 0x%x\n", ID,
+ state->syng_free_run);
ia_css_print("Pixel Generator ID %d syng pause 0x%x\n", ID, state->syng_pause);
- ia_css_print("Pixel Generator ID %d syng no of frames 0x%x\n", ID, state->syng_nof_frames);
- ia_css_print("Pixel Generator ID %d syng no of pixels 0x%x\n", ID, state->syng_nof_pixels);
- ia_css_print("Pixel Generator ID %d syng no of line 0x%x\n", ID, state->syng_nof_line);
- ia_css_print("Pixel Generator ID %d syng hblank cyc 0x%x\n", ID, state->syng_hblank_cyc);
- ia_css_print("Pixel Generator ID %d syng vblank cyc 0x%x\n", ID, state->syng_vblank_cyc);
- ia_css_print("Pixel Generator ID %d syng stat hcnt 0x%x\n", ID, state->syng_stat_hcnt);
- ia_css_print("Pixel Generator ID %d syng stat vcnt 0x%x\n", ID, state->syng_stat_vcnt);
- ia_css_print("Pixel Generator ID %d syng stat fcnt 0x%x\n", ID, state->syng_stat_fcnt);
- ia_css_print("Pixel Generator ID %d syng stat done 0x%x\n", ID, state->syng_stat_done);
+ ia_css_print("Pixel Generator ID %d syng no of frames 0x%x\n", ID,
+ state->syng_nof_frames);
+ ia_css_print("Pixel Generator ID %d syng no of pixels 0x%x\n", ID,
+ state->syng_nof_pixels);
+ ia_css_print("Pixel Generator ID %d syng no of line 0x%x\n", ID,
+ state->syng_nof_line);
+ ia_css_print("Pixel Generator ID %d syng hblank cyc 0x%x\n", ID,
+ state->syng_hblank_cyc);
+ ia_css_print("Pixel Generator ID %d syng vblank cyc 0x%x\n", ID,
+ state->syng_vblank_cyc);
+ ia_css_print("Pixel Generator ID %d syng stat hcnt 0x%x\n", ID,
+ state->syng_stat_hcnt);
+ ia_css_print("Pixel Generator ID %d syng stat vcnt 0x%x\n", ID,
+ state->syng_stat_vcnt);
+ ia_css_print("Pixel Generator ID %d syng stat fcnt 0x%x\n", ID,
+ state->syng_stat_fcnt);
+ ia_css_print("Pixel Generator ID %d syng stat done 0x%x\n", ID,
+ state->syng_stat_done);
ia_css_print("Pixel Generator ID %d tpg modee 0x%x\n", ID, state->tpg_mode);
- ia_css_print("Pixel Generator ID %d tpg hcnt mask 0x%x\n", ID, state->tpg_hcnt_mask);
- ia_css_print("Pixel Generator ID %d tpg hcnt mask 0x%x\n", ID, state->tpg_hcnt_mask);
- ia_css_print("Pixel Generator ID %d tpg xycnt mask 0x%x\n", ID, state->tpg_xycnt_mask);
- ia_css_print("Pixel Generator ID %d tpg hcnt delta 0x%x\n", ID, state->tpg_hcnt_delta);
- ia_css_print("Pixel Generator ID %d tpg vcnt delta 0x%x\n", ID, state->tpg_vcnt_delta);
+ ia_css_print("Pixel Generator ID %d tpg hcnt mask 0x%x\n", ID,
+ state->tpg_hcnt_mask);
+ ia_css_print("Pixel Generator ID %d tpg hcnt mask 0x%x\n", ID,
+ state->tpg_hcnt_mask);
+ ia_css_print("Pixel Generator ID %d tpg xycnt mask 0x%x\n", ID,
+ state->tpg_xycnt_mask);
+ ia_css_print("Pixel Generator ID %d tpg hcnt delta 0x%x\n", ID,
+ state->tpg_hcnt_delta);
+ ia_css_print("Pixel Generator ID %d tpg vcnt delta 0x%x\n", ID,
+ state->tpg_vcnt_delta);
ia_css_print("Pixel Generator ID %d tpg r1 0x%x\n", ID, state->tpg_r1);
ia_css_print("Pixel Generator ID %d tpg g1 0x%x\n", ID, state->tpg_g1);
ia_css_print("Pixel Generator ID %d tpg b1 0x%x\n", ID, state->tpg_b1);
* Refer to "pixelgen_public.h" for details.
*/
STORAGE_CLASS_PIXELGEN_C hrt_data pixelgen_ctrl_reg_load(
- const pixelgen_ID_t ID,
- const hrt_address reg)
+ const pixelgen_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_PIXELGEN_ID);
assert(PIXELGEN_CTRL_BASE[ID] != (hrt_address) - 1);
- return ia_css_device_load_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(
+ hrt_data));
}
/**
* Refer to "pixelgen_ctrl_public.h" for details.
*/
STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_reg_store(
- const pixelgen_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const pixelgen_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_PIXELGEN_ID);
assert(PIXELGEN_CTRL_BASE[ID] != (hrt_address)-1);
- ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg * sizeof(hrt_data),
+ value);
}
/* end of DLI */
/* DDR */
static const hrt_address DDR_BASE[N_DDR_ID] = {
- 0x0000000120000000ULL};
+ 0x0000000120000000ULL
+};
/* ISP */
static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
- 0x0000000000020000ULL};
+ 0x0000000000020000ULL
+};
static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
- 0x0000000000200000ULL};
+ 0x0000000000200000ULL
+};
static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
- 0x0000000000100000ULL};
+ 0x0000000000100000ULL
+};
static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
0x00000000001C0000ULL,
0x00000000001D0000ULL,
- 0x00000000001E0000ULL};
+ 0x00000000001E0000ULL
+};
static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
- 0x00000000001F0000ULL};
+ 0x00000000001F0000ULL
+};
/* SP */
static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
- 0x0000000000010000ULL};
+ 0x0000000000010000ULL
+};
static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
- 0x0000000000300000ULL};
+ 0x0000000000300000ULL
+};
/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
*/
static const hrt_address MMU_BASE[N_MMU_ID] = {
0x0000000000070000ULL,
- 0x00000000000A0000ULL};
+ 0x00000000000A0000ULL
+};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif
/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
- 0x0000000000040000ULL};
+ 0x0000000000040000ULL
+};
static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
- 0x00000000000CA000ULL};
+ 0x00000000000CA000ULL
+};
/* IRQ */
static const hrt_address IRQ_BASE[N_IRQ_ID] = {
0x0000000000000500ULL,
0x0000000000030A00ULL,
0x000000000008C000ULL,
- 0x0000000000090200ULL};
+ 0x0000000000090200ULL
+};
/*
0x0000000000000500ULL};
*/
/* GDC */
static const hrt_address GDC_BASE[N_GDC_ID] = {
0x0000000000050000ULL,
- 0x0000000000060000ULL};
+ 0x0000000000060000ULL
+};
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
- 0x0000000000000000ULL};
+ 0x0000000000000000ULL
+};
/*
static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
/* GP_DEVICE (single base for all separate GP_REG instances) */
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
- 0x0000000000000000ULL};
+ 0x0000000000000000ULL
+};
/*GP TIMER , all timer registers are inter-twined,
* so, having multiple base addresses for
* different timers does not help*/
static const hrt_address GP_TIMER_BASE =
- (hrt_address)0x0000000000000600ULL;
+ (hrt_address)0x0000000000000600ULL;
/* GPIO */
static const hrt_address GPIO_BASE[N_GPIO_ID] = {
- 0x0000000000000400ULL};
+ 0x0000000000000400ULL
+};
/* TIMED_CTRL */
static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
- 0x0000000000000100ULL};
+ 0x0000000000000100ULL
+};
/* INPUT_FORMATTER */
static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
0x0000000000030000ULL,
0x0000000000030200ULL,
0x0000000000030400ULL,
- 0x0000000000030600ULL}; /* memcpy() */
+ 0x0000000000030600ULL
+}; /* memcpy() */
/* INPUT_SYSTEM */
static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
- 0x0000000000080000ULL};
+ 0x0000000000080000ULL
+};
/* 0x0000000000081000ULL, */ /* capture A */
/* 0x0000000000082000ULL, */ /* capture B */
/* 0x0000000000083000ULL, */ /* capture C */
/* RX, the MIPI lane control regs start at offset 0 */
static const hrt_address RX_BASE[N_RX_ID] = {
- 0x0000000000080100ULL};
+ 0x0000000000080100ULL
+};
/* IBUF_CTRL, part of the Input System 2401 */
static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
/* DDR : Attention, this value not defined in 32-bit */
static const hrt_address DDR_BASE[N_DDR_ID] = {
- 0x00000000UL};
+ 0x00000000UL
+};
/* ISP */
static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
- 0x00020000UL};
+ 0x00020000UL
+};
static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
- 0xffffffffUL};
+ 0xffffffffUL
+};
static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
- 0xffffffffUL};
+ 0xffffffffUL
+};
static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
0xffffffffUL,
0xffffffffUL,
- 0xffffffffUL};
+ 0xffffffffUL
+};
static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
- 0xffffffffUL};
+ 0xffffffffUL
+};
/* SP */
static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
- 0x00010000UL};
+ 0x00010000UL
+};
static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
- 0x00300000UL};
+ 0x00300000UL
+};
/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
*/
static const hrt_address MMU_BASE[N_MMU_ID] = {
0x00070000UL,
- 0x000A0000UL};
+ 0x000A0000UL
+};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif
/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
- 0x00040000UL};
+ 0x00040000UL
+};
static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
- 0x000CA000UL};
+ 0x000CA000UL
+};
/* IRQ */
static const hrt_address IRQ_BASE[N_IRQ_ID] = {
0x00000500UL,
0x00030A00UL,
0x0008C000UL,
- 0x00090200UL};
+ 0x00090200UL
+};
/*
0x00000500UL};
*/
/* GDC */
static const hrt_address GDC_BASE[N_GDC_ID] = {
0x00050000UL,
- 0x00060000UL};
+ 0x00060000UL
+};
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
- 0x00000000UL};
+ 0x00000000UL
+};
/*
static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
/* GP_DEVICE (single base for all separate GP_REG instances) */
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
- 0x00000000UL};
+ 0x00000000UL
+};
/*GP TIMER , all timer registers are inter-twined,
* so, having multiple base addresses for
* different timers does not help*/
static const hrt_address GP_TIMER_BASE =
- (hrt_address)0x00000600UL;
+ (hrt_address)0x00000600UL;
/* GPIO */
static const hrt_address GPIO_BASE[N_GPIO_ID] = {
- 0x00000400UL};
+ 0x00000400UL
+};
/* TIMED_CTRL */
static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
- 0x00000100UL};
+ 0x00000100UL
+};
/* INPUT_FORMATTER */
static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
0x00030000UL,
0x00030200UL,
- 0x00030400UL};
+ 0x00030400UL
+};
/* 0x00030600UL, */ /* memcpy() */
/* INPUT_SYSTEM */
static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
- 0x00080000UL};
+ 0x00080000UL
+};
/* 0x00081000UL, */ /* capture A */
/* 0x00082000UL, */ /* capture B */
/* 0x00083000UL, */ /* capture C */
/* RX, the MIPI lane control regs start at offset 0 */
static const hrt_address RX_BASE[N_RX_ID] = {
- 0x00080100UL};
+ 0x00080100UL
+};
/* IBUF_CTRL, part of the Input System 2401 */
static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
#define _DMA_V2_ZERO_EXTEND 0
#define _DMA_V2_SIGN_EXTEND 1
- /* SLAVE address map */
+/* SLAVE address map */
#define _DMA_V2_SEL_FSM_CMD 0
#define _DMA_V2_SEL_CH_REG 1
#define _DMA_V2_SEL_CONN_GROUP 2
#define HRT_GDC_BCI_COEF_BITS 14 /* 14 bits per coefficient */
#define HRT_GDC_BCI_COEF_ONE (1 << (HRT_GDC_BCI_COEF_BITS - 2)) /* We represent signed 10 bit coefficients. */
- /* The supported range is [-256, .., +256] */
- /* in 14-bit signed notation, */
- /* We need all ten bits (MSB must be zero). */
- /* -s is inserted to solve this issue, and */
- /* therefore "1" is equal to +256. */
+/* The supported range is [-256, .., +256] */
+/* in 14-bit signed notation, */
+/* We need all ten bits (MSB must be zero). */
+/* -s is inserted to solve this issue, and */
+/* therefore "1" is equal to +256. */
#define HRT_GDC_BCI_COEF_MASK ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
#define HRT_GDC_LUT_BYTES (HRT_GDC_N * 4 * 2) /* 1024 addresses, 4 coefficients per address, */
- /* 2 bytes per coefficient */
+/* 2 bytes per coefficient */
#define _HRT_GDC_REG_ALIGN 4
- // 31 30 29 25 24 0
- // |-----|---|--------|------------------------|
- // | CMD | C | Reg_ID | Value |
+// 31 30 29 25 24 0
+// |-----|---|--------|------------------------|
+// | CMD | C | Reg_ID | Value |
- // There are just two commands possible for the GDC block:
- // 1 - Configure reg
- // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
- // C - Reserved bit
- // Used in protocol to indicate whether it is C-run or other type of runs
- // In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C - Reserved bit
+// Used in protocol to indicate whether it is C-run or other type of runs
+// In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
- // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
- // Value - Value to store to the addressed register, maximum of 24 bits
+// Value - Value to store to the addressed register, maximum of 24 bits
- // Configure reg command is not followed by any other token.
- // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
- // When the first data token is received, it must be:
- // 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
- // 2. P0'X (device configured in one of the tetragon modes)
- // After the first data token is received, pre-defined number of tokens with the following meaning follow:
- // 1. two tokens: SRC address ; DST address
- // 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+// 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
+// 2. P0'X (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+// 1. two tokens: SRC address ; DST address
+// 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
#define HRT_GDC_CONFIG_CMD 1
#define HRT_GDC_DATA_CMD 0
#define _HRT_GPIO_BLOCK_REG_ALIGN 4
/* R/W registers */
-#define _gpio_block_reg_do_e 0
+#define _gpio_block_reg_do_e 0
#define _gpio_block_reg_do_select 1
-#define _gpio_block_reg_do_0 2
-#define _gpio_block_reg_do_1 3
+#define _gpio_block_reg_do_0 2
+#define _gpio_block_reg_do_1 3
#define _gpio_block_reg_do_pwm_cnt_0 4
#define _gpio_block_reg_do_pwm_cnt_1 5
#define _gpio_block_reg_do_pwm_cnt_2 6
#define _gpio_block_reg_di_active_level 15
/* read-only registers */
-#define _gpio_block_reg_di 16
+#define _gpio_block_reg_di 16
#endif /* _gpio_block_defs_h_ */
* The definitions are taken from <system>_defs.h
*/
typedef enum hrt_isp_css_irq {
- hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
- hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
- hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
- hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
- hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
- hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
- hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
- hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
- hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
- hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
- hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
- hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
- hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
- hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
- hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
- hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
- hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
- hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
- hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
- hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
- hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
- hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
- /* this must (obviously) be the last on in the enum */
- hrt_isp_css_irq_num_irqs
+ hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+ hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+ hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+ hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+ hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+ hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+ hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+ hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+ hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+ hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+ hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+ /* this must (obviously) be the last on in the enum */
+ hrt_isp_css_irq_num_irqs
} hrt_isp_css_irq_t;
typedef enum hrt_isp_css_irq_status {
- hrt_isp_css_irq_status_error,
- hrt_isp_css_irq_status_more_irqs,
- hrt_isp_css_irq_status_success
+ hrt_isp_css_irq_status_error,
+ hrt_isp_css_irq_status_more_irqs,
+ hrt_isp_css_irq_status_success
} hrt_isp_css_irq_status_t;
#endif /* _HIVE_ISP_CSS_2401_IRQ_TYPES_HRT_H_ */
#include <dma_v2_defs.h>
#define _IBUF_CNTRL_REG_ALIGN 4
- /* alignment of register banks, first bank are shared configuration and status registers: */
+/* alignment of register banks, first bank are shared configuration and status registers: */
#define _IBUF_CNTRL_PROC_REG_ALIGN 32
- /* the actual amount of configuration registers per proc: */
+/* the actual amount of configuration registers per proc: */
#define _IBUF_CNTRL_CONFIG_REGS_PER_PROC 18
- /* the actual amount of shared configuration registers: */
+/* the actual amount of shared configuration registers: */
#define _IBUF_CNTRL_CONFIG_REGS_NO_PROC 0
- /* the actual amount of status registers per proc */
+/* the actual amount of status registers per proc */
#define _IBUF_CNTRL_STATUS_REGS_PER_PROC (_IBUF_CNTRL_CONFIG_REGS_PER_PROC + 10)
- /* the actual amount shared status registers */
+/* the actual amount shared status registers */
#define _IBUF_CNTRL_STATUS_REGS_NO_PROC (_IBUF_CNTRL_CONFIG_REGS_NO_PROC + 2)
- /* time out bits, maximum time out value is 2^_IBUF_CNTRL_TIME_OUT_BITS - 1 */
+/* time out bits, maximum time out value is 2^_IBUF_CNTRL_TIME_OUT_BITS - 1 */
#define _IBUF_CNTRL_TIME_OUT_BITS 5
/* command token definition */
#define _IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS _STREAM2MMIO_PACK_NUM_ITEMS_BITS
#define _IBUF_CNTRL_ACK_TOKEN_LSB _IBUF_CNTRL_ACK_TOKEN_STORES_IDX
#define _IBUF_CNTRL_ACK_TOKEN_MSB (_IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS + _IBUF_CNTRL_ACK_TOKEN_ITEMS_IDX - 1)
- /* bit 31 indicates a valid ack: */
+/* bit 31 indicates a valid ack: */
#define _IBUF_CNTRL_ACK_TOKEN_VALID_BIT (_IBUF_CNTRL_ACK_TOKEN_ITEMS_BITS + _IBUF_CNTRL_ACK_TOKEN_ITEMS_IDX)
/*shared registers:*/
#define _IBUF_CNTRL_CMD 0
#define _IBUF_CNTRL_ACK 1
- /* number of items (packets or words) per frame: */
+/* number of items (packets or words) per frame: */
#define _IBUF_CNTRL_NUM_ITEMS_PER_STORE 2
- /* number of stores (packets or words) per store/buffer: */
+/* number of stores (packets or words) per store/buffer: */
#define _IBUF_CNTRL_NUM_STORES_PER_FRAME 3
- /* the channel and command in the DMA */
+/* the channel and command in the DMA */
#define _IBUF_CNTRL_DMA_CHANNEL 4
#define _IBUF_CNTRL_DMA_CMD 5
- /* the start address and stride of the buffers */
+/* the start address and stride of the buffers */
#define _IBUF_CNTRL_BUFFER_START_ADDRESS 6
#define _IBUF_CNTRL_BUFFER_STRIDE 7
#define _IBUF_CNTRL_BUFFER_END_ADDRESS 8
- /* destination start address, stride and end address; should be the same as in the DMA */
+/* destination start address, stride and end address; should be the same as in the DMA */
#define _IBUF_CNTRL_DEST_START_ADDRESS 9
#define _IBUF_CNTRL_DEST_STRIDE 10
#define _IBUF_CNTRL_DEST_END_ADDRESS 11
- /* send a frame sync or not, default 1 */
+/* send a frame sync or not, default 1 */
#define _IBUF_CNTRL_SYNC_FRAME 12
- /* str2mmio cmds */
+/* str2mmio cmds */
#define _IBUF_CNTRL_STR2MMIO_SYNC_CMD 13
#define _IBUF_CNTRL_STR2MMIO_STORE_CMD 14
- /* num elems p word*/
+/* num elems p word*/
#define _IBUF_CNTRL_SHIFT_ITEMS 15
#define _IBUF_CNTRL_ELEMS_P_WORD_IBUF 16
#define _IBUF_CNTRL_ELEMS_P_WORD_DEST 17
- /* STATUS */
- /* current frame and stores in buffer */
+/* STATUS */
+/* current frame and stores in buffer */
#define _IBUF_CNTRL_CUR_STORES 18
#define _IBUF_CNTRL_CUR_ACKS 19
- /* current buffer and destination address for DMA cmd's */
+/* current buffer and destination address for DMA cmd's */
#define _IBUF_CNTRL_CUR_S2M_IBUF_ADDR 20
#define _IBUF_CNTRL_CUR_DMA_IBUF_ADDR 21
#define _IBUF_CNTRL_CUR_DMA_DEST_ADDR 22
#define _IBUF_CNTRL_CMD_STORE_FRAME_IDX 0
#define _IBUF_CNTRL_CMD_ONLINE_IDX 1
- /* initialize, copy st_addr to cur_addr etc */
+/* initialize, copy st_addr to cur_addr etc */
#define _IBUF_CNTRL_CMD_INITIALIZE 0
- /* store an online frame (sync with ISP, use end cfg start, stride and end address: */
+/* store an online frame (sync with ISP, use end cfg start, stride and end address: */
#define _IBUF_CNTRL_CMD_STORE_ONLINE_FRAME ((1 << _IBUF_CNTRL_CMD_STORE_FRAME_IDX) | (1 << _IBUF_CNTRL_CMD_ONLINE_IDX))
- /* store an offline frame (don't sync with ISP, requires start address as 2nd token, no end address: */
+/* store an offline frame (don't sync with ISP, requires start address as 2nd token, no end address: */
#define _IBUF_CNTRL_CMD_STORE_OFFLINE_FRAME BIT(_IBUF_CNTRL_CMD_STORE_FRAME_IDX)
- /* false command token, should be different then commands. Use online bit, not store frame: */
+/* false command token, should be different then commands. Use online bit, not store frame: */
#define _IBUF_CNTRL_FALSE_ACK 2
#endif
#define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
#if ISP_HAS_HIST
- #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
- #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
#endif
#endif /* _isp2400_support_h */
#define ISP_VMEM_ELEM_PRECISION 14
#define ISP_VMEM_IS_BAMEM 1
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
- #define ISP_VMEM_BAMEM_LATENCY 5
- #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
- #define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
- #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
- #define ISP_VMEM_BAMEM_LININT 0
- #define ISP_VMEM_BAMEM_DAP_BITS 3
- #define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
- #define ISP_VMEM_BAMEM_PID_BITS 3
- #define ISP_VMEM_BAMEM_OFFSET_BITS 19
- #define ISP_VMEM_BAMEM_ADDRESS_BITS 25
- #define ISP_VMEM_BAMEM_RID_BITS 4
- #define ISP_VMEM_BAMEM_TRANSPOSITION 1
- #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
- #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
- #define ISP_VMEM_BAMEM_LUT_ELEMS 16
- #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
- #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
- #define ISP_VMEM_BAMEM_SMART_FETCH 1
- #define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
+#define ISP_VMEM_BAMEM_LATENCY 5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
+#define ISP_VMEM_BAMEM_LININT 0
+#define ISP_VMEM_BAMEM_DAP_BITS 3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
+#define ISP_VMEM_BAMEM_PID_BITS 3
+#define ISP_VMEM_BAMEM_OFFSET_BITS 19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS 25
+#define ISP_VMEM_BAMEM_RID_BITS 4
+#define ISP_VMEM_BAMEM_TRANSPOSITION 1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS 16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
+#define ISP_VMEM_BAMEM_SMART_FETCH 1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_PMEM_DEPTH 2048
#define ISP_PMEM_WIDTH 640
#define ISP_SRU_GUARDING 1
#define ISP_VLSU_GUARDING 1
-#define ISP_VRF_RAM 1
-#define ISP_SRF_RAM 1
+#define ISP_VRF_RAM 1
+#define ISP_SRF_RAM 1
#define ISP_SPLIT_VMUL_VADD_IS 0
#define ISP_RFSPLIT_FPGA 0
#define ISP_VMEM_WIDTH 896
#define ISP_VMEM_ALIGN 128
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_ALIGN_ELEM 2
+#define ISP_VMEM_ALIGN_ELEM 2
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_SIMDLSU 1
#define ISP_LSU_IMM_BITS 12
#define _STREAM2MMIO_ACK_TOKEN_EOP_BIT _STREAM2MMIO_PACK_ACK_EOP_BIT
#define _STREAM2MMIO_ACK_TOKEN_EOF_BIT _STREAM2MMIO_PACK_ACK_EOF_BIT
#define _STREAM2MMIO_ACK_TOKEN_VALID_BIT (_STREAM2MMIO_ACK_TOKEN_EOF_BIT + 1) /* this bit indicates a valid ack */
- /* if there is no valid ack, a read */
- /* on the ack register returns 0 */
+/* if there is no valid ack, a read */
+/* on the ack register returns 0 */
#define _STREAM2MMIO_ACK_TOKEN_WIDTH (_STREAM2MMIO_ACK_TOKEN_VALID_BIT + 1)
/* commands for packer module */
#endif
};
-typedef struct virtual_input_system_stream_cfg_s virtual_input_system_stream_cfg_t;
+typedef struct virtual_input_system_stream_cfg_s
+ virtual_input_system_stream_cfg_t;
struct virtual_input_system_stream_cfg_s {
u8 enable_metadata;
input_system_input_port_cfg_t input_port_cfg;
u32 elements;
u32 cropping;
u32 width;
- };
+};
/* end of DMA Port */
/************************************************
} isys2401_dma_connection;
typedef enum {
- isys2401_dma_zero_extension = _DMA_ZERO_EXTEND,
- isys2401_dma_sign_extension = _DMA_SIGN_EXTEND
+ isys2401_dma_zero_extension = _DMA_ZERO_EXTEND,
+ isys2401_dma_sign_extension = _DMA_SIGN_EXTEND
} isys2401_dma_extension;
typedef struct isys2401_dma_cfg_s isys2401_dma_cfg_t;
/* end of DMA Device */
/* isys2401_dma_channel limits per DMA ID */
-extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID];
+extern const isys2401_dma_channel
+N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID];
#endif /* __ISYS_DMA_GLOBAL_H_INCLUDED__ */
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_iterator_config((struct sh_css_isp_iterator_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_iterator() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_iterator() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_copy_output_config((struct sh_css_isp_copy_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_copy_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_copy_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_crop_config((struct sh_css_isp_crop_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_crop() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_fpn_config((struct sh_css_isp_fpn_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_fpn() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_dvs_config((struct sh_css_isp_dvs_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_dvs() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_dvs() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_qplane_config((struct sh_css_isp_qplane_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_qplane() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_qplane() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output0_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output0() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output0() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output1_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output1() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output1() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_output_config((struct sh_css_isp_output_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_output() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_sc_config((struct sh_css_isp_sc_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_sc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_sc() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_raw_config((struct sh_css_isp_raw_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_raw() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_raw() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_tnr_config((struct sh_css_isp_tnr_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_tnr() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_ref_config((struct sh_css_isp_ref_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_ref() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_ref() leave:\n");
}
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem)
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() enter:\n");
{
unsigned int offset = 0;
}
if (size) {
ia_css_vf_config((struct sh_css_isp_vf_isp_config *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
- config_dmem, size); }
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_CONFIG][IA_CSS_ISP_DMEM].address[offset],
+ config_dmem, size);
+ }
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_configure_vf() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_configure_vf() leave:\n");
}
void
ia_css_configure_iterator(
- const struct ia_css_binary *binary,
- const struct ia_css_iterator_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_iterator_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_copy_output(
- const struct ia_css_binary *binary,
- const struct ia_css_copy_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_copy_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_crop(
- const struct ia_css_binary *binary,
- const struct ia_css_crop_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_crop_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_fpn(
- const struct ia_css_binary *binary,
- const struct ia_css_fpn_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_fpn_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_dvs(
- const struct ia_css_binary *binary,
- const struct ia_css_dvs_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_dvs_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_qplane(
- const struct ia_css_binary *binary,
- const struct ia_css_qplane_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_qplane_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output0(
- const struct ia_css_binary *binary,
- const struct ia_css_output0_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output0_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output1(
- const struct ia_css_binary *binary,
- const struct ia_css_output1_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output1_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_output(
- const struct ia_css_binary *binary,
- const struct ia_css_output_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_output_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#ifdef ISP2401
void
ia_css_configure_sc(
- const struct ia_css_binary *binary,
- const struct ia_css_sc_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_sc_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
#endif
void
ia_css_configure_raw(
- const struct ia_css_binary *binary,
- const struct ia_css_raw_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_raw_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_tnr(
- const struct ia_css_binary *binary,
- const struct ia_css_tnr_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_tnr_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_ref(
- const struct ia_css_binary *binary,
- const struct ia_css_ref_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_ref_configuration *config_dmem);
/* Code generated by genparam/genconfig.c:gen_configure_function() */
void
ia_css_configure_vf(
- const struct ia_css_binary *binary,
- const struct ia_css_vf_configuration *config_dmem);
+ const struct ia_css_binary *binary,
+ const struct ia_css_vf_configuration *config_dmem);
#endif /* IA_CSS_INCLUDE_CONFIGURATION */
static void
ia_css_process_aa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.size;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.aa.offset;
if (size) {
struct sh_css_isp_aa_params *t = (struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
t->strength = params->aa_config.strength;
}
}
static void
ia_css_process_anr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.anr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() enter:\n");
ia_css_anr_encode((struct sh_css_isp_anr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->anr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->anr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr() leave:\n");
}
}
}
static void
ia_css_process_anr2(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.anr2.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() enter:\n");
ia_css_anr2_vmem_encode((struct ia_css_isp_anr2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->anr_thres,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->anr_thres,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_anr2() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_anr2() leave:\n");
}
}
}
static void
ia_css_process_bh(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bh.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
ia_css_bh_encode((struct sh_css_isp_bh_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->hmem0.bh.size;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() enter:\n");
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_HMEM0] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bh() leave:\n");
}
static void
ia_css_process_cnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.cnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() enter:\n");
ia_css_cnr_encode((struct sh_css_isp_cnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_cnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_cnr() leave:\n");
}
}
}
static void
ia_css_process_crop(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.crop.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() enter:\n");
ia_css_crop_encode((struct sh_css_isp_crop_isp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->crop_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->crop_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_crop() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_crop() leave:\n");
}
}
}
static void
ia_css_process_csc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.csc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() enter:\n");
ia_css_csc_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_csc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_csc() leave:\n");
}
}
}
static void
ia_css_process_dp(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() enter:\n");
ia_css_dp_encode((struct sh_css_isp_dp_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dp_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dp_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_dp() leave:\n");
}
static void
ia_css_process_bnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() enter:\n");
ia_css_bnr_encode((struct sh_css_isp_bnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bnr() leave:\n");
}
}
}
static void
ia_css_process_de(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.de.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() enter:\n");
ia_css_de_encode((struct sh_css_isp_de_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->de_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->de_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_de() leave:\n");
}
static void
ia_css_process_ecd(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ecd.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() enter:\n");
ia_css_ecd_encode((struct sh_css_isp_ecd_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ecd_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ecd_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ecd() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ecd() leave:\n");
}
}
}
static void
ia_css_process_formats(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.formats.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() enter:\n");
ia_css_formats_encode((struct sh_css_isp_formats_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->formats_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->formats_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_formats() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_formats() leave:\n");
}
}
}
static void
ia_css_process_fpn(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fpn.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() enter:\n");
ia_css_fpn_encode((struct sh_css_isp_fpn_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fpn_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fpn_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fpn() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_fpn() leave:\n");
}
}
}
static void
ia_css_process_gc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_encode((struct sh_css_isp_gc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->gc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->gc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.gc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() enter:\n");
ia_css_gc_vamem_encode((struct sh_css_isp_gc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->gc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->gc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_gc() leave:\n");
}
static void
ia_css_process_ce(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ce.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() enter:\n");
ia_css_ce_encode((struct sh_css_isp_ce_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ce_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ce_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ce() leave:\n");
}
static void
ia_css_process_yuv2rgb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yuv2rgb.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() enter:\n");
ia_css_yuv2rgb_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yuv2rgb_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yuv2rgb_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yuv2rgb() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yuv2rgb() leave:\n");
}
}
}
static void
ia_css_process_rgb2yuv(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.rgb2yuv.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() enter:\n");
ia_css_rgb2yuv_encode((struct sh_css_isp_csc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->rgb2yuv_cc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->rgb2yuv_cc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_rgb2yuv() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_rgb2yuv() leave:\n");
}
}
}
static void
ia_css_process_r_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.r_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() enter:\n");
ia_css_r_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->r_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->r_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_r_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_r_gamma() leave:\n");
}
}
}
static void
ia_css_process_g_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.g_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() enter:\n");
ia_css_g_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->g_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->g_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_g_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_g_gamma() leave:\n");
}
}
}
static void
ia_css_process_b_gamma(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem2.b_gamma.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() enter:\n");
ia_css_b_gamma_vamem_encode((struct sh_css_isp_rgb_gamma_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
- ¶ms->b_gamma_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM2].address[offset],
+ ¶ms->b_gamma_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM2] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_b_gamma() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_b_gamma() leave:\n");
}
}
}
static void
ia_css_process_uds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.uds.offset;
if (size) {
struct sh_css_sp_uds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() enter:\n");
p = (struct sh_css_sp_uds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->crop_pos = params->uds_config.crop_pos;
p->uds = params->uds_config.uds;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_uds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_uds() leave:\n");
}
}
}
static void
ia_css_process_raa(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.raa.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() enter:\n");
ia_css_raa_encode((struct sh_css_isp_aa_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->raa_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->raa_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_raa() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_raa() leave:\n");
}
}
}
static void
ia_css_process_s3a(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.s3a.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() enter:\n");
ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->s3a_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->s3a_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_s3a() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_s3a() leave:\n");
}
}
}
static void
ia_css_process_ob(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_encode((struct sh_css_isp_ob_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.ob.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() enter:\n");
ia_css_ob_vmem_encode((struct sh_css_isp_ob_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->ob_config,
-¶ms->stream_configs.ob, size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->ob_config,
+ ¶ms->stream_configs.ob, size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ob() leave:\n");
}
static void
ia_css_process_output(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.output.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() enter:\n");
ia_css_output_encode((struct sh_css_isp_output_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->output_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->output_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_output() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_output() leave:\n");
}
}
}
static void
ia_css_process_sc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() enter:\n");
ia_css_sc_encode((struct sh_css_isp_sc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->sc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->sc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sc() leave:\n");
}
static void
ia_css_process_bds(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.bds.offset;
if (size) {
struct sh_css_isp_bds_params *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() enter:\n");
p = (struct sh_css_isp_bds_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
p->baf_strength = params->bds_config.strength;
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_bds() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_bds() leave:\n");
}
}
}
static void
ia_css_process_tnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.tnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() enter:\n");
ia_css_tnr_encode((struct sh_css_isp_tnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->tnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->tnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_tnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_tnr() leave:\n");
}
}
}
static void
ia_css_process_macc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.macc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() enter:\n");
ia_css_macc_encode((struct sh_css_isp_macc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->macc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->macc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_macc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_macc() leave:\n");
}
}
}
static void
ia_css_process_sdis_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() enter:\n");
ia_css_sdis_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() enter:\n");
ia_css_sdis_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() enter:\n");
ia_css_sdis_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() enter:\n");
ia_css_sdis_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis_vertproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horicoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_horicoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() enter:\n");
ia_css_sdis2_horicoef_vmem_encode((struct sh_css_isp_sdis_hori_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horicoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horicoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertcoef(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.sdis2_vertcoef.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() enter:\n");
ia_css_sdis2_vertcoef_vmem_encode((struct sh_css_isp_sdis_vert_coef_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertcoef() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertcoef() leave:\n");
}
}
}
static void
ia_css_process_sdis2_horiproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_horiproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() enter:\n");
ia_css_sdis2_horiproj_encode((struct sh_css_isp_sdis_hori_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_horiproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_horiproj() leave:\n");
}
}
}
static void
ia_css_process_sdis2_vertproj(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.sdis2_vertproj.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() enter:\n");
ia_css_sdis2_vertproj_encode((struct sh_css_isp_sdis_vert_proj_tbl *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->dvs2_coefs,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->dvs2_coefs,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_sdis2_vertproj() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_sdis2_vertproj() leave:\n");
}
}
}
static void
ia_css_process_wb(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.wb.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() enter:\n");
ia_css_wb_encode((struct sh_css_isp_wb_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->wb_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->wb_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_wb() leave:\n");
}
static void
ia_css_process_nr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.nr.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() enter:\n");
ia_css_nr_encode((struct sh_css_isp_ynr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->nr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->nr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_nr() leave:\n");
}
static void
ia_css_process_yee(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.yee.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() enter:\n");
ia_css_yee_encode((struct sh_css_isp_yee_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->yee_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->yee_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_yee() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_yee() leave:\n");
}
}
}
static void
ia_css_process_ynr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ynr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() enter:\n");
ia_css_ynr_encode((struct sh_css_isp_yee2_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ynr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ynr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ynr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ynr() leave:\n");
}
}
}
static void
ia_css_process_fc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.fc.offset;
if (size) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() enter:\n");
ia_css_fc_encode((struct sh_css_isp_fc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->fc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->fc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_fc() leave:\n");
}
static void
ia_css_process_ctc(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_encode((struct sh_css_isp_ctc_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->ctc_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->ctc_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem0.ctc.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() enter:\n");
ia_css_ctc_vamem_encode((struct sh_css_isp_ctc_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
- ¶ms->ctc_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM0].address[offset],
+ ¶ms->ctc_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM0] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_ctc() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_ctc() leave:\n");
}
}
}
static void
ia_css_process_xnr_table(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vamem1.xnr_table.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() enter:\n");
ia_css_xnr_table_vamem_encode((struct sh_css_isp_xnr_vamem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
- ¶ms->xnr_table,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VAMEM1].address[offset],
+ ¶ms->xnr_table,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VAMEM1] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr_table() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr_table() leave:\n");
}
}
}
static void
ia_css_process_xnr(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() enter:\n");
ia_css_xnr_encode((struct sh_css_isp_xnr_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr() leave:\n");
}
}
}
static void
ia_css_process_xnr3(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
assert(params);
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_encode((struct sh_css_isp_xnr3_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#ifdef ISP2401
{
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->vmem.xnr3.offset;
if (size) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() enter:\n");
ia_css_xnr3_vmem_encode((struct sh_css_isp_xnr3_vmem_params *)
- &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
- ¶ms->xnr3_config,
-size);
+ &stage->binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_VMEM].address[offset],
+ ¶ms->xnr3_config,
+ size);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_VMEM] =
+ true;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_process_xnr3() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_process_xnr3() leave:\n");
}
}
#endif
/* Code generated by genparam/gencode.c:gen_param_process_table() */
void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params) = {
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params) = {
ia_css_process_aa,
ia_css_process_anr,
ia_css_process_anr2,
static void
ia_css_get_dp_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dp_config *config){
+ struct ia_css_dp_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() enter: config=%p\n",
+ config);
*config = params->dp_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_dp_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_dp_config() leave\n");
ia_css_dp_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config)
+ const struct ia_css_dp_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DP_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_dp_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_dp_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_wb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_wb_config *config){
+ struct ia_css_wb_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() enter: config=%p\n",
+ config);
*config = params->wb_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_wb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_wb_config() leave\n");
ia_css_wb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config)
+ const struct ia_css_wb_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_WB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_wb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_wb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_tnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_tnr_config *config){
+ struct ia_css_tnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() enter: config=%p\n",
+ config);
*config = params->tnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_tnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_tnr_config() leave\n");
ia_css_tnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config)
+ const struct ia_css_tnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_TNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_tnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_tnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ob_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ob_config *config){
+ struct ia_css_ob_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() enter: config=%p\n",
+ config);
*config = params->ob_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ob_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ob_config() leave\n");
ia_css_ob_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config)
+ const struct ia_css_ob_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ob_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ob_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_de_config(const struct ia_css_isp_parameters *params,
- struct ia_css_de_config *config){
+ struct ia_css_de_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() enter: config=%p\n",
+ config);
*config = params->de_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_de_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_de_config() leave\n");
ia_css_de_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config)
+ const struct ia_css_de_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_DE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_de_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_de_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_config *config){
+ struct ia_css_anr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() enter: config=%p\n",
+ config);
*config = params->anr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr_config() leave\n");
ia_css_anr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config)
+ const struct ia_css_anr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_anr2_config(const struct ia_css_isp_parameters *params,
- struct ia_css_anr_thres *config){
+ struct ia_css_anr_thres *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() enter: config=%p\n",
+ config);
*config = params->anr_thres;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_anr2_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_anr2_config() leave\n");
ia_css_anr2_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config)
+ const struct ia_css_anr_thres *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ANR2_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_anr2_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_anr2_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ce_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ce_config *config){
+ struct ia_css_ce_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() enter: config=%p\n",
+ config);
*config = params->ce_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ce_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ce_config() leave\n");
ia_css_ce_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config)
+ const struct ia_css_ce_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ce_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ce_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ecd_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ecd_config *config){
+ struct ia_css_ecd_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() enter: config=%p\n",
+ config);
*config = params->ecd_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ecd_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ecd_config() leave\n");
ia_css_ecd_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config)
+ const struct ia_css_ecd_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_ECD_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ecd_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ecd_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ynr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ynr_config *config){
+ struct ia_css_ynr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() enter: config=%p\n",
+ config);
*config = params->ynr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ynr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ynr_config() leave\n");
ia_css_ynr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config)
+ const struct ia_css_ynr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ynr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ynr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_fc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_fc_config *config){
+ struct ia_css_fc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() enter: config=%p\n",
+ config);
*config = params->fc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_fc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_fc_config() leave\n");
ia_css_fc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config)
+ const struct ia_css_fc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_fc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_fc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_cnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cnr_config *config){
+ struct ia_css_cnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() enter: config=%p\n",
+ config);
*config = params->cnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_cnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_cnr_config() leave\n");
ia_css_cnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config)
+ const struct ia_css_cnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_cnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_cnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_macc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_macc_config *config){
+ struct ia_css_macc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() enter: config=%p\n",
+ config);
*config = params->macc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_macc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_macc_config() leave\n");
ia_css_macc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config)
+ const struct ia_css_macc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_MACC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_macc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_macc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_ctc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ctc_config *config){
+ struct ia_css_ctc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() enter: config=%p\n",
+ config);
*config = params->ctc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_ctc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_ctc_config() leave\n");
ia_css_ctc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config)
+ const struct ia_css_ctc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CTC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_ctc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_ctc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_aa_config(const struct ia_css_isp_parameters *params,
- struct ia_css_aa_config *config){
+ struct ia_css_aa_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() enter: config=%p\n",
+ config);
*config = params->aa_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_aa_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_aa_config() leave\n");
}
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config)
+ const struct ia_css_aa_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_AA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_aa_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_aa_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_yuv2rgb_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() enter: config=%p\n",
+ config);
*config = params->yuv2rgb_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_yuv2rgb_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_yuv2rgb_config() leave\n");
ia_css_yuv2rgb_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_YUV2RGB_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_yuv2rgb_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_yuv2rgb_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_rgb2yuv_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() enter: config=%p\n",
+ config);
*config = params->rgb2yuv_cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_rgb2yuv_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_rgb2yuv_config() leave\n");
ia_css_rgb2yuv_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_RGB2YUV_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_rgb2yuv_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_rgb2yuv_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_csc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_cc_config *config){
+ struct ia_css_cc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() enter: config=%p\n",
+ config);
*config = params->cc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_csc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_csc_config() leave\n");
ia_css_csc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config)
+ const struct ia_css_cc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_CSC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_csc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_csc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_nr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_nr_config *config){
+ struct ia_css_nr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() enter: config=%p\n",
+ config);
*config = params->nr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_nr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_nr_config() leave\n");
ia_css_nr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config)
+ const struct ia_css_nr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_NR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_nr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_nr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_gc_config(const struct ia_css_isp_parameters *params,
- struct ia_css_gc_config *config){
+ struct ia_css_gc_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() enter: config=%p\n",
+ config);
*config = params->gc_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_gc_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_gc_config() leave\n");
ia_css_gc_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config)
+ const struct ia_css_gc_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_GC_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_gc_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_gc_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horicoef_config() leave\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horicoef_config() enter:\n");
ia_css_sdis_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertcoef_config() leave\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertcoef_config() enter:\n");
ia_css_sdis_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_horiproj_config() leave\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_horiproj_config() enter:\n");
ia_css_sdis_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_coefficients *config){
+ struct ia_css_dvs_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis_vertproj_config() leave\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config)
+ const struct ia_css_dvs_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis_vertproj_config() enter:\n");
ia_css_sdis_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs_coefs = *config;
params->config_changed[IA_CSS_SDIS_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horicoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horicoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horicoef_config() leave\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horicoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horicoef_config() enter:\n");
ia_css_sdis2_horicoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horicoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertcoef_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertcoef_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertcoef_config() leave\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertcoef_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertcoef_config() enter:\n");
ia_css_sdis2_vertcoef_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTCOEF_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertcoef_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_horiproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_horiproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_horiproj_config() leave\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_horiproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_horiproj_config() enter:\n");
ia_css_sdis2_horiproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_HORIPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_horiproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_sdis2_vertproj_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dvs2_coefficients *config){
+ struct ia_css_dvs2_coefficients *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() enter: config=%p\n",
+ config);
*config = params->dvs2_coefs;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_sdis2_vertproj_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_sdis2_vertproj_config() leave\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config)
+ const struct ia_css_dvs2_coefficients *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_sdis2_vertproj_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_sdis2_vertproj_config() enter:\n");
ia_css_sdis2_vertproj_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->dvs2_coefs = *config;
params->config_changed[IA_CSS_SDIS2_HORICOEF_ID] = true;
params->config_changed[IA_CSS_SDIS2_VERTPROJ_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_sdis2_vertproj_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_r_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() enter: config=%p\n",
+ config);
*config = params->r_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_r_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_r_gamma_config() leave\n");
ia_css_r_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_R_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_r_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_r_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_g_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() enter: config=%p\n",
+ config);
*config = params->g_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_g_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_g_gamma_config() leave\n");
ia_css_g_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_G_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_g_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_g_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_b_gamma_config(const struct ia_css_isp_parameters *params,
- struct ia_css_rgb_gamma_table *config){
+ struct ia_css_rgb_gamma_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() enter: config=%p\n",
+ config);
*config = params->b_gamma_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_b_gamma_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_b_gamma_config() leave\n");
ia_css_b_gamma_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config)
+ const struct ia_css_rgb_gamma_table *config)
{
if (!config)
return;
params->config_changed[IA_CSS_B_GAMMA_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_b_gamma_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_b_gamma_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_table_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_table *config){
+ struct ia_css_xnr_table *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() enter: config=%p\n",
+ config);
*config = params->xnr_table;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_table_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_table_config() leave\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config)
+ const struct ia_css_xnr_table *config)
{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_set_xnr_table_config() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_set_xnr_table_config() enter:\n");
ia_css_xnr_table_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
params->xnr_table = *config;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
params->config_changed[IA_CSS_XNR_TABLE_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_table_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_table_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_formats_config(const struct ia_css_isp_parameters *params,
- struct ia_css_formats_config *config){
+ struct ia_css_formats_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() enter: config=%p\n",
+ config);
*config = params->formats_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_formats_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_formats_config() leave\n");
ia_css_formats_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config)
+ const struct ia_css_formats_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_FORMATS_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_formats_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_formats_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr_config *config){
+ struct ia_css_xnr_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() enter: config=%p\n",
+ config);
*config = params->xnr_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr_config() leave\n");
ia_css_xnr_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config)
+ const struct ia_css_xnr_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_xnr3_config(const struct ia_css_isp_parameters *params,
- struct ia_css_xnr3_config *config){
+ struct ia_css_xnr3_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() enter: config=%p\n",
+ config);
*config = params->xnr3_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_xnr3_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_xnr3_config() leave\n");
ia_css_xnr3_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config)
+ const struct ia_css_xnr3_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_XNR3_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_xnr3_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_xnr3_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_s3a_config(const struct ia_css_isp_parameters *params,
- struct ia_css_3a_config *config){
+ struct ia_css_3a_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() enter: config=%p\n",
+ config);
*config = params->s3a_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_s3a_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_s3a_config() leave\n");
ia_css_s3a_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config)
+ const struct ia_css_3a_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_S3A_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_s3a_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_s3a_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_get_function() */
static void
ia_css_get_output_config(const struct ia_css_isp_parameters *params,
- struct ia_css_output_config *config){
+ struct ia_css_output_config *config)
+{
if (!config)
return;
assert(params);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() enter: config=%p\n",
- config);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() enter: config=%p\n",
+ config);
*config = params->output_config;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_get_output_config() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_get_output_config() leave\n");
ia_css_output_debug_dtrace(config, IA_CSS_DEBUG_TRACE);
}
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config)
+ const struct ia_css_output_config *config)
{
if (!config)
return;
params->config_changed[IA_CSS_OUTPUT_ID] = true;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_set_output_config() leave: return_void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_set_output_config() leave: return_void\n");
}
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_get_dp_config(params, config->dp_config);
ia_css_get_wb_config(params, config->wb_config);
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
{
ia_css_set_dp_config(params, config->dp_config);
ia_css_set_wb_config(params, config->wb_config);
struct ia_css_pipeline_stage; /* forward declaration */
extern void (*ia_css_kernel_process_param[IA_CSS_NUM_PARAMETER_IDS])(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params);
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_dp_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config);
+ const struct ia_css_dp_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_wb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_wb_config *config);
+ const struct ia_css_wb_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_tnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_tnr_config *config);
+ const struct ia_css_tnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ob_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ob_config *config);
+ const struct ia_css_ob_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_de_config(struct ia_css_isp_parameters *params,
- const struct ia_css_de_config *config);
+ const struct ia_css_de_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_config *config);
+ const struct ia_css_anr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_anr2_config(struct ia_css_isp_parameters *params,
- const struct ia_css_anr_thres *config);
+ const struct ia_css_anr_thres *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ce_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ce_config *config);
+ const struct ia_css_ce_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ecd_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ecd_config *config);
+ const struct ia_css_ecd_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ynr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ynr_config *config);
+ const struct ia_css_ynr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_fc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_fc_config *config);
+ const struct ia_css_fc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_cnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cnr_config *config);
+ const struct ia_css_cnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_macc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_config *config);
+ const struct ia_css_macc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_ctc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_config *config);
+ const struct ia_css_ctc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_aa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config);
+ const struct ia_css_aa_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_yuv2rgb_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_rgb2yuv_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_csc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_cc_config *config);
+ const struct ia_css_cc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config);
+ const struct ia_css_nr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_gc_config(struct ia_css_isp_parameters *params,
- const struct ia_css_gc_config *config);
+ const struct ia_css_gc_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *config);
+ const struct ia_css_dvs_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horicoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertcoef_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_horiproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_sdis2_vertproj_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *config);
+ const struct ia_css_dvs2_coefficients *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_r_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_g_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_b_gamma_config(struct ia_css_isp_parameters *params,
- const struct ia_css_rgb_gamma_table *config);
+ const struct ia_css_rgb_gamma_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_table_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_table *config);
+ const struct ia_css_xnr_table *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_formats_config(struct ia_css_isp_parameters *params,
- const struct ia_css_formats_config *config);
+ const struct ia_css_formats_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr_config *config);
+ const struct ia_css_xnr_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_xnr3_config(struct ia_css_isp_parameters *params,
- const struct ia_css_xnr3_config *config);
+ const struct ia_css_xnr3_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_s3a_config(struct ia_css_isp_parameters *params,
- const struct ia_css_3a_config *config);
+ const struct ia_css_3a_config *config);
/* Code generated by genparam/gencode.c:gen_set_function() */
void
ia_css_set_output_config(struct ia_css_isp_parameters *params,
- const struct ia_css_output_config *config);
+ const struct ia_css_output_config *config);
/* Code generated by genparam/gencode.c:gen_global_access_function() */
void
ia_css_get_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
void
ia_css_set_configs(struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config)
+ const struct ia_css_isp_config *config)
;
#ifdef ISP2401
static void
ia_css_initialize_aa_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.aa.size;
unsigned int offset = binary->info->mem_offsets.offsets.state->vmem.aa.offset;
if (size)
- memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset], 0, size);
+ memset(&binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ 0, size);
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_aa_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_aa_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr.size;
if (size) {
ia_css_init_cnr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_cnr2_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.cnr2.size;
if (size) {
ia_css_init_cnr2_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_cnr2_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_cnr2_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_dp_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.dp.size;
if (size) {
ia_css_init_dp_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_dp_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_dp_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_de_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.de.size;
if (size) {
ia_css_init_de_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_de_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_de_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_tnr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.tnr.size;
if (size) {
ia_css_init_tnr_state((struct sh_css_isp_tnr_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_tnr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_tnr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ref_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->dmem.ref.size;
if (size) {
ia_css_init_ref_state((struct sh_css_isp_ref_dmem_state *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_DMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ref_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ref_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_init_function() */
static void
ia_css_initialize_ynr_state(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() enter:\n");
{
unsigned int size = binary->info->mem_offsets.offsets.state->vmem.ynr.size;
if (size) {
ia_css_init_ynr_state(
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
- size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_STATE][IA_CSS_ISP_VMEM].address[offset],
+ size);
}
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_initialize_ynr_state() leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_initialize_ynr_state() leave:\n");
}
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary) = {
+void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary) = {
ia_css_initialize_aa_state,
ia_css_initialize_cnr_state,
ia_css_initialize_cnr2_state,
#include "ia_css_binary.h" /* struct ia_css_binary */
/* Code generated by genparam/genstate.c:gen_state_init_table() */
-extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(const struct ia_css_binary *binary);
+extern void (* ia_css_kernel_init_state[IA_CSS_NUM_STATE_IDS])(
+ const struct ia_css_binary *binary);
#endif /* IA_CSS_INCLUDE_STATE */
#define _DMA_V2_ZERO_EXTEND 0
#define _DMA_V2_SIGN_EXTEND 1
- /* SLAVE address map */
+/* SLAVE address map */
#define _DMA_V2_SEL_FSM_CMD 0
#define _DMA_V2_SEL_CH_REG 1
#define _DMA_V2_SEL_CONN_GROUP 2
#define HRT_GDC_BCI_COEF_BITS 14 /* 14 bits per coefficient */
#define HRT_GDC_BCI_COEF_ONE (1 << (HRT_GDC_BCI_COEF_BITS - 2)) /* We represent signed 10 bit coefficients. */
- /* The supported range is [-256, .., +256] */
- /* in 14-bit signed notation, */
- /* We need all ten bits (MSB must be zero). */
- /* -s is inserted to solve this issue, and */
- /* therefore "1" is equal to +256. */
+/* The supported range is [-256, .., +256] */
+/* in 14-bit signed notation, */
+/* We need all ten bits (MSB must be zero). */
+/* -s is inserted to solve this issue, and */
+/* therefore "1" is equal to +256. */
#define HRT_GDC_BCI_COEF_MASK ((1 << HRT_GDC_BCI_COEF_BITS) - 1)
#define HRT_GDC_LUT_BYTES (HRT_GDC_N * 4 * 2) /* 1024 addresses, 4 coefficients per address, */
- /* 2 bytes per coefficient */
+/* 2 bytes per coefficient */
#define _HRT_GDC_REG_ALIGN 4
- // 31 30 29 25 24 0
- // |-----|---|--------|------------------------|
- // | CMD | C | Reg_ID | Value |
+// 31 30 29 25 24 0
+// |-----|---|--------|------------------------|
+// | CMD | C | Reg_ID | Value |
- // There are just two commands possible for the GDC block:
- // 1 - Configure reg
- // 0 - Data token
+// There are just two commands possible for the GDC block:
+// 1 - Configure reg
+// 0 - Data token
- // C - Reserved bit
- // Used in protocol to indicate whether it is C-run or other type of runs
- // In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
+// C - Reserved bit
+// Used in protocol to indicate whether it is C-run or other type of runs
+// In case of C-run, this bit has a value of 1, for all the other runs, it is 0.
- // Reg_ID - Address of the register to be configured
+// Reg_ID - Address of the register to be configured
- // Value - Value to store to the addressed register, maximum of 24 bits
+// Value - Value to store to the addressed register, maximum of 24 bits
- // Configure reg command is not followed by any other token.
- // The address of the register and the data to be filled in is contained in the same token
+// Configure reg command is not followed by any other token.
+// The address of the register and the data to be filled in is contained in the same token
- // When the first data token is received, it must be:
- // 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
- // 2. P0'X (device configured in one of the tetragon modes)
- // After the first data token is received, pre-defined number of tokens with the following meaning follow:
- // 1. two tokens: SRC address ; DST address
- // 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
+// When the first data token is received, it must be:
+// 1. FRX and FRY (device configured in one of the scaling modes) ***DEFAULT MODE***, or,
+// 2. P0'X (device configured in one of the tetragon modes)
+// After the first data token is received, pre-defined number of tokens with the following meaning follow:
+// 1. two tokens: SRC address ; DST address
+// 2. nine tokens: P0'Y, .., P3'Y ; SRC address ; DST address
#define HRT_GDC_CONFIG_CMD 1
#define HRT_GDC_DATA_CMD 0
#define _HRT_GPIO_BLOCK_REG_ALIGN 4
/* R/W registers */
-#define _gpio_block_reg_do_e 0
+#define _gpio_block_reg_do_e 0
#define _gpio_block_reg_do_select 1
-#define _gpio_block_reg_do_0 2
-#define _gpio_block_reg_do_1 3
+#define _gpio_block_reg_do_0 2
+#define _gpio_block_reg_do_1 3
#define _gpio_block_reg_do_pwm_cnt_0 4
#define _gpio_block_reg_do_pwm_cnt_1 5
#define _gpio_block_reg_do_pwm_cnt_2 6
#define _gpio_block_reg_di_active_level 15
/* read-only registers */
-#define _gpio_block_reg_di 16
+#define _gpio_block_reg_di 16
#endif /* _gpio_block_defs_h_ */
* The definitions are taken from <system>_defs.h
*/
typedef enum hrt_isp_css_irq {
- hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
- hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
- hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
- hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
- hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
- hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
- hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
- hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
- hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
- hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
- hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
- hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
- hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
- hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
- hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
- hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
- hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
- hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
- hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
- hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
- hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
- hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
- hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
- hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
- hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
- hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
- /* this must (obviously) be the last on in the enum */
- hrt_isp_css_irq_num_irqs
+ hrt_isp_css_irq_gpio_pin_0 = HIVE_GP_DEV_IRQ_GPIO_PIN_0_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_1 = HIVE_GP_DEV_IRQ_GPIO_PIN_1_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_2 = HIVE_GP_DEV_IRQ_GPIO_PIN_2_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_3 = HIVE_GP_DEV_IRQ_GPIO_PIN_3_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_4 = HIVE_GP_DEV_IRQ_GPIO_PIN_4_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_5 = HIVE_GP_DEV_IRQ_GPIO_PIN_5_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_6 = HIVE_GP_DEV_IRQ_GPIO_PIN_6_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_7 = HIVE_GP_DEV_IRQ_GPIO_PIN_7_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_8 = HIVE_GP_DEV_IRQ_GPIO_PIN_8_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_9 = HIVE_GP_DEV_IRQ_GPIO_PIN_9_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_10 = HIVE_GP_DEV_IRQ_GPIO_PIN_10_BIT_ID,
+ hrt_isp_css_irq_gpio_pin_11 = HIVE_GP_DEV_IRQ_GPIO_PIN_11_BIT_ID,
+ hrt_isp_css_irq_sp = HIVE_GP_DEV_IRQ_SP_BIT_ID,
+ hrt_isp_css_irq_isp = HIVE_GP_DEV_IRQ_ISP_BIT_ID,
+ hrt_isp_css_irq_isys = HIVE_GP_DEV_IRQ_ISYS_BIT_ID,
+ hrt_isp_css_irq_isel = HIVE_GP_DEV_IRQ_ISEL_BIT_ID,
+ hrt_isp_css_irq_ifmt = HIVE_GP_DEV_IRQ_IFMT_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon = HIVE_GP_DEV_IRQ_SP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_isp_stream_mon = HIVE_GP_DEV_IRQ_ISP_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_mod_stream_mon = HIVE_GP_DEV_IRQ_MOD_STREAM_MON_BIT_ID,
+ hrt_isp_css_irq_is2401 = HIVE_GP_DEV_IRQ_IS2401_BIT_ID,
+ hrt_isp_css_irq_isp_bamem_error = HIVE_GP_DEV_IRQ_ISP_BAMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_isp_dmem_error = HIVE_GP_DEV_IRQ_ISP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_icache_mem_error = HIVE_GP_DEV_IRQ_SP_ICACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_sp_dmem_error = HIVE_GP_DEV_IRQ_SP_DMEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_mmu_cache_mem_error = HIVE_GP_DEV_IRQ_MMU_CACHE_MEM_ERROR_BIT_ID,
+ hrt_isp_css_irq_gp_timer_0 = HIVE_GP_DEV_IRQ_GP_TIMER_0_BIT_ID,
+ hrt_isp_css_irq_gp_timer_1 = HIVE_GP_DEV_IRQ_GP_TIMER_1_BIT_ID,
+ hrt_isp_css_irq_sw_pin_0 = HIVE_GP_DEV_IRQ_SW_PIN_0_BIT_ID,
+ hrt_isp_css_irq_sw_pin_1 = HIVE_GP_DEV_IRQ_SW_PIN_1_BIT_ID,
+ hrt_isp_css_irq_dma = HIVE_GP_DEV_IRQ_DMA_BIT_ID,
+ hrt_isp_css_irq_sp_stream_mon_b = HIVE_GP_DEV_IRQ_SP_STREAM_MON_B_BIT_ID,
+ /* this must (obviously) be the last on in the enum */
+ hrt_isp_css_irq_num_irqs
} hrt_isp_css_irq_t;
typedef enum hrt_isp_css_irq_status {
- hrt_isp_css_irq_status_error,
- hrt_isp_css_irq_status_more_irqs,
- hrt_isp_css_irq_status_success
+ hrt_isp_css_irq_status_error,
+ hrt_isp_css_irq_status_more_irqs,
+ hrt_isp_css_irq_status_success
} hrt_isp_css_irq_status_t;
#endif /* _HIVE_ISP_CSS_2401_IRQ_TYPES_HRT_H_ */
#define hrt_isp_vmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_vmem(cell))
#if ISP_HAS_HIST
- #define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
- #define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
+#define hrt_isp_hist(cell) HRT_PROC_TYPE_PROP(cell, _simd_histogram)
+#define hrt_isp_hist_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_isp_hist(cell))
#endif
#endif /* _isp2400_support_h */
#define ISP_VMEM_ELEM_PRECISION 14
#define ISP_VMEM_IS_BAMEM 1
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
- #define ISP_VMEM_BAMEM_LATENCY 5
- #define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
- #define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
- #define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
- #define ISP_VMEM_BAMEM_LININT 0
- #define ISP_VMEM_BAMEM_DAP_BITS 3
- #define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
- #define ISP_VMEM_BAMEM_PID_BITS 3
- #define ISP_VMEM_BAMEM_OFFSET_BITS 19
- #define ISP_VMEM_BAMEM_ADDRESS_BITS 25
- #define ISP_VMEM_BAMEM_RID_BITS 4
- #define ISP_VMEM_BAMEM_TRANSPOSITION 1
- #define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
- #define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
- #define ISP_VMEM_BAMEM_LUT_ELEMS 16
- #define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
- #define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
- #define ISP_VMEM_BAMEM_SMART_FETCH 1
- #define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
+#define ISP_VMEM_BAMEM_MAX_BOI_HEIGHT 8
+#define ISP_VMEM_BAMEM_LATENCY 5
+#define ISP_VMEM_BAMEM_BANK_NARROWING_FACTOR 2
+#define ISP_VMEM_BAMEM_NR_DATA_PLANES 8
+#define ISP_VMEM_BAMEM_NR_CFG_REGISTERS 16
+#define ISP_VMEM_BAMEM_LININT 0
+#define ISP_VMEM_BAMEM_DAP_BITS 3
+#define ISP_VMEM_BAMEM_LININT_FRAC_BITS 0
+#define ISP_VMEM_BAMEM_PID_BITS 3
+#define ISP_VMEM_BAMEM_OFFSET_BITS 19
+#define ISP_VMEM_BAMEM_ADDRESS_BITS 25
+#define ISP_VMEM_BAMEM_RID_BITS 4
+#define ISP_VMEM_BAMEM_TRANSPOSITION 1
+#define ISP_VMEM_BAMEM_VEC_PLUS_SLICE 1
+#define ISP_VMEM_BAMEM_ARB_SERVICE_CYCLE_BITS 1
+#define ISP_VMEM_BAMEM_LUT_ELEMS 16
+#define ISP_VMEM_BAMEM_LUT_ADDR_WIDTH 14
+#define ISP_VMEM_BAMEM_HALF_BLOCK_WRITE 1
+#define ISP_VMEM_BAMEM_SMART_FETCH 1
+#define ISP_VMEM_BAMEM_BIG_ENDIANNESS 0
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_PMEM_DEPTH 2048
#define ISP_PMEM_WIDTH 640
#define ISP_SRU_GUARDING 1
#define ISP_VLSU_GUARDING 1
-#define ISP_VRF_RAM 1
-#define ISP_SRF_RAM 1
+#define ISP_VRF_RAM 1
+#define ISP_SRF_RAM 1
#define ISP_SPLIT_VMUL_VADD_IS 0
#define ISP_RFSPLIT_FPGA 0
#define ISP_VMEM_WIDTH 896
#define ISP_VMEM_ALIGN 128
#if ISP_VMEM_IS_BAMEM
- #define ISP_VMEM_ALIGN_ELEM 2
+#define ISP_VMEM_ALIGN_ELEM 2
#endif /* ISP_VMEM_IS_BAMEM */
#define ISP_SIMDLSU 1
#define ISP_LSU_IMM_BITS 12
typedef unsigned int dma_channel;
typedef enum {
- dma_isp_to_bus_connection = HIVE_DMA_ISP_BUS_CONN,
- dma_isp_to_ddr_connection = HIVE_DMA_ISP_DDR_CONN,
- dma_bus_to_ddr_connection = HIVE_DMA_BUS_DDR_CONN,
+ dma_isp_to_bus_connection = HIVE_DMA_ISP_BUS_CONN,
+ dma_isp_to_ddr_connection = HIVE_DMA_ISP_DDR_CONN,
+ dma_bus_to_ddr_connection = HIVE_DMA_BUS_DDR_CONN,
} dma_connection;
typedef enum {
- dma_zero_extension = _DMA_ZERO_EXTEND,
- dma_sign_extension = _DMA_SIGN_EXTEND
+ dma_zero_extension = _DMA_ZERO_EXTEND,
+ dma_sign_extension = _DMA_SIGN_EXTEND
} dma_extension;
#define DMA_PROP_SHIFT(val, param) ((val) << _DMA_V2_ ## param ## _IDX)
/* set the ddr queue */
debug_buffer_ddr_address = addr;
mmgr_store(addr + DEBUG_DATA_BUF_MODE_DDR_ADDR,
- &mode, sizeof(debug_buf_mode_t));
+ &mode, sizeof(debug_buf_mode_t));
mmgr_store(addr + DEBUG_DATA_HEAD_DDR_ADDR,
- &head, sizeof(uint32_t));
+ &head, sizeof(uint32_t));
mmgr_store(addr + DEBUG_DATA_TAIL_DDR_ADDR,
- &tail, sizeof(uint32_t));
+ &tail, sizeof(uint32_t));
mmgr_store(addr + DEBUG_DATA_ENABLE_DDR_ADDR,
- &enable, sizeof(uint32_t));
+ &enable, sizeof(uint32_t));
/* set the local copy */
debug_data.head = 0;
assert(debug_buffer_address != ((hrt_address)-1));
sp_dmem_store_uint32(SP0_ID,
- debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
+ debug_buffer_address + DEBUG_DATA_BUF_MODE_ADDR, mode);
}
if (!is_debug_buffer_empty()) {
value = debug_data_ptr->buf[debug_data_ptr->head];
debug_data_ptr->head = (debug_data_ptr->head + 1) & DEBUG_BUF_MASK;
- sp_dmem_store_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_HEAD_ADDR, debug_data_ptr->head);
+ sp_dmem_store_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_HEAD_ADDR,
+ debug_data_ptr->head);
}
return value;
STORAGE_CLASS_DEBUG_C void debug_synch_queue(void)
{
- u32 remote_tail = sp_dmem_load_uint32(SP0_ID, debug_buffer_address + DEBUG_DATA_TAIL_ADDR);
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+ u32 remote_tail = sp_dmem_load_uint32(SP0_ID,
+ debug_buffer_address + DEBUG_DATA_TAIL_ADDR);
+ /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
if (remote_tail > debug_data_ptr->tail) {
size_t delta = remote_tail - debug_data_ptr->tail;
- sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
} else if (remote_tail < debug_data_ptr->tail) {
size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
- sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
- sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+ sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ sp_dmem_load(SP0_ID, debug_buffer_address + DEBUG_DATA_BUF_ADDR,
+ (void *)&debug_data_ptr->buf[0],
+ remote_tail * sizeof(uint32_t));
} /* else we are up to date */
debug_data_ptr->tail = remote_tail;
}
STORAGE_CLASS_DEBUG_C void debug_synch_queue_isp(void)
{
- u32 remote_tail = isp_dmem_load_uint32(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_TAIL_ADDR);
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+ u32 remote_tail = isp_dmem_load_uint32(ISP0_ID,
+ DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_TAIL_ADDR);
+ /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
if (remote_tail > debug_data_ptr->tail) {
size_t delta = remote_tail - debug_data_ptr->tail;
- isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
} else if (remote_tail < debug_data_ptr->tail) {
size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
- isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
- isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+ isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ isp_dmem_load(ISP0_ID, DEBUG_BUFFER_ISP_DMEM_ADDR + DEBUG_DATA_BUF_ADDR,
+ (void *)&debug_data_ptr->buf[0],
+ remote_tail * sizeof(uint32_t));
} /* else we are up to date */
debug_data_ptr->tail = remote_tail;
}
{
u32 remote_tail;
- mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_TAIL_DDR_ADDR, &remote_tail, sizeof(uint32_t));
-/* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
+ mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_TAIL_DDR_ADDR, &remote_tail,
+ sizeof(uint32_t));
+ /* We could move the remote head after the upload, but we would have to limit the upload w.r.t. the local head. This is easier */
if (remote_tail > debug_data_ptr->tail) {
size_t delta = remote_tail - debug_data_ptr->tail;
- mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
} else if (remote_tail < debug_data_ptr->tail) {
size_t delta = DEBUG_BUF_SIZE - debug_data_ptr->tail;
- mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR + debug_data_ptr->tail * sizeof(uint32_t), (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
- mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR, (void *)&debug_data_ptr->buf[0], remote_tail * sizeof(uint32_t));
+ mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR +
+ debug_data_ptr->tail * sizeof(uint32_t),
+ (void *)&debug_data_ptr->buf[debug_data_ptr->tail], delta * sizeof(uint32_t));
+ mmgr_load(debug_buffer_ddr_address + DEBUG_DATA_BUF_DDR_ADDR,
+ (void *)&debug_data_ptr->buf[0],
+ remote_tail * sizeof(uint32_t));
} /* else we are up to date */
debug_data_ptr->tail = remote_tail;
}
state->last_command_channel = (tmp >> 10 & 0x1F);
state->last_command_param = (tmp >> 15 & 0x0F);
tmp = (tmp >> 4) & 0x3F;
-/* state->last_command = (dma_commands_t)tmp; */
-/* if the enumerator is made non-linear */
+ /* state->last_command = (dma_commands_t)tmp; */
+ /* if the enumerator is made non-linear */
/* AM: the list below does not cover all the cases*/
/* and these are not correct */
/* therefore for just dumpinmg this command*/
state->last_command = tmp;
-/*
- if (tmp == 0)
- state->last_command = DMA_COMMAND_READ;
- if (tmp == 1)
- state->last_command = DMA_COMMAND_WRITE;
- if (tmp == 2)
- state->last_command = DMA_COMMAND_SET_CHANNEL;
- if (tmp == 3)
- state->last_command = DMA_COMMAND_SET_PARAM;
- if (tmp == 4)
- state->last_command = DMA_COMMAND_READ_SPECIFIC;
- if (tmp == 5)
- state->last_command = DMA_COMMAND_WRITE_SPECIFIC;
- if (tmp == 8)
- state->last_command = DMA_COMMAND_INIT;
- if (tmp == 12)
- state->last_command = DMA_COMMAND_INIT_SPECIFIC;
- if (tmp == 15)
- state->last_command = DMA_COMMAND_RST;
-*/
+ /*
+ if (tmp == 0)
+ state->last_command = DMA_COMMAND_READ;
+ if (tmp == 1)
+ state->last_command = DMA_COMMAND_WRITE;
+ if (tmp == 2)
+ state->last_command = DMA_COMMAND_SET_CHANNEL;
+ if (tmp == 3)
+ state->last_command = DMA_COMMAND_SET_PARAM;
+ if (tmp == 4)
+ state->last_command = DMA_COMMAND_READ_SPECIFIC;
+ if (tmp == 5)
+ state->last_command = DMA_COMMAND_WRITE_SPECIFIC;
+ if (tmp == 8)
+ state->last_command = DMA_COMMAND_INIT;
+ if (tmp == 12)
+ state->last_command = DMA_COMMAND_INIT_SPECIFIC;
+ if (tmp == 15)
+ state->last_command = DMA_COMMAND_RST;
+ */
-/* No sub-fields, idx = 0 */
+ /* No sub-fields, idx = 0 */
state->current_command = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_CMD_IDX));
+ DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_CMD_IDX));
state->current_addr_a = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_A_IDX));
+ DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_A_IDX));
state->current_addr_b = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_B_IDX));
+ DMA_CG_INFO_REG_IDX(0, _DMA_FSM_GROUP_ADDR_B_IDX));
tmp = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_STATE_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_STATE_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_idle = tmp & 0x1;
state->fsm_ctrl_run = tmp & 0x2;
state->fsm_ctrl_stalling = tmp & 0x4;
state->fsm_ctrl_error = tmp & 0x8;
tmp = tmp >> 4;
-/* state->fsm_ctrl_state = (dma_ctrl_states_t)tmp; */
+ /* state->fsm_ctrl_state = (dma_ctrl_states_t)tmp; */
if (tmp == 0)
state->fsm_ctrl_state = DMA_CTRL_STATE_IDLE;
if (tmp == 1)
if (tmp == 4)
state->fsm_ctrl_state = DMA_CTRL_STATE_INIT;
state->fsm_ctrl_source_dev = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_REQ_DEV_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_source_addr = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_REQ_ADDR_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_source_stride = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_REQ_STRIDE_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_REQ_STRIDE_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_source_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_REQ_XB_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_REQ_XB_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_source_height = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_REQ_YB_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_REQ_YB_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_source_dev = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_DEV_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_DEV_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_dest_dev = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_DEV_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_DEV_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_dest_addr = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_WR_ADDR_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_WR_ADDR_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_dest_stride = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_WR_STRIDE_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_WR_STRIDE_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_source_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_XB_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_REQ_XB_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_dest_height = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_YB_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_YB_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_dest_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_XB_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_WR_XB_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_source_elems = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_REQ_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_REQ_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_dest_elems = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_WR_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_ELEM_WR_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
state->fsm_ctrl_pack_extension = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_CTRL_PACK_S_Z_IDX,
- _DMA_FSM_GROUP_FSM_CTRL_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_CTRL_PACK_S_Z_IDX,
+ _DMA_FSM_GROUP_FSM_CTRL_IDX));
tmp = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_PACK_STATE_IDX,
- _DMA_FSM_GROUP_FSM_PACK_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_PACK_STATE_IDX,
+ _DMA_FSM_GROUP_FSM_PACK_IDX));
state->pack_idle = tmp & 0x1;
state->pack_run = tmp & 0x2;
state->pack_stalling = tmp & 0x4;
state->pack_error = tmp & 0x8;
state->pack_cnt_height = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_PACK_CNT_YB_IDX,
- _DMA_FSM_GROUP_FSM_PACK_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_PACK_CNT_YB_IDX,
+ _DMA_FSM_GROUP_FSM_PACK_IDX));
state->pack_src_cnt_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_PACK_CNT_XB_REQ_IDX,
- _DMA_FSM_GROUP_FSM_PACK_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_PACK_CNT_XB_REQ_IDX,
+ _DMA_FSM_GROUP_FSM_PACK_IDX));
state->pack_dest_cnt_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_PACK_CNT_XB_WR_IDX,
- _DMA_FSM_GROUP_FSM_PACK_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_PACK_CNT_XB_WR_IDX,
+ _DMA_FSM_GROUP_FSM_PACK_IDX));
tmp = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_REQ_STATE_IDX,
- _DMA_FSM_GROUP_FSM_REQ_IDX));
-/* state->read_state = (dma_rw_states_t)tmp; */
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_REQ_STATE_IDX,
+ _DMA_FSM_GROUP_FSM_REQ_IDX));
+ /* state->read_state = (dma_rw_states_t)tmp; */
if (tmp == 0)
state->read_state = DMA_RW_STATE_IDLE;
if (tmp == 1)
if (tmp == 3)
state->read_state = DMA_RW_STATE_UNLOCK_CHANNEL;
state->read_cnt_height = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_REQ_CNT_YB_IDX,
- _DMA_FSM_GROUP_FSM_REQ_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_REQ_CNT_YB_IDX,
+ _DMA_FSM_GROUP_FSM_REQ_IDX));
state->read_cnt_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_REQ_CNT_XB_IDX,
- _DMA_FSM_GROUP_FSM_REQ_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_REQ_CNT_XB_IDX,
+ _DMA_FSM_GROUP_FSM_REQ_IDX));
tmp = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_WR_STATE_IDX,
- _DMA_FSM_GROUP_FSM_WR_IDX));
-/* state->write_state = (dma_rw_states_t)tmp; */
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_WR_STATE_IDX,
+ _DMA_FSM_GROUP_FSM_WR_IDX));
+ /* state->write_state = (dma_rw_states_t)tmp; */
if (tmp == 0)
state->write_state = DMA_RW_STATE_IDLE;
if (tmp == 1)
if (tmp == 3)
state->write_state = DMA_RW_STATE_UNLOCK_CHANNEL;
state->write_height = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_WR_CNT_YB_IDX,
- _DMA_FSM_GROUP_FSM_WR_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_WR_CNT_YB_IDX,
+ _DMA_FSM_GROUP_FSM_WR_IDX));
state->write_width = dma_reg_load(ID,
- DMA_CG_INFO_REG_IDX(
- _DMA_FSM_GROUP_FSM_WR_CNT_XB_IDX,
- _DMA_FSM_GROUP_FSM_WR_IDX));
+ DMA_CG_INFO_REG_IDX(
+ _DMA_FSM_GROUP_FSM_WR_CNT_XB_IDX,
+ _DMA_FSM_GROUP_FSM_WR_IDX));
for (i = 0; i < HIVE_ISP_NUM_DMA_CONNS; i++) {
dma_port_state_t *port = &state->port_states[i];
dma_channel_state_t *ch = &state->channel_states[i];
ch->connection = DMA_GET_CONNECTION(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_PACKING_SETUP_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_PACKING_SETUP_PARAM)));
ch->sign_extend = DMA_GET_EXTENSION(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_PACKING_SETUP_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_PACKING_SETUP_PARAM)));
ch->height = dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_HEIGHT_PARAM));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_HEIGHT_PARAM));
ch->stride_a = dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_STRIDE_A_PARAM));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_STRIDE_A_PARAM));
ch->elems_a = DMA_GET_ELEMENTS(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_ELEM_CROPPING_A_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_ELEM_CROPPING_A_PARAM)));
ch->cropping_a = DMA_GET_CROPPING(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_ELEM_CROPPING_A_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_ELEM_CROPPING_A_PARAM)));
ch->width_a = dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_WIDTH_A_PARAM));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_WIDTH_A_PARAM));
ch->stride_b = dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_STRIDE_B_PARAM));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_STRIDE_B_PARAM));
ch->elems_b = DMA_GET_ELEMENTS(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_ELEM_CROPPING_B_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_ELEM_CROPPING_B_PARAM)));
ch->cropping_b = DMA_GET_CROPPING(dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_ELEM_CROPPING_B_PARAM)));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_ELEM_CROPPING_B_PARAM)));
ch->width_b = dma_reg_load(ID,
- DMA_CHANNEL_PARAM_REG_IDX(i,
- _DMA_WIDTH_B_PARAM));
+ DMA_CHANNEL_PARAM_REG_IDX(i,
+ _DMA_WIDTH_B_PARAM));
}
}
int fsm_ctrl_pack_dest_elems;
int fsm_ctrl_pack_extension;
int pack_idle;
- int pack_run;
+ int pack_run;
int pack_stalling;
- int pack_error;
+ int pack_error;
int pack_cnt_height;
int pack_src_cnt_width;
int pack_dest_cnt_width;
#include "assert_support.h"
STORAGE_CLASS_DMA_C void dma_reg_store(const dma_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const unsigned int reg,
+ const hrt_data value)
{
assert(ID < N_DMA_ID);
assert(DMA_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_DMA_C hrt_data dma_reg_load(const dma_ID_t ID,
- const unsigned int reg)
+ const unsigned int reg)
{
assert(ID < N_DMA_ID);
assert(DMA_BASE[ID] != (hrt_address) - 1);
static const hrt_address event_source_addr[N_EVENT_ID] = {
0x0000000000380000ULL,
0x0000000000380004ULL,
- 0xffffffffffffffffULL};
+ 0xffffffffffffffffULL
+};
/* Read from FIFO are blocking, query data availability */
static const hrt_address event_source_query_addr[N_EVENT_ID] = {
0x0000000000380010ULL,
0x0000000000380014ULL,
- 0xffffffffffffffffULL};
+ 0xffffffffffffffffULL
+};
/* Events are written to FIFO */
static const hrt_address event_sink_addr[N_EVENT_ID] = {
0x0000000000380008ULL,
0x000000000038000CULL,
- 0x0000000000090104ULL};
+ 0x0000000000090104ULL
+};
/* Writes to FIFO are blocking, query data space */
static const hrt_address event_sink_query_addr[N_EVENT_ID] = {
0x0000000000380018ULL,
0x000000000038001CULL,
- 0x000000000009010CULL};
+ 0x000000000009010CULL
+};
#endif /* _EVENT_FIFO_LOCAL_H */
}
STORAGE_CLASS_EVENT_C void cnd_event_wait_for(const event_ID_t ID,
- const bool cnd)
+ const bool cnd)
{
if (cnd) {
event_wait_for(ID);
}
STORAGE_CLASS_EVENT_C void event_send_token(const event_ID_t ID,
- const hrt_data token)
+ const hrt_data token)
{
assert(ID < N_EVENT_ID);
assert(event_sink_addr[ID] != ((hrt_address) - 1));
STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {
_REG_GP_SWITCH_IF_ADDR,
_REG_GP_SWITCH_GDC1_ADDR,
- _REG_GP_SWITCH_GDC2_ADDR};
+ _REG_GP_SWITCH_GDC2_ADDR
+};
#ifndef __INLINE_FIFO_MONITOR__
#include "fifo_monitor_private.h"
#endif /* __INLINE_FIFO_MONITOR__ */
static inline bool fifo_monitor_status_valid(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const unsigned int port_id);
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const unsigned int port_id);
static inline bool fifo_monitor_status_accept(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const unsigned int port_id);
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const unsigned int port_id);
void fifo_channel_get_state(
- const fifo_monitor_ID_t ID,
- const fifo_channel_t channel_id,
- fifo_channel_state_t *state)
+ const fifo_monitor_ID_t ID,
+ const fifo_channel_t channel_id,
+ fifo_channel_state_t *state)
{
assert(channel_id < N_FIFO_CHANNEL);
assert(state);
switch (channel_id) {
case FIFO_CHANNEL_ISP0_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_SP); /* ISP_STR_MON_PORT_ISP2SP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_SP); /* ISP_STR_MON_PORT_ISP2SP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_SP);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_SP);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_ISP); /* ISP_STR_MON_PORT_SP2ISP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_ISP); /* ISP_STR_MON_PORT_SP2ISP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_ISP);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_ISP);
break;
case FIFO_CHANNEL_SP0_TO_ISP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_ISP); /* ISP_STR_MON_PORT_SP2ISP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_ISP); /* ISP_STR_MON_PORT_SP2ISP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_ISP);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_ISP);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_SP); /* ISP_STR_MON_PORT_ISP2SP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_SP); /* ISP_STR_MON_PORT_ISP2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_SP);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_SP);
break;
case FIFO_CHANNEL_ISP0_TO_IF0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_PIF_A); /* ISP_STR_MON_PORT_ISP2PIFA */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_PIF_A); /* ISP_STR_MON_PORT_ISP2PIFA */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_PIF_A);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_PIF_A);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_A);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_A);
break;
case FIFO_CHANNEL_IF0_TO_ISP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_A);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_A);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_A); /* ISP_STR_MON_PORT_PIFA2ISP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_A); /* ISP_STR_MON_PORT_PIFA2ISP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_A);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_A);
break;
case FIFO_CHANNEL_ISP0_TO_IF1:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_PIF_B); /* ISP_STR_MON_PORT_ISP2PIFA */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_PIF_B); /* ISP_STR_MON_PORT_ISP2PIFA */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_PIF_B);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_PIF_B);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_B);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_B);
break;
case FIFO_CHANNEL_IF1_TO_ISP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_B);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_B);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_B); /* ISP_STR_MON_PORT_PIFB2ISP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_B); /* ISP_STR_MON_PORT_PIFB2ISP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_B);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_B);
break;
case FIFO_CHANNEL_ISP0_TO_DMA0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_DMA); /* ISP_STR_MON_PORT_ISP2DMA */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_DMA); /* ISP_STR_MON_PORT_ISP2DMA */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_DMA);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_DMA);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_DMA_FR_ISP); /* MOD_STR_MON_PORT_ISP2DMA */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_DMA_FR_ISP); /* MOD_STR_MON_PORT_ISP2DMA */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_DMA_FR_ISP);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_DMA_FR_ISP);
break;
case FIFO_CHANNEL_DMA0_TO_ISP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_DMA2ISP); /* MOD_STR_MON_PORT_DMA2ISP */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_DMA2ISP); /* MOD_STR_MON_PORT_DMA2ISP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_DMA2ISP);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_DMA2ISP);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_DMA); /* ISP_STR_MON_PORT_DMA2ISP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_DMA); /* ISP_STR_MON_PORT_DMA2ISP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_DMA);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_DMA);
break;
case FIFO_CHANNEL_ISP0_TO_GDC0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_GDC); /* ISP_STR_MON_PORT_ISP2GDC1 */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_GDC); /* ISP_STR_MON_PORT_ISP2GDC1 */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_GDC);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_GDC);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_GDC); /* MOD_STR_MON_PORT_CELLS2GDC1 */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_GDC); /* MOD_STR_MON_PORT_CELLS2GDC1 */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_GDC);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_GDC);
break;
case FIFO_CHANNEL_GDC0_TO_ISP0:
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_GDC); /* MOD_STR_MON_PORT_GDC12CELLS */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_GDC); /* MOD_STR_MON_PORT_GDC12CELLS */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_GDC);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_GDC);
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_GDC); /* ISP_STR_MON_PORT_GDC12ISP */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_GDC); /* ISP_STR_MON_PORT_GDC12ISP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_GDC);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_GDC);
break;
case FIFO_CHANNEL_ISP0_TO_GDC1:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_ISP2GDC2);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_ISP2GDC2);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_ISP2GDC2);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_ISP2GDC2);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC2);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC2);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC2);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC2);
break;
case FIFO_CHANNEL_GDC1_TO_ISP0:
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC22CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC22CELLS);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC22CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC22CELLS);
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_GDC22ISP);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_GDC22ISP);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_GDC22ISP);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_GDC22ISP);
break;
case FIFO_CHANNEL_ISP0_TO_HOST0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_GPD); /* ISP_STR_MON_PORT_ISP2GPD */
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_GPD); /* ISP_STR_MON_PORT_ISP2GPD */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_SND_GPD);
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_SND_GPD);
{
- hrt_data value = ia_css_device_load_uint32(0x0000000000380014ULL);
+ hrt_data value = ia_css_device_load_uint32(0x0000000000380014ULL);
- state->fifo_valid = !_hrt_get_bit(value, 0);
- state->sink_accept = false; /* no monitor connected */
+ state->fifo_valid = !_hrt_get_bit(value, 0);
+ state->sink_accept = false; /* no monitor connected */
}
break;
- case FIFO_CHANNEL_HOST0_TO_ISP0:
- {
+ case FIFO_CHANNEL_HOST0_TO_ISP0: {
hrt_data value = ia_css_device_load_uint32(0x000000000038001CULL);
state->fifo_valid = false; /* no monitor connected */
state->sink_accept = !_hrt_get_bit(value, 0);
- }
- state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_GPD); /* ISP_STR_MON_PORT_FA2ISP */
- state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_GPD);
- break;
+ }
+ state->src_valid = fifo_monitor_status_valid(ID,
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_GPD); /* ISP_STR_MON_PORT_FA2ISP */
+ state->fifo_accept = fifo_monitor_status_accept(ID,
+ HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_GPD);
+ break;
case FIFO_CHANNEL_SP0_TO_IF0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_PIF_A); /* SP_STR_MON_PORT_SP2PIFA */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_PIF_A); /* SP_STR_MON_PORT_SP2PIFA */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_PIF_A);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_PIF_A);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_A);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_A);
break;
case FIFO_CHANNEL_IF0_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_A); /* MOD_STR_MON_PORT_PIFA2CELLS */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_A);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_A);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_PIF_A); /* SP_STR_MON_PORT_PIFA2SP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_PIF_A); /* SP_STR_MON_PORT_PIFA2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_PIF_A);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_PIF_A);
break;
case FIFO_CHANNEL_SP0_TO_IF1:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_PIF_B); /* SP_STR_MON_PORT_SP2PIFB */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_PIF_B); /* SP_STR_MON_PORT_SP2PIFB */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_PIF_B);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_PIF_B);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_B); /* MOD_STR_MON_PORT_CELLS2PIFB */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_PIF_B);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_PIF_B);
break;
case FIFO_CHANNEL_IF1_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_B); /* MOD_STR_MON_PORT_PIFB2CELLS */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_PIF_B);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_PIF_B);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_B); /* SP_STR_MON_PORT_PIFB2SP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_B); /* SP_STR_MON_PORT_PIFB2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- ISP_STR_MON_PORT_RCV_PIF_B);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ ISP_STR_MON_PORT_RCV_PIF_B);
break;
case FIFO_CHANNEL_SP0_TO_IF2:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_SIF); /* SP_STR_MON_PORT_SP2SIF */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_SIF); /* SP_STR_MON_PORT_SP2SIF */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_SIF);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_SIF);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_SIF); /* MOD_STR_MON_PORT_SP2SIF */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_SIF); /* MOD_STR_MON_PORT_SP2SIF */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_SIF);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_SIF);
break;
case FIFO_CHANNEL_IF2_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_SIF); /* MOD_STR_MON_PORT_SIF2SP */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_SIF); /* MOD_STR_MON_PORT_SIF2SP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_SIF);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_SIF);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_SIF); /* SP_STR_MON_PORT_SIF2SP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_SIF); /* SP_STR_MON_PORT_SIF2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_SIF);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_SIF);
break;
case FIFO_CHANNEL_SP0_TO_DMA0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_DMA); /* SP_STR_MON_PORT_SP2DMA */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_DMA); /* SP_STR_MON_PORT_SP2DMA */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_DMA);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_DMA);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_DMA_FR_SP); /* MOD_STR_MON_PORT_SP2DMA */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_DMA_FR_SP); /* MOD_STR_MON_PORT_SP2DMA */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_DMA_FR_SP);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_DMA_FR_SP);
break;
case FIFO_CHANNEL_DMA0_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_DMA2SP); /* MOD_STR_MON_PORT_DMA2SP */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_DMA2SP); /* MOD_STR_MON_PORT_DMA2SP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_DMA2SP);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_DMA2SP);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_DMA); /* SP_STR_MON_PORT_DMA2SP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_DMA); /* SP_STR_MON_PORT_DMA2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_DMA);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_DMA);
break;
case FIFO_CHANNEL_SP0_TO_GDC0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_SP2GDC1);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_SP2GDC1);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_SP2GDC1);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_SP2GDC1);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC1);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC1);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC1);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC1);
break;
case FIFO_CHANNEL_GDC0_TO_SP0:
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC12CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC12CELLS);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC12CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC12CELLS);
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_GDC12SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_GDC12SP);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_GDC12SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_GDC12SP);
break;
case FIFO_CHANNEL_SP0_TO_GDC1:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_SP2GDC2);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_SP2GDC2);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_SP2GDC2);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_SP2GDC2);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC2);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC2);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_CELLS2GDC2);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_CELLS2GDC2);
break;
case FIFO_CHANNEL_GDC1_TO_SP0:
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC22CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC22CELLS);
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_GDC22CELLS);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_GDC22CELLS);
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_GDC22SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_GDC22SP);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
- SP_STR_MON_PORT_B_GDC22SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_B_IDX,
+ SP_STR_MON_PORT_B_GDC22SP);
break;
case FIFO_CHANNEL_SP0_TO_HOST0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_GPD); /* SP_STR_MON_PORT_SP2GPD */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_GPD); /* SP_STR_MON_PORT_SP2GPD */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_GPD);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_GPD);
{
- hrt_data value = ia_css_device_load_uint32(0x0000000000380010ULL);
+ hrt_data value = ia_css_device_load_uint32(0x0000000000380010ULL);
- state->fifo_valid = !_hrt_get_bit(value, 0);
- state->sink_accept = false; /* no monitor connected */
+ state->fifo_valid = !_hrt_get_bit(value, 0);
+ state->sink_accept = false; /* no monitor connected */
}
break;
- case FIFO_CHANNEL_HOST0_TO_SP0:
- {
+ case FIFO_CHANNEL_HOST0_TO_SP0: {
hrt_data value = ia_css_device_load_uint32(0x0000000000380018ULL);
state->fifo_valid = false; /* no monitor connected */
state->sink_accept = !_hrt_get_bit(value, 0);
- }
- state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_GPD); /* SP_STR_MON_PORT_FA2SP */
- state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_GPD);
- break;
+ }
+ state->src_valid = fifo_monitor_status_valid(ID,
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_GPD); /* SP_STR_MON_PORT_FA2SP */
+ state->fifo_accept = fifo_monitor_status_accept(ID,
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_GPD);
+ break;
case FIFO_CHANNEL_SP0_TO_STREAM2MEM0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_SP2MC */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_SP2MC */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SND_MC);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SND_MC);
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_SP2MC */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_SP2MC */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_RCV_MC);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_RCV_MC);
break;
case FIFO_CHANNEL_STREAM2MEM0_TO_SP0:
state->fifo_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_MC2SP */
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_MC); /* SP_STR_MON_PORT_MC2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
- MOD_STR_MON_PORT_SND_MC);
+ HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
+ MOD_STR_MON_PORT_SND_MC);
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_MC2SP */
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_MC); /* MOD_STR_MON_PORT_MC2SP */
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_RCV_MC);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_RCV_MC);
break;
case FIFO_CHANNEL_SP0_TO_INPUT_SYSTEM0:
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SP2ISYS);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SP2ISYS);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_SP2ISYS);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_SP2ISYS);
state->fifo_valid = false;
state->sink_accept = false;
break;
state->fifo_valid = false;
state->sink_accept = false;
state->src_valid = fifo_monitor_status_valid(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_ISYS2SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_ISYS2SP);
state->fifo_accept = fifo_monitor_status_accept(ID,
- HIVE_GP_REGS_SP_STREAM_STAT_IDX,
- SP_STR_MON_PORT_ISYS2SP);
+ HIVE_GP_REGS_SP_STREAM_STAT_IDX,
+ SP_STR_MON_PORT_ISYS2SP);
break;
default:
assert(0);
}
void fifo_switch_get_state(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id,
- fifo_switch_state_t *state)
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id,
+ fifo_switch_state_t *state)
{
hrt_data data = (hrt_data)-1;
}
void fifo_monitor_get_state(
- const fifo_monitor_ID_t ID,
- fifo_monitor_state_t *state)
+ const fifo_monitor_ID_t ID,
+ fifo_monitor_state_t *state)
{
fifo_channel_t ch_id;
fifo_switch_t sw_id;
for (ch_id = 0; ch_id < N_FIFO_CHANNEL; ch_id++) {
fifo_channel_get_state(ID, ch_id,
- &state->fifo_channels[ch_id]);
+ &state->fifo_channels[ch_id]);
}
for (sw_id = 0; sw_id < N_FIFO_SWITCH; sw_id++) {
fifo_switch_get_state(ID, sw_id,
- &state->fifo_switches[sw_id]);
+ &state->fifo_switches[sw_id]);
}
return;
}
static inline bool fifo_monitor_status_valid(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const unsigned int port_id)
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const unsigned int port_id)
{
hrt_data data = fifo_monitor_reg_load(ID, reg);
}
static inline bool fifo_monitor_status_accept(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const unsigned int port_id)
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const unsigned int port_id)
{
hrt_data data = fifo_monitor_reg_load(ID, reg);
FIFO_CHANNEL_STREAM2MEM0_TO_SP0,
FIFO_CHANNEL_SP0_TO_INPUT_SYSTEM0,
FIFO_CHANNEL_INPUT_SYSTEM0_TO_SP0,
-/*
- * No clue what this is
- *
- FIFO_CHANNEL_SP0_TO_IRQ0,
- FIFO_CHANNEL_IRQ0_TO_SP0,
- */
+ /*
+ * No clue what this is
+ *
+ FIFO_CHANNEL_SP0_TO_IRQ0,
+ FIFO_CHANNEL_IRQ0_TO_SP0,
+ */
N_FIFO_CHANNEL
} fifo_channel_t;
#endif
STORAGE_CLASS_FIFO_MONITOR_C void fifo_switch_set(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id,
- const hrt_data sel)
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id,
+ const hrt_data sel)
{
assert(ID == FIFO_MONITOR0_ID);
assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_switch_get(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id)
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id)
{
assert(ID == FIFO_MONITOR0_ID);
assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_FIFO_MONITOR_C void fifo_monitor_reg_store(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
assert(ID < N_FIFO_MONITOR_ID);
assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
- ia_css_device_store_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data),
+ value);
return;
}
STORAGE_CLASS_FIFO_MONITOR_C hrt_data fifo_monitor_reg_load(
- const fifo_monitor_ID_t ID,
- const unsigned int reg)
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg)
{
assert(ID < N_FIFO_MONITOR_ID);
assert(FIFO_MONITOR_BASE[ID] != (hrt_address) - 1);
- return ia_css_device_load_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(FIFO_MONITOR_BASE[ID] + reg * sizeof(
+ hrt_data));
}
#endif /* __FIFO_MONITOR_PRIVATE_H_INCLUDED__ */
* Local function declarations
*/
static inline void gdc_reg_store(
- const gdc_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+ const gdc_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value);
static inline hrt_data gdc_reg_load(
- const gdc_ID_t ID,
- const unsigned int reg);
+ const gdc_ID_t ID,
+ const unsigned int reg);
#ifndef __INLINE_GDC__
#include "gdc_private.h"
* Exported function implementations
*/
void gdc_lut_store(
- const gdc_ID_t ID,
- const int data[4][HRT_GDC_N])
+ const gdc_ID_t ID,
+ const int data[4][HRT_GDC_N])
{
unsigned int i, lut_offset = HRT_GDC_LUT_IDX;
hrt_data entry_3 = data[3][i] & HRT_GDC_BCI_COEF_MASK;
hrt_data word_0 = entry_0 |
- (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
+ (entry_1 << HRT_GDC_LUT_COEFF_OFFSET);
hrt_data word_1 = entry_2 |
- (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
+ (entry_3 << HRT_GDC_LUT_COEFF_OFFSET);
gdc_reg_store(ID, lut_offset++, word_0);
gdc_reg_store(ID, lut_offset++, word_1);
*
*/
void gdc_lut_convert_to_isp_format(const int in_lut[4][HRT_GDC_N],
- int out_lut[4][HRT_GDC_N])
+ int out_lut[4][HRT_GDC_N])
{
unsigned int i;
int *out = (int *)out_lut;
}
int gdc_get_unity(
- const gdc_ID_t ID)
+ const gdc_ID_t ID)
{
assert(ID < N_GDC_ID);
(void)ID;
* Local function implementations
*/
static inline void gdc_reg_store(
- const gdc_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const gdc_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
ia_css_device_store_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data), value);
return;
}
static inline hrt_data gdc_reg_load(
- const gdc_ID_t ID,
- const unsigned int reg)
+ const gdc_ID_t ID,
+ const unsigned int reg)
{
return ia_css_device_load_uint32(GDC_BASE[ID] + reg * sizeof(hrt_data));
}
#endif /* __INLINE_GP_DEVICE__ */
void gp_device_get_state(
- const gp_device_ID_t ID,
- gp_device_state_t *state)
+ const gp_device_ID_t ID,
+ gp_device_state_t *state)
{
assert(ID < N_GP_DEVICE_ID);
assert(state);
state->syncgen_enable = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_ENABLE_ADDR);
+ _REG_GP_SYNCGEN_ENABLE_ADDR);
state->syncgen_free_running = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_FREE_RUNNING_ADDR);
+ _REG_GP_SYNCGEN_FREE_RUNNING_ADDR);
state->syncgen_pause = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_PAUSE_ADDR);
+ _REG_GP_SYNCGEN_PAUSE_ADDR);
state->nr_frames = gp_device_reg_load(ID,
- _REG_GP_NR_FRAMES_ADDR);
+ _REG_GP_NR_FRAMES_ADDR);
state->syngen_nr_pix = gp_device_reg_load(ID,
- _REG_GP_SYNGEN_NR_PIX_ADDR);
+ _REG_GP_SYNGEN_NR_PIX_ADDR);
state->syngen_nr_pix = gp_device_reg_load(ID,
- _REG_GP_SYNGEN_NR_PIX_ADDR);
+ _REG_GP_SYNGEN_NR_PIX_ADDR);
state->syngen_nr_lines = gp_device_reg_load(ID,
- _REG_GP_SYNGEN_NR_LINES_ADDR);
+ _REG_GP_SYNGEN_NR_LINES_ADDR);
state->syngen_hblank_cycles = gp_device_reg_load(ID,
- _REG_GP_SYNGEN_HBLANK_CYCLES_ADDR);
+ _REG_GP_SYNGEN_HBLANK_CYCLES_ADDR);
state->syngen_vblank_cycles = gp_device_reg_load(ID,
- _REG_GP_SYNGEN_VBLANK_CYCLES_ADDR);
+ _REG_GP_SYNGEN_VBLANK_CYCLES_ADDR);
state->isel_sof = gp_device_reg_load(ID,
- _REG_GP_ISEL_SOF_ADDR);
+ _REG_GP_ISEL_SOF_ADDR);
state->isel_eof = gp_device_reg_load(ID,
- _REG_GP_ISEL_EOF_ADDR);
+ _REG_GP_ISEL_EOF_ADDR);
state->isel_sol = gp_device_reg_load(ID,
- _REG_GP_ISEL_SOL_ADDR);
+ _REG_GP_ISEL_SOL_ADDR);
state->isel_eol = gp_device_reg_load(ID,
- _REG_GP_ISEL_EOL_ADDR);
+ _REG_GP_ISEL_EOL_ADDR);
state->isel_lfsr_enable = gp_device_reg_load(ID,
- _REG_GP_ISEL_LFSR_ENABLE_ADDR);
+ _REG_GP_ISEL_LFSR_ENABLE_ADDR);
state->isel_lfsr_enable_b = gp_device_reg_load(ID,
- _REG_GP_ISEL_LFSR_ENABLE_B_ADDR);
+ _REG_GP_ISEL_LFSR_ENABLE_B_ADDR);
state->isel_lfsr_reset_value = gp_device_reg_load(ID,
- _REG_GP_ISEL_LFSR_RESET_VALUE_ADDR);
+ _REG_GP_ISEL_LFSR_RESET_VALUE_ADDR);
state->isel_tpg_enable = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_ENABLE_ADDR);
+ _REG_GP_ISEL_TPG_ENABLE_ADDR);
state->isel_tpg_enable_b = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_ENABLE_B_ADDR);
+ _REG_GP_ISEL_TPG_ENABLE_B_ADDR);
state->isel_hor_cnt_mask = gp_device_reg_load(ID,
- _REG_GP_ISEL_HOR_CNT_MASK_ADDR);
+ _REG_GP_ISEL_HOR_CNT_MASK_ADDR);
state->isel_ver_cnt_mask = gp_device_reg_load(ID,
- _REG_GP_ISEL_VER_CNT_MASK_ADDR);
+ _REG_GP_ISEL_VER_CNT_MASK_ADDR);
state->isel_xy_cnt_mask = gp_device_reg_load(ID,
- _REG_GP_ISEL_XY_CNT_MASK_ADDR);
+ _REG_GP_ISEL_XY_CNT_MASK_ADDR);
state->isel_hor_cnt_delta = gp_device_reg_load(ID,
- _REG_GP_ISEL_HOR_CNT_DELTA_ADDR);
+ _REG_GP_ISEL_HOR_CNT_DELTA_ADDR);
state->isel_ver_cnt_delta = gp_device_reg_load(ID,
- _REG_GP_ISEL_VER_CNT_DELTA_ADDR);
+ _REG_GP_ISEL_VER_CNT_DELTA_ADDR);
state->isel_tpg_mode = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_MODE_ADDR);
+ _REG_GP_ISEL_TPG_MODE_ADDR);
state->isel_tpg_red1 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_RED1_ADDR);
+ _REG_GP_ISEL_TPG_RED1_ADDR);
state->isel_tpg_green1 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_GREEN1_ADDR);
+ _REG_GP_ISEL_TPG_GREEN1_ADDR);
state->isel_tpg_blue1 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_BLUE1_ADDR);
+ _REG_GP_ISEL_TPG_BLUE1_ADDR);
state->isel_tpg_red2 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_RED2_ADDR);
+ _REG_GP_ISEL_TPG_RED2_ADDR);
state->isel_tpg_green2 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_GREEN2_ADDR);
+ _REG_GP_ISEL_TPG_GREEN2_ADDR);
state->isel_tpg_blue2 = gp_device_reg_load(ID,
- _REG_GP_ISEL_TPG_BLUE2_ADDR);
+ _REG_GP_ISEL_TPG_BLUE2_ADDR);
state->isel_ch_id = gp_device_reg_load(ID,
- _REG_GP_ISEL_CH_ID_ADDR);
+ _REG_GP_ISEL_CH_ID_ADDR);
state->isel_fmt_type = gp_device_reg_load(ID,
- _REG_GP_ISEL_FMT_TYPE_ADDR);
+ _REG_GP_ISEL_FMT_TYPE_ADDR);
state->isel_data_sel = gp_device_reg_load(ID,
- _REG_GP_ISEL_DATA_SEL_ADDR);
+ _REG_GP_ISEL_DATA_SEL_ADDR);
state->isel_sband_sel = gp_device_reg_load(ID,
- _REG_GP_ISEL_SBAND_SEL_ADDR);
+ _REG_GP_ISEL_SBAND_SEL_ADDR);
state->isel_sync_sel = gp_device_reg_load(ID,
- _REG_GP_ISEL_SYNC_SEL_ADDR);
+ _REG_GP_ISEL_SYNC_SEL_ADDR);
state->syncgen_hor_cnt = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_HOR_CNT_ADDR);
+ _REG_GP_SYNCGEN_HOR_CNT_ADDR);
state->syncgen_ver_cnt = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_VER_CNT_ADDR);
+ _REG_GP_SYNCGEN_VER_CNT_ADDR);
state->syncgen_frame_cnt = gp_device_reg_load(ID,
- _REG_GP_SYNCGEN_FRAME_CNT_ADDR);
+ _REG_GP_SYNCGEN_FRAME_CNT_ADDR);
state->soft_reset = gp_device_reg_load(ID,
- _REG_GP_SOFT_RESET_ADDR);
+ _REG_GP_SOFT_RESET_ADDR);
return;
}
#include "assert_support.h"
STORAGE_CLASS_GP_DEVICE_C void gp_device_reg_store(
- const gp_device_ID_t ID,
- const unsigned int reg_addr,
- const hrt_data value)
+ const gp_device_ID_t ID,
+ const unsigned int reg_addr,
+ const hrt_data value)
{
assert(ID < N_GP_DEVICE_ID);
assert(GP_DEVICE_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_GP_DEVICE_C hrt_data gp_device_reg_load(
- const gp_device_ID_t ID,
- const hrt_address reg_addr)
+ const gp_device_ID_t ID,
+ const hrt_address reg_addr)
{
assert(ID < N_GP_DEVICE_ID);
assert(GP_DEVICE_BASE[ID] != (hrt_address)-1);
gp_timer_reg_load(uint32_t reg)
{
return ia_css_device_load_uint32(
- GP_TIMER_BASE +
- (reg * sizeof(uint32_t)));
+ GP_TIMER_BASE +
+ (reg * sizeof(uint32_t)));
}
static void
{
ia_css_device_store_uint32((GP_TIMER_BASE +
(reg * sizeof(uint32_t))),
- value);
+ value);
}
void gp_timer_init(gp_timer_ID_t ID)
#include "assert_support.h"
STORAGE_CLASS_GPIO_C void gpio_reg_store(
- const gpio_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const gpio_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
-OP___assert(ID < N_GPIO_ID);
-OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+ OP___assert(ID < N_GPIO_ID);
+ OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
ia_css_device_store_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data), value);
return;
}
STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
- const gpio_ID_t ID,
- const unsigned int reg)
+ const gpio_ID_t ID,
+ const unsigned int reg)
{
-OP___assert(ID < N_GPIO_ID);
-OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
+ OP___assert(ID < N_GPIO_ID);
+ OP___assert(GPIO_BASE[ID] != (hrt_address) - 1);
return ia_css_device_load_uint32(GPIO_BASE[ID] + reg * sizeof(hrt_data));
}
#include "assert_support.h"
STORAGE_CLASS_HMEM_C size_t sizeof_hmem(
- const hmem_ID_t ID)
+ const hmem_ID_t ID)
{
assert(ID < N_HMEM_ID);
(void)ID;
INPUT_FORMATTER0_SRST_OFFSET,
INPUT_FORMATTER1_SRST_OFFSET,
INPUT_FORMATTER2_SRST_OFFSET,
- INPUT_FORMATTER3_SRST_OFFSET};
+ INPUT_FORMATTER3_SRST_OFFSET
+};
const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID] = {
INPUT_FORMATTER0_SRST_MASK,
INPUT_FORMATTER1_SRST_MASK,
INPUT_FORMATTER2_SRST_MASK,
- INPUT_FORMATTER3_SRST_MASK};
+ INPUT_FORMATTER3_SRST_MASK
+};
const u8 HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID] = {
HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
HIVE_INPUT_SWITCH_SELECT_IF_SEC,
- HIVE_INPUT_SWITCH_SELECT_STR_TO_MEM};
+ HIVE_INPUT_SWITCH_SELECT_STR_TO_MEM
+};
/* MW Should be part of system_global.h, where we have the main enumeration */
static const bool HIVE_IF_BIN_COPY[N_INPUT_FORMATTER_ID] = {
};
void input_formatter_rst(
- const input_formatter_ID_t ID)
+ const input_formatter_ID_t ID)
{
hrt_address addr;
hrt_data rst;
}
unsigned int input_formatter_get_alignment(
- const input_formatter_ID_t ID)
+ const input_formatter_ID_t ID)
{
assert(ID < N_INPUT_FORMATTER_ID);
}
void input_formatter_set_fifo_blocking_mode(
- const input_formatter_ID_t ID,
- const bool enable)
+ const input_formatter_ID_t ID,
+ const bool enable)
{
assert(ID < N_INPUT_FORMATTER_ID);
/* cnd_input_formatter_reg_store() */
if (!HIVE_IF_BIN_COPY[ID]) {
input_formatter_reg_store(ID,
- HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS, enable);
+ HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS, enable);
}
return;
}
void input_formatter_get_switch_state(
- const input_formatter_ID_t ID,
- input_formatter_switch_state_t *state)
+ const input_formatter_ID_t ID,
+ input_formatter_switch_state_t *state)
{
assert(ID < N_INPUT_FORMATTER_ID);
assert(state);
/* We'll change this into an intelligent function to get switch info per IF */
(void)ID;
- state->if_input_switch_lut_reg[0] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg0);
- state->if_input_switch_lut_reg[1] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg1);
- state->if_input_switch_lut_reg[2] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg2);
- state->if_input_switch_lut_reg[3] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg3);
- state->if_input_switch_lut_reg[4] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg4);
- state->if_input_switch_lut_reg[5] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg5);
- state->if_input_switch_lut_reg[6] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg6);
- state->if_input_switch_lut_reg[7] = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_lut_reg7);
- state->if_input_switch_fsync_lut = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_fsync_lut);
- state->if_input_switch_ch_id_fmt_type = gp_device_reg_load(GP_DEVICE0_ID, _REG_GP_IFMT_input_switch_ch_id_fmt_type);
+ state->if_input_switch_lut_reg[0] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg0);
+ state->if_input_switch_lut_reg[1] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg1);
+ state->if_input_switch_lut_reg[2] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg2);
+ state->if_input_switch_lut_reg[3] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg3);
+ state->if_input_switch_lut_reg[4] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg4);
+ state->if_input_switch_lut_reg[5] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg5);
+ state->if_input_switch_lut_reg[6] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg6);
+ state->if_input_switch_lut_reg[7] = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_lut_reg7);
+ state->if_input_switch_fsync_lut = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_fsync_lut);
+ state->if_input_switch_ch_id_fmt_type = gp_device_reg_load(GP_DEVICE0_ID,
+ _REG_GP_IFMT_input_switch_ch_id_fmt_type);
return;
}
void input_formatter_get_state(
- const input_formatter_ID_t ID,
- input_formatter_state_t *state)
+ const input_formatter_ID_t ID,
+ input_formatter_state_t *state)
{
assert(ID < N_INPUT_FORMATTER_ID);
assert(state);
-/*
- state->reset = input_formatter_reg_load(ID,
- HIVE_IF_RESET_ADDRESS);
- */
+ /*
+ state->reset = input_formatter_reg_load(ID,
+ HIVE_IF_RESET_ADDRESS);
+ */
state->start_line = input_formatter_reg_load(ID,
- HIVE_IF_START_LINE_ADDRESS);
+ HIVE_IF_START_LINE_ADDRESS);
state->start_column = input_formatter_reg_load(ID,
- HIVE_IF_START_COLUMN_ADDRESS);
+ HIVE_IF_START_COLUMN_ADDRESS);
state->cropped_height = input_formatter_reg_load(ID,
- HIVE_IF_CROPPED_HEIGHT_ADDRESS);
+ HIVE_IF_CROPPED_HEIGHT_ADDRESS);
state->cropped_width = input_formatter_reg_load(ID,
- HIVE_IF_CROPPED_WIDTH_ADDRESS);
+ HIVE_IF_CROPPED_WIDTH_ADDRESS);
state->ver_decimation = input_formatter_reg_load(ID,
- HIVE_IF_VERTICAL_DECIMATION_ADDRESS);
+ HIVE_IF_VERTICAL_DECIMATION_ADDRESS);
state->hor_decimation = input_formatter_reg_load(ID,
- HIVE_IF_HORIZONTAL_DECIMATION_ADDRESS);
+ HIVE_IF_HORIZONTAL_DECIMATION_ADDRESS);
state->hor_deinterleaving = input_formatter_reg_load(ID,
- HIVE_IF_H_DEINTERLEAVING_ADDRESS);
+ HIVE_IF_H_DEINTERLEAVING_ADDRESS);
state->left_padding = input_formatter_reg_load(ID,
- HIVE_IF_LEFTPADDING_WIDTH_ADDRESS);
+ HIVE_IF_LEFTPADDING_WIDTH_ADDRESS);
state->eol_offset = input_formatter_reg_load(ID,
- HIVE_IF_END_OF_LINE_OFFSET_ADDRESS);
+ HIVE_IF_END_OF_LINE_OFFSET_ADDRESS);
state->vmem_start_address = input_formatter_reg_load(ID,
- HIVE_IF_VMEM_START_ADDRESS_ADDRESS);
+ HIVE_IF_VMEM_START_ADDRESS_ADDRESS);
state->vmem_end_address = input_formatter_reg_load(ID,
- HIVE_IF_VMEM_END_ADDRESS_ADDRESS);
+ HIVE_IF_VMEM_END_ADDRESS_ADDRESS);
state->vmem_increment = input_formatter_reg_load(ID,
- HIVE_IF_VMEM_INCREMENT_ADDRESS);
+ HIVE_IF_VMEM_INCREMENT_ADDRESS);
state->is_yuv420 = input_formatter_reg_load(ID,
- HIVE_IF_YUV_420_FORMAT_ADDRESS);
+ HIVE_IF_YUV_420_FORMAT_ADDRESS);
state->vsync_active_low = input_formatter_reg_load(ID,
- HIVE_IF_VSYNCK_ACTIVE_LOW_ADDRESS);
+ HIVE_IF_VSYNCK_ACTIVE_LOW_ADDRESS);
state->hsync_active_low = input_formatter_reg_load(ID,
- HIVE_IF_HSYNCK_ACTIVE_LOW_ADDRESS);
+ HIVE_IF_HSYNCK_ACTIVE_LOW_ADDRESS);
state->allow_fifo_overflow = input_formatter_reg_load(ID,
- HIVE_IF_ALLOW_FIFO_OVERFLOW_ADDRESS);
+ HIVE_IF_ALLOW_FIFO_OVERFLOW_ADDRESS);
state->block_fifo_when_no_req = input_formatter_reg_load(ID,
- HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS);
+ HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS);
state->ver_deinterleaving = input_formatter_reg_load(ID,
- HIVE_IF_V_DEINTERLEAVING_ADDRESS);
-/* FSM */
+ HIVE_IF_V_DEINTERLEAVING_ADDRESS);
+ /* FSM */
state->fsm_sync_status = input_formatter_reg_load(ID,
- HIVE_IF_FSM_SYNC_STATUS);
+ HIVE_IF_FSM_SYNC_STATUS);
state->fsm_sync_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_SYNC_COUNTER);
+ HIVE_IF_FSM_SYNC_COUNTER);
state->fsm_crop_status = input_formatter_reg_load(ID,
- HIVE_IF_FSM_CROP_STATUS);
+ HIVE_IF_FSM_CROP_STATUS);
state->fsm_crop_line_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_CROP_LINE_COUNTER);
+ HIVE_IF_FSM_CROP_LINE_COUNTER);
state->fsm_crop_pixel_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_CROP_PIXEL_COUNTER);
+ HIVE_IF_FSM_CROP_PIXEL_COUNTER);
state->fsm_deinterleaving_index = input_formatter_reg_load(ID,
- HIVE_IF_FSM_DEINTERLEAVING_IDX);
+ HIVE_IF_FSM_DEINTERLEAVING_IDX);
state->fsm_dec_h_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_DECIMATION_H_COUNTER);
+ HIVE_IF_FSM_DECIMATION_H_COUNTER);
state->fsm_dec_v_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_DECIMATION_V_COUNTER);
+ HIVE_IF_FSM_DECIMATION_V_COUNTER);
state->fsm_dec_block_v_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_DECIMATION_BLOCK_V_COUNTER);
+ HIVE_IF_FSM_DECIMATION_BLOCK_V_COUNTER);
state->fsm_padding_status = input_formatter_reg_load(ID,
- HIVE_IF_FSM_PADDING_STATUS);
+ HIVE_IF_FSM_PADDING_STATUS);
state->fsm_padding_elem_counter = input_formatter_reg_load(ID,
- HIVE_IF_FSM_PADDING_ELEMENT_COUNTER);
+ HIVE_IF_FSM_PADDING_ELEMENT_COUNTER);
state->fsm_vector_support_error = input_formatter_reg_load(ID,
- HIVE_IF_FSM_VECTOR_SUPPORT_ERROR);
+ HIVE_IF_FSM_VECTOR_SUPPORT_ERROR);
state->fsm_vector_buffer_full = input_formatter_reg_load(ID,
- HIVE_IF_FSM_VECTOR_SUPPORT_BUFF_FULL);
+ HIVE_IF_FSM_VECTOR_SUPPORT_BUFF_FULL);
state->vector_support = input_formatter_reg_load(ID,
- HIVE_IF_FSM_VECTOR_SUPPORT);
+ HIVE_IF_FSM_VECTOR_SUPPORT);
state->sensor_data_lost = input_formatter_reg_load(ID,
- HIVE_IF_FIFO_SENSOR_STATUS);
+ HIVE_IF_FIFO_SENSOR_STATUS);
return;
}
void input_formatter_bin_get_state(
- const input_formatter_ID_t ID,
- input_formatter_bin_state_t *state)
+ const input_formatter_ID_t ID,
+ input_formatter_bin_state_t *state)
{
assert(ID < N_INPUT_FORMATTER_ID);
assert(state);
state->reset = input_formatter_reg_load(ID,
- HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS);
+ HIVE_STR2MEM_SOFT_RESET_REG_ADDRESS);
state->input_endianness = input_formatter_reg_load(ID,
- HIVE_STR2MEM_INPUT_ENDIANNESS_REG_ADDRESS);
+ HIVE_STR2MEM_INPUT_ENDIANNESS_REG_ADDRESS);
state->output_endianness = input_formatter_reg_load(ID,
- HIVE_STR2MEM_OUTPUT_ENDIANNESS_REG_ADDRESS);
+ HIVE_STR2MEM_OUTPUT_ENDIANNESS_REG_ADDRESS);
state->bitswap = input_formatter_reg_load(ID,
- HIVE_STR2MEM_BIT_SWAPPING_REG_ADDRESS);
+ HIVE_STR2MEM_BIT_SWAPPING_REG_ADDRESS);
state->block_synch = input_formatter_reg_load(ID,
- HIVE_STR2MEM_BLOCK_SYNC_LEVEL_REG_ADDRESS);
+ HIVE_STR2MEM_BLOCK_SYNC_LEVEL_REG_ADDRESS);
state->packet_synch = input_formatter_reg_load(ID,
- HIVE_STR2MEM_PACKET_SYNC_LEVEL_REG_ADDRESS);
+ HIVE_STR2MEM_PACKET_SYNC_LEVEL_REG_ADDRESS);
state->readpostwrite_synch = input_formatter_reg_load(ID,
- HIVE_STR2MEM_READ_POST_WRITE_SYNC_ENABLE_REG_ADDRESS);
+ HIVE_STR2MEM_READ_POST_WRITE_SYNC_ENABLE_REG_ADDRESS);
state->is_2ppc = input_formatter_reg_load(ID,
- HIVE_STR2MEM_DUAL_BYTE_INPUTS_ENABLED_REG_ADDRESS);
+ HIVE_STR2MEM_DUAL_BYTE_INPUTS_ENABLED_REG_ADDRESS);
state->en_status_update = input_formatter_reg_load(ID,
- HIVE_STR2MEM_EN_STAT_UPDATE_ADDRESS);
+ HIVE_STR2MEM_EN_STAT_UPDATE_ADDRESS);
return;
}
#endif
};
struct input_formatter_state_s {
-/* int reset; */
+ /* int reset; */
int start_line;
int start_column;
int cropped_height;
};
static const unsigned int input_formatter_alignment[N_INPUT_FORMATTER_ID] = {
- ISP_VEC_ALIGN, ISP_VEC_ALIGN, HIVE_ISP_CTRL_DATA_BYTES};
+ ISP_VEC_ALIGN, ISP_VEC_ALIGN, HIVE_ISP_CTRL_DATA_BYTES
+};
#endif /* __INPUT_FORMATTER_LOCAL_H_INCLUDED__ */
#include "assert_support.h"
STORAGE_CLASS_INPUT_FORMATTER_C void input_formatter_reg_store(
- const input_formatter_ID_t ID,
- const hrt_address reg_addr,
- const hrt_data value)
+ const input_formatter_ID_t ID,
+ const hrt_address reg_addr,
+ const hrt_data value)
{
assert(ID < N_INPUT_FORMATTER_ID);
assert(INPUT_FORMATTER_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_INPUT_FORMATTER_C hrt_data input_formatter_reg_load(
- const input_formatter_ID_t ID,
- const unsigned int reg_addr)
+ const input_formatter_ID_t ID,
+ const unsigned int reg_addr)
{
assert(ID < N_INPUT_FORMATTER_ID);
assert(INPUT_FORMATTER_BASE[ID] != (hrt_address)-1);
static const ib_buffer_t IB_BUFFER_NULL = {0, 0, 0 };
static input_system_error_t input_system_configure_channel(
- const channel_cfg_t channel);
+ const channel_cfg_t channel);
static input_system_error_t input_system_configure_channel_sensor(
- const channel_cfg_t channel);
+ const channel_cfg_t channel);
static input_system_error_t input_buffer_configuration(void);
static void input_system_network_rst(const input_system_ID_t ID);
static void capture_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ib_buffer_t * const cfg);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ib_buffer_t *const cfg);
static void acquisition_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ib_buffer_t * const cfg);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ib_buffer_t *const cfg);
static void ctrl_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ctrl_unit_cfg_t * const cfg);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ctrl_unit_cfg_t *const cfg);
static void input_system_network_configure(
- const input_system_ID_t ID,
- const input_system_network_cfg_t * const cfg);
+ const input_system_ID_t ID,
+ const input_system_network_cfg_t *const cfg);
// MW: CSI is previously named as "rx" short for "receiver"
static input_system_error_t set_csi_cfg(
- csi_cfg_t * const lhs,
- const csi_cfg_t * const rhs,
- input_system_config_flags_t * const flags);
+ csi_cfg_t *const lhs,
+ const csi_cfg_t *const rhs,
+ input_system_config_flags_t *const flags);
static input_system_error_t set_source_type(
- input_system_source_t * const lhs,
- const input_system_source_t rhs,
- input_system_config_flags_t * const flags);
+ input_system_source_t *const lhs,
+ const input_system_source_t rhs,
+ input_system_config_flags_t *const flags);
static input_system_error_t input_system_multiplexer_cfg(
- input_system_multiplex_t * const lhs,
- const input_system_multiplex_t rhs,
- input_system_config_flags_t * const flags);
+ input_system_multiplex_t *const lhs,
+ const input_system_multiplex_t rhs,
+ input_system_config_flags_t *const flags);
static inline void capture_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- capture_unit_state_t *state);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ capture_unit_state_t *state);
static inline void acquisition_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- acquisition_unit_state_t *state);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ acquisition_unit_state_t *state);
static inline void ctrl_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- ctrl_unit_state_t *state);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ ctrl_unit_state_t *state);
static inline void mipi_port_get_state(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- mipi_port_state_t *state);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ mipi_port_state_t *state);
static inline void rx_channel_get_state(
- const rx_ID_t ID,
- const unsigned int ch_id,
- rx_channel_state_t *state);
+ const rx_ID_t ID,
+ const unsigned int ch_id,
+ rx_channel_state_t *state);
static void gp_device_rst(const gp_device_ID_t ID);
static void input_switch_rst(const gp_device_ID_t ID);
static void input_switch_cfg(
- const gp_device_ID_t ID,
- const input_switch_cfg_t * const cfg
+ const gp_device_ID_t ID,
+ const input_switch_cfg_t *const cfg
);
void input_system_get_state(
- const input_system_ID_t ID,
- input_system_state_t *state)
+ const input_system_ID_t ID,
+ input_system_state_t *state)
{
sub_system_ID_t sub_id;
assert(state);
state->str_multicastA_sel = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_A_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_A_IDX);
state->str_multicastB_sel = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_B_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_B_IDX);
state->str_multicastC_sel = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_C_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_C_IDX);
state->str_mux_sel = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MUX_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MUX_IDX);
state->str_mon_status = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_STRMON_STAT_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_STRMON_STAT_IDX);
state->str_mon_irq_cond = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_STRMON_COND_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_STRMON_COND_IDX);
state->str_mon_irq_en = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_STRMON_IRQ_EN_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_STRMON_IRQ_EN_IDX);
state->isys_srst = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_SRST_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_SRST_IDX);
state->isys_slv_reg_srst = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_SLV_REG_SRST_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_SLV_REG_SRST_IDX);
state->str_deint_portA_cnt = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_REG_PORT_A_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_REG_PORT_A_IDX);
state->str_deint_portB_cnt = input_system_sub_system_reg_load(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_REG_PORT_B_IDX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_REG_PORT_B_IDX);
- for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+ for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+ sub_id++) {
capture_unit_get_state(ID, sub_id,
- &state->capture_unit[sub_id - CAPTURE_UNIT0_ID]);
+ &state->capture_unit[sub_id - CAPTURE_UNIT0_ID]);
}
- for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+ for (sub_id = ACQUISITION_UNIT0_ID;
+ sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
acquisition_unit_get_state(ID, sub_id,
- &state->acquisition_unit[sub_id - ACQUISITION_UNIT0_ID]);
+ &state->acquisition_unit[sub_id - ACQUISITION_UNIT0_ID]);
}
- for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+ for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+ sub_id++) {
ctrl_unit_get_state(ID, sub_id,
- &state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID]);
+ &state->ctrl_unit_state[sub_id - CTRL_UNIT0_ID]);
}
return;
}
void receiver_get_state(
- const rx_ID_t ID,
- receiver_state_t *state)
+ const rx_ID_t ID,
+ receiver_state_t *state)
{
enum mipi_port_id port_id;
unsigned int ch_id;
assert(state);
state->fs_to_ls_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_FS_TO_LS_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_FS_TO_LS_DELAY_REG_IDX);
state->ls_to_data_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_LS_TO_DATA_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_LS_TO_DATA_DELAY_REG_IDX);
state->data_to_le_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_DATA_TO_LE_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_DATA_TO_LE_DELAY_REG_IDX);
state->le_to_fe_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_LE_TO_FE_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_LE_TO_FE_DELAY_REG_IDX);
state->fe_to_fs_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_FE_TO_FS_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_FE_TO_FS_DELAY_REG_IDX);
state->le_to_fs_delay = (uint8_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_LE_TO_LS_DELAY_REG_IDX);
+ _HRT_CSS_RECEIVER_LE_TO_LS_DELAY_REG_IDX);
state->is_two_ppc = (bool)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_TWO_PIXEL_EN_REG_IDX);
+ _HRT_CSS_RECEIVER_TWO_PIXEL_EN_REG_IDX);
state->backend_rst = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BACKEND_RST_REG_IDX);
+ _HRT_CSS_RECEIVER_BACKEND_RST_REG_IDX);
state->raw18 = (uint16_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_RAW18_REG_IDX);
+ _HRT_CSS_RECEIVER_RAW18_REG_IDX);
state->force_raw8 = (bool)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_FORCE_RAW8_REG_IDX);
+ _HRT_CSS_RECEIVER_FORCE_RAW8_REG_IDX);
state->raw16 = (uint16_t)receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_RAW16_REG_IDX);
+ _HRT_CSS_RECEIVER_RAW16_REG_IDX);
for (port_id = (enum mipi_port_id)0; port_id < N_MIPI_PORT_ID; port_id++) {
mipi_port_get_state(ID, port_id,
- &state->mipi_port_state[port_id]);
+ &state->mipi_port_state[port_id]);
}
for (ch_id = 0U; ch_id < N_RX_CHANNEL_ID; ch_id++) {
rx_channel_get_state(ID, ch_id,
- &state->rx_channel_state[ch_id]);
+ &state->rx_channel_state[ch_id]);
}
state->be_gsp_acc_ovl = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_GSP_ACC_OVL_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_GSP_ACC_OVL_REG_IDX);
state->be_srst = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_SRST_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_SRST_REG_IDX);
state->be_is_two_ppc = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_TWO_PPC_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_TWO_PPC_REG_IDX);
state->be_comp_format0 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG0_IDX);
+ _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG0_IDX);
state->be_comp_format1 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG1_IDX);
+ _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG1_IDX);
state->be_comp_format2 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG2_IDX);
+ _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG2_IDX);
state->be_comp_format3 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG3_IDX);
+ _HRT_CSS_RECEIVER_BE_COMP_FORMAT_REG3_IDX);
state->be_sel = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_SEL_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_SEL_REG_IDX);
state->be_raw16_config = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_RAW16_CONFIG_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_RAW16_CONFIG_REG_IDX);
state->be_raw18_config = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_RAW18_CONFIG_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_RAW18_CONFIG_REG_IDX);
state->be_force_raw8 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_FORCE_RAW8_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_FORCE_RAW8_REG_IDX);
state->be_irq_status = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_IRQ_STATUS_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_IRQ_STATUS_REG_IDX);
state->be_irq_clear = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX);
+ _HRT_CSS_RECEIVER_BE_IRQ_CLEAR_REG_IDX);
return;
}
bool is_mipi_format_yuv420(
- const mipi_format_t mipi_format)
+ const mipi_format_t mipi_format)
{
bool is_yuv420 = (
- (mipi_format == MIPI_FORMAT_YUV420_8) ||
- (mipi_format == MIPI_FORMAT_YUV420_10) ||
- (mipi_format == MIPI_FORMAT_YUV420_8_SHIFT) ||
- (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));
-/* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */
+ (mipi_format == MIPI_FORMAT_YUV420_8) ||
+ (mipi_format == MIPI_FORMAT_YUV420_10) ||
+ (mipi_format == MIPI_FORMAT_YUV420_8_SHIFT) ||
+ (mipi_format == MIPI_FORMAT_YUV420_10_SHIFT));
+ /* MIPI_FORMAT_YUV420_8_LEGACY is not YUV420 */
return is_yuv420;
}
void receiver_set_compression(
- const rx_ID_t ID,
- const unsigned int cfg_ID,
- const mipi_compressor_t comp,
- const mipi_predictor_t pred)
+ const rx_ID_t ID,
+ const unsigned int cfg_ID,
+ const mipi_compressor_t comp,
+ const mipi_predictor_t pred)
{
const unsigned int field_id = cfg_ID % N_MIPI_FORMAT_CUSTOM;
const unsigned int ch_id = cfg_ID / N_MIPI_FORMAT_CUSTOM;
val = (((uint8_t)pred) << 3) | comp;
switch (ch_id) {
- case 0: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
+ case 0:
+ addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX :
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
break;
- case 1: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
+ case 1:
+ addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX :
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
break;
- case 2: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
+ case 2:
+ addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX :
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
break;
- case 3: addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX : _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
+ case 3:
+ addr = ((field_id < 6) ? _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX :
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
break;
default:
/* should not happen */
return;
}
- reg = ((field_id < 6) ? (val << (field_id * 5)) : (val << ((field_id - 6) * 5)));
+ reg = ((field_id < 6) ? (val << (field_id * 5)) : (val << ((
+ field_id - 6) * 5)));
receiver_reg_store(ID, addr, reg);
return;
}
void receiver_port_enable(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const bool cnd)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const bool cnd)
{
hrt_data reg = receiver_port_reg_load(ID, port_ID,
- _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+ _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
if (cnd) {
reg |= 0x01;
}
receiver_port_reg_store(ID, port_ID,
- _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg);
+ _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX, reg);
return;
}
bool is_receiver_port_enabled(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID)
{
hrt_data reg = receiver_port_reg_load(ID, port_ID,
- _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+ _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
return ((reg & 0x01) != 0);
}
void receiver_irq_enable(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const rx_irq_info_t irq_info)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const rx_irq_info_t irq_info)
{
receiver_port_reg_store(ID,
- port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info);
+ port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX, irq_info);
return;
}
rx_irq_info_t receiver_get_irq_info(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID)
{
return receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
}
void receiver_irq_clear(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const rx_irq_info_t irq_info)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const rx_irq_info_t irq_info)
{
receiver_port_reg_store(ID,
- port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info);
+ port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX, irq_info);
return;
}
static inline void capture_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- capture_unit_state_t *state)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ capture_unit_state_t *state)
{
assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <= CAPTURE_UNIT2_ID));
assert(state);
state->StartMode = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_START_MODE_REG_ID);
+ sub_id,
+ CAPT_START_MODE_REG_ID);
state->Start_Addr = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_START_ADDR_REG_ID);
+ sub_id,
+ CAPT_START_ADDR_REG_ID);
state->Mem_Region_Size = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_MEM_REGION_SIZE_REG_ID);
+ sub_id,
+ CAPT_MEM_REGION_SIZE_REG_ID);
state->Num_Mem_Regions = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_NUM_MEM_REGIONS_REG_ID);
+ sub_id,
+ CAPT_NUM_MEM_REGIONS_REG_ID);
// AM: Illegal read from following registers.
-/* state->Init = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_INIT_REG_ID);
- state->Start = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_START_REG_ID);
- state->Stop = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_STOP_REG_ID);
-*/
+ /* state->Init = input_system_sub_system_reg_load(ID,
+ sub_id,
+ CAPT_INIT_REG_ID);
+ state->Start = input_system_sub_system_reg_load(ID,
+ sub_id,
+ CAPT_START_REG_ID);
+ state->Stop = input_system_sub_system_reg_load(ID,
+ sub_id,
+ CAPT_STOP_REG_ID);
+ */
state->Packet_Length = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_PACKET_LENGTH_REG_ID);
+ sub_id,
+ CAPT_PACKET_LENGTH_REG_ID);
state->Received_Length = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_RECEIVED_LENGTH_REG_ID);
+ sub_id,
+ CAPT_RECEIVED_LENGTH_REG_ID);
state->Received_Short_Packets = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_RECEIVED_SHORT_PACKETS_REG_ID);
+ sub_id,
+ CAPT_RECEIVED_SHORT_PACKETS_REG_ID);
state->Received_Long_Packets = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_RECEIVED_LONG_PACKETS_REG_ID);
+ sub_id,
+ CAPT_RECEIVED_LONG_PACKETS_REG_ID);
state->Last_Command = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_LAST_COMMAND_REG_ID);
+ sub_id,
+ CAPT_LAST_COMMAND_REG_ID);
state->Next_Command = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_NEXT_COMMAND_REG_ID);
+ sub_id,
+ CAPT_NEXT_COMMAND_REG_ID);
state->Last_Acknowledge = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_LAST_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ CAPT_LAST_ACKNOWLEDGE_REG_ID);
state->Next_Acknowledge = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_NEXT_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ CAPT_NEXT_ACKNOWLEDGE_REG_ID);
state->FSM_State_Info = input_system_sub_system_reg_load(ID,
- sub_id,
- CAPT_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ CAPT_FSM_STATE_INFO_REG_ID);
return;
}
static inline void acquisition_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- acquisition_unit_state_t *state)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ acquisition_unit_state_t *state)
{
assert(sub_id == ACQUISITION_UNIT0_ID);
assert(state);
state->Start_Addr = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_START_ADDR_REG_ID);
+ sub_id,
+ ACQ_START_ADDR_REG_ID);
state->Mem_Region_Size = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_MEM_REGION_SIZE_REG_ID);
+ sub_id,
+ ACQ_MEM_REGION_SIZE_REG_ID);
state->Num_Mem_Regions = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_NUM_MEM_REGIONS_REG_ID);
+ sub_id,
+ ACQ_NUM_MEM_REGIONS_REG_ID);
// AM: Illegal read from following registers.
-/* state->Init = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_INIT_REG_ID);
-*/
+ /* state->Init = input_system_sub_system_reg_load(ID,
+ sub_id,
+ ACQ_INIT_REG_ID);
+ */
state->Received_Short_Packets = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_RECEIVED_SHORT_PACKETS_REG_ID);
+ sub_id,
+ ACQ_RECEIVED_SHORT_PACKETS_REG_ID);
state->Received_Long_Packets = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_RECEIVED_LONG_PACKETS_REG_ID);
+ sub_id,
+ ACQ_RECEIVED_LONG_PACKETS_REG_ID);
state->Last_Command = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_LAST_COMMAND_REG_ID);
+ sub_id,
+ ACQ_LAST_COMMAND_REG_ID);
state->Next_Command = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_NEXT_COMMAND_REG_ID);
+ sub_id,
+ ACQ_NEXT_COMMAND_REG_ID);
state->Last_Acknowledge = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_LAST_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ ACQ_LAST_ACKNOWLEDGE_REG_ID);
state->Next_Acknowledge = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_NEXT_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ ACQ_NEXT_ACKNOWLEDGE_REG_ID);
state->FSM_State_Info = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ACQ_FSM_STATE_INFO_REG_ID);
state->Int_Cntr_Info = input_system_sub_system_reg_load(ID,
- sub_id,
- ACQ_INT_CNTR_INFO_REG_ID);
+ sub_id,
+ ACQ_INT_CNTR_INFO_REG_ID);
return;
}
static inline void ctrl_unit_get_state(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- ctrl_unit_state_t *state)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ ctrl_unit_state_t *state)
{
assert(sub_id == CTRL_UNIT0_ID);
assert(state);
state->captA_start_addr = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_A_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_A_REG_ID);
state->captB_start_addr = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_B_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_B_REG_ID);
state->captC_start_addr = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_C_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_C_REG_ID);
state->captA_mem_region_size = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID);
state->captB_mem_region_size = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID);
state->captC_mem_region_size = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID);
state->captA_num_mem_regions = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID);
state->captB_num_mem_regions = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID);
state->captC_num_mem_regions = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID);
state->acq_start_addr = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_ACQ_START_ADDR_REG_ID);
+ sub_id,
+ ISYS_CTRL_ACQ_START_ADDR_REG_ID);
state->acq_mem_region_size = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID);
+ sub_id,
+ ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID);
state->acq_num_mem_regions = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID);
+ sub_id,
+ ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID);
// AM: Illegal read from following registers.
-/* state->ctrl_init = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_INIT_REG_ID);
-*/
+ /* state->ctrl_init = input_system_sub_system_reg_load(ID,
+ sub_id,
+ ISYS_CTRL_INIT_REG_ID);
+ */
state->last_cmd = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_LAST_COMMAND_REG_ID);
+ sub_id,
+ ISYS_CTRL_LAST_COMMAND_REG_ID);
state->next_cmd = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_NEXT_COMMAND_REG_ID);
+ sub_id,
+ ISYS_CTRL_NEXT_COMMAND_REG_ID);
state->last_ack = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_LAST_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ ISYS_CTRL_LAST_ACKNOWLEDGE_REG_ID);
state->next_ack = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_ID);
+ sub_id,
+ ISYS_CTRL_NEXT_ACKNOWLEDGE_REG_ID);
state->top_fsm_state = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ISYS_CTRL_FSM_STATE_INFO_REG_ID);
state->captA_fsm_state = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_A_FSM_STATE_INFO_REG_ID);
state->captB_fsm_state = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_B_FSM_STATE_INFO_REG_ID);
state->captC_fsm_state = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_C_FSM_STATE_INFO_REG_ID);
state->acq_fsm_state = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID);
+ sub_id,
+ ISYS_CTRL_ACQ_FSM_STATE_INFO_REG_ID);
state->capt_reserve_one_mem_region = input_system_sub_system_reg_load(ID,
- sub_id,
- ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID);
+ sub_id,
+ ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID);
return;
}
static inline void mipi_port_get_state(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- mipi_port_state_t *state)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ mipi_port_state_t *state)
{
int i;
assert(state);
state->device_ready = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_DEVICE_READY_REG_IDX);
state->irq_status = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_IRQ_STATUS_REG_IDX);
state->irq_enable = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
state->timeout_count = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_TIMEOUT_COUNT_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_TIMEOUT_COUNT_REG_IDX);
state->init_count = (uint16_t)receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_INIT_COUNT_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_INIT_COUNT_REG_IDX);
state->raw16_18 = (uint16_t)receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_RAW16_18_DATAID_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_RAW16_18_DATAID_REG_IDX);
state->sync_count = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_SYNC_COUNT_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_SYNC_COUNT_REG_IDX);
state->rx_count = receiver_port_reg_load(ID,
- port_ID, _HRT_CSS_RECEIVER_RX_COUNT_REG_IDX);
+ port_ID, _HRT_CSS_RECEIVER_RX_COUNT_REG_IDX);
for (i = 0; i < MIPI_4LANE_CFG ; i++) {
state->lane_sync_count[i] = (uint8_t)((state->sync_count) >> (i * 8));
}
static inline void rx_channel_get_state(
- const rx_ID_t ID,
- const unsigned int ch_id,
- rx_channel_state_t *state)
+ const rx_ID_t ID,
+ const unsigned int ch_id,
+ rx_channel_state_t *state)
{
int i;
switch (ch_id) {
case 0:
state->comp_scheme0 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG0_IDX);
state->comp_scheme1 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC0_REG1_IDX);
break;
case 1:
state->comp_scheme0 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG0_IDX);
state->comp_scheme1 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC1_REG1_IDX);
break;
case 2:
state->comp_scheme0 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG0_IDX);
state->comp_scheme1 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC2_REG1_IDX);
break;
case 3:
state->comp_scheme0 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG0_IDX);
state->comp_scheme1 = receiver_reg_load(ID,
- _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
+ _HRT_CSS_RECEIVER_2400_COMP_SCHEME_VC3_REG1_IDX);
break;
}
-/* See Table 7.1.17,..., 7.1.24 */
+ /* See Table 7.1.17,..., 7.1.24 */
for (i = 0; i < 6; i++) {
u8 val = (uint8_t)((state->comp_scheme0) >> (i * 5)) & 0x1f;
static input_system_cfg2400_t config;
static void receiver_rst(
- const rx_ID_t ID)
+ const rx_ID_t ID)
{
enum mipi_port_id port_id;
// gp_device_reg_store(ID, _REG_GP_SYNCGEN_HOR_CNT_ADDR, ZERO);
// gp_device_reg_store(ID, _REG_GP_SYNCGEN_VER_CNT_ADDR, ZERO);
// gp_device_reg_store(ID, _REG_GP_SYNCGEN_FRAME_CNT_ADDR, ZERO);
- gp_device_reg_store(ID, _REG_GP_SOFT_RESET_ADDR, ZERO); // AM: Maybe this soft reset is not safe.
+ gp_device_reg_store(ID, _REG_GP_SOFT_RESET_ADDR,
+ ZERO); // AM: Maybe this soft reset is not safe.
return;
}
// Initialize the data&hsync LUT.
for (addr = _REG_GP_IFMT_input_switch_lut_reg0;
- addr <= _REG_GP_IFMT_input_switch_lut_reg7; addr += SIZEOF_HRT_REG) {
+ addr <= _REG_GP_IFMT_input_switch_lut_reg7; addr += SIZEOF_HRT_REG) {
gp_device_reg_store(ID, addr, ZERO);
}
// Initialize the vsync LUT.
gp_device_reg_store(ID,
- _REG_GP_IFMT_input_switch_fsync_lut,
- ZERO);
+ _REG_GP_IFMT_input_switch_fsync_lut,
+ ZERO);
return;
}
static void input_switch_cfg(
- const gp_device_ID_t ID,
- const input_switch_cfg_t * const cfg)
+ const gp_device_ID_t ID,
+ const input_switch_cfg_t *const cfg)
{
int addr_offset;
// Initialize the data&hsync LUT.
for (addr_offset = 0; addr_offset < N_RX_CHANNEL_ID * 2; addr_offset++) {
- assert(addr_offset * SIZEOF_HRT_REG + _REG_GP_IFMT_input_switch_lut_reg0 <= _REG_GP_IFMT_input_switch_lut_reg7);
+ assert(addr_offset * SIZEOF_HRT_REG + _REG_GP_IFMT_input_switch_lut_reg0 <=
+ _REG_GP_IFMT_input_switch_lut_reg7);
gp_device_reg_store(ID,
- _REG_GP_IFMT_input_switch_lut_reg0 + addr_offset * SIZEOF_HRT_REG,
- cfg->hsync_data_reg[addr_offset]);
+ _REG_GP_IFMT_input_switch_lut_reg0 + addr_offset * SIZEOF_HRT_REG,
+ cfg->hsync_data_reg[addr_offset]);
}
// Initialize the vsync LUT.
gp_device_reg_store(ID,
- _REG_GP_IFMT_input_switch_fsync_lut,
- cfg->vsync_data_reg);
+ _REG_GP_IFMT_input_switch_fsync_lut,
+ cfg->vsync_data_reg);
return;
}
// Reset all 3 multicasts.
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_A_IDX,
- INPUT_SYSTEM_DISCARD_ALL);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_A_IDX,
+ INPUT_SYSTEM_DISCARD_ALL);
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_B_IDX,
- INPUT_SYSTEM_DISCARD_ALL);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_B_IDX,
+ INPUT_SYSTEM_DISCARD_ALL);
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_C_IDX,
- INPUT_SYSTEM_DISCARD_ALL);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_C_IDX,
+ INPUT_SYSTEM_DISCARD_ALL);
// Reset stream mux.
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MUX_IDX,
- N_INPUT_SYSTEM_MULTIPLEX);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MUX_IDX,
+ N_INPUT_SYSTEM_MULTIPLEX);
// Reset 3 capture units.
- for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+ for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+ sub_id++) {
input_system_sub_system_reg_store(ID,
- sub_id,
- CAPT_INIT_REG_ID,
- 1U << CAPT_INIT_RST_REG_BIT);
+ sub_id,
+ CAPT_INIT_REG_ID,
+ 1U << CAPT_INIT_RST_REG_BIT);
}
// Reset acquisition unit.
- for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+ for (sub_id = ACQUISITION_UNIT0_ID;
+ sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
input_system_sub_system_reg_store(ID,
- sub_id,
- ACQ_INIT_REG_ID,
- 1U << ACQ_INIT_RST_REG_BIT);
+ sub_id,
+ ACQ_INIT_REG_ID,
+ 1U << ACQ_INIT_RST_REG_BIT);
}
// DMA unit reset is not needed.
// Reset controller units.
// NB: In future we need to keep part of ctrl_state for split capture and
- for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+ for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+ sub_id++) {
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_INIT_REG_ID,
- 1U); //AM: Is there any named constant?
+ sub_id,
+ ISYS_CTRL_INIT_REG_ID,
+ 1U); //AM: Is there any named constant?
}
return;
// MW: Comments are good, but doxygen is required, place it at the declaration
// Function that appends the channel to current configuration.
static input_system_error_t input_system_configure_channel(
- const channel_cfg_t channel)
+ const channel_cfg_t channel)
{
input_system_error_t error = INPUT_SYSTEM_ERR_NO_ERROR;
// Check if channel is not already configured.
return INPUT_SYSTEM_ERR_CHANNEL_ALREADY_SET;
} else {
switch (channel.source_type) {
- case INPUT_SYSTEM_SOURCE_SENSOR:
- error = input_system_configure_channel_sensor(channel);
- break;
- case INPUT_SYSTEM_SOURCE_TPG:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- case INPUT_SYSTEM_SOURCE_PRBS:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- case INPUT_SYSTEM_SOURCE_FIFO:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- default:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
+ case INPUT_SYSTEM_SOURCE_SENSOR:
+ error = input_system_configure_channel_sensor(channel);
+ break;
+ case INPUT_SYSTEM_SOURCE_TPG:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ case INPUT_SYSTEM_SOURCE_PRBS:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ case INPUT_SYSTEM_SOURCE_FIFO:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ default:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
}
if (error != INPUT_SYSTEM_ERR_NO_ERROR) return error;
// Input switch channel configurations must be combined in united config.
- config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2] =
- channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[0];
- config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2 + 1] =
- channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[1];
+ config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2]
+ =
+ channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[0];
+ config.input_switch_cfg.hsync_data_reg[channel.source_cfg.csi_cfg.csi_port * 2 +
+ 1] =
+ channel.target_cfg.input_switch_channel_cfg.hsync_data_reg[1];
config.input_switch_cfg.vsync_data_reg |=
- (channel.target_cfg.input_switch_channel_cfg.vsync_data_reg & 0x7) << (channel.source_cfg.csi_cfg.csi_port * 3);
+ (channel.target_cfg.input_switch_channel_cfg.vsync_data_reg & 0x7) <<
+ (channel.source_cfg.csi_cfg.csi_port * 3);
// Other targets are just copied and marked as set.
- config.target_isp[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_isp_cfg;
- config.target_sp[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_sp_cfg;
- config.target_strm2mem[channel.source_cfg.csi_cfg.csi_port] = channel.target_cfg.target_strm2mem_cfg;
- config.target_isp_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
- config.target_sp_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
- config.target_strm2mem_flags[channel.source_cfg.csi_cfg.csi_port] |= INPUT_SYSTEM_CFG_FLAG_SET;
+ config.target_isp[channel.source_cfg.csi_cfg.csi_port] =
+ channel.target_cfg.target_isp_cfg;
+ config.target_sp[channel.source_cfg.csi_cfg.csi_port] =
+ channel.target_cfg.target_sp_cfg;
+ config.target_strm2mem[channel.source_cfg.csi_cfg.csi_port] =
+ channel.target_cfg.target_strm2mem_cfg;
+ config.target_isp_flags[channel.source_cfg.csi_cfg.csi_port] |=
+ INPUT_SYSTEM_CFG_FLAG_SET;
+ config.target_sp_flags[channel.source_cfg.csi_cfg.csi_port] |=
+ INPUT_SYSTEM_CFG_FLAG_SET;
+ config.target_strm2mem_flags[channel.source_cfg.csi_cfg.csi_port] |=
+ INPUT_SYSTEM_CFG_FLAG_SET;
config.ch_flags[channel.ch_id] = INPUT_SYSTEM_CFG_FLAG_SET;
}
if (config.csi_flags[port] & INPUT_SYSTEM_CFG_FLAG_SET) {
// Check and set csi buffer in input buffer.
switch (source.buffering_mode) {
- case INPUT_SYSTEM_FIFO_CAPTURE:
- case INPUT_SYSTEM_XMEM_ACQUIRE:
- config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_BLOCKED; // Well, not used.
- break;
-
- case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
- case INPUT_SYSTEM_SRAM_BUFFERING:
- case INPUT_SYSTEM_XMEM_BUFFERING:
- case INPUT_SYSTEM_XMEM_CAPTURE:
- size_requested = source.csi_buffer.mem_reg_size * source.csi_buffer.nof_mem_regs;
- if (source.csi_buffer.mem_reg_size > 0
- && source.csi_buffer.nof_mem_regs > 0
- && size_requested <= unallocated_memory
- ) {
- config.csi_buffer[port].mem_reg_addr = current_address;
- config.csi_buffer[port].mem_reg_size = source.csi_buffer.mem_reg_size;
- config.csi_buffer[port].nof_mem_regs = source.csi_buffer.nof_mem_regs;
- current_address += size_requested;
- unallocated_memory -= size_requested;
- config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_SET;
- } else {
- config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
- return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
- }
- break;
+ case INPUT_SYSTEM_FIFO_CAPTURE:
+ case INPUT_SYSTEM_XMEM_ACQUIRE:
+ config.csi_buffer_flags[port] =
+ INPUT_SYSTEM_CFG_FLAG_BLOCKED; // Well, not used.
+ break;
- default:
+ case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+ case INPUT_SYSTEM_SRAM_BUFFERING:
+ case INPUT_SYSTEM_XMEM_BUFFERING:
+ case INPUT_SYSTEM_XMEM_CAPTURE:
+ size_requested = source.csi_buffer.mem_reg_size *
+ source.csi_buffer.nof_mem_regs;
+ if (source.csi_buffer.mem_reg_size > 0
+ && source.csi_buffer.nof_mem_regs > 0
+ && size_requested <= unallocated_memory
+ ) {
+ config.csi_buffer[port].mem_reg_addr = current_address;
+ config.csi_buffer[port].mem_reg_size = source.csi_buffer.mem_reg_size;
+ config.csi_buffer[port].nof_mem_regs = source.csi_buffer.nof_mem_regs;
+ current_address += size_requested;
+ unallocated_memory -= size_requested;
+ config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_SET;
+ } else {
config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
+ return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
+ }
+ break;
+
+ default:
+ config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
}
// Check acquisition buffer specified but set it later since it has to be unique.
switch (source.buffering_mode) {
- case INPUT_SYSTEM_FIFO_CAPTURE:
- case INPUT_SYSTEM_SRAM_BUFFERING:
- case INPUT_SYSTEM_XMEM_CAPTURE:
- // Nothing to do.
- break;
+ case INPUT_SYSTEM_FIFO_CAPTURE:
+ case INPUT_SYSTEM_SRAM_BUFFERING:
+ case INPUT_SYSTEM_XMEM_CAPTURE:
+ // Nothing to do.
+ break;
- case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
- case INPUT_SYSTEM_XMEM_BUFFERING:
- case INPUT_SYSTEM_XMEM_ACQUIRE:
- if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_RESET) {
- size_requested = source.acquisition_buffer.mem_reg_size
- * source.acquisition_buffer.nof_mem_regs;
- if (source.acquisition_buffer.mem_reg_size > 0
- && source.acquisition_buffer.nof_mem_regs > 0
- && size_requested <= unallocated_memory
- ) {
- candidate_buffer_acq = source.acquisition_buffer;
- acq_already_specified = INPUT_SYSTEM_CFG_FLAG_SET;
- }
- } else {
- // Check if specified acquisition buffer is the same as specified before.
- if (source.acquisition_buffer.mem_reg_size != candidate_buffer_acq.mem_reg_size
- || source.acquisition_buffer.nof_mem_regs != candidate_buffer_acq.nof_mem_regs
- ) {
- config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
- return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
- }
+ case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+ case INPUT_SYSTEM_XMEM_BUFFERING:
+ case INPUT_SYSTEM_XMEM_ACQUIRE:
+ if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_RESET) {
+ size_requested = source.acquisition_buffer.mem_reg_size
+ * source.acquisition_buffer.nof_mem_regs;
+ if (source.acquisition_buffer.mem_reg_size > 0
+ && source.acquisition_buffer.nof_mem_regs > 0
+ && size_requested <= unallocated_memory
+ ) {
+ candidate_buffer_acq = source.acquisition_buffer;
+ acq_already_specified = INPUT_SYSTEM_CFG_FLAG_SET;
}
- break;
+ } else {
+ // Check if specified acquisition buffer is the same as specified before.
+ if (source.acquisition_buffer.mem_reg_size != candidate_buffer_acq.mem_reg_size
+ || source.acquisition_buffer.nof_mem_regs != candidate_buffer_acq.nof_mem_regs
+ ) {
+ config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
+ return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
+ }
+ }
+ break;
- default:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
+ default:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
}
} else {
config.csi_buffer_flags[port] = INPUT_SYSTEM_CFG_FLAG_BLOCKED;
} // end of for ( port )
// Set the acquisition buffer at the end.
- size_requested = candidate_buffer_acq.mem_reg_size * candidate_buffer_acq.nof_mem_regs;
+ size_requested = candidate_buffer_acq.mem_reg_size *
+ candidate_buffer_acq.nof_mem_regs;
if (acq_already_specified == INPUT_SYSTEM_CFG_FLAG_SET
- && size_requested <= unallocated_memory) {
+ && size_requested <= unallocated_memory) {
config.acquisition_buffer_unique.mem_reg_addr = current_address;
- config.acquisition_buffer_unique.mem_reg_size = candidate_buffer_acq.mem_reg_size;
- config.acquisition_buffer_unique.nof_mem_regs = candidate_buffer_acq.nof_mem_regs;
+ config.acquisition_buffer_unique.mem_reg_size =
+ candidate_buffer_acq.mem_reg_size;
+ config.acquisition_buffer_unique.nof_mem_regs =
+ candidate_buffer_acq.nof_mem_regs;
current_address += size_requested;
unallocated_memory -= size_requested;
config.acquisition_buffer_unique_flags = INPUT_SYSTEM_CFG_FLAG_SET;
}
static void capture_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ib_buffer_t * const cfg)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ib_buffer_t *const cfg)
{
assert(ID < N_INPUT_SYSTEM_ID);
- assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <= CAPTURE_UNIT2_ID)); // Commented part is always true.
+ assert(/*(sub_id >= CAPTURE_UNIT0_ID) &&*/ (sub_id <=
+ CAPTURE_UNIT2_ID)); // Commented part is always true.
assert(cfg);
input_system_sub_system_reg_store(ID,
- sub_id,
- CAPT_START_ADDR_REG_ID,
- cfg->mem_reg_addr);
+ sub_id,
+ CAPT_START_ADDR_REG_ID,
+ cfg->mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- CAPT_MEM_REGION_SIZE_REG_ID,
- cfg->mem_reg_size);
+ sub_id,
+ CAPT_MEM_REGION_SIZE_REG_ID,
+ cfg->mem_reg_size);
input_system_sub_system_reg_store(ID,
- sub_id,
- CAPT_NUM_MEM_REGIONS_REG_ID,
- cfg->nof_mem_regs);
+ sub_id,
+ CAPT_NUM_MEM_REGIONS_REG_ID,
+ cfg->nof_mem_regs);
return;
}
static void acquisition_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ib_buffer_t * const cfg)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ib_buffer_t *const cfg)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(sub_id == ACQUISITION_UNIT0_ID);
assert(cfg);
input_system_sub_system_reg_store(ID,
- sub_id,
- ACQ_START_ADDR_REG_ID,
- cfg->mem_reg_addr);
+ sub_id,
+ ACQ_START_ADDR_REG_ID,
+ cfg->mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- ACQ_NUM_MEM_REGIONS_REG_ID,
- cfg->nof_mem_regs);
+ sub_id,
+ ACQ_NUM_MEM_REGIONS_REG_ID,
+ cfg->nof_mem_regs);
input_system_sub_system_reg_store(ID,
- sub_id,
- ACQ_MEM_REGION_SIZE_REG_ID,
- cfg->mem_reg_size);
+ sub_id,
+ ACQ_MEM_REGION_SIZE_REG_ID,
+ cfg->mem_reg_size);
return;
}
static void ctrl_unit_configure(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_id,
- const ctrl_unit_cfg_t * const cfg)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_id,
+ const ctrl_unit_cfg_t *const cfg)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(sub_id == CTRL_UNIT0_ID);
assert(cfg);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_A_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_addr);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_A_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_size);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_A_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT0_ID].mem_reg_size);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT0_ID].nof_mem_regs);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_A_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT0_ID].nof_mem_regs);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_B_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_addr);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_B_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_size);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_B_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT1_ID].mem_reg_size);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT1_ID].nof_mem_regs);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_B_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT1_ID].nof_mem_regs);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_START_ADDR_C_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_addr);
+ sub_id,
+ ISYS_CTRL_CAPT_START_ADDR_C_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_size);
+ sub_id,
+ ISYS_CTRL_CAPT_MEM_REGION_SIZE_C_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT2_ID].mem_reg_size);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID,
- cfg->buffer_mipi[CAPTURE_UNIT2_ID].nof_mem_regs);
+ sub_id,
+ ISYS_CTRL_CAPT_NUM_MEM_REGIONS_C_REG_ID,
+ cfg->buffer_mipi[CAPTURE_UNIT2_ID].nof_mem_regs);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_ACQ_START_ADDR_REG_ID,
- cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_addr);
+ sub_id,
+ ISYS_CTRL_ACQ_START_ADDR_REG_ID,
+ cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_addr);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID,
- cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_size);
+ sub_id,
+ ISYS_CTRL_ACQ_MEM_REGION_SIZE_REG_ID,
+ cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].mem_reg_size);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID,
- cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].nof_mem_regs);
+ sub_id,
+ ISYS_CTRL_ACQ_NUM_MEM_REGIONS_REG_ID,
+ cfg->buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID].nof_mem_regs);
input_system_sub_system_reg_store(ID,
- sub_id,
- ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID,
- 0);
+ sub_id,
+ ISYS_CTRL_CAPT_RESERVE_ONE_MEM_REGION_REG_ID,
+ 0);
return;
}
static void input_system_network_configure(
- const input_system_ID_t ID,
- const input_system_network_cfg_t * const cfg)
+ const input_system_ID_t ID,
+ const input_system_network_cfg_t *const cfg)
{
u32 sub_id;
// Set all 3 multicasts.
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_A_IDX,
- cfg->multicast_cfg[CAPTURE_UNIT0_ID]);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_A_IDX,
+ cfg->multicast_cfg[CAPTURE_UNIT0_ID]);
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_B_IDX,
- cfg->multicast_cfg[CAPTURE_UNIT1_ID]);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_B_IDX,
+ cfg->multicast_cfg[CAPTURE_UNIT1_ID]);
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_C_IDX,
- cfg->multicast_cfg[CAPTURE_UNIT2_ID]);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_C_IDX,
+ cfg->multicast_cfg[CAPTURE_UNIT2_ID]);
// Set stream mux.
input_system_sub_system_reg_store(ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MUX_IDX,
- cfg->mux_cfg);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MUX_IDX,
+ cfg->mux_cfg);
// Set capture units.
- for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID; sub_id++) {
+ for (sub_id = CAPTURE_UNIT0_ID; sub_id < CAPTURE_UNIT0_ID + N_CAPTURE_UNIT_ID;
+ sub_id++) {
capture_unit_configure(ID,
- sub_id,
- &cfg->ctrl_unit_cfg[ID].buffer_mipi[sub_id - CAPTURE_UNIT0_ID]);
+ sub_id,
+ &cfg->ctrl_unit_cfg[ID].buffer_mipi[sub_id - CAPTURE_UNIT0_ID]);
}
// Set acquisition units.
- for (sub_id = ACQUISITION_UNIT0_ID; sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
+ for (sub_id = ACQUISITION_UNIT0_ID;
+ sub_id < ACQUISITION_UNIT0_ID + N_ACQUISITION_UNIT_ID; sub_id++) {
acquisition_unit_configure(ID,
- sub_id,
- &cfg->ctrl_unit_cfg[sub_id - ACQUISITION_UNIT0_ID].buffer_acquire[sub_id - ACQUISITION_UNIT0_ID]);
+ sub_id,
+ &cfg->ctrl_unit_cfg[sub_id - ACQUISITION_UNIT0_ID].buffer_acquire[sub_id -
+ ACQUISITION_UNIT0_ID]);
}
// No DMA configuration needed. Ctrl_unit will fully control it.
// Set controller units.
- for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID; sub_id++) {
+ for (sub_id = CTRL_UNIT0_ID; sub_id < CTRL_UNIT0_ID + N_CTRL_UNIT_ID;
+ sub_id++) {
ctrl_unit_configure(ID,
- sub_id,
- &cfg->ctrl_unit_cfg[sub_id - CTRL_UNIT0_ID]);
+ sub_id,
+ &cfg->ctrl_unit_cfg[sub_id - CTRL_UNIT0_ID]);
}
return;
assert(config.source_type_flags & INPUT_SYSTEM_CFG_FLAG_SET);
switch (config.source_type) {
- case INPUT_SYSTEM_SOURCE_SENSOR:
+ case INPUT_SYSTEM_SOURCE_SENSOR:
+
+ // Determine stream multicasts setting based on the mode of csi_cfg_t.
+ // AM: This should be moved towards earlier function call, e.g. in
+ // the commit function.
+ for (i = MIPI_PORT0_ID; i < N_MIPI_PORT_ID; i++) {
+ if (config.csi_flags[i] & INPUT_SYSTEM_CFG_FLAG_SET) {
+ switch (config.csi_value[i].buffering_mode) {
+ case INPUT_SYSTEM_FIFO_CAPTURE:
+ config.multicast[i] = INPUT_SYSTEM_CSI_BACKEND;
+ break;
- // Determine stream multicasts setting based on the mode of csi_cfg_t.
- // AM: This should be moved towards earlier function call, e.g. in
- // the commit function.
- for (i = MIPI_PORT0_ID; i < N_MIPI_PORT_ID; i++) {
- if (config.csi_flags[i] & INPUT_SYSTEM_CFG_FLAG_SET) {
- switch (config.csi_value[i].buffering_mode) {
- case INPUT_SYSTEM_FIFO_CAPTURE:
- config.multicast[i] = INPUT_SYSTEM_CSI_BACKEND;
- break;
-
- case INPUT_SYSTEM_XMEM_CAPTURE:
- case INPUT_SYSTEM_SRAM_BUFFERING:
- case INPUT_SYSTEM_XMEM_BUFFERING:
- config.multicast[i] = INPUT_SYSTEM_INPUT_BUFFER;
- break;
-
- case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
- config.multicast[i] = INPUT_SYSTEM_MULTICAST;
- break;
-
- case INPUT_SYSTEM_XMEM_ACQUIRE:
- config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
- break;
-
- default:
- config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- //break;
- }
- } else {
+ case INPUT_SYSTEM_XMEM_CAPTURE:
+ case INPUT_SYSTEM_SRAM_BUFFERING:
+ case INPUT_SYSTEM_XMEM_BUFFERING:
+ config.multicast[i] = INPUT_SYSTEM_INPUT_BUFFER;
+ break;
+
+ case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+ config.multicast[i] = INPUT_SYSTEM_MULTICAST;
+ break;
+
+ case INPUT_SYSTEM_XMEM_ACQUIRE:
config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+ break;
+
+ default:
+ config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ //break;
}
+ } else {
+ config.multicast[i] = INPUT_SYSTEM_DISCARD_ALL;
+ }
- input_system_network_cfg.multicast_cfg[i] = config.multicast[i];
+ input_system_network_cfg.multicast_cfg[i] = config.multicast[i];
- } // for
+ } // for
- input_system_network_cfg.mux_cfg = config.multiplexer;
+ input_system_network_cfg.mux_cfg = config.multiplexer;
- input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT0_ID] = config.csi_buffer[MIPI_PORT0_ID];
- input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT1_ID] = config.csi_buffer[MIPI_PORT1_ID];
- input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT2_ID] = config.csi_buffer[MIPI_PORT2_ID];
- input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID - CTRL_UNIT0_ID].buffer_acquire[ACQUISITION_UNIT0_ID - ACQUISITION_UNIT0_ID] =
- config.acquisition_buffer_unique;
+ input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+ CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT0_ID] =
+ config.csi_buffer[MIPI_PORT0_ID];
+ input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+ CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT1_ID] =
+ config.csi_buffer[MIPI_PORT1_ID];
+ input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+ CTRL_UNIT0_ID].buffer_mipi[CAPTURE_UNIT2_ID] =
+ config.csi_buffer[MIPI_PORT2_ID];
+ input_system_network_cfg.ctrl_unit_cfg[CTRL_UNIT0_ID -
+ CTRL_UNIT0_ID].buffer_acquire[ACQUISITION_UNIT0_ID -
+ ACQUISITION_UNIT0_ID] =
+ config.acquisition_buffer_unique;
- // First set input network around CSI receiver.
- input_system_network_configure(INPUT_SYSTEM0_ID, &input_system_network_cfg);
+ // First set input network around CSI receiver.
+ input_system_network_configure(INPUT_SYSTEM0_ID, &input_system_network_cfg);
- // Set the CSI receiver.
- //...
- break;
+ // Set the CSI receiver.
+ //...
+ break;
- case INPUT_SYSTEM_SOURCE_TPG:
+ case INPUT_SYSTEM_SOURCE_TPG:
- break;
+ break;
- case INPUT_SYSTEM_SOURCE_PRBS:
+ case INPUT_SYSTEM_SOURCE_PRBS:
- break;
+ break;
- case INPUT_SYSTEM_SOURCE_FIFO:
- break;
+ case INPUT_SYSTEM_SOURCE_FIFO:
+ break;
- default:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
+ default:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
} // end of switch (source_type)
// FIFO
input_system_error_t input_system_csi_fifo_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- target_cfg2400_t target
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ target_cfg2400_t target
)
{
channel_cfg_t channel;
}
input_system_error_t input_system_csi_fifo_channel_with_counting_cfg(
- u32 ch_id,
- u32 nof_frames,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 csi_mem_reg_size,
- u32 csi_nof_mem_regs,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 csi_mem_reg_size,
+ u32 csi_nof_mem_regs,
+ target_cfg2400_t target
)
{
channel_cfg_t channel;
channel.source_type = INPUT_SYSTEM_SOURCE_SENSOR;
//channel.source
channel.source_cfg.csi_cfg.csi_port = port;
- channel.source_cfg.csi_cfg.buffering_mode = INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING;
+ channel.source_cfg.csi_cfg.buffering_mode =
+ INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING;
channel.source_cfg.csi_cfg.csi_buffer.mem_reg_size = csi_mem_reg_size;
channel.source_cfg.csi_cfg.csi_buffer.nof_mem_regs = csi_nof_mem_regs;
channel.source_cfg.csi_cfg.csi_buffer.mem_reg_addr = 0;
// SRAM
input_system_error_t input_system_csi_sram_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 csi_mem_reg_size,
- u32 csi_nof_mem_regs,
- // uint32_t acq_mem_reg_size,
- // uint32_t acq_nof_mem_regs,
- target_cfg2400_t target
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 csi_mem_reg_size,
+ u32 csi_nof_mem_regs,
+ // uint32_t acq_mem_reg_size,
+ // uint32_t acq_nof_mem_regs,
+ target_cfg2400_t target
)
{
channel_cfg_t channel;
// Collects all parameters and puts them in channel_cfg_t.
input_system_error_t input_system_csi_xmem_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 csi_mem_reg_size,
- u32 csi_nof_mem_regs,
- u32 acq_mem_reg_size,
- u32 acq_nof_mem_regs,
- target_cfg2400_t target,
- uint32_t nof_xmem_buffers
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 csi_mem_reg_size,
+ u32 csi_nof_mem_regs,
+ u32 acq_mem_reg_size,
+ u32 acq_nof_mem_regs,
+ target_cfg2400_t target,
+ uint32_t nof_xmem_buffers
)
{
channel_cfg_t channel;
}
input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 acq_mem_reg_size,
- u32 acq_nof_mem_regs,
- target_cfg2400_t target)
+ u32 ch_id,
+ u32 nof_frames,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 acq_mem_reg_size,
+ u32 acq_nof_mem_regs,
+ target_cfg2400_t target)
{
channel_cfg_t channel;
}
input_system_error_t input_system_csi_xmem_capture_only_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- input_system_csi_port_t port,
- u32 csi_mem_reg_size,
- u32 csi_nof_mem_regs,
- u32 acq_mem_reg_size,
- u32 acq_nof_mem_regs,
- target_cfg2400_t target)
+ u32 ch_id,
+ u32 nof_frames,
+ input_system_csi_port_t port,
+ u32 csi_mem_reg_size,
+ u32 csi_nof_mem_regs,
+ u32 acq_mem_reg_size,
+ u32 acq_nof_mem_regs,
+ target_cfg2400_t target)
{
channel_cfg_t channel;
// Non - CSI
input_system_error_t input_system_prbs_channel_cfg(
- u32 ch_id,
- u32 nof_frames,//not used yet
- u32 seed,
- u32 sync_gen_width,
- u32 sync_gen_height,
- u32 sync_gen_hblank_cycles,
- u32 sync_gen_vblank_cycles,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,//not used yet
+ u32 seed,
+ u32 sync_gen_width,
+ u32 sync_gen_height,
+ u32 sync_gen_hblank_cycles,
+ u32 sync_gen_vblank_cycles,
+ target_cfg2400_t target
)
{
channel_cfg_t channel;
}
input_system_error_t input_system_tpg_channel_cfg(
- u32 ch_id,
- u32 nof_frames,//not used yet
- u32 x_mask,
- u32 y_mask,
- u32 x_delta,
- u32 y_delta,
- u32 xy_mask,
- u32 sync_gen_width,
- u32 sync_gen_height,
- u32 sync_gen_hblank_cycles,
- u32 sync_gen_vblank_cycles,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,//not used yet
+ u32 x_mask,
+ u32 y_mask,
+ u32 x_delta,
+ u32 y_delta,
+ u32 xy_mask,
+ u32 sync_gen_width,
+ u32 sync_gen_height,
+ u32 sync_gen_hblank_cycles,
+ u32 sync_gen_vblank_cycles,
+ target_cfg2400_t target
)
{
channel_cfg_t channel;
// MW: Don't use system specific names, (even in system specific files) "cfg2400" -> cfg
input_system_error_t input_system_gpfifo_channel_cfg(
- u32 ch_id,
- u32 nof_frames, //not used yet
+ u32 ch_id,
+ u32 nof_frames, //not used yet
- target_cfg2400_t target)
+ target_cfg2400_t target)
{
channel_cfg_t channel;
// Fills the parameters to config.csi_value[port]
static input_system_error_t input_system_configure_channel_sensor(
- const channel_cfg_t channel)
+ const channel_cfg_t channel)
{
const u32 port = channel.source_cfg.csi_cfg.csi_port;
input_system_error_t status = INPUT_SYSTEM_ERR_NO_ERROR;
//check if port > N_INPUT_SYSTEM_MULTIPLEX
- status = set_source_type(&config.source_type, channel.source_type, &config.source_type_flags);
+ status = set_source_type(&config.source_type, channel.source_type,
+ &config.source_type_flags);
if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
// Check for conflicts on source (implicitly on multicast, capture unit and input buffer).
- status = set_csi_cfg(&config.csi_value[port], &channel.source_cfg.csi_cfg, &config.csi_flags[port]);
+ status = set_csi_cfg(&config.csi_value[port], &channel.source_cfg.csi_cfg,
+ &config.csi_flags[port]);
if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
switch (channel.source_cfg.csi_cfg.buffering_mode) {
- case INPUT_SYSTEM_FIFO_CAPTURE:
+ case INPUT_SYSTEM_FIFO_CAPTURE:
- // Check for conflicts on mux.
- mux = INPUT_SYSTEM_MIPI_PORT0 + port;
- status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
- if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
- config.multicast[port] = INPUT_SYSTEM_CSI_BACKEND;
+ // Check for conflicts on mux.
+ mux = INPUT_SYSTEM_MIPI_PORT0 + port;
+ status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+ &config.multiplexer_flags);
+ if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+ config.multicast[port] = INPUT_SYSTEM_CSI_BACKEND;
- // Shared resource, so it should be blocked.
- //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ // Shared resource, so it should be blocked.
+ //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- break;
- case INPUT_SYSTEM_SRAM_BUFFERING:
+ break;
+ case INPUT_SYSTEM_SRAM_BUFFERING:
- // Check for conflicts on mux.
- mux = INPUT_SYSTEM_ACQUISITION_UNIT;
- status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
- if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
- config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
+ // Check for conflicts on mux.
+ mux = INPUT_SYSTEM_ACQUISITION_UNIT;
+ status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+ &config.multiplexer_flags);
+ if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+ config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
- // Shared resource, so it should be blocked.
- //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ // Shared resource, so it should be blocked.
+ //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- break;
- case INPUT_SYSTEM_XMEM_BUFFERING:
+ break;
+ case INPUT_SYSTEM_XMEM_BUFFERING:
- // Check for conflicts on mux.
- mux = INPUT_SYSTEM_ACQUISITION_UNIT;
- status = input_system_multiplexer_cfg(&config.multiplexer, mux, &config.multiplexer_flags);
- if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
- config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
+ // Check for conflicts on mux.
+ mux = INPUT_SYSTEM_ACQUISITION_UNIT;
+ status = input_system_multiplexer_cfg(&config.multiplexer, mux,
+ &config.multiplexer_flags);
+ if (status != INPUT_SYSTEM_ERR_NO_ERROR) return status;
+ config.multicast[port] = INPUT_SYSTEM_INPUT_BUFFER;
- // Shared resource, so it should be blocked.
- //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ // Shared resource, so it should be blocked.
+ //config.mux_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.csi_buffer_flags[port] |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
+ //config.acquisition_buffer_unique_flags |= INPUT_SYSTEM_CFG_FLAG_BLOCKED;
- break;
- case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- case INPUT_SYSTEM_XMEM_CAPTURE:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- case INPUT_SYSTEM_XMEM_ACQUIRE:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
- default:
- return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
- break;
+ break;
+ case INPUT_SYSTEM_FIFO_CAPTURE_WITH_COUNTING:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ case INPUT_SYSTEM_XMEM_CAPTURE:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ case INPUT_SYSTEM_XMEM_ACQUIRE:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
+ default:
+ return INPUT_SYSTEM_ERR_PARAMETER_NOT_SUPPORTED;
+ break;
}
return INPUT_SYSTEM_ERR_NO_ERROR;
}
// Test flags and set structure.
static input_system_error_t set_source_type(
- input_system_source_t * const lhs,
- const input_system_source_t rhs,
- input_system_config_flags_t * const flags)
+ input_system_source_t *const lhs,
+ const input_system_source_t rhs,
+ input_system_config_flags_t *const flags)
{
// MW: Not enough asserts
assert(lhs);
// Test flags and set structure.
static input_system_error_t set_csi_cfg(
- csi_cfg_t * const lhs,
- const csi_cfg_t * const rhs,
- input_system_config_flags_t * const flags)
+ csi_cfg_t *const lhs,
+ const csi_cfg_t *const rhs,
+ input_system_config_flags_t *const flags)
{
u32 memory_required;
u32 acq_memory_required;
// check for consistency with already set value.
if (/*lhs->backend_ch == rhs.backend_ch
&&*/ lhs->buffering_mode == rhs->buffering_mode
- && lhs->csi_buffer.mem_reg_size == rhs->csi_buffer.mem_reg_size
- && lhs->csi_buffer.nof_mem_regs == rhs->csi_buffer.nof_mem_regs
- && lhs->acquisition_buffer.mem_reg_size == rhs->acquisition_buffer.mem_reg_size
- && lhs->acquisition_buffer.nof_mem_regs == rhs->acquisition_buffer.nof_mem_regs
- && lhs->nof_xmem_buffers == rhs->nof_xmem_buffers
- ) {
+ && lhs->csi_buffer.mem_reg_size == rhs->csi_buffer.mem_reg_size
+ && lhs->csi_buffer.nof_mem_regs == rhs->csi_buffer.nof_mem_regs
+ && lhs->acquisition_buffer.mem_reg_size == rhs->acquisition_buffer.mem_reg_size
+ && lhs->acquisition_buffer.nof_mem_regs == rhs->acquisition_buffer.nof_mem_regs
+ && lhs->nof_xmem_buffers == rhs->nof_xmem_buffers
+ ) {
return INPUT_SYSTEM_ERR_NO_ERROR;
} else {
*flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
// no check for backend_ch
// no check for nof_xmem_buffers
memory_required = rhs->csi_buffer.mem_reg_size * rhs->csi_buffer.nof_mem_regs;
- acq_memory_required = rhs->acquisition_buffer.mem_reg_size * rhs->acquisition_buffer.nof_mem_regs;
+ acq_memory_required = rhs->acquisition_buffer.mem_reg_size *
+ rhs->acquisition_buffer.nof_mem_regs;
if (rhs->buffering_mode >= N_INPUT_SYSTEM_BUFFERING_MODE
- ||
- // Check if required memory is available in input buffer (SRAM).
- (memory_required + acq_memory_required) > config.unallocated_ib_mem_words
+ ||
+ // Check if required memory is available in input buffer (SRAM).
+ (memory_required + acq_memory_required) > config.unallocated_ib_mem_words
- ) {
+ ) {
*flags |= INPUT_SYSTEM_CFG_FLAG_CONFLICT;
return INPUT_SYSTEM_ERR_CONFLICT_ON_RESOURCE;
}
lhs->csi_buffer.nof_mem_regs = rhs->csi_buffer.nof_mem_regs;
lhs->acquisition_buffer.mem_reg_size = rhs->acquisition_buffer.mem_reg_size;
lhs->acquisition_buffer.nof_mem_regs = rhs->acquisition_buffer.nof_mem_regs;
- // ALX: NB: Here we just set buffer parameters, but still not allocate it
+ // ALX: NB: Here we just set buffer parameters, but still not allocate it
// (no addresses determined). That will be done during commit.
// FIXIT: acq_memory_required is not deducted, since it can be allocated multiple times.
// Test flags and set structure.
static input_system_error_t input_system_multiplexer_cfg(
- input_system_multiplex_t * const lhs,
- const input_system_multiplex_t rhs,
- input_system_config_flags_t * const flags)
+ input_system_multiplex_t *const lhs,
+ const input_system_multiplex_t rhs,
+ input_system_config_flags_t *const flags)
{
assert(lhs);
assert(flags);
// Complete configuration for input system.
struct input_system_cfg2400_s {
- input_system_source_t source_type; input_system_config_flags_t source_type_flags;
+ input_system_source_t source_type;
+ input_system_config_flags_t source_type_flags;
//channel_cfg_t channel[N_CHANNELS];
input_system_config_flags_t ch_flags[N_CHANNELS];
// This is the place where the buffers' settings are collected, as given.
- csi_cfg_t csi_value[N_CSI_PORTS]; input_system_config_flags_t csi_flags[N_CSI_PORTS];
+ csi_cfg_t csi_value[N_CSI_PORTS];
+ input_system_config_flags_t csi_flags[N_CSI_PORTS];
// Possible another struct for ib.
// This buffers set at the end, based on the all configurations.
- ib_buffer_t csi_buffer[N_CSI_PORTS]; input_system_config_flags_t csi_buffer_flags[N_CSI_PORTS];
- ib_buffer_t acquisition_buffer_unique; input_system_config_flags_t acquisition_buffer_unique_flags;
+ ib_buffer_t csi_buffer[N_CSI_PORTS];
+ input_system_config_flags_t csi_buffer_flags[N_CSI_PORTS];
+ ib_buffer_t acquisition_buffer_unique;
+ input_system_config_flags_t acquisition_buffer_unique_flags;
u32 unallocated_ib_mem_words; // Used for check.DEFAULT = IB_CAPACITY_IN_WORDS.
//uint32_t acq_allocated_ib_mem_words;
input_system_connection_t multicast[N_CSI_PORTS];
- input_system_multiplex_t multiplexer; input_system_config_flags_t multiplexer_flags;
+ input_system_multiplex_t multiplexer;
+ input_system_config_flags_t multiplexer_flags;
- tpg_cfg_t tpg_value; input_system_config_flags_t tpg_flags;
- prbs_cfg_t prbs_value; input_system_config_flags_t prbs_flags;
- gpfifo_cfg_t gpfifo_value; input_system_config_flags_t gpfifo_flags;
+ tpg_cfg_t tpg_value;
+ input_system_config_flags_t tpg_flags;
+ prbs_cfg_t prbs_value;
+ input_system_config_flags_t prbs_flags;
+ gpfifo_cfg_t gpfifo_value;
+ input_system_config_flags_t gpfifo_flags;
input_switch_cfg_t input_switch_cfg;
- target_isp_cfg_t target_isp[N_CHANNELS]; input_system_config_flags_t target_isp_flags[N_CHANNELS];
- target_sp_cfg_t target_sp[N_CHANNELS]; input_system_config_flags_t target_sp_flags[N_CHANNELS];
- target_strm2mem_cfg_t target_strm2mem[N_CHANNELS]; input_system_config_flags_t target_strm2mem_flags[N_CHANNELS];
+ target_isp_cfg_t target_isp[N_CHANNELS];
+ input_system_config_flags_t target_isp_flags[N_CHANNELS];
+ target_sp_cfg_t target_sp[N_CHANNELS];
+ input_system_config_flags_t target_sp_flags[N_CHANNELS];
+ target_strm2mem_cfg_t target_strm2mem[N_CHANNELS];
+ input_system_config_flags_t target_strm2mem_flags[N_CHANNELS];
input_system_config_flags_t session_flags;
RX_IRQ_INFO_ERR_SOT_SYNC = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT,
RX_IRQ_INFO_ERR_CONTROL = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT,
RX_IRQ_INFO_ERR_ECC_DOUBLE = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT,
-/* RX_IRQ_INFO_NO_ERR = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT, */
+ /* RX_IRQ_INFO_NO_ERR = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT, */
RX_IRQ_INFO_ERR_CRC = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT,
RX_IRQ_INFO_ERR_UNKNOWN_ID = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT,
RX_IRQ_INFO_ERR_FRAME_SYNC = 1UL << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT,
static const hrt_address MIPI_PORT_OFFSET[N_MIPI_PORT_ID] = {
0x00000000UL,
0x00000100UL,
- 0x00000200UL};
+ 0x00000200UL
+};
static const mipi_lane_cfg_t MIPI_PORT_MAXLANES[N_MIPI_PORT_ID] = {
MIPI_4LANE_CFG,
MIPI_1LANE_CFG,
- MIPI_2LANE_CFG};
+ MIPI_2LANE_CFG
+};
static const bool MIPI_PORT_ACTIVE[N_RX_MODE][N_MIPI_PORT_ID] = {
{true, true, false},
{true, true, true},
{true, true, true},
{true, true, true},
- {true, true, true}};
+ {true, true, true}
+};
static const mipi_lane_cfg_t MIPI_PORT_LANES[N_RX_MODE][N_MIPI_PORT_ID] = {
{MIPI_4LANE_CFG, MIPI_1LANE_CFG, MIPI_0LANE_CFG},
{MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_2LANE_CFG},
{MIPI_3LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG},
{MIPI_2LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG},
- {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}};
+ {MIPI_1LANE_CFG, MIPI_1LANE_CFG, MIPI_1LANE_CFG}
+};
static const hrt_address SUB_SYSTEM_OFFSET[N_SUB_SYSTEM_ID] = {
0x00001000UL,
0x00009000UL,
0x0000A000UL,
0x0000B000UL,
- 0x0000C000UL};
+ 0x0000C000UL
+};
struct capture_unit_state_s {
int Packet_Length;
int Start_Addr;
int Mem_Region_Size;
int Num_Mem_Regions;
-/* int Init; write-only registers
- int Start;
- int Stop; */
+ /* int Init; write-only registers
+ int Start;
+ int Stop; */
};
struct acquisition_unit_state_s {
-/* int Init; write-only register */
+ /* int Init; write-only register */
int Received_Short_Packets;
int Received_Long_Packets;
int Last_Command;
int acq_start_addr;
int acq_mem_region_size;
int acq_num_mem_regions;
-/* int ctrl_init; write only register */
+ /* int ctrl_init; write only register */
int capt_reserve_one_mem_region;
};
#include "assert_support.h"
STORAGE_CLASS_INPUT_SYSTEM_C void input_system_reg_store(
- const input_system_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const input_system_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
- ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data),
+ value);
return;
}
STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_reg_load(
- const input_system_ID_t ID,
- const hrt_address reg)
+ const input_system_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
- return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + reg * sizeof(
+ hrt_data));
}
STORAGE_CLASS_INPUT_SYSTEM_C void receiver_reg_store(
- const rx_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const rx_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_RX_ID);
assert(RX_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_reg_load(
- const rx_ID_t ID,
- const hrt_address reg)
+ const rx_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_RX_ID);
assert(RX_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_INPUT_SYSTEM_C void receiver_port_reg_store(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const hrt_address reg,
- const hrt_data value)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_RX_ID);
assert(port_ID < N_MIPI_PORT_ID);
assert(RX_BASE[ID] != (hrt_address)-1);
assert(MIPI_PORT_OFFSET[port_ID] != (hrt_address)-1);
- ia_css_device_store_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg *
+ sizeof(hrt_data), value);
return;
}
STORAGE_CLASS_INPUT_SYSTEM_C hrt_data receiver_port_reg_load(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const hrt_address reg)
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const hrt_address reg)
{
assert(ID < N_RX_ID);
assert(port_ID < N_MIPI_PORT_ID);
assert(RX_BASE[ID] != (hrt_address)-1);
assert(MIPI_PORT_OFFSET[port_ID] != (hrt_address)-1);
- return ia_css_device_load_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(RX_BASE[ID] + MIPI_PORT_OFFSET[port_ID] + reg *
+ sizeof(hrt_data));
}
STORAGE_CLASS_INPUT_SYSTEM_C void input_system_sub_system_reg_store(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_ID,
- const hrt_address reg,
- const hrt_data value)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(sub_ID < N_SUB_SYSTEM_ID);
assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
assert(SUB_SYSTEM_OFFSET[sub_ID] != (hrt_address)-1);
- ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data), value);
+ ia_css_device_store_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] +
+ reg * sizeof(hrt_data), value);
return;
}
STORAGE_CLASS_INPUT_SYSTEM_C hrt_data input_system_sub_system_reg_load(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_ID,
- const hrt_address reg)
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_ID,
+ const hrt_address reg)
{
assert(ID < N_INPUT_SYSTEM_ID);
assert(sub_ID < N_SUB_SYSTEM_ID);
assert(INPUT_SYSTEM_BASE[ID] != (hrt_address)-1);
assert(SUB_SYSTEM_OFFSET[sub_ID] != (hrt_address)-1);
- return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] + SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data));
+ return ia_css_device_load_uint32(INPUT_SYSTEM_BASE[ID] +
+ SUB_SYSTEM_OFFSET[sub_ID] + reg * sizeof(hrt_data));
}
#endif /* __INPUT_SYSTEM_PRIVATE_H_INCLUDED__ */
#include "platform_support.h" /* hrt_sleep() */
static inline void irq_wait_for_write_complete(
- const irq_ID_t ID);
+ const irq_ID_t ID);
static inline bool any_irq_channel_enabled(
- const irq_ID_t ID);
+ const irq_ID_t ID);
static inline irq_ID_t virq_get_irq_id(
- const virq_id_t irq_ID,
- unsigned int *channel_ID);
+ const virq_id_t irq_ID,
+ unsigned int *channel_ID);
#ifndef __INLINE_IRQ__
#include "irq_private.h"
IRQ0_ID_N_CHANNEL,
IRQ1_ID_N_CHANNEL,
IRQ2_ID_N_CHANNEL,
- IRQ3_ID_N_CHANNEL};
+ IRQ3_ID_N_CHANNEL
+};
static unsigned short IRQ_N_ID_OFFSET[N_IRQ_ID + 1] = {
IRQ0_ID_OFFSET,
IRQ1_ID_OFFSET,
IRQ2_ID_OFFSET,
IRQ3_ID_OFFSET,
- IRQ_END_OFFSET};
+ IRQ_END_OFFSET
+};
static virq_id_t IRQ_NESTING_ID[N_IRQ_ID] = {
N_virq_id,
virq_ifmt,
virq_isys,
- virq_isel};
+ virq_isel
+};
void irq_clear_all(
- const irq_ID_t ID)
+ const irq_ID_t ID)
{
hrt_data mask = 0xFFFFFFFF;
}
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, mask);
return;
}
* Do we want the user to be able to set the signalling method ?
*/
void irq_enable_channel(
- const irq_ID_t ID,
+ const irq_ID_t ID,
const unsigned int irq_id)
{
unsigned int mask = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
unsigned int enable = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
unsigned int edge_in = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
unsigned int me = 1U << irq_id;
assert(ID < N_IRQ_ID);
enable |= me;
edge_in |= me; /* rising edge */
-/* to avoid mishaps configuration must follow the following order */
+ /* to avoid mishaps configuration must follow the following order */
-/* mask this interrupt */
+ /* mask this interrupt */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask & ~me);
-/* rising edge at input */
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask & ~me);
+ /* rising edge at input */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_EDGE_REG_IDX, edge_in);
-/* enable interrupt to output */
+ _HRT_IRQ_CONTROLLER_EDGE_REG_IDX, edge_in);
+ /* enable interrupt to output */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
-/* clear current irq only */
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
+ /* clear current irq only */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
-/* unmask interrupt from input */
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
+ /* unmask interrupt from input */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
irq_wait_for_write_complete(ID);
}
void irq_enable_pulse(
- const irq_ID_t ID,
- bool pulse)
+ const irq_ID_t ID,
+ bool pulse)
{
unsigned int edge_out = 0x0;
}
/* output is given as edge, not pulse */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out);
+ _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX, edge_out);
return;
}
void irq_disable_channel(
- const irq_ID_t ID,
- const unsigned int irq_id)
+ const irq_ID_t ID,
+ const unsigned int irq_id)
{
unsigned int mask = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
unsigned int enable = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
unsigned int me = 1U << irq_id;
assert(ID < N_IRQ_ID);
mask &= ~me;
enable &= ~me;
-/* enable interrupt to output */
+ /* enable interrupt to output */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
-/* unmask interrupt from input */
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX, enable);
+ /* unmask interrupt from input */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
-/* clear current irq only */
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX, mask);
+ /* clear current irq only */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, me);
irq_wait_for_write_complete(ID);
}
enum hrt_isp_css_irq_status irq_get_channel_id(
- const irq_ID_t ID,
- unsigned int *irq_id)
+ const irq_ID_t ID,
+ unsigned int *irq_id)
{
unsigned int irq_status = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
unsigned int idx;
enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
assert(ID < N_IRQ_ID);
assert(irq_id);
-/* find the first irq bit */
+ /* find the first irq bit */
for (idx = 0; idx < IRQ_N_CHANNEL[ID]; idx++) {
if (irq_status & (1U << idx))
break;
if (idx == IRQ_N_CHANNEL[ID])
return hrt_isp_css_irq_status_error;
-/* now check whether there are more bits set */
+ /* now check whether there are more bits set */
if (irq_status != (1U << idx))
status = hrt_isp_css_irq_status_more_irqs;
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
irq_wait_for_write_complete(ID);
static const hrt_address IRQ_REQUEST_ADDR[N_IRQ_SW_CHANNEL_ID] = {
_REG_GP_IRQ_REQUEST0_ADDR,
- _REG_GP_IRQ_REQUEST1_ADDR};
+ _REG_GP_IRQ_REQUEST1_ADDR
+};
void irq_raise(
- const irq_ID_t ID,
- const irq_sw_channel_id_t irq_id)
+ const irq_ID_t ID,
+ const irq_sw_channel_id_t irq_id)
{
hrt_address addr;
(void)ID;
addr = IRQ_REQUEST_ADDR[irq_id];
-/* The SW IRQ pins are remapped to offset zero */
+ /* The SW IRQ pins are remapped to offset zero */
gp_device_reg_store(GP_DEVICE0_ID,
- (unsigned int)addr, 1);
+ (unsigned int)addr, 1);
gp_device_reg_store(GP_DEVICE0_ID,
- (unsigned int)addr, 0);
+ (unsigned int)addr, 0);
return;
}
void irq_controller_get_state(
- const irq_ID_t ID,
- irq_controller_state_t *state)
+ const irq_ID_t ID,
+ irq_controller_state_t *state)
{
assert(ID < N_IRQ_ID);
assert(state);
state->irq_edge = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_EDGE_REG_IDX);
state->irq_mask = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
+ _HRT_IRQ_CONTROLLER_MASK_REG_IDX);
state->irq_status = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
state->irq_enable = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
state->irq_level_not_pulse = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_EDGE_NOT_PULSE_REG_IDX);
return;
}
bool any_virq_signal(void)
{
unsigned int irq_status = irq_reg_load(IRQ0_ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
return (irq_status != 0);
}
void cnd_virq_enable_channel(
- const virq_id_t irq_ID,
- const bool en)
+ const virq_id_t irq_ID,
+ const bool en)
{
irq_ID_t i;
unsigned int channel_ID;
assert(ID < N_IRQ_ID);
for (i = IRQ1_ID; i < N_IRQ_ID; i++) {
- /* It is not allowed to enable the pin of a nested IRQ directly */
+ /* It is not allowed to enable the pin of a nested IRQ directly */
assert(irq_ID != IRQ_NESTING_ID[i]);
}
if (en) {
irq_enable_channel(ID, channel_ID);
if (IRQ_NESTING_ID[ID] != N_virq_id) {
-/* Single level nesting, otherwise we'd need to recurse */
+ /* Single level nesting, otherwise we'd need to recurse */
irq_enable_channel(IRQ0_ID, IRQ_NESTING_ID[ID]);
}
} else {
irq_disable_channel(ID, channel_ID);
if ((IRQ_NESTING_ID[ID] != N_virq_id) && !any_irq_channel_enabled(ID)) {
-/* Only disable the top if the nested ones are empty */
+ /* Only disable the top if the nested ones are empty */
irq_disable_channel(IRQ0_ID, IRQ_NESTING_ID[ID]);
}
}
}
enum hrt_isp_css_irq_status virq_get_channel_signals(
- virq_info_t *irq_info)
+ virq_info_t *irq_info)
{
enum hrt_isp_css_irq_status irq_status = hrt_isp_css_irq_status_error;
irq_ID_t ID;
for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
if (any_irq_channel_enabled(ID)) {
hrt_data irq_data = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
if (irq_data != 0) {
-/* The error condition is an IRQ pulse received with no IRQ status written */
+ /* The error condition is an IRQ pulse received with no IRQ status written */
irq_status = hrt_isp_css_irq_status_success;
}
irq_info->irq_status_reg[ID] |= irq_data;
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, irq_data);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, irq_data);
irq_wait_for_write_complete(ID);
}
}
void virq_clear_info(
- virq_info_t *irq_info)
+ virq_info_t *irq_info)
{
irq_ID_t ID;
assert(irq_info);
for (ID = (irq_ID_t)0 ; ID < N_IRQ_ID; ID++) {
- irq_info->irq_status_reg[ID] = 0;
+ irq_info->irq_status_reg[ID] = 0;
}
return;
}
enum hrt_isp_css_irq_status virq_get_channel_id(
- virq_id_t *irq_id)
+ virq_id_t *irq_id)
{
unsigned int irq_status = irq_reg_load(IRQ0_ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
unsigned int idx;
enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_success;
irq_ID_t ID;
assert(irq_id);
-/* find the first irq bit on device 0 */
+ /* find the first irq bit on device 0 */
for (idx = 0; idx < IRQ_N_CHANNEL[IRQ0_ID]; idx++) {
if (irq_status & (1U << idx))
break;
return hrt_isp_css_irq_status_error;
}
-/* Check whether there are more bits set on device 0 */
+ /* Check whether there are more bits set on device 0 */
if (irq_status != (1U << idx)) {
status = hrt_isp_css_irq_status_more_irqs;
}
-/* Check whether we have an IRQ on one of the nested devices */
+ /* Check whether we have an IRQ on one of the nested devices */
for (ID = N_IRQ_ID - 1 ; ID > (irq_ID_t)0; ID--) {
if (IRQ_NESTING_ID[ID] == (virq_id_t)idx) {
break;
}
}
-/* If we have a nested IRQ, load that state, discard the device 0 state */
+ /* If we have a nested IRQ, load that state, discard the device 0 state */
if (ID != IRQ0_ID) {
irq_status = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
-/* find the first irq bit on device "id" */
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX);
+ /* find the first irq bit on device "id" */
for (idx = 0; idx < IRQ_N_CHANNEL[ID]; idx++) {
if (irq_status & (1U << idx))
break;
return hrt_isp_css_irq_status_error;
}
-/* Alternatively check whether there are more bits set on this device */
+ /* Alternatively check whether there are more bits set on this device */
if (irq_status != (1U << idx)) {
status = hrt_isp_css_irq_status_more_irqs;
} else {
-/* If this device is empty, clear the state on device 0 */
+ /* If this device is empty, clear the state on device 0 */
irq_reg_store(IRQ0_ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << IRQ_NESTING_ID[ID]);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << IRQ_NESTING_ID[ID]);
}
} /* if (ID != IRQ0_ID) */
-/* Here we proceed to clear the IRQ on detected device, if no nested IRQ, this is device 0 */
+ /* Here we proceed to clear the IRQ on detected device, if no nested IRQ, this is device 0 */
irq_reg_store(ID,
- _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
+ _HRT_IRQ_CONTROLLER_CLEAR_REG_IDX, 1U << idx);
irq_wait_for_write_complete(ID);
}
static inline void irq_wait_for_write_complete(
- const irq_ID_t ID)
+ const irq_ID_t ID)
{
assert(ID < N_IRQ_ID);
assert(IRQ_BASE[ID] != (hrt_address)-1);
(void)ia_css_device_load_uint32(IRQ_BASE[ID] +
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX * sizeof(hrt_data));
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX * sizeof(hrt_data));
}
static inline bool any_irq_channel_enabled(
- const irq_ID_t ID)
+ const irq_ID_t ID)
{
hrt_data en_reg;
assert(ID < N_IRQ_ID);
en_reg = irq_reg_load(ID,
- _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
+ _HRT_IRQ_CONTROLLER_ENABLE_REG_IDX);
return (en_reg != 0);
}
static inline irq_ID_t virq_get_irq_id(
- const virq_id_t irq_ID,
- unsigned int *channel_ID)
+ const virq_id_t irq_ID,
+ unsigned int *channel_ID)
{
irq_ID_t ID;
#include "assert_support.h"
STORAGE_CLASS_IRQ_C void irq_reg_store(
- const irq_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const irq_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
assert(ID < N_IRQ_ID);
assert(IRQ_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(
- const irq_ID_t ID,
- const unsigned int reg)
+ const irq_ID_t ID,
+ const unsigned int reg)
{
assert(ID < N_IRQ_ID);
assert(IRQ_BASE[ID] != (hrt_address) - 1);
#include "platform_support.h" /* hrt_sleep() */
void cnd_isp_irq_enable(
- const isp_ID_t ID,
- const bool cnd)
+ const isp_ID_t ID,
+ const bool cnd)
{
if (cnd) {
isp_ctrl_setbit(ID, ISP_IRQ_READY_REG, ISP_IRQ_READY_BIT);
-/* Enabling the IRQ immediately triggers an interrupt, clear it */
+ /* Enabling the IRQ immediately triggers an interrupt, clear it */
isp_ctrl_setbit(ID, ISP_IRQ_CLEAR_REG, ISP_IRQ_CLEAR_BIT);
} else {
isp_ctrl_clearbit(ID, ISP_IRQ_READY_REG,
- ISP_IRQ_READY_BIT);
+ ISP_IRQ_READY_BIT);
}
return;
}
void isp_get_state(
- const isp_ID_t ID,
- isp_state_t *state,
- isp_stall_t *stall)
+ const isp_ID_t ID,
+ isp_state_t *state,
+ isp_stall_t *stall)
{
hrt_data sc = isp_ctrl_load(ID, ISP_SC_REG);
state->is_sleeping = isp_ctrl_getbit(ID, ISP_SC_REG, ISP_SLEEPING_BIT);
state->is_stalling = isp_ctrl_getbit(ID, ISP_SC_REG, ISP_STALLING_BIT);
stall->stat_ctrl =
- !isp_ctrl_getbit(ID, ISP_CTRL_SINK_REG, ISP_CTRL_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_CTRL_SINK_REG, ISP_CTRL_SINK_BIT);
stall->pmem =
- !isp_ctrl_getbit(ID, ISP_PMEM_SINK_REG, ISP_PMEM_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_PMEM_SINK_REG, ISP_PMEM_SINK_BIT);
stall->dmem =
- !isp_ctrl_getbit(ID, ISP_DMEM_SINK_REG, ISP_DMEM_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_DMEM_SINK_REG, ISP_DMEM_SINK_BIT);
stall->vmem =
- !isp_ctrl_getbit(ID, ISP_VMEM_SINK_REG, ISP_VMEM_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_VMEM_SINK_REG, ISP_VMEM_SINK_BIT);
stall->fifo0 =
- !isp_ctrl_getbit(ID, ISP_FIFO0_SINK_REG, ISP_FIFO0_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO0_SINK_REG, ISP_FIFO0_SINK_BIT);
stall->fifo1 =
- !isp_ctrl_getbit(ID, ISP_FIFO1_SINK_REG, ISP_FIFO1_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO1_SINK_REG, ISP_FIFO1_SINK_BIT);
stall->fifo2 =
- !isp_ctrl_getbit(ID, ISP_FIFO2_SINK_REG, ISP_FIFO2_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO2_SINK_REG, ISP_FIFO2_SINK_BIT);
stall->fifo3 =
- !isp_ctrl_getbit(ID, ISP_FIFO3_SINK_REG, ISP_FIFO3_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO3_SINK_REG, ISP_FIFO3_SINK_BIT);
stall->fifo4 =
- !isp_ctrl_getbit(ID, ISP_FIFO4_SINK_REG, ISP_FIFO4_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO4_SINK_REG, ISP_FIFO4_SINK_BIT);
stall->fifo5 =
- !isp_ctrl_getbit(ID, ISP_FIFO5_SINK_REG, ISP_FIFO5_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO5_SINK_REG, ISP_FIFO5_SINK_BIT);
stall->fifo6 =
- !isp_ctrl_getbit(ID, ISP_FIFO6_SINK_REG, ISP_FIFO6_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_FIFO6_SINK_REG, ISP_FIFO6_SINK_BIT);
stall->vamem1 =
- !isp_ctrl_getbit(ID, ISP_VAMEM1_SINK_REG, ISP_VAMEM1_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_VAMEM1_SINK_REG, ISP_VAMEM1_SINK_BIT);
stall->vamem2 =
- !isp_ctrl_getbit(ID, ISP_VAMEM2_SINK_REG, ISP_VAMEM2_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_VAMEM2_SINK_REG, ISP_VAMEM2_SINK_BIT);
stall->vamem3 =
- !isp_ctrl_getbit(ID, ISP_VAMEM3_SINK_REG, ISP_VAMEM3_SINK_BIT);
+ !isp_ctrl_getbit(ID, ISP_VAMEM3_SINK_REG, ISP_VAMEM3_SINK_BIT);
stall->hmem =
- !isp_ctrl_getbit(ID, ISP_HMEM_SINK_REG, ISP_HMEM_SINK_BIT);
-/*
- stall->icache_master =
- !isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG,
- ISP_ICACHE_MT_SINK_BIT);
- */
+ !isp_ctrl_getbit(ID, ISP_HMEM_SINK_REG, ISP_HMEM_SINK_BIT);
+ /*
+ stall->icache_master =
+ !isp_ctrl_getbit(ID, ISP_ICACHE_MT_SINK_REG,
+ ISP_ICACHE_MT_SINK_BIT);
+ */
return;
}
#include "type_support.h"
STORAGE_CLASS_ISP_C void isp_ctrl_store(
- const isp_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
assert(ID < N_ISP_ID);
assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C hrt_data isp_ctrl_load(
- const isp_ID_t ID,
- const unsigned int reg)
+ const isp_ID_t ID,
+ const unsigned int reg)
{
assert(ID < N_ISP_ID);
assert(ISP_CTRL_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C bool isp_ctrl_getbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit)
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit)
{
hrt_data val = isp_ctrl_load(ID, reg);
}
STORAGE_CLASS_ISP_C void isp_ctrl_setbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit)
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit)
{
hrt_data data = isp_ctrl_load(ID, reg);
}
STORAGE_CLASS_ISP_C void isp_ctrl_clearbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit)
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit)
{
hrt_data data = isp_ctrl_load(ID, reg);
}
STORAGE_CLASS_ISP_C void isp_dmem_store(
- const isp_ID_t ID,
- unsigned int addr,
- const void *data,
- const size_t size)
+ const isp_ID_t ID,
+ unsigned int addr,
+ const void *data,
+ const size_t size)
{
assert(ID < N_ISP_ID);
assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C void isp_dmem_load(
- const isp_ID_t ID,
- const unsigned int addr,
- void *data,
- const size_t size)
+ const isp_ID_t ID,
+ const unsigned int addr,
+ void *data,
+ const size_t size)
{
assert(ID < N_ISP_ID);
assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C void isp_dmem_store_uint32(
- const isp_ID_t ID,
- unsigned int addr,
- const uint32_t data)
+ const isp_ID_t ID,
+ unsigned int addr,
+ const uint32_t data)
{
assert(ID < N_ISP_ID);
assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C uint32_t isp_dmem_load_uint32(
- const isp_ID_t ID,
- const unsigned int addr)
+ const isp_ID_t ID,
+ const unsigned int addr)
{
assert(ID < N_ISP_ID);
assert(ISP_DMEM_BASE[ID] != (hrt_address) - 1);
}
STORAGE_CLASS_ISP_C uint32_t isp_2w_cat_1w(
- const u16 x0,
- const uint16_t x1)
+ const u16 x0,
+ const uint16_t x1)
{
u32 out = ((uint32_t)(x1 & HIVE_ISP_VMEM_MASK) << ISP_VMEM_ELEMBITS)
- | (x0 & HIVE_ISP_VMEM_MASK);
+ | (x0 & HIVE_ISP_VMEM_MASK);
return out;
}
#include "mmu_device.h"
void mmu_set_page_table_base_index(
- const mmu_ID_t ID,
- const hrt_data base_index)
+ const mmu_ID_t ID,
+ const hrt_data base_index)
{
mmu_reg_store(ID, _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX, base_index);
return;
}
hrt_data mmu_get_page_table_base_index(
- const mmu_ID_t ID)
+ const mmu_ID_t ID)
{
return mmu_reg_load(ID, _HRT_MMU_PAGE_TABLE_BASE_ADDRESS_REG_IDX);
}
void mmu_invalidate_cache(
- const mmu_ID_t ID)
+ const mmu_ID_t ID)
{
mmu_reg_store(ID, _HRT_MMU_INVALIDATE_TLB_REG_IDX, 1);
return;
#include "assert_support.h"
void cnd_sp_irq_enable(
- const sp_ID_t ID,
- const bool cnd)
+ const sp_ID_t ID,
+ const bool cnd)
{
if (cnd) {
sp_ctrl_setbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
-/* Enabling the IRQ immediately triggers an interrupt, clear it */
+ /* Enabling the IRQ immediately triggers an interrupt, clear it */
sp_ctrl_setbit(ID, SP_IRQ_CLEAR_REG, SP_IRQ_CLEAR_BIT);
} else {
sp_ctrl_clearbit(ID, SP_IRQ_READY_REG, SP_IRQ_READY_BIT);
}
void sp_get_state(
- const sp_ID_t ID,
- sp_state_t *state,
- sp_stall_t *stall)
+ const sp_ID_t ID,
+ sp_state_t *state,
+ sp_stall_t *stall)
{
hrt_data sc = sp_ctrl_load(ID, SP_SC_REG);
state->is_sleeping = (sc & (1U << SP_SLEEPING_BIT)) != 0;
state->is_stalling = (sc & (1U << SP_STALLING_BIT)) != 0;
stall->fifo0 =
- !sp_ctrl_getbit(ID, SP_FIFO0_SINK_REG, SP_FIFO0_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO0_SINK_REG, SP_FIFO0_SINK_BIT);
stall->fifo1 =
- !sp_ctrl_getbit(ID, SP_FIFO1_SINK_REG, SP_FIFO1_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO1_SINK_REG, SP_FIFO1_SINK_BIT);
stall->fifo2 =
- !sp_ctrl_getbit(ID, SP_FIFO2_SINK_REG, SP_FIFO2_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO2_SINK_REG, SP_FIFO2_SINK_BIT);
stall->fifo3 =
- !sp_ctrl_getbit(ID, SP_FIFO3_SINK_REG, SP_FIFO3_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO3_SINK_REG, SP_FIFO3_SINK_BIT);
stall->fifo4 =
- !sp_ctrl_getbit(ID, SP_FIFO4_SINK_REG, SP_FIFO4_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO4_SINK_REG, SP_FIFO4_SINK_BIT);
stall->fifo5 =
- !sp_ctrl_getbit(ID, SP_FIFO5_SINK_REG, SP_FIFO5_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO5_SINK_REG, SP_FIFO5_SINK_BIT);
stall->fifo6 =
- !sp_ctrl_getbit(ID, SP_FIFO6_SINK_REG, SP_FIFO6_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO6_SINK_REG, SP_FIFO6_SINK_BIT);
stall->fifo7 =
- !sp_ctrl_getbit(ID, SP_FIFO7_SINK_REG, SP_FIFO7_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO7_SINK_REG, SP_FIFO7_SINK_BIT);
stall->fifo8 =
- !sp_ctrl_getbit(ID, SP_FIFO8_SINK_REG, SP_FIFO8_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO8_SINK_REG, SP_FIFO8_SINK_BIT);
stall->fifo9 =
- !sp_ctrl_getbit(ID, SP_FIFO9_SINK_REG, SP_FIFO9_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFO9_SINK_REG, SP_FIFO9_SINK_BIT);
stall->fifoa =
- !sp_ctrl_getbit(ID, SP_FIFOA_SINK_REG, SP_FIFOA_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_FIFOA_SINK_REG, SP_FIFOA_SINK_BIT);
stall->dmem =
- !sp_ctrl_getbit(ID, SP_DMEM_SINK_REG, SP_DMEM_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_DMEM_SINK_REG, SP_DMEM_SINK_BIT);
stall->control_master =
- !sp_ctrl_getbit(ID, SP_CTRL_MT_SINK_REG, SP_CTRL_MT_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_CTRL_MT_SINK_REG, SP_CTRL_MT_SINK_BIT);
stall->icache_master =
- !sp_ctrl_getbit(ID, SP_ICACHE_MT_SINK_REG,
- SP_ICACHE_MT_SINK_BIT);
+ !sp_ctrl_getbit(ID, SP_ICACHE_MT_SINK_REG,
+ SP_ICACHE_MT_SINK_BIT);
}
#include "assert_support.h"
STORAGE_CLASS_SP_C void sp_ctrl_store(
- const sp_ID_t ID,
- const hrt_address reg,
- const hrt_data value)
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value)
{
assert(ID < N_SP_ID);
assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C hrt_data sp_ctrl_load(
- const sp_ID_t ID,
- const hrt_address reg)
+ const sp_ID_t ID,
+ const hrt_address reg)
{
assert(ID < N_SP_ID);
assert(SP_CTRL_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C bool sp_ctrl_getbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit)
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit)
{
hrt_data val = sp_ctrl_load(ID, reg);
}
STORAGE_CLASS_SP_C void sp_ctrl_setbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit)
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit)
{
hrt_data data = sp_ctrl_load(ID, reg);
}
STORAGE_CLASS_SP_C void sp_ctrl_clearbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit)
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit)
{
hrt_data data = sp_ctrl_load(ID, reg);
}
STORAGE_CLASS_SP_C void sp_dmem_store(
- const sp_ID_t ID,
- hrt_address addr,
- const void *data,
- const size_t size)
+ const sp_ID_t ID,
+ hrt_address addr,
+ const void *data,
+ const size_t size)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C void sp_dmem_load(
- const sp_ID_t ID,
- const hrt_address addr,
- void *data,
- const size_t size)
+ const sp_ID_t ID,
+ const hrt_address addr,
+ void *data,
+ const size_t size)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C void sp_dmem_store_uint8(
- const sp_ID_t ID,
- hrt_address addr,
- const uint8_t data)
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint8_t data)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C void sp_dmem_store_uint16(
- const sp_ID_t ID,
- hrt_address addr,
- const uint16_t data)
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint16_t data)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C void sp_dmem_store_uint32(
- const sp_ID_t ID,
- hrt_address addr,
- const uint32_t data)
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint32_t data)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C uint8_t sp_dmem_load_uint8(
- const sp_ID_t ID,
- const hrt_address addr)
+ const sp_ID_t ID,
+ const hrt_address addr)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C uint16_t sp_dmem_load_uint16(
- const sp_ID_t ID,
- const hrt_address addr)
+ const sp_ID_t ID,
+ const hrt_address addr)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
}
STORAGE_CLASS_SP_C uint32_t sp_dmem_load_uint32(
- const sp_ID_t ID,
- const hrt_address addr)
+ const sp_ID_t ID,
+ const hrt_address addr)
{
assert(ID < N_SP_ID);
assert(SP_DMEM_BASE[ID] != (hrt_address)-1);
/* DDR */
static const hrt_address DDR_BASE[N_DDR_ID] = {
- (hrt_address)0x0000000120000000ULL};
+ (hrt_address)0x0000000120000000ULL
+};
/* ISP */
static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
- (hrt_address)0x0000000000020000ULL};
+ (hrt_address)0x0000000000020000ULL
+};
static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
- (hrt_address)0x0000000000200000ULL};
+ (hrt_address)0x0000000000200000ULL
+};
static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
- (hrt_address)0x0000000000100000ULL};
+ (hrt_address)0x0000000000100000ULL
+};
static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
(hrt_address)0x00000000001C0000ULL,
(hrt_address)0x00000000001D0000ULL,
- (hrt_address)0x00000000001E0000ULL};
+ (hrt_address)0x00000000001E0000ULL
+};
static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
- (hrt_address)0x00000000001F0000ULL};
+ (hrt_address)0x00000000001F0000ULL
+};
/* SP */
static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
- (hrt_address)0x0000000000010000ULL};
+ (hrt_address)0x0000000000010000ULL
+};
static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
- (hrt_address)0x0000000000300000ULL};
+ (hrt_address)0x0000000000300000ULL
+};
static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
- (hrt_address)0x00000000000B0000ULL};
+ (hrt_address)0x00000000000B0000ULL
+};
/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
*/
static const hrt_address MMU_BASE[N_MMU_ID] = {
(hrt_address)0x0000000000070000ULL,
- (hrt_address)0x00000000000A0000ULL};
+ (hrt_address)0x00000000000A0000ULL
+};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif
/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
- (hrt_address)0x0000000000040000ULL};
+ (hrt_address)0x0000000000040000ULL
+};
/* IRQ */
static const hrt_address IRQ_BASE[N_IRQ_ID] = {
(hrt_address)0x0000000000000500ULL,
(hrt_address)0x0000000000030A00ULL,
(hrt_address)0x000000000008C000ULL,
- (hrt_address)0x0000000000090200ULL};
+ (hrt_address)0x0000000000090200ULL
+};
/*
(hrt_address)0x0000000000000500ULL};
*/
/* GDC */
static const hrt_address GDC_BASE[N_GDC_ID] = {
(hrt_address)0x0000000000050000ULL,
- (hrt_address)0x0000000000060000ULL};
+ (hrt_address)0x0000000000060000ULL
+};
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
- (hrt_address)0x0000000000000000ULL};
+ (hrt_address)0x0000000000000000ULL
+};
/*
static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
/* GP_DEVICE (single base for all separate GP_REG instances) */
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
- (hrt_address)0x0000000000000000ULL};
+ (hrt_address)0x0000000000000000ULL
+};
/*GP TIMER , all timer registers are inter-twined,
* so, having multiple base addresses for
* different timers does not help*/
static const hrt_address GP_TIMER_BASE =
- (hrt_address)0x0000000000000600ULL;
+ (hrt_address)0x0000000000000600ULL;
/* GPIO */
static const hrt_address GPIO_BASE[N_GPIO_ID] = {
- (hrt_address)0x0000000000000400ULL};
+ (hrt_address)0x0000000000000400ULL
+};
/* TIMED_CTRL */
static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
- (hrt_address)0x0000000000000100ULL};
+ (hrt_address)0x0000000000000100ULL
+};
/* INPUT_FORMATTER */
static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
(hrt_address)0x0000000000030000ULL,
(hrt_address)0x0000000000030200ULL,
(hrt_address)0x0000000000030400ULL,
- (hrt_address)0x0000000000030600ULL}; /* memcpy() */
+ (hrt_address)0x0000000000030600ULL
+}; /* memcpy() */
/* INPUT_SYSTEM */
static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
- (hrt_address)0x0000000000080000ULL};
+ (hrt_address)0x0000000000080000ULL
+};
/* (hrt_address)0x0000000000081000ULL, */ /* capture A */
/* (hrt_address)0x0000000000082000ULL, */ /* capture B */
/* (hrt_address)0x0000000000083000ULL, */ /* capture C */
/* RX, the MIPI lane control regs start at offset 0 */
static const hrt_address RX_BASE[N_RX_ID] = {
- (hrt_address)0x0000000000080100ULL};
+ (hrt_address)0x0000000000080100ULL
+};
#elif HRT_ADDRESS_WIDTH == 32
/* DDR : Attention, this value not defined in 32-bit */
static const hrt_address DDR_BASE[N_DDR_ID] = {
- (hrt_address)0x00000000UL};
+ (hrt_address)0x00000000UL
+};
/* ISP */
static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
- (hrt_address)0x00020000UL};
+ (hrt_address)0x00020000UL
+};
static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
- (hrt_address)0x00200000UL};
+ (hrt_address)0x00200000UL
+};
static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
- (hrt_address)0x100000UL};
+ (hrt_address)0x100000UL
+};
static const hrt_address ISP_VAMEM_BASE[N_VAMEM_ID] = {
(hrt_address)0xffffffffUL,
(hrt_address)0xffffffffUL,
- (hrt_address)0xffffffffUL};
+ (hrt_address)0xffffffffUL
+};
static const hrt_address ISP_HMEM_BASE[N_HMEM_ID] = {
- (hrt_address)0xffffffffUL};
+ (hrt_address)0xffffffffUL
+};
/* SP */
static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
- (hrt_address)0x00010000UL};
+ (hrt_address)0x00010000UL
+};
static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
- (hrt_address)0x00300000UL};
+ (hrt_address)0x00300000UL
+};
static const hrt_address SP_PMEM_BASE[N_SP_ID] = {
- (hrt_address)0x000B0000UL};
+ (hrt_address)0x000B0000UL
+};
/* MMU */
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM) || defined(IS_ISP_2401_MAMOIADA_SYSTEM)
*/
static const hrt_address MMU_BASE[N_MMU_ID] = {
(hrt_address)0x00070000UL,
- (hrt_address)0x000A0000UL};
+ (hrt_address)0x000A0000UL
+};
#else
#error "system_local.h: SYSTEM must be one of {2400, 2401 }"
#endif
/* DMA */
static const hrt_address DMA_BASE[N_DMA_ID] = {
- (hrt_address)0x00040000UL};
+ (hrt_address)0x00040000UL
+};
/* IRQ */
static const hrt_address IRQ_BASE[N_IRQ_ID] = {
(hrt_address)0x00000500UL,
(hrt_address)0x00030A00UL,
(hrt_address)0x0008C000UL,
- (hrt_address)0x00090200UL};
+ (hrt_address)0x00090200UL
+};
/*
(hrt_address)0x00000500UL};
*/
/* GDC */
static const hrt_address GDC_BASE[N_GDC_ID] = {
(hrt_address)0x00050000UL,
- (hrt_address)0x00060000UL};
+ (hrt_address)0x00060000UL
+};
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
- (hrt_address)0x00000000UL};
+ (hrt_address)0x00000000UL
+};
/*
static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
/* GP_DEVICE (single base for all separate GP_REG instances) */
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
- (hrt_address)0x00000000UL};
+ (hrt_address)0x00000000UL
+};
/*GP TIMER , all timer registers are inter-twined,
* so, having multiple base addresses for
* different timers does not help*/
static const hrt_address GP_TIMER_BASE =
- (hrt_address)0x00000600UL;
+ (hrt_address)0x00000600UL;
/* GPIO */
static const hrt_address GPIO_BASE[N_GPIO_ID] = {
- (hrt_address)0x00000400UL};
+ (hrt_address)0x00000400UL
+};
/* TIMED_CTRL */
static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
- (hrt_address)0x00000100UL};
+ (hrt_address)0x00000100UL
+};
/* INPUT_FORMATTER */
static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
(hrt_address)0x00030000UL,
(hrt_address)0x00030200UL,
- (hrt_address)0x00030400UL};
+ (hrt_address)0x00030400UL
+};
/* (hrt_address)0x00030600UL, */ /* memcpy() */
/* INPUT_SYSTEM */
static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
- (hrt_address)0x00080000UL};
+ (hrt_address)0x00080000UL
+};
/* (hrt_address)0x00081000UL, */ /* capture A */
/* (hrt_address)0x00082000UL, */ /* capture B */
/* (hrt_address)0x00083000UL, */ /* capture C */
/* RX, the MIPI lane control regs start at offset 0 */
static const hrt_address RX_BASE[N_RX_ID] = {
- (hrt_address)0x00080100UL};
+ (hrt_address)0x00080100UL
+};
#else
#error "system_local.h: HRT_ADDRESS_WIDTH must be one of {32,64}"
#include "assert_support.h"
void timed_ctrl_snd_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- hrt_address addr,
- hrt_data value)
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ hrt_address addr,
+ hrt_data value)
{
OP___assert(ID == TIMED_CTRL0_ID);
OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address)-1);
correct BASE address both for csim and android */
void timed_ctrl_snd_sp_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const sp_ID_t SP_ID,
- hrt_address offset,
- hrt_data value)
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ const sp_ID_t SP_ID,
+ hrt_address offset,
+ hrt_data value)
{
OP___assert(SP_ID < N_SP_ID);
OP___assert(SP_DMEM_BASE[SP_ID] != (hrt_address)-1);
timed_ctrl_snd_commnd(ID, mask, condition, counter,
- SP_DMEM_BASE[SP_ID] + offset, value);
+ SP_DMEM_BASE[SP_ID] + offset, value);
}
void timed_ctrl_snd_gpio_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const gpio_ID_t GPIO_ID,
- hrt_address offset,
- hrt_data value)
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ const gpio_ID_t GPIO_ID,
+ hrt_address offset,
+ hrt_data value)
{
OP___assert(GPIO_ID < N_GPIO_ID);
OP___assert(GPIO_BASE[GPIO_ID] != (hrt_address)-1);
timed_ctrl_snd_commnd(ID, mask, condition, counter,
- GPIO_BASE[GPIO_ID] + offset, value);
+ GPIO_BASE[GPIO_ID] + offset, value);
}
#include "assert_support.h"
STORAGE_CLASS_TIMED_CTRL_C void timed_ctrl_reg_store(
- const timed_ctrl_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const timed_ctrl_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
-OP___assert(ID < N_TIMED_CTRL_ID);
-OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
+ OP___assert(ID < N_TIMED_CTRL_ID);
+ OP___assert(TIMED_CTRL_BASE[ID] != (hrt_address) - 1);
ia_css_device_store_uint32(TIMED_CTRL_BASE[ID] + reg * sizeof(hrt_data), value);
}
#include "assert_support.h"
STORAGE_CLASS_ISP_C void isp_vamem_store(
- const vamem_ID_t ID,
- vamem_data_t *addr,
- const vamem_data_t *data,
- const size_t size) /* in vamem_data_t */
+ const vamem_ID_t ID,
+ vamem_data_t *addr,
+ const vamem_data_t *data,
+ const size_t size) /* in vamem_data_t */
{
assert(ID < N_VAMEM_ID);
assert(ISP_VAMEM_BASE[ID] != (hrt_address) - 1);
- hrt_master_port_store(ISP_VAMEM_BASE[ID] + (unsigned int)addr, data, size * sizeof(vamem_data_t));
+ hrt_master_port_store(ISP_VAMEM_BASE[ID] + (unsigned int)addr, data,
+ size * sizeof(vamem_data_t));
}
#endif /* __VAMEM_PRIVATE_H_INCLUDED__ */
#include "platform_support.h" /* hrt_sleep() */
typedef unsigned long long hive_uedge;
-typedef hive_uedge * hive_wide;
+typedef hive_uedge *hive_wide;
/* Copied from SDK: sim_semantics.c */
static void
move_subword(
- hive_uedge *target,
- unsigned int target_bit,
- hive_uedge src,
- unsigned int src_start,
- unsigned int src_end)
+ hive_uedge *target,
+ unsigned int target_bit,
+ hive_uedge src,
+ unsigned int src_start,
+ unsigned int src_end)
{
unsigned int start_elem = target_bit / uedge_bits;
unsigned int start_bit = target_bit % uedge_bits;
hive_uedge old_val0 = INV_SUBWORD(target[start_elem], start_bit, uedge_bits);
target[start_elem] = old_val0 | (src_subword << start_bit);
- old_val1 = INV_SUBWORD(target[start_elem + 1], 0, subword_width + start_bit - uedge_bits);
+ old_val1 = INV_SUBWORD(target[start_elem + 1], 0,
+ subword_width + start_bit - uedge_bits);
target[start_elem + 1] = old_val1 | (src_subword >> (uedge_bits - start_bit));
} else {
- hive_uedge old_val = INV_SUBWORD(target[start_elem], start_bit, start_bit + subword_width);
+ hive_uedge old_val = INV_SUBWORD(target[start_elem], start_bit,
+ start_bit + subword_width);
target[start_elem] = old_val | (src_subword << start_bit);
}
static void
hive_sim_wide_unpack(
- hive_wide vector,
- hive_wide elem,
- hive_uint elem_bits,
- hive_uint index)
+ hive_wide vector,
+ hive_wide elem,
+ hive_uint elem_bits,
+ hive_uint index)
{
/* pointers into wide_type: */
unsigned int start_elem = (elem_bits * index) / uedge_bits;
static void
hive_sim_wide_pack(
- hive_wide vector,
- hive_wide elem,
- hive_uint elem_bits,
- hive_uint index)
+ hive_wide vector,
+ hive_wide elem,
+ hive_uint elem_bits,
+ hive_uint index)
{
/* pointers into wide_type: */
unsigned int start_elem = (elem_bits * index) / uedge_bits;
unsigned int start_bit = elem_bits * index;
unsigned int i = 0;
- for (; bits_to_write > uedge_bits; bits_to_write -= uedge_bits, i++, start_bit += uedge_bits) {
+ for (; bits_to_write > uedge_bits;
+ bits_to_write -= uedge_bits, i++, start_bit += uedge_bits) {
move_word(vector, start_bit, elem[i]);
}
move_lower_bits(vector, start_bit, elem[i], bits_to_write);
}
static void load_vector(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from)
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from)
{
unsigned int i;
hive_uedge *data;
}
static void store_vector(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from)
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from)
{
unsigned int i;
unsigned int size = sizeof(short) * ISP_NWAY;
}
void isp_vmem_load(
- const isp_ID_t ID,
- const t_vmem_elem *from,
- t_vmem_elem *to,
- unsigned int elems) /* In t_vmem_elem */
+ const isp_ID_t ID,
+ const t_vmem_elem *from,
+ t_vmem_elem *to,
+ unsigned int elems) /* In t_vmem_elem */
{
unsigned int c;
const t_vmem_elem *vp = from;
}
void isp_vmem_store(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from,
- unsigned int elems) /* In t_vmem_elem */
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from,
+ unsigned int elems) /* In t_vmem_elem */
{
unsigned int c;
t_vmem_elem *vp = to;
}
void isp_vmem_2d_load(
- const isp_ID_t ID,
- const t_vmem_elem *from,
- t_vmem_elem *to,
- unsigned int height,
- unsigned int width,
- unsigned int stride_to, /* In t_vmem_elem */
-
- unsigned stride_from /* In t_vmem_elem */)
+ const isp_ID_t ID,
+ const t_vmem_elem *from,
+ t_vmem_elem *to,
+ unsigned int height,
+ unsigned int width,
+ unsigned int stride_to, /* In t_vmem_elem */
+
+ unsigned stride_from /* In t_vmem_elem */)
{
unsigned int h;
load_vector(ID, &to[stride_to * h + c], vp);
vp = (t_vmem_elem *)((char *)vp + ISP_VEC_ALIGN);
}
- from = (const t_vmem_elem *)((const char *)from + stride_from / ISP_NWAY * ISP_VEC_ALIGN);
+ from = (const t_vmem_elem *)((const char *)from + stride_from / ISP_NWAY *
+ ISP_VEC_ALIGN);
}
}
void isp_vmem_2d_store(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from,
- unsigned int height,
- unsigned int width,
- unsigned int stride_to, /* In t_vmem_elem */
-
- unsigned stride_from /* In t_vmem_elem */)
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from,
+ unsigned int height,
+ unsigned int width,
+ unsigned int stride_to, /* In t_vmem_elem */
+
+ unsigned stride_from /* In t_vmem_elem */)
{
unsigned int h;
#define VMEM_ARRAY(x, s) t_vmem_elem x[s / ISP_NWAY][ISP_NWAY]
void isp_vmem_load(
- const isp_ID_t ID,
- const t_vmem_elem *from,
- t_vmem_elem *to,
- unsigned int elems); /* In t_vmem_elem */
+ const isp_ID_t ID,
+ const t_vmem_elem *from,
+ t_vmem_elem *to,
+ unsigned int elems); /* In t_vmem_elem */
void isp_vmem_store(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from,
- unsigned int elems); /* In t_vmem_elem */
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from,
+ unsigned int elems); /* In t_vmem_elem */
void isp_vmem_2d_load(
- const isp_ID_t ID,
- const t_vmem_elem *from,
- t_vmem_elem *to,
- unsigned int height,
- unsigned int width,
- unsigned int stride_to, /* In t_vmem_elem */
+ const isp_ID_t ID,
+ const t_vmem_elem *from,
+ t_vmem_elem *to,
+ unsigned int height,
+ unsigned int width,
+ unsigned int stride_to, /* In t_vmem_elem */
- unsigned stride_from /* In t_vmem_elem */);
+ unsigned stride_from /* In t_vmem_elem */);
void isp_vmem_2d_store(
- const isp_ID_t ID,
- t_vmem_elem *to,
- const t_vmem_elem *from,
- unsigned int height,
- unsigned int width,
- unsigned int stride_to, /* In t_vmem_elem */
-
- unsigned stride_from /* In t_vmem_elem */);
+ const isp_ID_t ID,
+ t_vmem_elem *to,
+ const t_vmem_elem *from,
+ unsigned int height,
+ unsigned int width,
+ unsigned int stride_to, /* In t_vmem_elem */
+
+ unsigned stride_from /* In t_vmem_elem */);
#endif /* __VMEM_LOCAL_H_INCLUDED__ */
struct csi_cfg_s {
u32 csi_port;
- buffering_mode_t buffering_mode;
+ buffering_mode_t buffering_mode;
ib_buffer_t csi_buffer;
ib_buffer_t acquisition_buffer;
u32 nof_xmem_buffers;
#define VMEM_ALIGN ISP_VMEM_ALIGN
#ifndef PIPE_GENERATION
-typedef tvector * pvector;
+typedef tvector *pvector;
#endif
#endif /* __VMEM_GLOBAL_H_INCLUDED__ */
\return none,
*/
void device_set_base_address(
- const sys_address base_addr);
+ const sys_address base_addr);
/*! Get the (sub)system base address
\return device[addr]
*/
uint8_t ia_css_device_load_uint8(
- const hrt_address addr);
+ const hrt_address addr);
/*! Read a 16-bit value from a device register or memory in the device
\return device[addr]
*/
uint16_t ia_css_device_load_uint16(
- const hrt_address addr);
+ const hrt_address addr);
/*! Read a 32-bit value from a device register or memory in the device
\return device[addr]
*/
uint32_t ia_css_device_load_uint32(
- const hrt_address addr);
+ const hrt_address addr);
/*! Read a 64-bit value from a device register or memory in the device
\return device[addr]
*/
uint64_t ia_css_device_load_uint64(
- const hrt_address addr);
+ const hrt_address addr);
/*! Write an 8-bit value to a device register or memory in the device
\return none, device[addr] = value
*/
void ia_css_device_store_uint8(
- const hrt_address addr,
- const uint8_t data);
+ const hrt_address addr,
+ const uint8_t data);
/*! Write a 16-bit value to a device register or memory in the device
\return none, device[addr] = value
*/
void ia_css_device_store_uint16(
- const hrt_address addr,
- const uint16_t data);
+ const hrt_address addr,
+ const uint16_t data);
/*! Write a 32-bit value to a device register or memory in the device
\return none, device[addr] = value
*/
void ia_css_device_store_uint32(
- const hrt_address addr,
- const uint32_t data);
+ const hrt_address addr,
+ const uint32_t data);
/*! Write a 64-bit value to a device register or memory in the device
\return none, device[addr] = value
*/
void ia_css_device_store_uint64(
- const hrt_address addr,
- const uint64_t data);
+ const hrt_address addr,
+ const uint64_t data);
/*! Read an array of bytes from device registers or memory in the device
\return none
*/
void ia_css_device_load(
- const hrt_address addr,
- void *data,
- const size_t size);
+ const hrt_address addr,
+ void *data,
+ const size_t size);
/*! Write an array of bytes to device registers or memory in the device
\return none
*/
void ia_css_device_store(
- const hrt_address addr,
- const void *data,
- const size_t size);
+ const hrt_address addr,
+ const void *data,
+ const size_t size);
#endif /* __DEVICE_ACCESS_H_INCLUDED__ */
* @param[out] state Point to the register-state.
*/
void csi_rx_fe_ctrl_get_state(
- const csi_rx_frontend_ID_t ID,
- csi_rx_fe_ctrl_state_t *state);
+ const csi_rx_frontend_ID_t ID,
+ csi_rx_fe_ctrl_state_t *state);
/**
* @brief Dump the csi rx frontend state.
* Dump the state of the csi rx frontend regiester-set.
* @param[in] state Point to the register-state.
*/
void csi_rx_fe_ctrl_dump_state(
- const csi_rx_frontend_ID_t ID,
- csi_rx_fe_ctrl_state_t *state);
+ const csi_rx_frontend_ID_t ID,
+ csi_rx_fe_ctrl_state_t *state);
/**
* @brief Get the state of the csi rx fe dlane.
* Get the state of the register set per dlane process.
* @param[out] state Point to the dlane state.
*/
void csi_rx_fe_ctrl_get_dlane_state(
- const csi_rx_frontend_ID_t ID,
- const u32 lane,
- csi_rx_fe_ctrl_lane_t *dlane_state);
+ const csi_rx_frontend_ID_t ID,
+ const u32 lane,
+ csi_rx_fe_ctrl_lane_t *dlane_state);
/**
* @brief Get the csi rx backend state.
* Get the state of the csi rx backend regiester-set.
* @param[out] state Point to the register-state.
*/
void csi_rx_be_ctrl_get_state(
- const csi_rx_backend_ID_t ID,
- csi_rx_be_ctrl_state_t *state);
+ const csi_rx_backend_ID_t ID,
+ csi_rx_be_ctrl_state_t *state);
/**
* @brief Dump the csi rx backend state.
* Dump the state of the csi rx backend regiester-set.
* @param[in] state Point to the register-state.
*/
void csi_rx_be_ctrl_dump_state(
- const csi_rx_backend_ID_t ID,
- csi_rx_be_ctrl_state_t *state);
+ const csi_rx_backend_ID_t ID,
+ csi_rx_be_ctrl_state_t *state);
/* end of NCI */
/*****************************************************
* @return the value of the register.
*/
hrt_data csi_rx_fe_ctrl_reg_load(
- const csi_rx_frontend_ID_t ID,
- const hrt_address reg);
+ const csi_rx_frontend_ID_t ID,
+ const hrt_address reg);
/**
* @brief Store a value to the register.
* Store a value to the registe of the csi rx fe.
*
*/
void csi_rx_fe_ctrl_reg_store(
- const csi_rx_frontend_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const csi_rx_frontend_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/**
* @brief Load the register value.
* Load the value of the register of the csirx be.
* @return the value of the register.
*/
hrt_data csi_rx_be_ctrl_reg_load(
- const csi_rx_backend_ID_t ID,
- const hrt_address reg);
+ const csi_rx_backend_ID_t ID,
+ const hrt_address reg);
/**
* @brief Store a value to the register.
* Store a value to the registe of the csi rx be.
*
*/
void csi_rx_be_ctrl_reg_store(
- const csi_rx_backend_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const csi_rx_backend_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/* end of DLI */
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
#endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */
\return none
*/
void debug_buffer_init(
- const hrt_address addr);
+ const hrt_address addr);
/*! Set the offset/address of the (remote) debug buffer
\return none
*/
void debug_buffer_ddr_init(
- const hrt_vaddress addr);
+ const hrt_vaddress addr);
/*! Set the (remote) operating mode of the debug buffer
\return none
*/
void debug_buffer_setmode(
- const debug_buf_mode_t mode);
+ const debug_buf_mode_t mode);
#endif /* __DEBUG_PUBLIC_H_INCLUDED__ */
\return none, state = DMA[ID].state
*/
void dma_get_state(
- const dma_ID_t ID,
- dma_state_t *state);
+ const dma_ID_t ID,
+ dma_state_t *state);
/*! Write to a control register of DMA[ID]
\return none, DMA[ID].ctrl[reg] = value
*/
STORAGE_CLASS_DMA_H void dma_reg_store(
- const dma_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+ const dma_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value);
/*! Read from a control register of DMA[ID]
\return DMA[ID].ctrl[reg]
*/
STORAGE_CLASS_DMA_H hrt_data dma_reg_load(
- const dma_ID_t ID,
- const unsigned int reg);
+ const dma_ID_t ID,
+ const unsigned int reg);
/*! Set maximum burst size of DMA[ID]
*/
void
dma_set_max_burst_size(
- dma_ID_t ID,
- dma_connection conn,
- uint32_t max_burst_size);
+ dma_ID_t ID,
+ dma_connection conn,
+ uint32_t max_burst_size);
#endif /* __DMA_PUBLIC_H_INCLUDED__ */
\return none, dequeue(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H void event_wait_for(
- const event_ID_t ID);
+ const event_ID_t ID);
/*! Conditional blocking wait for an event source EVENT[ID]
\return none, if(cnd) dequeue(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H void cnd_event_wait_for(
- const event_ID_t ID,
- const bool cnd);
+ const event_ID_t ID,
+ const bool cnd);
/*! Blocking read from an event source EVENT[ID]
\return dequeue(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H hrt_data event_receive_token(
- const event_ID_t ID);
+ const event_ID_t ID);
/*! Blocking write to an event sink EVENT[ID]
\return none, enqueue(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H void event_send_token(
- const event_ID_t ID,
- const hrt_data token);
+ const event_ID_t ID,
+ const hrt_data token);
/*! Query an event source EVENT[ID]
\return !isempty(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H bool is_event_pending(
- const event_ID_t ID);
+ const event_ID_t ID);
/*! Query an event sink EVENT[ID]
\return !isfull(event_queue[ID])
*/
STORAGE_CLASS_EVENT_H bool can_event_send_token(
- const event_ID_t ID);
+ const event_ID_t ID);
#endif /* __EVENT_FIFO_PUBLIC_H */
\return none, fifo_switch[switch_id].sel = sel
*/
STORAGE_CLASS_FIFO_MONITOR_H void fifo_switch_set(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id,
- const hrt_data sel);
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id,
+ const hrt_data sel);
/*! Get a fifo switch multiplex
\return fifo_switch[switch_id].sel
*/
STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_switch_get(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id);
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id);
/*! Read the state of FIFO_MONITOR[ID]
\return none, state = FIFO_MONITOR[ID].state
*/
void fifo_monitor_get_state(
- const fifo_monitor_ID_t ID,
- fifo_monitor_state_t *state);
+ const fifo_monitor_ID_t ID,
+ fifo_monitor_state_t *state);
/*! Read the state of a fifo channel
\return none, state = fifo_channel[channel_id].state
*/
void fifo_channel_get_state(
- const fifo_monitor_ID_t ID,
- const fifo_channel_t channel_id,
- fifo_channel_state_t *state);
+ const fifo_monitor_ID_t ID,
+ const fifo_channel_t channel_id,
+ fifo_channel_state_t *state);
/*! Read the state of a fifo switch
\return none, state = fifo_switch[switch_id].state
*/
void fifo_switch_get_state(
- const fifo_monitor_ID_t ID,
- const fifo_switch_t switch_id,
- fifo_switch_state_t *state);
+ const fifo_monitor_ID_t ID,
+ const fifo_switch_t switch_id,
+ fifo_switch_state_t *state);
/*! Write to a control register of FIFO_MONITOR[ID]
\return none, FIFO_MONITOR[ID].ctrl[reg] = value
*/
STORAGE_CLASS_FIFO_MONITOR_H void fifo_monitor_reg_store(
- const fifo_monitor_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value);
/*! Read from a control register of FIFO_MONITOR[ID]
\return FIFO_MONITOR[ID].ctrl[reg]
*/
STORAGE_CLASS_FIFO_MONITOR_H hrt_data fifo_monitor_reg_load(
- const fifo_monitor_ID_t ID,
- const unsigned int reg);
+ const fifo_monitor_ID_t ID,
+ const unsigned int reg);
#endif /* __FIFO_MONITOR_PUBLIC_H_INCLUDED__ */
\return none, GDC[ID].lut[0...3][0...HRT_GDC_N-1] = data
*/
void gdc_lut_store(
- const gdc_ID_t ID,
- const int data[4][HRT_GDC_N]);
+ const gdc_ID_t ID,
+ const int data[4][HRT_GDC_N]);
/*! Convert the bicubic interpolation table of GDC[ID] to the ISP-specific format
\param out_lut[out] The data matrix as the output of conversion
*/
void gdc_lut_convert_to_isp_format(
- const int in_lut[4][HRT_GDC_N],
- int out_lut[4][HRT_GDC_N]);
+ const int in_lut[4][HRT_GDC_N],
+ int out_lut[4][HRT_GDC_N]);
/*! Return the integer representation of 1.0 of GDC[ID]
\return unity
*/
int gdc_get_unity(
- const gdc_ID_t ID);
+ const gdc_ID_t ID);
#endif /* __GDC_PUBLIC_H_INCLUDED__ */
\return none, state = GP_DEVICE[ID].state
*/
void gp_device_get_state(
- const gp_device_ID_t ID,
- gp_device_state_t *state);
+ const gp_device_ID_t ID,
+ gp_device_state_t *state);
/*! Write to a control register of GP_DEVICE[ID]
\return none, GP_DEVICE[ID].ctrl[reg] = value
*/
STORAGE_CLASS_GP_DEVICE_H void gp_device_reg_store(
- const gp_device_ID_t ID,
- const unsigned int reg_addr,
- const hrt_data value);
+ const gp_device_ID_t ID,
+ const unsigned int reg_addr,
+ const hrt_data value);
/*! Read from a control register of GP_DEVICE[ID]
\return GP_DEVICE[ID].ctrl[reg]
*/
STORAGE_CLASS_GP_DEVICE_H hrt_data gp_device_reg_load(
- const gp_device_ID_t ID,
- const hrt_address reg_addr);
+ const gp_device_ID_t ID,
+ const hrt_address reg_addr);
#endif /* __GP_DEVICE_PUBLIC_H_INCLUDED__ */
\return none, GPIO[ID].ctrl[reg] = value
*/
STORAGE_CLASS_GPIO_H void gpio_reg_store(
- const gpio_ID_t ID,
- const unsigned int reg_addr,
- const hrt_data value);
+ const gpio_ID_t ID,
+ const unsigned int reg_addr,
+ const hrt_data value);
/*! Read from a control register of GPIO[ID]
\return GPIO[ID].ctrl[reg]
*/
STORAGE_CLASS_GPIO_H hrt_data gpio_reg_load(
- const gpio_ID_t ID,
- const unsigned int reg_addr);
+ const gpio_ID_t ID,
+ const unsigned int reg_addr);
#endif /* __GPIO_PUBLIC_H_INCLUDED__ */
\return sizeof(HMEM[ID])
*/
STORAGE_CLASS_HMEM_H size_t sizeof_hmem(
- const hmem_ID_t ID);
+ const hmem_ID_t ID);
#endif /* __HMEM_PUBLIC_H_INCLUDED__ */
* @param[out] state Point to the register-state.
*/
STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_state(
- const ibuf_ctrl_ID_t ID,
- ibuf_ctrl_state_t *state);
+ const ibuf_ctrl_ID_t ID,
+ ibuf_ctrl_state_t *state);
/**
* @brief Get the state of the ibuf-controller process.
* @param[out] state Point to the process state.
*/
STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state(
- const ibuf_ctrl_ID_t ID,
- const u32 proc_id,
- ibuf_ctrl_proc_state_t *state);
+ const ibuf_ctrl_ID_t ID,
+ const u32 proc_id,
+ ibuf_ctrl_proc_state_t *state);
/**
* @brief Dump the ibuf-controller state.
* Dump the state of the ibuf-controller regiester-set.
* @param[in] state Pointer to the register-state.
*/
STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state(
- const ibuf_ctrl_ID_t ID,
- ibuf_ctrl_state_t *state);
+ const ibuf_ctrl_ID_t ID,
+ ibuf_ctrl_state_t *state);
/* end of NCI */
/*****************************************************
* @return the value of the register.
*/
STORAGE_CLASS_IBUF_CTRL_H hrt_data ibuf_ctrl_reg_load(
- const ibuf_ctrl_ID_t ID,
- const hrt_address reg);
+ const ibuf_ctrl_ID_t ID,
+ const hrt_address reg);
/**
* @brief Store a value to the register.
*
*/
STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_reg_store(
- const ibuf_ctrl_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const ibuf_ctrl_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/* end of DLI */
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
\return none, reset(INPUT_FORMATTER[ID])
*/
void input_formatter_rst(
- const input_formatter_ID_t ID);
+ const input_formatter_ID_t ID);
/*! Set the blocking mode of INPUT_FORMATTER[ID]
\return none, INPUT_FORMATTER[ID].blocking_mode = enable
*/
void input_formatter_set_fifo_blocking_mode(
- const input_formatter_ID_t ID,
- const bool enable);
+ const input_formatter_ID_t ID,
+ const bool enable);
/*! Return the data alignment of INPUT_FORMATTER[ID]
\return alignment(INPUT_FORMATTER[ID].data)
*/
unsigned int input_formatter_get_alignment(
- const input_formatter_ID_t ID);
+ const input_formatter_ID_t ID);
/*! Read the source switch state into INPUT_FORMATTER[ID]
\return none, state = INPUT_FORMATTER[ID].switch_state
*/
void input_formatter_get_switch_state(
- const input_formatter_ID_t ID,
- input_formatter_switch_state_t *state);
+ const input_formatter_ID_t ID,
+ input_formatter_switch_state_t *state);
/*! Read the control registers of INPUT_FORMATTER[ID]
\return none, state = INPUT_FORMATTER[ID].state
*/
void input_formatter_get_state(
- const input_formatter_ID_t ID,
- input_formatter_state_t *state);
+ const input_formatter_ID_t ID,
+ input_formatter_state_t *state);
/*! Read the control registers of bin copy INPUT_FORMATTER[ID]
\return none, state = INPUT_FORMATTER[ID].state
*/
void input_formatter_bin_get_state(
- const input_formatter_ID_t ID,
- input_formatter_bin_state_t *state);
+ const input_formatter_ID_t ID,
+ input_formatter_bin_state_t *state);
/*! Write to a control register of INPUT_FORMATTER[ID]
\return none, INPUT_FORMATTER[ID].ctrl[reg] = value
*/
STORAGE_CLASS_INPUT_FORMATTER_H void input_formatter_reg_store(
- const input_formatter_ID_t ID,
- const hrt_address reg_addr,
- const hrt_data value);
+ const input_formatter_ID_t ID,
+ const hrt_address reg_addr,
+ const hrt_data value);
/*! Read from a control register of INPUT_FORMATTER[ID]
\return INPUT_FORMATTER[ID].ctrl[reg]
*/
STORAGE_CLASS_INPUT_FORMATTER_H hrt_data input_formatter_reg_load(
- const input_formatter_ID_t ID,
- const unsigned int reg_addr);
+ const input_formatter_ID_t ID,
+ const unsigned int reg_addr);
#endif /* __INPUT_FORMATTER_PUBLIC_H_INCLUDED__ */
\return none, state = INPUT_SYSTEM[ID].state
*/
void input_system_get_state(
- const input_system_ID_t ID,
- input_system_state_t *state);
+ const input_system_ID_t ID,
+ input_system_state_t *state);
/*! Read the state of RECEIVER[ID]
\return none, state = RECEIVER[ID].state
*/
void receiver_get_state(
- const rx_ID_t ID,
- receiver_state_t *state);
+ const rx_ID_t ID,
+ receiver_state_t *state);
/*! Flag whether a MIPI format is YUV420
\return mipi_format == YUV420
*/
bool is_mipi_format_yuv420(
- const mipi_format_t mipi_format);
+ const mipi_format_t mipi_format);
/*! Set compression parameters for cfg[cfg_ID] of RECEIVER[ID]
\return none, RECEIVER[ID].cfg[cfg_ID] = {comp, pred}
*/
void receiver_set_compression(
- const rx_ID_t ID,
- const unsigned int cfg_ID,
- const mipi_compressor_t comp,
- const mipi_predictor_t pred);
+ const rx_ID_t ID,
+ const unsigned int cfg_ID,
+ const mipi_compressor_t comp,
+ const mipi_predictor_t pred);
/*! Enable PORT[port_ID] of RECEIVER[ID]
\return None, enable(RECEIVER[ID].PORT[port_ID])
*/
void receiver_port_enable(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const bool cnd);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const bool cnd);
/*! Flag if PORT[port_ID] of RECEIVER[ID] is enabled
\return enable(RECEIVER[ID].PORT[port_ID]) == true
*/
bool is_receiver_port_enabled(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID);
/*! Enable the IRQ channels of PORT[port_ID] of RECEIVER[ID]
\return None, enable(RECEIVER[ID].PORT[port_ID].irq_info)
*/
void receiver_irq_enable(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const rx_irq_info_t irq_info);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const rx_irq_info_t irq_info);
/*! Return the IRQ status of PORT[port_ID] of RECEIVER[ID]
\return RECEIVER[ID].PORT[port_ID].irq_info
*/
rx_irq_info_t receiver_get_irq_info(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID);
/*! Clear the IRQ status of PORT[port_ID] of RECEIVER[ID]
\return None, clear(RECEIVER[ID].PORT[port_ID].irq_info)
*/
void receiver_irq_clear(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const rx_irq_info_t irq_info);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const rx_irq_info_t irq_info);
/*! Write to a control register of INPUT_SYSTEM[ID]
\return none, INPUT_SYSTEM[ID].ctrl[reg] = value
*/
STORAGE_CLASS_INPUT_SYSTEM_H void input_system_reg_store(
- const input_system_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const input_system_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/*! Read from a control register of INPUT_SYSTEM[ID]
\return INPUT_SYSTEM[ID].ctrl[reg]
*/
STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_reg_load(
- const input_system_ID_t ID,
- const hrt_address reg);
+ const input_system_ID_t ID,
+ const hrt_address reg);
/*! Write to a control register of RECEIVER[ID]
\return none, RECEIVER[ID].ctrl[reg] = value
*/
STORAGE_CLASS_INPUT_SYSTEM_H void receiver_reg_store(
- const rx_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const rx_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/*! Read from a control register of RECEIVER[ID]
\return RECEIVER[ID].ctrl[reg]
*/
STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_reg_load(
- const rx_ID_t ID,
- const hrt_address reg);
+ const rx_ID_t ID,
+ const hrt_address reg);
/*! Write to a control register of PORT[port_ID] of RECEIVER[ID]
\return none, RECEIVER[ID].PORT[port_ID].ctrl[reg] = value
*/
STORAGE_CLASS_INPUT_SYSTEM_H void receiver_port_reg_store(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const hrt_address reg,
- const hrt_data value);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const hrt_address reg,
+ const hrt_data value);
/*! Read from a control register PORT[port_ID] of of RECEIVER[ID]
\return RECEIVER[ID].PORT[port_ID].ctrl[reg]
*/
STORAGE_CLASS_INPUT_SYSTEM_H hrt_data receiver_port_reg_load(
- const rx_ID_t ID,
- const enum mipi_port_id port_ID,
- const hrt_address reg);
+ const rx_ID_t ID,
+ const enum mipi_port_id port_ID,
+ const hrt_address reg);
/*! Write to a control register of SUB_SYSTEM[sub_ID] of INPUT_SYSTEM[ID]
\return none, INPUT_SYSTEM[ID].SUB_SYSTEM[sub_ID].ctrl[reg] = value
*/
STORAGE_CLASS_INPUT_SYSTEM_H void input_system_sub_system_reg_store(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_ID,
- const hrt_address reg,
- const hrt_data value);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_ID,
+ const hrt_address reg,
+ const hrt_data value);
/*! Read from a control register SUB_SYSTEM[sub_ID] of INPUT_SYSTEM[ID]
\return INPUT_SYSTEM[ID].SUB_SYSTEM[sub_ID].ctrl[reg]
*/
STORAGE_CLASS_INPUT_SYSTEM_H hrt_data input_system_sub_system_reg_load(
- const input_system_ID_t ID,
- const sub_system_ID_t sub_ID,
- const hrt_address reg);
+ const input_system_ID_t ID,
+ const sub_system_ID_t sub_ID,
+ const hrt_address reg);
///////////////////////////////////////////////////////////////////////////
//
// FIFO channel config function user
input_system_error_t input_system_csi_fifo_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- target_cfg2400_t target
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ target_cfg2400_t target
);
input_system_error_t input_system_csi_fifo_channel_with_counting_cfg(
- u32 ch_id,
- u32 nof_frame,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 mem_region_size,
- u32 nof_mem_regions,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frame,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 mem_region_size,
+ u32 nof_mem_regions,
+ target_cfg2400_t target
);
// SRAM channel config function user
input_system_error_t input_system_csi_sram_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 csi_mem_region_size,
- u32 csi_nof_mem_regions,
- target_cfg2400_t target
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 csi_mem_region_size,
+ u32 csi_nof_mem_regions,
+ target_cfg2400_t target
);
//XMEM channel config function user
input_system_error_t input_system_csi_xmem_channel_cfg(
- u32 ch_id,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 mem_region_size,
- u32 nof_mem_regions,
- u32 acq_mem_region_size,
- u32 acq_nof_mem_regions,
- target_cfg2400_t target,
- uint32_t nof_xmem_buffers
+ u32 ch_id,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 mem_region_size,
+ u32 nof_mem_regions,
+ u32 acq_mem_region_size,
+ u32 acq_nof_mem_regions,
+ target_cfg2400_t target,
+ uint32_t nof_xmem_buffers
);
input_system_error_t input_system_csi_xmem_capture_only_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- input_system_csi_port_t port,
- u32 csi_mem_region_size,
- u32 csi_nof_mem_regions,
- u32 acq_mem_region_size,
- u32 acq_nof_mem_regions,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,
+ input_system_csi_port_t port,
+ u32 csi_mem_region_size,
+ u32 csi_nof_mem_regions,
+ u32 acq_mem_region_size,
+ u32 acq_nof_mem_regions,
+ target_cfg2400_t target
);
input_system_error_t input_system_csi_xmem_acquire_only_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- input_system_csi_port_t port,
- backend_channel_cfg_t backend_ch,
- u32 acq_mem_region_size,
- u32 acq_nof_mem_regions,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,
+ input_system_csi_port_t port,
+ backend_channel_cfg_t backend_ch,
+ u32 acq_mem_region_size,
+ u32 acq_nof_mem_regions,
+ target_cfg2400_t target
);
// Non - CSI channel config function user
input_system_error_t input_system_prbs_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- u32 seed,
- u32 sync_gen_width,
- u32 sync_gen_height,
- u32 sync_gen_hblank_cycles,
- u32 sync_gen_vblank_cycles,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,
+ u32 seed,
+ u32 sync_gen_width,
+ u32 sync_gen_height,
+ u32 sync_gen_hblank_cycles,
+ u32 sync_gen_vblank_cycles,
+ target_cfg2400_t target
);
input_system_error_t input_system_tpg_channel_cfg(
- u32 ch_id,
- u32 nof_frames,//not used yet
- u32 x_mask,
- u32 y_mask,
- u32 x_delta,
- u32 y_delta,
- u32 xy_mask,
- u32 sync_gen_width,
- u32 sync_gen_height,
- u32 sync_gen_hblank_cycles,
- u32 sync_gen_vblank_cycles,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,//not used yet
+ u32 x_mask,
+ u32 y_mask,
+ u32 x_delta,
+ u32 y_delta,
+ u32 xy_mask,
+ u32 sync_gen_width,
+ u32 sync_gen_height,
+ u32 sync_gen_hblank_cycles,
+ u32 sync_gen_vblank_cycles,
+ target_cfg2400_t target
);
input_system_error_t input_system_gpfifo_channel_cfg(
- u32 ch_id,
- u32 nof_frames,
- target_cfg2400_t target
+ u32 ch_id,
+ u32 nof_frames,
+ target_cfg2400_t target
);
#endif /* #ifdef USE_INPUT_SYSTEM_VERSION_2401 */
\return none, state = IRQ[ID].state
*/
void irq_controller_get_state(
- const irq_ID_t ID,
- irq_controller_state_t *state);
+ const irq_ID_t ID,
+ irq_controller_state_t *state);
/*! Write to a control register of IRQ[ID]
\return none, IRQ[ID].ctrl[reg] = value
*/
STORAGE_CLASS_IRQ_H void irq_reg_store(
- const irq_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+ const irq_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value);
/*! Read from a control register of IRQ[ID]
\return IRQ[ID].ctrl[reg]
*/
STORAGE_CLASS_IRQ_H hrt_data irq_reg_load(
- const irq_ID_t ID,
- const unsigned int reg);
+ const irq_ID_t ID,
+ const unsigned int reg);
/*! Enable an IRQ channel of IRQ[ID] with a mode
\return none, enable(IRQ[ID].channel[irq_ID])
*/
void irq_enable_channel(
- const irq_ID_t ID,
- const unsigned int irq_ID);
+ const irq_ID_t ID,
+ const unsigned int irq_ID);
/*! Enable pulse interrupts for IRQ[ID] with a mode
\return none
*/
void irq_enable_pulse(
- const irq_ID_t ID,
- bool pulse);
+ const irq_ID_t ID,
+ bool pulse);
/*! Disable an IRQ channel of IRQ[ID]
\return none, disable(IRQ[ID].channel[irq_ID])
*/
void irq_disable_channel(
- const irq_ID_t ID,
- const unsigned int irq);
+ const irq_ID_t ID,
+ const unsigned int irq);
/*! Clear the state of all IRQ channels of IRQ[ID]
\return none, clear(IRQ[ID].channel[])
*/
void irq_clear_all(
- const irq_ID_t ID);
+ const irq_ID_t ID);
/*! Return the ID of a signalling IRQ channel of IRQ[ID]
\return state(IRQ[ID])
*/
enum hrt_isp_css_irq_status irq_get_channel_id(
- const irq_ID_t ID,
- unsigned int *irq_id);
+ const irq_ID_t ID,
+ unsigned int *irq_id);
/*! Raise an interrupt on channel irq_id of device IRQ[ID]
\return none, signal(IRQ[ID].channel[irq_id])
*/
void irq_raise(
- const irq_ID_t ID,
- const irq_sw_channel_id_t irq_id);
+ const irq_ID_t ID,
+ const irq_sw_channel_id_t irq_id);
/*! Test if any IRQ channel of the virtual super IRQ has raised a signal
\return none, VIRQ.channel[irq_ID].enable = en
*/
void cnd_virq_enable_channel(
- const virq_id_t irq_ID,
- const bool en);
+ const virq_id_t irq_ID,
+ const bool en);
/*! Clear the state of all IRQ channels of the virtual super IRQ
\return none
*/
void virq_clear_info(
- virq_info_t *irq_info);
+ virq_info_t *irq_info);
/*! Return the ID of a signalling IRQ channel of the virtual super IRQ
\return state(IRQ[...])
*/
enum hrt_isp_css_irq_status virq_get_channel_id(
- virq_id_t *irq_id);
+ virq_id_t *irq_id);
/*! Return the IDs of all signaling IRQ channels of the virtual super IRQ
\return (error(state(IRQ[...]))
*/
enum hrt_isp_css_irq_status virq_get_channel_signals(
- virq_info_t *irq_info);
+ virq_info_t *irq_info);
#endif /* __IRQ_PUBLIC_H_INCLUDED__ */
\return none, if(cnd) enable(ISP[ID].irq) else disable(ISP[ID].irq)
*/
void cnd_isp_irq_enable(
- const isp_ID_t ID,
- const bool cnd);
+ const isp_ID_t ID,
+ const bool cnd);
/*! Read the state of cell ISP[ID]
\return none, state = ISP[ID].state, stall = ISP[ID].stall
*/
void isp_get_state(
- const isp_ID_t ID,
- isp_state_t *state,
- isp_stall_t *stall);
+ const isp_ID_t ID,
+ isp_state_t *state,
+ isp_stall_t *stall);
/*! Write to the status and control register of ISP[ID]
\return none, ISP[ID].sc[reg] = value
*/
STORAGE_CLASS_ISP_H void isp_ctrl_store(
- const isp_ID_t ID,
- const unsigned int reg,
- const hrt_data value);
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value);
/*! Read from the status and control register of ISP[ID]
\return ISP[ID].sc[reg]
*/
STORAGE_CLASS_ISP_H hrt_data isp_ctrl_load(
- const isp_ID_t ID,
- const unsigned int reg);
+ const isp_ID_t ID,
+ const unsigned int reg);
/*! Get the status of a bitfield in the control register of ISP[ID]
\return (ISP[ID].sc[reg] & (1<<bit)) != 0
*/
STORAGE_CLASS_ISP_H bool isp_ctrl_getbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit);
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit);
/*! Set a bitfield in the control register of ISP[ID]
\return none, ISP[ID].sc[reg] |= (1<<bit)
*/
STORAGE_CLASS_ISP_H void isp_ctrl_setbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit);
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit);
/*! Clear a bitfield in the control register of ISP[ID]
\return none, ISP[ID].sc[reg] &= ~(1<<bit)
*/
STORAGE_CLASS_ISP_H void isp_ctrl_clearbit(
- const isp_ID_t ID,
- const unsigned int reg,
- const unsigned int bit);
+ const isp_ID_t ID,
+ const unsigned int reg,
+ const unsigned int bit);
/*! Write to the DMEM of ISP[ID]
\return none, ISP[ID].dmem[addr...addr+size-1] = data
*/
STORAGE_CLASS_ISP_H void isp_dmem_store(
- const isp_ID_t ID,
- unsigned int addr,
- const void *data,
- const size_t size);
+ const isp_ID_t ID,
+ unsigned int addr,
+ const void *data,
+ const size_t size);
/*! Read from the DMEM of ISP[ID]
\return none, data = ISP[ID].dmem[addr...addr+size-1]
*/
STORAGE_CLASS_ISP_H void isp_dmem_load(
- const isp_ID_t ID,
- const unsigned int addr,
- void *data,
- const size_t size);
+ const isp_ID_t ID,
+ const unsigned int addr,
+ void *data,
+ const size_t size);
/*! Write a 32-bit datum to the DMEM of ISP[ID]
\return none, ISP[ID].dmem[addr] = data
*/
STORAGE_CLASS_ISP_H void isp_dmem_store_uint32(
- const isp_ID_t ID,
- unsigned int addr,
- const uint32_t data);
+ const isp_ID_t ID,
+ unsigned int addr,
+ const uint32_t data);
/*! Load a 32-bit datum from the DMEM of ISP[ID]
\return none, data = ISP[ID].dmem[addr]
*/
STORAGE_CLASS_ISP_H uint32_t isp_dmem_load_uint32(
- const isp_ID_t ID,
- const unsigned int addr);
+ const isp_ID_t ID,
+ const unsigned int addr);
/*! Concatenate the LSW and MSW into a double precision word
\return x0 | (x1 << bits_per_vector_element)
*/
STORAGE_CLASS_ISP_H uint32_t isp_2w_cat_1w(
- const u16 x0,
- const uint16_t x1);
+ const u16 x0,
+ const uint16_t x1);
unsigned int isp_is_ready(isp_ID_t ID);
#include "type_support.h"
STORAGE_CLASS_ISYS2401_DMA_H void isys2401_dma_reg_store(
- const isys2401_dma_ID_t dma_id,
- const unsigned int reg,
- const hrt_data value);
+ const isys2401_dma_ID_t dma_id,
+ const unsigned int reg,
+ const hrt_data value);
STORAGE_CLASS_ISYS2401_DMA_H hrt_data isys2401_dma_reg_load(
- const isys2401_dma_ID_t dma_id,
- const unsigned int reg);
+ const isys2401_dma_ID_t dma_id,
+ const unsigned int reg);
void isys2401_dma_set_max_burst_size(
- const isys2401_dma_ID_t dma_id,
- uint32_t max_burst_size);
+ const isys2401_dma_ID_t dma_id,
+ uint32_t max_burst_size);
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_state_get(
- const isys_irq_ID_t isys_irqc_id,
- isys_irqc_state_t *state);
+ const isys_irq_ID_t isys_irqc_id,
+ isys_irqc_state_t *state);
STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_state_dump(
- const isys_irq_ID_t isys_irqc_id,
- const isys_irqc_state_t *state);
+ const isys_irq_ID_t isys_irqc_id,
+ const isys_irqc_state_t *state);
STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_reg_store(
- const isys_irq_ID_t isys_irqc_id,
- const unsigned int reg_idx,
- const hrt_data value);
+ const isys_irq_ID_t isys_irqc_id,
+ const unsigned int reg_idx,
+ const hrt_data value);
STORAGE_CLASS_ISYS2401_IRQ_H hrt_data isys_irqc_reg_load(
- const isys_irq_ID_t isys_irqc_id,
- const unsigned int reg_idx);
+ const isys_irq_ID_t isys_irqc_id,
+ const unsigned int reg_idx);
STORAGE_CLASS_ISYS2401_IRQ_H void isys_irqc_status_enable(
- const isys_irq_ID_t isys_irqc_id);
+ const isys_irq_ID_t isys_irqc_id);
#endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */
\return none, state = INPUT_SYSTEM[ID].state
*/
STORAGE_CLASS_INPUT_SYSTEM_H input_system_err_t input_system_get_state(
- const input_system_ID_t ID,
- input_system_state_t *state);
+ const input_system_ID_t ID,
+ input_system_state_t *state);
/*! Dump the state of INPUT_SYSTEM[ID]
\param ID[in] INPUT_SYSTEM identifier
\param state[in] pointer to input system state structure
\depends on host supplied print function as part of ia_css_init()
*/
STORAGE_CLASS_INPUT_SYSTEM_H void input_system_dump_state(
- const input_system_ID_t ID,
- input_system_state_t *state);
+ const input_system_ID_t ID,
+ input_system_state_t *state);
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
#endif /* __ISYS_PUBLIC_H_INCLUDED__ */
* @param[out] state Point to the register-state.
*/
STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_state(
- const stream2mmio_ID_t ID,
- stream2mmio_state_t *state);
+ const stream2mmio_ID_t ID,
+ stream2mmio_state_t *state);
/**
* @brief Get the state of the stream2mmio-controller sidess.
* @param[out] state Point to the sid state.
*/
STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state(
- const stream2mmio_ID_t ID,
- const stream2mmio_sid_ID_t sid_id,
- stream2mmio_sid_state_t *state);
+ const stream2mmio_ID_t ID,
+ const stream2mmio_sid_ID_t sid_id,
+ stream2mmio_sid_state_t *state);
/* end of NCI */
/*****************************************************
* @return the value of the register.
*/
STORAGE_CLASS_STREAM2MMIO_H hrt_data stream2mmio_reg_load(
- const stream2mmio_ID_t ID,
- const stream2mmio_sid_ID_t sid_id,
- const uint32_t reg_idx);
+ const stream2mmio_ID_t ID,
+ const stream2mmio_sid_ID_t sid_id,
+ const uint32_t reg_idx);
/**
* @brief Dump the SID processor state.
* @param[in] state Pointer to the register-state.
*/
STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_print_sid_state(
- stream2mmio_sid_state_t *state);
+ stream2mmio_sid_state_t *state);
/**
* @brief Dump the stream2mmio state.
* Dump the state of the ibuf-controller regiester-set.
* @param[in] state Pointer to the register-state.
*/
STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_dump_state(
- const stream2mmio_ID_t ID,
- stream2mmio_state_t *state);
+ const stream2mmio_ID_t ID,
+ stream2mmio_state_t *state);
/**
* @brief Store a value to the register.
* Store a value to the registe of the stream2mmio-controller.
*
*/
STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_reg_store(
- const stream2mmio_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const stream2mmio_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/* end of DLI */
#endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */
\return none, MMU[ID].page_table_base_index = base_index
*/
void mmu_set_page_table_base_index(
- const mmu_ID_t ID,
- const hrt_data base_index);
+ const mmu_ID_t ID,
+ const hrt_data base_index);
/*! Get the page table base index of MMU[ID]
\return MMU[ID].page_table_base_index
*/
hrt_data mmu_get_page_table_base_index(
- const mmu_ID_t ID);
+ const mmu_ID_t ID);
/*! Invalidate the page table cache of MMU[ID]
\return none
*/
void mmu_invalidate_cache(
- const mmu_ID_t ID);
+ const mmu_ID_t ID);
/*! Invalidate the page table cache of all MMUs
\return none, MMU[ID].ctrl[reg] = value
*/
static inline void mmu_reg_store(
- const mmu_ID_t ID,
- const unsigned int reg,
- const hrt_data value)
+ const mmu_ID_t ID,
+ const unsigned int reg,
+ const hrt_data value)
{
assert(ID < N_MMU_ID);
assert(MMU_BASE[ID] != (hrt_address) - 1);
\return MMU[ID].ctrl[reg]
*/
static inline hrt_data mmu_reg_load(
- const mmu_ID_t ID,
- const unsigned int reg)
+ const mmu_ID_t ID,
+ const unsigned int reg)
{
assert(ID < N_MMU_ID);
assert(MMU_BASE[ID] != (hrt_address) - 1);
* @param[out] state Point to the register-state.
*/
STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state(
- const pixelgen_ID_t ID,
- pixelgen_ctrl_state_t *state);
+ const pixelgen_ID_t ID,
+ pixelgen_ctrl_state_t *state);
/**
* @brief Dump the pixelgen state.
* Dump the state of the pixelgen regiester-set.
* @param[in] state Point to the register-state.
*/
STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state(
- const pixelgen_ID_t ID,
- pixelgen_ctrl_state_t *state);
+ const pixelgen_ID_t ID,
+ pixelgen_ctrl_state_t *state);
/* end of NCI */
/*****************************************************
* @return the value of the register.
*/
STORAGE_CLASS_PIXELGEN_H hrt_data pixelgen_ctrl_reg_load(
- const pixelgen_ID_t ID,
- const hrt_address reg);
+ const pixelgen_ID_t ID,
+ const hrt_address reg);
/**
* @brief Store a value to the register.
* Store a value to the registe of the pixelgen
*
*/
STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_reg_store(
- const pixelgen_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const pixelgen_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/* end of DLI */
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
\return none, if(cnd) enable(SP[ID].irq) else disable(SP[ID].irq)
*/
void cnd_sp_irq_enable(
- const sp_ID_t ID,
- const bool cnd);
+ const sp_ID_t ID,
+ const bool cnd);
/*! Read the state of cell SP[ID]
\return none, state = SP[ID].state, stall = SP[ID].stall
*/
void sp_get_state(
- const sp_ID_t ID,
- sp_state_t *state,
- sp_stall_t *stall);
+ const sp_ID_t ID,
+ sp_state_t *state,
+ sp_stall_t *stall);
/*! Write to the status and control register of SP[ID]
\return none, SP[ID].sc[reg] = value
*/
STORAGE_CLASS_SP_H void sp_ctrl_store(
- const sp_ID_t ID,
- const hrt_address reg,
- const hrt_data value);
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const hrt_data value);
/*! Read from the status and control register of SP[ID]
\return SP[ID].sc[reg]
*/
STORAGE_CLASS_SP_H hrt_data sp_ctrl_load(
- const sp_ID_t ID,
- const hrt_address reg);
+ const sp_ID_t ID,
+ const hrt_address reg);
/*! Get the status of a bitfield in the control register of SP[ID]
\return (SP[ID].sc[reg] & (1<<bit)) != 0
*/
STORAGE_CLASS_SP_H bool sp_ctrl_getbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit);
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit);
/*! Set a bitfield in the control register of SP[ID]
\return none, SP[ID].sc[reg] |= (1<<bit)
*/
STORAGE_CLASS_SP_H void sp_ctrl_setbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit);
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit);
/*! Clear a bitfield in the control register of SP[ID]
\return none, SP[ID].sc[reg] &= ~(1<<bit)
*/
STORAGE_CLASS_SP_H void sp_ctrl_clearbit(
- const sp_ID_t ID,
- const hrt_address reg,
- const unsigned int bit);
+ const sp_ID_t ID,
+ const hrt_address reg,
+ const unsigned int bit);
/*! Write to the DMEM of SP[ID]
\return none, SP[ID].dmem[addr...addr+size-1] = data
*/
STORAGE_CLASS_SP_H void sp_dmem_store(
- const sp_ID_t ID,
- hrt_address addr,
- const void *data,
- const size_t size);
+ const sp_ID_t ID,
+ hrt_address addr,
+ const void *data,
+ const size_t size);
/*! Read from the DMEM of SP[ID]
\return none, data = SP[ID].dmem[addr...addr+size-1]
*/
STORAGE_CLASS_SP_H void sp_dmem_load(
- const sp_ID_t ID,
- const hrt_address addr,
- void *data,
- const size_t size);
+ const sp_ID_t ID,
+ const hrt_address addr,
+ void *data,
+ const size_t size);
/*! Write a 8-bit datum to the DMEM of SP[ID]
\return none, SP[ID].dmem[addr...addr+size-1] = data
*/
STORAGE_CLASS_SP_H void sp_dmem_store_uint8(
- const sp_ID_t ID,
- hrt_address addr,
- const uint8_t data);
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint8_t data);
/*! Write a 16-bit datum to the DMEM of SP[ID]
\return none, SP[ID].dmem[addr...addr+size-1] = data
*/
STORAGE_CLASS_SP_H void sp_dmem_store_uint16(
- const sp_ID_t ID,
- hrt_address addr,
- const uint16_t data);
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint16_t data);
/*! Write a 32-bit datum to the DMEM of SP[ID]
\return none, SP[ID].dmem[addr...addr+size-1] = data
*/
STORAGE_CLASS_SP_H void sp_dmem_store_uint32(
- const sp_ID_t ID,
- hrt_address addr,
- const uint32_t data);
+ const sp_ID_t ID,
+ hrt_address addr,
+ const uint32_t data);
/*! Load a 8-bit datum from the DMEM of SP[ID]
\return none, data = SP[ID].dmem[addr...addr+size-1]
*/
STORAGE_CLASS_SP_H uint8_t sp_dmem_load_uint8(
- const sp_ID_t ID,
- const hrt_address addr);
+ const sp_ID_t ID,
+ const hrt_address addr);
/*! Load a 16-bit datum from the DMEM of SP[ID]
\return none, data = SP[ID].dmem[addr...addr+size-1]
*/
STORAGE_CLASS_SP_H uint16_t sp_dmem_load_uint16(
- const sp_ID_t ID,
- const hrt_address addr);
+ const sp_ID_t ID,
+ const hrt_address addr);
/*! Load a 32-bit datum from the DMEM of SP[ID]
\return none, data = SP[ID].dmem[addr...addr+size-1]
*/
STORAGE_CLASS_SP_H uint32_t sp_dmem_load_uint32(
- const sp_ID_t ID,
- const hrt_address addr);
+ const sp_ID_t ID,
+ const hrt_address addr);
#endif /* __SP_PUBLIC_H_INCLUDED__ */
\return none, TIMED_CTRL[ID].ctrl[reg] = value
*/
STORAGE_CLASS_TIMED_CTRL_H void timed_ctrl_reg_store(
- const timed_ctrl_ID_t ID,
- const unsigned int reg_addr,
- const hrt_data value);
+ const timed_ctrl_ID_t ID,
+ const unsigned int reg_addr,
+ const hrt_data value);
void timed_ctrl_snd_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- hrt_address addr,
- hrt_data value);
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ hrt_address addr,
+ hrt_data value);
void timed_ctrl_snd_sp_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const sp_ID_t SP_ID,
- hrt_address offset,
- hrt_data value);
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ const sp_ID_t SP_ID,
+ hrt_address offset,
+ hrt_data value);
void timed_ctrl_snd_gpio_commnd(
- const timed_ctrl_ID_t ID,
- hrt_data mask,
- hrt_data condition,
- hrt_data counter,
- const gpio_ID_t GPIO_ID,
- hrt_address offset,
- hrt_data value);
+ const timed_ctrl_ID_t ID,
+ hrt_data mask,
+ hrt_data condition,
+ hrt_data counter,
+ const gpio_ID_t GPIO_ID,
+ hrt_address offset,
+ hrt_data value);
#endif /* __TIMED_CTRL_PUBLIC_H_INCLUDED__ */
\return vaddress
*/
hrt_vaddress mmgr_mmap(
- const void __user *ptr,
- const size_t size,
- u16 attribute,
- void *context);
+ const void __user *ptr,
+ const size_t size,
+ u16 attribute,
+ void *context);
/*! Zero initialise an allocation in memory
#include "ia_css_err.h"
bool reallocate_buffer(
- hrt_vaddress * curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err);
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err);
#endif /*__MEMORY_REALLOC_H_INCLUDED__*/
* @return ERANGE on Destination size too small
*/
static inline int memcpy_s(
- void *dest_buf,
- size_t dest_size,
- const void *src_buf,
- size_t src_size)
+ void *dest_buf,
+ size_t dest_size,
+ const void *src_buf,
+ size_t src_size)
{
if ((!src_buf) || (!dest_buf)) {
/* Invalid arguments*/
* @return Returns 0 if src_str is NULL
*/
static size_t strnlen_s(
- const char *src_str,
- size_t max_len)
+ const char *src_str,
+ size_t max_len)
{
size_t ix;
* @return Returns ERANGE on destination size too small
*/
static inline int strncpy_s(
- char *dest_str,
- size_t dest_size,
- const char *src_str,
- size_t src_size)
+ char *dest_str,
+ size_t dest_size,
+ const char *src_str,
+ size_t src_size)
{
size_t len;
* @return Returns ERANGE on destination size too small
*/
static inline int strcpy_s(
- char *dest_str,
- size_t dest_size,
- const char *src_str)
+ char *dest_str,
+ size_t dest_size,
+ const char *src_str)
{
size_t len;
}
exp_id = tag->exp_id;
- if (exp_id != 0)
- {
+ if (exp_id != 0) {
/* we encode either an exp_id or capture data */
assert((num_captures == 0) && (skip == 0) && (offset == 0));
encoded_tag = TAG_EXP | (exp_id & 0xFF) << TAG_EXP_ID_SHIFT;
- } else
- {
+ } else {
encoded_tag = TAG_CAP
- | ((num_captures_sign & 0x00000001) << TAG_NUM_CAPTURES_SIGN_SHIFT)
- | ((offset_sign & 0x00000001) << TAG_OFFSET_SIGN_SHIFT)
- | ((num_captures & 0x000000FF) << TAG_NUM_CAPTURES_SHIFT)
- | ((skip & 0x000000FF) << TAG_OFFSET_SHIFT)
- | ((offset & 0x000000FF) << TAG_SKIP_SHIFT);
+ | ((num_captures_sign & 0x00000001) << TAG_NUM_CAPTURES_SIGN_SHIFT)
+ | ((offset_sign & 0x00000001) << TAG_OFFSET_SIGN_SHIFT)
+ | ((num_captures & 0x000000FF) << TAG_NUM_CAPTURES_SHIFT)
+ | ((skip & 0x000000FF) << TAG_OFFSET_SHIFT)
+ | ((offset & 0x000000FF) << TAG_SKIP_SHIFT);
}
return encoded_tag;
}
* */
void
ia_css_translate_3a_statistics(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_isp_3a_statistics_map *isp_stats);
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_isp_3a_statistics_map *isp_stats);
/* Convenience functions for alloc/free of certain datatypes */
*/
struct ia_css_isp_3a_statistics_map *
ia_css_isp_3a_statistics_map_allocate(
- const struct ia_css_isp_3a_statistics *isp_stats,
- void *data_ptr);
+ const struct ia_css_isp_3a_statistics *isp_stats,
+ void *data_ptr);
/* @brief Free the 3a statistics map
* @param[in] me Pointer to the 3a statistics map
struct ia_css_blob_info {
/** Static blob data */
u32 offset; /** Blob offset in fw file */
- struct ia_css_isp_param_memory_offsets memory_offsets; /** offset wrt hdr in bytes */
+ struct ia_css_isp_param_memory_offsets
+ memory_offsets; /** offset wrt hdr in bytes */
u32 prog_name_offset; /** offset wrt hdr in bytes */
u32 size; /** Size of blob */
u32 padding_size; /** total cummulative of bytes added due to section alignment */
u32 bss_target; /** Start position of bss in SP dmem */
u32 bss_size; /** Size of bss section */
/** Dynamic data filled by loader */
- CSS_ALIGN(const void *code, 8); /** Code section absolute pointer within fw, code = icache + text */
- CSS_ALIGN(const void *data, 8); /** Data section absolute pointer within fw, data = data + bss */
+ CSS_ALIGN(const void *code,
+ 8); /** Code section absolute pointer within fw, code = icache + text */
+ CSS_ALIGN(const void *data,
+ 8); /** Data section absolute pointer within fw, data = data + bss */
};
struct ia_css_binary_input_info {
struct ia_css_binary_uds_info uds;
struct ia_css_binary_block_info block;
struct ia_css_isp_param_isp_segments mem_initializers;
-/* MW: Packing (related) bools in an integer ?? */
+ /* MW: Packing (related) bools in an integer ?? */
struct {
#ifdef ISP2401
u8 luma_only;
u8 padding[2];
} enable;
struct {
-/* DMA channel ID: [0,...,HIVE_ISP_NUM_DMA_CHANNELS> */
+ /* DMA channel ID: [0,...,HIVE_ISP_NUM_DMA_CHANNELS> */
u8 ref_y_channel;
u8 ref_c_channel;
u8 tnr_channel;
enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM];
CSS_ALIGN(s32 num_vf_formats, 8); /** number of supported vf formats */
- enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
+ enum ia_css_frame_format
+ vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */
u8 num_output_pins;
ia_css_ptr xmem_addr;
/** exposure id for this buffer; 0 = not available
see ia_css_event_public.h for more detail. */
union {
- struct ia_css_isp_3a_statistics *stats_3a; /** 3A statistics & optionally RGBY statistics. */
+ struct ia_css_isp_3a_statistics
+ *stats_3a; /** 3A statistics & optionally RGBY statistics. */
struct ia_css_isp_dvs_statistics *stats_dvs; /** DVS statistics. */
struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /** SKC DVS statistics. */
struct ia_css_frame *frame; /** Frame buffer. */
struct ia_css_metadata *metadata; /** Sensor metadata. */
} data; /** Buffer data pointer. */
u64 driver_cookie; /** cookie for the driver */
- struct ia_css_time_meas timing_data; /** timing data (readings from the timer) */
- struct ia_css_clock_tick isys_eof_clock_tick; /** ISYS's end of frame timer tick*/
+ struct ia_css_time_meas
+ timing_data; /** timing data (readings from the timer) */
+ struct ia_css_clock_tick
+ isys_eof_clock_tick; /** ISYS's end of frame timer tick*/
};
/* @brief Dequeue param buffers from sp2host_queue
* the fw pointer could be freed after this function completes.
*/
enum ia_css_err ia_css_init(
- const struct ia_css_env *env,
- const struct ia_css_fw *fw,
- u32 l1_base,
- enum ia_css_irq_type irq_type);
+ const struct ia_css_env *env,
+ const struct ia_css_fw *fw,
+ u32 l1_base,
+ enum ia_css_irq_type irq_type);
/* @brief Un-initialize the CSS API.
* @return None
ia_css_device_load(const hrt_address addr, void *data, const size_t size);
void
-ia_css_device_store(const hrt_address addr, const void *data, const size_t size);
+ia_css_device_store(const hrt_address addr, const void *data,
+ const size_t size);
#endif /* _IA_CSS_DEVICE_ACCESS_H */
*/
void
ia_css_translate_dvs_statistics(
- struct ia_css_dvs_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats);
+ struct ia_css_dvs_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats);
/* @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer.
* @param[in] host_stats Host buffer
*/
void
ia_css_translate_dvs2_statistics(
- struct ia_css_dvs2_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats);
+ struct ia_css_dvs2_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats);
/* @brief Copy DVS statistics from an ISP buffer to a host buffer.
* @param[in] type - DVS statistics type
*/
struct ia_css_isp_dvs_statistics_map *
ia_css_isp_dvs_statistics_map_allocate(
- const struct ia_css_isp_dvs_statistics *isp_stats,
- void *data_ptr);
+ const struct ia_css_isp_dvs_statistics *isp_stats,
+ void *data_ptr);
/* @brief Free the dvs statistics map
* @param[in] me Pointer to the dvs statistics map
*/
enum ia_css_err
ia_css_load_firmware(const struct ia_css_env *env,
- const struct ia_css_fw *fw);
+ const struct ia_css_fw *fw);
/* @brief Unloads the firmware
* @return None
*/
enum ia_css_err
ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame,
- const struct ia_css_frame_info *info);
+ const struct ia_css_frame_info *info);
/* @brief Allocate a CSS frame structure using a frame info structure.
*
*/
enum ia_css_err
ia_css_frame_create_from_info(struct ia_css_frame **frame,
- const struct ia_css_frame_info *info);
+ const struct ia_css_frame_info *info);
/* @brief Set a mapped data buffer to a CSS frame
*
*/
enum ia_css_err
ia_css_frame_set_data(struct ia_css_frame *frame,
- const ia_css_ptr mapped_data,
- size_t data_size_bytes);
+ const ia_css_ptr mapped_data,
+ size_t data_size_bytes);
/* @brief Map an existing frame data pointer to a CSS frame.
*
IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE = 1U << 2, /** exited sleep mode */
IA_CSS_RX_IRQ_INFO_ECC_CORRECTED = 1U << 3, /** ECC corrected */
IA_CSS_RX_IRQ_INFO_ERR_SOT = 1U << 4,
- /** Start of transmission */
+ /** Start of transmission */
IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC = 1U << 5, /** SOT sync (??) */
IA_CSS_RX_IRQ_INFO_ERR_CONTROL = 1U << 6, /** Control (??) */
IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE = 1U << 7, /** Double ECC */
struct hrt_userbuffer_attr *userbuffer_attr = context;
return hrt_isp_css_mm_alloc_user_ptr(
- size, ptr, userbuffer_attr->pgnr,
- userbuffer_attr->type,
- attribute & HRT_BUF_FLAG_CACHED);
+ size, ptr, userbuffer_attr->pgnr,
+ userbuffer_attr->type,
+ attribute & HRT_BUF_FLAG_CACHED);
}
struct ia_css_metadata {
struct ia_css_metadata_info info; /** Layout info */
- ia_css_ptr address; /** CSS virtual address */
- u32 exp_id;
+ ia_css_ptr address; /** CSS virtual address */
+ u32 exp_id;
/** Exposure ID, see ia_css_event_public.h for more detail */
};
*/
enum ia_css_err
ia_css_mipi_frame_specify(const unsigned int size_mem_words,
- const bool contiguous);
+ const bool contiguous);
#if !defined(HAS_NO_INPUT_SYSTEM)
/* @brief Register size of a CSS MIPI frame for check during capturing.
*/
enum ia_css_err
ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
- const unsigned int size_mem_words);
+ const unsigned int size_mem_words);
#endif
/* @brief Calculate the size of a mipi frame.
*/
enum ia_css_err
ia_css_mipi_frame_calculate_size(const unsigned int width,
- const unsigned int height,
- const enum atomisp_input_format format,
- const bool hasSOLandEOL,
- const unsigned int embedded_data_size_words,
- unsigned int *size_mem_words);
+ const unsigned int height,
+ const enum atomisp_input_format format,
+ const bool hasSOLandEOL,
+ const unsigned int embedded_data_size_words,
+ unsigned int *size_mem_words);
#endif /* __IA_CSS_MIPI_H */
enum ia_css_err
sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
- struct ia_css_isp_parameters *params,
- bool commit, struct ia_css_pipe *pipe);
+ struct ia_css_isp_parameters *params,
+ bool commit, struct ia_css_pipe *pipe);
#endif /* __IA_CSS_PIPE_H__ */
*/
enum ia_css_err
ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_config *config);
+ struct ia_css_isp_config *config);
/* @brief Controls when the Event generator raises an IRQ to the Host.
*
*/
enum ia_css_err
ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe,
- u32 fw_handle,
- bool enable);
+ u32 fw_handle,
+ bool enable);
/* @brief Get the state (Enable or Disable) of the Extension stage in the
* given pipe.
*/
enum ia_css_err
ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe,
- u32 fw_handle,
- bool *enable);
+ u32 fw_handle,
+ bool *enable);
#ifdef ISP2401
/* @brief Update mapped CSS and ISP arguments for QoS pipe during SP runtime.
* maintained on IPU3 or further.}
*/
enum ia_css_err
-ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_handle,
- struct ia_css_isp_param_css_segments *css_seg,
- struct ia_css_isp_param_isp_segments *isp_seg);
+ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe,
+ uint32_t fw_handle,
+ struct ia_css_isp_param_css_segments *css_seg,
+ struct ia_css_isp_param_isp_segments *isp_seg);
#endif
/* @brief Get selected configuration settings
*/
void
ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_config *config);
+ struct ia_css_isp_config *config);
/* @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit
* address space. So the LUT can be freed by caller.
*/
enum ia_css_err
ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe,
- const void *lut);
+ const void *lut);
/* @brief Checking of DVS statistics ability
* @param[in] pipe_info The pipe info.
* @return true - has DVS statistics ability
*/
enum ia_css_err
ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
- int output_pin,
- enum ia_css_frame_format format);
+ int output_pin,
+ enum ia_css_frame_format format);
#endif
#endif /* __IA_CSS_PIPE_PUBLIC_H */
ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream);
bool
-sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int sensor_binning);
+sh_css_params_set_binning_factor(struct ia_css_stream *stream,
+ unsigned int sensor_binning);
void
sh_css_invalidate_params(struct ia_css_stream *stream);
void
ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream,
- short *hor_coefs_odd_real,
- short *hor_coefs_odd_imag,
- short *hor_coefs_even_real,
- short *hor_coefs_even_imag,
- short *ver_coefs_odd_real,
- short *ver_coefs_odd_imag,
- short *ver_coefs_even_real,
- short *ver_coefs_even_imag);
+ short *hor_coefs_odd_real,
+ short *hor_coefs_odd_imag,
+ short *hor_coefs_even_real,
+ short *hor_coefs_even_imag,
+ short *ver_coefs_odd_real,
+ short *ver_coefs_odd_imag,
+ short *ver_coefs_even_real,
+ short *ver_coefs_even_imag);
enum ia_css_err
ia_css_stream_isp_parameters_init(struct ia_css_stream *stream);
#include "../../../include/linux/atomisp_platform.h"
unsigned int ia_css_util_input_format_bpp(
- enum atomisp_input_format format,
- bool two_ppc);
+ enum atomisp_input_format format,
+ bool two_ppc);
#endif /* __ATOMISP_INPUT_FORMAT_H */
will arrive. Use this field
to specify virtual channel id.
Valid values are: 0, 1, 2, 3 */
- struct ia_css_stream_isys_stream_config isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+ struct ia_css_stream_isys_stream_config
+ isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
struct ia_css_stream_input_config input_config;
#ifdef ISP2401
1, 2 or 4. */
bool online; /** offline will activate RAW copy on SP, use this for
continuous capture. */
- /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
+ /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */
unsigned int init_num_cont_raw_buf; /** initial number of raw buffers to
allocate */
unsigned int target_num_cont_raw_buf; /** total number of raw buffers to
bool disable_cont_viewfinder; /** disable continuous viewfinder for ZSL use case */
s32 flash_gpio_pin; /** pin on which the flash is connected, -1 for no flash */
int left_padding; /** The number of input-formatter left-paddings, -1 for default from binary.*/
- struct ia_css_mipi_buffer_config mipi_buffer_config; /** mipi buffer configuration */
- struct ia_css_metadata_config metadata_config; /** Metadata configuration. */
+ struct ia_css_mipi_buffer_config
+ mipi_buffer_config; /** mipi buffer configuration */
+ struct ia_css_metadata_config
+ metadata_config; /** Metadata configuration. */
bool ia_css_enable_raw_buffer_locking; /** Enable Raw Buffer Locking for HALv3 Support */
bool lock_all;
/** Lock all RAW buffers (true) or lock only buffers processed by
* create the internal structures and fill in the configuration data and pipes
*/
- /* @brief Creates a stream
- * @param[in] stream_config The stream configuration.
- * @param[in] num_pipes The number of pipes to incorporate in the stream.
- * @param[in] pipes The pipes.
- * @param[out] stream The stream.
- * @return IA_CSS_SUCCESS or the error code.
- *
- * This function will create a stream with a given configuration and given pipes.
- */
+/* @brief Creates a stream
+* @param[in] stream_config The stream configuration.
+* @param[in] num_pipes The number of pipes to incorporate in the stream.
+* @param[in] pipes The pipes.
+* @param[out] stream The stream.
+* @return IA_CSS_SUCCESS or the error code.
+*
+* This function will create a stream with a given configuration and given pipes.
+*/
enum ia_css_err
ia_css_stream_create(const struct ia_css_stream_config *stream_config,
- int num_pipes,
- struct ia_css_pipe *pipes[],
- struct ia_css_stream **stream);
+ int num_pipes,
+ struct ia_css_pipe *pipes[],
+ struct ia_css_stream **stream);
/* @brief Destroys a stream
* @param[in] stream The stream.
* This function will Set the output frame stride (at the last pipe)
*/
enum ia_css_err
-ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width);
+ia_css_stream_set_output_padded_width(struct ia_css_stream *stream,
+ unsigned int output_padded_width);
/* @brief Return max number of continuous RAW frames.
* @param[in] stream The stream.
* the system can support.
*/
enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth);
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+ int *buffer_depth);
/* @brief Set nr of continuous RAW frames to use.
*
*/
enum ia_css_err
ia_css_stream_capture(struct ia_css_stream *stream,
- int num_captures,
- unsigned int skip,
- int offset);
+ int num_captures,
+ unsigned int skip,
+ int offset);
/* @brief Specify which raw frame to tag based on exp_id found in frame info
*
*/
enum ia_css_err
ia_css_stream_capture_frame(struct ia_css_stream *stream,
- unsigned int exp_id);
+ unsigned int exp_id);
/* ===== VIDEO ===== */
*/
void
ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
- enum atomisp_input_format format,
- const unsigned short *data,
- unsigned int width);
+ enum atomisp_input_format format,
+ const unsigned short *data,
+ unsigned int width);
/* @brief End an input frame on the CSS input FIFO.
*
*/
enum ia_css_err
ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe);
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe);
/* @brief Configure a stream with filter coefficients.
* @deprecated {Replaced by
*/
enum ia_css_err
ia_css_stream_set_isp_config(
- struct ia_css_stream *stream,
- const struct ia_css_isp_config *config);
+ struct ia_css_stream *stream,
+ const struct ia_css_isp_config *config);
/* @brief Get selected configuration settings
* @param[in] stream The stream.
*/
enum ia_css_err
ia_css_timer_get_current_tick(
- struct ia_css_clock_tick *curr_ts);
+ struct ia_css_clock_tick *curr_ts);
#endif /* __IA_CSS_TIMER_H */
output_width = input_width * bayer_scale_hor_ratio_out
/ bayer_scale_hor_ratio_in */
#else
- /** Horizontal ratio of bayer scaling between input width and output width,
- for the scaling which should be done before shading correction.
- output_width = input_width * bayer_scale_hor_ratio_out
- / bayer_scale_hor_ratio_in + 0.5 */
+ /** Horizontal ratio of bayer scaling between input width and output width,
+ for the scaling which should be done before shading correction.
+ output_width = input_width * bayer_scale_hor_ratio_out
+ / bayer_scale_hor_ratio_in + 0.5 */
#endif
u32 bayer_scale_ver_ratio_in;
u32 bayer_scale_ver_ratio_out;
This corresponds to the top pixel of bayer
inputted to isp from sensor. */
#else
- /** Vertical ratio of bayer scaling between input height and output height,
- for the scaling which should be done before shading correction.
- output_height = input_height * bayer_scale_ver_ratio_out
- / bayer_scale_ver_ratio_in + 0.5 */
+ /** Vertical ratio of bayer scaling between input height and output height,
+ for the scaling which should be done before shading correction.
+ output_height = input_height * bayer_scale_ver_ratio_out
+ / bayer_scale_ver_ratio_in + 0.5 */
struct ia_css_resolution isp_input_sensor_data_res_bqs;
- /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
- NOTE: This is NOT the size of the physical sensor size.
- CSS requests the driver that ISP inputs sensor data
- by the size of isp_input_sensor_data_res_bqs.
- The driver sends the sensor data to ISP,
- after the adequate cropping/binning/scaling
- are applied to the physical sensor data area.
- ISP assumes the area of isp_input_sensor_data_res_bqs
- is centered on the physical sensor. */
+ /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling.
+ NOTE: This is NOT the size of the physical sensor size.
+ CSS requests the driver that ISP inputs sensor data
+ by the size of isp_input_sensor_data_res_bqs.
+ The driver sends the sensor data to ISP,
+ after the adequate cropping/binning/scaling
+ are applied to the physical sensor data area.
+ ISP assumes the area of isp_input_sensor_data_res_bqs
+ is centered on the physical sensor. */
struct ia_css_resolution sensor_data_res_bqs;
- /** Sensor data size (in bqs) at shading correction.
- This is the size AFTER bayer scaling. */
+ /** Sensor data size (in bqs) at shading correction.
+ This is the size AFTER bayer scaling. */
struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl;
- /** Origin of sensor data area positioned on shading table at shading correction.
- The coordinate x,y should be positive values. */
+ /** Origin of sensor data area positioned on shading table at shading correction.
+ The coordinate x,y should be positive values. */
#endif
} type_1;
struct ia_css_3a_grid_info s3a_grid; /** 3A grid info */
union ia_css_dvs_grid_u dvs_grid;
- /** All types of DVS statistics grid info union */
+ /** All types of DVS statistics grid info union */
enum ia_css_vamem_type vamem_type;
};
[YNR2&YEE2, 2only] */
struct ia_css_fc_config *fc_config; /** Fringe Control
[FC2, 2only] */
- struct ia_css_formats_config *formats_config; /** Formats Control for main output
+ struct ia_css_formats_config
+ *formats_config; /** Formats Control for main output
[FORMATS, 1&2] */
struct ia_css_cnr_config *cnr_config; /** Chroma Noise Reduction
[CNR2, 2only] */
* DVS, GDC) from IQ tool level and application level down-to ISP FW level.
* the risk for regression is not in the individual blocks, but how they
* integrate together. */
- struct ia_css_output_config *output_config; /** Main Output Mirroring, flipping */
+ struct ia_css_output_config
+ *output_config; /** Main Output Mirroring, flipping */
#ifdef ISP2401
- struct ia_css_tnr3_kernel_config *tnr3_config; /** TNR3 config */
+ struct ia_css_tnr3_kernel_config
+ *tnr3_config; /** TNR3 config */
#endif
- struct ia_css_scaler_config *scaler_config; /** Skylake: scaler config (optional) */
- struct ia_css_formats_config *formats_config_display;/** Formats control for viewfinder/display output (optional)
+ struct ia_css_scaler_config
+ *scaler_config; /** Skylake: scaler config (optional) */
+ struct ia_css_formats_config
+ *formats_config_display;/** Formats control for viewfinder/display output (optional)
[OSYS, n/a] */
- struct ia_css_output_config *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
+ struct ia_css_output_config
+ *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */
- struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */
+ struct ia_css_frame
+ *output_frame; /** Output frame the config is to be applied to (optional) */
u32 isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */
};
const struct ia_css_anr_config default_anr_config = {
10,
- { 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
- 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
- 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
- 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4},
+ {
+ 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+ 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+ 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4,
+ 0, 3, 1, 2, 3, 6, 4, 5, 1, 4, 2, 3, 2, 5, 3, 4
+ },
{10, 20, 30}
};
void
ia_css_anr_encode(
- struct sh_css_isp_anr_params *to,
- const struct ia_css_anr_config *from,
- unsigned int size)
+ struct sh_css_isp_anr_params *to,
+ const struct ia_css_anr_config *from,
+ unsigned int size)
{
(void)size;
to->threshold = from->threshold;
void
ia_css_anr_dump(
- const struct sh_css_isp_anr_params *anr,
- unsigned int level)
+ const struct sh_css_isp_anr_params *anr,
+ unsigned int level)
{
if (!anr) return;
ia_css_debug_dtrace(level, "Advance Noise Reduction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "anr_threshold", anr->threshold);
+ "anr_threshold", anr->threshold);
}
void
ia_css_anr_debug_dtrace(
- const struct ia_css_anr_config *config,
- unsigned int level)
+ const struct ia_css_anr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.threshold=%d\n",
- config->threshold);
+ "config.threshold=%d\n",
+ config->threshold);
}
void
ia_css_anr_encode(
- struct sh_css_isp_anr_params *to,
- const struct ia_css_anr_config *from,
- unsigned int size);
+ struct sh_css_isp_anr_params *to,
+ const struct ia_css_anr_config *from,
+ unsigned int size);
void
ia_css_anr_dump(
- const struct sh_css_isp_anr_params *anr,
- unsigned int level);
+ const struct sh_css_isp_anr_params *anr,
+ unsigned int level);
void
ia_css_anr_debug_dtrace(
- const struct ia_css_anr_config *config, unsigned int level)
+ const struct ia_css_anr_config *config, unsigned int level)
;
#endif /* __IA_CSS_ANR_HOST_H */
void
ia_css_anr2_vmem_encode(
- struct ia_css_isp_anr2_params *to,
- const struct ia_css_anr_thres *from,
- size_t size)
+ struct ia_css_isp_anr2_params *to,
+ const struct ia_css_anr_thres *from,
+ size_t size)
{
unsigned int i;
void
ia_css_anr2_debug_dtrace(
- const struct ia_css_anr_thres *config,
- unsigned int level)
+ const struct ia_css_anr_thres *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_anr2_vmem_encode(
- struct ia_css_isp_anr2_params *to,
- const struct ia_css_anr_thres *from,
- size_t size);
+ struct ia_css_isp_anr2_params *to,
+ const struct ia_css_anr_thres *from,
+ size_t size);
void
ia_css_anr2_debug_dtrace(
- const struct ia_css_anr_thres *config, unsigned int level)
+ const struct ia_css_anr_thres *config, unsigned int level)
;
#endif /* __IA_CSS_ANR2_HOST_H */
#if 1
const struct ia_css_anr_thres default_anr_thres = {
-{128, 384, 640, 896, 896, 640, 384, 128, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 128, 384, 640, 896, 896, 640, 384, 128,
-0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20,
-0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40,
-0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60,
-30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50,
-60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100,
-90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150,
-10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30,
-20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60,
-30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90,
-20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40,
-40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80,
-60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120}
+ {
+ 128, 384, 640, 896, 896, 640, 384, 128, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 896, 2688, 4480, 6272, 6272, 4480, 2688, 896, 640, 1920, 3200, 4480, 4480, 3200, 1920, 640, 384, 1152, 1920, 2688, 2688, 1920, 1152, 384, 128, 384, 640, 896, 896, 640, 384, 128,
+ 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20, 0, 0, 30, 30, 10, 10, 20, 20,
+ 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40, 0, 0, 60, 60, 20, 20, 40, 40,
+ 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60, 0, 0, 90, 90, 30, 30, 60, 60,
+ 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50, 30, 30, 60, 60, 40, 40, 50, 50,
+ 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100, 60, 60, 120, 120, 80, 80, 100, 100,
+ 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150, 90, 90, 180, 180, 120, 120, 150, 150,
+ 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30, 10, 10, 40, 40, 20, 20, 30, 30,
+ 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60, 20, 20, 80, 80, 40, 40, 60, 60,
+ 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90, 30, 30, 120, 120, 60, 60, 90, 90,
+ 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40, 20, 20, 50, 50, 30, 30, 40, 40,
+ 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80, 40, 40, 100, 100, 60, 60, 80, 80,
+ 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120, 60, 60, 150, 150, 90, 90, 120, 120
+ }
};
#else
const struct ia_css_anr_thres default_anr_thres = {
-{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
};
#endif
/* Advanced Noise Reduction (ANR) thresholds */
struct ia_css_isp_anr2_params {
- VMEM_ARRAY(data, ANR_PARAM_SIZE * ISP_VEC_NELEMS);
+ VMEM_ARRAY(data, ANR_PARAM_SIZE *ISP_VEC_NELEMS);
};
#endif /* __IA_CSS_ANR2_PARAM_H */
void
ia_css_bh_hmem_decode(
- struct ia_css_3a_rgby_output *out_ptr,
- const struct ia_css_bh_table *hmem_buf)
+ struct ia_css_3a_rgby_output *out_ptr,
+ const struct ia_css_bh_table *hmem_buf)
{
int i;
void
ia_css_bh_encode(
- struct sh_css_isp_bh_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size)
+ struct sh_css_isp_bh_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size)
{
(void)size;
/* coefficients to calculate Y */
void
ia_css_bh_hmem_decode(
- struct ia_css_3a_rgby_output *out_ptr,
- const struct ia_css_bh_table *hmem_buf);
+ struct ia_css_3a_rgby_output *out_ptr,
+ const struct ia_css_bh_table *hmem_buf);
void
ia_css_bh_encode(
- struct sh_css_isp_bh_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size);
+ struct sh_css_isp_bh_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size);
#endif /* __IA_CSS_BH_HOST_H */
static const s32 div_lut_slopes[BNLM_DIV_LUT_SIZE] = {
-7760, -6960, -6216, -5536, -4912, -4344, -3832, -3360, -2936, -2552, -2208, -2208
-};
+ };
static const s32 div_lut_intercepts[BNLM_DIV_LUT_SIZE] = {
8184, 7752, 7336, 6928, 6536, 6152, 5776, 5416, 5064, 4728, 4408, 4408
* lut_size: Size of lut_val array
*/
static inline void
-bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr, const int32_t *lut_val, const uint32_t lut_size)
+bnlm_lut_encode(struct bnlm_lut *lut, const int32_t *lut_thr,
+ const int32_t *lut_val, const uint32_t lut_size)
{
u32 blk, i;
const u32 block_size = 16;
*/
void
ia_css_bnlm_vmem_encode(
- struct bnlm_vmem_params *to,
- const struct ia_css_bnlm_config *from,
- size_t size)
+ struct bnlm_vmem_params *to,
+ const struct ia_css_bnlm_config *from,
+ size_t size)
{
int i;
(void)size;
/* Initialize LUTs in VMEM parameters */
- bnlm_lut_encode(&to->mu_root_lut, from->mu_root_lut_thr, from->mu_root_lut_val, 16);
- bnlm_lut_encode(&to->sad_norm_lut, from->sad_norm_lut_thr, from->sad_norm_lut_val, 16);
- bnlm_lut_encode(&to->sig_detail_lut, from->sig_detail_lut_thr, from->sig_detail_lut_val, 16);
- bnlm_lut_encode(&to->sig_rad_lut, from->sig_rad_lut_thr, from->sig_rad_lut_val, 16);
- bnlm_lut_encode(&to->rad_pow_lut, from->rad_pow_lut_thr, from->rad_pow_lut_val, 16);
+ bnlm_lut_encode(&to->mu_root_lut, from->mu_root_lut_thr, from->mu_root_lut_val,
+ 16);
+ bnlm_lut_encode(&to->sad_norm_lut, from->sad_norm_lut_thr,
+ from->sad_norm_lut_val, 16);
+ bnlm_lut_encode(&to->sig_detail_lut, from->sig_detail_lut_thr,
+ from->sig_detail_lut_val, 16);
+ bnlm_lut_encode(&to->sig_rad_lut, from->sig_rad_lut_thr, from->sig_rad_lut_val,
+ 16);
+ bnlm_lut_encode(&to->rad_pow_lut, from->rad_pow_lut_thr, from->rad_pow_lut_val,
+ 16);
bnlm_lut_encode(&to->nl_0_lut, from->nl_0_lut_thr, from->nl_0_lut_val, 16);
bnlm_lut_encode(&to->nl_1_lut, from->nl_1_lut_thr, from->nl_1_lut_val, 16);
bnlm_lut_encode(&to->nl_2_lut, from->nl_2_lut_thr, from->nl_2_lut_val, 16);
to->match_quality_max_idx[0][2] = from->match_quality_max_idx[2];
to->match_quality_max_idx[0][3] = from->match_quality_max_idx[3];
- bnlm_lut_encode(&to->div_lut, div_lut_nearests, div_lut_slopes, BNLM_DIV_LUT_SIZE);
+ bnlm_lut_encode(&to->div_lut, div_lut_nearests, div_lut_slopes,
+ BNLM_DIV_LUT_SIZE);
memset(to->div_lut_intercepts, 0, sizeof(to->div_lut_intercepts));
for (i = 0; i < BNLM_DIV_LUT_SIZE; i++) {
to->div_lut_intercepts[0][i] = div_lut_intercepts[i];
/* - Encodes BNLM public parameters into DMEM parameters */
void
ia_css_bnlm_encode(
- struct bnlm_dmem_params *to,
- const struct ia_css_bnlm_config *from,
- size_t size)
+ struct bnlm_dmem_params *to,
+ const struct ia_css_bnlm_config *from,
+ size_t size)
{
(void)size;
to->rad_enable = from->rad_enable;
/* Prints debug traces for BNLM public parameters */
void
ia_css_bnlm_debug_trace(
- const struct ia_css_bnlm_config *config,
- unsigned int level)
+ const struct ia_css_bnlm_config *config,
+ unsigned int level)
{
if (!config)
return;
#ifndef IA_CSS_NO_DEBUG
ia_css_debug_dtrace(level, "BNLM:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_enable", config->rad_enable);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_x_origin", config->rad_x_origin);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_y_origin", config->rad_y_origin);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_x_origin",
+ config->rad_x_origin);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rad_y_origin",
+ config->rad_y_origin);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "avg_min_th", config->avg_min_th);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "max_min_th", config->max_min_th);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_a", config->exp_coeff_a);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_b", config->exp_coeff_b);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_c", config->exp_coeff_c);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_exponent", config->exp_exponent);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_a",
+ config->exp_coeff_a);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_b",
+ config->exp_coeff_b);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_coeff_c",
+ config->exp_coeff_c);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "exp_exponent",
+ config->exp_exponent);
/* ToDo: print traces for LUTs */
#endif /* IA_CSS_NO_DEBUG */
void
ia_css_bnlm_vmem_encode(
- struct bnlm_vmem_params *to,
- const struct ia_css_bnlm_config *from,
- size_t size);
+ struct bnlm_vmem_params *to,
+ const struct ia_css_bnlm_config *from,
+ size_t size);
void
ia_css_bnlm_encode(
- struct bnlm_dmem_params *to,
- const struct ia_css_bnlm_config *from,
- size_t size);
+ struct bnlm_dmem_params *to,
+ const struct ia_css_bnlm_config *from,
+ size_t size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_bnlm_debug_trace(
- const struct ia_css_bnlm_config *config,
- unsigned int level);
+ const struct ia_css_bnlm_config *config,
+ unsigned int level);
#endif
#endif /* __IA_CSS_BNLM_HOST_H */
void
ia_css_bnr2_2_encode(
- struct sh_css_isp_bnr2_2_params *to,
- const struct ia_css_bnr2_2_config *from,
- size_t size)
+ struct sh_css_isp_bnr2_2_params *to,
+ const struct ia_css_bnr2_2_config *from,
+ size_t size)
{
(void)size;
to->d_var_gain_r = from->d_var_gain_r;
#ifndef IA_CSS_NO_DEBUG
void
ia_css_bnr2_2_debug_dtrace(
- const struct ia_css_bnr2_2_config *bnr,
- unsigned int level)
+ const struct ia_css_bnr2_2_config *bnr,
+ unsigned int level)
{
if (!bnr)
return;
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_r", bnr->d_var_gain_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_g", bnr->d_var_gain_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_b", bnr->d_var_gain_b);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_r", bnr->d_var_gain_slope_r);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_g", bnr->d_var_gain_slope_g);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_b", bnr->d_var_gain_slope_b);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_r",
+ bnr->d_var_gain_slope_r);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_g",
+ bnr->d_var_gain_slope_g);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_gain_slope_b",
+ bnr->d_var_gain_slope_b);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_r", bnr->n_var_gain_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_g", bnr->n_var_gain_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_b", bnr->n_var_gain_b);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_r", bnr->n_var_gain_slope_r);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_g", bnr->n_var_gain_slope_g);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_b", bnr->n_var_gain_slope_b);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_r",
+ bnr->n_var_gain_slope_r);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_g",
+ bnr->n_var_gain_slope_g);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "n_var_gain_slope_b",
+ bnr->n_var_gain_slope_b);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_thres", bnr->dir_thres);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_thres_w", bnr->dir_thres_w);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "var_offset_coef", bnr->var_offset_coef);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "var_offset_coef",
+ bnr->var_offset_coef);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "dir_gain", bnr->dir_gain);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain", bnr->detail_gain);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain_divisor", bnr->detail_gain_divisor);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_level_offset", bnr->detail_level_offset);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_gain_divisor",
+ bnr->detail_gain_divisor);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "detail_level_offset",
+ bnr->detail_level_offset);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_th_min", bnr->d_var_th_min);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "d_var_th_max", bnr->d_var_th_max);
void
ia_css_bnr2_2_encode(
- struct sh_css_isp_bnr2_2_params *to,
- const struct ia_css_bnr2_2_config *from,
- size_t size);
+ struct sh_css_isp_bnr2_2_params *to,
+ const struct ia_css_bnr2_2_config *from,
+ size_t size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_bnr2_2_debug_dtrace(
- const struct ia_css_bnr2_2_config *config,
- unsigned int level);
+ const struct ia_css_bnr2_2_config *config,
+ unsigned int level);
#endif
#endif /* __IA_CSS_BNR2_2_HOST_H */
void
ia_css_bnr_encode(
- struct sh_css_isp_bnr_params *to,
- const struct ia_css_nr_config *from,
- unsigned int size)
+ struct sh_css_isp_bnr_params *to,
+ const struct ia_css_nr_config *from,
+ unsigned int size)
{
(void)size;
/* BNR (Bayer Noise Reduction) */
void
ia_css_bnr_dump(
- const struct sh_css_isp_bnr_params *bnr,
- unsigned int level)
+ const struct sh_css_isp_bnr_params *bnr,
+ unsigned int level)
{
if (!bnr) return;
ia_css_debug_dtrace(level, "Bayer Noise Reduction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_gain_all", bnr->gain_all);
+ "bnr_gain_all", bnr->gain_all);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_gain_dir", bnr->gain_dir);
+ "bnr_gain_dir", bnr->gain_dir);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_threshold_low",
- bnr->threshold_low);
+ "bnr_threshold_low",
+ bnr->threshold_low);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_threshold_width_log2",
- bnr->threshold_width_log2);
+ "bnr_threshold_width_log2",
+ bnr->threshold_width_log2);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_threshold_width",
- bnr->threshold_width);
+ "bnr_threshold_width",
+ bnr->threshold_width);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "bnr_clip", bnr->clip);
+ "bnr_clip", bnr->clip);
}
void
ia_css_bnr_encode(
- struct sh_css_isp_bnr_params *to,
- const struct ia_css_nr_config *from,
- unsigned int size);
+ struct sh_css_isp_bnr_params *to,
+ const struct ia_css_nr_config *from,
+ unsigned int size);
void
ia_css_bnr_dump(
- const struct sh_css_isp_bnr_params *bnr,
- unsigned int level);
+ const struct sh_css_isp_bnr_params *bnr,
+ unsigned int level);
#endif /* __IA_CSS_DP_HOST_H */
/* keep the interface here, it is not enabled yet because host doesn't know the size of individual state */
void
ia_css_init_cnr_state(
- void/*struct sh_css_isp_cnr_vmem_state*/ * state,
- size_t size)
+ void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+ size_t size)
{
memset(state, 0, size);
}
void
ia_css_init_cnr_state(
- void/*struct sh_css_isp_cnr_vmem_state*/ * state,
- size_t size);
+ void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+ size_t size);
#endif /* __IA_CSS_CNR_HOST_H */
void
ia_css_cnr_encode(
- struct sh_css_isp_cnr_params *to,
- const struct ia_css_cnr_config *from,
- unsigned int size)
+ struct sh_css_isp_cnr_params *to,
+ const struct ia_css_cnr_config *from,
+ unsigned int size)
{
(void)size;
to->coring_u = from->coring_u;
void
ia_css_cnr_dump(
- const struct sh_css_isp_cnr_params *cnr,
- unsigned int level);
+ const struct sh_css_isp_cnr_params *cnr,
+ unsigned int level);
void
ia_css_cnr_debug_dtrace(
- const struct ia_css_cnr_config *config,
- unsigned int level)
+ const struct ia_css_cnr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.coring_u=%d, config.coring_v=%d, config.sense_gain_vy=%d, config.sense_gain_hy=%d, config.sense_gain_vu=%d, config.sense_gain_hu=%d, config.sense_gain_vv=%d, config.sense_gain_hv=%d\n",
- config->coring_u, config->coring_v,
- config->sense_gain_vy, config->sense_gain_hy,
- config->sense_gain_vu, config->sense_gain_hu,
- config->sense_gain_vv, config->sense_gain_hv);
+ "config.coring_u=%d, config.coring_v=%d, config.sense_gain_vy=%d, config.sense_gain_hy=%d, config.sense_gain_vu=%d, config.sense_gain_hu=%d, config.sense_gain_vv=%d, config.sense_gain_hv=%d\n",
+ config->coring_u, config->coring_v,
+ config->sense_gain_vy, config->sense_gain_hy,
+ config->sense_gain_vu, config->sense_gain_hu,
+ config->sense_gain_vv, config->sense_gain_hv);
}
void
ia_css_init_cnr2_state(
- void/*struct sh_css_isp_cnr_vmem_state*/ * state,
- size_t size)
+ void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+ size_t size)
{
memset(state, 0, size);
}
void
ia_css_cnr_encode(
- struct sh_css_isp_cnr_params *to,
- const struct ia_css_cnr_config *from,
- unsigned int size);
+ struct sh_css_isp_cnr_params *to,
+ const struct ia_css_cnr_config *from,
+ unsigned int size);
void
ia_css_cnr_dump(
- const struct sh_css_isp_cnr_params *cnr,
- unsigned int level);
+ const struct sh_css_isp_cnr_params *cnr,
+ unsigned int level);
void
ia_css_cnr_debug_dtrace(
- const struct ia_css_cnr_config *config,
- unsigned int level);
+ const struct ia_css_cnr_config *config,
+ unsigned int level);
void
ia_css_init_cnr2_state(
- void/*struct sh_css_isp_cnr_vmem_state*/ * state,
- size_t size);
+ void/*struct sh_css_isp_cnr_vmem_state*/ * state,
+ size_t size);
#endif /* __IA_CSS_CNR2_HOST_H */
void
ia_css_conversion_encode(
- struct sh_css_isp_conversion_params *to,
- const struct ia_css_conversion_config *from,
- unsigned int size)
+ struct sh_css_isp_conversion_params *to,
+ const struct ia_css_conversion_config *from,
+ unsigned int size)
{
(void)size;
to->en = from->en;
void
ia_css_conversion_encode(
- struct sh_css_isp_conversion_params *to,
- const struct ia_css_conversion_config *from,
- unsigned int size);
+ struct sh_css_isp_conversion_params *to,
+ const struct ia_css_conversion_config *from,
+ unsigned int size);
#ifdef ISP2401
/* workaround until code generation in isp_kernelparameters.host.c is fixed */
void
ia_css_copy_output_config(
- struct sh_css_isp_copy_output_isp_config *to,
- const struct ia_css_copy_output_configuration *from,
- unsigned int size)
+ struct sh_css_isp_copy_output_isp_config *to,
+ const struct ia_css_copy_output_configuration *from,
+ unsigned int size)
{
(void)size;
to->enable = from->enable;
void
ia_css_copy_output_configure(
- const struct ia_css_binary *binary,
- bool enable)
+ const struct ia_css_binary *binary,
+ bool enable)
{
struct ia_css_copy_output_configuration config = default_config;
void
ia_css_copy_output_config(
- struct sh_css_isp_copy_output_isp_config *to,
- const struct ia_css_copy_output_configuration *from,
- unsigned int size);
+ struct sh_css_isp_copy_output_isp_config *to,
+ const struct ia_css_copy_output_configuration *from,
+ unsigned int size);
void
ia_css_copy_output_configure(
- const struct ia_css_binary *binary,
- bool enable);
+ const struct ia_css_binary *binary,
+ bool enable);
#endif /* __IA_CSS_COPY_OUTPUT_HOST_H */
void
ia_css_crop_encode(
- struct sh_css_isp_crop_isp_params *to,
- const struct ia_css_crop_config *from,
- unsigned int size)
+ struct sh_css_isp_crop_isp_params *to,
+ const struct ia_css_crop_config *from,
+ unsigned int size)
{
(void)size;
to->crop_pos = from->crop_pos;
void
ia_css_crop_config(
- struct sh_css_isp_crop_isp_config *to,
- const struct ia_css_crop_configuration *from,
- unsigned int size)
+ struct sh_css_isp_crop_isp_config *to,
+ const struct ia_css_crop_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
void
ia_css_crop_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
struct ia_css_crop_configuration config = default_config;
void
ia_css_crop_encode(
- struct sh_css_isp_crop_isp_params *to,
- const struct ia_css_crop_config *from,
- unsigned int size);
+ struct sh_css_isp_crop_isp_params *to,
+ const struct ia_css_crop_config *from,
+ unsigned int size);
void
ia_css_crop_config(
- struct sh_css_isp_crop_isp_config *to,
- const struct ia_css_crop_configuration *from,
- unsigned int size);
+ struct sh_css_isp_crop_isp_config *to,
+ const struct ia_css_crop_configuration *from,
+ unsigned int size);
void
ia_css_crop_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
#endif /* __IA_CSS_CROP_HOST_H */
void
ia_css_encode_cc(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size)
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size)
{
(void)size;
#ifndef IA_CSS_NO_DEBUG
void
ia_css_csc_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size)
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size)
{
ia_css_encode_cc(to, from, size);
}
#ifndef IA_CSS_NO_DEBUG
void
ia_css_cc_dump(
- const struct sh_css_isp_csc_params *csc,
- unsigned int level,
- const char *name)
+ const struct sh_css_isp_csc_params *csc,
+ unsigned int level,
+ const char *name)
{
if (!csc) return;
ia_css_debug_dtrace(level, "%s\n", name);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m_shift",
- csc->m_shift);
+ "m_shift",
+ csc->m_shift);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m00",
- csc->m00);
+ "m00",
+ csc->m00);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m01",
- csc->m01);
+ "m01",
+ csc->m01);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m02",
- csc->m02);
+ "m02",
+ csc->m02);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m10",
- csc->m10);
+ "m10",
+ csc->m10);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m11",
- csc->m11);
+ "m11",
+ csc->m11);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m12",
- csc->m12);
+ "m12",
+ csc->m12);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m20",
- csc->m20);
+ "m20",
+ csc->m20);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m21",
- csc->m21);
+ "m21",
+ csc->m21);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "m22",
- csc->m22);
+ "m22",
+ csc->m22);
}
void
ia_css_csc_dump(
- const struct sh_css_isp_csc_params *csc,
- unsigned int level)
+ const struct sh_css_isp_csc_params *csc,
+ unsigned int level)
{
ia_css_cc_dump(csc, level, "Color Space Conversion");
}
void
ia_css_cc_config_debug_dtrace(
- const struct ia_css_cc_config *config,
- unsigned int level)
+ const struct ia_css_cc_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.m[0]=%d, config.m[1]=%d, config.m[2]=%d, config.m[3]=%d, config.m[4]=%d, config.m[5]=%d, config.m[6]=%d, config.m[7]=%d, config.m[8]=%d\n",
- config->matrix[0],
- config->matrix[1], config->matrix[2],
- config->matrix[3], config->matrix[4],
- config->matrix[5], config->matrix[6],
- config->matrix[7], config->matrix[8]);
+ "config.m[0]=%d, config.m[1]=%d, config.m[2]=%d, config.m[3]=%d, config.m[4]=%d, config.m[5]=%d, config.m[6]=%d, config.m[7]=%d, config.m[8]=%d\n",
+ config->matrix[0],
+ config->matrix[1], config->matrix[2],
+ config->matrix[3], config->matrix[4],
+ config->matrix[5], config->matrix[6],
+ config->matrix[7], config->matrix[8]);
}
#endif
void
ia_css_encode_cc(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size);
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size);
void
ia_css_csc_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size);
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_cc_dump(
- const struct sh_css_isp_csc_params *csc, unsigned int level,
- const char *name);
+ const struct sh_css_isp_csc_params *csc, unsigned int level,
+ const char *name);
void
ia_css_csc_dump(
- const struct sh_css_isp_csc_params *csc,
- unsigned int level);
+ const struct sh_css_isp_csc_params *csc,
+ unsigned int level);
void
ia_css_cc_config_debug_dtrace(
- const struct ia_css_cc_config *config,
- unsigned int level);
+ const struct ia_css_cc_config *config,
+ unsigned int level);
#define ia_css_csc_debug_dtrace ia_css_cc_config_debug_dtrace
#endif
#include "ia_css_ctc1_5.host.h"
static void ctc_gradient(
- int *dydx, int *shift,
- int y1, int y0, int x1, int x0)
+ int *dydx, int *shift,
+ int y1, int y0, int x1, int x0)
{
int frc_bits = max(IA_CSS_CTC_COEF_SHIFT, 16);
int dy = y1 - y0;
int max_dydx = (1 << IA_CSS_CTC_COEF_SHIFT) - 1;
if (dx == 0) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ctc_gradient() error, illegal division operation\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ctc_gradient() error, illegal division operation\n");
return;
} else {
dydx_int = dy / dx;
<= ((1 << IA_CSS_CTC_COEF_SHIFT) - 1) */
for (sft = 0; sft <= IA_CSS_CTC_COEF_SHIFT; sft++) {
int tmp_dydx = (dydx_int << sft)
- + (dydx_frc >> (frc_bits - sft));
+ + (dydx_frc >> (frc_bits - sft));
if (tmp_dydx <= max_dydx) {
*dydx = tmp_dydx;
*shift = sft;
void
ia_css_ctc_encode(
- struct sh_css_isp_ctc_params *to,
- const struct ia_css_ctc_config *from,
- unsigned int size)
+ struct sh_css_isp_ctc_params *to,
+ const struct ia_css_ctc_config *from,
+ unsigned int size)
{
(void)size;
to->y0 = from->y0;
void
ia_css_ctc_dump(
- const struct sh_css_isp_ctc_params *ctc,
- unsigned int level);
+ const struct sh_css_isp_ctc_params *ctc,
+ unsigned int level);
void
ia_css_ctc_encode(
- struct sh_css_isp_ctc_params *to,
- const struct ia_css_ctc_config *from,
- unsigned int size);
+ struct sh_css_isp_ctc_params *to,
+ const struct ia_css_ctc_config *from,
+ unsigned int size);
void
ia_css_ctc_dump(
- const struct sh_css_isp_ctc_params *ctc,
- unsigned int level);
+ const struct sh_css_isp_ctc_params *ctc,
+ unsigned int level);
#endif /* __IA_CSS_CTC1_5_HOST_H */
INEFFECTIVE_VAL, INEFFECTIVE_VAL, INEFFECTIVE_VAL,
BASIC_VAL * 2, BASIC_VAL * 4, BASIC_VAL * 6,
BASIC_VAL * 8, INEFFECTIVE_VAL, INEFFECTIVE_VAL,
- BASIC_VAL >> 1, BASIC_VAL};
+ BASIC_VAL >> 1, BASIC_VAL
+};
/* (dydx) = ctc2_slope(y1, y0, x1, x0)
* -----------------------------------------------
* 0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0
*/
dydx0 = ctc2_slope(from->y_y1, from->y_y0,
- from->y_x1, 0);
+ from->y_x1, 0);
dydx1 = ctc2_slope(from->y_y2, from->y_y1,
- from->y_x2, from->y_x1);
+ from->y_x2, from->y_x1);
dydx2 = ctc2_slope(from->y_y3, from->y_y2,
- from->y_x3, from->y_x2);
+ from->y_x3, from->y_x2);
dydx3 = ctc2_slope(from->y_y4, from->y_y3,
- from->y_x4, from->y_x3);
+ from->y_x4, from->y_x3);
dydx4 = ctc2_slope(from->y_y5, from->y_y4,
- SH_CSS_BAYER_MAXVAL, from->y_x4);
+ SH_CSS_BAYER_MAXVAL, from->y_x4);
/*Fill 3 arrays with:
* - Luma input gain values y_y0, y_y1, y_y2, y_3, y_y4
/*Slope Calculation*/
to->uv_dydx = ctc2_slope(from->uv_y1, from->uv_y0,
- from->uv_x1, from->uv_x0);
+ from->uv_x1, from->uv_x0);
}
*/
s32 uv_x0;
s32 uv_x1;
- };
+};
#endif /* __IA_CSS_CTC2_TYPES_H */
void
ia_css_ctc_vamem_encode(
- struct sh_css_isp_ctc_vamem_params *to,
- const struct ia_css_ctc_table *from,
- unsigned int size)
+ struct sh_css_isp_ctc_vamem_params *to,
+ const struct ia_css_ctc_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->ctc, &from->data, sizeof(to->ctc));
void
ia_css_ctc_debug_dtrace(
- const struct ia_css_ctc_config *config,
- unsigned int level)
+ const struct ia_css_ctc_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.ce_gain_exp=%d, config.y0=%d, config.x1=%d, config.y1=%d, config.x2=%d, config.y2=%d, config.x3=%d, config.y3=%d, config.x4=%d, config.y4=%d\n",
- config->ce_gain_exp, config->y0,
- config->x1, config->y1,
- config->x2, config->y2,
- config->x3, config->y3,
- config->x4, config->y4);
+ "config.ce_gain_exp=%d, config.y0=%d, config.x1=%d, config.y1=%d, config.x2=%d, config.y2=%d, config.x3=%d, config.y3=%d, config.x4=%d, config.y4=%d\n",
+ config->ce_gain_exp, config->y0,
+ config->x1, config->y1,
+ config->x2, config->y2,
+ config->x3, config->y3,
+ config->x4, config->y4);
}
void
ia_css_ctc_vamem_encode(
- struct sh_css_isp_ctc_vamem_params *to,
- const struct ia_css_ctc_table *from,
- unsigned int size);
+ struct sh_css_isp_ctc_vamem_params *to,
+ const struct ia_css_ctc_table *from,
+ unsigned int size);
void
ia_css_ctc_debug_dtrace(
- const struct ia_css_ctc_config *config, unsigned int level)
+ const struct ia_css_ctc_config *config, unsigned int level)
;
#endif /* __IA_CSS_CTC_HOST_H */
static const uint16_t
default_ctc_table_data[IA_CSS_VAMEM_2_CTC_TABLE_SIZE] = {
- 0, 384, 837, 957, 1011, 1062, 1083, 1080,
-1078, 1077, 1053, 1039, 1012, 992, 969, 951,
- 929, 906, 886, 866, 845, 823, 809, 790,
- 772, 758, 741, 726, 711, 701, 688, 675,
- 666, 656, 648, 639, 633, 626, 618, 612,
- 603, 594, 582, 572, 557, 545, 529, 516,
- 504, 491, 480, 467, 459, 447, 438, 429,
- 419, 412, 404, 397, 389, 382, 376, 368,
- 363, 357, 351, 345, 340, 336, 330, 326,
- 321, 318, 312, 308, 304, 300, 297, 294,
- 291, 286, 284, 281, 278, 275, 271, 268,
- 261, 257, 251, 245, 240, 235, 232, 225,
- 223, 218, 213, 209, 206, 204, 199, 197,
- 193, 189, 186, 185, 183, 179, 177, 175,
- 172, 170, 169, 167, 164, 164, 162, 160,
- 158, 157, 156, 154, 154, 152, 151, 150,
- 149, 148, 146, 147, 146, 144, 143, 143,
- 142, 141, 140, 141, 139, 138, 138, 138,
- 137, 136, 136, 135, 134, 134, 134, 133,
- 132, 132, 131, 130, 131, 130, 129, 128,
- 129, 127, 127, 127, 127, 125, 125, 125,
- 123, 123, 122, 120, 118, 115, 114, 111,
- 110, 108, 106, 105, 103, 102, 100, 99,
- 97, 97, 96, 95, 94, 93, 93, 91,
- 91, 91, 90, 90, 89, 89, 88, 88,
- 89, 88, 88, 87, 87, 87, 87, 86,
- 87, 87, 86, 87, 86, 86, 84, 84,
- 82, 80, 78, 76, 74, 72, 70, 68,
- 67, 65, 62, 60, 58, 56, 55, 54,
- 53, 51, 49, 49, 47, 45, 45, 45,
- 41, 40, 39, 39, 34, 33, 34, 32,
- 25, 23, 24, 20, 13, 9, 12, 0,
- 0
+ 0, 384, 837, 957, 1011, 1062, 1083, 1080,
+ 1078, 1077, 1053, 1039, 1012, 992, 969, 951,
+ 929, 906, 886, 866, 845, 823, 809, 790,
+ 772, 758, 741, 726, 711, 701, 688, 675,
+ 666, 656, 648, 639, 633, 626, 618, 612,
+ 603, 594, 582, 572, 557, 545, 529, 516,
+ 504, 491, 480, 467, 459, 447, 438, 429,
+ 419, 412, 404, 397, 389, 382, 376, 368,
+ 363, 357, 351, 345, 340, 336, 330, 326,
+ 321, 318, 312, 308, 304, 300, 297, 294,
+ 291, 286, 284, 281, 278, 275, 271, 268,
+ 261, 257, 251, 245, 240, 235, 232, 225,
+ 223, 218, 213, 209, 206, 204, 199, 197,
+ 193, 189, 186, 185, 183, 179, 177, 175,
+ 172, 170, 169, 167, 164, 164, 162, 160,
+ 158, 157, 156, 154, 154, 152, 151, 150,
+ 149, 148, 146, 147, 146, 144, 143, 143,
+ 142, 141, 140, 141, 139, 138, 138, 138,
+ 137, 136, 136, 135, 134, 134, 134, 133,
+ 132, 132, 131, 130, 131, 130, 129, 128,
+ 129, 127, 127, 127, 127, 125, 125, 125,
+ 123, 123, 122, 120, 118, 115, 114, 111,
+ 110, 108, 106, 105, 103, 102, 100, 99,
+ 97, 97, 96, 95, 94, 93, 93, 91,
+ 91, 91, 90, 90, 89, 89, 88, 88,
+ 89, 88, 88, 87, 87, 87, 87, 86,
+ 87, 87, 86, 87, 86, 86, 84, 84,
+ 82, 80, 78, 76, 74, 72, 70, 68,
+ 67, 65, 62, 60, 58, 56, 55, 54,
+ 53, 51, 49, 49, 47, 45, 45, 45,
+ 41, 40, 39, 39, 34, 33, 34, 32,
+ 25, 23, 24, 20, 13, 9, 12, 0,
+ 0
};
#elif defined(HAS_VAMEM_VERSION_1)
/* Default Parameters */
static const uint16_t
default_ctc_table_data[IA_CSS_VAMEM_1_CTC_TABLE_SIZE] = {
- 0, 0, 256, 384, 384, 497, 765, 806,
- 837, 851, 888, 901, 957, 981, 993, 1001,
- 1011, 1029, 1028, 1039, 1062, 1059, 1073, 1080,
- 1083, 1085, 1085, 1098, 1080, 1084, 1085, 1093,
- 1078, 1073, 1070, 1069, 1077, 1066, 1072, 1063,
- 1053, 1044, 1046, 1053, 1039, 1028, 1025, 1024,
- 1012, 1013, 1016, 996, 992, 990, 990, 980,
- 969, 968, 961, 955, 951, 949, 933, 930,
- 929, 925, 921, 916, 906, 901, 895, 893,
- 886, 877, 872, 869, 866, 861, 857, 849,
- 845, 838, 836, 832, 823, 821, 815, 813,
- 809, 805, 796, 793, 790, 785, 784, 778,
- 772, 768, 766, 763, 758, 752, 749, 745,
- 741, 740, 736, 730, 726, 724, 723, 718,
- 711, 709, 706, 704, 701, 698, 691, 689,
- 688, 683, 683, 678, 675, 673, 671, 669,
- 666, 663, 661, 660, 656, 656, 653, 650,
- 648, 647, 646, 643, 639, 638, 637, 635,
- 633, 632, 629, 627, 626, 625, 622, 621,
- 618, 618, 614, 614, 612, 609, 606, 606,
- 603, 600, 600, 597, 594, 591, 590, 586,
- 582, 581, 578, 575, 572, 569, 563, 560,
- 557, 554, 551, 548, 545, 539, 536, 533,
- 529, 527, 524, 519, 516, 513, 510, 507,
- 504, 501, 498, 493, 491, 488, 485, 484,
- 480, 476, 474, 471, 467, 466, 464, 460,
- 459, 455, 453, 449, 447, 446, 443, 441,
- 438, 435, 432, 432, 429, 427, 426, 422,
- 419, 418, 416, 414, 412, 410, 408, 406,
- 404, 402, 401, 398, 397, 395, 393, 390,
- 389, 388, 387, 384, 382, 380, 378, 377,
- 376, 375, 372, 370, 368, 368, 366, 364,
- 363, 361, 360, 358, 357, 355, 354, 352,
- 351, 350, 349, 346, 345, 344, 344, 342,
- 340, 339, 337, 337, 336, 335, 333, 331,
- 330, 329, 328, 326, 326, 324, 324, 322,
- 321, 320, 318, 318, 318, 317, 315, 313,
- 312, 311, 311, 310, 308, 307, 306, 306,
- 304, 304, 302, 301, 300, 300, 299, 297,
- 297, 296, 296, 294, 294, 292, 291, 291,
- 291, 290, 288, 287, 286, 286, 287, 285,
- 284, 283, 282, 282, 281, 281, 279, 278,
- 278, 278, 276, 276, 275, 274, 274, 273,
- 271, 270, 269, 268, 268, 267, 265, 262,
- 261, 260, 260, 259, 257, 254, 252, 252,
- 251, 251, 249, 246, 245, 244, 243, 242,
- 240, 239, 239, 237, 235, 235, 233, 231,
- 232, 230, 229, 226, 225, 224, 225, 224,
- 223, 220, 219, 219, 218, 217, 217, 214,
- 213, 213, 212, 211, 209, 209, 209, 208,
- 206, 205, 204, 203, 204, 203, 201, 200,
- 199, 197, 198, 198, 197, 195, 194, 194,
- 193, 192, 192, 191, 189, 190, 189, 188,
- 186, 187, 186, 185, 185, 184, 183, 181,
- 183, 182, 181, 180, 179, 178, 178, 178,
- 177, 176, 175, 176, 175, 174, 174, 173,
- 172, 173, 172, 171, 170, 170, 169, 169,
- 169, 168, 167, 166, 167, 167, 166, 165,
- 164, 164, 164, 163, 164, 163, 162, 163,
- 162, 161, 160, 161, 160, 160, 160, 159,
- 158, 157, 158, 158, 157, 157, 156, 156,
- 156, 156, 155, 155, 154, 154, 154, 154,
- 154, 153, 152, 153, 152, 152, 151, 152,
- 151, 152, 151, 150, 150, 149, 149, 150,
- 149, 149, 148, 148, 148, 149, 148, 147,
- 146, 146, 147, 146, 147, 146, 145, 146,
- 146, 145, 144, 145, 144, 145, 144, 144,
- 143, 143, 143, 144, 143, 142, 142, 142,
- 142, 142, 142, 141, 141, 141, 141, 140,
- 140, 141, 140, 140, 141, 140, 139, 139,
- 139, 140, 139, 139, 138, 138, 137, 139,
- 138, 138, 138, 137, 138, 137, 137, 137,
- 137, 136, 137, 136, 136, 136, 136, 135,
- 136, 135, 135, 135, 135, 136, 135, 135,
- 134, 134, 133, 135, 134, 134, 134, 133,
- 134, 133, 134, 133, 133, 132, 133, 133,
- 132, 133, 132, 132, 132, 132, 131, 131,
- 131, 132, 131, 131, 130, 131, 130, 132,
- 131, 130, 130, 129, 130, 129, 130, 129,
- 129, 129, 130, 129, 128, 128, 128, 128,
- 129, 128, 128, 127, 127, 128, 128, 127,
- 127, 126, 126, 127, 127, 126, 126, 126,
- 127, 126, 126, 126, 125, 125, 126, 125,
- 125, 124, 124, 124, 125, 125, 124, 124,
- 123, 124, 124, 123, 123, 122, 122, 122,
- 122, 122, 121, 120, 120, 119, 118, 118,
- 118, 117, 117, 116, 115, 115, 115, 114,
- 114, 113, 113, 112, 111, 111, 111, 110,
- 110, 109, 109, 108, 108, 108, 107, 107,
- 106, 106, 105, 105, 105, 104, 104, 103,
- 103, 102, 102, 102, 102, 101, 101, 100,
- 100, 99, 99, 99, 99, 99, 99, 98,
- 97, 98, 97, 97, 97, 96, 96, 95,
- 96, 95, 96, 95, 95, 94, 94, 95,
- 94, 94, 94, 93, 93, 92, 93, 93,
- 93, 93, 92, 92, 91, 92, 92, 92,
- 91, 91, 90, 90, 91, 91, 91, 90,
- 90, 90, 90, 91, 90, 90, 90, 89,
- 89, 89, 90, 89, 89, 89, 89, 89,
- 88, 89, 89, 88, 88, 88, 88, 87,
- 89, 88, 88, 88, 88, 88, 87, 88,
- 88, 88, 87, 87, 87, 87, 87, 88,
- 87, 87, 87, 87, 87, 87, 88, 87,
- 87, 87, 87, 86, 86, 87, 87, 87,
- 87, 86, 86, 86, 87, 87, 86, 87,
- 86, 86, 86, 87, 87, 86, 86, 86,
- 86, 86, 87, 87, 86, 85, 85, 85,
- 84, 85, 85, 84, 84, 83, 83, 82,
- 82, 82, 81, 81, 80, 79, 79, 79,
- 78, 77, 77, 76, 76, 76, 75, 74,
- 74, 74, 73, 73, 72, 71, 71, 71,
- 70, 70, 69, 69, 68, 68, 67, 67,
- 67, 66, 66, 65, 65, 64, 64, 63,
- 62, 62, 62, 61, 60, 60, 59, 59,
- 58, 58, 57, 57, 56, 56, 56, 55,
- 55, 54, 55, 55, 54, 53, 53, 52,
- 53, 53, 52, 51, 51, 50, 51, 50,
- 49, 49, 50, 49, 49, 48, 48, 47,
- 47, 48, 46, 45, 45, 45, 46, 45,
- 45, 44, 45, 45, 45, 43, 42, 42,
- 41, 43, 41, 40, 40, 39, 40, 41,
- 39, 39, 39, 39, 39, 38, 35, 35,
- 34, 37, 36, 34, 33, 33, 33, 35,
- 34, 32, 32, 31, 32, 30, 29, 26,
- 25, 25, 27, 26, 23, 23, 23, 25,
- 24, 24, 22, 21, 20, 19, 16, 14,
- 13, 13, 13, 10, 9, 7, 7, 7,
- 12, 12, 12, 7, 0, 0, 0, 0
+ 0, 0, 256, 384, 384, 497, 765, 806,
+ 837, 851, 888, 901, 957, 981, 993, 1001,
+ 1011, 1029, 1028, 1039, 1062, 1059, 1073, 1080,
+ 1083, 1085, 1085, 1098, 1080, 1084, 1085, 1093,
+ 1078, 1073, 1070, 1069, 1077, 1066, 1072, 1063,
+ 1053, 1044, 1046, 1053, 1039, 1028, 1025, 1024,
+ 1012, 1013, 1016, 996, 992, 990, 990, 980,
+ 969, 968, 961, 955, 951, 949, 933, 930,
+ 929, 925, 921, 916, 906, 901, 895, 893,
+ 886, 877, 872, 869, 866, 861, 857, 849,
+ 845, 838, 836, 832, 823, 821, 815, 813,
+ 809, 805, 796, 793, 790, 785, 784, 778,
+ 772, 768, 766, 763, 758, 752, 749, 745,
+ 741, 740, 736, 730, 726, 724, 723, 718,
+ 711, 709, 706, 704, 701, 698, 691, 689,
+ 688, 683, 683, 678, 675, 673, 671, 669,
+ 666, 663, 661, 660, 656, 656, 653, 650,
+ 648, 647, 646, 643, 639, 638, 637, 635,
+ 633, 632, 629, 627, 626, 625, 622, 621,
+ 618, 618, 614, 614, 612, 609, 606, 606,
+ 603, 600, 600, 597, 594, 591, 590, 586,
+ 582, 581, 578, 575, 572, 569, 563, 560,
+ 557, 554, 551, 548, 545, 539, 536, 533,
+ 529, 527, 524, 519, 516, 513, 510, 507,
+ 504, 501, 498, 493, 491, 488, 485, 484,
+ 480, 476, 474, 471, 467, 466, 464, 460,
+ 459, 455, 453, 449, 447, 446, 443, 441,
+ 438, 435, 432, 432, 429, 427, 426, 422,
+ 419, 418, 416, 414, 412, 410, 408, 406,
+ 404, 402, 401, 398, 397, 395, 393, 390,
+ 389, 388, 387, 384, 382, 380, 378, 377,
+ 376, 375, 372, 370, 368, 368, 366, 364,
+ 363, 361, 360, 358, 357, 355, 354, 352,
+ 351, 350, 349, 346, 345, 344, 344, 342,
+ 340, 339, 337, 337, 336, 335, 333, 331,
+ 330, 329, 328, 326, 326, 324, 324, 322,
+ 321, 320, 318, 318, 318, 317, 315, 313,
+ 312, 311, 311, 310, 308, 307, 306, 306,
+ 304, 304, 302, 301, 300, 300, 299, 297,
+ 297, 296, 296, 294, 294, 292, 291, 291,
+ 291, 290, 288, 287, 286, 286, 287, 285,
+ 284, 283, 282, 282, 281, 281, 279, 278,
+ 278, 278, 276, 276, 275, 274, 274, 273,
+ 271, 270, 269, 268, 268, 267, 265, 262,
+ 261, 260, 260, 259, 257, 254, 252, 252,
+ 251, 251, 249, 246, 245, 244, 243, 242,
+ 240, 239, 239, 237, 235, 235, 233, 231,
+ 232, 230, 229, 226, 225, 224, 225, 224,
+ 223, 220, 219, 219, 218, 217, 217, 214,
+ 213, 213, 212, 211, 209, 209, 209, 208,
+ 206, 205, 204, 203, 204, 203, 201, 200,
+ 199, 197, 198, 198, 197, 195, 194, 194,
+ 193, 192, 192, 191, 189, 190, 189, 188,
+ 186, 187, 186, 185, 185, 184, 183, 181,
+ 183, 182, 181, 180, 179, 178, 178, 178,
+ 177, 176, 175, 176, 175, 174, 174, 173,
+ 172, 173, 172, 171, 170, 170, 169, 169,
+ 169, 168, 167, 166, 167, 167, 166, 165,
+ 164, 164, 164, 163, 164, 163, 162, 163,
+ 162, 161, 160, 161, 160, 160, 160, 159,
+ 158, 157, 158, 158, 157, 157, 156, 156,
+ 156, 156, 155, 155, 154, 154, 154, 154,
+ 154, 153, 152, 153, 152, 152, 151, 152,
+ 151, 152, 151, 150, 150, 149, 149, 150,
+ 149, 149, 148, 148, 148, 149, 148, 147,
+ 146, 146, 147, 146, 147, 146, 145, 146,
+ 146, 145, 144, 145, 144, 145, 144, 144,
+ 143, 143, 143, 144, 143, 142, 142, 142,
+ 142, 142, 142, 141, 141, 141, 141, 140,
+ 140, 141, 140, 140, 141, 140, 139, 139,
+ 139, 140, 139, 139, 138, 138, 137, 139,
+ 138, 138, 138, 137, 138, 137, 137, 137,
+ 137, 136, 137, 136, 136, 136, 136, 135,
+ 136, 135, 135, 135, 135, 136, 135, 135,
+ 134, 134, 133, 135, 134, 134, 134, 133,
+ 134, 133, 134, 133, 133, 132, 133, 133,
+ 132, 133, 132, 132, 132, 132, 131, 131,
+ 131, 132, 131, 131, 130, 131, 130, 132,
+ 131, 130, 130, 129, 130, 129, 130, 129,
+ 129, 129, 130, 129, 128, 128, 128, 128,
+ 129, 128, 128, 127, 127, 128, 128, 127,
+ 127, 126, 126, 127, 127, 126, 126, 126,
+ 127, 126, 126, 126, 125, 125, 126, 125,
+ 125, 124, 124, 124, 125, 125, 124, 124,
+ 123, 124, 124, 123, 123, 122, 122, 122,
+ 122, 122, 121, 120, 120, 119, 118, 118,
+ 118, 117, 117, 116, 115, 115, 115, 114,
+ 114, 113, 113, 112, 111, 111, 111, 110,
+ 110, 109, 109, 108, 108, 108, 107, 107,
+ 106, 106, 105, 105, 105, 104, 104, 103,
+ 103, 102, 102, 102, 102, 101, 101, 100,
+ 100, 99, 99, 99, 99, 99, 99, 98,
+ 97, 98, 97, 97, 97, 96, 96, 95,
+ 96, 95, 96, 95, 95, 94, 94, 95,
+ 94, 94, 94, 93, 93, 92, 93, 93,
+ 93, 93, 92, 92, 91, 92, 92, 92,
+ 91, 91, 90, 90, 91, 91, 91, 90,
+ 90, 90, 90, 91, 90, 90, 90, 89,
+ 89, 89, 90, 89, 89, 89, 89, 89,
+ 88, 89, 89, 88, 88, 88, 88, 87,
+ 89, 88, 88, 88, 88, 88, 87, 88,
+ 88, 88, 87, 87, 87, 87, 87, 88,
+ 87, 87, 87, 87, 87, 87, 88, 87,
+ 87, 87, 87, 86, 86, 87, 87, 87,
+ 87, 86, 86, 86, 87, 87, 86, 87,
+ 86, 86, 86, 87, 87, 86, 86, 86,
+ 86, 86, 87, 87, 86, 85, 85, 85,
+ 84, 85, 85, 84, 84, 83, 83, 82,
+ 82, 82, 81, 81, 80, 79, 79, 79,
+ 78, 77, 77, 76, 76, 76, 75, 74,
+ 74, 74, 73, 73, 72, 71, 71, 71,
+ 70, 70, 69, 69, 68, 68, 67, 67,
+ 67, 66, 66, 65, 65, 64, 64, 63,
+ 62, 62, 62, 61, 60, 60, 59, 59,
+ 58, 58, 57, 57, 56, 56, 56, 55,
+ 55, 54, 55, 55, 54, 53, 53, 52,
+ 53, 53, 52, 51, 51, 50, 51, 50,
+ 49, 49, 50, 49, 49, 48, 48, 47,
+ 47, 48, 46, 45, 45, 45, 46, 45,
+ 45, 44, 45, 45, 45, 43, 42, 42,
+ 41, 43, 41, 40, 40, 39, 40, 41,
+ 39, 39, 39, 39, 39, 38, 35, 35,
+ 34, 37, 36, 34, 33, 33, 33, 35,
+ 34, 32, 32, 31, 32, 30, 29, 26,
+ 25, 25, 27, 26, 23, 23, 23, 25,
+ 24, 24, 22, 21, 20, 19, 16, 14,
+ 13, 13, 13, 10, 9, 7, 7, 7,
+ 12, 12, 12, 7, 0, 0, 0, 0
};
#else
void
ia_css_de_encode(
- struct sh_css_isp_de_params *to,
- const struct ia_css_de_config *from,
- unsigned int size)
+ struct sh_css_isp_de_params *to,
+ const struct ia_css_de_config *from,
+ unsigned int size)
{
(void)size;
to->pixelnoise =
void
ia_css_de_dump(
- const struct sh_css_isp_de_params *de,
- unsigned int level)
+ const struct sh_css_isp_de_params *de,
+ unsigned int level)
{
if (!de) return;
ia_css_debug_dtrace(level, "Demosaic:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "de_pixelnoise", de->pixelnoise);
+ "de_pixelnoise", de->pixelnoise);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "de_c1_coring_threshold",
- de->c1_coring_threshold);
+ "de_c1_coring_threshold",
+ de->c1_coring_threshold);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "de_c2_coring_threshold",
- de->c2_coring_threshold);
+ "de_c2_coring_threshold",
+ de->c2_coring_threshold);
}
void
ia_css_de_debug_dtrace(
- const struct ia_css_de_config *config,
- unsigned int level)
+ const struct ia_css_de_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.pixelnoise=%d, config.c1_coring_threshold=%d, config.c2_coring_threshold=%d\n",
- config->pixelnoise,
- config->c1_coring_threshold, config->c2_coring_threshold);
+ "config.pixelnoise=%d, config.c1_coring_threshold=%d, config.c2_coring_threshold=%d\n",
+ config->pixelnoise,
+ config->c1_coring_threshold, config->c2_coring_threshold);
}
void
ia_css_init_de_state(
- void/*struct sh_css_isp_de_vmem_state*/ * state,
- size_t size)
+ void/*struct sh_css_isp_de_vmem_state*/ * state,
+ size_t size)
{
memset(state, 0, size);
}
void
ia_css_de_encode(
- struct sh_css_isp_de_params *to,
- const struct ia_css_de_config *from,
- unsigned int size);
+ struct sh_css_isp_de_params *to,
+ const struct ia_css_de_config *from,
+ unsigned int size);
void
ia_css_de_dump(
- const struct sh_css_isp_de_params *de,
- unsigned int level);
+ const struct sh_css_isp_de_params *de,
+ unsigned int level);
void
ia_css_de_debug_dtrace(
- const struct ia_css_de_config *config,
- unsigned int level);
+ const struct ia_css_de_config *config,
+ unsigned int level);
void
ia_css_init_de_state(
- void/*struct sh_css_isp_de_vmem_state*/ * state,
- size_t size);
+ void/*struct sh_css_isp_de_vmem_state*/ * state,
+ size_t size);
#endif /* __IA_CSS_DE_HOST_H */
/* DE (Demosaic) */
struct sh_css_isp_de_vmem_state {
- VMEM_ARRAY(de_buf[4], MAX_VECTORS_PER_BUF_LINE * ISP_NWAY);
+ VMEM_ARRAY(de_buf[4], MAX_VECTORS_PER_BUF_LINE *ISP_NWAY);
};
#endif /* __IA_CSS_DE_STATE_H */
void
ia_css_ecd_encode(
- struct sh_css_isp_ecd_params *to,
- const struct ia_css_ecd_config *from,
- unsigned int size)
+ struct sh_css_isp_ecd_params *to,
+ const struct ia_css_ecd_config *from,
+ unsigned int size)
{
(void)size;
to->zip_strength = from->zip_strength;
void
ia_css_ecd_dump(
- const struct sh_css_isp_ecd_params *ecd,
- unsigned int level);
+ const struct sh_css_isp_ecd_params *ecd,
+ unsigned int level);
void
ia_css_ecd_debug_dtrace(
- const struct ia_css_ecd_config *config,
- unsigned int level)
+ const struct ia_css_ecd_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
- config->zip_strength,
- config->fc_strength, config->fc_debias);
+ "config.zip_strength=%d, config.fc_strength=%d, config.fc_debias=%d\n",
+ config->zip_strength,
+ config->fc_strength, config->fc_debias);
}
void
ia_css_ecd_encode(
- struct sh_css_isp_ecd_params *to,
- const struct ia_css_ecd_config *from,
- unsigned int size);
+ struct sh_css_isp_ecd_params *to,
+ const struct ia_css_ecd_config *from,
+ unsigned int size);
void
ia_css_ecd_dump(
- const struct sh_css_isp_ecd_params *ecd,
- unsigned int level);
+ const struct sh_css_isp_ecd_params *ecd,
+ unsigned int level);
void
ia_css_ecd_debug_dtrace(
- const struct ia_css_ecd_config *config, unsigned int level);
+ const struct ia_css_ecd_config *config, unsigned int level);
#endif /* __IA_CSS_DE2_HOST_H */
void
ia_css_dp_encode(
- struct sh_css_isp_dp_params *to,
- const struct ia_css_dp_config *from,
- unsigned int size)
+ struct sh_css_isp_dp_params *to,
+ const struct ia_css_dp_config *from,
+ unsigned int size)
{
int gain = from->gain;
int gr = from->gr;
void
ia_css_dp_dump(
- const struct sh_css_isp_dp_params *dp,
- unsigned int level)
+ const struct sh_css_isp_dp_params *dp,
+ unsigned int level)
{
if (!dp) return;
ia_css_debug_dtrace(level, "Defect Pixel Correction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dp_threshold_single_w_2adj_on",
- dp->threshold_single);
+ "dp_threshold_single_w_2adj_on",
+ dp->threshold_single);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dp_threshold_2adj_w_2adj_on",
- dp->threshold_2adjacent);
+ "dp_threshold_2adj_w_2adj_on",
+ dp->threshold_2adjacent);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dp_gain", dp->gain);
+ "dp_gain", dp->gain);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_rr_gr", dp->coef_rr_gr);
+ "dpc_coef_rr_gr", dp->coef_rr_gr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_rr_gb", dp->coef_rr_gb);
+ "dpc_coef_rr_gb", dp->coef_rr_gb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_bb_gb", dp->coef_bb_gb);
+ "dpc_coef_bb_gb", dp->coef_bb_gb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_bb_gr", dp->coef_bb_gr);
+ "dpc_coef_bb_gr", dp->coef_bb_gr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_gr_rr", dp->coef_gr_rr);
+ "dpc_coef_gr_rr", dp->coef_gr_rr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_gr_bb", dp->coef_gr_bb);
+ "dpc_coef_gr_bb", dp->coef_gr_bb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_gb_bb", dp->coef_gb_bb);
+ "dpc_coef_gb_bb", dp->coef_gb_bb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "dpc_coef_gb_rr", dp->coef_gb_rr);
+ "dpc_coef_gb_rr", dp->coef_gb_rr);
}
void
ia_css_dp_debug_dtrace(
- const struct ia_css_dp_config *config,
- unsigned int level)
+ const struct ia_css_dp_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.threshold=%d, config.gain=%d\n",
- config->threshold, config->gain);
+ "config.threshold=%d, config.gain=%d\n",
+ config->threshold, config->gain);
}
void
ia_css_init_dp_state(
- void/*struct sh_css_isp_dp_vmem_state*/ * state,
- size_t size)
+ void/*struct sh_css_isp_dp_vmem_state*/ * state,
+ size_t size)
{
memset(state, 0, size);
}
void
ia_css_dp_encode(
- struct sh_css_isp_dp_params *to,
- const struct ia_css_dp_config *from,
- unsigned int size);
+ struct sh_css_isp_dp_params *to,
+ const struct ia_css_dp_config *from,
+ unsigned int size);
void
ia_css_dp_dump(
- const struct sh_css_isp_dp_params *dp,
- unsigned int level);
+ const struct sh_css_isp_dp_params *dp,
+ unsigned int level);
void
ia_css_dp_debug_dtrace(
- const struct ia_css_dp_config *config,
- unsigned int level);
+ const struct ia_css_dp_config *config,
+ unsigned int level);
void
ia_css_init_dp_state(
- void/*struct sh_css_isp_dp_vmem_state*/ * state,
- size_t size);
+ void/*struct sh_css_isp_dp_vmem_state*/ * state,
+ size_t size);
#endif /* __IA_CSS_DP_HOST_H */
void
ia_css_dpc2_encode(
- struct ia_css_isp_dpc2_params *to,
- const struct ia_css_dpc2_config *from,
- size_t size)
+ struct ia_css_isp_dpc2_params *to,
+ const struct ia_css_dpc2_config *from,
+ size_t size)
{
(void)size;
assert((from->metric1 >= 0) && (from->metric1 <= METRIC1_ONE_FP));
assert((from->metric3 >= 0) && (from->metric3 <= METRIC3_ONE_FP));
assert((from->metric2 >= METRIC2_ONE_FP) &&
- (from->metric2 < 256 * METRIC2_ONE_FP));
+ (from->metric2 < 256 * METRIC2_ONE_FP));
assert((from->wb_gain_gr > 0) && (from->wb_gain_gr < 16 * WBGAIN_ONE_FP));
assert((from->wb_gain_r > 0) && (from->wb_gain_r < 16 * WBGAIN_ONE_FP));
assert((from->wb_gain_b > 0) && (from->wb_gain_b < 16 * WBGAIN_ONE_FP));
/* TODO: AM: This needs a proper implementation. */
void
ia_css_init_dpc2_state(
- void *state,
- size_t size)
+ void *state,
+ size_t size)
{
(void)state;
(void)size;
/* TODO: AM: This needs a proper implementation. */
void
ia_css_dpc2_debug_dtrace(
- const struct ia_css_dpc2_config *config,
- unsigned int level)
+ const struct ia_css_dpc2_config *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_dpc2_encode(
- struct ia_css_isp_dpc2_params *to,
- const struct ia_css_dpc2_config *from,
- size_t size);
+ struct ia_css_isp_dpc2_params *to,
+ const struct ia_css_dpc2_config *from,
+ size_t size);
void
ia_css_init_dpc2_state(
- void *state,
- size_t size);
+ void *state,
+ size_t size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_dpc2_debug_dtrace(
- const struct ia_css_dpc2_config *config,
- unsigned int level);
+ const struct ia_css_dpc2_config *config,
+ unsigned int level);
#endif
#endif /* __IA_CSS_DPC2_HOST_H */
void
ia_css_dvs_config(
- struct sh_css_isp_dvs_isp_config *to,
- const struct ia_css_dvs_configuration *from,
- unsigned int size)
+ struct sh_css_isp_dvs_isp_config *to,
+ const struct ia_css_dvs_configuration *from,
+ unsigned int size)
{
(void)size;
to->num_horizontal_blocks =
void
ia_css_dvs_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
struct ia_css_dvs_configuration config = default_config;
static void
convert_coords_to_ispparams(
- struct ia_css_host_data *gdc_warp_table,
- const struct ia_css_dvs_6axis_config *config,
- unsigned int i_stride,
- unsigned int o_width,
- unsigned int o_height,
- unsigned int uv_flag)
+ struct ia_css_host_data *gdc_warp_table,
+ const struct ia_css_dvs_6axis_config *config,
+ unsigned int i_stride,
+ unsigned int o_width,
+ unsigned int o_height,
+ unsigned int uv_flag)
{
unsigned int i, j;
#ifndef ISP2401
#endif
gdc_warp_param_mem_t s = { 0 };
unsigned int x00, x01, x10, x11,
- y00, y01, y10, y11;
+ y00, y01, y10, y11;
unsigned int xmin, ymin, xmax, ymax;
unsigned int topleft_x, topleft_y, bottom_x, bottom_y,
- topleft_x_frac, topleft_y_frac;
+ topleft_x_frac, topleft_y_frac;
unsigned int dvs_interp_envelope = (DVS_GDC_INTERP_METHOD == HRT_GDC_BLI_MODE ?
- DVS_GDC_BLI_INTERP_ENVELOPE : DVS_GDC_BCI_INTERP_ENVELOPE);
+ DVS_GDC_BLI_INTERP_ENVELOPE : DVS_GDC_BCI_INTERP_ENVELOPE);
/* number of blocks per height and width */
- unsigned int num_blocks_y = (uv_flag ? DVS_NUM_BLOCKS_Y_CHROMA(o_height) : DVS_NUM_BLOCKS_Y(o_height));
- unsigned int num_blocks_x = (uv_flag ? DVS_NUM_BLOCKS_X_CHROMA(o_width) : DVS_NUM_BLOCKS_X(o_width)); // round num_x up to blockdim_x, if it concerns the Y0Y1 block (uv_flag==0) round up to even
+ unsigned int num_blocks_y = (uv_flag ? DVS_NUM_BLOCKS_Y_CHROMA(
+ o_height) : DVS_NUM_BLOCKS_Y(o_height));
+ unsigned int num_blocks_x = (uv_flag ? DVS_NUM_BLOCKS_X_CHROMA(
+ o_width) : DVS_NUM_BLOCKS_X(
+ o_width)); // round num_x up to blockdim_x, if it concerns the Y0Y1 block (uv_flag==0) round up to even
unsigned int in_stride = i_stride * DVS_INPUT_BYTES_PER_PIXEL;
unsigned int width, height;
ptr += (2 * uv_flag); /* format is Y0 Y1 UV, so UV starts at 3rd position */
- if (uv_flag == 0)
- {
+ if (uv_flag == 0) {
xbuff = config->xcoords_y;
ybuff = config->ycoords_y;
width = config->width_y;
height = config->height_y;
- } else
- {
+ } else {
xbuff = config->xcoords_uv;
ybuff = config->ycoords_uv;
width = config->width_uv;
IA_CSS_LOG("num_blocks_x %d num_blocks_y %d", num_blocks_x, num_blocks_y);
IA_CSS_LOG("width %d height %d", width, height);
- assert(width == num_blocks_x + 1); // the width and height of the provided morphing table should be 1 more than the number of blocks
+ assert(width == num_blocks_x +
+ 1); // the width and height of the provided morphing table should be 1 more than the number of blocks
assert(height == num_blocks_y + 1);
for (j = 0; j < num_blocks_y; j++) {
topleft_y = ymin >> DVS_COORD_FRAC_BITS;
topleft_x = ((xmin >> DVS_COORD_FRAC_BITS)
- >> XMEM_ALIGN_LOG2)
- << (XMEM_ALIGN_LOG2);
+ >> XMEM_ALIGN_LOG2)
+ << (XMEM_ALIGN_LOG2);
s.in_addr_offset = topleft_y * in_stride + topleft_x;
/* similar to topleft_y calculation, but round up if ymax
struct ia_css_host_data *
convert_allocate_dvs_6axis_config(
- const struct ia_css_dvs_6axis_config *dvs_6axis_config,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *dvs_in_frame_info)
+ const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *dvs_in_frame_info)
{
unsigned int i_stride;
unsigned int o_width;
/*DVS only supports input frame of YUV420 or NV12. Fail for all other cases*/
assert((dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_NV12)
- || (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420));
+ || (dvs_in_frame_info->format == IA_CSS_FRAME_FORMAT_YUV420));
isp_data_ptr = (struct gdc_warp_param_mem_s *)me->address;
enum ia_css_err
store_dvs_6axis_config(
- const struct ia_css_dvs_6axis_config *dvs_6axis_config,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *dvs_in_frame_info,
- hrt_vaddress ddr_addr_y)
-{
+ const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *dvs_in_frame_info,
+ hrt_vaddress ddr_addr_y) {
struct ia_css_host_data *me;
assert(dvs_6axis_config);
assert(dvs_in_frame_info);
me = convert_allocate_dvs_6axis_config(dvs_6axis_config,
- binary,
- dvs_in_frame_info);
+ binary,
+ dvs_in_frame_info);
- if (!me) {
+ if (!me)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
ia_css_params_store_ia_css_host_data(
- ddr_addr_y,
- me);
+ ddr_addr_y,
+ me);
ia_css_host_data_free(me);
return IA_CSS_SUCCESS;
void
ia_css_dvs_config(
- struct sh_css_isp_dvs_isp_config *to,
- const struct ia_css_dvs_configuration *from,
- unsigned int size);
+ struct sh_css_isp_dvs_isp_config *to,
+ const struct ia_css_dvs_configuration *from,
+ unsigned int size);
void
ia_css_dvs_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
void
convert_dvs_6axis_config(
- struct ia_css_isp_parameters *params,
- const struct ia_css_binary *binary);
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_binary *binary);
struct ia_css_host_data *
convert_allocate_dvs_6axis_config(
- const struct ia_css_dvs_6axis_config *dvs_6axis_config,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *dvs_in_frame_info);
+ const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *dvs_in_frame_info);
enum ia_css_err
store_dvs_6axis_config(
- const struct ia_css_dvs_6axis_config *dvs_6axis_config,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *dvs_in_frame_info,
- hrt_vaddress ddr_addr_y);
+ const struct ia_css_dvs_6axis_config *dvs_6axis_config,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *dvs_in_frame_info,
+ hrt_vaddress ddr_addr_y);
#endif /* __IA_CSS_DVS_HOST_H */
#define NUMBER_OF_FCINV_POINTS 9
static const s16 chgrinv_x[NUMBER_OF_CHGRINV_POINTS] = {
-0, 16, 64, 144, 272, 448, 672, 976,
-1376, 1888, 2528, 3312, 4256, 5376, 6688};
+ 0, 16, 64, 144, 272, 448, 672, 976,
+ 1376, 1888, 2528, 3312, 4256, 5376, 6688
+};
static const s16 chgrinv_a[NUMBER_OF_CHGRINV_POINTS] = {
--7171, -256, -29, -3456, -1071, -475, -189, -102,
--48, -38, -10, -9, -7, -6, 0};
+ -7171, -256, -29, -3456, -1071, -475, -189, -102,
+ -48, -38, -10, -9, -7, -6, 0
+ };
static const s16 chgrinv_b[NUMBER_OF_CHGRINV_POINTS] = {
-8191, 1021, 256, 114, 60, 37, 24, 17,
-12, 9, 6, 5, 4, 3, 2};
+ 8191, 1021, 256, 114, 60, 37, 24, 17,
+ 12, 9, 6, 5, 4, 3, 2
+};
static const s16 chgrinv_c[NUMBER_OF_CHGRINV_POINTS] = {
-1, 1, 1, 0, 0, 0, 0, 0,
-0, 0, 0, 0, 0, 0, 0};
+ 1, 1, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0
+};
static const s16 tcinv_x[NUMBER_OF_TCINV_POINTS] = {
-0, 4, 11, 23, 42, 68, 102, 148, 205};
+ 0, 4, 11, 23, 42, 68, 102, 148, 205
+};
static const s16 tcinv_a[NUMBER_OF_TCINV_POINTS] = {
--6364, -631, -126, -34, -13, -6, -4452, -2156, 0};
+ -6364, -631, -126, -34, -13, -6, -4452, -2156, 0
+ };
static const s16 tcinv_b[NUMBER_OF_TCINV_POINTS] = {
-8191, 1828, 726, 352, 197, 121, 80, 55, 40};
+ 8191, 1828, 726, 352, 197, 121, 80, 55, 40
+};
static const s16 tcinv_c[NUMBER_OF_TCINV_POINTS] = {
-1, 1, 1, 1, 1, 1, 0, 0, 0};
+ 1, 1, 1, 1, 1, 1, 0, 0, 0
+};
static const s16 fcinv_x[NUMBER_OF_FCINV_POINTS] = {
-0, 80, 216, 456, 824, 1344, 2040, 2952, 4096};
+ 0, 80, 216, 456, 824, 1344, 2040, 2952, 4096
+};
static const s16 fcinv_a[NUMBER_OF_FCINV_POINTS] = {
--5244, -486, -86, -2849, -961, -400, -180, -86, 0};
+ -5244, -486, -86, -2849, -961, -400, -180, -86, 0
+ };
static const s16 fcinv_b[NUMBER_OF_FCINV_POINTS] = {
-8191, 1637, 607, 287, 159, 98, 64, 44, 32};
+ 8191, 1637, 607, 287, 159, 98, 64, 44, 32
+};
static const s16 fcinv_c[NUMBER_OF_FCINV_POINTS] = {
-1, 1, 1, 0, 0, 0, 0, 0, 0};
+ 1, 1, 1, 0, 0, 0, 0, 0, 0
+};
void
ia_css_eed1_8_vmem_encode(
- struct eed1_8_vmem_params *to,
- const struct ia_css_eed1_8_config *from,
- size_t size)
+ struct eed1_8_vmem_params *to,
+ const struct ia_css_eed1_8_config *from,
+ size_t size)
{
unsigned int i, j, base;
const unsigned int total_blocks = 4;
for (j = 0; j < IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS; j++) {
to->e_dew_enh_x[0][base + j] = min_t(int, max_t(int,
- from->dew_enhance_seg_x[j], 0),
- 8191);
+ from->dew_enhance_seg_x[j], 0),
+ 8191);
to->e_dew_enh_y[0][base + j] = min_t(int, max_t(int,
- from->dew_enhance_seg_y[j], -8192),
- 8191);
+ from->dew_enhance_seg_y[j], -8192),
+ 8191);
}
for (j = 0; j < (IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1); j++) {
to->e_dew_enh_a[0][base + j] = min_t(int, max_t(int,
- from->dew_enhance_seg_slope[j],
- -8192), 8191);
+ from->dew_enhance_seg_slope[j],
+ -8192), 8191);
/* Convert dew_enhance_seg_exp to flag:
* 0 -> 0
* 1...13 -> 1
*/
to->e_dew_enh_f[0][base + j] = (min_t(int, max_t(int,
- from->dew_enhance_seg_exp[j],
- 0), 13) > 0);
+ from->dew_enhance_seg_exp[j],
+ 0), 13) > 0);
}
/* Hard-coded to 0, in order to be able to handle out of
void
ia_css_eed1_8_encode(
- struct eed1_8_dmem_params *to,
- const struct ia_css_eed1_8_config *from,
- size_t size)
+ struct eed1_8_dmem_params *to,
+ const struct ia_css_eed1_8_config *from,
+ size_t size)
{
int i;
int min_exp = 0;
void
ia_css_init_eed1_8_state(
- void *state,
- size_t size)
+ void *state,
+ size_t size)
{
memset(state, 0, size);
}
#ifndef IA_CSS_NO_DEBUG
void
ia_css_eed1_8_debug_dtrace(
- const struct ia_css_eed1_8_config *eed,
- unsigned int level)
+ const struct ia_css_eed1_8_config *eed,
+ unsigned int level)
{
if (!eed)
return;
ia_css_debug_dtrace(level, "Edge Enhancing Demosaic 1.8:\n");
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rbzp_strength", eed->rbzp_strength);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "rbzp_strength",
+ eed->rbzp_strength);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcstrength", eed->fcstrength);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcthres_0", eed->fcthres_0);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fcthres_1", eed->fcthres_1);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_sat_coef", eed->fc_sat_coef);
- ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_coring_prm", eed->fc_coring_prm);
+ ia_css_debug_dtrace(level, "\t%-32s = %d\n", "fc_coring_prm",
+ eed->fc_coring_prm);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "aerel_thres0", eed->aerel_thres0);
ia_css_debug_dtrace(level, "\t%-32s = %d\n", "aerel_gain0", eed->aerel_gain0);
void
ia_css_eed1_8_vmem_encode(
- struct eed1_8_vmem_params *to,
- const struct ia_css_eed1_8_config *from,
- size_t size);
+ struct eed1_8_vmem_params *to,
+ const struct ia_css_eed1_8_config *from,
+ size_t size);
void
ia_css_eed1_8_encode(
- struct eed1_8_dmem_params *to,
- const struct ia_css_eed1_8_config *from,
- size_t size);
+ struct eed1_8_dmem_params *to,
+ const struct ia_css_eed1_8_config *from,
+ size_t size);
void
ia_css_init_eed1_8_state(
- void *state,
- size_t size);
+ void *state,
+ size_t size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_eed1_8_debug_dtrace(
- const struct ia_css_eed1_8_config *config,
- unsigned int level);
+ const struct ia_css_eed1_8_config *config,
+ unsigned int level);
#endif
#endif /* __IA_CSS_EED1_8_HOST_H */
s32 dew_enhance_seg_x[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: X. */
s32 dew_enhance_seg_y[IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS]; /** Segment data for directional edge weight: Y. */
- s32 dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /** Segment data for directional edge weight: Slope. */
- s32 dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS - 1)]; /** Segment data for directional edge weight: Exponent. */
+ s32 dew_enhance_seg_slope[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS -
+ 1)]; /** Segment data for directional edge weight: Slope. */
+ s32 dew_enhance_seg_exp[(IA_CSS_NUMBER_OF_DEW_ENHANCE_SEGMENTS -
+ 1)]; /** Segment data for directional edge weight: Exponent. */
s32 dedgew_max; /** Max Weight for Directional Edge. */
};
void
ia_css_formats_encode(
- struct sh_css_isp_formats_params *to,
- const struct ia_css_formats_config *from,
- unsigned int size)
+ struct sh_css_isp_formats_params *to,
+ const struct ia_css_formats_config *from,
+ unsigned int size)
{
(void)size;
to->video_full_range_flag = from->video_full_range_flag;
/* FIXME: See BZ 4427 */
void
ia_css_formats_dump(
- const struct sh_css_isp_formats_params *formats,
- unsigned int level)
+ const struct sh_css_isp_formats_params *formats,
+ unsigned int level)
{
if (!formats) return;
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "video_full_range_flag", formats->video_full_range_flag);
+ "video_full_range_flag", formats->video_full_range_flag);
}
#endif
/* FIXME: See BZ 4427 */
void
ia_css_formats_debug_dtrace(
- const struct ia_css_formats_config *config,
- unsigned int level)
+ const struct ia_css_formats_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.video_full_range_flag=%d\n",
- config->video_full_range_flag);
+ "config.video_full_range_flag=%d\n",
+ config->video_full_range_flag);
}
#endif
void
ia_css_formats_encode(
- struct sh_css_isp_formats_params *to,
- const struct ia_css_formats_config *from,
- unsigned int size);
+ struct sh_css_isp_formats_params *to,
+ const struct ia_css_formats_config *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
/* FIXME: See BZ 4427 */
void
ia_css_formats_dump(
- const struct sh_css_isp_formats_params *formats,
- unsigned int level);
+ const struct sh_css_isp_formats_params *formats,
+ unsigned int level);
#endif
#ifndef IA_CSS_NO_DEBUG
/* FIXME: See BZ 4427 */
void
ia_css_formats_debug_dtrace(
- const struct ia_css_formats_config *formats,
- unsigned int level);
+ const struct ia_css_formats_config *formats,
+ unsigned int level);
#endif /*IA_CSS_NO_DEBUG*/
#endif /* __IA_CSS_FORMATS_HOST_H */
void
ia_css_fpn_encode(
- struct sh_css_isp_fpn_params *to,
- const struct ia_css_fpn_table *from,
- unsigned int size)
+ struct sh_css_isp_fpn_params *to,
+ const struct ia_css_fpn_table *from,
+ unsigned int size)
{
(void)size;
to->shift = from->shift;
void
ia_css_fpn_dump(
- const struct sh_css_isp_fpn_params *fpn,
- unsigned int level)
+ const struct sh_css_isp_fpn_params *fpn,
+ unsigned int level)
{
if (!fpn) return;
ia_css_debug_dtrace(level, "Fixed Pattern Noise Reduction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "fpn_shift", fpn->shift);
+ "fpn_shift", fpn->shift);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "fpn_enabled", fpn->enabled);
+ "fpn_enabled", fpn->enabled);
}
void
ia_css_fpn_config(
- struct sh_css_isp_fpn_isp_config *to,
- const struct ia_css_fpn_configuration *from,
- unsigned int size)
+ struct sh_css_isp_fpn_isp_config *to,
+ const struct ia_css_fpn_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
void
ia_css_fpn_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
const struct ia_css_fpn_configuration config = {
void
ia_css_fpn_encode(
- struct sh_css_isp_fpn_params *to,
- const struct ia_css_fpn_table *from,
- unsigned int size);
+ struct sh_css_isp_fpn_params *to,
+ const struct ia_css_fpn_table *from,
+ unsigned int size);
void
ia_css_fpn_dump(
- const struct sh_css_isp_fpn_params *fpn,
- unsigned int level);
+ const struct sh_css_isp_fpn_params *fpn,
+ unsigned int level);
void
ia_css_fpn_config(
- struct sh_css_isp_fpn_isp_config *to,
- const struct ia_css_fpn_configuration *from,
- unsigned int size);
+ struct sh_css_isp_fpn_isp_config *to,
+ const struct ia_css_fpn_configuration *from,
+ unsigned int size);
void
ia_css_fpn_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
#endif /* __IA_CSS_FPN_HOST_H */
void
ia_css_gc_encode(
- struct sh_css_isp_gc_params *to,
- const struct ia_css_gc_config *from,
- unsigned int size)
+ struct sh_css_isp_gc_params *to,
+ const struct ia_css_gc_config *from,
+ unsigned int size)
{
(void)size;
to->gain_k1 =
uDIGIT_FITTING((int)from->gain_k1, 16,
- IA_CSS_GAMMA_GAIN_K_SHIFT);
+ IA_CSS_GAMMA_GAIN_K_SHIFT);
to->gain_k2 =
uDIGIT_FITTING((int)from->gain_k2, 16,
- IA_CSS_GAMMA_GAIN_K_SHIFT);
+ IA_CSS_GAMMA_GAIN_K_SHIFT);
}
void
ia_css_ce_encode(
- struct sh_css_isp_ce_params *to,
- const struct ia_css_ce_config *from,
- unsigned int size)
+ struct sh_css_isp_ce_params *to,
+ const struct ia_css_ce_config *from,
+ unsigned int size)
{
(void)size;
to->uv_level_min = from->uv_level_min;
void
ia_css_gc_vamem_encode(
- struct sh_css_isp_gc_vamem_params *to,
- const struct ia_css_gamma_table *from,
- unsigned int size)
+ struct sh_css_isp_gc_vamem_params *to,
+ const struct ia_css_gamma_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->gc, &from->data, sizeof(to->gc));
#ifndef IA_CSS_NO_DEBUG
void
ia_css_gc_dump(
- const struct sh_css_isp_gc_params *gc,
- unsigned int level)
+ const struct sh_css_isp_gc_params *gc,
+ unsigned int level)
{
if (!gc) return;
ia_css_debug_dtrace(level, "Gamma Correction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "gamma_gain_k1", gc->gain_k1);
+ "gamma_gain_k1", gc->gain_k1);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "gamma_gain_k2", gc->gain_k2);
+ "gamma_gain_k2", gc->gain_k2);
}
void
ia_css_ce_dump(
- const struct sh_css_isp_ce_params *ce,
- unsigned int level)
+ const struct sh_css_isp_ce_params *ce,
+ unsigned int level)
{
ia_css_debug_dtrace(level, "Chroma Enhancement:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ce_uv_level_min", ce->uv_level_min);
+ "ce_uv_level_min", ce->uv_level_min);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ce_uv_level_max", ce->uv_level_max);
+ "ce_uv_level_max", ce->uv_level_max);
}
void
ia_css_gc_debug_dtrace(
- const struct ia_css_gc_config *config,
- unsigned int level)
+ const struct ia_css_gc_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.gain_k1=%d, config.gain_k2=%d\n",
- config->gain_k1, config->gain_k2);
+ "config.gain_k1=%d, config.gain_k2=%d\n",
+ config->gain_k1, config->gain_k2);
}
void
ia_css_ce_debug_dtrace(
- const struct ia_css_ce_config *config,
- unsigned int level)
+ const struct ia_css_ce_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.uv_level_min=%d, config.uv_level_max=%d\n",
- config->uv_level_min, config->uv_level_max);
+ "config.uv_level_min=%d, config.uv_level_max=%d\n",
+ config->uv_level_min, config->uv_level_max);
}
#endif
void
ia_css_gc_encode(
- struct sh_css_isp_gc_params *to,
- const struct ia_css_gc_config *from,
- unsigned int size);
+ struct sh_css_isp_gc_params *to,
+ const struct ia_css_gc_config *from,
+ unsigned int size);
void
ia_css_gc_vamem_encode(
- struct sh_css_isp_gc_vamem_params *to,
- const struct ia_css_gamma_table *from,
- unsigned int size);
+ struct sh_css_isp_gc_vamem_params *to,
+ const struct ia_css_gamma_table *from,
+ unsigned int size);
void
ia_css_ce_encode(
- struct sh_css_isp_ce_params *to,
- const struct ia_css_ce_config *from,
- unsigned int size);
+ struct sh_css_isp_ce_params *to,
+ const struct ia_css_ce_config *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_gc_dump(
- const struct sh_css_isp_gc_params *gc,
- unsigned int level);
+ const struct sh_css_isp_gc_params *gc,
+ unsigned int level);
void
ia_css_ce_dump(
- const struct sh_css_isp_ce_params *ce,
- unsigned int level);
+ const struct sh_css_isp_ce_params *ce,
+ unsigned int level);
void
ia_css_gc_debug_dtrace(
- const struct ia_css_gc_config *config,
- unsigned int level);
+ const struct ia_css_gc_config *config,
+ unsigned int level);
void
ia_css_ce_debug_dtrace(
- const struct ia_css_ce_config *config,
- unsigned int level);
+ const struct ia_css_ce_config *config,
+ unsigned int level);
#endif
static const uint16_t
default_gamma_table_data[IA_CSS_VAMEM_2_GAMMA_TABLE_SIZE] = {
- 0, 4, 8, 12, 17, 21, 27, 32,
- 38, 44, 49, 55, 61, 66, 71, 76,
- 80, 84, 88, 92, 95, 98, 102, 105,
-108, 110, 113, 116, 118, 121, 123, 126,
-128, 130, 132, 135, 137, 139, 141, 143,
-145, 146, 148, 150, 152, 153, 155, 156,
-158, 160, 161, 162, 164, 165, 166, 168,
-169, 170, 171, 172, 174, 175, 176, 177,
-178, 179, 180, 181, 182, 183, 184, 184,
-185, 186, 187, 188, 189, 189, 190, 191,
-192, 192, 193, 194, 195, 195, 196, 197,
-197, 198, 198, 199, 200, 200, 201, 201,
-202, 203, 203, 204, 204, 205, 205, 206,
-206, 207, 207, 208, 208, 209, 209, 210,
-210, 210, 211, 211, 212, 212, 213, 213,
-214, 214, 214, 215, 215, 216, 216, 216,
-217, 217, 218, 218, 218, 219, 219, 220,
-220, 220, 221, 221, 222, 222, 222, 223,
-223, 223, 224, 224, 225, 225, 225, 226,
-226, 226, 227, 227, 227, 228, 228, 228,
-229, 229, 229, 230, 230, 230, 231, 231,
-231, 232, 232, 232, 233, 233, 233, 234,
-234, 234, 234, 235, 235, 235, 236, 236,
-236, 237, 237, 237, 237, 238, 238, 238,
-239, 239, 239, 239, 240, 240, 240, 241,
-241, 241, 241, 242, 242, 242, 242, 243,
-243, 243, 243, 244, 244, 244, 245, 245,
-245, 245, 246, 246, 246, 246, 247, 247,
-247, 247, 248, 248, 248, 248, 249, 249,
-249, 249, 250, 250, 250, 250, 251, 251,
-251, 251, 252, 252, 252, 252, 253, 253,
-253, 253, 254, 254, 254, 254, 255, 255,
-255
+ 0, 4, 8, 12, 17, 21, 27, 32,
+ 38, 44, 49, 55, 61, 66, 71, 76,
+ 80, 84, 88, 92, 95, 98, 102, 105,
+ 108, 110, 113, 116, 118, 121, 123, 126,
+ 128, 130, 132, 135, 137, 139, 141, 143,
+ 145, 146, 148, 150, 152, 153, 155, 156,
+ 158, 160, 161, 162, 164, 165, 166, 168,
+ 169, 170, 171, 172, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 184,
+ 185, 186, 187, 188, 189, 189, 190, 191,
+ 192, 192, 193, 194, 195, 195, 196, 197,
+ 197, 198, 198, 199, 200, 200, 201, 201,
+ 202, 203, 203, 204, 204, 205, 205, 206,
+ 206, 207, 207, 208, 208, 209, 209, 210,
+ 210, 210, 211, 211, 212, 212, 213, 213,
+ 214, 214, 214, 215, 215, 216, 216, 216,
+ 217, 217, 218, 218, 218, 219, 219, 220,
+ 220, 220, 221, 221, 222, 222, 222, 223,
+ 223, 223, 224, 224, 225, 225, 225, 226,
+ 226, 226, 227, 227, 227, 228, 228, 228,
+ 229, 229, 229, 230, 230, 230, 231, 231,
+ 231, 232, 232, 232, 233, 233, 233, 234,
+ 234, 234, 234, 235, 235, 235, 236, 236,
+ 236, 237, 237, 237, 237, 238, 238, 238,
+ 239, 239, 239, 239, 240, 240, 240, 241,
+ 241, 241, 241, 242, 242, 242, 242, 243,
+ 243, 243, 243, 244, 244, 244, 245, 245,
+ 245, 245, 246, 246, 246, 246, 247, 247,
+ 247, 247, 248, 248, 248, 248, 249, 249,
+ 249, 249, 250, 250, 250, 250, 251, 251,
+ 251, 251, 252, 252, 252, 252, 253, 253,
+ 253, 253, 254, 254, 254, 254, 255, 255,
+ 255
};
#elif defined(HAS_VAMEM_VERSION_1)
static const uint16_t
default_gamma_table_data[IA_CSS_VAMEM_1_GAMMA_TABLE_SIZE] = {
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 16,
- 17, 18, 19, 20, 21, 23, 24, 25,
- 27, 28, 29, 31, 32, 33, 35, 36,
- 38, 39, 41, 42, 44, 45, 47, 48,
- 49, 51, 52, 54, 55, 57, 58, 60,
- 61, 62, 64, 65, 66, 68, 69, 70,
- 71, 72, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87,
- 88, 89, 90, 91, 92, 93, 93, 94,
- 95, 96, 97, 98, 98, 99, 100, 101,
- 102, 102, 103, 104, 105, 105, 106, 107,
- 108, 108, 109, 110, 110, 111, 112, 112,
- 113, 114, 114, 115, 116, 116, 117, 118,
- 118, 119, 120, 120, 121, 121, 122, 123,
- 123, 124, 125, 125, 126, 126, 127, 127, /* 128 */
- 128, 129, 129, 130, 130, 131, 131, 132,
- 132, 133, 134, 134, 135, 135, 136, 136,
- 137, 137, 138, 138, 139, 139, 140, 140,
- 141, 141, 142, 142, 143, 143, 144, 144,
- 145, 145, 145, 146, 146, 147, 147, 148,
- 148, 149, 149, 150, 150, 150, 151, 151,
- 152, 152, 152, 153, 153, 154, 154, 155,
- 155, 155, 156, 156, 156, 157, 157, 158,
- 158, 158, 159, 159, 160, 160, 160, 161,
- 161, 161, 162, 162, 162, 163, 163, 163,
- 164, 164, 164, 165, 165, 165, 166, 166,
- 166, 167, 167, 167, 168, 168, 168, 169,
- 169, 169, 170, 170, 170, 170, 171, 171,
- 171, 172, 172, 172, 172, 173, 173, 173,
- 174, 174, 174, 174, 175, 175, 175, 176,
- 176, 176, 176, 177, 177, 177, 177, 178, /* 256 */
- 178, 178, 178, 179, 179, 179, 179, 180,
- 180, 180, 180, 181, 181, 181, 181, 182,
- 182, 182, 182, 182, 183, 183, 183, 183,
- 184, 184, 184, 184, 184, 185, 185, 185,
- 185, 186, 186, 186, 186, 186, 187, 187,
- 187, 187, 187, 188, 188, 188, 188, 188,
- 189, 189, 189, 189, 189, 190, 190, 190,
- 190, 190, 191, 191, 191, 191, 191, 192,
- 192, 192, 192, 192, 192, 193, 193, 193,
- 193, 193, 194, 194, 194, 194, 194, 194,
- 195, 195, 195, 195, 195, 195, 196, 196,
- 196, 196, 196, 196, 197, 197, 197, 197,
- 197, 197, 198, 198, 198, 198, 198, 198,
- 198, 199, 199, 199, 199, 199, 199, 200,
- 200, 200, 200, 200, 200, 200, 201, 201,
- 201, 201, 201, 201, 201, 202, 202, 202, /* 384 */
- 202, 202, 202, 202, 203, 203, 203, 203,
- 203, 203, 203, 204, 204, 204, 204, 204,
- 204, 204, 204, 205, 205, 205, 205, 205,
- 205, 205, 205, 206, 206, 206, 206, 206,
- 206, 206, 206, 207, 207, 207, 207, 207,
- 207, 207, 207, 208, 208, 208, 208, 208,
- 208, 208, 208, 209, 209, 209, 209, 209,
- 209, 209, 209, 209, 210, 210, 210, 210,
- 210, 210, 210, 210, 210, 211, 211, 211,
- 211, 211, 211, 211, 211, 211, 212, 212,
- 212, 212, 212, 212, 212, 212, 212, 213,
- 213, 213, 213, 213, 213, 213, 213, 213,
- 214, 214, 214, 214, 214, 214, 214, 214,
- 214, 214, 215, 215, 215, 215, 215, 215,
- 215, 215, 215, 216, 216, 216, 216, 216,
- 216, 216, 216, 216, 216, 217, 217, 217, /* 512 */
- 217, 217, 217, 217, 217, 217, 217, 218,
- 218, 218, 218, 218, 218, 218, 218, 218,
- 218, 219, 219, 219, 219, 219, 219, 219,
- 219, 219, 219, 220, 220, 220, 220, 220,
- 220, 220, 220, 220, 220, 221, 221, 221,
- 221, 221, 221, 221, 221, 221, 221, 221,
- 222, 222, 222, 222, 222, 222, 222, 222,
- 222, 222, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 224, 224,
- 225, 225, 225, 225, 225, 225, 225, 225,
- 225, 225, 225, 226, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 226, 226, 227,
- 227, 227, 227, 227, 227, 227, 227, 227,
- 227, 227, 228, 228, 228, 228, 228, 228,
- 228, 228, 228, 228, 228, 228, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 230, 230, 230, 230, 230, 230,
- 230, 230, 230, 230, 230, 230, 231, 231,
- 231, 231, 231, 231, 231, 231, 231, 231,
- 231, 231, 231, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 233,
- 233, 233, 233, 233, 233, 233, 233, 233,
- 233, 233, 233, 233, 234, 234, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 234,
- 234, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 236, 236,
- 236, 236, 236, 236, 236, 236, 236, 236,
- 236, 236, 236, 236, 237, 237, 237, 237,
- 237, 237, 237, 237, 237, 237, 237, 237,
- 237, 237, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238,
- 239, 239, 239, 239, 239, 239, 239, 239,
- 239, 239, 239, 239, 239, 239, 240, 240,
- 240, 240, 240, 240, 240, 240, 240, 240,
- 240, 240, 240, 240, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 243, 243, 243, 243, 243, 243,
- 243, 243, 243, 243, 243, 243, 243, 243,
- 243, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244,
- 245, 245, 245, 245, 245, 245, 245, 245,
- 245, 245, 245, 245, 245, 245, 245, 246,
- 246, 246, 246, 246, 246, 246, 246, 246,
- 246, 246, 246, 246, 246, 246, 246, 247,
- 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 248,
- 248, 248, 248, 248, 248, 248, 248, 248,
- 248, 248, 248, 248, 248, 248, 248, 249,
- 249, 249, 249, 249, 249, 249, 249, 249,
- 249, 249, 249, 249, 249, 249, 249, 250,
- 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 251,
- 251, 251, 251, 251, 251, 251, 251, 251,
- 251, 251, 251, 251, 251, 251, 251, 252,
- 252, 252, 252, 252, 252, 252, 252, 252,
- 252, 252, 252, 252, 252, 252, 252, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 253, 253, 253, 253, 253, 253, 253, 253,
- 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254,
- 255, 255, 255, 255, 255, 255, 255, 255
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 16,
+ 17, 18, 19, 20, 21, 23, 24, 25,
+ 27, 28, 29, 31, 32, 33, 35, 36,
+ 38, 39, 41, 42, 44, 45, 47, 48,
+ 49, 51, 52, 54, 55, 57, 58, 60,
+ 61, 62, 64, 65, 66, 68, 69, 70,
+ 71, 72, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 93, 94,
+ 95, 96, 97, 98, 98, 99, 100, 101,
+ 102, 102, 103, 104, 105, 105, 106, 107,
+ 108, 108, 109, 110, 110, 111, 112, 112,
+ 113, 114, 114, 115, 116, 116, 117, 118,
+ 118, 119, 120, 120, 121, 121, 122, 123,
+ 123, 124, 125, 125, 126, 126, 127, 127, /* 128 */
+ 128, 129, 129, 130, 130, 131, 131, 132,
+ 132, 133, 134, 134, 135, 135, 136, 136,
+ 137, 137, 138, 138, 139, 139, 140, 140,
+ 141, 141, 142, 142, 143, 143, 144, 144,
+ 145, 145, 145, 146, 146, 147, 147, 148,
+ 148, 149, 149, 150, 150, 150, 151, 151,
+ 152, 152, 152, 153, 153, 154, 154, 155,
+ 155, 155, 156, 156, 156, 157, 157, 158,
+ 158, 158, 159, 159, 160, 160, 160, 161,
+ 161, 161, 162, 162, 162, 163, 163, 163,
+ 164, 164, 164, 165, 165, 165, 166, 166,
+ 166, 167, 167, 167, 168, 168, 168, 169,
+ 169, 169, 170, 170, 170, 170, 171, 171,
+ 171, 172, 172, 172, 172, 173, 173, 173,
+ 174, 174, 174, 174, 175, 175, 175, 176,
+ 176, 176, 176, 177, 177, 177, 177, 178, /* 256 */
+ 178, 178, 178, 179, 179, 179, 179, 180,
+ 180, 180, 180, 181, 181, 181, 181, 182,
+ 182, 182, 182, 182, 183, 183, 183, 183,
+ 184, 184, 184, 184, 184, 185, 185, 185,
+ 185, 186, 186, 186, 186, 186, 187, 187,
+ 187, 187, 187, 188, 188, 188, 188, 188,
+ 189, 189, 189, 189, 189, 190, 190, 190,
+ 190, 190, 191, 191, 191, 191, 191, 192,
+ 192, 192, 192, 192, 192, 193, 193, 193,
+ 193, 193, 194, 194, 194, 194, 194, 194,
+ 195, 195, 195, 195, 195, 195, 196, 196,
+ 196, 196, 196, 196, 197, 197, 197, 197,
+ 197, 197, 198, 198, 198, 198, 198, 198,
+ 198, 199, 199, 199, 199, 199, 199, 200,
+ 200, 200, 200, 200, 200, 200, 201, 201,
+ 201, 201, 201, 201, 201, 202, 202, 202, /* 384 */
+ 202, 202, 202, 202, 203, 203, 203, 203,
+ 203, 203, 203, 204, 204, 204, 204, 204,
+ 204, 204, 204, 205, 205, 205, 205, 205,
+ 205, 205, 205, 206, 206, 206, 206, 206,
+ 206, 206, 206, 207, 207, 207, 207, 207,
+ 207, 207, 207, 208, 208, 208, 208, 208,
+ 208, 208, 208, 209, 209, 209, 209, 209,
+ 209, 209, 209, 209, 210, 210, 210, 210,
+ 210, 210, 210, 210, 210, 211, 211, 211,
+ 211, 211, 211, 211, 211, 211, 212, 212,
+ 212, 212, 212, 212, 212, 212, 212, 213,
+ 213, 213, 213, 213, 213, 213, 213, 213,
+ 214, 214, 214, 214, 214, 214, 214, 214,
+ 214, 214, 215, 215, 215, 215, 215, 215,
+ 215, 215, 215, 216, 216, 216, 216, 216,
+ 216, 216, 216, 216, 216, 217, 217, 217, /* 512 */
+ 217, 217, 217, 217, 217, 217, 217, 218,
+ 218, 218, 218, 218, 218, 218, 218, 218,
+ 218, 219, 219, 219, 219, 219, 219, 219,
+ 219, 219, 219, 220, 220, 220, 220, 220,
+ 220, 220, 220, 220, 220, 221, 221, 221,
+ 221, 221, 221, 221, 221, 221, 221, 221,
+ 222, 222, 222, 222, 222, 222, 222, 222,
+ 222, 222, 223, 223, 223, 223, 223, 223,
+ 223, 223, 223, 223, 223, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224,
+ 225, 225, 225, 225, 225, 225, 225, 225,
+ 225, 225, 225, 226, 226, 226, 226, 226,
+ 226, 226, 226, 226, 226, 226, 226, 227,
+ 227, 227, 227, 227, 227, 227, 227, 227,
+ 227, 227, 228, 228, 228, 228, 228, 228,
+ 228, 228, 228, 228, 228, 228, 229, 229,
+ 229, 229, 229, 229, 229, 229, 229, 229,
+ 229, 229, 230, 230, 230, 230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 231, 231,
+ 231, 231, 231, 231, 231, 231, 231, 231,
+ 231, 231, 231, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 233,
+ 233, 233, 233, 233, 233, 233, 233, 233,
+ 233, 233, 233, 233, 234, 234, 234, 234,
+ 234, 234, 234, 234, 234, 234, 234, 234,
+ 234, 235, 235, 235, 235, 235, 235, 235,
+ 235, 235, 235, 235, 235, 235, 236, 236,
+ 236, 236, 236, 236, 236, 236, 236, 236,
+ 236, 236, 236, 236, 237, 237, 237, 237,
+ 237, 237, 237, 237, 237, 237, 237, 237,
+ 237, 237, 238, 238, 238, 238, 238, 238,
+ 238, 238, 238, 238, 238, 238, 238, 238,
+ 239, 239, 239, 239, 239, 239, 239, 239,
+ 239, 239, 239, 239, 239, 239, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 244, 244, 244, 244, 244, 244, 244,
+ 244, 244, 244, 244, 244, 244, 244, 244,
+ 245, 245, 245, 245, 245, 245, 245, 245,
+ 245, 245, 245, 245, 245, 245, 245, 246,
+ 246, 246, 246, 246, 246, 246, 246, 246,
+ 246, 246, 246, 246, 246, 246, 246, 247,
+ 247, 247, 247, 247, 247, 247, 247, 247,
+ 247, 247, 247, 247, 247, 247, 247, 248,
+ 248, 248, 248, 248, 248, 248, 248, 248,
+ 248, 248, 248, 248, 248, 248, 248, 249,
+ 249, 249, 249, 249, 249, 249, 249, 249,
+ 249, 249, 249, 249, 249, 249, 249, 250,
+ 250, 250, 250, 250, 250, 250, 250, 250,
+ 250, 250, 250, 250, 250, 250, 250, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 252,
+ 252, 252, 252, 252, 252, 252, 252, 252,
+ 252, 252, 252, 252, 252, 252, 252, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 253, 253, 253, 253, 253, 253, 253, 253,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254,
+ 255, 255, 255, 255, 255, 255, 255, 255
};
#else
void
ia_css_yuv2rgb_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size)
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size)
{
ia_css_encode_cc(to, from, size);
}
void
ia_css_rgb2yuv_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size)
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size)
{
ia_css_encode_cc(to, from, size);
}
void
ia_css_r_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size)
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->gc, &from->data, sizeof(to->gc));
void
ia_css_g_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size)
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->gc, &from->data, sizeof(to->gc));
void
ia_css_b_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size)
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->gc, &from->data, sizeof(to->gc));
#ifndef IA_CSS_NO_DEBUG
void
ia_css_yuv2rgb_dump(
- const struct sh_css_isp_csc_params *yuv2rgb,
- unsigned int level)
+ const struct sh_css_isp_csc_params *yuv2rgb,
+ unsigned int level)
{
ia_css_cc_dump(yuv2rgb, level, "YUV to RGB Conversion");
}
void
ia_css_rgb2yuv_dump(
- const struct sh_css_isp_csc_params *rgb2yuv,
- unsigned int level)
+ const struct sh_css_isp_csc_params *rgb2yuv,
+ unsigned int level)
{
ia_css_cc_dump(rgb2yuv, level, "RGB to YUV Conversion");
}
void
ia_css_rgb_gamma_table_debug_dtrace(
- const struct ia_css_rgb_gamma_table *config,
- unsigned int level)
+ const struct ia_css_rgb_gamma_table *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_yuv2rgb_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size);
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size);
void
ia_css_rgb2yuv_encode(
- struct sh_css_isp_csc_params *to,
- const struct ia_css_cc_config *from,
- unsigned int size);
+ struct sh_css_isp_csc_params *to,
+ const struct ia_css_cc_config *from,
+ unsigned int size);
void
ia_css_r_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size);
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size);
void
ia_css_g_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size);
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size);
void
ia_css_b_gamma_vamem_encode(
- struct sh_css_isp_rgb_gamma_vamem_params *to,
- const struct ia_css_rgb_gamma_table *from,
- unsigned int size);
+ struct sh_css_isp_rgb_gamma_vamem_params *to,
+ const struct ia_css_rgb_gamma_table *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_yuv2rgb_dump(
- const struct sh_css_isp_csc_params *yuv2rgb,
- unsigned int level);
+ const struct sh_css_isp_csc_params *yuv2rgb,
+ unsigned int level);
void
ia_css_rgb2yuv_dump(
- const struct sh_css_isp_csc_params *rgb2yuv,
- unsigned int level);
+ const struct sh_css_isp_csc_params *rgb2yuv,
+ unsigned int level);
void
ia_css_rgb_gamma_table_debug_dtrace(
- const struct ia_css_rgb_gamma_table *config,
- unsigned int level);
+ const struct ia_css_rgb_gamma_table *config,
+ unsigned int level);
#define ia_css_yuv2rgb_debug_dtrace ia_css_cc_config_debug_dtrace
#define ia_css_rgb2yuv_debug_dtrace ia_css_cc_config_debug_dtrace
static const uint16_t
default_gamma_table_data[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE] = {
- 0, 72, 144, 216, 288, 360, 426, 486,
- 541, 592, 641, 687, 730, 772, 812, 850,
- 887, 923, 958, 991, 1024, 1055, 1086, 1117,
-1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
-1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
-1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
-1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
-1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
-2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
-2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
-2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
-2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
-2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
-2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
-2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
-2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
-2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
-2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
-3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
-3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
-3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
-3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
-3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
-3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
-3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
-3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
-3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
-3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
-3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
-3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
-3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
-4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088,
-4095
+ 0, 72, 144, 216, 288, 360, 426, 486,
+ 541, 592, 641, 687, 730, 772, 812, 850,
+ 887, 923, 958, 991, 1024, 1055, 1086, 1117,
+ 1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
+ 1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
+ 1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
+ 1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
+ 1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
+ 2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
+ 2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
+ 2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
+ 2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
+ 2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
+ 2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
+ 2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
+ 2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
+ 2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
+ 2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
+ 3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
+ 3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
+ 3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
+ 3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
+ 3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
+ 3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
+ 3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
+ 3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
+ 3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
+ 3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
+ 3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
+ 3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
+ 3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
+ 4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088,
+ 4095
};
#elif defined(HAS_VAMEM_VERSION_1)
static const uint16_t
default_gamma_table_data[IA_CSS_VAMEM_1_RGB_GAMMA_TABLE_SIZE] = {
- 0, 72, 144, 216, 288, 360, 426, 486,
- 541, 592, 641, 687, 730, 772, 812, 850,
- 887, 923, 958, 991, 1024, 1055, 1086, 1117,
-1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
-1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
-1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
-1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
-1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
-2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
-2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
-2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
-2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
-2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
-2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
-2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
-2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
-2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
-2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
-3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
-3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
-3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
-3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
-3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
-3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
-3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
-3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
-3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
-3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
-3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
-3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
-3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
-4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088
+ 0, 72, 144, 216, 288, 360, 426, 486,
+ 541, 592, 641, 687, 730, 772, 812, 850,
+ 887, 923, 958, 991, 1024, 1055, 1086, 1117,
+ 1146, 1175, 1203, 1230, 1257, 1284, 1310, 1335,
+ 1360, 1385, 1409, 1433, 1457, 1480, 1502, 1525,
+ 1547, 1569, 1590, 1612, 1632, 1653, 1674, 1694,
+ 1714, 1734, 1753, 1772, 1792, 1811, 1829, 1848,
+ 1866, 1884, 1902, 1920, 1938, 1955, 1973, 1990,
+ 2007, 2024, 2040, 2057, 2074, 2090, 2106, 2122,
+ 2138, 2154, 2170, 2185, 2201, 2216, 2231, 2247,
+ 2262, 2277, 2291, 2306, 2321, 2335, 2350, 2364,
+ 2378, 2393, 2407, 2421, 2435, 2449, 2462, 2476,
+ 2490, 2503, 2517, 2530, 2543, 2557, 2570, 2583,
+ 2596, 2609, 2622, 2634, 2647, 2660, 2673, 2685,
+ 2698, 2710, 2722, 2735, 2747, 2759, 2771, 2783,
+ 2795, 2807, 2819, 2831, 2843, 2855, 2867, 2878,
+ 2890, 2901, 2913, 2924, 2936, 2947, 2958, 2970,
+ 2981, 2992, 3003, 3014, 3025, 3036, 3047, 3058,
+ 3069, 3080, 3091, 3102, 3112, 3123, 3134, 3144,
+ 3155, 3165, 3176, 3186, 3197, 3207, 3217, 3228,
+ 3238, 3248, 3258, 3268, 3279, 3289, 3299, 3309,
+ 3319, 3329, 3339, 3349, 3358, 3368, 3378, 3388,
+ 3398, 3407, 3417, 3427, 3436, 3446, 3455, 3465,
+ 3474, 3484, 3493, 3503, 3512, 3521, 3531, 3540,
+ 3549, 3559, 3568, 3577, 3586, 3595, 3605, 3614,
+ 3623, 3632, 3641, 3650, 3659, 3668, 3677, 3686,
+ 3694, 3703, 3712, 3721, 3730, 3739, 3747, 3756,
+ 3765, 3773, 3782, 3791, 3799, 3808, 3816, 3825,
+ 3833, 3842, 3850, 3859, 3867, 3876, 3884, 3893,
+ 3901, 3909, 3918, 3926, 3934, 3942, 3951, 3959,
+ 3967, 3975, 3984, 3992, 4000, 4008, 4016, 4024,
+ 4032, 4040, 4048, 4056, 4064, 4072, 4080, 4088
};
#else
#error "VAMEM version must be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
/** RGB Gamma table on vamem type1. This table is not used,
because sRGB Gamma Correction is not implemented for ISP2300. */
u16 vamem_2[IA_CSS_VAMEM_2_RGB_GAMMA_TABLE_SIZE];
- /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
+ /** RGB Gamma table on vamem type2. u0.12, [0,4095] */
};
struct ia_css_rgb_gamma_table {
void
ia_css_hdr_init_config(
- struct sh_css_isp_hdr_params *to,
- const struct ia_css_hdr_config *from,
- unsigned int size)
+ struct sh_css_isp_hdr_params *to,
+ const struct ia_css_hdr_config *from,
+ unsigned int size)
{
int i;
(void)size;
void
ia_css_hdr_init_config(
- struct sh_css_isp_hdr_params *to,
- const struct ia_css_hdr_config *from,
- unsigned int size);
+ struct sh_css_isp_hdr_params *to,
+ const struct ia_css_hdr_config *from,
+ unsigned int size);
#endif /* __IA_CSS_HDR_HOST_H */
/* HDR irradiance map parameters on ISP. */
struct sh_css_hdr_irradiance_params {
s32 test_irr;
- s32 match_shift[HDR_NUM_INPUT_FRAMES - 1]; /* Histogram matching shift parameter */
- s32 match_mul[HDR_NUM_INPUT_FRAMES - 1]; /* Histogram matching multiplication parameter */
- s32 thr_low[HDR_NUM_INPUT_FRAMES - 1]; /* Weight map soft threshold low bound parameter */
- s32 thr_high[HDR_NUM_INPUT_FRAMES - 1]; /* Weight map soft threshold high bound parameter */
- s32 thr_coeff[HDR_NUM_INPUT_FRAMES - 1]; /* Soft threshold linear function coefficient */
- s32 thr_shift[HDR_NUM_INPUT_FRAMES - 1]; /* Soft threshold precision shift parameter */
+ s32 match_shift[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Histogram matching shift parameter */
+ s32 match_mul[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Histogram matching multiplication parameter */
+ s32 thr_low[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Weight map soft threshold low bound parameter */
+ s32 thr_high[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Weight map soft threshold high bound parameter */
+ s32 thr_coeff[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Soft threshold linear function coefficient */
+ s32 thr_shift[HDR_NUM_INPUT_FRAMES -
+ 1]; /* Soft threshold precision shift parameter */
s32 weight_bpp; /* Weight map bits per pixel */
};
*/
struct ia_css_hdr_irradiance_params {
int test_irr; /** Test parameter */
- int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Histogram matching shift parameter */
- int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Histogram matching multiplication parameter */
- int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Weight map soft threshold low bound parameter */
- int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Weight map soft threshold high bound parameter */
- int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Soft threshold linear function coefficien */
- int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES - 1]; /** Soft threshold precision shift parameter */
+ int match_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Histogram matching shift parameter */
+ int match_mul[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Histogram matching multiplication parameter */
+ int thr_low[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Weight map soft threshold low bound parameter */
+ int thr_high[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Weight map soft threshold high bound parameter */
+ int thr_coeff[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Soft threshold linear function coefficien */
+ int thr_shift[IA_CSS_HDR_MAX_NUM_INPUT_FRAMES -
+ 1]; /** Soft threshold precision shift parameter */
int weight_bpp; /** Weight map bits per pixel */
};
void
ia_css_bayer_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args)
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args)
{
const struct ia_css_frame *in_frame = args->in_frame;
- const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
- const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+ const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+ &args->out_frame;
+ const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+ &binary->in_frame_info;
const unsigned int ddr_bits_per_element = sizeof(short) * 8;
- const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+ const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+ ddr_bits_per_element);
unsigned int size_get = 0, size_put = 0;
unsigned int offset = 0;
}
if (size_get) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() get part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, in_frame_info);
to->stride = config.stride;
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() get part leave:\n");
#endif
}
}
if (size_put) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() put part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() put part leave:\n");
#endif
}
}
void
ia_css_bayer_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args);
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args);
#endif /*__BAYER_IO_HOST_H */
#endif
void
ia_css_bayer_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args)
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args)
{
const struct ia_css_frame *in_frame = args->in_frame;
- const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
- const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+ const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+ &args->out_frame;
+ const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+ &binary->in_frame_info;
const unsigned int ddr_bits_per_element = sizeof(short) * 8;
- const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+ const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+ ddr_bits_per_element);
unsigned int size_get = 0, size_put = 0;
unsigned int offset = 0;
}
if (size_get) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() get part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, in_frame_info);
to->stride = config.stride;
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() get part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() get part leave:\n");
#endif
}
}
if (size_put) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() put part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_bayer_io_config() put part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_bayer_io_config() put part leave:\n");
#endif
}
}
void
ia_css_bayer_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args);
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args);
#endif /*__BAYER_IO_HOST_H */
#endif
void
ia_css_yuv444_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args)
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args)
{
const struct ia_css_frame *in_frame = args->in_frame;
- const struct ia_css_frame **out_frames = (const struct ia_css_frame **)&args->out_frame;
- const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info : &binary->in_frame_info;
+ const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
+ &args->out_frame;
+ const struct ia_css_frame_info *in_frame_info = (in_frame) ? &in_frame->info :
+ &binary->in_frame_info;
const unsigned int ddr_bits_per_element = sizeof(short) * 8;
- const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS, ddr_bits_per_element);
+ const unsigned int ddr_elems_per_word = ceil_div(HIVE_ISP_DDR_WORD_BITS,
+ ddr_bits_per_element);
unsigned int size_get = 0, size_put = 0;
unsigned int offset = 0;
}
if (size_get) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() get part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_yuv444_io_config() get part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, in_frame_info);
to->stride = config.stride;
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() get part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_yuv444_io_config() get part leave:\n");
#endif
}
}
if (size_put) {
- struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
+ struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() put part enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_yuv444_io_config() put part enter:\n");
#endif
ia_css_dma_configure_from_info(&config, &out_frames[0]->info);
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_yuv444_io_config() put part leave:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_yuv444_io_config() put part leave:\n");
#endif
}
}
void
ia_css_yuv444_io_config(
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args);
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args);
#endif /*__YUV44_IO_HOST_H */
#endif
void
ia_css_iterator_config(
- struct sh_css_isp_iterator_isp_config *to,
- const struct ia_css_iterator_configuration *from,
- unsigned int size)
+ struct sh_css_isp_iterator_isp_config *to,
+ const struct ia_css_iterator_configuration *from,
+ unsigned int size)
{
(void)size;
ia_css_frame_info_to_frame_sp_info(&to->input_info, from->input_info);
enum ia_css_err
ia_css_iterator_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *in_info)
-{
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *in_info) {
struct ia_css_frame_info my_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
struct ia_css_iterator_configuration config = default_config;
* the original out res. for video pipe, it has two output pins --- out and
* vf_out, so it can keep these two resolutions already. */
if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW &&
- binary->vf_downscale_log2 > 0) {
+ binary->vf_downscale_log2 > 0)
+ {
/* TODO: Remove this after preview output decimation is fixed
* by configuring out&vf info files properly */
my_info.padded_width <<= binary->vf_downscale_log2;
void
ia_css_iterator_config(
- struct sh_css_isp_iterator_isp_config *to,
- const struct ia_css_iterator_configuration *from,
- unsigned int size);
+ struct sh_css_isp_iterator_isp_config *to,
+ const struct ia_css_iterator_configuration *from,
+ unsigned int size);
enum ia_css_err
ia_css_iterator_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *in_info);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *in_info);
#endif /* __IA_CSS_ITERATOR_HOST_H */
void
ia_css_macc1_5_encode(
- struct sh_css_isp_macc1_5_params *to,
- const struct ia_css_macc1_5_config *from,
- unsigned int size)
+ struct sh_css_isp_macc1_5_params *to,
+ const struct ia_css_macc1_5_config *from,
+ unsigned int size)
{
(void)size;
to->exp = from->exp;
void
ia_css_macc1_5_vmem_encode(
- struct sh_css_isp_macc1_5_vmem_params *params,
- const struct ia_css_macc1_5_table *from,
- unsigned int size)
+ struct sh_css_isp_macc1_5_vmem_params *params,
+ const struct ia_css_macc1_5_table *from,
+ unsigned int size)
{
unsigned int i, j, k, idx;
unsigned int idx_map[] = {
- 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8};
+ 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8
+ };
(void)size;
#ifndef IA_CSS_NO_DEBUG
void
ia_css_macc1_5_debug_dtrace(
- const struct ia_css_macc1_5_config *config,
- unsigned int level)
+ const struct ia_css_macc1_5_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.exp=%d\n",
- config->exp);
+ "config.exp=%d\n",
+ config->exp);
}
#endif
void
ia_css_macc1_5_encode(
- struct sh_css_isp_macc1_5_params *to,
- const struct ia_css_macc1_5_config *from,
- unsigned int size);
+ struct sh_css_isp_macc1_5_params *to,
+ const struct ia_css_macc1_5_config *from,
+ unsigned int size);
void
ia_css_macc1_5_vmem_encode(
- struct sh_css_isp_macc1_5_vmem_params *params,
- const struct ia_css_macc1_5_table *from,
- unsigned int size);
+ struct sh_css_isp_macc1_5_vmem_params *params,
+ const struct ia_css_macc1_5_table *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_macc1_5_debug_dtrace(
- const struct ia_css_macc1_5_config *config,
- unsigned int level);
+ const struct ia_css_macc1_5_config *config,
+ unsigned int level);
#endif
#endif /* __IA_CSS_MACC1_5_HOST_H */
};
struct sh_css_isp_macc1_5_vmem_params {
- VMEM_ARRAY(data, IA_CSS_MACC_NUM_COEFS * ISP_NWAY);
+ VMEM_ARRAY(data, IA_CSS_MACC_NUM_COEFS *ISP_NWAY);
};
#endif /* __IA_CSS_MACC1_5_PARAM_H */
* ineffective: 16 of "identity 2x2 matix" {4096,0,0,4096}
*/
const struct ia_css_macc1_5_table default_macc1_5_table = {
- { 4096, 0, 0, 4096, 4096, 0, 0, 4096,
+ {
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
- 4096, 0, 0, 4096, 4096, 0, 0, 4096 }
+ 4096, 0, 0, 4096, 4096, 0, 0, 4096,
+ 4096, 0, 0, 4096, 4096, 0, 0, 4096
+ }
};
void
ia_css_macc_encode(
- struct sh_css_isp_macc_params *to,
- const struct ia_css_macc_config *from,
- unsigned int size)
+ struct sh_css_isp_macc_params *to,
+ const struct ia_css_macc_config *from,
+ unsigned int size)
{
(void)size;
to->exp = from->exp;
void
ia_css_macc_dump(
- const struct sh_css_isp_macc_params *macc,
- unsigned int level);
+ const struct sh_css_isp_macc_params *macc,
+ unsigned int level);
void
ia_css_macc_debug_dtrace(
- const struct ia_css_macc_config *config,
- unsigned int level)
+ const struct ia_css_macc_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.exp=%d\n",
- config->exp);
+ "config.exp=%d\n",
+ config->exp);
}
void
ia_css_macc_encode(
- struct sh_css_isp_macc_params *to,
- const struct ia_css_macc_config *from,
- unsigned int size);
+ struct sh_css_isp_macc_params *to,
+ const struct ia_css_macc_config *from,
+ unsigned int size);
void
ia_css_macc_dump(
- const struct sh_css_isp_macc_params *macc,
- unsigned int level);
+ const struct sh_css_isp_macc_params *macc,
+ unsigned int level);
void
ia_css_macc_debug_dtrace(
- const struct ia_css_macc_config *config,
- unsigned int level);
+ const struct ia_css_macc_config *config,
+ unsigned int level);
#endif /* __IA_CSS_MACC_HOST_H */
* ineffective: 16 of "identity 2x2 matix" {8192,0,0,8192}
*/
const struct ia_css_macc_table default_macc_table = {
- { 8192, 0, 0, 8192, 8192, 0, 0, 8192,
+ {
8192, 0, 0, 8192, 8192, 0, 0, 8192,
8192, 0, 0, 8192, 8192, 0, 0, 8192,
8192, 0, 0, 8192, 8192, 0, 0, 8192,
8192, 0, 0, 8192, 8192, 0, 0, 8192,
8192, 0, 0, 8192, 8192, 0, 0, 8192,
8192, 0, 0, 8192, 8192, 0, 0, 8192,
- 8192, 0, 0, 8192, 8192, 0, 0, 8192 }
+ 8192, 0, 0, 8192, 8192, 0, 0, 8192,
+ 8192, 0, 0, 8192, 8192, 0, 0, 8192
+ }
};
/* Multi-Axes Color Correction table for ISP2.
* ineffective: 16 of "identity 2x2 matix" {4096,0,0,4096}
*/
const struct ia_css_macc_table default_macc2_table = {
- { 4096, 0, 0, 4096, 4096, 0, 0, 4096,
+ {
+ 4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
4096, 0, 0, 4096, 4096, 0, 0, 4096,
- 4096, 0, 0, 4096, 4096, 0, 0, 4096 }
+ 4096, 0, 0, 4096, 4096, 0, 0, 4096
+ }
};
void
ia_css_ob2_encode(
- struct sh_css_isp_ob2_params *to,
- const struct ia_css_ob2_config *from,
- unsigned int size)
+ struct sh_css_isp_ob2_params *to,
+ const struct ia_css_ob2_config *from,
+ unsigned int size)
{
(void)size;
#ifndef IA_CSS_NO_DEBUG
void
ia_css_ob2_dump(
- const struct sh_css_isp_ob2_params *ob2,
- unsigned int level)
+ const struct sh_css_isp_ob2_params *ob2,
+ unsigned int level)
{
if (!ob2)
return;
ia_css_debug_dtrace(level, "Optical Black 2:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob2_blacklevel_gr", ob2->blacklevel_gr);
+ "ob2_blacklevel_gr", ob2->blacklevel_gr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob2_blacklevel_r", ob2->blacklevel_r);
+ "ob2_blacklevel_r", ob2->blacklevel_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob2_blacklevel_b", ob2->blacklevel_b);
+ "ob2_blacklevel_b", ob2->blacklevel_b);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob2_blacklevel_gb", ob2->blacklevel_gb);
+ "ob2_blacklevel_gb", ob2->blacklevel_gb);
}
void
ia_css_ob2_debug_dtrace(
- const struct ia_css_ob2_config *config,
- unsigned int level)
+ const struct ia_css_ob2_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.level_gr=%d, config.level_r=%d, config.level_b=%d, config.level_gb=%d, ",
- config->level_gr, config->level_r,
- config->level_b, config->level_gb);
+ "config.level_gr=%d, config.level_r=%d, config.level_b=%d, config.level_gb=%d, ",
+ config->level_gr, config->level_r,
+ config->level_b, config->level_gb);
}
#endif
void
ia_css_ob2_encode(
- struct sh_css_isp_ob2_params *to,
- const struct ia_css_ob2_config *from,
- unsigned int size);
+ struct sh_css_isp_ob2_params *to,
+ const struct ia_css_ob2_config *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_ob2_dump(
- const struct sh_css_isp_ob2_params *ob2,
- unsigned int level);
+ const struct sh_css_isp_ob2_params *ob2,
+ unsigned int level);
void
ia_css_ob2_debug_dtrace(
- const struct ia_css_ob2_config *config, unsigned int level);
+ const struct ia_css_ob2_config *config, unsigned int level);
#endif
#endif /* __IA_CSS_OB2_HOST_H */
void
ia_css_ob_configure(
- struct sh_css_isp_ob_stream_config *config,
- unsigned int isp_pipe_version,
- unsigned int raw_bit_depth)
+ struct sh_css_isp_ob_stream_config *config,
+ unsigned int isp_pipe_version,
+ unsigned int raw_bit_depth)
{
config->isp_pipe_version = isp_pipe_version;
config->raw_bit_depth = raw_bit_depth;
void
ia_css_ob_encode(
- struct sh_css_isp_ob_params *to,
- const struct ia_css_ob_config *from,
- const struct sh_css_isp_ob_stream_config *config,
- unsigned int size)
+ struct sh_css_isp_ob_params *to,
+ const struct ia_css_ob_config *from,
+ const struct sh_css_isp_ob_stream_config *config,
+ unsigned int size)
{
unsigned int ob_bit_depth
- = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
+ = config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
unsigned int scale = 16 - ob_bit_depth;
(void)size;
void
ia_css_ob_vmem_encode(
- struct sh_css_isp_ob_vmem_params *to,
- const struct ia_css_ob_config *from,
- const struct sh_css_isp_ob_stream_config *config,
- unsigned int size)
+ struct sh_css_isp_ob_vmem_params *to,
+ const struct ia_css_ob_config *from,
+ const struct sh_css_isp_ob_stream_config *config,
+ unsigned int size)
{
struct sh_css_isp_ob_params tmp;
struct sh_css_isp_ob_params *ob = &tmp;
void
ia_css_ob_dump(
- const struct sh_css_isp_ob_params *ob,
- unsigned int level)
+ const struct sh_css_isp_ob_params *ob,
+ unsigned int level)
{
if (!ob) return;
ia_css_debug_dtrace(level, "Optical Black:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob_blacklevel_gr", ob->blacklevel_gr);
+ "ob_blacklevel_gr", ob->blacklevel_gr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob_blacklevel_r", ob->blacklevel_r);
+ "ob_blacklevel_r", ob->blacklevel_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob_blacklevel_b", ob->blacklevel_b);
+ "ob_blacklevel_b", ob->blacklevel_b);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ob_blacklevel_gb", ob->blacklevel_gb);
+ "ob_blacklevel_gb", ob->blacklevel_gb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "obarea_start_bq", ob->area_start_bq);
+ "obarea_start_bq", ob->area_start_bq);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "obarea_length_bq", ob->area_length_bq);
+ "obarea_length_bq", ob->area_length_bq);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "obarea_length_bq_inverse",
- ob->area_length_bq_inverse);
+ "obarea_length_bq_inverse",
+ ob->area_length_bq_inverse);
}
void
ia_css_ob_debug_dtrace(
- const struct ia_css_ob_config *config,
- unsigned int level)
+ const struct ia_css_ob_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.mode=%d, config.level_gr=%d, config.level_r=%d, config.level_b=%d, config.level_gb=%d, config.start_position=%d, config.end_position=%d\n",
- config->mode,
- config->level_gr, config->level_r,
- config->level_b, config->level_gb,
- config->start_position, config->end_position);
+ "config.mode=%d, config.level_gr=%d, config.level_r=%d, config.level_b=%d, config.level_gb=%d, config.start_position=%d, config.end_position=%d\n",
+ config->mode,
+ config->level_gr, config->level_r,
+ config->level_b, config->level_gb,
+ config->start_position, config->end_position);
}
void
ia_css_ob_configure(
- struct sh_css_isp_ob_stream_config *config,
- unsigned int isp_pipe_version,
- unsigned int raw_bit_depth);
+ struct sh_css_isp_ob_stream_config *config,
+ unsigned int isp_pipe_version,
+ unsigned int raw_bit_depth);
void
ia_css_ob_encode(
- struct sh_css_isp_ob_params *to,
- const struct ia_css_ob_config *from,
- const struct sh_css_isp_ob_stream_config *config,
- unsigned int size);
+ struct sh_css_isp_ob_params *to,
+ const struct ia_css_ob_config *from,
+ const struct sh_css_isp_ob_stream_config *config,
+ unsigned int size);
void
ia_css_ob_vmem_encode(
- struct sh_css_isp_ob_vmem_params *to,
- const struct ia_css_ob_config *from,
- const struct sh_css_isp_ob_stream_config *config,
- unsigned int size);
+ struct sh_css_isp_ob_vmem_params *to,
+ const struct ia_css_ob_config *from,
+ const struct sh_css_isp_ob_stream_config *config,
+ unsigned int size);
void
ia_css_ob_dump(
- const struct sh_css_isp_ob_params *ob,
- unsigned int level);
+ const struct sh_css_isp_ob_params *ob,
+ unsigned int level);
void
ia_css_ob_debug_dtrace(
- const struct ia_css_ob_config *config, unsigned int level)
+ const struct ia_css_ob_config *config, unsigned int level)
;
#endif /* __IA_CSS_OB_HOST_H */
.info = (struct ia_css_frame_info *)NULL,
};
-static const struct ia_css_output0_configuration default_output0_configuration = {
+static const struct ia_css_output0_configuration default_output0_configuration
+ = {
.info = (struct ia_css_frame_info *)NULL,
};
-static const struct ia_css_output1_configuration default_output1_configuration = {
+static const struct ia_css_output1_configuration default_output1_configuration
+ = {
.info = (struct ia_css_frame_info *)NULL,
};
void
ia_css_output_encode(
- struct sh_css_isp_output_params *to,
- const struct ia_css_output_config *from,
- unsigned int size)
+ struct sh_css_isp_output_params *to,
+ const struct ia_css_output_config *from,
+ unsigned int size)
{
(void)size;
to->enable_hflip = from->enable_hflip;
void
ia_css_output_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output_configuration *from,
- unsigned int size)
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
void
ia_css_output0_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output0_configuration *from,
- unsigned int size)
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output0_configuration *from,
+ unsigned int size)
{
ia_css_output_config(
- to, (const struct ia_css_output_configuration *)from, size);
+ to, (const struct ia_css_output_configuration *)from, size);
}
void
ia_css_output1_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output1_configuration *from,
- unsigned int size)
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output1_configuration *from,
+ unsigned int size)
{
ia_css_output_config(
- to, (const struct ia_css_output_configuration *)from, size);
+ to, (const struct ia_css_output_configuration *)from, size);
}
void
ia_css_output_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
if (info) {
struct ia_css_output_configuration config =
- default_output_configuration;
+ default_output_configuration;
config.info = info;
void
ia_css_output0_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
if (info) {
struct ia_css_output0_configuration config =
- default_output0_configuration;
+ default_output0_configuration;
config.info = info;
void
ia_css_output1_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
if (info) {
struct ia_css_output1_configuration config =
- default_output1_configuration;
+ default_output1_configuration;
config.info = info;
void
ia_css_output_dump(
- const struct sh_css_isp_output_params *output,
- unsigned int level)
+ const struct sh_css_isp_output_params *output,
+ unsigned int level)
{
if (!output) return;
ia_css_debug_dtrace(level, "Horizontal Output Flip:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "enable", output->enable_hflip);
+ "enable", output->enable_hflip);
ia_css_debug_dtrace(level, "Vertical Output Flip:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "enable", output->enable_vflip);
+ "enable", output->enable_vflip);
}
void
ia_css_output_debug_dtrace(
- const struct ia_css_output_config *config,
- unsigned int level)
+ const struct ia_css_output_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.enable_hflip=%d",
- config->enable_hflip);
+ "config.enable_hflip=%d",
+ config->enable_hflip);
ia_css_debug_dtrace(level,
- "config.enable_vflip=%d",
- config->enable_vflip);
+ "config.enable_vflip=%d",
+ config->enable_vflip);
}
void
ia_css_output_encode(
- struct sh_css_isp_output_params *to,
- const struct ia_css_output_config *from,
- unsigned int size);
+ struct sh_css_isp_output_params *to,
+ const struct ia_css_output_config *from,
+ unsigned int size);
void
ia_css_output_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output_configuration *from,
- unsigned int size);
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output_configuration *from,
+ unsigned int size);
void
ia_css_output0_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output0_configuration *from,
- unsigned int size);
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output0_configuration *from,
+ unsigned int size);
void
ia_css_output1_config(
- struct sh_css_isp_output_isp_config *to,
- const struct ia_css_output1_configuration *from,
- unsigned int size);
+ struct sh_css_isp_output_isp_config *to,
+ const struct ia_css_output1_configuration *from,
+ unsigned int size);
void
ia_css_output_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
void
ia_css_output0_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
void
ia_css_output1_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
void
ia_css_output_dump(
- const struct sh_css_isp_output_params *output,
- unsigned int level);
+ const struct sh_css_isp_output_params *output,
+ unsigned int level);
void
ia_css_output_debug_dtrace(
- const struct ia_css_output_config *config,
- unsigned int level);
+ const struct ia_css_output_config *config,
+ unsigned int level);
#endif /* __IA_CSS_OUTPUT_HOST_H */
void
ia_css_qplane_config(
- struct sh_css_isp_qplane_isp_config *to,
- const struct ia_css_qplane_configuration *from,
- unsigned int size)
+ struct sh_css_isp_qplane_isp_config *to,
+ const struct ia_css_qplane_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
void
ia_css_qplane_configure(
- const struct sh_css_sp_pipeline *pipe,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *info)
+ const struct sh_css_sp_pipeline *pipe,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *info)
{
struct ia_css_qplane_configuration config = default_config;
void
ia_css_qplane_config(
- struct sh_css_isp_qplane_isp_config *to,
- const struct ia_css_qplane_configuration *from,
- unsigned int size);
+ struct sh_css_isp_qplane_isp_config *to,
+ const struct ia_css_qplane_configuration *from,
+ unsigned int size);
void
ia_css_qplane_configure(
- const struct sh_css_sp_pipeline *pipe,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *from);
+ const struct sh_css_sp_pipeline *pipe,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *from);
#endif /* __IA_CSS_QPLANE_HOST_H */
/* MW: These areMIPI / ISYS properties, not camera function properties */
static enum sh_stream_format
-css2isp_stream_format(enum atomisp_input_format from)
-{
- switch (from) {
+css2isp_stream_format(enum atomisp_input_format from) {
+ switch (from)
+ {
case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
- return sh_stream_format_yuv420_legacy;
+ return sh_stream_format_yuv420_legacy;
case ATOMISP_INPUT_FORMAT_YUV420_8:
case ATOMISP_INPUT_FORMAT_YUV420_10:
case ATOMISP_INPUT_FORMAT_YUV420_16:
void
ia_css_raw_config(
- struct sh_css_isp_raw_isp_config *to,
- const struct ia_css_raw_configuration *from,
- unsigned int size)
+ struct sh_css_isp_raw_isp_config *to,
+ const struct ia_css_raw_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
const struct ia_css_frame_info *in_info = from->in_info;
/* Assume divisiblity here, may need to generalize to fixed point. */
assert((in_info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED) ||
- (elems_a % to->port_b.elems == 0));
+ (elems_a % to->port_b.elems == 0));
to->width_a_over_b = elems_a / to->port_b.elems;
to->inout_port_config = from->pipe->inout_port_config;
void
ia_css_raw_configure(
- const struct sh_css_sp_pipeline *pipe,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *in_info,
- const struct ia_css_frame_info *internal_info,
- bool two_ppc,
- bool deinterleaved)
+ const struct sh_css_sp_pipeline *pipe,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *in_info,
+ const struct ia_css_frame_info *internal_info,
+ bool two_ppc,
+ bool deinterleaved)
{
u8 enable_left_padding = (uint8_t)((binary->left_padding) ? 1 : 0);
struct ia_css_raw_configuration config = default_config;
void
ia_css_raw_config(
- struct sh_css_isp_raw_isp_config *to,
- const struct ia_css_raw_configuration *from,
- unsigned int size);
+ struct sh_css_isp_raw_isp_config *to,
+ const struct ia_css_raw_configuration *from,
+ unsigned int size);
void
ia_css_raw_configure(
- const struct sh_css_sp_pipeline *pipe,
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *in_info,
- const struct ia_css_frame_info *internal_info,
- bool two_ppc,
- bool deinterleaved);
+ const struct sh_css_sp_pipeline *pipe,
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *in_info,
+ const struct ia_css_frame_info *internal_info,
+ bool two_ppc,
+ bool deinterleaved);
#endif /* __IA_CSS_RAW_HOST_H */
void
ia_css_raa_encode(
- struct sh_css_isp_aa_params *to,
- const struct ia_css_aa_config *from,
- unsigned int size)
+ struct sh_css_isp_aa_params *to,
+ const struct ia_css_aa_config *from,
+ unsigned int size)
{
(void)size;
(void)to;
void
ia_css_raa_encode(
- struct sh_css_isp_aa_params *to,
- const struct ia_css_aa_config *from,
- unsigned int size);
+ struct sh_css_isp_aa_params *to,
+ const struct ia_css_aa_config *from,
+ unsigned int size);
#endif /* __IA_CSS_RAA_HOST_H */
void
ia_css_ref_config(
- struct sh_css_isp_ref_isp_config *to,
- const struct ia_css_ref_configuration *from,
- unsigned int size)
+ struct sh_css_isp_ref_isp_config *to,
+ const struct ia_css_ref_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS, i;
to->dvs_frame_delay = from->dvs_frame_delay;
for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++) {
if (from->ref_frames[i]) {
- to->ref_frame_addr_y[i] = from->ref_frames[i]->data + from->ref_frames[i]->planes.yuv.y.offset;
- to->ref_frame_addr_c[i] = from->ref_frames[i]->data + from->ref_frames[i]->planes.yuv.u.offset;
+ to->ref_frame_addr_y[i] = from->ref_frames[i]->data +
+ from->ref_frames[i]->planes.yuv.y.offset;
+ to->ref_frame_addr_c[i] = from->ref_frames[i]->data +
+ from->ref_frames[i]->planes.yuv.u.offset;
} else {
to->ref_frame_addr_y[i] = 0;
to->ref_frame_addr_c[i] = 0;
void
ia_css_ref_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame **ref_frames,
- const uint32_t dvs_frame_delay)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame **ref_frames,
+ const uint32_t dvs_frame_delay)
{
struct ia_css_ref_configuration config;
unsigned int i;
void
ia_css_init_ref_state(
- struct sh_css_isp_ref_dmem_state *state,
- unsigned int size)
+ struct sh_css_isp_ref_dmem_state *state,
+ unsigned int size)
{
(void)size;
assert(MAX_NUM_VIDEO_DELAY_FRAMES >= 2);
void
ia_css_ref_config(
- struct sh_css_isp_ref_isp_config *to,
- const struct ia_css_ref_configuration *from,
- unsigned int size);
+ struct sh_css_isp_ref_isp_config *to,
+ const struct ia_css_ref_configuration *from,
+ unsigned int size);
void
ia_css_ref_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame **ref_frames,
- const uint32_t dvs_frame_delay);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame **ref_frames,
+ const uint32_t dvs_frame_delay);
void
ia_css_init_ref_state(
- struct sh_css_isp_ref_dmem_state *state,
- unsigned int size);
+ struct sh_css_isp_ref_dmem_state *state,
+ unsigned int size);
#endif /* __IA_CSS_REF_HOST_H */
void
ia_css_s3a_configure(unsigned int raw_bit_depth)
{
- s3a_raw_bit_depth = raw_bit_depth;
+ s3a_raw_bit_depth = raw_bit_depth;
}
static void
ia_css_ae_encode(
- struct sh_css_isp_ae_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size)
+ struct sh_css_isp_ae_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size)
{
(void)size;
/* coefficients to calculate Y */
static void
ia_css_awb_encode(
- struct sh_css_isp_awb_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size)
+ struct sh_css_isp_awb_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size)
{
(void)size;
/* AWB level gate */
to->lg_high_raw =
- uDIGIT_FITTING(from->awb_lg_high_raw, 16, s3a_raw_bit_depth);
+ uDIGIT_FITTING(from->awb_lg_high_raw, 16, s3a_raw_bit_depth);
to->lg_low =
- uDIGIT_FITTING(from->awb_lg_low, 16, SH_CSS_BAYER_BITS);
+ uDIGIT_FITTING(from->awb_lg_low, 16, SH_CSS_BAYER_BITS);
to->lg_high =
- uDIGIT_FITTING(from->awb_lg_high, 16, SH_CSS_BAYER_BITS);
+ uDIGIT_FITTING(from->awb_lg_high, 16, SH_CSS_BAYER_BITS);
}
static void
ia_css_af_encode(
- struct sh_css_isp_af_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size)
+ struct sh_css_isp_af_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size)
{
unsigned int i;
(void)size;
/* af fir coefficients */
for (i = 0; i < 7; ++i) {
to->fir1[i] =
- sDIGIT_FITTING(from->af_fir1_coef[i], 15,
- SH_CSS_AF_FIR_SHIFT);
+ sDIGIT_FITTING(from->af_fir1_coef[i], 15,
+ SH_CSS_AF_FIR_SHIFT);
to->fir2[i] =
- sDIGIT_FITTING(from->af_fir2_coef[i], 15,
- SH_CSS_AF_FIR_SHIFT);
+ sDIGIT_FITTING(from->af_fir2_coef[i], 15,
+ SH_CSS_AF_FIR_SHIFT);
}
}
void
ia_css_s3a_encode(
- struct sh_css_isp_s3a_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size)
+ struct sh_css_isp_s3a_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size)
{
(void)size;
#if 0
void
ia_css_process_s3a(
- unsigned int pipe_id,
- const struct ia_css_pipeline_stage *stage,
- struct ia_css_isp_parameters *params)
+ unsigned int pipe_id,
+ const struct ia_css_pipeline_stage *stage,
+ struct ia_css_isp_parameters *params)
{
short dmem_offset = stage->binary->info->mem_offsets->dmem.s3a;
if (dmem_offset >= 0) {
ia_css_s3a_encode((struct sh_css_isp_s3a_params *)
- &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
- ¶ms->s3a_config);
+ &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
+ ¶ms->s3a_config);
ia_css_bh_encode((struct sh_css_isp_bh_params *)
- &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
- ¶ms->s3a_config);
+ &stage->isp_mem_params[IA_CSS_ISP_DMEM0].address[dmem_offset],
+ ¶ms->s3a_config);
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM0] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM0] =
+ true;
}
params->isp_params_changed = true;
#ifndef IA_CSS_NO_DEBUG
void
ia_css_ae_dump(
- const struct sh_css_isp_ae_params *ae,
- unsigned int level)
+ const struct sh_css_isp_ae_params *ae,
+ unsigned int level)
{
if (!ae) return;
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ae_y_coef_r", ae->y_coef_r);
+ "ae_y_coef_r", ae->y_coef_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ae_y_coef_g", ae->y_coef_g);
+ "ae_y_coef_g", ae->y_coef_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ae_y_coef_b", ae->y_coef_b);
+ "ae_y_coef_b", ae->y_coef_b);
}
void
ia_css_awb_dump(
- const struct sh_css_isp_awb_params *awb,
- unsigned int level)
+ const struct sh_css_isp_awb_params *awb,
+ unsigned int level)
{
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "awb_lg_high_raw", awb->lg_high_raw);
+ "awb_lg_high_raw", awb->lg_high_raw);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "awb_lg_low", awb->lg_low);
+ "awb_lg_low", awb->lg_low);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "awb_lg_high", awb->lg_high);
+ "awb_lg_high", awb->lg_high);
}
void
ia_css_af_dump(
- const struct sh_css_isp_af_params *af,
- unsigned int level)
+ const struct sh_css_isp_af_params *af,
+ unsigned int level)
{
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[0]", af->fir1[0]);
+ "af_fir1[0]", af->fir1[0]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[1]", af->fir1[1]);
+ "af_fir1[1]", af->fir1[1]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[2]", af->fir1[2]);
+ "af_fir1[2]", af->fir1[2]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[3]", af->fir1[3]);
+ "af_fir1[3]", af->fir1[3]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[4]", af->fir1[4]);
+ "af_fir1[4]", af->fir1[4]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[5]", af->fir1[5]);
+ "af_fir1[5]", af->fir1[5]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir1[6]", af->fir1[6]);
+ "af_fir1[6]", af->fir1[6]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[0]", af->fir2[0]);
+ "af_fir2[0]", af->fir2[0]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[1]", af->fir2[1]);
+ "af_fir2[1]", af->fir2[1]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[2]", af->fir2[2]);
+ "af_fir2[2]", af->fir2[2]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[3]", af->fir2[3]);
+ "af_fir2[3]", af->fir2[3]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[4]", af->fir2[4]);
+ "af_fir2[4]", af->fir2[4]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[5]", af->fir2[5]);
+ "af_fir2[5]", af->fir2[5]);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "af_fir2[6]", af->fir2[6]);
+ "af_fir2[6]", af->fir2[6]);
}
void
ia_css_s3a_dump(
- const struct sh_css_isp_s3a_params *s3a,
- unsigned int level)
+ const struct sh_css_isp_s3a_params *s3a,
+ unsigned int level)
{
ia_css_debug_dtrace(level, "S3A Support:\n");
ia_css_ae_dump(&s3a->ae, level);
void
ia_css_s3a_debug_dtrace(
- const struct ia_css_3a_config *config,
- unsigned int level)
+ const struct ia_css_3a_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.ae_y_coef_r=%d, config.ae_y_coef_g=%d, config.ae_y_coef_b=%d, config.awb_lg_high_raw=%d, config.awb_lg_low=%d, config.awb_lg_high=%d\n",
- config->ae_y_coef_r, config->ae_y_coef_g,
- config->ae_y_coef_b, config->awb_lg_high_raw,
- config->awb_lg_low, config->awb_lg_high);
+ "config.ae_y_coef_r=%d, config.ae_y_coef_g=%d, config.ae_y_coef_b=%d, config.awb_lg_high_raw=%d, config.awb_lg_low=%d, config.awb_lg_high=%d\n",
+ config->ae_y_coef_r, config->ae_y_coef_g,
+ config->ae_y_coef_b, config->awb_lg_high_raw,
+ config->awb_lg_low, config->awb_lg_high);
}
#endif
void
ia_css_s3a_hmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_bh_table *hmem_buf)
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_bh_table *hmem_buf)
{
#if defined(HAS_NO_HMEM)
(void)host_stats;
assert(hmem_buf);
count_for_3a = host_stats->grid.width * host_stats->grid.height
- * host_stats->grid.bqs_per_grid_cell
- * host_stats->grid.bqs_per_grid_cell;
+ * host_stats->grid.bqs_per_grid_cell
+ * host_stats->grid.bqs_per_grid_cell;
out_ptr = host_stats->rgby_data;
void
ia_css_s3a_dmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_3a_output *isp_stats)
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_3a_output *isp_stats)
{
int isp_width, host_width, height, i;
struct ia_css_3a_output *host_ptr;
void
ia_css_s3a_vmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const u16 *isp_stats_hi,
- const uint16_t *isp_stats_lo)
+ struct ia_css_3a_statistics *host_stats,
+ const u16 *isp_stats_hi,
+ const uint16_t *isp_stats_lo)
{
int out_width, out_height, chunk, rest, kmax, y, x, k, elm_start, elm, ofs;
const u16 *hi, *lo;
elm = elm_start + x * sizeof(*output) / sizeof(int32_t);
for (k = 0; k < kmax; k++, elm++) {
output[ofs + k].ae_y = merge_hi_lo_14(
- hi[elm + chunk * 0], lo[elm + chunk * 0]);
+ hi[elm + chunk * 0], lo[elm + chunk * 0]);
output[ofs + k].awb_cnt = merge_hi_lo_14(
- hi[elm + chunk * 1], lo[elm + chunk * 1]);
+ hi[elm + chunk * 1], lo[elm + chunk * 1]);
output[ofs + k].awb_gr = merge_hi_lo_14(
- hi[elm + chunk * 2], lo[elm + chunk * 2]);
+ hi[elm + chunk * 2], lo[elm + chunk * 2]);
output[ofs + k].awb_r = merge_hi_lo_14(
- hi[elm + chunk * 3], lo[elm + chunk * 3]);
+ hi[elm + chunk * 3], lo[elm + chunk * 3]);
output[ofs + k].awb_b = merge_hi_lo_14(
- hi[elm + chunk * 4], lo[elm + chunk * 4]);
+ hi[elm + chunk * 4], lo[elm + chunk * 4]);
output[ofs + k].awb_gb = merge_hi_lo_14(
- hi[elm + chunk * 5], lo[elm + chunk * 5]);
+ hi[elm + chunk * 5], lo[elm + chunk * 5]);
output[ofs + k].af_hpf1 = merge_hi_lo_14(
- hi[elm + chunk * 6], lo[elm + chunk * 6]);
+ hi[elm + chunk * 6], lo[elm + chunk * 6]);
output[ofs + k].af_hpf2 = merge_hi_lo_14(
- hi[elm + chunk * 7], lo[elm + chunk * 7]);
+ hi[elm + chunk * 7], lo[elm + chunk * 7]);
}
x += chunk;
rest -= chunk;
void
ia_css_s3a_configure(
- unsigned int raw_bit_depth);
+ unsigned int raw_bit_depth);
void
ia_css_s3a_encode(
- struct sh_css_isp_s3a_params *to,
- const struct ia_css_3a_config *from,
- unsigned int size);
+ struct sh_css_isp_s3a_params *to,
+ const struct ia_css_3a_config *from,
+ unsigned int size);
#ifndef IA_CSS_NO_DEBUG
void
ia_css_ae_dump(
- const struct sh_css_isp_ae_params *ae,
- unsigned int level);
+ const struct sh_css_isp_ae_params *ae,
+ unsigned int level);
void
ia_css_awb_dump(
- const struct sh_css_isp_awb_params *awb,
- unsigned int level);
+ const struct sh_css_isp_awb_params *awb,
+ unsigned int level);
void
ia_css_af_dump(
- const struct sh_css_isp_af_params *af,
- unsigned int level);
+ const struct sh_css_isp_af_params *af,
+ unsigned int level);
void
ia_css_s3a_dump(
- const struct sh_css_isp_s3a_params *s3a,
- unsigned int level);
+ const struct sh_css_isp_s3a_params *s3a,
+ unsigned int level);
void
ia_css_s3a_debug_dtrace(
- const struct ia_css_3a_config *config,
- unsigned int level);
+ const struct ia_css_3a_config *config,
+ unsigned int level);
#endif
void
ia_css_s3a_hmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_bh_table *hmem_buf);
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_bh_table *hmem_buf);
void
ia_css_s3a_dmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_3a_output *isp_stats);
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_3a_output *isp_stats);
void
ia_css_s3a_vmem_decode(
- struct ia_css_3a_statistics *host_stats,
- const u16 *isp_stats_hi,
- const uint16_t *isp_stats_lo);
+ struct ia_css_3a_statistics *host_stats,
+ const u16 *isp_stats_hi,
+ const uint16_t *isp_stats_lo);
#endif /* __IA_CSS_S3A_HOST_H */
#if defined(SYSTEM_css_skycam_c0_system)
u32 ae_enable; /** ae enabled in binary,
0:disabled, 1:enabled */
- struct ae_public_config_grid_config ae_grd_info; /** see description in ae_public.h*/
+ struct ae_public_config_grid_config
+ ae_grd_info; /** see description in ae_public.h*/
u32 awb_enable; /** awb enabled in binary,
0:disabled, 1:enabled */
- struct awb_public_config_grid_config awb_grd_info; /** see description in awb_public.h*/
+ struct awb_public_config_grid_config
+ awb_grd_info; /** see description in awb_public.h*/
u32 af_enable; /** af enabled in binary,
0:disabled, 1:enabled */
u32 awb_fr_enable; /** awb_fr enabled in binary,
0:disabled, 1:enabled */
- struct awb_fr_public_grid_config awb_fr_grd_info;/** see description in awb_fr_public.h*/
+ struct awb_fr_public_grid_config
+ awb_fr_grd_info;/** see description in awb_fr_public.h*/
u32 elem_bit_depth; /** TODO:Taken from BYT - need input from AIQ
if needed for SKC
* using the provided configuration (ia_css_3a_config).
*/
struct ia_css_3a_statistics {
- struct ia_css_3a_grid_info grid; /** grid info contains the dimensions of the 3A grid */
- struct ia_css_3a_output *data; /** the pointer to 3a_output[grid.width * grid.height]
+ struct ia_css_3a_grid_info
+ grid; /** grid info contains the dimensions of the 3A grid */
+ struct ia_css_3a_output
+ *data; /** the pointer to 3a_output[grid.width * grid.height]
containing the 3A statistics */
struct ia_css_3a_rgby_output *rgby_data;/** the pointer to 3a_rgby_output[256]
containing the histogram */
void
ia_css_sc_encode(
- struct sh_css_isp_sc_params *to,
- struct ia_css_shading_table **from,
- unsigned int size)
+ struct sh_css_isp_sc_params *to,
+ struct ia_css_shading_table **from,
+ unsigned int size)
{
(void)size;
to->gain_shift = (*from)->fraction_bits;
void
ia_css_sc_dump(
- const struct sh_css_isp_sc_params *sc,
- unsigned int level)
+ const struct sh_css_isp_sc_params *sc,
+ unsigned int level)
{
if (!sc) return;
ia_css_debug_dtrace(level, "Shading Correction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "sc_gain_shift", sc->gain_shift);
+ "sc_gain_shift", sc->gain_shift);
}
#ifdef ISP2401
void
ia_css_sc_config(
- struct sh_css_isp_sc_isp_config *to,
- const struct ia_css_sc_configuration *from,
- unsigned int size)
+ struct sh_css_isp_sc_isp_config *to,
+ const struct ia_css_sc_configuration *from,
+ unsigned int size)
{
u32 internal_org_x_bqs = from->internal_frame_origin_x_bqs_on_sctbl;
u32 internal_org_y_bqs = from->internal_frame_origin_y_bqs_on_sctbl;
void
ia_css_sc_configure(
- const struct ia_css_binary *binary,
- u32 internal_frame_origin_x_bqs_on_sctbl,
- uint32_t internal_frame_origin_y_bqs_on_sctbl)
+ const struct ia_css_binary *binary,
+ u32 internal_frame_origin_x_bqs_on_sctbl,
+ uint32_t internal_frame_origin_y_bqs_on_sctbl)
{
const struct ia_css_sc_configuration config = {
internal_frame_origin_x_bqs_on_sctbl,
- internal_frame_origin_y_bqs_on_sctbl };
+ internal_frame_origin_y_bqs_on_sctbl
+ };
ia_css_configure_sc(binary, &config);
}
for the ia_css_shading_settings structure. (michie) */
void
sh_css_get_shading_settings(const struct ia_css_isp_parameters *params,
- struct ia_css_shading_settings *settings)
+ struct ia_css_shading_settings *settings)
{
if (!settings)
return;
assert(params);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_get_shading_settings() enter: settings=%p\n", settings);
+ "ia_css_get_shading_settings() enter: settings=%p\n", settings);
*settings = params->shading_settings;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_get_shading_settings() leave: settings.enable_shading_table_conversion=%d\n",
- settings->enable_shading_table_conversion);
+ "ia_css_get_shading_settings() leave: settings.enable_shading_table_conversion=%d\n",
+ settings->enable_shading_table_conversion);
}
void
sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
- const struct ia_css_shading_settings *settings)
+ const struct ia_css_shading_settings *settings)
{
if (!settings)
return;
assert(params);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_set_shading_settings() enter: settings.enable_shading_table_conversion=%d\n",
- settings->enable_shading_table_conversion);
+ "ia_css_set_shading_settings() enter: settings.enable_shading_table_conversion=%d\n",
+ settings->enable_shading_table_conversion);
params->shading_settings = *settings;
params->shading_settings_changed = true;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_set_shading_settings() leave: return_void\n");
+ "ia_css_set_shading_settings() leave: return_void\n");
}
/* ------ deprecated(bz675) : to ------ */
void
ia_css_sc_encode(
- struct sh_css_isp_sc_params *to,
- struct ia_css_shading_table **from,
- unsigned int size);
+ struct sh_css_isp_sc_params *to,
+ struct ia_css_shading_table **from,
+ unsigned int size);
void
ia_css_sc_dump(
- const struct sh_css_isp_sc_params *sc,
- unsigned int level);
+ const struct sh_css_isp_sc_params *sc,
+ unsigned int level);
#ifdef ISP2401
/* @brief Configure the shading correction.
*/
void
ia_css_sc_config(
- struct sh_css_isp_sc_isp_config *to,
- const struct ia_css_sc_configuration *from,
- unsigned int size);
+ struct sh_css_isp_sc_isp_config *to,
+ const struct ia_css_sc_configuration *from,
+ unsigned int size);
/* @brief Configure the shading correction.
* @param[in] binary The binary, which has the shading correction.
*/
void
ia_css_sc_configure(
- const struct ia_css_binary *binary,
- u32 internal_frame_origin_x_bqs_on_sctbl,
- uint32_t internal_frame_origin_y_bqs_on_sctbl);
+ const struct ia_css_binary *binary,
+ u32 internal_frame_origin_x_bqs_on_sctbl,
+ uint32_t internal_frame_origin_y_bqs_on_sctbl);
#endif
/* ------ deprecated(bz675) : from ------ */
void
sh_css_get_shading_settings(const struct ia_css_isp_parameters *params,
- struct ia_css_shading_settings *settings);
+ struct ia_css_shading_settings *settings);
void
sh_css_set_shading_settings(struct ia_css_isp_parameters *params,
- const struct ia_css_shading_settings *settings);
+ const struct ia_css_shading_settings *settings);
/* ------ deprecated(bz675) : to ------ */
#endif /* __IA_CSS_SC_HOST_H */
struct ia_css_shading_table {
u32 enable; /** Set to false for no shading correction.
The data field can be NULL when enable == true */
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
u32 sensor_width; /** Native sensor width in pixels. */
u32 sensor_height; /** Native sensor height in lines.
When shading_settings.enable_shading_table_conversion is set
These are used only in the legacy shading table conversion
in the css, when shading_settings.
enable_shading_table_conversion is set as 1. */
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
u32 width; /** Number of data points per line per color.
u8.0, [0,81] */
u32 height; /** Number of lines of data points per color.
struct ia_css_sc_configuration {
u32 internal_frame_origin_x_bqs_on_sctbl; /** Origin X (in bqs) of internal frame on shading table. */
u32 internal_frame_origin_y_bqs_on_sctbl; /** Origin Y (in bqs) of internal frame on shading table. */
- /** NOTE: bqs = size in BQ(Bayer Quad) unit.
- 1BQ means {Gr,R,B,Gb}(2x2 pixels).
- Horizontal 1 bqs corresponds to horizontal 2 pixels.
- Vertical 1 bqs corresponds to vertical 2 pixels. */
+ /** NOTE: bqs = size in BQ(Bayer Quad) unit.
+ 1BQ means {Gr,R,B,Gb}(2x2 pixels).
+ Horizontal 1 bqs corresponds to horizontal 2 pixels.
+ Vertical 1 bqs corresponds to vertical 2 pixels. */
};
#endif
/* Array cannot be 2-dimensional, since driver ddr allocation does not know stride */
struct sh_css_isp_sdis_hori_proj_tbl {
- s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_HOR_PROJ_NUM_ISP];
+ s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_HOR_PROJ_NUM_ISP];
#if DVS2_PROJ_MARGIN > 0
- s32 margin[DVS2_PROJ_MARGIN];
+ s32 margin[DVS2_PROJ_MARGIN];
#endif
};
struct sh_css_isp_sdis_vert_proj_tbl {
- s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_VER_PROJ_NUM_ISP];
+ s32 tbl[ISP_DVS_NUM_COEF_TYPES * ISP_MAX_SDIS_VER_PROJ_NUM_ISP];
#if DVS2_PROJ_MARGIN > 0
- s32 margin[DVS2_PROJ_MARGIN];
+ s32 margin[DVS2_PROJ_MARGIN];
#endif
};
struct sh_css_isp_sdis_hori_coef_tbl {
- VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES], ISP_MAX_SDIS_HOR_COEF_NUM_VECS * ISP_NWAY);
+ VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES],
+ ISP_MAX_SDIS_HOR_COEF_NUM_VECS *ISP_NWAY);
};
struct sh_css_isp_sdis_vert_coef_tbl {
- VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES], ISP_MAX_SDIS_VER_COEF_NUM_VECS * ISP_NWAY);
+ VMEM_ARRAY(tbl[ISP_DVS_NUM_COEF_TYPES],
+ ISP_MAX_SDIS_VER_COEF_NUM_VECS *ISP_NWAY);
};
#endif /* defined(__ISP) || defined (MK_FIRMWARE) */
#ifndef PIPE_GENERATION
struct s_sdis_config {
- unsigned int horicoef_vectors;
- unsigned int vertcoef_vectors;
- unsigned int horiproj_num;
- unsigned int vertproj_num;
+ unsigned int horicoef_vectors;
+ unsigned int vertcoef_vectors;
+ unsigned int horiproj_num;
+ unsigned int vertproj_num;
};
extern struct s_sdis_config sdis_config;
/** DVS statistics global configuration (kappa, match, binning) */
struct dvs_stat_public_dvs_grd_cfg grd_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
/** DVS statistics grid configuration (blocks and grids) */
- struct dvs_stat_public_dvs_level_fe_roi_cfg fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
+ struct dvs_stat_public_dvs_level_fe_roi_cfg
+ fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS];
/** DVS statistics FE ROI (region of interest) configuration */
};
};
static void
-fill_row(short *private, const short *public, unsigned int width, unsigned int padding)
+fill_row(short *private, const short *public, unsigned int width,
+ unsigned int padding)
{
assert((int)width >= 0);
assert((int)padding >= 0);
}
void ia_css_sdis_horicoef_vmem_encode(
- struct sh_css_isp_sdis_hori_coef_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_hori_coef_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size)
{
- unsigned int aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
+ unsigned int aligned_width = from->grid.aligned_width *
+ from->grid.bqs_per_grid_cell;
unsigned int width = from->grid.num_hor_coefs;
int padding = aligned_width - width;
unsigned int stride = size / IA_CSS_DVS_NUM_COEF_TYPES / sizeof(short);
- unsigned int total_bytes = aligned_width * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(short);
+ unsigned int total_bytes = aligned_width * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(
+ short);
short *public = from->hor_coefs;
short *private = (short *)to;
unsigned int type;
/* Copy the table, add padding */
assert(padding >= 0);
assert(total_bytes <= size);
- assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+ assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+ short)) == 0);
for (type = 0; type < IA_CSS_DVS_NUM_COEF_TYPES; type++) {
fill_row(&private[type * stride], &public[type * width], width, padding);
}
void ia_css_sdis_vertcoef_vmem_encode(
- struct sh_css_isp_sdis_vert_coef_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_vert_coef_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size)
{
- unsigned int aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
+ unsigned int aligned_height = from->grid.aligned_height *
+ from->grid.bqs_per_grid_cell;
unsigned int height = from->grid.num_ver_coefs;
int padding = aligned_height - height;
unsigned int stride = size / IA_CSS_DVS_NUM_COEF_TYPES / sizeof(short);
- unsigned int total_bytes = aligned_height * IA_CSS_DVS_NUM_COEF_TYPES * sizeof(short);
+ unsigned int total_bytes = aligned_height * IA_CSS_DVS_NUM_COEF_TYPES *
+ sizeof(short);
short *public = from->ver_coefs;
short *private = (short *)to;
unsigned int type;
/* Copy the table, add padding */
assert(padding >= 0);
assert(total_bytes <= size);
- assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+ assert(size % (IA_CSS_DVS_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+ short)) == 0);
for (type = 0; type < IA_CSS_DVS_NUM_COEF_TYPES; type++) {
fill_row(&private[type * stride], &public[type * height], height, padding);
}
void ia_css_sdis_horiproj_encode(
- struct sh_css_isp_sdis_hori_proj_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_hori_proj_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size)
{
(void)to;
(void)from;
}
void ia_css_sdis_vertproj_encode(
- struct sh_css_isp_sdis_vert_proj_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_vert_proj_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size)
{
(void)to;
(void)from;
}
void ia_css_get_isp_dis_coefficients(
- struct ia_css_stream *stream,
- short *horizontal_coefficients,
- short *vertical_coefficients)
+ struct ia_css_stream *stream,
+ short *horizontal_coefficients,
+ short *vertical_coefficients)
{
struct ia_css_isp_parameters *params;
unsigned int hor_num_isp, ver_num_isp;
for (i = 0; i < IA_CSS_DVS_NUM_COEF_TYPES; i++) {
fill_row(&horizontal_coefficients[i * hor_num_isp],
- ¶ms->dvs_coefs.hor_coefs[i * hor_num_3a], hor_num_3a, hor_num_isp - hor_num_3a);
+ ¶ms->dvs_coefs.hor_coefs[i * hor_num_3a], hor_num_3a,
+ hor_num_isp - hor_num_3a);
}
for (i = 0; i < SH_CSS_DIS_VER_NUM_COEF_TYPES(dvs_binary); i++) {
fill_row(&vertical_coefficients[i * ver_num_isp],
- ¶ms->dvs_coefs.ver_coefs[i * ver_num_3a], ver_num_3a, ver_num_isp - ver_num_3a);
+ ¶ms->dvs_coefs.ver_coefs[i * ver_num_3a], ver_num_3a,
+ ver_num_isp - ver_num_3a);
}
IA_CSS_LEAVE("void");
size_t
ia_css_sdis_hor_coef_tbl_bytes(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
if (binary->info->sp.pipeline.isp_pipe_version == 1)
return sizeof(short) * IA_CSS_DVS_NUM_COEF_TYPES * binary->dis.coef.pad.width;
size_t
ia_css_sdis_ver_coef_tbl_bytes(
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
{
- return sizeof(short) * SH_CSS_DIS_VER_NUM_COEF_TYPES(binary) * binary->dis.coef.pad.height;
+ return sizeof(short) * SH_CSS_DIS_VER_NUM_COEF_TYPES(binary) *
+ binary->dis.coef.pad.height;
}
void
ia_css_sdis_init_info(
- struct ia_css_sdis_info *dis,
- unsigned int sc_3a_dis_width,
- unsigned int sc_3a_dis_padded_width,
- unsigned int sc_3a_dis_height,
- unsigned int isp_pipe_version,
- unsigned int enabled)
+ struct ia_css_sdis_info *dis,
+ unsigned int sc_3a_dis_width,
+ unsigned int sc_3a_dis_padded_width,
+ unsigned int sc_3a_dis_height,
+ unsigned int isp_pipe_version,
+ unsigned int enabled)
{
if (!enabled) {
*dis = (struct ia_css_sdis_info) { };
dis->deci_factor_log2 = SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->grid.dim.width =
- _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+ _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->grid.dim.height =
- _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+ _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->grid.pad.width =
- CEIL_SHIFT(_ISP_BQS(sc_3a_dis_padded_width), SH_CSS_DIS_DECI_FACTOR_LOG2);
+ CEIL_SHIFT(_ISP_BQS(sc_3a_dis_padded_width), SH_CSS_DIS_DECI_FACTOR_LOG2);
dis->grid.pad.height =
- CEIL_SHIFT(_ISP_BQS(sc_3a_dis_height), SH_CSS_DIS_DECI_FACTOR_LOG2);
+ CEIL_SHIFT(_ISP_BQS(sc_3a_dis_height), SH_CSS_DIS_DECI_FACTOR_LOG2);
dis->coef.dim.width =
- (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) << SH_CSS_DIS_DECI_FACTOR_LOG2;
+ (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) <<
+ SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->coef.dim.height =
- (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2) << SH_CSS_DIS_DECI_FACTOR_LOG2;
+ (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2) <<
+ SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->coef.pad.width =
- __ISP_SDIS_HOR_COEF_NUM_VECS(sc_3a_dis_padded_width) * ISP_VEC_NELEMS;
+ __ISP_SDIS_HOR_COEF_NUM_VECS(sc_3a_dis_padded_width) * ISP_VEC_NELEMS;
dis->coef.pad.height =
- __ISP_SDIS_VER_COEF_NUM_VECS(sc_3a_dis_height) * ISP_VEC_NELEMS;
+ __ISP_SDIS_VER_COEF_NUM_VECS(sc_3a_dis_height) * ISP_VEC_NELEMS;
if (isp_pipe_version == 1) {
dis->proj.dim.width =
- _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+ _ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
dis->proj.dim.height =
- _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
+ _ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2;
} else {
dis->proj.dim.width =
- (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
- (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
+ (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
+ (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
dis->proj.dim.height =
- (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
- (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
+ (_ISP_BQS(sc_3a_dis_width) >> SH_CSS_DIS_DECI_FACTOR_LOG2) *
+ (_ISP_BQS(sc_3a_dis_height) >> SH_CSS_DIS_DECI_FACTOR_LOG2);
}
dis->proj.pad.width =
- __ISP_SDIS_HOR_PROJ_NUM_ISP(sc_3a_dis_padded_width,
- sc_3a_dis_height,
- SH_CSS_DIS_DECI_FACTOR_LOG2,
- isp_pipe_version);
+ __ISP_SDIS_HOR_PROJ_NUM_ISP(sc_3a_dis_padded_width,
+ sc_3a_dis_height,
+ SH_CSS_DIS_DECI_FACTOR_LOG2,
+ isp_pipe_version);
dis->proj.pad.height =
- __ISP_SDIS_VER_PROJ_NUM_ISP(sc_3a_dis_padded_width,
- SH_CSS_DIS_DECI_FACTOR_LOG2);
+ __ISP_SDIS_VER_PROJ_NUM_ISP(sc_3a_dis_padded_width,
+ SH_CSS_DIS_DECI_FACTOR_LOG2);
}
void ia_css_sdis_clear_coefficients(
- struct ia_css_dvs_coefficients *dvs_coefs)
+ struct ia_css_dvs_coefficients *dvs_coefs)
{
dvs_coefs->hor_coefs = NULL;
dvs_coefs->ver_coefs = NULL;
enum ia_css_err
ia_css_get_dvs_statistics(
- struct ia_css_dvs_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics *isp_stats)
-{
+ struct ia_css_dvs_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics *isp_stats) {
struct ia_css_isp_dvs_statistics_map *map;
enum ia_css_err ret = IA_CSS_SUCCESS;
assert(isp_stats);
map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
- if (map) {
+ if (map)
+ {
mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
ia_css_translate_dvs_statistics(host_stats, map);
ia_css_isp_dvs_statistics_map_free(map);
- } else {
+ } else
+ {
IA_CSS_ERROR("out of memory");
ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
void
ia_css_translate_dvs_statistics(
- struct ia_css_dvs_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats)
+ struct ia_css_dvs_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats)
{
unsigned int hor_num_isp, ver_num_isp, hor_num_dvs, ver_num_dvs, i;
s32 *hor_ptr_dvs, *ver_ptr_dvs, *hor_ptr_isp, *ver_ptr_isp;
struct ia_css_isp_dvs_statistics *
ia_css_isp_dvs_statistics_allocate(
- const struct ia_css_dvs_grid_info *grid)
+ const struct ia_css_dvs_grid_info *grid)
{
struct ia_css_isp_dvs_statistics *me;
int hor_size, ver_size;
if (!me)
goto err;
- hor_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES * grid->aligned_height,
+ hor_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES *
+ grid->aligned_height,
HIVE_ISP_DDR_WORD_BYTES);
- ver_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES * grid->aligned_width,
+ ver_size = CEIL_MUL(sizeof(int) * IA_CSS_DVS_NUM_COEF_TYPES *
+ grid->aligned_width,
HIVE_ISP_DDR_WORD_BYTES);
me->size = hor_size + ver_size;
struct ia_css_isp_dvs_statistics_map *
ia_css_isp_dvs_statistics_map_allocate(
- const struct ia_css_isp_dvs_statistics *isp_stats,
- void *data_ptr)
+ const struct ia_css_isp_dvs_statistics *isp_stats,
+ void *data_ptr)
{
struct ia_css_isp_dvs_statistics_map *me;
/* Windows compiler does not like adding sizes to a void *
}
void ia_css_sdis_horicoef_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level)
+ const struct ia_css_dvs_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis_vertcoef_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level)
+ const struct ia_css_dvs_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis_horiproj_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level)
+ const struct ia_css_dvs_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis_vertproj_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level)
+ const struct ia_css_dvs_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
struct sh_css_isp_sdis_vert_proj_tbl;
void ia_css_sdis_horicoef_vmem_encode(
- struct sh_css_isp_sdis_hori_coef_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_hori_coef_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size);
void ia_css_sdis_vertcoef_vmem_encode(
- struct sh_css_isp_sdis_vert_coef_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_vert_coef_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size);
void ia_css_sdis_horiproj_encode(
- struct sh_css_isp_sdis_hori_proj_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_hori_proj_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size);
void ia_css_sdis_vertproj_encode(
- struct sh_css_isp_sdis_vert_proj_tbl *to,
- const struct ia_css_dvs_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_vert_proj_tbl *to,
+ const struct ia_css_dvs_coefficients *from,
+ unsigned int size);
void ia_css_get_isp_dis_coefficients(
- struct ia_css_stream *stream,
- short *horizontal_coefficients,
- short *vertical_coefficients);
+ struct ia_css_stream *stream,
+ short *horizontal_coefficients,
+ short *vertical_coefficients);
enum ia_css_err
ia_css_get_dvs_statistics(
- struct ia_css_dvs_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics *isp_stats);
+ struct ia_css_dvs_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics *isp_stats);
void
ia_css_translate_dvs_statistics(
- struct ia_css_dvs_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats);
+ struct ia_css_dvs_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats);
struct ia_css_isp_dvs_statistics *
ia_css_isp_dvs_statistics_allocate(
- const struct ia_css_dvs_grid_info *grid);
+ const struct ia_css_dvs_grid_info *grid);
void
ia_css_isp_dvs_statistics_free(
- struct ia_css_isp_dvs_statistics *me);
+ struct ia_css_isp_dvs_statistics *me);
size_t ia_css_sdis_hor_coef_tbl_bytes(const struct ia_css_binary *binary);
size_t ia_css_sdis_ver_coef_tbl_bytes(const struct ia_css_binary *binary);
void
ia_css_sdis_init_info(
- struct ia_css_sdis_info *dis,
- unsigned int sc_3a_dis_width,
- unsigned int sc_3a_dis_padded_width,
- unsigned int sc_3a_dis_height,
- unsigned int isp_pipe_version,
- unsigned int enabled);
+ struct ia_css_sdis_info *dis,
+ unsigned int sc_3a_dis_width,
+ unsigned int sc_3a_dis_padded_width,
+ unsigned int sc_3a_dis_height,
+ unsigned int isp_pipe_version,
+ unsigned int enabled);
void ia_css_sdis_clear_coefficients(
- struct ia_css_dvs_coefficients *dvs_coefs);
+ struct ia_css_dvs_coefficients *dvs_coefs);
void ia_css_sdis_horicoef_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level);
+ const struct ia_css_dvs_coefficients *config, unsigned int level);
void ia_css_sdis_vertcoef_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level);
+ const struct ia_css_dvs_coefficients *config, unsigned int level);
void ia_css_sdis_horiproj_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level);
+ const struct ia_css_dvs_coefficients *config, unsigned int level);
void ia_css_sdis_vertproj_debug_dtrace(
- const struct ia_css_dvs_coefficients *config, unsigned int level);
+ const struct ia_css_dvs_coefficients *config, unsigned int level);
#endif /* __IA_CSS_SDIS_HOST_H */
*/
struct ia_css_dvs_coefficients {
- struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
+ struct ia_css_dvs_grid_info
+ grid;/** grid info contains the dimensions of the dvs grid */
s16 *hor_coefs; /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
containing the horizontal coefficients */
s16 *ver_coefs; /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES]
*/
struct ia_css_dvs_statistics {
- struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */
+ struct ia_css_dvs_grid_info
+ grid;/** grid info contains the dimensions of the dvs grid */
s32 *hor_proj; /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES]
containing the horizontal projections */
s32 *ver_proj; /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES]
};
static void
-fill_row(short *private, const short *public, unsigned int width, unsigned int padding)
+fill_row(short *private, const short *public, unsigned int width,
+ unsigned int padding)
{
memcpy(private, public, width * sizeof(short));
memset(&private[width], 0, padding * sizeof(short));
}
void ia_css_sdis2_horicoef_vmem_encode(
- struct sh_css_isp_sdis_hori_coef_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_hori_coef_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size)
{
- unsigned int aligned_width = from->grid.aligned_width * from->grid.bqs_per_grid_cell;
+ unsigned int aligned_width = from->grid.aligned_width *
+ from->grid.bqs_per_grid_cell;
unsigned int width = from->grid.num_hor_coefs;
int padding = aligned_width - width;
unsigned int stride = size / IA_CSS_DVS2_NUM_COEF_TYPES / sizeof(short);
- unsigned int total_bytes = aligned_width * IA_CSS_DVS2_NUM_COEF_TYPES * sizeof(short);
+ unsigned int total_bytes = aligned_width * IA_CSS_DVS2_NUM_COEF_TYPES *
+ sizeof(short);
short *private = (short *)to;
/* Copy the table, add padding */
assert(padding >= 0);
assert(total_bytes <= size);
- assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+ assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+ short)) == 0);
fill_row(&private[0 * stride], from->hor_coefs.odd_real, width, padding);
fill_row(&private[1 * stride], from->hor_coefs.odd_imag, width, padding);
fill_row(&private[2 * stride], from->hor_coefs.even_real, width, padding);
}
void ia_css_sdis2_vertcoef_vmem_encode(
- struct sh_css_isp_sdis_vert_coef_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_vert_coef_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size)
{
- unsigned int aligned_height = from->grid.aligned_height * from->grid.bqs_per_grid_cell;
+ unsigned int aligned_height = from->grid.aligned_height *
+ from->grid.bqs_per_grid_cell;
unsigned int height = from->grid.num_ver_coefs;
int padding = aligned_height - height;
unsigned int stride = size / IA_CSS_DVS2_NUM_COEF_TYPES / sizeof(short);
- unsigned int total_bytes = aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES * sizeof(short);
+ unsigned int total_bytes = aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES *
+ sizeof(short);
short *private = (short *)to;
/* Copy the table, add padding */
assert(padding >= 0);
assert(total_bytes <= size);
- assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(short)) == 0);
+ assert(size % (IA_CSS_DVS2_NUM_COEF_TYPES * ISP_VEC_NELEMS * sizeof(
+ short)) == 0);
fill_row(&private[0 * stride], from->ver_coefs.odd_real, height, padding);
fill_row(&private[1 * stride], from->ver_coefs.odd_imag, height, padding);
fill_row(&private[2 * stride], from->ver_coefs.even_real, height, padding);
}
void ia_css_sdis2_horiproj_encode(
- struct sh_css_isp_sdis_hori_proj_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_hori_proj_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size)
{
(void)to;
(void)from;
}
void ia_css_sdis2_vertproj_encode(
- struct sh_css_isp_sdis_vert_proj_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size)
+ struct sh_css_isp_sdis_vert_proj_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size)
{
(void)to;
(void)from;
}
void ia_css_get_isp_dvs2_coefficients(
- struct ia_css_stream *stream,
- short *hor_coefs_odd_real,
- short *hor_coefs_odd_imag,
- short *hor_coefs_even_real,
- short *hor_coefs_even_imag,
- short *ver_coefs_odd_real,
- short *ver_coefs_odd_imag,
- short *ver_coefs_even_real,
- short *ver_coefs_even_imag)
+ struct ia_css_stream *stream,
+ short *hor_coefs_odd_real,
+ short *hor_coefs_odd_imag,
+ short *hor_coefs_even_real,
+ short *hor_coefs_even_imag,
+ short *ver_coefs_odd_real,
+ short *ver_coefs_odd_imag,
+ short *ver_coefs_even_real,
+ short *ver_coefs_even_imag)
{
struct ia_css_isp_parameters *params;
unsigned int hor_num_3a, ver_num_3a;
hor_num_isp = dvs_binary->dis.coef.pad.width;
ver_num_isp = dvs_binary->dis.coef.pad.height;
- memcpy(hor_coefs_odd_real, params->dvs2_coefs.hor_coefs.odd_real, hor_num_3a * sizeof(short));
- memcpy(hor_coefs_odd_imag, params->dvs2_coefs.hor_coefs.odd_imag, hor_num_3a * sizeof(short));
- memcpy(hor_coefs_even_real, params->dvs2_coefs.hor_coefs.even_real, hor_num_3a * sizeof(short));
- memcpy(hor_coefs_even_imag, params->dvs2_coefs.hor_coefs.even_imag, hor_num_3a * sizeof(short));
- memcpy(ver_coefs_odd_real, params->dvs2_coefs.ver_coefs.odd_real, ver_num_3a * sizeof(short));
- memcpy(ver_coefs_odd_imag, params->dvs2_coefs.ver_coefs.odd_imag, ver_num_3a * sizeof(short));
- memcpy(ver_coefs_even_real, params->dvs2_coefs.ver_coefs.even_real, ver_num_3a * sizeof(short));
- memcpy(ver_coefs_even_imag, params->dvs2_coefs.ver_coefs.even_imag, ver_num_3a * sizeof(short));
+ memcpy(hor_coefs_odd_real, params->dvs2_coefs.hor_coefs.odd_real,
+ hor_num_3a * sizeof(short));
+ memcpy(hor_coefs_odd_imag, params->dvs2_coefs.hor_coefs.odd_imag,
+ hor_num_3a * sizeof(short));
+ memcpy(hor_coefs_even_real, params->dvs2_coefs.hor_coefs.even_real,
+ hor_num_3a * sizeof(short));
+ memcpy(hor_coefs_even_imag, params->dvs2_coefs.hor_coefs.even_imag,
+ hor_num_3a * sizeof(short));
+ memcpy(ver_coefs_odd_real, params->dvs2_coefs.ver_coefs.odd_real,
+ ver_num_3a * sizeof(short));
+ memcpy(ver_coefs_odd_imag, params->dvs2_coefs.ver_coefs.odd_imag,
+ ver_num_3a * sizeof(short));
+ memcpy(ver_coefs_even_real, params->dvs2_coefs.ver_coefs.even_real,
+ ver_num_3a * sizeof(short));
+ memcpy(ver_coefs_even_imag, params->dvs2_coefs.ver_coefs.even_imag,
+ ver_num_3a * sizeof(short));
IA_CSS_LEAVE("void");
}
void ia_css_sdis2_clear_coefficients(
- struct ia_css_dvs2_coefficients *dvs2_coefs)
+ struct ia_css_dvs2_coefficients *dvs2_coefs)
{
dvs2_coefs->hor_coefs.odd_real = NULL;
dvs2_coefs->hor_coefs.odd_imag = NULL;
enum ia_css_err
ia_css_get_dvs2_statistics(
- struct ia_css_dvs2_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics *isp_stats)
-{
+ struct ia_css_dvs2_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics *isp_stats) {
struct ia_css_isp_dvs_statistics_map *map;
enum ia_css_err ret = IA_CSS_SUCCESS;
assert(isp_stats);
map = ia_css_isp_dvs_statistics_map_allocate(isp_stats, NULL);
- if (map) {
+ if (map)
+ {
mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
ia_css_translate_dvs2_statistics(host_stats, map);
ia_css_isp_dvs_statistics_map_free(map);
- } else {
+ } else
+ {
IA_CSS_ERROR("out of memory");
ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
void
ia_css_translate_dvs2_statistics(
- struct ia_css_dvs2_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats)
+ struct ia_css_dvs2_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats)
{
unsigned int size_bytes, table_width, table_size, height;
unsigned int src_offset = 0, dst_offset = 0;
assert(isp_stats->ver_proj);
IA_CSS_ENTER("hor_coefs.odd_real=%p, hor_coefs.odd_imag=%p, hor_coefs.even_real=%p, hor_coefs.even_imag=%p, ver_coefs.odd_real=%p, ver_coefs.odd_imag=%p, ver_coefs.even_real=%p, ver_coefs.even_imag=%p, haddr=%p, vaddr=%p",
- host_stats->hor_prod.odd_real, host_stats->hor_prod.odd_imag,
- host_stats->hor_prod.even_real, host_stats->hor_prod.even_imag,
- host_stats->ver_prod.odd_real, host_stats->ver_prod.odd_imag,
- host_stats->ver_prod.even_real, host_stats->ver_prod.even_imag,
- isp_stats->hor_proj, isp_stats->ver_proj);
+ host_stats->hor_prod.odd_real, host_stats->hor_prod.odd_imag,
+ host_stats->hor_prod.even_real, host_stats->hor_prod.even_imag,
+ host_stats->ver_prod.odd_real, host_stats->ver_prod.odd_imag,
+ host_stats->ver_prod.even_real, host_stats->ver_prod.even_imag,
+ isp_stats->hor_proj, isp_stats->ver_proj);
/* Host side: reflecting the true width in bytes */
size_bytes = host_stats->grid.aligned_width * sizeof(*htemp_ptr);
/* DDR side: need to be aligned to the system bus width */
/* statistics table width in terms of 32-bit words*/
- table_width = CEIL_MUL(size_bytes, HIVE_ISP_DDR_WORD_BYTES) / sizeof(*htemp_ptr);
+ table_width = CEIL_MUL(size_bytes,
+ HIVE_ISP_DDR_WORD_BYTES) / sizeof(*htemp_ptr);
table_size = table_width * host_stats->grid.aligned_height;
htemp_ptr = isp_stats->hor_proj; /* horizontal stats */
for (height = 0; height < host_stats->grid.aligned_height; height++) {
/* hor stats */
memcpy(host_stats->hor_prod.odd_real + dst_offset,
- &htemp_ptr[0 * table_size + src_offset], size_bytes);
+ &htemp_ptr[0 * table_size + src_offset], size_bytes);
memcpy(host_stats->hor_prod.odd_imag + dst_offset,
- &htemp_ptr[1 * table_size + src_offset], size_bytes);
+ &htemp_ptr[1 * table_size + src_offset], size_bytes);
memcpy(host_stats->hor_prod.even_real + dst_offset,
- &htemp_ptr[2 * table_size + src_offset], size_bytes);
+ &htemp_ptr[2 * table_size + src_offset], size_bytes);
memcpy(host_stats->hor_prod.even_imag + dst_offset,
- &htemp_ptr[3 * table_size + src_offset], size_bytes);
+ &htemp_ptr[3 * table_size + src_offset], size_bytes);
/* ver stats */
memcpy(host_stats->ver_prod.odd_real + dst_offset,
- &vtemp_ptr[0 * table_size + src_offset], size_bytes);
+ &vtemp_ptr[0 * table_size + src_offset], size_bytes);
memcpy(host_stats->ver_prod.odd_imag + dst_offset,
- &vtemp_ptr[1 * table_size + src_offset], size_bytes);
+ &vtemp_ptr[1 * table_size + src_offset], size_bytes);
memcpy(host_stats->ver_prod.even_real + dst_offset,
- &vtemp_ptr[2 * table_size + src_offset], size_bytes);
+ &vtemp_ptr[2 * table_size + src_offset], size_bytes);
memcpy(host_stats->ver_prod.even_imag + dst_offset,
- &vtemp_ptr[3 * table_size + src_offset], size_bytes);
+ &vtemp_ptr[3 * table_size + src_offset], size_bytes);
src_offset += table_width; /* aligned table width */
dst_offset += host_stats->grid.aligned_width;
struct ia_css_isp_dvs_statistics *
ia_css_isp_dvs2_statistics_allocate(
- const struct ia_css_dvs_grid_info *grid)
+ const struct ia_css_dvs_grid_info *grid)
{
struct ia_css_isp_dvs_statistics *me;
int size;
aligned to HIVE_ISP_DDR_WORD_BYTES
*/
size = CEIL_MUL(sizeof(int) * grid->aligned_width, HIVE_ISP_DDR_WORD_BYTES)
- * grid->aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES;
+ * grid->aligned_height * IA_CSS_DVS2_NUM_COEF_TYPES;
me->size = 2 * size;
me->data_ptr = mmgr_malloc(me->size);
}
void ia_css_sdis2_horicoef_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level)
+ const struct ia_css_dvs2_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis2_vertcoef_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level)
+ const struct ia_css_dvs2_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis2_horiproj_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level)
+ const struct ia_css_dvs2_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
}
void ia_css_sdis2_vertproj_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level)
+ const struct ia_css_dvs2_coefficients *config, unsigned int level)
{
(void)config;
(void)level;
struct sh_css_isp_sdis_vert_proj_tbl;
void ia_css_sdis2_horicoef_vmem_encode(
- struct sh_css_isp_sdis_hori_coef_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_hori_coef_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size);
void ia_css_sdis2_vertcoef_vmem_encode(
- struct sh_css_isp_sdis_vert_coef_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_vert_coef_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size);
void ia_css_sdis2_horiproj_encode(
- struct sh_css_isp_sdis_hori_proj_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_hori_proj_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size);
void ia_css_sdis2_vertproj_encode(
- struct sh_css_isp_sdis_vert_proj_tbl *to,
- const struct ia_css_dvs2_coefficients *from,
- unsigned int size);
+ struct sh_css_isp_sdis_vert_proj_tbl *to,
+ const struct ia_css_dvs2_coefficients *from,
+ unsigned int size);
void ia_css_get_isp_dvs2_coefficients(
- struct ia_css_stream *stream,
- short *hor_coefs_odd_real,
- short *hor_coefs_odd_imag,
- short *hor_coefs_even_real,
- short *hor_coefs_even_imag,
- short *ver_coefs_odd_real,
- short *ver_coefs_odd_imag,
- short *ver_coefs_even_real,
- short *ver_coefs_even_imag);
+ struct ia_css_stream *stream,
+ short *hor_coefs_odd_real,
+ short *hor_coefs_odd_imag,
+ short *hor_coefs_even_real,
+ short *hor_coefs_even_imag,
+ short *ver_coefs_odd_real,
+ short *ver_coefs_odd_imag,
+ short *ver_coefs_even_real,
+ short *ver_coefs_even_imag);
void ia_css_sdis2_clear_coefficients(
- struct ia_css_dvs2_coefficients *dvs2_coefs);
+ struct ia_css_dvs2_coefficients *dvs2_coefs);
enum ia_css_err
ia_css_get_dvs2_statistics(
- struct ia_css_dvs2_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics *isp_stats);
+ struct ia_css_dvs2_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics *isp_stats);
void
ia_css_translate_dvs2_statistics(
- struct ia_css_dvs2_statistics *host_stats,
- const struct ia_css_isp_dvs_statistics_map *isp_stats);
+ struct ia_css_dvs2_statistics *host_stats,
+ const struct ia_css_isp_dvs_statistics_map *isp_stats);
struct ia_css_isp_dvs_statistics *
ia_css_isp_dvs2_statistics_allocate(
- const struct ia_css_dvs_grid_info *grid);
+ const struct ia_css_dvs_grid_info *grid);
void
ia_css_isp_dvs2_statistics_free(
- struct ia_css_isp_dvs_statistics *me);
+ struct ia_css_isp_dvs_statistics *me);
void ia_css_sdis2_horicoef_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level);
+ const struct ia_css_dvs2_coefficients *config, unsigned int level);
void ia_css_sdis2_vertcoef_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level);
+ const struct ia_css_dvs2_coefficients *config, unsigned int level);
void ia_css_sdis2_horiproj_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level);
+ const struct ia_css_dvs2_coefficients *config, unsigned int level);
void ia_css_sdis2_vertproj_debug_dtrace(
- const struct ia_css_dvs2_coefficients *config, unsigned int level);
+ const struct ia_css_dvs2_coefficients *config, unsigned int level);
#endif /* __IA_CSS_SDIS2_HOST_H */
* coefficients.
*/
struct ia_css_dvs2_coefficients {
- struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */
- struct ia_css_dvs2_coef_types hor_coefs; /** struct with pointers that contain the horizontal coefficients */
- struct ia_css_dvs2_coef_types ver_coefs; /** struct with pointers that contain the vertical coefficients */
+ struct ia_css_dvs_grid_info
+ grid; /** grid info contains the dimensions of the dvs grid */
+ struct ia_css_dvs2_coef_types
+ hor_coefs; /** struct with pointers that contain the horizontal coefficients */
+ struct ia_css_dvs2_coef_types
+ ver_coefs; /** struct with pointers that contain the vertical coefficients */
};
/* DVS 2.0 Statistic types. This structure contains 4 pointers to
* the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1]
*/
struct ia_css_dvs2_statistics {
- struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */
- struct ia_css_dvs2_stat_types hor_prod; /** struct with pointers that contain the horizontal statistics */
- struct ia_css_dvs2_stat_types ver_prod; /** struct with pointers that contain the vertical statistics */
+ struct ia_css_dvs_grid_info
+ grid; /** grid info contains the dimensions of the dvs grid */
+ struct ia_css_dvs2_stat_types
+ hor_prod; /** struct with pointers that contain the horizontal statistics */
+ struct ia_css_dvs2_stat_types
+ ver_prod; /** struct with pointers that contain the vertical statistics */
};
#endif /* __IA_CSS_SDIS2_TYPES_H */
#include "ia_css_tdf.host.h"
static const s16 g_pyramid[8][8] = {
-{128, 384, 640, 896, 896, 640, 384, 128},
-{384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
-{640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
-{896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
-{896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
-{640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
-{384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
-{128, 384, 640, 896, 896, 640, 384, 128}
+ {128, 384, 640, 896, 896, 640, 384, 128},
+ {384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
+ {640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
+ {896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
+ {896, 2688, 4480, 6272, 6272, 4480, 2688, 896},
+ {640, 1920, 3200, 4480, 4480, 3200, 1920, 640},
+ {384, 1152, 1920, 2688, 2688, 1920, 1152, 384},
+ {128, 384, 640, 896, 896, 640, 384, 128}
};
void
ia_css_tdf_vmem_encode(
- struct ia_css_isp_tdf_vmem_params *to,
- const struct ia_css_tdf_config *from,
- size_t size)
+ struct ia_css_isp_tdf_vmem_params *to,
+ const struct ia_css_tdf_config *from,
+ size_t size)
{
unsigned int i;
(void)size;
void
ia_css_tdf_encode(
- struct ia_css_isp_tdf_dmem_params *to,
- const struct ia_css_tdf_config *from,
- size_t size)
+ struct ia_css_isp_tdf_dmem_params *to,
+ const struct ia_css_tdf_config *from,
+ size_t size)
{
(void)size;
to->Epsilon_0 = from->epsilon_0;
void
ia_css_tdf_debug_dtrace(
- const struct ia_css_tdf_config *config,
- unsigned int level)
+ const struct ia_css_tdf_config *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_tdf_vmem_encode(
- struct ia_css_isp_tdf_vmem_params *to,
- const struct ia_css_tdf_config *from,
- size_t size);
+ struct ia_css_isp_tdf_vmem_params *to,
+ const struct ia_css_tdf_config *from,
+ size_t size);
void
ia_css_tdf_encode(
- struct ia_css_isp_tdf_dmem_params *to,
- const struct ia_css_tdf_config *from,
- size_t size);
+ struct ia_css_isp_tdf_dmem_params *to,
+ const struct ia_css_tdf_config *from,
+ size_t size);
void
ia_css_tdf_debug_dtrace(
- const struct ia_css_tdf_config *config, unsigned int level)
+ const struct ia_css_tdf_config *config, unsigned int level)
;
#endif /* __IA_CSS_TDF_HOST_H */
unsigned int round_adj_u; /** Rounding Adjust for U */
unsigned int round_adj_v; /** Rounding Adjust for V */
unsigned int knee_y[TNR3_NUM_SEGMENTS - 1]; /** Knee points */
- unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */
- unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for U at points U0, U1, U2, U3 */
- unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for V at points V0, V1, V2, V3 */
- unsigned int ref_buf_select; /** Selection of the reference buffer */
+ unsigned int sigma_y[TNR3_NUM_SEGMENTS +
+ 1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */
+ unsigned int sigma_u[TNR3_NUM_SEGMENTS +
+ 1]; /** Standard deviation for U at points U0, U1, U2, U3 */
+ unsigned int sigma_v[TNR3_NUM_SEGMENTS +
+ 1]; /** Standard deviation for V at points V0, V1, V2, V3 */
+ unsigned int
+ ref_buf_select; /** Selection of the reference buffer */
};
#endif
void
ia_css_tnr_encode(
- struct sh_css_isp_tnr_params *to,
- const struct ia_css_tnr_config *from,
- unsigned int size)
+ struct sh_css_isp_tnr_params *to,
+ const struct ia_css_tnr_config *from,
+ unsigned int size)
{
(void)size;
to->coef =
void
ia_css_tnr_dump(
- const struct sh_css_isp_tnr_params *tnr,
- unsigned int level)
+ const struct sh_css_isp_tnr_params *tnr,
+ unsigned int level)
{
if (!tnr) return;
ia_css_debug_dtrace(level, "Temporal Noise Reduction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "tnr_coef", tnr->coef);
+ "tnr_coef", tnr->coef);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "tnr_threshold_Y", tnr->threshold_Y);
+ "tnr_threshold_Y", tnr->threshold_Y);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "tnr_threshold_C", tnr->threshold_C);
+ "tnr_threshold_C", tnr->threshold_C);
}
void
ia_css_tnr_debug_dtrace(
- const struct ia_css_tnr_config *config,
- unsigned int level)
+ const struct ia_css_tnr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.gain=%d, config.threshold_y=%d, config.threshold_uv=%d\n",
- config->gain,
- config->threshold_y, config->threshold_uv);
+ "config.gain=%d, config.threshold_y=%d, config.threshold_uv=%d\n",
+ config->gain,
+ config->threshold_y, config->threshold_uv);
}
void
ia_css_tnr_config(
- struct sh_css_isp_tnr_isp_config *to,
- const struct ia_css_tnr_configuration *from,
- unsigned int size)
+ struct sh_css_isp_tnr_isp_config *to,
+ const struct ia_css_tnr_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
unsigned int i;
#else
for (i = 0; i < NUM_TNR_FRAMES; i++) {
#endif
- to->tnr_frame_addr[i] = from->tnr_frames[i]->data + from->tnr_frames[i]->planes.yuyv.offset;
+ to->tnr_frame_addr[i] = from->tnr_frames[i]->data +
+ from->tnr_frames[i]->planes.yuyv.offset;
}
/* Assume divisiblity here, may need to generalize to fixed point. */
void
ia_css_tnr_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame **frames)
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame **frames)
{
struct ia_css_tnr_configuration config;
unsigned int i;
void
ia_css_init_tnr_state(
- struct sh_css_isp_tnr_dmem_state *state,
- size_t size)
+ struct sh_css_isp_tnr_dmem_state *state,
+ size_t size)
{
(void)size;
void
ia_css_tnr_encode(
- struct sh_css_isp_tnr_params *to,
- const struct ia_css_tnr_config *from,
- unsigned int size);
+ struct sh_css_isp_tnr_params *to,
+ const struct ia_css_tnr_config *from,
+ unsigned int size);
void
ia_css_tnr_dump(
- const struct sh_css_isp_tnr_params *tnr,
- unsigned int level);
+ const struct sh_css_isp_tnr_params *tnr,
+ unsigned int level);
void
ia_css_tnr_debug_dtrace(
- const struct ia_css_tnr_config *config,
- unsigned int level);
+ const struct ia_css_tnr_config *config,
+ unsigned int level);
void
ia_css_tnr_config(
- struct sh_css_isp_tnr_isp_config *to,
- const struct ia_css_tnr_configuration *from,
- unsigned int size);
+ struct sh_css_isp_tnr_isp_config *to,
+ const struct ia_css_tnr_configuration *from,
+ unsigned int size);
void
ia_css_tnr_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame **frames);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame **frames);
void
ia_css_init_tnr_state(
- struct sh_css_isp_tnr_dmem_state *state,
- size_t size);
+ struct sh_css_isp_tnr_dmem_state *state,
+ size_t size);
#endif /* __IA_CSS_TNR_HOST_H */
void
ia_css_vf_config(
- struct sh_css_isp_vf_isp_config *to,
- const struct ia_css_vf_configuration *from,
- unsigned int size)
+ struct sh_css_isp_vf_isp_config *to,
+ const struct ia_css_vf_configuration *from,
+ unsigned int size)
{
unsigned int elems_a = ISP_VEC_NELEMS;
*/
enum ia_css_err
sh_css_vf_downscale_log2(
- const struct ia_css_frame_info *out_info,
- const struct ia_css_frame_info *vf_info,
- unsigned int *downscale_log2)
-{
- unsigned int ds_log2 = 0;
- unsigned int out_width;
+ const struct ia_css_frame_info *out_info,
+ const struct ia_css_frame_info *vf_info,
+ unsigned int *downscale_log2) {
+ unsigned int ds_log2 = 0;
+ unsigned int out_width;
- if ((!out_info) | (!vf_info))
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ if ((!out_info) | (!vf_info))
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- out_width = out_info->res.width;
+ out_width = out_info->res.width;
- if (out_width == 0)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ if (out_width == 0)
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- /* downscale until width smaller than the viewfinder width. We don't
+ /* downscale until width smaller than the viewfinder width. We don't
* test for the height since the vmem buffers only put restrictions on
* the width of a line, not on the number of lines in a frame.
*/
- while (out_width >= vf_info->res.width) {
- ds_log2++;
- out_width /= 2;
- }
- /* now width is smaller, so we go up one step */
- if ((ds_log2 > 0) && (out_width < ia_css_binary_max_vf_width()))
- ds_log2--;
- /* TODO: use actual max input resolution of vf_pp binary */
- if ((out_info->res.width >> ds_log2) >= 2 * ia_css_binary_max_vf_width())
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- *downscale_log2 = ds_log2;
- return IA_CSS_SUCCESS;
+ while (out_width >= vf_info->res.width)
+ {
+ ds_log2++;
+ out_width /= 2;
+ }
+ /* now width is smaller, so we go up one step */
+ if ((ds_log2 > 0) && (out_width < ia_css_binary_max_vf_width()))
+ ds_log2--;
+ /* TODO: use actual max input resolution of vf_pp binary */
+ if ((out_info->res.width >> ds_log2) >= 2 * ia_css_binary_max_vf_width())
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ *downscale_log2 = ds_log2;
+ return IA_CSS_SUCCESS;
}
static enum ia_css_err
configure_kernel(
- const struct ia_css_binary_info *info,
- const struct ia_css_frame_info *out_info,
- const struct ia_css_frame_info *vf_info,
- unsigned int *downscale_log2,
- struct ia_css_vf_configuration *config)
-{
- enum ia_css_err err;
- unsigned int vf_log_ds = 0;
-
- /* First compute value */
- if (vf_info) {
- err = sh_css_vf_downscale_log2(out_info, vf_info, &vf_log_ds);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
- vf_log_ds = min(vf_log_ds, info->vf_dec.max_log_downscale);
- *downscale_log2 = vf_log_ds;
-
- /* Then store it in isp config section */
- config->vf_downscale_bits = vf_log_ds;
- return IA_CSS_SUCCESS;
+ const struct ia_css_binary_info *info,
+ const struct ia_css_frame_info *out_info,
+ const struct ia_css_frame_info *vf_info,
+ unsigned int *downscale_log2,
+ struct ia_css_vf_configuration *config) {
+ enum ia_css_err err;
+ unsigned int vf_log_ds = 0;
+
+ /* First compute value */
+ if (vf_info)
+ {
+ err = sh_css_vf_downscale_log2(out_info, vf_info, &vf_log_ds);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ vf_log_ds = min(vf_log_ds, info->vf_dec.max_log_downscale);
+ *downscale_log2 = vf_log_ds;
+
+ /* Then store it in isp config section */
+ config->vf_downscale_bits = vf_log_ds;
+ return IA_CSS_SUCCESS;
}
static void
configure_dma(
- struct ia_css_vf_configuration *config,
- const struct ia_css_frame_info *vf_info)
+ struct ia_css_vf_configuration *config,
+ const struct ia_css_frame_info *vf_info)
{
config->info = vf_info;
}
enum ia_css_err
ia_css_vf_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- unsigned int *downscale_log2)
-{
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ unsigned int *downscale_log2) {
enum ia_css_err err;
struct ia_css_vf_configuration config;
const struct ia_css_binary_info *info = &binary->info->sp;
*/
enum ia_css_err
sh_css_vf_downscale_log2(
- const struct ia_css_frame_info *out_info,
- const struct ia_css_frame_info *vf_info,
- unsigned int *downscale_log2);
+ const struct ia_css_frame_info *out_info,
+ const struct ia_css_frame_info *vf_info,
+ unsigned int *downscale_log2);
void
ia_css_vf_config(
- struct sh_css_isp_vf_isp_config *to,
- const struct ia_css_vf_configuration *from,
- unsigned int size);
+ struct sh_css_isp_vf_isp_config *to,
+ const struct ia_css_vf_configuration *from,
+ unsigned int size);
enum ia_css_err
ia_css_vf_configure(
- const struct ia_css_binary *binary,
- const struct ia_css_frame_info *out_info,
- struct ia_css_frame_info *vf_info,
- unsigned int *downscale_log2);
+ const struct ia_css_binary *binary,
+ const struct ia_css_frame_info *out_info,
+ struct ia_css_frame_info *vf_info,
+ unsigned int *downscale_log2);
#endif /* __IA_CSS_VF_HOST_H */
void
ia_css_wb_encode(
- struct sh_css_isp_wb_params *to,
- const struct ia_css_wb_config *from,
- unsigned int size)
+ struct sh_css_isp_wb_params *to,
+ const struct ia_css_wb_config *from,
+ unsigned int size)
{
(void)size;
to->gain_shift =
#ifndef IA_CSS_NO_DEBUG
void
ia_css_wb_dump(
- const struct sh_css_isp_wb_params *wb,
- unsigned int level)
+ const struct sh_css_isp_wb_params *wb,
+ unsigned int level)
{
if (!wb) return;
ia_css_debug_dtrace(level, "White Balance:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "wb_gain_shift", wb->gain_shift);
+ "wb_gain_shift", wb->gain_shift);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "wb_gain_gr", wb->gain_gr);
+ "wb_gain_gr", wb->gain_gr);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "wb_gain_r", wb->gain_r);
+ "wb_gain_r", wb->gain_r);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "wb_gain_b", wb->gain_b);
+ "wb_gain_b", wb->gain_b);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "wb_gain_gb", wb->gain_gb);
+ "wb_gain_gb", wb->gain_gb);
}
void
ia_css_wb_debug_dtrace(
- const struct ia_css_wb_config *config,
- unsigned int level)
+ const struct ia_css_wb_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.integer_bits=%d, config.gr=%d, config.r=%d, config.b=%d, config.gb=%d\n",
- config->integer_bits,
- config->gr, config->r,
- config->b, config->gb);
+ "config.integer_bits=%d, config.gr=%d, config.r=%d, config.b=%d, config.gb=%d\n",
+ config->integer_bits,
+ config->gr, config->r,
+ config->b, config->gb);
}
#endif
void
ia_css_wb_encode(
- struct sh_css_isp_wb_params *to,
- const struct ia_css_wb_config *from,
- unsigned int size);
+ struct sh_css_isp_wb_params *to,
+ const struct ia_css_wb_config *from,
+ unsigned int size);
void
ia_css_wb_dump(
- const struct sh_css_isp_wb_params *wb,
- unsigned int level);
+ const struct sh_css_isp_wb_params *wb,
+ unsigned int level);
void
ia_css_wb_debug_dtrace(
- const struct ia_css_wb_config *wb,
- unsigned int level);
+ const struct ia_css_wb_config *wb,
+ unsigned int level);
#endif /* __IA_CSS_WB_HOST_H */
void
ia_css_xnr_table_vamem_encode(
- struct sh_css_isp_xnr_vamem_params *to,
- const struct ia_css_xnr_table *from,
- unsigned int size)
+ struct sh_css_isp_xnr_vamem_params *to,
+ const struct ia_css_xnr_table *from,
+ unsigned int size)
{
(void)size;
memcpy(&to->xnr, &from->data, sizeof(to->xnr));
void
ia_css_xnr_encode(
- struct sh_css_isp_xnr_params *to,
- const struct ia_css_xnr_config *from,
- unsigned int size)
+ struct sh_css_isp_xnr_params *to,
+ const struct ia_css_xnr_config *from,
+ unsigned int size)
{
(void)size;
to->threshold =
- (uint16_t)uDIGIT_FITTING(from->threshold, 16, SH_CSS_ISP_YUV_BITS);
+ (uint16_t)uDIGIT_FITTING(from->threshold, 16, SH_CSS_ISP_YUV_BITS);
}
void
ia_css_xnr_table_debug_dtrace(
- const struct ia_css_xnr_table *config,
- unsigned int level)
+ const struct ia_css_xnr_table *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_xnr_debug_dtrace(
- const struct ia_css_xnr_config *config,
- unsigned int level)
+ const struct ia_css_xnr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.threshold=%d\n", config->threshold);
+ "config.threshold=%d\n", config->threshold);
}
void
ia_css_xnr_table_vamem_encode(
- struct sh_css_isp_xnr_vamem_params *to,
- const struct ia_css_xnr_table *from,
- unsigned int size);
+ struct sh_css_isp_xnr_vamem_params *to,
+ const struct ia_css_xnr_table *from,
+ unsigned int size);
void
ia_css_xnr_encode(
- struct sh_css_isp_xnr_params *to,
- const struct ia_css_xnr_config *from,
- unsigned int size);
+ struct sh_css_isp_xnr_params *to,
+ const struct ia_css_xnr_config *from,
+ unsigned int size);
void
ia_css_xnr_table_debug_dtrace(
- const struct ia_css_xnr_table *s3a,
- unsigned int level);
+ const struct ia_css_xnr_table *s3a,
+ unsigned int level);
void
ia_css_xnr_debug_dtrace(
- const struct ia_css_xnr_config *config,
- unsigned int level);
+ const struct ia_css_xnr_config *config,
+ unsigned int level);
#endif /* __IA_CSS_XNR_HOST_H */
static const uint16_t
default_xnr_table_data[IA_CSS_VAMEM_2_XNR_TABLE_SIZE] = {
- /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- 8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
- 546 >> 1, 512 >> 1,
+ /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ 8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
+ 546 >> 1, 512 >> 1,
- /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
- 481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
- 256 >> 1,
+ /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
+ 481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
+ 256 >> 1,
- /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
- 248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
- 170 >> 1,
+ /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
+ 248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
+ 170 >> 1,
- /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
- 167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
+ /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
+ 167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
};
#elif defined(HAS_VAMEM_VERSION_1)
static const uint16_t
default_xnr_table_data[IA_CSS_VAMEM_1_XNR_TABLE_SIZE] = {
- /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
- 8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
- 546 >> 1, 512 >> 1,
+ /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
+ 8191 >> 1, 4096 >> 1, 2730 >> 1, 2048 >> 1, 1638 >> 1, 1365 >> 1, 1170 >> 1, 1024 >> 1, 910 >> 1, 819 >> 1, 744 >> 1, 682 >> 1, 630 >> 1, 585 >> 1,
+ 546 >> 1, 512 >> 1,
- /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
- 481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
- 256 >> 1,
+ /* 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 */
+ 481 >> 1, 455 >> 1, 431 >> 1, 409 >> 1, 390 >> 1, 372 >> 1, 356 >> 1, 341 >> 1, 327 >> 1, 315 >> 1, 303 >> 1, 292 >> 1, 282 >> 1, 273 >> 1, 264 >> 1,
+ 256 >> 1,
- /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
- 248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
- 170 >> 1,
+ /* 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 */
+ 248 >> 1, 240 >> 1, 234 >> 1, 227 >> 1, 221 >> 1, 215 >> 1, 210 >> 1, 204 >> 1, 199 >> 1, 195 >> 1, 190 >> 1, 186 >> 1, 182 >> 1, 178 >> 1, 174 >> 1,
+ 170 >> 1,
- /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
- 167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
+ /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 */
+ 167 >> 1, 163 >> 1, 160 >> 1, 157 >> 1, 154 >> 1, 151 >> 1, 148 >> 1, 146 >> 1, 143 >> 1, 141 >> 1, 138 >> 1, 136 >> 1, 134 >> 1, 132 >> 1, 130 >> 1, 128 >> 1
};
#else
#error "sh_css_params.c: VAMEM version must \
- be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
+be one of {VAMEM_VERSION_1, VAMEM_VERSION_2}"
#endif
void
/* Number of elements in the xnr table. */
#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2 6
/* Number of elements in the xnr table. */
-#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE BIT(IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
+#define IA_CSS_VAMEM_2_XNR_TABLE_SIZE BIT(IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
/** IA_CSS_VAMEM_TYPE_1(ISP2300) or
IA_CSS_VAMEM_TYPE_2(ISP2400) */
#define XNR3_LOOK_UP_TABLE_POINTS 16
static const s16 x[XNR3_LOOK_UP_TABLE_POINTS] = {
-1024, 1164, 1320, 1492, 1680, 1884, 2108, 2352,
-2616, 2900, 3208, 3540, 3896, 4276, 4684, 5120};
+ 1024, 1164, 1320, 1492, 1680, 1884, 2108, 2352,
+ 2616, 2900, 3208, 3540, 3896, 4276, 4684, 5120
+};
static const s16 a[XNR3_LOOK_UP_TABLE_POINTS] = {
--7213, -5580, -4371, -3421, -2722, -2159, -6950, -5585,
--4529, -3697, -3010, -2485, -2070, -1727, -1428, 0};
+ -7213, -5580, -4371, -3421, -2722, -2159, -6950, -5585,
+ -4529, -3697, -3010, -2485, -2070, -1727, -1428, 0
+ };
static const s16 b[XNR3_LOOK_UP_TABLE_POINTS] = {
-4096, 3603, 3178, 2811, 2497, 2226, 1990, 1783,
-1603, 1446, 1307, 1185, 1077, 981, 895, 819};
+ 4096, 3603, 3178, 2811, 2497, 2226, 1990, 1783,
+ 1603, 1446, 1307, 1185, 1077, 981, 895, 819
+};
static const s16 c[XNR3_LOOK_UP_TABLE_POINTS] = {
-1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
/*
#endif
void
ia_css_xnr3_encode(
- struct sh_css_isp_xnr3_params *to,
- const struct ia_css_xnr3_config *from,
- unsigned int size)
+ struct sh_css_isp_xnr3_params *to,
+ const struct ia_css_xnr3_config *from,
+ unsigned int size)
{
int kernel_size = XNR_FILTER_SIZE;
/* The adjust factor is the next power of 2
*/
void
ia_css_xnr3_vmem_encode(
- struct sh_css_isp_xnr3_vmem_params *to,
- const struct ia_css_xnr3_config *from,
- unsigned int size)
+ struct sh_css_isp_xnr3_vmem_params *to,
+ const struct ia_css_xnr3_config *from,
+ unsigned int size)
{
unsigned int i, j, base;
const unsigned int total_blocks = 4;
/* Dummy Function added as the tool expects it*/
void
ia_css_xnr3_debug_dtrace(
- const struct ia_css_xnr3_config *config,
- unsigned int level)
+ const struct ia_css_xnr3_config *config,
+ unsigned int level)
{
(void)config;
(void)level;
void
ia_css_xnr3_encode(
- struct sh_css_isp_xnr3_params *to,
- const struct ia_css_xnr3_config *from,
- unsigned int size);
+ struct sh_css_isp_xnr3_params *to,
+ const struct ia_css_xnr3_config *from,
+ unsigned int size);
#ifdef ISP2401
void
ia_css_xnr3_vmem_encode(
- struct sh_css_isp_xnr3_vmem_params *to,
- const struct ia_css_xnr3_config *from,
- unsigned int size);
+ struct sh_css_isp_xnr3_vmem_params *to,
+ const struct ia_css_xnr3_config *from,
+ unsigned int size);
#endif
void
ia_css_xnr3_debug_dtrace(
- const struct ia_css_xnr3_config *config,
- unsigned int level);
+ const struct ia_css_xnr3_config *config,
+ unsigned int level);
#endif /* __IA_CSS_XNR3_HOST_H */
void
ia_css_nr_encode(
- struct sh_css_isp_ynr_params *to,
- const struct ia_css_nr_config *from,
- unsigned int size)
+ struct sh_css_isp_ynr_params *to,
+ const struct ia_css_nr_config *from,
+ unsigned int size)
{
(void)size;
/* YNR (Y Noise Reduction) */
to->threshold =
- uDIGIT_FITTING(8192U, 16, SH_CSS_BAYER_BITS);
+ uDIGIT_FITTING(8192U, 16, SH_CSS_BAYER_BITS);
to->gain_all =
uDIGIT_FITTING(from->ynr_gain, 16, SH_CSS_YNR_GAIN_SHIFT);
to->gain_dir =
void
ia_css_yee_encode(
- struct sh_css_isp_yee_params *to,
- const struct ia_css_yee_config *from,
- unsigned int size)
+ struct sh_css_isp_yee_params *to,
+ const struct ia_css_yee_config *from,
+ unsigned int size)
{
int asiWk1 = (int)from->ee.gain;
int asiWk2 = asiWk1 / 8;
/* YEE (Y Edge Enhancement) */
to->dirthreshold_s =
min((uDIGIT_FITTING(from->nr.direction, 16, SH_CSS_BAYER_BITS)
- << 1),
+ << 1),
SH_CSS_BAYER_MAXVAL);
to->dirthreshold_g =
min((uDIGIT_FITTING(from->nr.direction, 16, SH_CSS_BAYER_BITS)
- << 4),
+ << 4),
SH_CSS_BAYER_MAXVAL);
to->dirthreshold_width_log2 =
uFRACTION_BITS_FITTING(8);
void
ia_css_nr_dump(
- const struct sh_css_isp_ynr_params *ynr,
- unsigned int level)
+ const struct sh_css_isp_ynr_params *ynr,
+ unsigned int level)
{
if (!ynr) return;
ia_css_debug_dtrace(level,
- "Y Noise Reduction:\n");
+ "Y Noise Reduction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynr_threshold", ynr->threshold);
+ "ynr_threshold", ynr->threshold);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynr_gain_all", ynr->gain_all);
+ "ynr_gain_all", ynr->gain_all);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynr_gain_dir", ynr->gain_dir);
+ "ynr_gain_dir", ynr->gain_dir);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynr_threshold_cb", ynr->threshold_cb);
+ "ynr_threshold_cb", ynr->threshold_cb);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynr_threshold_cr", ynr->threshold_cr);
+ "ynr_threshold_cr", ynr->threshold_cr);
}
void
ia_css_yee_dump(
- const struct sh_css_isp_yee_params *yee,
- unsigned int level)
+ const struct sh_css_isp_yee_params *yee,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "Y Edge Enhancement:\n");
+ "Y Edge Enhancement:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynryee_dirthreshold_s",
- yee->dirthreshold_s);
+ "ynryee_dirthreshold_s",
+ yee->dirthreshold_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynryee_dirthreshold_g",
- yee->dirthreshold_g);
+ "ynryee_dirthreshold_g",
+ yee->dirthreshold_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynryee_dirthreshold_width_log2",
- yee->dirthreshold_width_log2);
+ "ynryee_dirthreshold_width_log2",
+ yee->dirthreshold_width_log2);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynryee_dirthreshold_width",
- yee->dirthreshold_width);
+ "ynryee_dirthreshold_width",
+ yee->dirthreshold_width);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_detailgain",
- yee->detailgain);
+ "yee_detailgain",
+ yee->detailgain);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_coring_s",
- yee->coring_s);
+ "yee_coring_s",
+ yee->coring_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_coring_g",
- yee->coring_g);
+ "yee_coring_g",
+ yee->coring_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_scale_plus_s",
- yee->scale_plus_s);
+ "yee_scale_plus_s",
+ yee->scale_plus_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_scale_plus_g",
- yee->scale_plus_g);
+ "yee_scale_plus_g",
+ yee->scale_plus_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_scale_minus_s",
- yee->scale_minus_s);
+ "yee_scale_minus_s",
+ yee->scale_minus_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_scale_minus_g",
- yee->scale_minus_g);
+ "yee_scale_minus_g",
+ yee->scale_minus_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_clip_plus_s",
- yee->clip_plus_s);
+ "yee_clip_plus_s",
+ yee->clip_plus_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_clip_plus_g",
- yee->clip_plus_g);
+ "yee_clip_plus_g",
+ yee->clip_plus_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_clip_minus_s",
- yee->clip_minus_s);
+ "yee_clip_minus_s",
+ yee->clip_minus_s);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "yee_clip_minus_g",
- yee->clip_minus_g);
+ "yee_clip_minus_g",
+ yee->clip_minus_g);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
- "ynryee_Yclip",
- yee->Yclip);
+ "ynryee_Yclip",
+ yee->Yclip);
}
void
ia_css_nr_debug_dtrace(
- const struct ia_css_nr_config *config,
- unsigned int level)
+ const struct ia_css_nr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.direction=%d, config.bnr_gain=%d, config.ynr_gain=%d, config.threshold_cb=%d, config.threshold_cr=%d\n",
- config->direction,
- config->bnr_gain, config->ynr_gain,
- config->threshold_cb, config->threshold_cr);
+ "config.direction=%d, config.bnr_gain=%d, config.ynr_gain=%d, config.threshold_cb=%d, config.threshold_cr=%d\n",
+ config->direction,
+ config->bnr_gain, config->ynr_gain,
+ config->threshold_cb, config->threshold_cr);
}
void
ia_css_ee_debug_dtrace(
- const struct ia_css_ee_config *config,
- unsigned int level)
+ const struct ia_css_ee_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.threshold=%d, config.gain=%d, config.detail_gain=%d\n",
- config->threshold, config->gain, config->detail_gain);
+ "config.threshold=%d, config.gain=%d, config.detail_gain=%d\n",
+ config->threshold, config->gain, config->detail_gain);
}
void
ia_css_init_ynr_state(
- void/*struct sh_css_isp_ynr_vmem_state*/ * state,
- size_t size)
+ void/*struct sh_css_isp_ynr_vmem_state*/ * state,
+ size_t size)
{
memset(state, 0, size);
}
void
ia_css_nr_encode(
- struct sh_css_isp_ynr_params *to,
- const struct ia_css_nr_config *from,
- unsigned int size);
+ struct sh_css_isp_ynr_params *to,
+ const struct ia_css_nr_config *from,
+ unsigned int size);
void
ia_css_yee_encode(
- struct sh_css_isp_yee_params *to,
- const struct ia_css_yee_config *from,
- unsigned int size);
+ struct sh_css_isp_yee_params *to,
+ const struct ia_css_yee_config *from,
+ unsigned int size);
void
ia_css_nr_dump(
- const struct sh_css_isp_ynr_params *ynr,
- unsigned int level);
+ const struct sh_css_isp_ynr_params *ynr,
+ unsigned int level);
void
ia_css_yee_dump(
- const struct sh_css_isp_yee_params *yee,
- unsigned int level);
+ const struct sh_css_isp_yee_params *yee,
+ unsigned int level);
void
ia_css_nr_debug_dtrace(
- const struct ia_css_nr_config *config,
- unsigned int level);
+ const struct ia_css_nr_config *config,
+ unsigned int level);
void
ia_css_ee_debug_dtrace(
- const struct ia_css_ee_config *config,
- unsigned int level);
+ const struct ia_css_ee_config *config,
+ unsigned int level);
void
ia_css_init_ynr_state(
- void/*struct sh_css_isp_ynr_vmem_state*/ * state,
- size_t size);
+ void/*struct sh_css_isp_ynr_vmem_state*/ * state,
+ size_t size);
#endif /* __IA_CSS_YNR_HOST_H */
/* YNR (luminance noise reduction) */
struct sh_css_isp_ynr_vmem_state {
- VMEM_ARRAY(ynr_buf[4], MAX_VECTORS_PER_BUF_LINE * ISP_NWAY);
+ VMEM_ARRAY(ynr_buf[4], MAX_VECTORS_PER_BUF_LINE *ISP_NWAY);
};
#endif /* __IA_CSS_YNR_STATE_H */
void
ia_css_ynr_encode(
- struct sh_css_isp_yee2_params *to,
- const struct ia_css_ynr_config *from,
- unsigned int size)
+ struct sh_css_isp_yee2_params *to,
+ const struct ia_css_ynr_config *from,
+ unsigned int size)
{
(void)size;
to->edge_sense_gain_0 = from->edge_sense_gain_0;
void
ia_css_fc_encode(
- struct sh_css_isp_fc_params *to,
- const struct ia_css_fc_config *from,
- unsigned int size)
+ struct sh_css_isp_fc_params *to,
+ const struct ia_css_fc_config *from,
+ unsigned int size)
{
(void)size;
to->gain_exp = from->gain_exp;
void
ia_css_ynr_dump(
- const struct sh_css_isp_yee2_params *yee2,
- unsigned int level);
+ const struct sh_css_isp_yee2_params *yee2,
+ unsigned int level);
void
ia_css_fc_dump(
- const struct sh_css_isp_fc_params *fc,
- unsigned int level);
+ const struct sh_css_isp_fc_params *fc,
+ unsigned int level);
void
ia_css_fc_debug_dtrace(
- const struct ia_css_fc_config *config,
- unsigned int level)
+ const struct ia_css_fc_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.gain_exp=%d, config.coring_pos_0=%d, config.coring_pos_1=%d, config.coring_neg_0=%d, config.coring_neg_1=%d, config.gain_pos_0=%d, config.gain_pos_1=%d, config.gain_neg_0=%d, config.gain_neg_1=%d, config.crop_pos_0=%d, config.crop_pos_1=%d, config.crop_neg_0=%d, config.crop_neg_1=%d\n",
- config->gain_exp,
- config->coring_pos_0, config->coring_pos_1,
- config->coring_neg_0, config->coring_neg_1,
- config->gain_pos_0, config->gain_pos_1,
- config->gain_neg_0, config->gain_neg_1,
- config->crop_pos_0, config->crop_pos_1,
- config->crop_neg_0, config->crop_neg_1);
+ "config.gain_exp=%d, config.coring_pos_0=%d, config.coring_pos_1=%d, config.coring_neg_0=%d, config.coring_neg_1=%d, config.gain_pos_0=%d, config.gain_pos_1=%d, config.gain_neg_0=%d, config.gain_neg_1=%d, config.crop_pos_0=%d, config.crop_pos_1=%d, config.crop_neg_0=%d, config.crop_neg_1=%d\n",
+ config->gain_exp,
+ config->coring_pos_0, config->coring_pos_1,
+ config->coring_neg_0, config->coring_neg_1,
+ config->gain_pos_0, config->gain_pos_1,
+ config->gain_neg_0, config->gain_neg_1,
+ config->crop_pos_0, config->crop_pos_1,
+ config->crop_neg_0, config->crop_neg_1);
}
void
ia_css_ynr_debug_dtrace(
- const struct ia_css_ynr_config *config,
- unsigned int level)
+ const struct ia_css_ynr_config *config,
+ unsigned int level)
{
ia_css_debug_dtrace(level,
- "config.edge_sense_gain_0=%d, config.edge_sense_gain_1=%d, config.corner_sense_gain_0=%d, config.corner_sense_gain_1=%d\n",
- config->edge_sense_gain_0, config->edge_sense_gain_1,
- config->corner_sense_gain_0, config->corner_sense_gain_1);
+ "config.edge_sense_gain_0=%d, config.edge_sense_gain_1=%d, config.corner_sense_gain_0=%d, config.corner_sense_gain_1=%d\n",
+ config->edge_sense_gain_0, config->edge_sense_gain_1,
+ config->corner_sense_gain_0, config->corner_sense_gain_1);
}
void
ia_css_ynr_encode(
- struct sh_css_isp_yee2_params *to,
- const struct ia_css_ynr_config *from,
- unsigned int size);
+ struct sh_css_isp_yee2_params *to,
+ const struct ia_css_ynr_config *from,
+ unsigned int size);
void
ia_css_fc_encode(
- struct sh_css_isp_fc_params *to,
- const struct ia_css_fc_config *from,
- unsigned int size);
+ struct sh_css_isp_fc_params *to,
+ const struct ia_css_fc_config *from,
+ unsigned int size);
void
ia_css_ynr_dump(
- const struct sh_css_isp_yee2_params *yee2,
- unsigned int level);
+ const struct sh_css_isp_yee2_params *yee2,
+ unsigned int level);
void
ia_css_fc_dump(
- const struct sh_css_isp_fc_params *fc,
- unsigned int level);
+ const struct sh_css_isp_fc_params *fc,
+ unsigned int level);
void
ia_css_fc_debug_dtrace(
- const struct ia_css_fc_config *config,
- unsigned int level);
+ const struct ia_css_fc_config *config,
+ unsigned int level);
void
ia_css_ynr_debug_dtrace(
- const struct ia_css_ynr_config *config,
- unsigned int level);
+ const struct ia_css_ynr_config *config,
+ unsigned int level);
#endif /* __IA_CSS_YNR2_HOST_H */
#if ENABLE_CONTINUOUS
typedef struct {
- tmemvectoru raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
- /* Two more lines for SP raw copy efficiency */
+ tmemvectoru
+ raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
+ /* Two more lines for SP raw copy efficiency */
#ifndef ENABLE_REDUCED_INPUT_BUFFER
- /* "Workaround" solution in the case that space needed vmem exceeds the size of the vmem. */
- /* Since in theory this buffer is not needed for IPU 2.2/2.3, */
- /* the workaround solution will not be needed (and the whole buffer) after the code refactoring. */
- tmemvectoru _raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
+ /* "Workaround" solution in the case that space needed vmem exceeds the size of the vmem. */
+ /* Since in theory this buffer is not needed for IPU 2.2/2.3, */
+ /* the workaround solution will not be needed (and the whole buffer) after the code refactoring. */
+ tmemvectoru
+ _raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE_CONT]; /* 2 bayer lines */
#endif
} input_line_type;
#else /* ENABLE CONTINUOUS == 0 */
typedef struct {
- tmemvectoru raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE]; /* 2 bayer lines */
+ tmemvectoru
+ raw[INPUT_BUF_HEIGHT][INPUT_BUF_LINES][MAX_VECTORS_PER_INPUT_LINE]; /* 2 bayer lines */
} input_line_type;
#endif /* ENABLE_CONTINUOUS */
*/
/* The binary id is used in pre-processor expressions so we cannot
* use an enum here. */
- /* 24xx pipelines*/
+/* 24xx pipelines*/
#define SH_CSS_BINARY_ID_COPY 0
#define SH_CSS_BINARY_ID_BAYER_DS 1
#define SH_CSS_BINARY_ID_VF_PP_FULL 2
/* output.hive.c request information */
typedef enum {
- output_y_channel,
- output_c_channel,
- OUTPUT_NUM_CHANNELS
+ output_y_channel,
+ output_c_channel,
+ OUTPUT_NUM_CHANNELS
} output_channel_type;
typedef struct s_output_dma_info {
- unsigned int cond; /* Condition for transfer */
- output_channel_type channel_type;
- dma_channel channel;
- unsigned int width_a;
- unsigned int width_b;
- unsigned int stride;
- unsigned int v_delta; /* Offset for v address to do cropping */
- char *x_base; /* X base address */
+ unsigned int cond; /* Condition for transfer */
+ output_channel_type channel_type;
+ dma_channel channel;
+ unsigned int width_a;
+ unsigned int width_b;
+ unsigned int stride;
+ unsigned int v_delta; /* Offset for v address to do cropping */
+ char *x_base; /* X base address */
} output_dma_info_type;
#endif
#include "memory_access.h"
static bool realloc_isp_css_mm_buf(
- hrt_vaddress * curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err,
- uint16_t mmgr_attribute);
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err,
+ uint16_t mmgr_attribute);
bool reallocate_buffer(
- hrt_vaddress * curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err)
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err)
{
bool ret;
u16 mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
IA_CSS_ENTER_PRIVATE("void");
ret = realloc_isp_css_mm_buf(curr_buf,
- curr_size, needed_size, force, err, mmgr_attribute);
+ curr_size, needed_size, force, err, mmgr_attribute);
IA_CSS_LEAVE_PRIVATE("ret=%d", ret);
return ret;
}
static bool realloc_isp_css_mm_buf(
- hrt_vaddress * curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err,
- uint16_t mmgr_attribute)
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err,
+ uint16_t mmgr_attribute)
{
s32 id;
IA_CSS_ENTER_PRIVATE("void");
- if (ia_css_refcount_is_single(*curr_buf) && !force && *curr_size >= needed_size) {
+ if (ia_css_refcount_is_single(*curr_buf) && !force &&
+ *curr_size >= needed_size) {
IA_CSS_LEAVE_PRIVATE("false");
return false;
}
id = IA_CSS_REFCOUNT_PARAM_BUFFER;
ia_css_refcount_decrement(id, *curr_buf);
*curr_buf = ia_css_refcount_increment(id, mmgr_alloc_attr(needed_size,
- mmgr_attribute));
+ mmgr_attribute));
if (!*curr_buf) {
*err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
enum ia_css_err
ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
- bool online,
- bool two_ppc,
- enum atomisp_input_format stream_format,
- const struct ia_css_frame_info *in_info,
- const struct ia_css_frame_info *bds_out_info,
- const struct ia_css_frame_info *out_info[],
- const struct ia_css_frame_info *vf_info,
- struct ia_css_binary *binary,
- struct ia_css_resolution *dvs_env,
- int stream_config_left_padding,
- bool accelerator);
+ bool online,
+ bool two_ppc,
+ enum atomisp_input_format stream_format,
+ const struct ia_css_frame_info *in_info,
+ const struct ia_css_frame_info *bds_out_info,
+ const struct ia_css_frame_info *out_info[],
+ const struct ia_css_frame_info *vf_info,
+ struct ia_css_binary *binary,
+ struct ia_css_resolution *dvs_env,
+ int stream_config_left_padding,
+ bool accelerator);
enum ia_css_err
ia_css_binary_find(struct ia_css_binary_descr *descr,
*/
enum ia_css_err
ia_css_binary_get_shading_info(const struct ia_css_binary *binary,
- enum ia_css_shading_correction_type type,
- unsigned int required_bds_factor,
- const struct ia_css_stream_config *stream_config,
+ enum ia_css_shading_correction_type type,
+ unsigned int required_bds_factor,
+ const struct ia_css_stream_config *stream_config,
#ifndef ISP2401
- struct ia_css_shading_info *info);
+ struct ia_css_shading_info *info);
#else
- struct ia_css_shading_info *shading_info,
- struct ia_css_pipe_config *pipe_config);
+ struct ia_css_shading_info *shading_info,
+ struct ia_css_pipe_config *pipe_config);
#endif
enum ia_css_err
void
ia_css_binary_dvs_stat_grid_info(
- const struct ia_css_binary *binary,
- struct ia_css_grid_info *info,
- struct ia_css_pipe *pipe);
+ const struct ia_css_binary *binary,
+ struct ia_css_grid_info *info,
+ struct ia_css_pipe *pipe);
unsigned
ia_css_binary_max_vf_width(void);
void
ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
- uint32_t *num_isp_binaries);
+ uint32_t *num_isp_binaries);
#endif /* _IA_CSS_BINARY_H_ */
if (binary_supports_yuv_ds) {
if (in_info) {
isp_tmp_internal_width = in_info->res.width
- + info->pipeline.left_cropping + binary_dvs_env.width;
+ + info->pipeline.left_cropping + binary_dvs_env.width;
isp_tmp_internal_height = in_info->res.height
- + info->pipeline.top_cropping + binary_dvs_env.height;
+ + info->pipeline.top_cropping + binary_dvs_env.height;
}
} else if ((bds_out_info) && (out_info) &&
- /* TODO: hack to make video_us case work. this should be reverted after
- a nice solution in ISP */
- (bds_out_info->res.width >= out_info->res.width)) {
- isp_tmp_internal_width = bds_out_info->padded_width;
- isp_tmp_internal_height = bds_out_info->res.height;
+ /* TODO: hack to make video_us case work. this should be reverted after
+ a nice solution in ISP */
+ (bds_out_info->res.width >= out_info->res.width)) {
+ isp_tmp_internal_width = bds_out_info->padded_width;
+ isp_tmp_internal_height = bds_out_info->res.height;
} else {
if (out_info) {
isp_tmp_internal_width = out_info->padded_width;
/* We first calculate the resolutions used by the ISP. After that,
* we use those resolutions to compute sizes for tables etc. */
internal_res->width = __ISP_INTERNAL_WIDTH(isp_tmp_internal_width,
- (int)binary_dvs_env.width,
- info->pipeline.left_cropping, info->pipeline.mode,
- info->pipeline.c_subsampling,
- info->output.num_chunks, info->pipeline.pipelining);
+ (int)binary_dvs_env.width,
+ info->pipeline.left_cropping, info->pipeline.mode,
+ info->pipeline.c_subsampling,
+ info->output.num_chunks, info->pipeline.pipelining);
internal_res->height = __ISP_INTERNAL_HEIGHT(isp_tmp_internal_height,
- info->pipeline.top_cropping,
- binary_dvs_env.height);
+ info->pipeline.top_cropping,
+ binary_dvs_env.height);
}
#ifndef ISP2401
static enum ia_css_err
#ifndef ISP2401
ia_css_binary_compute_shading_table_bayer_origin(
- const struct ia_css_binary *binary, /* [in] */
- unsigned int required_bds_factor, /* [in] */
- const struct ia_css_stream_config *stream_config, /* [in] */
- struct sh_css_shading_table_bayer_origin_compute_results *res) /* [out] */
+ const struct ia_css_binary *binary, /* [in] */
+ unsigned int required_bds_factor, /* [in] */
+ const struct ia_css_stream_config *stream_config, /* [in] */
+ struct sh_css_shading_table_bayer_origin_compute_results *res) /* [out] */
#else
sh_css_binary_get_sc_requirements(
- const struct ia_css_binary *binary, /* [in] */
- unsigned int required_bds_factor, /* [in] */
- const struct ia_css_stream_config *stream_config, /* [in] */
- struct sh_css_binary_sc_requirements *scr) /* [out] */
+ const struct ia_css_binary *binary, /* [in] */
+ unsigned int required_bds_factor, /* [in] */
+ const struct ia_css_stream_config *stream_config, /* [in] */
+ struct sh_css_binary_sc_requirements *scr) /* [out] */
#endif
{
enum ia_css_err err;
/* Get the numerator and denominator of bayer downscaling factor. */
err = sh_css_bds_factor_get_numerator_denominator
- (required_bds_factor, &bds_num, &bds_den);
+ (required_bds_factor, &bds_num, &bds_den);
if (err != IA_CSS_SUCCESS)
#else
/* Flags corresponding to NEED_BDS_FACTOR_2_00/NEED_BDS_FACTOR_1_50/NEED_BDS_FACTOR_1_25 macros
unsigned int sensor_data_origin_y_bqs_on_internal;
IA_CSS_ENTER_PRIVATE("binary=%p, required_bds_factor=%d, stream_config=%p",
- binary, required_bds_factor, stream_config);
+ binary, required_bds_factor, stream_config);
/* Get the numerator and denominator of the required bayer downscaling factor. */
err = sh_css_bds_factor_get_numerator_denominator(required_bds_factor, &bds_num, &bds_den);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
#endif
return err;
#ifdef ISP2401
- }
+}
#endif
#ifndef ISP2401
- /* Set the horizontal/vertical ratio of bayer scaling
- between input area and output area. */
+/* Set the horizontal/vertical ratio of bayer scaling
+between input area and output area. */
#else
- IA_CSS_LOG("bds_num=%d, bds_den=%d", bds_num, bds_den);
+IA_CSS_LOG("bds_num=%d, bds_den=%d", bds_num, bds_den);
- /* Set the horizontal/vertical ratio of bayer scaling between input area and output area. */
+/* Set the horizontal/vertical ratio of bayer scaling between input area and output area. */
#endif
- bs_hor_ratio_in = bds_num;
- bs_hor_ratio_out = bds_den;
- bs_ver_ratio_in = bds_num;
- bs_ver_ratio_out = bds_den;
+bs_hor_ratio_in = bds_num;
+bs_hor_ratio_out = bds_den;
+bs_ver_ratio_in = bds_num;
+bs_ver_ratio_out = bds_den;
#ifndef ISP2401
- /* Set the left padding set by InputFormatter. (ifmtr.c) */
+/* Set the left padding set by InputFormatter. (ifmtr.c) */
#else
- /* Set the left padding set by InputFormatter. (ia_css_ifmtr_configure() in ifmtr.c) */
+/* Set the left padding set by InputFormatter. (ia_css_ifmtr_configure() in ifmtr.c) */
#endif
- if (stream_config->left_padding == -1)
- left_padding_bqs = _ISP_BQS(binary->left_padding);
- else
+if (stream_config->left_padding == -1)
+ left_padding_bqs = _ISP_BQS(binary->left_padding);
+else
#ifndef ISP2401
- left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS
- - _ISP_BQS(stream_config->left_padding));
+ left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS
+ - _ISP_BQS(stream_config->left_padding));
#else
- left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS - _ISP_BQS(stream_config->left_padding));
+ left_padding_bqs = (unsigned int)((int)ISP_VEC_NELEMS - _ISP_BQS(stream_config->left_padding));
#endif
#ifndef ISP2401
- /* Set the left padding adjusted inside the isp.
- When bds_factor 2.00 is needed, some padding is added to left_padding
- inside the isp, before bayer downscaling. (raw.isp.c)
- (Hopefully, left_crop/left_padding/top_crop should be defined in css
- appropriately, depending on bds_factor.)
- */
+/* Set the left padding adjusted inside the isp.
+When bds_factor 2.00 is needed, some padding is added to left_padding
+inside the isp, before bayer downscaling. (raw.isp.c)
+(Hopefully, left_crop/left_padding/top_crop should be defined in css
+appropriately, depending on bds_factor.)
+*/
#else
- IA_CSS_LOG("stream.left_padding=%d, binary.left_padding=%d, left_padding_bqs=%d",
- stream_config->left_padding, binary->left_padding, left_padding_bqs);
+IA_CSS_LOG("stream.left_padding=%d, binary.left_padding=%d, left_padding_bqs=%d",
+ stream_config->left_padding, binary->left_padding, left_padding_bqs);
- /* Set the left padding adjusted inside the isp kernels.
- * When the bds_factor isn't 1.00, the left padding size is adjusted inside the isp,
- * before bayer downscaling. (scaled_hor_plane_index(), raw_compute_hphase() in raw.isp.c)
- */
+/* Set the left padding adjusted inside the isp kernels.
+ * When the bds_factor isn't 1.00, the left padding size is adjusted inside the isp,
+ * before bayer downscaling. (scaled_hor_plane_index(), raw_compute_hphase() in raw.isp.c)
+ */
#endif
- need_bds_factor_2_00 = ((binary->info->sp.bds.supported_bds_factors &
- (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_8_00))) != 0);
+need_bds_factor_2_00 = ((binary->info->sp.bds.supported_bds_factors &
+ (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_8_00))) != 0);
#ifndef ISP2401
- if (need_bds_factor_2_00 && binary->info->sp.pipeline.left_cropping > 0)
- left_padding_adjusted_bqs = left_padding_bqs + ISP_VEC_NELEMS;
- else
+if (need_bds_factor_2_00 && binary->info->sp.pipeline.left_cropping > 0)
+ left_padding_adjusted_bqs = left_padding_bqs + ISP_VEC_NELEMS;
+else
#else
- need_bds_factor_1_50 = ((binary->info->sp.bds.supported_bds_factors &
- (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_50) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_25) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00))) != 0);
-
- need_bds_factor_1_25 = ((binary->info->sp.bds.supported_bds_factors &
- (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_25) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
- PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00))) != 0);
-
- if (binary->info->sp.pipeline.left_cropping > 0 &&
- (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25)) {
- /*
- * downscale 2.0 -> first_vec_adjusted_bqs = 128
- * downscale 1.5 -> first_vec_adjusted_bqs = 96
- * downscale 1.25 -> first_vec_adjusted_bqs = 80
- */
- unsigned int first_vec_adjusted_bqs
- = ISP_VEC_NELEMS * bs_hor_ratio_in / bs_hor_ratio_out;
- left_padding_adjusted_bqs = first_vec_adjusted_bqs
- - _ISP_BQS(binary->info->sp.pipeline.left_cropping);
- } else
+need_bds_factor_1_50 = ((binary->info->sp.bds.supported_bds_factors &
+ (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_50) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_25) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_3_00) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_4_50) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_6_00))) != 0);
+
+need_bds_factor_1_25 = ((binary->info->sp.bds.supported_bds_factors &
+ (PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_1_25) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_2_50) |
+ PACK_BDS_FACTOR(SH_CSS_BDS_FACTOR_5_00))) != 0);
+
+if (binary->info->sp.pipeline.left_cropping > 0 &&
+ (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25))
+{
+ /*
+ * downscale 2.0 -> first_vec_adjusted_bqs = 128
+ * downscale 1.5 -> first_vec_adjusted_bqs = 96
+ * downscale 1.25 -> first_vec_adjusted_bqs = 80
+ */
+ unsigned int first_vec_adjusted_bqs
+ = ISP_VEC_NELEMS * bs_hor_ratio_in / bs_hor_ratio_out;
+ left_padding_adjusted_bqs = first_vec_adjusted_bqs
+ - _ISP_BQS(binary->info->sp.pipeline.left_cropping);
+} else
#endif
- left_padding_adjusted_bqs = left_padding_bqs;
+ left_padding_adjusted_bqs = left_padding_bqs;
#ifndef ISP2401
- /* Currently, the bad pixel caused by filters before bayer scaling
- is NOT considered, because the bad pixel is subtle.
- When some large filter is used in the future,
- we need to consider the bad pixel.
-
- Currently, when bds_factor isn't 1.00, 3x3 anti-alias filter is applied
- to each color plane(Gr/R/B/Gb) before bayer downscaling.
- This filter moves each color plane to right/bottom directions
- by 1 pixel at the most, depending on downscaling factor.
- */
- bad_bqs_on_left_before_bs = 0;
- bad_bqs_on_top_before_bs = 0;
+/* Currently, the bad pixel caused by filters before bayer scaling
+is NOT considered, because the bad pixel is subtle.
+When some large filter is used in the future,
+we need to consider the bad pixel.
+
+Currently, when bds_factor isn't 1.00, 3x3 anti-alias filter is applied
+to each color plane(Gr/R/B/Gb) before bayer downscaling.
+This filter moves each color plane to right/bottom directions
+by 1 pixel at the most, depending on downscaling factor.
+*/
+bad_bqs_on_left_before_bs = 0;
+bad_bqs_on_top_before_bs = 0;
#else
- IA_CSS_LOG("supported_bds_factors=%d, need_bds_factor:2_00=%d, 1_50=%d, 1_25=%d",
- binary->info->sp.bds.supported_bds_factors,
- need_bds_factor_2_00, need_bds_factor_1_50, need_bds_factor_1_25);
- IA_CSS_LOG("left_cropping=%d, left_padding_adjusted_bqs=%d",
- binary->info->sp.pipeline.left_cropping, left_padding_adjusted_bqs);
-
- /* Set the top padding padded inside the isp kernel for bayer downscaling binaries.
- * When the bds_factor isn't 1.00, the top padding is padded inside the isp
- * before bayer downscaling, because the top cropping size (input margin) is not enough.
- * (calculate_input_line(), raw_compute_vphase(), dma_read_raw() in raw.isp.c)
- * NOTE: In dma_read_raw(), the factor passed to raw_compute_vphase() is got by get_bds_factor_for_dma_read().
- * This factor is BDS_FPVAL_100/BDS_FPVAL_125/BDS_FPVAL_150/BDS_FPVAL_200.
- */
- top_padding_bqs = 0;
- if (binary->info->sp.pipeline.top_cropping > 0 &&
- (required_bds_factor == SH_CSS_BDS_FACTOR_1_25 ||
- required_bds_factor == SH_CSS_BDS_FACTOR_1_50 ||
- required_bds_factor == SH_CSS_BDS_FACTOR_2_00)) {
- /* Calculation from calculate_input_line() and raw_compute_vphase() in raw.isp.c. */
- int top_cropping_bqs = _ISP_BQS(binary->info->sp.pipeline.top_cropping);
- /* top cropping (in bqs) */
- int factor = bds_num * bds_frac_acc / bds_den; /* downscaling factor by fixed-point */
- int top_padding_bqsxfrac_acc = (top_cropping_bqs * factor - top_cropping_bqs * bds_frac_acc)
- + (2 * bds_frac_acc - factor); /* top padding by fixed-point (in bqs) */
-
- top_padding_bqs = (unsigned int)((top_padding_bqsxfrac_acc + bds_frac_acc / 2 - 1) / bds_frac_acc);
- }
+IA_CSS_LOG("supported_bds_factors=%d, need_bds_factor:2_00=%d, 1_50=%d, 1_25=%d",
+ binary->info->sp.bds.supported_bds_factors,
+ need_bds_factor_2_00, need_bds_factor_1_50, need_bds_factor_1_25);
+IA_CSS_LOG("left_cropping=%d, left_padding_adjusted_bqs=%d",
+ binary->info->sp.pipeline.left_cropping, left_padding_adjusted_bqs);
+
+/* Set the top padding padded inside the isp kernel for bayer downscaling binaries.
+ * When the bds_factor isn't 1.00, the top padding is padded inside the isp
+ * before bayer downscaling, because the top cropping size (input margin) is not enough.
+ * (calculate_input_line(), raw_compute_vphase(), dma_read_raw() in raw.isp.c)
+ * NOTE: In dma_read_raw(), the factor passed to raw_compute_vphase() is got by get_bds_factor_for_dma_read().
+ * This factor is BDS_FPVAL_100/BDS_FPVAL_125/BDS_FPVAL_150/BDS_FPVAL_200.
+ */
+top_padding_bqs = 0;
+if (binary->info->sp.pipeline.top_cropping > 0 &&
+ (required_bds_factor == SH_CSS_BDS_FACTOR_1_25 ||
+ required_bds_factor == SH_CSS_BDS_FACTOR_1_50 ||
+ required_bds_factor == SH_CSS_BDS_FACTOR_2_00))
+{
+ /* Calculation from calculate_input_line() and raw_compute_vphase() in raw.isp.c. */
+ int top_cropping_bqs = _ISP_BQS(binary->info->sp.pipeline.top_cropping);
+ /* top cropping (in bqs) */
+ int factor = bds_num * bds_frac_acc /
+ bds_den; /* downscaling factor by fixed-point */
+ int top_padding_bqsxfrac_acc = (top_cropping_bqs * factor - top_cropping_bqs *
+ bds_frac_acc)
+ + (2 * bds_frac_acc - factor); /* top padding by fixed-point (in bqs) */
+
+ top_padding_bqs = (unsigned int)((top_padding_bqsxfrac_acc + bds_frac_acc / 2 -
+ 1) / bds_frac_acc);
+}
- IA_CSS_LOG("top_cropping=%d, top_padding_bqs=%d", binary->info->sp.pipeline.top_cropping, top_padding_bqs);
+IA_CSS_LOG("top_cropping=%d, top_padding_bqs=%d", binary->info->sp.pipeline.top_cropping, top_padding_bqs);
- /* Set the right/down shift amount caused by filters applied BEFORE bayer scaling,
- * which scaling is applied BEFORE shading corrertion.
- *
- * When the bds_factor isn't 1.00, 3x3 anti-alias filter is applied to each color plane(Gr/R/B/Gb)
- * before bayer downscaling.
- * This filter shifts each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
- */
- right_shift_bqs_before_bs = 0;
- down_shift_bqs_before_bs = 0;
+/* Set the right/down shift amount caused by filters applied BEFORE bayer scaling,
+ * which scaling is applied BEFORE shading corrertion.
+ *
+ * When the bds_factor isn't 1.00, 3x3 anti-alias filter is applied to each color plane(Gr/R/B/Gb)
+ * before bayer downscaling.
+ * This filter shifts each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
+ */
+right_shift_bqs_before_bs = 0;
+down_shift_bqs_before_bs = 0;
#endif
#ifndef ISP2401
- /* Currently, the bad pixel caused by filters after bayer scaling
- is NOT considered, because the bad pixel is subtle.
- When some large filter is used in the future,
- we need to consider the bad pixel.
-
- Currently, when DPC&BNR is processed between bayer scaling and
- shading correction, DPC&BNR moves each color plane to
- right/bottom directions by 1 pixel.
- */
- bad_bqs_on_left_after_bs = 0;
- bad_bqs_on_top_after_bs = 0;
+/* Currently, the bad pixel caused by filters after bayer scaling
+is NOT considered, because the bad pixel is subtle.
+When some large filter is used in the future,
+we need to consider the bad pixel.
+
+Currently, when DPC&BNR is processed between bayer scaling and
+shading correction, DPC&BNR moves each color plane to
+right/bottom directions by 1 pixel.
+*/
+bad_bqs_on_left_after_bs = 0;
+bad_bqs_on_top_after_bs = 0;
#else
- if (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25) {
- right_shift_bqs_before_bs = 1;
- down_shift_bqs_before_bs = 1;
- }
+if (need_bds_factor_2_00 || need_bds_factor_1_50 || need_bds_factor_1_25)
+{
+ right_shift_bqs_before_bs = 1;
+ down_shift_bqs_before_bs = 1;
+}
- IA_CSS_LOG("right_shift_bqs_before_bs=%d, down_shift_bqs_before_bs=%d",
- right_shift_bqs_before_bs, down_shift_bqs_before_bs);
+IA_CSS_LOG("right_shift_bqs_before_bs=%d, down_shift_bqs_before_bs=%d",
+ right_shift_bqs_before_bs, down_shift_bqs_before_bs);
- /* Set the right/down shift amount caused by filters applied AFTER bayer scaling,
- * which scaling is applied BEFORE shading corrertion.
- *
- * When DPC&BNR is processed between bayer scaling and shading correction,
- * DPC&BNR moves each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
- */
- right_shift_bqs_after_bs = 0;
- down_shift_bqs_after_bs = 0;
+/* Set the right/down shift amount caused by filters applied AFTER bayer scaling,
+ * which scaling is applied BEFORE shading corrertion.
+ *
+ * When DPC&BNR is processed between bayer scaling and shading correction,
+ * DPC&BNR moves each color plane (Gr/R/B/Gb) to right/down directions by 1 pixel.
+ */
+right_shift_bqs_after_bs = 0;
+down_shift_bqs_after_bs = 0;
#endif
#ifndef ISP2401
- /* Calculate the origin of bayer (real sensor data area)
- located on the shading table during the shading correction. */
- res->sc_bayer_origin_x_bqs_on_shading_table
- = ((left_padding_adjusted_bqs + bad_bqs_on_left_before_bs)
- * bs_hor_ratio_out + bs_hor_ratio_in / 2) / bs_hor_ratio_in
- + bad_bqs_on_left_after_bs;
- /* "+ bs_hor_ratio_in/2": rounding for division by bs_hor_ratio_in */
- res->sc_bayer_origin_y_bqs_on_shading_table
- = (bad_bqs_on_top_before_bs
- * bs_ver_ratio_out + bs_ver_ratio_in / 2) / bs_ver_ratio_in
- + bad_bqs_on_top_after_bs;
- /* "+ bs_ver_ratio_in/2": rounding for division by bs_ver_ratio_in */
-
- res->bayer_scale_hor_ratio_in = (uint32_t)bs_hor_ratio_in;
- res->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
- res->bayer_scale_ver_ratio_in = (uint32_t)bs_ver_ratio_in;
- res->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
+/* Calculate the origin of bayer (real sensor data area)
+located on the shading table during the shading correction. */
+res->sc_bayer_origin_x_bqs_on_shading_table
+= ((left_padding_adjusted_bqs + bad_bqs_on_left_before_bs)
+ * bs_hor_ratio_out + bs_hor_ratio_in / 2) / bs_hor_ratio_in
++ bad_bqs_on_left_after_bs;
+/* "+ bs_hor_ratio_in/2": rounding for division by bs_hor_ratio_in */
+res->sc_bayer_origin_y_bqs_on_shading_table
+= (bad_bqs_on_top_before_bs
+ * bs_ver_ratio_out + bs_ver_ratio_in / 2) / bs_ver_ratio_in
++ bad_bqs_on_top_after_bs;
+/* "+ bs_ver_ratio_in/2": rounding for division by bs_ver_ratio_in */
+
+res->bayer_scale_hor_ratio_in = (uint32_t)bs_hor_ratio_in;
+res->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
+res->bayer_scale_ver_ratio_in = (uint32_t)bs_ver_ratio_in;
+res->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
#else
- if (binary->info->mem_offsets.offsets.param->dmem.dp.size != 0) { /* if DPC&BNR is enabled in the binary */
- right_shift_bqs_after_bs = 1;
- down_shift_bqs_after_bs = 1;
- }
+if (binary->info->mem_offsets.offsets.param->dmem.dp.size != 0) /* if DPC&BNR is enabled in the binary */
+{
+ right_shift_bqs_after_bs = 1;
+ down_shift_bqs_after_bs = 1;
+}
- IA_CSS_LOG("right_shift_bqs_after_bs=%d, down_shift_bqs_after_bs=%d",
- right_shift_bqs_after_bs, down_shift_bqs_after_bs);
+IA_CSS_LOG("right_shift_bqs_after_bs=%d, down_shift_bqs_after_bs=%d",
+ right_shift_bqs_after_bs, down_shift_bqs_after_bs);
- /* Set the origin of the sensor data area on the internal frame at shading correction. */
- {
- unsigned int bs_frac = bds_frac_acc; /* scaling factor 1.0 in fixed point */
- unsigned int bs_out, bs_in; /* scaling ratio in fixed point */
-
- bs_out = bs_hor_ratio_out * bs_frac;
- bs_in = bs_hor_ratio_in * bs_frac;
- sensor_data_origin_x_bqs_on_internal
- = ((left_padding_adjusted_bqs + right_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
- + right_shift_bqs_after_bs; /* "+ bs_in/2": rounding */
-
- bs_out = bs_ver_ratio_out * bs_frac;
- bs_in = bs_ver_ratio_in * bs_frac;
- sensor_data_origin_y_bqs_on_internal
- = ((top_padding_bqs + down_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
- + down_shift_bqs_after_bs; /* "+ bs_in/2": rounding */
- }
+/* Set the origin of the sensor data area on the internal frame at shading correction. */
+{
+ unsigned int bs_frac = bds_frac_acc; /* scaling factor 1.0 in fixed point */
+ unsigned int bs_out, bs_in; /* scaling ratio in fixed point */
+
+ bs_out = bs_hor_ratio_out * bs_frac;
+ bs_in = bs_hor_ratio_in * bs_frac;
+ sensor_data_origin_x_bqs_on_internal
+ = ((left_padding_adjusted_bqs + right_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
+ + right_shift_bqs_after_bs; /* "+ bs_in/2": rounding */
+
+ bs_out = bs_ver_ratio_out * bs_frac;
+ bs_in = bs_ver_ratio_in * bs_frac;
+ sensor_data_origin_y_bqs_on_internal
+ = ((top_padding_bqs + down_shift_bqs_before_bs) * bs_out + bs_in / 2) / bs_in
+ + down_shift_bqs_after_bs; /* "+ bs_in/2": rounding */
+}
- scr->bayer_scale_hor_ratio_in = (uint32_t)bs_hor_ratio_in;
- scr->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
- scr->bayer_scale_ver_ratio_in = (uint32_t)bs_ver_ratio_in;
- scr->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
- scr->sensor_data_origin_x_bqs_on_internal = (uint32_t)sensor_data_origin_x_bqs_on_internal;
- scr->sensor_data_origin_y_bqs_on_internal = (uint32_t)sensor_data_origin_y_bqs_on_internal;
-
- IA_CSS_LOG("sc_requirements: %d, %d, %d, %d, %d, %d",
- scr->bayer_scale_hor_ratio_in, scr->bayer_scale_hor_ratio_out,
- scr->bayer_scale_ver_ratio_in, scr->bayer_scale_ver_ratio_out,
- scr->sensor_data_origin_x_bqs_on_internal, scr->sensor_data_origin_y_bqs_on_internal);
+scr->bayer_scale_hor_ratio_in = (uint32_t)bs_hor_ratio_in;
+scr->bayer_scale_hor_ratio_out = (uint32_t)bs_hor_ratio_out;
+scr->bayer_scale_ver_ratio_in = (uint32_t)bs_ver_ratio_in;
+scr->bayer_scale_ver_ratio_out = (uint32_t)bs_ver_ratio_out;
+scr->sensor_data_origin_x_bqs_on_internal = (uint32_t)sensor_data_origin_x_bqs_on_internal;
+scr->sensor_data_origin_y_bqs_on_internal = (uint32_t)sensor_data_origin_y_bqs_on_internal;
+
+IA_CSS_LOG("sc_requirements: %d, %d, %d, %d, %d, %d",
+ scr->bayer_scale_hor_ratio_in, scr->bayer_scale_hor_ratio_out,
+ scr->bayer_scale_ver_ratio_in, scr->bayer_scale_ver_ratio_out,
+ scr->sensor_data_origin_x_bqs_on_internal, scr->sensor_data_origin_y_bqs_on_internal);
#endif
#ifdef ISP2401
- IA_CSS_LEAVE_ERR_PRIVATE(err);
+IA_CSS_LEAVE_ERR_PRIVATE(err);
#endif
- return err;
+return err;
}
/* Get the shading information of Shading Correction Type 1. */
static enum ia_css_err
-ia_css_binary_get_shading_info_type_1(const struct ia_css_binary *binary, /* [in] */
- unsigned int required_bds_factor, /* [in] */
- const struct ia_css_stream_config *stream_config, /* [in] */
+ia_css_binary_get_shading_info_type_1(const struct ia_css_binary
+ *binary, /* [in] */
+ unsigned int required_bds_factor, /* [in] */
+ const struct ia_css_stream_config *stream_config, /* [in] */
#ifndef ISP2401
- struct ia_css_shading_info *info) /* [out] */
+ struct ia_css_shading_info *info) /* [out] */
#else
- struct ia_css_shading_info *shading_info, /* [out] */
- struct ia_css_pipe_config *pipe_config) /* [out] */
+ struct ia_css_shading_info *shading_info, /* [out] */
+ struct ia_css_pipe_config *pipe_config) /* [out] */
#endif
{
enum ia_css_err err;
info->info.type_1.bqs_per_grid_cell = (1 << binary->deci_factor_log2);
#else
IA_CSS_ENTER_PRIVATE("binary=%p, required_bds_factor=%d, stream_config=%p",
- binary, required_bds_factor, stream_config);
+ binary, required_bds_factor, stream_config);
#endif
/* Initialize by default values. */
info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = 0;
err = ia_css_binary_compute_shading_table_bayer_origin(
- binary,
- required_bds_factor,
- stream_config,
- &res);
+ binary,
+ required_bds_factor,
+ stream_config,
+ &res);
if (err != IA_CSS_SUCCESS)
#else
*shading_info = DEFAULT_SHADING_INFO_TYPE_1;
err = sh_css_binary_get_sc_requirements(binary, required_bds_factor, stream_config, &scr);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
#endif
return err;
#ifdef ISP2401
- }
+}
- IA_CSS_LOG("binary: id=%d, sctbl=%dx%d, deci=%d",
- binary->info->sp.id, binary->sctbl_width_per_color, binary->sctbl_height, binary->deci_factor_log2);
- IA_CSS_LOG("binary: in=%dx%d, in_padded_w=%d, int=%dx%d, int_padded_w=%d, out=%dx%d, out_padded_w=%d",
- binary->in_frame_info.res.width, binary->in_frame_info.res.height, binary->in_frame_info.padded_width,
- binary->internal_frame_info.res.width, binary->internal_frame_info.res.height,
- binary->internal_frame_info.padded_width,
- binary->out_frame_info[0].res.width, binary->out_frame_info[0].res.height,
- binary->out_frame_info[0].padded_width);
-
- /* Set the input size from sensor, which includes left/top crop size. */
- in_width_bqs = _ISP_BQS(binary->in_frame_info.res.width);
- in_height_bqs = _ISP_BQS(binary->in_frame_info.res.height);
-
- /* Frame size internally used in ISP, including sensor data and padding.
- * This is the frame size, to which the shading correction is applied.
- */
- internal_width_bqs = _ISP_BQS(binary->internal_frame_info.res.width);
- internal_height_bqs = _ISP_BQS(binary->internal_frame_info.res.height);
-
- /* Shading table. */
- num_hor_grids = binary->sctbl_width_per_color;
- num_ver_grids = binary->sctbl_height;
- bqs_per_grid_cell = (1 << binary->deci_factor_log2);
- tbl_width_bqs = (num_hor_grids - 1) * bqs_per_grid_cell;
- tbl_height_bqs = (num_ver_grids - 1) * bqs_per_grid_cell;
+IA_CSS_LOG("binary: id=%d, sctbl=%dx%d, deci=%d",
+ binary->info->sp.id, binary->sctbl_width_per_color, binary->sctbl_height, binary->deci_factor_log2);
+IA_CSS_LOG("binary: in=%dx%d, in_padded_w=%d, int=%dx%d, int_padded_w=%d, out=%dx%d, out_padded_w=%d",
+ binary->in_frame_info.res.width, binary->in_frame_info.res.height, binary->in_frame_info.padded_width,
+ binary->internal_frame_info.res.width, binary->internal_frame_info.res.height,
+ binary->internal_frame_info.padded_width,
+ binary->out_frame_info[0].res.width, binary->out_frame_info[0].res.height,
+ binary->out_frame_info[0].padded_width);
+
+/* Set the input size from sensor, which includes left/top crop size. */
+in_width_bqs = _ISP_BQS(binary->in_frame_info.res.width);
+in_height_bqs = _ISP_BQS(binary->in_frame_info.res.height);
+
+/* Frame size internally used in ISP, including sensor data and padding.
+ * This is the frame size, to which the shading correction is applied.
+ */
+internal_width_bqs = _ISP_BQS(binary->internal_frame_info.res.width);
+internal_height_bqs = _ISP_BQS(binary->internal_frame_info.res.height);
+
+/* Shading table. */
+num_hor_grids = binary->sctbl_width_per_color;
+num_ver_grids = binary->sctbl_height;
+bqs_per_grid_cell = (1 << binary->deci_factor_log2);
+tbl_width_bqs = (num_hor_grids - 1) * bqs_per_grid_cell;
+tbl_height_bqs = (num_ver_grids - 1) * bqs_per_grid_cell;
#endif
#ifndef ISP2401
- info->info.type_1.bayer_scale_hor_ratio_in = res.bayer_scale_hor_ratio_in;
- info->info.type_1.bayer_scale_hor_ratio_out = res.bayer_scale_hor_ratio_out;
- info->info.type_1.bayer_scale_ver_ratio_in = res.bayer_scale_ver_ratio_in;
- info->info.type_1.bayer_scale_ver_ratio_out = res.bayer_scale_ver_ratio_out;
- info->info.type_1.sc_bayer_origin_x_bqs_on_shading_table = res.sc_bayer_origin_x_bqs_on_shading_table;
- info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = res.sc_bayer_origin_y_bqs_on_shading_table;
+info->info.type_1.bayer_scale_hor_ratio_in = res.bayer_scale_hor_ratio_in;
+info->info.type_1.bayer_scale_hor_ratio_out = res.bayer_scale_hor_ratio_out;
+info->info.type_1.bayer_scale_ver_ratio_in = res.bayer_scale_ver_ratio_in;
+info->info.type_1.bayer_scale_ver_ratio_out = res.bayer_scale_ver_ratio_out;
+info->info.type_1.sc_bayer_origin_x_bqs_on_shading_table = res.sc_bayer_origin_x_bqs_on_shading_table;
+info->info.type_1.sc_bayer_origin_y_bqs_on_shading_table = res.sc_bayer_origin_y_bqs_on_shading_table;
#else
- IA_CSS_LOG("tbl_width_bqs=%d, tbl_height_bqs=%d", tbl_width_bqs, tbl_height_bqs);
+IA_CSS_LOG("tbl_width_bqs=%d, tbl_height_bqs=%d", tbl_width_bqs, tbl_height_bqs);
#endif
#ifdef ISP2401
- /* Real sensor data area on the internal frame at shading correction.
- * Filters and scaling are applied to the internal frame before shading correction, depending on the binary.
- */
- sensor_org_x_bqs_on_internal = scr.sensor_data_origin_x_bqs_on_internal;
- sensor_org_y_bqs_on_internal = scr.sensor_data_origin_y_bqs_on_internal;
- {
- unsigned int bs_frac = 8; /* scaling factor 1.0 in fixed point (8 == FRAC_ACC macro in ISP) */
- unsigned int bs_out, bs_in; /* scaling ratio in fixed point */
-
- bs_out = scr.bayer_scale_hor_ratio_out * bs_frac;
- bs_in = scr.bayer_scale_hor_ratio_in * bs_frac;
- sensor_width_bqs = (in_width_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
+/* Real sensor data area on the internal frame at shading correction.
+ * Filters and scaling are applied to the internal frame before shading correction, depending on the binary.
+ */
+sensor_org_x_bqs_on_internal = scr.sensor_data_origin_x_bqs_on_internal;
+sensor_org_y_bqs_on_internal = scr.sensor_data_origin_y_bqs_on_internal;
+{
+ unsigned int bs_frac = 8; /* scaling factor 1.0 in fixed point (8 == FRAC_ACC macro in ISP) */
+ unsigned int bs_out, bs_in; /* scaling ratio in fixed point */
- bs_out = scr.bayer_scale_ver_ratio_out * bs_frac;
- bs_in = scr.bayer_scale_ver_ratio_in * bs_frac;
- sensor_height_bqs = (in_height_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
- }
+ bs_out = scr.bayer_scale_hor_ratio_out * bs_frac;
+ bs_in = scr.bayer_scale_hor_ratio_in * bs_frac;
+ sensor_width_bqs = (in_width_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
- /* Center of the sensor data on the internal frame at shading correction. */
- sensor_center_x_bqs_on_internal = sensor_org_x_bqs_on_internal + sensor_width_bqs / 2;
- sensor_center_y_bqs_on_internal = sensor_org_y_bqs_on_internal + sensor_height_bqs / 2;
+ bs_out = scr.bayer_scale_ver_ratio_out * bs_frac;
+ bs_in = scr.bayer_scale_ver_ratio_in * bs_frac;
+ sensor_height_bqs = (in_height_bqs * bs_out + bs_in / 2) / bs_in; /* "+ bs_in/2": rounding */
+}
- /* Size of left/right/upper/lower sides of the sensor center on the internal frame. */
- left = sensor_center_x_bqs_on_internal;
- right = internal_width_bqs - sensor_center_x_bqs_on_internal;
- upper = sensor_center_y_bqs_on_internal;
- lower = internal_height_bqs - sensor_center_y_bqs_on_internal;
+/* Center of the sensor data on the internal frame at shading correction. */
+sensor_center_x_bqs_on_internal = sensor_org_x_bqs_on_internal + sensor_width_bqs / 2;
+sensor_center_y_bqs_on_internal = sensor_org_y_bqs_on_internal + sensor_height_bqs / 2;
- /* Align the size of left/right/upper/lower sides to a multiple of the grid cell size. */
- adjust_left = CEIL_MUL(left, bqs_per_grid_cell);
- adjust_right = CEIL_MUL(right, bqs_per_grid_cell);
- adjust_upper = CEIL_MUL(upper, bqs_per_grid_cell);
- adjust_lower = CEIL_MUL(lower, bqs_per_grid_cell);
+/* Size of left/right/upper/lower sides of the sensor center on the internal frame. */
+left = sensor_center_x_bqs_on_internal;
+right = internal_width_bqs - sensor_center_x_bqs_on_internal;
+upper = sensor_center_y_bqs_on_internal;
+lower = internal_height_bqs - sensor_center_y_bqs_on_internal;
- /* Shading table should cover the adjusted frame size. */
- adjust_width_bqs = adjust_left + adjust_right;
- adjust_height_bqs = adjust_upper + adjust_lower;
+/* Align the size of left/right/upper/lower sides to a multiple of the grid cell size. */
+adjust_left = CEIL_MUL(left, bqs_per_grid_cell);
+adjust_right = CEIL_MUL(right, bqs_per_grid_cell);
+adjust_upper = CEIL_MUL(upper, bqs_per_grid_cell);
+adjust_lower = CEIL_MUL(lower, bqs_per_grid_cell);
- IA_CSS_LOG("adjust_width_bqs=%d, adjust_height_bqs=%d", adjust_width_bqs, adjust_height_bqs);
+/* Shading table should cover the adjusted frame size. */
+adjust_width_bqs = adjust_left + adjust_right;
+adjust_height_bqs = adjust_upper + adjust_lower;
- if (adjust_width_bqs > tbl_width_bqs || adjust_height_bqs > tbl_height_bqs) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
- return IA_CSS_ERR_INTERNAL_ERROR;
- }
+IA_CSS_LOG("adjust_width_bqs=%d, adjust_height_bqs=%d", adjust_width_bqs, adjust_height_bqs);
- /* Origin of the internal frame on the shading table. */
- internal_org_x_bqs_on_tbl = adjust_left - left;
- internal_org_y_bqs_on_tbl = adjust_upper - upper;
-
- /* Origin of the real sensor data area on the shading table. */
- sensor_org_x_bqs_on_tbl = internal_org_x_bqs_on_tbl + sensor_org_x_bqs_on_internal;
- sensor_org_y_bqs_on_tbl = internal_org_y_bqs_on_tbl + sensor_org_y_bqs_on_internal;
-
- /* The shading information necessary as API is stored in the shading_info. */
- shading_info->info.type_1.num_hor_grids = num_hor_grids;
- shading_info->info.type_1.num_ver_grids = num_ver_grids;
- shading_info->info.type_1.bqs_per_grid_cell = bqs_per_grid_cell;
-
- shading_info->info.type_1.bayer_scale_hor_ratio_in = scr.bayer_scale_hor_ratio_in;
- shading_info->info.type_1.bayer_scale_hor_ratio_out = scr.bayer_scale_hor_ratio_out;
- shading_info->info.type_1.bayer_scale_ver_ratio_in = scr.bayer_scale_ver_ratio_in;
- shading_info->info.type_1.bayer_scale_ver_ratio_out = scr.bayer_scale_ver_ratio_out;
-
- shading_info->info.type_1.isp_input_sensor_data_res_bqs.width = in_width_bqs;
- shading_info->info.type_1.isp_input_sensor_data_res_bqs.height = in_height_bqs;
-
- shading_info->info.type_1.sensor_data_res_bqs.width = sensor_width_bqs;
- shading_info->info.type_1.sensor_data_res_bqs.height = sensor_height_bqs;
-
- shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x = (int32_t)sensor_org_x_bqs_on_tbl;
- shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y = (int32_t)sensor_org_y_bqs_on_tbl;
-
- /* The shading information related to ISP (but, not necessary as API) is stored in the pipe_config. */
- pipe_config->internal_frame_origin_bqs_on_sctbl.x = (int32_t)internal_org_x_bqs_on_tbl;
- pipe_config->internal_frame_origin_bqs_on_sctbl.y = (int32_t)internal_org_y_bqs_on_tbl;
-
- IA_CSS_LOG("shading_info: grids=%dx%d, cell=%d, scale=%d,%d,%d,%d, input=%dx%d, data=%dx%d, origin=(%d,%d)",
- shading_info->info.type_1.num_hor_grids,
- shading_info->info.type_1.num_ver_grids,
- shading_info->info.type_1.bqs_per_grid_cell,
- shading_info->info.type_1.bayer_scale_hor_ratio_in,
- shading_info->info.type_1.bayer_scale_hor_ratio_out,
- shading_info->info.type_1.bayer_scale_ver_ratio_in,
- shading_info->info.type_1.bayer_scale_ver_ratio_out,
- shading_info->info.type_1.isp_input_sensor_data_res_bqs.width,
- shading_info->info.type_1.isp_input_sensor_data_res_bqs.height,
- shading_info->info.type_1.sensor_data_res_bqs.width,
- shading_info->info.type_1.sensor_data_res_bqs.height,
- shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x,
- shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y);
-
- IA_CSS_LOG("pipe_config: origin=(%d,%d)",
- pipe_config->internal_frame_origin_bqs_on_sctbl.x,
- pipe_config->internal_frame_origin_bqs_on_sctbl.y);
+if (adjust_width_bqs > tbl_width_bqs || adjust_height_bqs > tbl_height_bqs)
+{
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+ return IA_CSS_ERR_INTERNAL_ERROR;
+}
- IA_CSS_LEAVE_ERR_PRIVATE(err);
+/* Origin of the internal frame on the shading table. */
+internal_org_x_bqs_on_tbl = adjust_left - left;
+internal_org_y_bqs_on_tbl = adjust_upper - upper;
+
+/* Origin of the real sensor data area on the shading table. */
+sensor_org_x_bqs_on_tbl = internal_org_x_bqs_on_tbl + sensor_org_x_bqs_on_internal;
+sensor_org_y_bqs_on_tbl = internal_org_y_bqs_on_tbl + sensor_org_y_bqs_on_internal;
+
+/* The shading information necessary as API is stored in the shading_info. */
+shading_info->info.type_1.num_hor_grids = num_hor_grids;
+shading_info->info.type_1.num_ver_grids = num_ver_grids;
+shading_info->info.type_1.bqs_per_grid_cell = bqs_per_grid_cell;
+
+shading_info->info.type_1.bayer_scale_hor_ratio_in = scr.bayer_scale_hor_ratio_in;
+shading_info->info.type_1.bayer_scale_hor_ratio_out = scr.bayer_scale_hor_ratio_out;
+shading_info->info.type_1.bayer_scale_ver_ratio_in = scr.bayer_scale_ver_ratio_in;
+shading_info->info.type_1.bayer_scale_ver_ratio_out = scr.bayer_scale_ver_ratio_out;
+
+shading_info->info.type_1.isp_input_sensor_data_res_bqs.width = in_width_bqs;
+shading_info->info.type_1.isp_input_sensor_data_res_bqs.height = in_height_bqs;
+
+shading_info->info.type_1.sensor_data_res_bqs.width = sensor_width_bqs;
+shading_info->info.type_1.sensor_data_res_bqs.height = sensor_height_bqs;
+
+shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x = (int32_t)sensor_org_x_bqs_on_tbl;
+shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y = (int32_t)sensor_org_y_bqs_on_tbl;
+
+/* The shading information related to ISP (but, not necessary as API) is stored in the pipe_config. */
+pipe_config->internal_frame_origin_bqs_on_sctbl.x = (int32_t)internal_org_x_bqs_on_tbl;
+pipe_config->internal_frame_origin_bqs_on_sctbl.y = (int32_t)internal_org_y_bqs_on_tbl;
+
+IA_CSS_LOG("shading_info: grids=%dx%d, cell=%d, scale=%d,%d,%d,%d, input=%dx%d, data=%dx%d, origin=(%d,%d)",
+ shading_info->info.type_1.num_hor_grids,
+ shading_info->info.type_1.num_ver_grids,
+ shading_info->info.type_1.bqs_per_grid_cell,
+ shading_info->info.type_1.bayer_scale_hor_ratio_in,
+ shading_info->info.type_1.bayer_scale_hor_ratio_out,
+ shading_info->info.type_1.bayer_scale_ver_ratio_in,
+ shading_info->info.type_1.bayer_scale_ver_ratio_out,
+ shading_info->info.type_1.isp_input_sensor_data_res_bqs.width,
+ shading_info->info.type_1.isp_input_sensor_data_res_bqs.height,
+ shading_info->info.type_1.sensor_data_res_bqs.width,
+ shading_info->info.type_1.sensor_data_res_bqs.height,
+ shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.x,
+ shading_info->info.type_1.sensor_data_origin_bqs_on_sctbl.y);
+
+IA_CSS_LOG("pipe_config: origin=(%d,%d)",
+ pipe_config->internal_frame_origin_bqs_on_sctbl.x,
+ pipe_config->internal_frame_origin_bqs_on_sctbl.y);
+
+IA_CSS_LEAVE_ERR_PRIVATE(err);
#endif
- return err;
+return err;
}
enum ia_css_err
ia_css_binary_get_shading_info(const struct ia_css_binary *binary, /* [in] */
- enum ia_css_shading_correction_type type, /* [in] */
- unsigned int required_bds_factor, /* [in] */
- const struct ia_css_stream_config *stream_config, /* [in] */
+ enum ia_css_shading_correction_type type, /* [in] */
+ unsigned int required_bds_factor, /* [in] */
+ const struct ia_css_stream_config *stream_config, /* [in] */
#ifndef ISP2401
- struct ia_css_shading_info *info) /* [out] */
+ struct ia_css_shading_info *info) /* [out] */
#else
- struct ia_css_shading_info *shading_info, /* [out] */
- struct ia_css_pipe_config *pipe_config) /* [out] */
+ struct ia_css_shading_info *shading_info, /* [out] */
+ struct ia_css_pipe_config *pipe_config) /* [out] */
#endif
{
enum ia_css_err err;
assert(shading_info);
IA_CSS_ENTER_PRIVATE("binary=%p, type=%d, required_bds_factor=%d, stream_config=%p",
- binary, type, required_bds_factor, stream_config);
+ binary, type, required_bds_factor, stream_config);
#endif
if (type == IA_CSS_SHADING_CORRECTION_TYPE_1)
err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config, info);
#else
err = ia_css_binary_get_shading_info_type_1(binary, required_bds_factor, stream_config,
- shading_info, pipe_config);
+ shading_info, pipe_config);
#endif
/* Other function calls can be added here when other shading correction types will be added in the future. */
}
static void sh_css_binary_common_grid_info(const struct ia_css_binary *binary,
- struct ia_css_grid_info *info)
+ struct ia_css_grid_info *info)
{
assert(binary);
assert(info);
void
ia_css_binary_dvs_stat_grid_info(
- const struct ia_css_binary *binary,
- struct ia_css_grid_info *info,
- struct ia_css_pipe *pipe)
+ const struct ia_css_binary *binary,
+ struct ia_css_grid_info *info,
+ struct ia_css_pipe *pipe)
{
(void)pipe;
sh_css_binary_common_grid_info(binary, info);
enum ia_css_err
ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
struct ia_css_grid_info *info,
- struct ia_css_pipe *pipe)
-{
+ struct ia_css_pipe *pipe) {
struct ia_css_3a_grid_info *s3a_info;
enum ia_css_err err = IA_CSS_SUCCESS;
static void
binary_init_metrics(struct sh_css_binary_metrics *metrics,
- const struct ia_css_binary_info *info)
+ const struct ia_css_binary_info *info)
{
assert(metrics);
assert(info);
/* move to host part of output module */
static bool
binary_supports_output_format(const struct ia_css_binary_xinfo *info,
- enum ia_css_frame_format format)
+ enum ia_css_frame_format format)
{
int i;
/* move to host part of bds module */
static bool
supports_bds_factor(u32 supported_factors,
- uint32_t bds_factor)
+ uint32_t bds_factor)
{
return ((supported_factors & PACK_BDS_FACTOR(bds_factor)) != 0);
}
static enum ia_css_err
binary_init_info(struct ia_css_binary_xinfo *info, unsigned int i,
- bool *binary_found)
-{
+ bool *binary_found) {
const unsigned char *blob = sh_css_blob_info[i].blob;
unsigned int size = sh_css_blob_info[i].header.blob.size;
* be selected if no other primary matches.
*/
enum ia_css_err
-ia_css_binary_init_infos(void)
-{
+ia_css_binary_init_infos(void) {
unsigned int i;
unsigned int num_of_isp_binaries = sh_css_num_binaries - NUM_OF_SPS - NUM_OF_BLS;
return IA_CSS_SUCCESS;
all_binaries = sh_css_malloc(num_of_isp_binaries *
- sizeof(*all_binaries));
+ sizeof(*all_binaries));
if (!all_binaries)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- for (i = 0; i < num_of_isp_binaries; i++) {
+ for (i = 0; i < num_of_isp_binaries; i++)
+ {
enum ia_css_err ret;
struct ia_css_binary_xinfo *binary = &all_binaries[i];
bool binary_found;
}
enum ia_css_err
-ia_css_binary_uninit(void)
-{
+ia_css_binary_uninit(void) {
unsigned int i;
struct ia_css_binary_xinfo *b;
- for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++) {
+ for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++)
+ {
for (b = binary_infos[i]; b; b = b->next) {
if (b->xmem_addr)
hmm_free(b->xmem_addr);
static int
binary_grid_deci_factor_log2(int width, int height)
{
-/* 3A/Shading decimation factor spcification (at August 2008)
- * ------------------------------------------------------------------
- * [Image Width (BQ)] [Decimation Factor (BQ)] [Resulting grid cells]
-#ifndef ISP2401
- * 1280 ?c 32 40 ?c
- * 640 ?c 1279 16 40 ?c 80
- * ?c 639 8 ?c 80
-#else
- * from 1280 32 from 40
- * from 640 to 1279 16 from 40 to 80
- * to 639 8 to 80
-#endif
- * ------------------------------------------------------------------
- */
-/* Maximum and minimum decimation factor by the specification */
+ /* 3A/Shading decimation factor spcification (at August 2008)
+ * ------------------------------------------------------------------
+ * [Image Width (BQ)] [Decimation Factor (BQ)] [Resulting grid cells]
+ #ifndef ISP2401
+ * 1280 ?c 32 40 ?c
+ * 640 ?c 1279 16 40 ?c 80
+ * ?c 639 8 ?c 80
+ #else
+ * from 1280 32 from 40
+ * from 640 to 1279 16 from 40 to 80
+ * to 639 8 to 80
+ #endif
+ * ------------------------------------------------------------------
+ */
+ /* Maximum and minimum decimation factor by the specification */
#define MAX_SPEC_DECI_FACT_LOG2 5
#define MIN_SPEC_DECI_FACT_LOG2 3
-/* the smallest frame width in bayer quads when decimation factor (log2) is 5 or 4, by the specification */
+ /* the smallest frame width in bayer quads when decimation factor (log2) is 5 or 4, by the specification */
#define DECI_FACT_LOG2_5_SMALLEST_FRAME_WIDTH_BQ 1280
#define DECI_FACT_LOG2_4_SMALLEST_FRAME_WIDTH_BQ 640
int spec_factor; /* the factor (log2) which satisfies the specification */
/* Currently supported maximum width and height are 5120(=80*64) and 3840(=60*64). */
- assert(ISP_BQ_GRID_WIDTH(width, MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_WIDTH);
- assert(ISP_BQ_GRID_HEIGHT(height, MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_HEIGHT);
+ assert(ISP_BQ_GRID_WIDTH(width,
+ MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_WIDTH);
+ assert(ISP_BQ_GRID_HEIGHT(height,
+ MAX_SPEC_DECI_FACT_LOG2) <= SH_CSS_MAX_BQ_GRID_HEIGHT);
/* Compute the smallest factor. */
smallest_factor = MAX_SPEC_DECI_FACT_LOG2;
- while (ISP_BQ_GRID_WIDTH(width, smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_WIDTH &&
+ while (ISP_BQ_GRID_WIDTH(width,
+ smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_WIDTH &&
ISP_BQ_GRID_HEIGHT(height, smallest_factor - 1) <= SH_CSS_MAX_BQ_GRID_HEIGHT
&& smallest_factor > MIN_SPEC_DECI_FACT_LOG2)
smallest_factor--;
if (stream_config_left_padding != -1) {
/* Different than before, we do left&right padding. */
rval =
- CEIL_MUL(in_frame_width + nr_of_left_paddings,
- 2 * ISP_VEC_NELEMS);
+ CEIL_MUL(in_frame_width + nr_of_left_paddings,
+ 2 * ISP_VEC_NELEMS);
} else {
/* Different than before, we do left&right padding. */
in_frame_width += dvs_env_width;
rval =
- CEIL_MUL(in_frame_width +
- (left_cropping ? nr_of_left_paddings : 0),
- 2 * ISP_VEC_NELEMS);
+ CEIL_MUL(in_frame_width +
+ (left_cropping ? nr_of_left_paddings : 0),
+ 2 * ISP_VEC_NELEMS);
}
} else {
rval = isp_internal_width;
enum ia_css_err
ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
- bool online,
- bool two_ppc,
- enum atomisp_input_format stream_format,
- const struct ia_css_frame_info *in_info, /* can be NULL */
- const struct ia_css_frame_info *bds_out_info, /* can be NULL */
- const struct ia_css_frame_info *out_info[], /* can be NULL */
- const struct ia_css_frame_info *vf_info, /* can be NULL */
- struct ia_css_binary *binary,
- struct ia_css_resolution *dvs_env,
- int stream_config_left_padding,
- bool accelerator)
-{
+ bool online,
+ bool two_ppc,
+ enum atomisp_input_format stream_format,
+ const struct ia_css_frame_info *in_info, /* can be NULL */
+ const struct ia_css_frame_info *bds_out_info, /* can be NULL */
+ const struct ia_css_frame_info *out_info[], /* can be NULL */
+ const struct ia_css_frame_info *vf_info, /* can be NULL */
+ struct ia_css_binary *binary,
+ struct ia_css_resolution *dvs_env,
+ int stream_config_left_padding,
+ bool accelerator) {
const struct ia_css_binary_info *info = &xinfo->sp;
unsigned int dvs_env_width = 0,
- dvs_env_height = 0,
- vf_log_ds = 0,
- s3a_log_deci = 0,
- bits_per_pixel = 0,
- /* Resolution at SC/3A/DIS kernel. */
- sc_3a_dis_width = 0,
- /* Resolution at SC/3A/DIS kernel. */
- sc_3a_dis_padded_width = 0,
- /* Resolution at SC/3A/DIS kernel. */
- sc_3a_dis_height = 0,
- isp_internal_width = 0,
- isp_internal_height = 0,
- s3a_isp_width = 0;
+ dvs_env_height = 0,
+ vf_log_ds = 0,
+ s3a_log_deci = 0,
+ bits_per_pixel = 0,
+ /* Resolution at SC/3A/DIS kernel. */
+ sc_3a_dis_width = 0,
+ /* Resolution at SC/3A/DIS kernel. */
+ sc_3a_dis_padded_width = 0,
+ /* Resolution at SC/3A/DIS kernel. */
+ sc_3a_dis_height = 0,
+ isp_internal_width = 0,
+ isp_internal_height = 0,
+ s3a_isp_width = 0;
bool need_scaling = false;
struct ia_css_resolution binary_dvs_env, internal_res;
assert(binary);
binary->info = xinfo;
- if (!accelerator) {
+ if (!accelerator)
+ {
/* binary->css_params has been filled by accelerator itself. */
err = ia_css_isp_param_allocate_isp_parameters(
- &binary->mem_params, &binary->css_params,
- &info->mem_initializers);
+ &binary->mem_params, &binary->css_params,
+ &info->mem_initializers);
if (err != IA_CSS_SUCCESS) {
return err;
}
}
- for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+ for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+ {
if (out_info[i] && (out_info[i]->res.width != 0)) {
bin_out_info = out_info[i];
break;
}
}
- if (in_info && bin_out_info) {
+ if (in_info && bin_out_info)
+ {
need_scaling = (in_info->res.width != bin_out_info->res.width) ||
- (in_info->res.height != bin_out_info->res.height);
+ (in_info->res.height != bin_out_info->res.height);
}
/* binary_dvs_env has to be equal or larger than SH_CSS_MIN_DVS_ENVELOPE */
binary->internal_frame_info.res.height = isp_internal_height;
binary->internal_frame_info.raw_bit_depth = bits_per_pixel;
- if (in_info) {
+ if (in_info)
+ {
binary->effective_in_frame_res.width = in_info->res.width;
binary->effective_in_frame_res.height = in_info->res.height;
bits_per_pixel = in_info->raw_bit_depth;
/* input info */
- binary->in_frame_info.res.width = in_info->res.width + info->pipeline.left_cropping;
- binary->in_frame_info.res.height = in_info->res.height + info->pipeline.top_cropping;
+ binary->in_frame_info.res.width = in_info->res.width +
+ info->pipeline.left_cropping;
+ binary->in_frame_info.res.height = in_info->res.height +
+ info->pipeline.top_cropping;
binary->in_frame_info.res.width += dvs_env_width;
binary->in_frame_info.res.height += dvs_env_height;
binary->in_frame_info.padded_width =
- binary_in_frame_padded_width(in_info->res.width,
- isp_internal_width,
- dvs_env_width,
- stream_config_left_padding,
- info->pipeline.left_cropping,
- need_scaling);
+ binary_in_frame_padded_width(in_info->res.width,
+ isp_internal_width,
+ dvs_env_width,
+ stream_config_left_padding,
+ info->pipeline.left_cropping,
+ need_scaling);
binary->in_frame_info.format = in_info->format;
binary->in_frame_info.raw_bayer_order = in_info->raw_bayer_order;
binary->in_frame_info.crop_info = in_info->crop_info;
}
- if (online) {
+ if (online)
+ {
bits_per_pixel = ia_css_util_input_format_bpp(
- stream_format, two_ppc);
+ stream_format, two_ppc);
}
binary->in_frame_info.raw_bit_depth = bits_per_pixel;
- for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+ for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+ {
if (out_info[i]) {
binary->out_frame_info[i].res.width = out_info[i]->res.width;
binary->out_frame_info[i].res.height = out_info[i]->res.height;
}
}
- if (vf_info && (vf_info->res.width != 0)) {
- err = ia_css_vf_configure(binary, bin_out_info, (struct ia_css_frame_info *)vf_info, &vf_log_ds);
+ if (vf_info && (vf_info->res.width != 0))
+ {
+ err = ia_css_vf_configure(binary, bin_out_info,
+ (struct ia_css_frame_info *)vf_info, &vf_log_ds);
if (err != IA_CSS_SUCCESS) {
if (!accelerator) {
ia_css_isp_param_destroy_isp_parameters(
- &binary->mem_params,
- &binary->css_params);
+ &binary->mem_params,
+ &binary->css_params);
}
return err;
}
binary->input_format = stream_format;
/* viewfinder output info */
- if ((vf_info) && (vf_info->res.width != 0)) {
+ if ((vf_info) && (vf_info->res.width != 0))
+ {
unsigned int vf_out_vecs, vf_out_width, vf_out_height;
binary->vf_frame_info.format = vf_info->format;
if (!bin_out_info)
return IA_CSS_ERR_INTERNAL_ERROR;
vf_out_vecs = __ISP_VF_OUTPUT_WIDTH_VECS(bin_out_info->padded_width,
- vf_log_ds);
+ vf_log_ds);
vf_out_width = _ISP_VF_OUTPUT_WIDTH(vf_out_vecs);
vf_out_height = _ISP_VF_OUTPUT_HEIGHT(bin_out_info->res.height,
- vf_log_ds);
+ vf_log_ds);
/* For preview mode, output pin is used instead of vf. */
if (info->pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW) {
binary->out_frame_info[0].res.width =
- (bin_out_info->res.width >> vf_log_ds);
+ (bin_out_info->res.width >> vf_log_ds);
binary->out_frame_info[0].padded_width = vf_out_width;
binary->out_frame_info[0].res.height = vf_out_height;
* the width that we actually want to keep, not on
* the aligned width. */
binary->vf_frame_info.res.width =
- (bin_out_info->res.width >> vf_log_ds);
+ (bin_out_info->res.width >> vf_log_ds);
binary->vf_frame_info.padded_width = vf_out_width;
binary->vf_frame_info.res.height = vf_out_height;
}
- } else {
+ } else
+ {
binary->vf_frame_info.res.width = 0;
binary->vf_frame_info.padded_width = 0;
binary->vf_frame_info.res.height = 0;
}
- if (info->enable.ca_gdc) {
+ if (info->enable.ca_gdc)
+ {
binary->morph_tbl_width =
- _ISP_MORPH_TABLE_WIDTH(isp_internal_width);
+ _ISP_MORPH_TABLE_WIDTH(isp_internal_width);
binary->morph_tbl_aligned_width =
- _ISP_MORPH_TABLE_ALIGNED_WIDTH(isp_internal_width);
+ _ISP_MORPH_TABLE_ALIGNED_WIDTH(isp_internal_width);
binary->morph_tbl_height =
- _ISP_MORPH_TABLE_HEIGHT(isp_internal_height);
- } else {
+ _ISP_MORPH_TABLE_HEIGHT(isp_internal_height);
+ } else
+ {
binary->morph_tbl_width = 0;
binary->morph_tbl_aligned_width = 0;
binary->morph_tbl_height = 0;
sc_3a_dis_padded_width = binary->in_frame_info.padded_width;
sc_3a_dis_height = binary->in_frame_info.res.height;
if (bds_out_info && in_info &&
- bds_out_info->res.width != in_info->res.width) {
+ bds_out_info->res.width != in_info->res.width)
+ {
/* TODO: Next, "internal_frame_info" should be derived from
* bds_out. So this part will change once it is in place! */
sc_3a_dis_width = bds_out_info->res.width + info->pipeline.left_cropping;
}
s3a_isp_width = _ISP_S3A_ELEMS_ISP_WIDTH(sc_3a_dis_padded_width,
- info->pipeline.left_cropping);
- if (info->s3a.fixed_s3a_deci_log) {
+ info->pipeline.left_cropping);
+ if (info->s3a.fixed_s3a_deci_log)
+ {
s3a_log_deci = info->s3a.fixed_s3a_deci_log;
- } else {
+ } else
+ {
s3a_log_deci = binary_grid_deci_factor_log2(s3a_isp_width,
- sc_3a_dis_height);
+ sc_3a_dis_height);
}
binary->deci_factor_log2 = s3a_log_deci;
- if (info->enable.s3a) {
+ if (info->enable.s3a)
+ {
binary->s3atbl_width =
- _ISP_S3ATBL_WIDTH(sc_3a_dis_width,
- s3a_log_deci);
+ _ISP_S3ATBL_WIDTH(sc_3a_dis_width,
+ s3a_log_deci);
binary->s3atbl_height =
- _ISP_S3ATBL_HEIGHT(sc_3a_dis_height,
- s3a_log_deci);
+ _ISP_S3ATBL_HEIGHT(sc_3a_dis_height,
+ s3a_log_deci);
binary->s3atbl_isp_width =
- _ISP_S3ATBL_ISP_WIDTH(s3a_isp_width,
- s3a_log_deci);
+ _ISP_S3ATBL_ISP_WIDTH(s3a_isp_width,
+ s3a_log_deci);
binary->s3atbl_isp_height =
- _ISP_S3ATBL_ISP_HEIGHT(sc_3a_dis_height,
- s3a_log_deci);
- } else {
+ _ISP_S3ATBL_ISP_HEIGHT(sc_3a_dis_height,
+ s3a_log_deci);
+ } else
+ {
binary->s3atbl_width = 0;
binary->s3atbl_height = 0;
binary->s3atbl_isp_width = 0;
binary->s3atbl_isp_height = 0;
}
- if (info->enable.sc) {
+ if (info->enable.sc)
+ {
binary->sctbl_width_per_color =
#ifndef ISP2401
- _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width,
- s3a_log_deci);
+ _ISP_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width,
+ s3a_log_deci);
#else
- _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
+ _ISP_SCTBL_WIDTH_PER_COLOR(isp_internal_width, s3a_log_deci);
#endif
binary->sctbl_aligned_width_per_color =
- SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
+ SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
binary->sctbl_height =
#ifndef ISP2401
- _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+ _ISP_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
#else
- _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
+ _ISP_SCTBL_HEIGHT(isp_internal_height, s3a_log_deci);
binary->sctbl_legacy_width_per_color =
- _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
+ _ISP_SCTBL_LEGACY_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
binary->sctbl_legacy_height =
- _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
+ _ISP_SCTBL_LEGACY_HEIGHT(sc_3a_dis_height, s3a_log_deci);
#endif
- } else {
+ } else
+ {
binary->sctbl_width_per_color = 0;
binary->sctbl_aligned_width_per_color = 0;
binary->sctbl_height = 0;
#endif
}
ia_css_sdis_init_info(&binary->dis,
- sc_3a_dis_width,
- sc_3a_dis_padded_width,
- sc_3a_dis_height,
- info->pipeline.isp_pipe_version,
- info->enable.dis);
+ sc_3a_dis_width,
+ sc_3a_dis_padded_width,
+ sc_3a_dis_height,
+ info->pipeline.isp_pipe_version,
+ info->enable.dis);
if (info->pipeline.left_cropping)
binary->left_padding = 2 * ISP_VEC_NELEMS - info->pipeline.left_cropping;
else
enum ia_css_err
ia_css_binary_find(struct ia_css_binary_descr *descr,
- struct ia_css_binary *binary)
-{
+ struct ia_css_binary *binary) {
int mode;
bool online;
bool two_ppc;
enum atomisp_input_format stream_format;
const struct ia_css_frame_info *req_in_info,
- *req_bds_out_info,
- *req_out_info[IA_CSS_BINARY_MAX_OUTPUT_PORTS],
- *req_bin_out_info = NULL,
- *req_vf_info;
+ *req_bds_out_info,
+ *req_out_info[IA_CSS_BINARY_MAX_OUTPUT_PORTS],
+ *req_bin_out_info = NULL,
+ *req_vf_info;
struct ia_css_binary_xinfo *xcandidate;
#ifndef ISP2401
assert(binary);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
- descr, descr->mode,
- binary);
+ "ia_css_binary_find() enter: descr=%p, (mode=%d), binary=%p\n",
+ descr, descr->mode,
+ binary);
mode = descr->mode;
online = descr->online;
stream_format = descr->stream_format;
req_in_info = descr->in_info;
req_bds_out_info = descr->bds_out_info;
- for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+ for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+ {
req_out_info[i] = descr->out_info[i];
if (req_out_info[i] && (req_out_info[i]->res.width != 0))
req_bin_out_info = req_out_info[i];
internal_res.width = 0;
internal_res.height = 0;
- if (mode == IA_CSS_BINARY_MODE_VIDEO) {
+ if (mode == IA_CSS_BINARY_MODE_VIDEO)
+ {
dvs_env = descr->dvs_env;
need_dz = descr->enable_dz;
/* Video is the only mode that has a nodz variant. */
/* print a map of the binary file */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "BINARY INFO:\n");
- for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++) {
+ for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++)
+ {
xcandidate = binary_infos[i];
if (xcandidate) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%d:\n", i);
while (xcandidate) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " Name:%s Type:%d Cont:%d\n",
- xcandidate->blob->name, xcandidate->type,
- xcandidate->sp.enable.continuous);
+ xcandidate->blob->name, xcandidate->type,
+ xcandidate->sp.enable.continuous);
xcandidate = xcandidate->next;
}
}
/* printf("sh_css_binary_find: pipe version %d\n", isp_pipe_version); */
for (xcandidate = binary_infos[mode]; xcandidate;
- xcandidate = xcandidate->next) {
+ xcandidate = xcandidate->next)
+ {
struct ia_css_binary_info *candidate = &xcandidate->sp;
/* printf("sh_css_binary_find: evaluating candidate:
* %d\n",candidate->id); */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() candidate = %p, mode = %d ID = %d\n",
- candidate, candidate->pipeline.mode, candidate->id);
+ "ia_css_binary_find() candidate = %p, mode = %d ID = %d\n",
+ candidate, candidate->pipeline.mode, candidate->id);
/*
* MW: Only a limited set of jointly configured binaries can
if (!candidate->enable.continuous &&
continuous && (mode != IA_CSS_BINARY_MODE_COPY)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d && (%d != %d)\n",
- __LINE__, candidate->enable.continuous,
- continuous, mode,
- IA_CSS_BINARY_MODE_COPY);
+ "ia_css_binary_find() [%d] continue: !%d && %d && (%d != %d)\n",
+ __LINE__, candidate->enable.continuous,
+ continuous, mode,
+ IA_CSS_BINARY_MODE_COPY);
continue;
}
if (striped && candidate->iterator.num_stripes == 1) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: binary is not striped\n",
- __LINE__);
+ "ia_css_binary_find() [%d] continue: binary is not striped\n",
+ __LINE__);
continue;
}
(mode != IA_CSS_BINARY_MODE_CAPTURE_PP) &&
(mode != IA_CSS_BINARY_MODE_VF_PP)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d != %d)\n",
- __LINE__,
- candidate->pipeline.isp_pipe_version, isp_pipe_version);
+ "ia_css_binary_find() [%d] continue: (%d != %d)\n",
+ __LINE__,
+ candidate->pipeline.isp_pipe_version, isp_pipe_version);
continue;
}
if (!candidate->enable.reduced_pipe && enable_reduced_pipe) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__,
- candidate->enable.reduced_pipe,
- enable_reduced_pipe);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__,
+ candidate->enable.reduced_pipe,
+ enable_reduced_pipe);
continue;
}
if (!candidate->enable.dvs_6axis && enable_dvs_6axis) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__,
- candidate->enable.dvs_6axis,
- enable_dvs_6axis);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__,
+ candidate->enable.dvs_6axis,
+ enable_dvs_6axis);
continue;
}
if (candidate->enable.high_speed && !enable_high_speed) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: %d && !%d\n",
- __LINE__,
- candidate->enable.high_speed,
- enable_high_speed);
+ "ia_css_binary_find() [%d] continue: %d && !%d\n",
+ __LINE__,
+ candidate->enable.high_speed,
+ enable_high_speed);
continue;
}
if (!candidate->enable.xnr && need_xnr) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: %d && !%d\n",
- __LINE__,
- candidate->enable.xnr,
- need_xnr);
+ "ia_css_binary_find() [%d] continue: %d && !%d\n",
+ __LINE__,
+ candidate->enable.xnr,
+ need_xnr);
continue;
}
if (!(candidate->enable.ds & 2) && enable_yuv_ds) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__,
- ((candidate->enable.ds & 2) != 0),
- enable_yuv_ds);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__,
+ ((candidate->enable.ds & 2) != 0),
+ enable_yuv_ds);
continue;
}
if ((candidate->enable.ds & 2) && !enable_yuv_ds) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: %d && !%d\n",
- __LINE__,
- ((candidate->enable.ds & 2) != 0),
- enable_yuv_ds);
+ "ia_css_binary_find() [%d] continue: %d && !%d\n",
+ __LINE__,
+ ((candidate->enable.ds & 2) != 0),
+ enable_yuv_ds);
continue;
}
if (mode == IA_CSS_BINARY_MODE_VIDEO &&
- candidate->enable.ds && need_ds)
+ candidate->enable.ds && need_ds)
need_dz = false;
/* when we require vf output, we need to have vf_veceven */
if ((req_vf_info) && !(candidate->enable.vf_veceven ||
- /* or variable vf vec even */
- candidate->vf_dec.is_variable ||
- /* or more than one output pin. */
- xcandidate->num_output_pins > 1)) {
+ /* or variable vf vec even */
+ candidate->vf_dec.is_variable ||
+ /* or more than one output pin. */
+ xcandidate->num_output_pins > 1)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
- __LINE__, req_vf_info,
- candidate->enable.vf_veceven,
- candidate->vf_dec.is_variable,
- xcandidate->num_output_pins, 1);
+ "ia_css_binary_find() [%d] continue: (%p != NULL) && !(%d || %d || (%d >%d))\n",
+ __LINE__, req_vf_info,
+ candidate->enable.vf_veceven,
+ candidate->vf_dec.is_variable,
+ xcandidate->num_output_pins, 1);
continue;
}
if (!candidate->enable.dvs_envelope && need_dvs) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__,
- candidate->enable.dvs_envelope, (int)need_dvs);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__,
+ candidate->enable.dvs_envelope, (int)need_dvs);
continue;
}
/* internal_res check considers input, output, and dvs envelope sizes */
req_bin_out_info, &dvs_env, candidate, &internal_res);
if (internal_res.width > candidate->internal.max_width) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d > %d)\n",
- __LINE__, internal_res.width,
- candidate->internal.max_width);
+ "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+ __LINE__, internal_res.width,
+ candidate->internal.max_width);
continue;
}
if (internal_res.height > candidate->internal.max_height) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d > %d)\n",
- __LINE__, internal_res.height,
- candidate->internal.max_height);
+ "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+ __LINE__, internal_res.height,
+ candidate->internal.max_height);
continue;
}
if (!candidate->enable.ds && need_ds && !(xcandidate->num_output_pins > 1)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__, candidate->enable.ds, (int)need_ds);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__, candidate->enable.ds, (int)need_ds);
continue;
}
if (!candidate->enable.uds && !candidate->enable.dvs_6axis && need_dz) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && !%d && %d\n",
- __LINE__, candidate->enable.uds,
- candidate->enable.dvs_6axis, (int)need_dz);
+ "ia_css_binary_find() [%d] continue: !%d && !%d && %d\n",
+ __LINE__, candidate->enable.uds,
+ candidate->enable.dvs_6axis, (int)need_dz);
continue;
}
if (online && candidate->input.source == IA_CSS_BINARY_INPUT_MEMORY) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: %d && (%d == %d)\n",
- __LINE__, online, candidate->input.source,
- IA_CSS_BINARY_INPUT_MEMORY);
+ "ia_css_binary_find() [%d] continue: %d && (%d == %d)\n",
+ __LINE__, online, candidate->input.source,
+ IA_CSS_BINARY_INPUT_MEMORY);
continue;
}
if (!online && candidate->input.source == IA_CSS_BINARY_INPUT_SENSOR) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && (%d == %d)\n",
- __LINE__, online, candidate->input.source,
- IA_CSS_BINARY_INPUT_SENSOR);
+ "ia_css_binary_find() [%d] continue: !%d && (%d == %d)\n",
+ __LINE__, online, candidate->input.source,
+ IA_CSS_BINARY_INPUT_SENSOR);
continue;
}
if (req_bin_out_info->res.width < candidate->output.min_width ||
req_bin_out_info->res.width > candidate->output.max_width) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d > %d) || (%d < %d)\n",
- __LINE__,
- req_bin_out_info->padded_width,
- candidate->output.min_width,
- req_bin_out_info->padded_width,
- candidate->output.max_width);
+ "ia_css_binary_find() [%d] continue: (%d > %d) || (%d < %d)\n",
+ __LINE__,
+ req_bin_out_info->padded_width,
+ candidate->output.min_width,
+ req_bin_out_info->padded_width,
+ candidate->output.max_width);
continue;
}
- if (xcandidate->num_output_pins > 1 && /* in case we have a second output pin, */
- req_vf_info) { /* and we need vf output. */
+ if (xcandidate->num_output_pins > 1 &&
+ /* in case we have a second output pin, */
+ req_vf_info) { /* and we need vf output. */
if (req_vf_info->res.width > candidate->output.max_width) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d < %d)\n",
- __LINE__,
- req_vf_info->res.width,
- candidate->output.max_width);
+ "ia_css_binary_find() [%d] continue: (%d < %d)\n",
+ __LINE__,
+ req_vf_info->res.width,
+ candidate->output.max_width);
continue;
}
}
if (req_in_info->padded_width > candidate->input.max_width) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d > %d)\n",
- __LINE__, req_in_info->padded_width,
- candidate->input.max_width);
+ "ia_css_binary_find() [%d] continue: (%d > %d)\n",
+ __LINE__, req_in_info->padded_width,
+ candidate->input.max_width);
continue;
}
if (!binary_supports_output_format(xcandidate, req_bin_out_info->format)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d\n",
- __LINE__,
- binary_supports_output_format(xcandidate, req_bin_out_info->format));
+ "ia_css_binary_find() [%d] continue: !%d\n",
+ __LINE__,
+ binary_supports_output_format(xcandidate, req_bin_out_info->format));
continue;
}
#ifdef ISP2401
continue;
}
#endif
- if (xcandidate->num_output_pins > 1 && /* in case we have a second output pin, */
+ if (xcandidate->num_output_pins > 1 &&
+ /* in case we have a second output pin, */
req_vf_info && /* and we need vf output. */
- /* check if the required vf format
- is supported. */
+ /* check if the required vf format
+ is supported. */
!binary_supports_output_format(xcandidate, req_vf_info->format)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n",
- __LINE__, xcandidate->num_output_pins, 1,
- req_vf_info,
- binary_supports_output_format(xcandidate, req_vf_info->format));
+ "ia_css_binary_find() [%d] continue: (%d > %d) && (%p != NULL) && !%d\n",
+ __LINE__, xcandidate->num_output_pins, 1,
+ req_vf_info,
+ binary_supports_output_format(xcandidate, req_vf_info->format));
continue;
}
req_vf_info && candidate->enable.vf_veceven &&
!binary_supports_vf_format(xcandidate, req_vf_info->format)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
- __LINE__, xcandidate->num_output_pins, 1,
- req_vf_info, candidate->enable.vf_veceven,
- binary_supports_vf_format(xcandidate, req_vf_info->format));
+ "ia_css_binary_find() [%d] continue: (%d == %d) && (%p != NULL) && %d && !%d\n",
+ __LINE__, xcandidate->num_output_pins, 1,
+ req_vf_info, candidate->enable.vf_veceven,
+ binary_supports_vf_format(xcandidate, req_vf_info->format));
continue;
}
req_vf_info && candidate->enable.vf_veceven) { /* and we need vf output. */
if (req_vf_info->res.width > candidate->output.max_width) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: (%d < %d)\n",
- __LINE__,
- req_vf_info->res.width,
- candidate->output.max_width);
+ "ia_css_binary_find() [%d] continue: (%d < %d)\n",
+ __LINE__,
+ req_vf_info->res.width,
+ candidate->output.max_width);
continue;
}
}
if (!supports_bds_factor(candidate->bds.supported_bds_factors,
- descr->required_bds_factor)) {
+ descr->required_bds_factor)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
- __LINE__, candidate->bds.supported_bds_factors,
- descr->required_bds_factor);
+ "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+ __LINE__, candidate->bds.supported_bds_factors,
+ descr->required_bds_factor);
continue;
}
if (!candidate->enable.dpc && need_dpc) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
- __LINE__, candidate->enable.dpc,
- descr->enable_dpc);
+ "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+ __LINE__, candidate->enable.dpc,
+ descr->enable_dpc);
continue;
}
if (candidate->uds.use_bci && enable_capture_pp_bli) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
- __LINE__, candidate->uds.use_bci,
- descr->enable_capture_pp_bli);
+ "ia_css_binary_find() [%d] continue: 0x%x & 0x%x)\n",
+ __LINE__, candidate->uds.use_bci,
+ descr->enable_capture_pp_bli);
continue;
}
#ifdef ISP2401
if (candidate->enable.luma_only != enable_luma_only) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: %d != %d\n",
- __LINE__, candidate->enable.luma_only,
- descr->enable_luma_only);
+ "ia_css_binary_find() [%d] continue: %d != %d\n",
+ __LINE__, candidate->enable.luma_only,
+ descr->enable_luma_only);
continue;
}
if (!candidate->enable.tnr && need_tnr) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() [%d] continue: !%d && %d\n",
- __LINE__, candidate->enable.tnr,
- descr->enable_tnr);
+ "ia_css_binary_find() [%d] continue: !%d && %d\n",
+ __LINE__, candidate->enable.tnr,
+ descr->enable_tnr);
continue;
}
#endif
/* reconfigure any variable properties of the binary */
err = ia_css_binary_fill_info(xcandidate, online, two_ppc,
- stream_format, req_in_info,
- req_bds_out_info,
- req_out_info, req_vf_info,
- binary, &dvs_env,
- descr->stream_config_left_padding,
- false);
+ stream_format, req_in_info,
+ req_bds_out_info,
+ req_out_info, req_vf_info,
+ binary, &dvs_env,
+ descr->stream_config_left_padding,
+ false);
if (err != IA_CSS_SUCCESS)
break;
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() selected = %p, mode = %d ID = %d\n",
- xcandidate, xcandidate ? xcandidate->sp.pipeline.mode : 0, xcandidate ? xcandidate->sp.id : 0);
+ "ia_css_binary_find() selected = %p, mode = %d ID = %d\n",
+ xcandidate, xcandidate ? xcandidate->sp.pipeline.mode : 0, xcandidate ? xcandidate->sp.id : 0);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_binary_find() leave: return_err=%d\n", err);
+ "ia_css_binary_find() leave: return_err=%d\n", err);
return err;
}
void
ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
- uint32_t *num_isp_binaries)
+ uint32_t *num_isp_binaries)
{
assert(binaries);
* false, if the query fails.
*/
bool ia_css_query_internal_queue_id(
- enum ia_css_buffer_type buf_type,
- unsigned int thread_id,
- enum sh_css_queue_id *val
- );
+ enum ia_css_buffer_type buf_type,
+ unsigned int thread_id,
+ enum sh_css_queue_id *val
+);
/**
* @brief Map buffer type to a internal queue id.
* @return none
*/
void ia_css_queue_map(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type,
- bool map
- );
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type,
+ bool map
+);
/**
* @brief Initialize buffer type to a queue id mapping
*
*/
enum ia_css_err ia_css_bufq_enqueue_buffer(
- int thread_index,
- int queue_id,
- uint32_t item);
+ int thread_index,
+ int queue_id,
+ uint32_t item);
/**
* @brief Dequeues an item from SP to host buffer queue.
*
*/
enum ia_css_err ia_css_bufq_dequeue_buffer(
- int queue_id,
- uint32_t *item);
+ int queue_id,
+ uint32_t *item);
/**
* @brief Enqueue an event item into host to SP communication event queue.
*
*/
enum ia_css_err ia_css_bufq_enqueue_psys_event(
- u8 evt_id,
- u8 evt_payload_0,
- u8 evt_payload_1,
- uint8_t evt_payload_2
- );
+ u8 evt_id,
+ u8 evt_payload_0,
+ u8 evt_payload_1,
+ uint8_t evt_payload_2
+);
/**
* @brief Dequeue an item from SP to host communication event queue.
*
*/
enum ia_css_err ia_css_bufq_dequeue_psys_event(
- u8 item[BUFQ_EVENT_SIZE]
+ u8 item[BUFQ_EVENT_SIZE]
- );
+);
/**
* @brief Enqueue an event item into host to SP EOF event queue.
*
*/
enum ia_css_err ia_css_bufq_enqueue_isys_event(
- uint8_t evt_id);
+ uint8_t evt_id);
/**
* @brief Dequeue an item from SP to host communication EOF event queue.
*
*/
enum ia_css_err ia_css_bufq_dequeue_isys_event(
- u8 item[BUFQ_EVENT_SIZE]);
+ u8 item[BUFQ_EVENT_SIZE]);
/**
* @brief Enqueue a tagger command item into tagger command queue..
*
*/
enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
- uint32_t item);
+ uint32_t item);
/**
* @brief Uninitializes bufq module.
struct sh_css_queues {
/* Host2SP buffer queue */
ia_css_queue_t host2sp_buffer_queue_handles
- [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
/* SP2Host buffer queue */
ia_css_queue_t sp2host_buffer_queue_handles
- [SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_NUM_QUEUES];
/* Host2SP event queue */
ia_css_queue_t host2sp_psys_event_queue_handle;
struct sh_css_queues {
/* Host2SP buffer queue */
ia_css_queue_t host2sp_buffer_queue_handles
- [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
/* SP2Host buffer queue */
ia_css_queue_t sp2host_buffer_queue_handles
- [SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_NUM_QUEUES];
/* Host2SP event queue */
ia_css_queue_t host2sp_psys_event_queue_handle;
********************************************************/
static struct sh_css_queues css_queues;
-static int buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
+static int
+buffer_type_to_queue_id_map[SH_CSS_MAX_SP_THREADS][IA_CSS_NUM_DYNAMIC_BUFFER_TYPE];
static bool queue_availability[SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
/*******************************************************
*** Static functions
********************************************************/
static void map_buffer_type_to_queue_id(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type
- );
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type
+);
static void unmap_buffer_type_to_queue_id(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type
- );
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type
+);
static ia_css_queue_t *bufq_get_qhandle(
- enum sh_css_queue_type type,
- enum sh_css_queue_id id,
- int thread
- );
+ enum sh_css_queue_type type,
+ enum sh_css_queue_id id,
+ int thread
+);
/*******************************************************
*** Public functions
}
void ia_css_queue_map(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type,
- bool map)
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type,
+ bool map)
{
assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
assert(thread_id < SH_CSS_MAX_SP_THREADS);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_queue_map() enter: buf_type=%d, thread_id=%d\n", buf_type, thread_id);
+ "ia_css_queue_map() enter: buf_type=%d, thread_id=%d\n", buf_type, thread_id);
if (map)
map_buffer_type_to_queue_id(thread_id, buf_type);
* @brief Query the internal queue ID.
*/
bool ia_css_query_internal_queue_id(
- enum ia_css_buffer_type buf_type,
- unsigned int thread_id,
- enum sh_css_queue_id *val)
+ enum ia_css_buffer_type buf_type,
+ unsigned int thread_id,
+ enum sh_css_queue_id *val)
{
IA_CSS_ENTER("buf_type=%d, thread_id=%d, val = %p", buf_type, thread_id, val);
- if ((!val) || (thread_id >= SH_CSS_MAX_SP_THREADS) || (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE)) {
+ if ((!val) || (thread_id >= SH_CSS_MAX_SP_THREADS) ||
+ (buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE)) {
IA_CSS_LEAVE("return_val = false");
return false;
}
*** Static functions
********************************************************/
static void map_buffer_type_to_queue_id(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type)
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type)
{
unsigned int i;
assert(thread_id < SH_CSS_MAX_SP_THREADS);
assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
- assert(buffer_type_to_queue_id_map[thread_id][buf_type] == SH_CSS_INVALID_QUEUE_ID);
+ assert(buffer_type_to_queue_id_map[thread_id][buf_type] ==
+ SH_CSS_INVALID_QUEUE_ID);
/* queue 0 is reserved for parameters because it doesn't depend on events */
if (buf_type == IA_CSS_BUFFER_TYPE_PARAMETER_SET) {
assert(queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID]);
queue_availability[thread_id][IA_CSS_PARAMETER_SET_QUEUE_ID] = false;
- buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PARAMETER_SET_QUEUE_ID;
+ buffer_type_to_queue_id_map[thread_id][buf_type] =
+ IA_CSS_PARAMETER_SET_QUEUE_ID;
return;
}
if (buf_type == IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET) {
assert(queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID]);
queue_availability[thread_id][IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID] = false;
- buffer_type_to_queue_id_map[thread_id][buf_type] = IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID;
+ buffer_type_to_queue_id_map[thread_id][buf_type] =
+ IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID;
return;
}
}
static void unmap_buffer_type_to_queue_id(
- unsigned int thread_id,
- enum ia_css_buffer_type buf_type)
+ unsigned int thread_id,
+ enum ia_css_buffer_type buf_type)
{
int queue_id;
assert(thread_id < SH_CSS_MAX_SP_THREADS);
assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
- assert(buffer_type_to_queue_id_map[thread_id][buf_type] != SH_CSS_INVALID_QUEUE_ID);
+ assert(buffer_type_to_queue_id_map[thread_id][buf_type] !=
+ SH_CSS_INVALID_QUEUE_ID);
queue_id = buffer_type_to_queue_id_map[thread_id][buf_type];
buffer_type_to_queue_id_map[thread_id][buf_type] = SH_CSS_INVALID_QUEUE_ID;
}
static ia_css_queue_t *bufq_get_qhandle(
- enum sh_css_queue_type type,
- enum sh_css_queue_id id,
- int thread)
+ enum sh_css_queue_type type,
+ enum sh_css_queue_id id,
+ int thread)
{
ia_css_queue_t *q = NULL;
switch (type) {
case sh_css_host2sp_buffer_queue:
if ((thread >= SH_CSS_MAX_SP_THREADS) || (thread < 0) ||
- (id == SH_CSS_INVALID_QUEUE_ID))
+ (id == SH_CSS_INVALID_QUEUE_ID))
break;
q = &css_queues.host2sp_buffer_queue_handles[thread][id];
break;
/* Setup all the local queue descriptors for Host2SP Buffer Queues */
for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++)
for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
- init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_desc[i][j]),
+ init_bufq((uint32_t)offsetof(struct host_sp_queues,
+ host2sp_buffer_queues_desc[i][j]),
(uint32_t)offsetof(struct host_sp_queues, host2sp_buffer_queues_elems[i][j]),
&css_queues.host2sp_buffer_queue_handles[i][j]);
}
}
/* Host2SP event queue*/
- init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_desc),
+ init_bufq((uint32_t)offsetof(struct host_sp_queues,
+ host2sp_psys_event_queue_desc),
(uint32_t)offsetof(struct host_sp_queues, host2sp_psys_event_queue_elems),
&css_queues.host2sp_psys_event_queue_handle);
/* SP2Host event queue */
- init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_desc),
+ init_bufq((uint32_t)offsetof(struct host_sp_queues,
+ sp2host_psys_event_queue_desc),
(uint32_t)offsetof(struct host_sp_queues, sp2host_psys_event_queue_elems),
&css_queues.sp2host_psys_event_queue_handle);
#if !defined(HAS_NO_INPUT_SYSTEM)
/* Host2SP ISYS event queue */
- init_bufq((uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_desc),
+ init_bufq((uint32_t)offsetof(struct host_sp_queues,
+ host2sp_isys_event_queue_desc),
(uint32_t)offsetof(struct host_sp_queues, host2sp_isys_event_queue_elems),
&css_queues.host2sp_isys_event_queue_handle);
/* SP2Host ISYS event queue*/
- init_bufq((uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_desc),
+ init_bufq((uint32_t)offsetof(struct host_sp_queues,
+ sp2host_isys_event_queue_desc),
(uint32_t)offsetof(struct host_sp_queues, sp2host_isys_event_queue_elems),
&css_queues.sp2host_isys_event_queue_handle);
}
enum ia_css_err ia_css_bufq_enqueue_buffer(
- int thread_index,
- int queue_id,
- uint32_t item)
+ int thread_index,
+ int queue_id,
+ uint32_t item)
{
enum ia_css_err return_err = IA_CSS_SUCCESS;
ia_css_queue_t *q;
IA_CSS_ENTER_PRIVATE("queue_id=%d", queue_id);
if ((thread_index >= SH_CSS_MAX_SP_THREADS) || (thread_index < 0) ||
- (queue_id == SH_CSS_INVALID_QUEUE_ID))
+ (queue_id == SH_CSS_INVALID_QUEUE_ID))
return IA_CSS_ERR_INVALID_ARGUMENTS;
/* Get the queue for communication */
q = bufq_get_qhandle(sh_css_host2sp_buffer_queue,
- queue_id,
- thread_index);
+ queue_id,
+ thread_index);
if (q) {
error = ia_css_queue_enqueue(q, item);
return_err = ia_css_convert_errno(error);
}
enum ia_css_err ia_css_bufq_dequeue_buffer(
- int queue_id,
- uint32_t *item)
+ int queue_id,
+ uint32_t *item)
{
enum ia_css_err return_err;
int error = 0;
return IA_CSS_ERR_INVALID_ARGUMENTS;
q = bufq_get_qhandle(sh_css_sp2host_buffer_queue,
- queue_id,
- -1);
+ queue_id,
+ -1);
if (q) {
error = ia_css_queue_dequeue(q, item);
return_err = ia_css_convert_errno(error);
}
enum ia_css_err ia_css_bufq_enqueue_psys_event(
- u8 evt_id,
- u8 evt_payload_0,
- u8 evt_payload_1,
- uint8_t evt_payload_2)
+ u8 evt_id,
+ u8 evt_payload_0,
+ u8 evt_payload_1,
+ uint8_t evt_payload_2)
{
enum ia_css_err return_err;
int error = 0;
}
error = ia_css_eventq_send(q,
- evt_id, evt_payload_0, evt_payload_1, evt_payload_2);
+ evt_id, evt_payload_0, evt_payload_1, evt_payload_2);
return_err = ia_css_convert_errno(error);
IA_CSS_LEAVE_ERR_PRIVATE(return_err);
}
enum ia_css_err ia_css_bufq_dequeue_psys_event(
- u8 item[BUFQ_EVENT_SIZE])
+ u8 item[BUFQ_EVENT_SIZE])
{
enum ia_css_err;
int error = 0;
}
enum ia_css_err ia_css_bufq_dequeue_isys_event(
- u8 item[BUFQ_EVENT_SIZE])
+ u8 item[BUFQ_EVENT_SIZE])
{
#if !defined(HAS_NO_INPUT_SYSTEM)
enum ia_css_err;
}
enum ia_css_err ia_css_bufq_enqueue_tag_cmd(
- uint32_t item)
+ uint32_t item)
{
#if !defined(HAS_NO_INPUT_SYSTEM)
enum ia_css_err return_err;
ia_css_queue_get_used_space(qhandle, &used);
ia_css_queue_get_free_space(qhandle, &free);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: used=%u free=%u\n",
- prefix, used, free);
+ prefix, used, free);
}
void ia_css_bufq_dump_queue_info(void)
for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
for (j = 0; j < SH_CSS_MAX_NUM_QUEUES; j++) {
snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
- "host2sp_buffer_queue[%u][%u]", i, j);
+ "host2sp_buffer_queue[%u][%u]", i, j);
bufq_dump_queue_info(prefix,
- &css_queues.host2sp_buffer_queue_handles[i][j]);
+ &css_queues.host2sp_buffer_queue_handles[i][j]);
}
}
for (i = 0; i < SH_CSS_MAX_NUM_QUEUES; i++) {
snprintf(prefix, BUFQ_DUMP_FILE_NAME_PREFIX_SIZE,
- "sp2host_buffer_queue[%u]", i);
+ "sp2host_buffer_queue[%u]", i);
bufq_dump_queue_info(prefix,
- &css_queues.sp2host_buffer_queue_handles[i]);
+ &css_queues.sp2host_buffer_queue_handles[i]);
}
bufq_dump_queue_info("host2sp_psys_event",
- &css_queues.host2sp_psys_event_queue_handle);
+ &css_queues.host2sp_psys_event_queue_handle);
bufq_dump_queue_info("sp2host_psys_event",
- &css_queues.sp2host_psys_event_queue_handle);
+ &css_queues.sp2host_psys_event_queue_handle);
#if !defined(HAS_NO_INPUT_SYSTEM)
bufq_dump_queue_info("host2sp_isys_event",
- &css_queues.host2sp_isys_event_queue_handle);
+ &css_queues.host2sp_isys_event_queue_handle);
bufq_dump_queue_info("sp2host_isys_event",
- &css_queues.sp2host_isys_event_queue_handle);
+ &css_queues.sp2host_isys_event_queue_handle);
bufq_dump_queue_info("host2sp_tag_cmd",
- &css_queues.host2sp_tag_cmd_queue_handle);
+ &css_queues.host2sp_tag_cmd_queue_handle);
#endif
}
* @return None
*/
void ia_css_debug_set_dtrace_level(
- const unsigned int trace_level);
+ const unsigned int trace_level);
/*! @brief Function to get the global dtrace verbosity level.
* @return global dtrace verbosity level
* @return None
*/
void ia_css_debug_dump_debug_info(
- const char *context);
+ const char *context);
#if SP_DEBUG != SP_DEBUG_NONE
void ia_css_debug_print_sp_debug_state(
- const struct sh_css_sp_debug_state *state);
+ const struct sh_css_sp_debug_state *state);
#endif
/*! @brief Dump all related binary info data
* @return None
*/
void ia_css_debug_binary_print(
- const struct ia_css_binary *bi);
+ const struct ia_css_binary *bi);
void ia_css_debug_sp_dump_mipi_fifo_high_water(void);
* @return None
*/
void ia_css_debug_frame_print(
- const struct ia_css_frame *frame,
- const char *descr);
+ const struct ia_css_frame *frame,
+ const char *descr);
/*! @brief Function to enable sp sleep mode.
* Function that enables sp sleep mode
* @param[in] enable flag indicating which parameters to dump.
* @return None
*/
-void ia_css_debug_dump_isp_params(struct ia_css_stream *stream, unsigned int enable);
+void ia_css_debug_dump_isp_params(struct ia_css_stream *stream,
+ unsigned int enable);
/*! @brief Function to dump some sp performance counters.
* Dump sp performance counters, currently input system errors.
* @return None
*/
void ia_css_debug_dump_resolution(
- const struct ia_css_resolution *res,
- const char *label);
+ const struct ia_css_resolution *res,
+ const char *label);
/*! @brief Dump the frame info to the trace output
* Dumps the frame info to the trace output.
* @return None
*/
void ia_css_debug_dump_frame_info(
- const struct ia_css_frame_info *info,
- const char *label);
+ const struct ia_css_frame_info *info,
+ const char *label);
/*! @brief Dump the capture config info to the trace output
* Dumps the capture config info to the trace output.
* @return None
*/
void ia_css_debug_dump_capture_config(
- const struct ia_css_capture_config *config);
+ const struct ia_css_capture_config *config);
/*! @brief Dump the pipe extra config info to the trace output
* Dumps the pipe extra config info to the trace output.
* @return None
*/
void ia_css_debug_dump_pipe_extra_config(
- const struct ia_css_pipe_extra_config *extra_config);
+ const struct ia_css_pipe_extra_config *extra_config);
/*! @brief Dump the pipe config info to the trace output
* Dumps the pipe config info to the trace output.
* @return None
*/
void ia_css_debug_dump_pipe_config(
- const struct ia_css_pipe_config *config);
+ const struct ia_css_pipe_config *config);
/*! @brief Dump the stream config source info to the trace output
* Dumps the stream config source info to the trace output.
* @return None
*/
void ia_css_debug_dump_stream_config_source(
- const struct ia_css_stream_config *config);
+ const struct ia_css_stream_config *config);
/*! @brief Dump the mipi buffer config info to the trace output
* Dumps the mipi buffer config info to the trace output.
* @return None
*/
void ia_css_debug_dump_mipi_buffer_config(
- const struct ia_css_mipi_buffer_config *config);
+ const struct ia_css_mipi_buffer_config *config);
/*! @brief Dump the metadata config info to the trace output
* Dumps the metadata config info to the trace output.
* @return None
*/
void ia_css_debug_dump_metadata_config(
- const struct ia_css_metadata_config *config);
+ const struct ia_css_metadata_config *config);
/*! @brief Dump the stream config info to the trace output
* Dumps the stream config info to the trace output.
* @return None
*/
void ia_css_debug_dump_stream_config(
- const struct ia_css_stream_config *config,
- int num_pipes);
+ const struct ia_css_stream_config *config,
+ int num_pipes);
/*! @brief Dump the state of the SP tagger
* Dumps the internal state of the SP tagger
* - false, otherwise.
*/
bool ia_css_debug_mode_disable_dma_channel(
- int dma_ID,
- int channel_id,
- int request_type);
+ int dma_ID,
+ int channel_id,
+ int request_type);
/**
* @brief Enable the DMA channel.
*
* - false, otherwise.
*/
bool ia_css_debug_mode_enable_dma_channel(
- int dma_ID,
- int channel_id,
- int request_type);
+ int dma_ID,
+ int channel_id,
+ int request_type);
/**
* @brief Dump tracer data.
* @return None
*/
void ia_css_debug_dump_hang_status(
- struct ia_css_pipe *pipe);
+ struct ia_css_pipe *pipe);
/*! @brief External command handler
* External command handler
* @return None
*/
void ia_css_debug_pipe_graph_dump_stage(
- struct ia_css_pipeline_stage *stage,
- enum ia_css_pipe_id id);
+ struct ia_css_pipeline_stage *stage,
+ enum ia_css_pipe_id id);
/**
* @brief Internal debug support for constructing a pipe graph.
* @return None
*/
void ia_css_debug_pipe_graph_dump_sp_raw_copy(
- struct ia_css_frame *out_frame);
+ struct ia_css_frame *out_frame);
/**
* @brief Internal debug support for constructing a pipe graph.
* @return None
*/
void ia_css_debug_pipe_graph_dump_stream_config(
- const struct ia_css_stream_config *stream_config);
+ const struct ia_css_stream_config *stream_config);
#endif /* _IA_CSS_DEBUG_PIPE_H_ */
enum atomisp_input_format stream_format;
} pg_inst = {true, 0, 0, 0, 0, N_ATOMISP_INPUT_FORMAT};
-static const char * const queue_id_to_str[] = {
+static const char *const queue_id_to_str[] = {
/* [SH_CSS_QUEUE_A_ID] =*/ "queue_A",
/* [SH_CSS_QUEUE_B_ID] =*/ "queue_B",
/* [SH_CSS_QUEUE_C_ID] =*/ "queue_C",
/* [SH_CSS_QUEUE_H_ID] =*/ "queue_H"
};
-static const char * const pipe_id_to_str[] = {
+static const char *const pipe_id_to_str[] = {
/* [IA_CSS_PIPE_ID_PREVIEW] =*/ "preview",
/* [IA_CSS_PIPE_ID_COPY] =*/ "copy",
/* [IA_CSS_PIPE_ID_VIDEO] =*/ "video",
}
static void debug_dump_long_array_formatted(
- const sp_ID_t sp_id,
- hrt_address stack_sp_addr,
- unsigned int stack_size)
+ const sp_ID_t sp_id,
+ hrt_address stack_sp_addr,
+ unsigned int stack_size)
{
unsigned int i;
u32 val;
}
static void debug_dump_sp_stack_info(
- const sp_ID_t sp_id)
+ const sp_ID_t sp_id)
{
const struct ia_css_fw_info *fw;
unsigned int HIVE_ADDR_sp_threads_stack;
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "sp_id(%u) stack info\n", sp_id);
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "from objects stack_addr_offset:0x%x stack_size_offset:0x%x\n",
- fw->info.sp.threads_stack,
- fw->info.sp.threads_stack_size);
+ "from objects stack_addr_offset:0x%x stack_size_offset:0x%x\n",
+ fw->info.sp.threads_stack,
+ fw->info.sp.threads_stack_size);
HIVE_ADDR_sp_threads_stack = fw->info.sp.threads_stack;
HIVE_ADDR_sp_threads_stack_size = fw->info.sp.threads_stack_size;
if (fw->info.sp.threads_stack == 0 ||
- fw->info.sp.threads_stack_size == 0)
+ fw->info.sp.threads_stack_size == 0)
return;
(void)HIVE_ADDR_sp_threads_stack;
(void)HIVE_ADDR_sp_threads_stack_size;
sp_dmem_load(sp_id,
- (unsigned int)sp_address_of(sp_threads_stack),
- &stack_sp_addr, sizeof(stack_sp_addr));
+ (unsigned int)sp_address_of(sp_threads_stack),
+ &stack_sp_addr, sizeof(stack_sp_addr));
sp_dmem_load(sp_id,
- (unsigned int)sp_address_of(sp_threads_stack_size),
- &stack_sizes, sizeof(stack_sizes));
+ (unsigned int)sp_address_of(sp_threads_stack_size),
+ &stack_sizes, sizeof(stack_sizes));
for (i = 0 ; i < MAX_THREAD_NUM; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "thread: %u stack_addr: 0x%08x stack_size: %u\n",
- i, stack_sp_addr[i], stack_sizes[i]);
+ "thread: %u stack_addr: 0x%08x stack_size: %u\n",
+ i, stack_sp_addr[i], stack_sizes[i]);
debug_dump_long_array_formatted(sp_id, (hrt_address)stack_sp_addr[i],
- stack_sizes[i]);
+ stack_sizes[i]);
}
}
return ia_css_debug_trace_level;
}
-static const char *debug_stream_format2str(const enum atomisp_input_format stream_format)
+static const char *debug_stream_format2str(const enum atomisp_input_format
+ stream_format)
{
switch (stream_format) {
case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
}
};
-static const char *debug_frame_format2str(const enum ia_css_frame_format frame_format)
+static const char *debug_frame_format2str(const enum ia_css_frame_format
+ frame_format)
{
switch (frame_format) {
case IA_CSS_FRAME_FORMAT_NV11:
}
static void debug_print_fifo_channel_state(const fifo_channel_state_t *state,
- const char *descr)
+ const char *descr)
{
assert(state);
assert(descr);
"Hsync", st_hsync_active_low);
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"Allow FIFO overflow", st_allow_fifo_overflow);
-/* Flag that tells whether the IF gives backpressure on frames */
-/*
- * FYI, this is only on the frame request (indicate), when the IF has
- * synch'd on a frame it will always give back pressure
- */
+ /* Flag that tells whether the IF gives backpressure on frames */
+ /*
+ * FYI, this is only on the frame request (indicate), when the IF has
+ * synch'd on a frame it will always give back pressure
+ */
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"Block when no request", st_block_fifo_when_no_req);
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"IF_BLOCKED_FIFO_NO_REQ_ADDRESS",
input_formatter_reg_load(INPUT_FORMATTER0_ID,
- HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS)
- );
+ HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS)
+ );
ia_css_debug_dtrace(2, "\t%-32s:\n", "InputSwitch State");
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg0",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg0));
+ _REG_GP_IFMT_input_switch_lut_reg0));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg1",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg1));
+ _REG_GP_IFMT_input_switch_lut_reg1));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg2",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg2));
+ _REG_GP_IFMT_input_switch_lut_reg2));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg3",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg3));
+ _REG_GP_IFMT_input_switch_lut_reg3));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg4",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg4));
+ _REG_GP_IFMT_input_switch_lut_reg4));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg5",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg5));
+ _REG_GP_IFMT_input_switch_lut_reg5));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg6",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg6));
+ _REG_GP_IFMT_input_switch_lut_reg6));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_lut_reg7",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_lut_reg7));
+ _REG_GP_IFMT_input_switch_lut_reg7));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_input_switch_fsync_lut",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_input_switch_fsync_lut));
+ _REG_GP_IFMT_input_switch_fsync_lut));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_srst",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_srst));
+ _REG_GP_IFMT_srst));
ia_css_debug_dtrace(2, "\t\t%-32s: %d\n",
"_REG_GP_IFMT_slv_reg_srst",
gp_device_reg_load(GP_DEVICE0_ID,
- _REG_GP_IFMT_slv_reg_srst));
+ _REG_GP_IFMT_slv_reg_srst));
#endif
ia_css_debug_dtrace(2, "\tFSM Status:\n");
break;
default:
snprintf(last_cmd_str, 64,
- "unknown [Channel: %d]", ch_id);
+ "unknown [Channel: %d]", ch_id);
break;
}
ia_css_debug_dtrace(2, "\t%-32s: (0x%X : %s)\n",
for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
if (bi->out_frame_info[i].res.width != 0) {
ia_css_debug_dtrace(2,
- "out%d: %dx%d, format = %d, padded width = %d\n",
- i,
- bi->out_frame_info[i].res.width,
- bi->out_frame_info[i].res.height,
- bi->out_frame_info[i].format,
- bi->out_frame_info[i].padded_width);
+ "out%d: %dx%d, format = %d, padded width = %d\n",
+ i,
+ bi->out_frame_info[i].res.width,
+ bi->out_frame_info[i].res.height,
+ bi->out_frame_info[i].format,
+ bi->out_frame_info[i].padded_width);
}
}
ia_css_debug_dtrace(2,
#elif SP_DEBUG == SP_DEBUG_TRACE
-/*
- * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will
- * me mapped on the file name string.
- *
- * Adjust this to your trace case!
- */
- static char const * const id2filename[8] = {
+ /*
+ * This is just an example how TRACE_FILE_ID (see ia_css_debug.sp.h) will
+ * me mapped on the file name string.
+ *
+ * Adjust this to your trace case!
+ */
+ static char const *const id2filename[8] = {
"param_buffer.sp.c | tagger.sp.c | pipe_data.sp.c",
"isp_init.sp.c",
"sp_raw_copy.hive.c",
for (n = host_index_last[t]; n < sp_index_last; n++) {
int i = n % SH_CSS_SP_DBG_TRACE_DEPTH;
int l = state->trace[t][i].location &
- ((1 << SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS) - 1);
+ ((1 << SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS) - 1);
int fid = state->trace[t][i].location >>
- SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS;
+ SH_CSS_SP_DBG_TRACE_FILE_ID_BIT_POS;
int ts = state->trace[t][i].time_stamp;
if (ts) {
}
static void debug_print_isys_acquisition_unit_state(
- acquisition_unit_state_t *state)
+ acquisition_unit_state_t *state)
{
assert(state);
short *offsets = (short *)&binary->info->mem_offsets.offsets.param->dmem;
short dmem_offset = offsets[idx];
const struct ia_css_host_data *isp_data =
- ia_css_isp_param_get_mem_init(&binary->mem_params,
- IA_CSS_PARAM_CLASS_PARAM, IA_CSS_ISP_DMEM0);
+ ia_css_isp_param_get_mem_init(&binary->mem_params,
+ IA_CSS_PARAM_CLASS_PARAM, IA_CSS_ISP_DMEM0);
if (dmem_offset < 0)
continue;
return &isp_data->address[dmem_offset];
if ((enable & IA_CSS_DEBUG_DUMP_CSC)
|| (enable & IA_CSS_DEBUG_DUMP_ALL)) {
ia_css_csc_dump(FIND_DMEM_PARAMS(stream, csc), IA_CSS_DEBUG_VERBOSE);
- ia_css_yuv2rgb_dump(FIND_DMEM_PARAMS_TYPE(stream, yuv2rgb, csc), IA_CSS_DEBUG_VERBOSE);
- ia_css_rgb2yuv_dump(FIND_DMEM_PARAMS_TYPE(stream, rgb2yuv, csc), IA_CSS_DEBUG_VERBOSE);
+ ia_css_yuv2rgb_dump(FIND_DMEM_PARAMS_TYPE(stream, yuv2rgb, csc),
+ IA_CSS_DEBUG_VERBOSE);
+ ia_css_rgb2yuv_dump(FIND_DMEM_PARAMS_TYPE(stream, rgb2yuv, csc),
+ IA_CSS_DEBUG_VERBOSE);
}
if ((enable & IA_CSS_DEBUG_DUMP_GC)
|| (enable & IA_CSS_DEBUG_DUMP_ALL)) {
fw = &sh_css_sp_fw;
HIVE_ADDR_raw_copy_line_count =
- fw->info.sp.raw_copy_line_count;
+ fw->info.sp.raw_copy_line_count;
(void)HIVE_ADDR_raw_copy_line_count;
sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(raw_copy_line_count),
+ (unsigned int)sp_address_of(raw_copy_line_count),
&raw_copy_line_count,
sizeof(raw_copy_line_count));
/* do the handling */
if (prev_raw_copy_line_count != raw_copy_line_count) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "sh_css_dump_sp_raw_copy_linecount() line_count=%d\n",
- raw_copy_line_count);
+ "sh_css_dump_sp_raw_copy_linecount() line_count=%d\n",
+ raw_copy_line_count);
prev_raw_copy_line_count = raw_copy_line_count;
}
}
const struct ia_css_fw_info *fw;
int i;
unsigned int HIVE_ADDR_ia_css_isys_sp_error_cnt;
- s32 ia_css_sp_input_system_error_cnt[N_MIPI_PORT_ID + 1]; /* 3 Capture Units and 1 Acquire Unit. */
+ s32 ia_css_sp_input_system_error_cnt[N_MIPI_PORT_ID +
+ 1]; /* 3 Capture Units and 1 Acquire Unit. */
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "Input System Error Counters:\n");
fw = &sh_css_sp_fw;
- HIVE_ADDR_ia_css_isys_sp_error_cnt = fw->info.sp.perf_counter_input_system_error;
+ HIVE_ADDR_ia_css_isys_sp_error_cnt =
+ fw->info.sp.perf_counter_input_system_error;
(void)HIVE_ADDR_ia_css_isys_sp_error_cnt;
for (i = 0; i < N_MIPI_PORT_ID + 1; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE, "\tport[%d] = %d\n",
- i, ia_css_sp_input_system_error_cnt[i]);
+ i, ia_css_sp_input_system_error_cnt[i]);
}
#endif
}
fw = &sh_css_sp_fw;
HIVE_ADDR_sp_thread_wait =
- fw->info.sp.debug_wait;
+ fw->info.sp.debug_wait;
(void)HIVE_ADDR_sp_thread_wait;
sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(sp_thread_wait),
+ (unsigned int)sp_address_of(sp_thread_wait),
&sp_thread_wait,
sizeof(sp_thread_wait));
for (i = 0; i < MAX_THREAD_NUM; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "\twait[%d] = 0x%X\n",
- i, sp_thread_wait[i]);
+ "\twait[%d] = 0x%X\n",
+ i, sp_thread_wait[i]);
}
}
fw = &sh_css_sp_fw;
HIVE_ADDR_sp_pipe_stage =
- fw->info.sp.debug_stage;
+ fw->info.sp.debug_stage;
(void)HIVE_ADDR_sp_pipe_stage;
sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(sp_pipe_stage),
+ (unsigned int)sp_address_of(sp_pipe_stage),
&sp_pipe_stage,
sizeof(sp_pipe_stage));
for (i = 0; i < MAX_THREAD_NUM; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "\tstage[%d] = %d\n",
- i, sp_pipe_stage[i]);
+ "\tstage[%d] = %d\n",
+ i, sp_pipe_stage[i]);
}
}
fw = &sh_css_sp_fw;
HIVE_ADDR_sp_pipe_stripe =
- fw->info.sp.debug_stripe;
+ fw->info.sp.debug_stripe;
(void)HIVE_ADDR_sp_pipe_stripe;
sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(sp_pipe_stripe),
+ (unsigned int)sp_address_of(sp_pipe_stripe),
&sp_pipe_stripe,
sizeof(sp_pipe_stripe));
for (i = 0; i < MAX_THREAD_NUM; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_VERBOSE,
- "\tstripe[%d] = %d\n",
- i, sp_pipe_stripe[i]);
+ "\tstripe[%d] = %d\n",
+ i, sp_pipe_stripe[i]);
}
}
#endif
static void
ia_css_debug_pipe_graph_dump_frame(
- struct ia_css_frame *frame,
- enum ia_css_pipe_id id,
- char const *blob_name,
- char const *frame_name,
- bool in_frame)
+ struct ia_css_frame *frame,
+ enum ia_css_pipe_id id,
+ char const *blob_name,
+ char const *frame_name,
+ bool in_frame)
{
char bufinfo[100];
snprintf(bufinfo, sizeof(bufinfo), "Internal");
} else {
snprintf(bufinfo, sizeof(bufinfo), "Queue: %s %s",
- pipe_id_to_str[id],
- queue_id_to_str[frame->dynamic_queue_id]);
+ pipe_id_to_str[id],
+ queue_id_to_str[frame->dynamic_queue_id]);
}
dtrace_dot(
- "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d, %dbpp\\n%s\"];",
- frame,
- debug_frame_format2str(frame->info.format),
- frame->info.res.width,
- frame->info.padded_width,
- frame->info.res.height,
- frame->info.raw_bit_depth,
- bufinfo);
+ "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d, %dbpp\\n%s\"];",
+ frame,
+ debug_frame_format2str(frame->info.format),
+ frame->info.res.width,
+ frame->info.padded_width,
+ frame->info.res.height,
+ frame->info.raw_bit_depth,
+ bufinfo);
if (in_frame) {
dtrace_dot(
- "\"%p\"->\"%s(pipe%d)\" [label = %s_frame];",
- frame,
- blob_name, id, frame_name);
+ "\"%p\"->\"%s(pipe%d)\" [label = %s_frame];",
+ frame,
+ blob_name, id, frame_name);
} else {
dtrace_dot(
- "\"%s(pipe%d)\"->\"%p\" [label = %s_frame];",
- blob_name, id,
- frame,
- frame_name);
+ "\"%s(pipe%d)\"->\"%p\" [label = %s_frame];",
+ blob_name, id,
+ frame,
+ frame_name);
}
}
dtrace_dot("fontsize=9;");
dtrace_dot("label = \"\\nEnable options: rp=reduced pipe, vfve=vf_veceven, dvse=dvs_envelope, dvs6=dvs_6axis, bo=block_out, fbds=fixed_bayer_ds, bf6=bayer_fir_6db, rawb=raw_binning, cont=continuous, disc=dis_crop\\n"
- "dp2a=dp_2adjacent, outp=output, outt=out_table, reff=ref_frame, par=params, gam=gamma, cagdc=ca_gdc, ispa=isp_addresses, inf=in_frame, outf=out_frame, hs=high_speed, inpc=input_chunking\"");
+ "dp2a=dp_2adjacent, outp=output, outt=out_table, reff=ref_frame, par=params, gam=gamma, cagdc=ca_gdc, ispa=isp_addresses, inf=in_frame, outf=out_frame, hs=high_speed, inpc=input_chunking\"");
}
void ia_css_debug_pipe_graph_dump_epilogue(void)
*/
dtrace_dot(
- "node [shape = doublecircle, fixedsize=true, width=2.5]; \"input_system\" [label = \"Input system\"];");
+ "node [shape = doublecircle, fixedsize=true, width=2.5]; \"input_system\" [label = \"Input system\"];");
dtrace_dot(
- "\"input_system\"->\"%s\" [label = \"%s\"];",
- dot_id_input_bin, debug_stream_format2str(pg_inst.stream_format));
+ "\"input_system\"->\"%s\" [label = \"%s\"];",
+ dot_id_input_bin, debug_stream_format2str(pg_inst.stream_format));
dtrace_dot(
- "node [shape = doublecircle, fixedsize=true, width=2.5]; \"sensor\" [label = \"Sensor\"];");
+ "node [shape = doublecircle, fixedsize=true, width=2.5]; \"sensor\" [label = \"Sensor\"];");
dtrace_dot(
- "\"sensor\"->\"input_system\" [label = \"%s\\n%d x %d\\n(%d x %d)\"];",
- debug_stream_format2str(pg_inst.stream_format),
- pg_inst.width, pg_inst.height,
- pg_inst.eff_width, pg_inst.eff_height);
+ "\"sensor\"->\"input_system\" [label = \"%s\\n%d x %d\\n(%d x %d)\"];",
+ debug_stream_format2str(pg_inst.stream_format),
+ pg_inst.width, pg_inst.height,
+ pg_inst.eff_width, pg_inst.eff_height);
}
dtrace_dot("}");
void
ia_css_debug_pipe_graph_dump_stage(
- struct ia_css_pipeline_stage *stage,
- enum ia_css_pipe_id id)
+ struct ia_css_pipeline_stage *stage,
+ enum ia_css_pipe_id id)
{
char blob_name[SH_CSS_MAX_BINARY_NAME + 10] = "<unknown type>";
char const *bin_type = "<unknown type>";
bin_type = "binary";
if (stage->binary->info->blob)
snprintf(blob_name, sizeof(blob_name), "%s_stage%d",
- stage->binary->info->blob->name, stage->stage_num);
+ stage->binary->info->blob->name, stage->stage_num);
} else if (stage->firmware) {
bin_type = "firmware";
- strncpy_s(blob_name, sizeof(blob_name), IA_CSS_EXT_ISP_PROG_NAME(stage->firmware), sizeof(blob_name));
+ strncpy_s(blob_name, sizeof(blob_name),
+ IA_CSS_EXT_ISP_PROG_NAME(stage->firmware), sizeof(blob_name));
}
/* Guard in case of binaries that don't have any binary_info */
* parameters per call "reasonable"
*/
snprintf(enable_info1, sizeof(enable_info1),
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
- bi->enable.reduced_pipe ? "rp," : "",
- bi->enable.vf_veceven ? "vfve," : "",
- bi->enable.dis ? "dis," : "",
- bi->enable.dvs_envelope ? "dvse," : "",
- bi->enable.uds ? "uds," : "",
- bi->enable.dvs_6axis ? "dvs6," : "",
- bi->enable.block_output ? "bo," : "",
- bi->enable.ds ? "ds," : "",
- bi->enable.bayer_fir_6db ? "bf6," : "",
- bi->enable.raw_binning ? "rawb," : "",
- bi->enable.continuous ? "cont," : "",
- bi->enable.s3a ? "s3a," : "",
- bi->enable.fpnr ? "fpnr," : "",
- bi->enable.sc ? "sc," : ""
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ bi->enable.reduced_pipe ? "rp," : "",
+ bi->enable.vf_veceven ? "vfve," : "",
+ bi->enable.dis ? "dis," : "",
+ bi->enable.dvs_envelope ? "dvse," : "",
+ bi->enable.uds ? "uds," : "",
+ bi->enable.dvs_6axis ? "dvs6," : "",
+ bi->enable.block_output ? "bo," : "",
+ bi->enable.ds ? "ds," : "",
+ bi->enable.bayer_fir_6db ? "bf6," : "",
+ bi->enable.raw_binning ? "rawb," : "",
+ bi->enable.continuous ? "cont," : "",
+ bi->enable.s3a ? "s3a," : "",
+ bi->enable.fpnr ? "fpnr," : "",
+ bi->enable.sc ? "sc," : ""
);
snprintf(enable_info2, sizeof(enable_info2),
- "%s%s%s%s%s%s%s%s%s%s%s",
- bi->enable.macc ? "macc," : "",
- bi->enable.output ? "outp," : "",
- bi->enable.ref_frame ? "reff," : "",
- bi->enable.tnr ? "tnr," : "",
- bi->enable.xnr ? "xnr," : "",
- bi->enable.params ? "par," : "",
- bi->enable.ca_gdc ? "cagdc," : "",
- bi->enable.isp_addresses ? "ispa," : "",
- bi->enable.in_frame ? "inf," : "",
- bi->enable.out_frame ? "outf," : "",
- bi->enable.high_speed ? "hs," : ""
+ "%s%s%s%s%s%s%s%s%s%s%s",
+ bi->enable.macc ? "macc," : "",
+ bi->enable.output ? "outp," : "",
+ bi->enable.ref_frame ? "reff," : "",
+ bi->enable.tnr ? "tnr," : "",
+ bi->enable.xnr ? "xnr," : "",
+ bi->enable.params ? "par," : "",
+ bi->enable.ca_gdc ? "cagdc," : "",
+ bi->enable.isp_addresses ? "ispa," : "",
+ bi->enable.in_frame ? "inf," : "",
+ bi->enable.out_frame ? "outf," : "",
+ bi->enable.high_speed ? "hs," : ""
);
/* And merge them into one string */
snprintf(enable_info, sizeof(enable_info), "%s%s",
- enable_info1, enable_info2);
+ enable_info1, enable_info2);
{
int l, p;
char *ei = enable_info;
p--;
/* Last comma found, copy till that comma */
strncpy_s(enable_info1,
- sizeof(enable_info1),
- ei, p);
+ sizeof(enable_info1),
+ ei, p);
enable_info1[p] = '\0';
ei += p + 1;
* it is not guaranteed dword aligned
*/
strncpy_s(enable_info2,
- sizeof(enable_info2),
- ei, l);
+ sizeof(enable_info2),
+ ei, l);
enable_info2[l] = '\0';
snprintf(enable_info, sizeof(enable_info), "%s\\n%s",
- enable_info1, enable_info2);
+ enable_info1, enable_info2);
} else {
/* 2nd line is still too long */
while (ei[p] != ',')
p--;
strncpy_s(enable_info2,
- sizeof(enable_info2),
- ei, p);
+ sizeof(enable_info2),
+ ei, p);
enable_info2[p] = '\0';
ei += p + 1;
l = strlen(ei);
* it is not guaranteed dword aligned
*/
strcpy_s(enable_info3,
- sizeof(enable_info3), ei);
+ sizeof(enable_info3), ei);
enable_info3[l] = '\0';
snprintf(enable_info, sizeof(enable_info),
- "%s\\n%s\\n%s",
- enable_info1, enable_info2,
- enable_info3);
+ "%s\\n%s\\n%s",
+ enable_info1, enable_info2,
+ enable_info3);
} else {
/* 3rd line is still too long */
p = ENABLE_LINE_MAX_LENGTH;
while (ei[p] != ',')
p--;
strncpy_s(enable_info3,
- sizeof(enable_info3),
- ei, p);
+ sizeof(enable_info3),
+ ei, p);
enable_info3[p] = '\0';
ei += p + 1;
strcpy_s(enable_info3,
- sizeof(enable_info3), ei);
+ sizeof(enable_info3), ei);
snprintf(enable_info, sizeof(enable_info),
- "%s\\n%s\\n%s",
- enable_info1, enable_info2,
- enable_info3);
+ "%s\\n%s\\n%s",
+ enable_info1, enable_info2,
+ enable_info3);
}
}
}
}
dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\\n\\n%s\"]; \"%s(pipe%d)\"",
- bin_type, blob_name, enable_info, blob_name, id);
+ bin_type, blob_name, enable_info, blob_name, id);
} else {
dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\\n\"]; \"%s(pipe%d)\"",
- bin_type, blob_name, blob_name, id);
+ bin_type, blob_name, blob_name, id);
}
if (stage->stage_num == 0) {
*/
if (strlen(dot_id_input_bin) == 0) {
snprintf(dot_id_input_bin, sizeof(dot_id_input_bin),
- "%s(pipe%d)", blob_name, id);
+ "%s(pipe%d)", blob_name, id);
}
}
if (stage->args.in_frame) {
ia_css_debug_pipe_graph_dump_frame(
- stage->args.in_frame, id, blob_name,
- "in", true);
+ stage->args.in_frame, id, blob_name,
+ "in", true);
}
#ifndef ISP2401
#endif
if (stage->args.tnr_frames[i]) {
ia_css_debug_pipe_graph_dump_frame(
- stage->args.tnr_frames[i], id,
- blob_name, "tnr_frame", true);
+ stage->args.tnr_frames[i], id,
+ blob_name, "tnr_frame", true);
}
}
for (i = 0; i < MAX_NUM_VIDEO_DELAY_FRAMES; i++) {
if (stage->args.delay_frames[i]) {
ia_css_debug_pipe_graph_dump_frame(
- stage->args.delay_frames[i], id,
- blob_name, "delay_frame", true);
+ stage->args.delay_frames[i], id,
+ blob_name, "delay_frame", true);
}
}
for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
if (stage->args.out_frame[i]) {
ia_css_debug_pipe_graph_dump_frame(
- stage->args.out_frame[i], id, blob_name,
- "out", false);
+ stage->args.out_frame[i], id, blob_name,
+ "out", false);
}
}
if (stage->args.out_vf_frame) {
ia_css_debug_pipe_graph_dump_frame(
- stage->args.out_vf_frame, id, blob_name,
- "out_vf", false);
+ stage->args.out_vf_frame, id, blob_name,
+ "out_vf", false);
}
}
void
ia_css_debug_pipe_graph_dump_sp_raw_copy(
- struct ia_css_frame *out_frame)
+ struct ia_css_frame *out_frame)
{
assert(out_frame);
if (pg_inst.do_init) {
}
dtrace_dot("node [shape = circle, fixedsize=true, width=2.5, label=\"%s\\n%s\"]; \"%s(pipe%d)\"",
- "sp-binary", "sp_raw_copy", "sp_raw_copy", 1);
+ "sp-binary", "sp_raw_copy", "sp_raw_copy", 1);
snprintf(ring_buffer, sizeof(ring_buffer),
- "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d\\nRingbuffer\"];",
- out_frame,
- debug_frame_format2str(out_frame->info.format),
- out_frame->info.res.width,
- out_frame->info.padded_width,
- out_frame->info.res.height);
+ "node [shape = box, fixedsize=true, width=2, height=0.7]; \"%p\" [label = \"%s\\n%d(%d) x %d\\nRingbuffer\"];",
+ out_frame,
+ debug_frame_format2str(out_frame->info.format),
+ out_frame->info.res.width,
+ out_frame->info.padded_width,
+ out_frame->info.res.height);
dtrace_dot(ring_buffer);
dtrace_dot(
- "\"%s(pipe%d)\"->\"%p\" [label = out_frame];",
- "sp_raw_copy", 1, out_frame);
+ "\"%s(pipe%d)\"->\"%p\" [label = out_frame];",
+ "sp_raw_copy", 1, out_frame);
- snprintf(dot_id_input_bin, sizeof(dot_id_input_bin), "%s(pipe%d)", "sp_raw_copy", 1);
+ snprintf(dot_id_input_bin, sizeof(dot_id_input_bin), "%s(pipe%d)",
+ "sp_raw_copy", 1);
}
void
ia_css_debug_pipe_graph_dump_stream_config(
- const struct ia_css_stream_config *stream_config)
+ const struct ia_css_stream_config *stream_config)
{
pg_inst.width = stream_config->input_config.input_res.width;
pg_inst.height = stream_config->input_config.input_res.height;
void
ia_css_debug_dump_resolution(
- const struct ia_css_resolution *res,
- const char *label)
+ const struct ia_css_resolution *res,
+ const char *label)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s: =%d x =%d\n",
- label, res->width, res->height);
+ label, res->width, res->height);
}
void
ia_css_debug_dump_frame_info(
- const struct ia_css_frame_info *info,
- const char *label)
+ const struct ia_css_frame_info *info,
+ const char *label)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", label);
ia_css_debug_dump_resolution(&info->res, "res");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "padded_width: %d\n",
- info->padded_width);
+ info->padded_width);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "format: %d\n", info->format);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "raw_bit_depth: %d\n",
- info->raw_bit_depth);
+ info->raw_bit_depth);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "raw_bayer_order: %d\n",
- info->raw_bayer_order);
+ info->raw_bayer_order);
}
void
ia_css_debug_dump_capture_config(
- const struct ia_css_capture_config *config)
+ const struct ia_css_capture_config *config)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", __func__);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_xnr: %d\n",
- config->enable_xnr);
+ config->enable_xnr);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_raw_output: %d\n",
- config->enable_raw_output);
+ config->enable_raw_output);
}
void
ia_css_debug_dump_pipe_extra_config(
- const struct ia_css_pipe_extra_config *extra_config)
+ const struct ia_css_pipe_extra_config *extra_config)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s\n", __func__);
if (extra_config) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "enable_raw_binning: %d\n",
- extra_config->enable_raw_binning);
+ "enable_raw_binning: %d\n",
+ extra_config->enable_raw_binning);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_yuv_ds: %d\n",
- extra_config->enable_yuv_ds);
+ extra_config->enable_yuv_ds);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "enable_high_speed: %d\n",
- extra_config->enable_high_speed);
+ "enable_high_speed: %d\n",
+ extra_config->enable_high_speed);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "enable_dvs_6axis: %d\n",
- extra_config->enable_dvs_6axis);
+ "enable_dvs_6axis: %d\n",
+ extra_config->enable_dvs_6axis);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "enable_reduced_pipe: %d\n",
- extra_config->enable_reduced_pipe);
+ "enable_reduced_pipe: %d\n",
+ extra_config->enable_reduced_pipe);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "enable_fractional_ds: %d\n",
- extra_config->enable_fractional_ds);
+ "enable_fractional_ds: %d\n",
+ extra_config->enable_fractional_ds);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "disable_vf_pp: %d\n",
- extra_config->disable_vf_pp);
+ extra_config->disable_vf_pp);
}
}
void
ia_css_debug_dump_pipe_config(
- const struct ia_css_pipe_config *config)
+ const struct ia_css_pipe_config *config)
{
unsigned int i;
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "isp_pipe_version: %d\n",
- config->isp_pipe_version);
+ config->isp_pipe_version);
ia_css_debug_dump_resolution(&config->bayer_ds_out_res,
- "bayer_ds_out_res");
+ "bayer_ds_out_res");
ia_css_debug_dump_resolution(&config->capt_pp_in_res,
- "capt_pp_in_res");
+ "capt_pp_in_res");
ia_css_debug_dump_resolution(&config->vf_pp_in_res, "vf_pp_in_res");
#ifdef ISP2401
ia_css_debug_dump_resolution(&config->output_system_in_res,
"output_system_in_res");
#endif
ia_css_debug_dump_resolution(&config->dvs_crop_out_res,
- "dvs_crop_out_res");
+ "dvs_crop_out_res");
for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
ia_css_debug_dump_frame_info(&config->output_info[i], "output_info");
ia_css_debug_dump_frame_info(&config->vf_output_info[i],
- "vf_output_info");
+ "vf_output_info");
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "acc_extension: %p\n",
config->acc_extension);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_acc_stages: %d\n",
- config->num_acc_stages);
+ config->num_acc_stages);
ia_css_debug_dump_capture_config(&config->default_capture_config);
ia_css_debug_dump_resolution(&config->dvs_envelope, "dvs_envelope");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "dvs_frame_delay: %d\n",
- config->dvs_frame_delay);
+ config->dvs_frame_delay);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "acc_num_execs: %d\n",
- config->acc_num_execs);
+ config->acc_num_execs);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "enable_dz: %d\n",
- config->enable_dz);
+ config->enable_dz);
IA_CSS_LEAVE_PRIVATE("");
}
void
ia_css_debug_dump_stream_config_source(
- const struct ia_css_stream_config *config)
+ const struct ia_css_stream_config *config)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
switch (config->mode) {
case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.port\n");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "port: %d\n",
- config->source.port.port);
+ config->source.port.port);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_lanes: %d\n",
- config->source.port.num_lanes);
+ config->source.port.num_lanes);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "timeout: %d\n",
- config->source.port.timeout);
+ config->source.port.timeout);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "compression: %d\n",
- config->source.port.compression.type);
+ config->source.port.compression.type);
break;
case IA_CSS_INPUT_MODE_TPG:
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.tpg\n");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "id: %d\n",
- config->source.tpg.id);
+ config->source.tpg.id);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n",
- config->source.tpg.mode);
+ config->source.tpg.mode);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x_mask: 0x%x\n",
- config->source.tpg.x_mask);
+ config->source.tpg.x_mask);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x_delta: %d\n",
- config->source.tpg.x_delta);
+ config->source.tpg.x_delta);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "y_mask: 0x%x\n",
- config->source.tpg.y_mask);
+ config->source.tpg.y_mask);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "y_delta: %d\n",
- config->source.tpg.y_delta);
+ config->source.tpg.y_delta);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "xy_mask: 0x%x\n",
- config->source.tpg.xy_mask);
+ config->source.tpg.xy_mask);
break;
case IA_CSS_INPUT_MODE_PRBS:
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "source.prbs\n");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "id: %d\n",
- config->source.prbs.id);
+ config->source.prbs.id);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "h_blank: %d\n",
- config->source.prbs.h_blank);
+ config->source.prbs.h_blank);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "v_blank: %d\n",
- config->source.prbs.v_blank);
+ config->source.prbs.v_blank);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "seed: 0x%x\n",
- config->source.prbs.seed);
+ config->source.prbs.seed);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "seed1: 0x%x\n",
- config->source.prbs.seed1);
+ config->source.prbs.seed1);
break;
default:
case IA_CSS_INPUT_MODE_FIFO:
void
ia_css_debug_dump_mipi_buffer_config(
- const struct ia_css_mipi_buffer_config *config)
+ const struct ia_css_mipi_buffer_config *config)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "size_mem_words: %d\n",
- config->size_mem_words);
+ config->size_mem_words);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "nof_mipi_buffers: %d\n",
- config->nof_mipi_buffers);
+ config->nof_mipi_buffers);
}
void
ia_css_debug_dump_metadata_config(
- const struct ia_css_metadata_config *config)
+ const struct ia_css_metadata_config *config)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "data_type: %d\n",
- config->data_type);
+ config->data_type);
ia_css_debug_dump_resolution(&config->resolution, "resolution");
}
void
ia_css_debug_dump_stream_config(
- const struct ia_css_stream_config *config,
- int num_pipes)
+ const struct ia_css_stream_config *config,
+ int num_pipes)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "num_pipes: %d\n", num_pipes);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "mode: %d\n", config->mode);
ia_css_debug_dump_stream_config_source(config);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "channel_id: %d\n",
- config->channel_id);
+ config->channel_id);
ia_css_debug_dump_resolution(&config->input_config.input_res, "input_res");
- ia_css_debug_dump_resolution(&config->input_config.effective_res, "effective_res");
+ ia_css_debug_dump_resolution(&config->input_config.effective_res,
+ "effective_res");
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "format: %d\n",
- config->input_config.format);
+ config->input_config.format);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "bayer_order: %d\n",
- config->input_config.bayer_order);
+ config->input_config.bayer_order);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sensor_binning_factor: %d\n",
- config->sensor_binning_factor);
+ config->sensor_binning_factor);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "pixels_per_clock: %d\n",
- config->pixels_per_clock);
+ config->pixels_per_clock);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "online: %d\n",
- config->online);
+ config->online);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "init_num_cont_raw_buf: %d\n",
- config->init_num_cont_raw_buf);
+ config->init_num_cont_raw_buf);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "target_num_cont_raw_buf: %d\n",
- config->target_num_cont_raw_buf);
+ "target_num_cont_raw_buf: %d\n",
+ config->target_num_cont_raw_buf);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "pack_raw_pixels: %d\n",
- config->pack_raw_pixels);
+ config->pack_raw_pixels);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "continuous: %d\n",
- config->continuous);
+ config->continuous);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "flash_gpio_pin: %d\n",
- config->flash_gpio_pin);
+ config->flash_gpio_pin);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "left_padding: %d\n",
- config->left_padding);
+ config->left_padding);
ia_css_debug_dump_mipi_buffer_config(&config->mipi_buffer_config);
ia_css_debug_dump_metadata_config(&config->metadata_config);
}
/* read the header and parse it */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "~~~ Tracer ");
- switch (proc_id)
- {
+ switch (proc_id) {
case TRACE_SP0_ID:
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "SP0");
start_addr = TRACE_SP0_ADDR;
max_trace_points = TRACE_ISP_MAX_POINTS;
break;
default:
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\t\ttraces are not supported for this processor ID - exiting\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "\t\ttraces are not supported for this processor ID - exiting\n");
return;
}
#ifndef ISP2401
#endif
#ifndef ISP2401
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", tmp & 0xFF, point_num);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", tmp & 0xFF,
+ point_num);
if ((tmp & 0xFF) != TRACER_VER) {
#else
/* Loading byte-by-byte as using the master routine had issues */
point_num = header.max_tracer_points;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", header.version, point_num);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, " ver %d %d points\n", header.version,
+ point_num);
if ((header.version & 0xFF) != TRACER_VER) {
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\t\tUnknown version - exiting\n");
}
/* copy the TPs and find the first 0 */
for (i = 0; i < point_num; i++) {
- trace_read_buf[i] = ia_css_device_load_uint32(start_addr_data + (i * item_size));
+ trace_read_buf[i] = ia_css_device_load_uint32(start_addr_data +
+ (i * item_size));
if ((limit == (-1)) && (trace_read_buf[i] == 0))
limit = i;
}
#ifdef ISP2401
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Status:\n");
for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++)
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\tT%d: %3d (%02x) %6d (%04x) %10d (%08x)\n", i,
- header.thr_status_byte[i], header.thr_status_byte[i],
- header.thr_status_word[i], header.thr_status_word[i],
- header.thr_status_dword[i], header.thr_status_dword[i]);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "\tT%d: %3d (%02x) %6d (%04x) %10d (%08x)\n", i,
+ header.thr_status_byte[i], header.thr_status_byte[i],
+ header.thr_status_word[i], header.thr_status_word[i],
+ header.thr_status_dword[i], header.thr_status_dword[i]);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "Scratch:\n");
for (i = 0; i < MAX_SCRATCH_DATA; i++)
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%10d (%08x) ",
- header.scratch_debug[i], header.scratch_debug[i]);
+ header.scratch_debug[i], header.scratch_debug[i]);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "\n");
#endif
return;
}
/* no overrun: start from 0 */
- if ((limit == point_num - 1) || /* first 0 is at the end - border case */
- (trace_read_buf[limit + 1] == 0)) /* did not make a full cycle after the memset */
+ if ((limit == point_num - 1) ||
+ /* first 0 is at the end - border case */
+ (trace_read_buf[limit + 1] ==
+ 0)) /* did not make a full cycle after the memset */
limit = 0;
/* overrun: limit is the first non-zero after the first zero */
else
/* print the TPs */
for (i = 0; i < point_num; i++) {
j = (limit + i) % point_num;
- if (trace_read_buf[j])
- {
+ if (trace_read_buf[j]) {
#ifndef ISP2401
TRACE_DUMP_FORMAT dump_format = FIELD_FORMAT_UNPACK(trace_read_buf[j]);
#else
dump_format = FIELD_FORMAT_UNPACK(trace_read_buf[j]);
}
#endif
- switch (dump_format)
- {
+ switch (dump_format) {
case TRACE_DUMP_FORMAT_POINT:
ia_css_debug_dtrace(
#ifndef ISP2401
- IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %d\n",
- j, FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %d\n",
+ j, FIELD_MAJOR_UNPACK(trace_read_buf[j]),
#else
- IA_CSS_DEBUG_TRACE, "\t\t%d T%d %d:%d value - %x (%d)\n",
- j,
- tid_val,
- FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ IA_CSS_DEBUG_TRACE, "\t\t%d T%d %d:%d value - %x (%d)\n",
+ j,
+ tid_val,
+ FIELD_MAJOR_UNPACK(trace_read_buf[j]),
#endif
- FIELD_MINOR_UNPACK(trace_read_buf[j]),
+ FIELD_MINOR_UNPACK(trace_read_buf[j]),
#ifdef ISP2401
- FIELD_VALUE_UNPACK(trace_read_buf[j]),
+ FIELD_VALUE_UNPACK(trace_read_buf[j]),
#endif
- FIELD_VALUE_UNPACK(trace_read_buf[j]));
+ FIELD_VALUE_UNPACK(trace_read_buf[j]));
break;
#ifndef ISP2401
case TRACE_DUMP_FORMAT_VALUE24_HEX:
#endif
ia_css_debug_dtrace(
#ifndef ISP2401
- IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x H\n",
+ IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x H\n",
#else
- IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %x (%d)\n",
+ IA_CSS_DEBUG_TRACE, "\t\t%d %d:%d value - %x (%d)\n",
#endif
- j,
+ j,
#ifndef ISP2401
- FIELD_MAJOR_UNPACK(trace_read_buf[j]),
- FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+ FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
#else
- FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
- FIELD_MINOR_UNPACK(trace_read_buf[j]),
- FIELD_VALUE_UNPACK(trace_read_buf[j]),
- FIELD_VALUE_UNPACK(trace_read_buf[j]));
+ FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+ FIELD_MINOR_UNPACK(trace_read_buf[j]),
+ FIELD_VALUE_UNPACK(trace_read_buf[j]),
+ FIELD_VALUE_UNPACK(trace_read_buf[j]));
#endif
break;
#ifndef ISP2401
#endif
ia_css_debug_dtrace(
#ifndef ISP2401
- IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %d D\n",
+ IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %d D\n",
#else
- IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x (%d)\n",
+ IA_CSS_DEBUG_TRACE, "\t\t%d, %d, 24bit value %x (%d)\n",
#endif
- j,
- FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ j,
+ FIELD_MAJOR_UNPACK(trace_read_buf[j]),
#ifdef ISP2401
- FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
- FIELD_VALUE_24_UNPACK(trace_read_buf[j]),
+ FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+ FIELD_VALUE_24_UNPACK(trace_read_buf[j]),
#endif
- FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+ FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
break;
#ifdef ISP2401
#endif
case TRACE_DUMP_FORMAT_VALUE24_TIMING:
ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing %x\n",
- j,
+ IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing %x\n",
+ j,
#ifndef ISP2401
- FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ FIELD_MAJOR_UNPACK(trace_read_buf[j]),
#else
- FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+ FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
#endif
- FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+ FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
break;
case TRACE_DUMP_FORMAT_VALUE24_TIMING_DELTA:
ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing delta %x\n",
- j,
+ IA_CSS_DEBUG_TRACE, "\t\t%d, %d, timing delta %x\n",
+ j,
#ifndef ISP2401
- FIELD_MAJOR_UNPACK(trace_read_buf[j]),
+ FIELD_MAJOR_UNPACK(trace_read_buf[j]),
#else
- FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
+ FIELD_MAJOR_W_FMT_UNPACK(trace_read_buf[j]),
#endif
- FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
+ FIELD_VALUE_24_UNPACK(trace_read_buf[j]));
break;
default:
ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE,
- "no such trace dump format %d",
+ IA_CSS_DEBUG_TRACE,
+ "no such trace dump format %d",
#ifndef ISP2401
- FIELD_FORMAT_UNPACK(trace_read_buf[j]));
+ FIELD_FORMAT_UNPACK(trace_read_buf[j]));
#else
- dump_format);
+ dump_format);
#endif
break;
}
ia_css_debug_dtrace(2, "Tagger Info:\n");
for (i = 0; i < MAX_CB_ELEMS_FOR_TAGGER; i++) {
ia_css_debug_dtrace(2, "\t tagger frame[%d]: exp_id=%d, marked=%d, locked=%d\n",
- i, tbuf_frames[i].exp_id, tbuf_frames[i].mark, tbuf_frames[i].lock);
+ i, tbuf_frames[i].exp_id, tbuf_frames[i].mark, tbuf_frames[i].lock);
}
}
#endif /* defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) */
#include "sw_event_global.h" /*event macros.TODO : Change File Name..???*/
bool ia_css_event_encode(
- u8 *in,
- u8 nr,
- uint32_t *out);
+ u8 *in,
+ u8 nr,
+ uint32_t *out);
void ia_css_event_decode(
- u32 event,
- uint8_t *payload);
+ u32 event,
+ uint8_t *payload);
#endif /*_IA_CSS_EVENT_H*/
* Refer to "sw_event_public.h" for details.
*/
bool ia_css_event_encode(
- u8 *in,
- u8 nr,
- uint32_t *out)
+ u8 *in,
+ u8 nr,
+ uint32_t *out)
{
bool ret;
u32 nr_of_bits;
}
void ia_css_event_decode(
- u32 event,
- uint8_t *payload)
+ u32 event,
+ uint8_t *payload)
{
assert(payload[1] == 0);
assert(payload[2] == 0);
assert(payload[3] == 0);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_event_decode() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_event_decode() enter:\n");
/* First decode according to the common case
* In case of a PORT_EOF event we overwrite with
* @return ENODATA - Queue is empty.
*/
int ia_css_eventq_recv(
- ia_css_queue_t *eventq_handle,
- uint8_t *payload);
+ ia_css_queue_t *eventq_handle,
+ uint8_t *payload);
/**
* @brief The Host sends the event to SP.
* @return ENOBUFS - Queue is full.
*/
int ia_css_eventq_send(
- ia_css_queue_t *eventq_handle,
- u8 evt_id,
- u8 evt_payload_0,
- u8 evt_payload_1,
- uint8_t evt_payload_2);
+ ia_css_queue_t *eventq_handle,
+ u8 evt_id,
+ u8 evt_payload_0,
+ u8 evt_payload_1,
+ uint8_t evt_payload_2);
#endif /* _IA_CSS_EVENTQ_H */
#include "platform_support.h" /* hrt_sleep() */
int ia_css_eventq_recv(
- ia_css_queue_t *eventq_handle,
- uint8_t *payload)
+ ia_css_queue_t *eventq_handle,
+ uint8_t *payload)
{
u32 sp_event;
int error;
* Refer to "sh_css_sp.h" for details.
*/
int ia_css_eventq_send(
- ia_css_queue_t *eventq_handle,
- u8 evt_id,
- u8 evt_payload_0,
- u8 evt_payload_1,
- uint8_t evt_payload_2)
+ ia_css_queue_t *eventq_handle,
+ u8 evt_id,
+ u8 evt_payload_0,
+ u8 evt_payload_1,
+ uint8_t evt_payload_2)
{
u8 tmp[4];
u32 sw_event;
* @return
*/
void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
- unsigned int width,
- unsigned int min_padded_width);
+ unsigned int width,
+ unsigned int min_padded_width);
/* @brief Sets the given format to the frame info
*
* @return
*/
void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
- enum ia_css_frame_format format);
+ enum ia_css_frame_format format);
/* @brief Sets the frame info with the given parameters
*
* @return
*/
void ia_css_frame_info_init(struct ia_css_frame_info *info,
- unsigned int width,
- unsigned int height,
- enum ia_css_frame_format format,
- unsigned int aligned);
+ unsigned int width,
+ unsigned int height,
+ enum ia_css_frame_format format,
+ unsigned int aligned);
/* @brief Checks whether 2 frame infos has the same resolution
*
* @return Returns true if the frames are equal
*/
bool ia_css_frame_info_is_same_resolution(
- const struct ia_css_frame_info *info_a,
- const struct ia_css_frame_info *info_b);
+ const struct ia_css_frame_info *info_a,
+ const struct ia_css_frame_info *info_b);
/* @brief Check the frame info is valid
*
* @return
*/
void ia_css_frame_free_multiple(unsigned int num_frames,
- struct ia_css_frame **frames_array);
+ struct ia_css_frame **frames_array);
/* @brief Allocate a CSS frame structure of given size in bytes..
*
* The frame structure is partially null initialized.
*/
enum ia_css_err ia_css_frame_allocate_with_buffer_size(
- struct ia_css_frame **frame,
- const unsigned int size_bytes,
- const bool contiguous);
+ struct ia_css_frame **frame,
+ const unsigned int size_bytes,
+ const bool contiguous);
/* @brief Check whether 2 frames are same type
*
* @return Returns true if the frames are equal
*/
bool ia_css_frame_is_same_type(
- const struct ia_css_frame *frame_a,
- const struct ia_css_frame *frame_b);
+ const struct ia_css_frame *frame_a,
+ const struct ia_css_frame *frame_b);
/* @brief Configure a dma port from frame info
*
* @return
*/
void ia_css_dma_configure_from_info(
- struct dma_port_config *config,
- const struct ia_css_frame_info *info);
+ struct dma_port_config *config,
+ const struct ia_css_frame_info *info);
#ifdef ISP2401
/* @brief Finds the cropping resolution
*/
enum ia_css_err
ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
- const struct ia_css_resolution *out_res,
- struct ia_css_resolution *crop_res);
+ const struct ia_css_resolution *out_res,
+ struct ia_css_resolution *crop_res);
#endif
#endif /* __IA_CSS_FRAME_H__ */
*/
struct ia_css_frame_sp_plane {
unsigned int offset; /* offset in bytes to start of frame data */
- /* offset is wrt data in sh_css_sp_sp_frame */
+ /* offset is wrt data in sh_css_sp_sp_frame */
};
struct ia_css_frame_sp_binary_plane {
};
void ia_css_frame_info_to_frame_sp_info(
- struct ia_css_frame_sp_info *sp_info,
- const struct ia_css_frame_info *info);
+ struct ia_css_frame_sp_info *sp_info,
+ const struct ia_css_frame_info *info);
void ia_css_resolution_to_sp_resolution(
- struct ia_css_sp_resolution *sp_info,
- const struct ia_css_resolution *info);
+ struct ia_css_sp_resolution *sp_info,
+ const struct ia_css_resolution *info);
#endif /*__IA_CSS_FRAME_COMM_H__*/
** Static functions declarations
**************************************************************************/
static void frame_init_plane(struct ia_css_frame_plane *plane,
- unsigned int width,
- unsigned int stride,
- unsigned int height,
- unsigned int offset);
+ unsigned int width,
+ unsigned int stride,
+ unsigned int height,
+ unsigned int offset);
static void frame_init_single_plane(struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bytes_per_pixel);
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bytes_per_pixel);
static void frame_init_raw_single_plane(
- struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bits_per_pixel);
+ struct ia_css_frame *frame,
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bits_per_pixel);
static void frame_init_mipi_plane(struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bytes_per_pixel);
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bytes_per_pixel);
static void frame_init_nv_planes(struct ia_css_frame *frame,
unsigned int horizontal_decimation,
unsigned int bytes_per_element);
static void frame_init_yuv_planes(struct ia_css_frame *frame,
- unsigned int horizontal_decimation,
- unsigned int vertical_decimation,
- bool swap_uv,
- unsigned int bytes_per_element);
+ unsigned int horizontal_decimation,
+ unsigned int vertical_decimation,
+ bool swap_uv,
+ unsigned int bytes_per_element);
static void frame_init_rgb_planes(struct ia_css_frame *frame,
- unsigned int bytes_per_element);
+ unsigned int bytes_per_element);
static void frame_init_qplane6_planes(struct ia_css_frame *frame);
static unsigned
ia_css_elems_bytes_from_info(
- const struct ia_css_frame_info *info);
+ const struct ia_css_frame_info *info);
/**************************************************************************
** CSS API functions, exposed by ia_css.h
if (!frame || !info)
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_from_info() enter:\n");
+ "ia_css_frame_allocate_from_info() enter:\n");
err =
ia_css_frame_allocate(frame, info->res.width, info->res.height,
info->format, info->padded_width,
info->raw_bit_depth);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_from_info() leave:\n");
+ "ia_css_frame_allocate_from_info() leave:\n");
return err;
}
enum ia_css_err ia_css_frame_allocate(struct ia_css_frame **frame,
- unsigned int width,
- unsigned int height,
- enum ia_css_frame_format format,
- unsigned int padded_width,
- unsigned int raw_bit_depth)
+ unsigned int width,
+ unsigned int height,
+ enum ia_css_frame_format format,
+ unsigned int padded_width,
+ unsigned int raw_bit_depth)
{
enum ia_css_err err = IA_CSS_SUCCESS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
#ifndef ISP2401
- "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d\n",
- width, height, format);
+ "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d\n",
+ width, height, format);
#else
- "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
- width, height, format, padded_width, raw_bit_depth);
+ "ia_css_frame_allocate() enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
+ width, height, format, padded_width, raw_bit_depth);
#endif
err = frame_allocate_with_data(frame, width, height, format,
#ifndef ISP2401
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate() leave: frame=%p\n", *frame);
+ "ia_css_frame_allocate() leave: frame=%p\n", *frame);
#else
if ((*frame) && err == IA_CSS_SUCCESS)
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n", *frame, (*frame)->data);
+ "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n", *frame,
+ (*frame)->data);
else
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n",
- (void *)-1, (unsigned int)-1);
+ "ia_css_frame_allocate() leave: frame=%p, data(DDR address)=0x%x\n",
+ (void *)-1, (unsigned int)-1);
#endif
return err;
}
enum ia_css_err ia_css_frame_map(struct ia_css_frame **frame,
- const struct ia_css_frame_info *info,
- const void __user *data,
- u16 attribute,
- void *context)
+ const struct ia_css_frame_info *info,
+ const void __user *data,
+ u16 attribute,
+ void *context)
{
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_frame *me;
struct ia_css_frame *me;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_create_from_info() enter:\n");
+ "ia_css_frame_create_from_info() enter:\n");
if (!frame || !info) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_create_from_info() leave: invalid arguments\n");
+ "ia_css_frame_create_from_info() leave: invalid arguments\n");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
me = frame_create(info->res.width,
- info->res.height,
- info->format,
- info->padded_width,
- info->raw_bit_depth,
- false,
- false);
+ info->res.height,
+ info->format,
+ info->padded_width,
+ info->raw_bit_depth,
+ false,
+ false);
if (!me) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_create_from_info() leave: frame create failed\n");
+ "ia_css_frame_create_from_info() leave: frame create failed\n");
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
#endif
sh_css_free(me);
#ifdef ISP2401
- me = NULL;
- }
+ me = NULL;
+}
- *frame = me;
+*frame = me;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_frame_create_from_info() leave:\n");
+ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_frame_create_from_info() leave:\n");
- return err;
+return err;
}
enum ia_css_err ia_css_frame_set_data(struct ia_css_frame *frame,
- const ia_css_ptr mapped_data,
- size_t data_bytes)
+ const ia_css_ptr mapped_data,
+ size_t data_bytes)
{
enum ia_css_err err = IA_CSS_SUCCESS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_set_data() enter:\n");
+ "ia_css_frame_set_data() enter:\n");
if (!frame) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_set_data() leave: NULL frame\n");
+ "ia_css_frame_set_data() leave: NULL frame\n");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
*/
if ((mapped_data != mmgr_NULL) && (frame->data_bytes > data_bytes)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_set_data() leave: invalid arguments\n");
+ "ia_css_frame_set_data() leave: invalid arguments\n");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
enum ia_css_err err = IA_CSS_SUCCESS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_contiguous() "
+ "ia_css_frame_allocate_contiguous() "
#ifndef ISP2401
- "enter: width=%d, height=%d, format=%d\n",
- width, height, format);
+ "enter: width=%d, height=%d, format=%d\n",
+ width, height, format);
#else
- "enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
- width, height, format, padded_width, raw_bit_depth);
+ "enter: width=%d, height=%d, format=%d, padded_width=%d, raw_bit_depth=%d\n",
+ width, height, format, padded_width, raw_bit_depth);
#endif
err = frame_allocate_with_data(frame, width, height, format,
- padded_width, raw_bit_depth, true);
+ padded_width, raw_bit_depth, true);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_contiguous() leave: frame=%p\n",
- frame ? *frame : (void *)-1);
+ "ia_css_frame_allocate_contiguous() leave: frame=%p\n",
+ frame ? *frame : (void *)-1);
return err;
}
enum ia_css_err ia_css_frame_allocate_contiguous_from_info(
- struct ia_css_frame **frame,
- const struct ia_css_frame_info *info)
+ struct ia_css_frame **frame,
+ const struct ia_css_frame_info *info)
{
enum ia_css_err err = IA_CSS_SUCCESS;
assert(frame);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_contiguous_from_info() enter:\n");
+ "ia_css_frame_allocate_contiguous_from_info() enter:\n");
err = ia_css_frame_allocate_contiguous(frame,
- info->res.width,
- info->res.height,
- info->format,
- info->padded_width,
- info->raw_bit_depth);
+ info->res.width,
+ info->res.height,
+ info->format,
+ info->padded_width,
+ info->raw_bit_depth);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_allocate_contiguous_from_info() leave:\n");
+ "ia_css_frame_allocate_contiguous_from_info() leave:\n");
return err;
}
switch (frame->info.format) {
case IA_CSS_FRAME_FORMAT_MIPI:
frame_init_mipi_plane(frame, &frame->planes.raw,
- frame->info.res.height,
- frame->info.padded_width,
- frame->info.raw_bit_depth <= 8 ? 1 : 2);
+ frame->info.res.height,
+ frame->info.padded_width,
+ frame->info.raw_bit_depth <= 8 ? 1 : 2);
break;
case IA_CSS_FRAME_FORMAT_RAW_PACKED:
frame_init_raw_single_plane(frame, &frame->planes.raw,
- frame->info.res.height,
- frame->info.padded_width,
- frame->info.raw_bit_depth);
+ frame->info.res.height,
+ frame->info.padded_width,
+ frame->info.raw_bit_depth);
break;
case IA_CSS_FRAME_FORMAT_RAW:
frame_init_single_plane(frame, &frame->planes.raw,
- frame->info.res.height,
- frame->info.padded_width,
- frame->info.raw_bit_depth <= 8 ? 1 : 2);
+ frame->info.res.height,
+ frame->info.padded_width,
+ frame->info.raw_bit_depth <= 8 ? 1 : 2);
break;
case IA_CSS_FRAME_FORMAT_RGB565:
frame_init_single_plane(frame, &frame->planes.rgb,
- frame->info.res.height,
- frame->info.padded_width, 2);
+ frame->info.res.height,
+ frame->info.padded_width, 2);
break;
case IA_CSS_FRAME_FORMAT_RGBA888:
frame_init_single_plane(frame, &frame->planes.rgb,
- frame->info.res.height,
- frame->info.padded_width * 4, 1);
+ frame->info.res.height,
+ frame->info.padded_width * 4, 1);
break;
case IA_CSS_FRAME_FORMAT_PLANAR_RGB888:
frame_init_rgb_planes(frame, 1);
break;
- /* yuyv and uyvu have the same frame layout, only the data
- * positioning differs.
- */
+ /* yuyv and uyvu have the same frame layout, only the data
+ * positioning differs.
+ */
case IA_CSS_FRAME_FORMAT_YUYV:
case IA_CSS_FRAME_FORMAT_UYVY:
case IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8:
case IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8:
frame_init_single_plane(frame, &frame->planes.yuyv,
- frame->info.res.height,
- frame->info.padded_width * 2, 1);
+ frame->info.res.height,
+ frame->info.padded_width * 2, 1);
break;
case IA_CSS_FRAME_FORMAT_YUV_LINE:
/* Needs 3 extra lines to allow vf_pp prefetching */
frame_init_single_plane(frame, &frame->planes.yuyv,
- frame->info.res.height * 3 / 2 + 3,
- frame->info.padded_width, 1);
+ frame->info.res.height * 3 / 2 + 3,
+ frame->info.padded_width, 1);
break;
case IA_CSS_FRAME_FORMAT_NV11:
- frame_init_nv_planes(frame, 4, 1, 1);
+ frame_init_nv_planes(frame, 4, 1, 1);
break;
- /* nv12 and nv21 have the same frame layout, only the data
- * positioning differs.
- */
+ /* nv12 and nv21 have the same frame layout, only the data
+ * positioning differs.
+ */
case IA_CSS_FRAME_FORMAT_NV12:
case IA_CSS_FRAME_FORMAT_NV21:
case IA_CSS_FRAME_FORMAT_NV12_TILEY:
case IA_CSS_FRAME_FORMAT_NV12_16:
frame_init_nv_planes(frame, 2, 2, 2);
break;
- /* nv16 and nv61 have the same frame layout, only the data
- * positioning differs.
- */
+ /* nv16 and nv61 have the same frame layout, only the data
+ * positioning differs.
+ */
case IA_CSS_FRAME_FORMAT_NV16:
case IA_CSS_FRAME_FORMAT_NV61:
frame_init_nv_planes(frame, 2, 1, 1);
break;
case IA_CSS_FRAME_FORMAT_BINARY_8:
frame_init_single_plane(frame, &frame->planes.binary.data,
- frame->info.res.height,
- frame->info.padded_width, 1);
+ frame->info.res.height,
+ frame->info.padded_width, 1);
frame->planes.binary.size = 0;
break;
default:
}
void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
- unsigned int width,
- unsigned int min_padded_width)
+ unsigned int width,
+ unsigned int min_padded_width)
{
unsigned int align;
}
void ia_css_frame_info_set_format(struct ia_css_frame_info *info,
- enum ia_css_frame_format format)
+ enum ia_css_frame_format format)
{
assert(info);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_info_set_format() enter:\n");
+ "ia_css_frame_info_set_format() enter:\n");
info->format = format;
}
void ia_css_frame_info_init(struct ia_css_frame_info *info,
- unsigned int width,
- unsigned int height,
- enum ia_css_frame_format format,
- unsigned int aligned)
+ unsigned int width,
+ unsigned int height,
+ enum ia_css_frame_format format,
+ unsigned int aligned)
{
IA_CSS_ENTER_PRIVATE("info = %p, width = %d, height = %d, format = %d, aligned = %d",
info, width, height, format, aligned);
}
void ia_css_frame_free_multiple(unsigned int num_frames,
- struct ia_css_frame **frames_array)
+ struct ia_css_frame **frames_array)
{
unsigned int i;
}
enum ia_css_err ia_css_frame_allocate_with_buffer_size(
- struct ia_css_frame **frame,
- const unsigned int buffer_size_bytes,
- const bool contiguous)
+ struct ia_css_frame **frame,
+ const unsigned int buffer_size_bytes,
+ const bool contiguous)
{
/* AM: Body coppied from frame_allocate_with_data(). */
enum ia_css_err err;
struct ia_css_frame *me = frame_create(0, 0,
- IA_CSS_FRAME_FORMAT_NUM,/* Not valid format yet */
- 0, 0, contiguous, false);
+ IA_CSS_FRAME_FORMAT_NUM,/* Not valid format yet */
+ 0, 0, contiguous, false);
if (!me)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
bool ia_css_frame_info_is_same_resolution(
- const struct ia_css_frame_info *info_a,
- const struct ia_css_frame_info *info_b)
+ const struct ia_css_frame_info *info_a,
+ const struct ia_css_frame_info *info_b)
{
if (!info_a || !info_b)
return false;
return (info_a->res.width == info_b->res.width) &&
- (info_a->res.height == info_b->res.height);
+ (info_a->res.height == info_b->res.height);
}
bool ia_css_frame_is_same_type(const struct ia_css_frame *frame_a,
- const struct ia_css_frame *frame_b)
+ const struct ia_css_frame *frame_b)
{
bool is_equal = false;
const struct ia_css_frame_info *info_a = &frame_a->info,
- *info_b = &frame_b->info;
+ *info_b = &frame_b->info;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_is_same_type() enter:\n");
+ "ia_css_frame_is_same_type() enter:\n");
if (!info_a || !info_b)
return false;
is_equal = ia_css_frame_info_is_same_resolution(info_a, info_b);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_frame_is_same_type() leave:\n");
+ "ia_css_frame_is_same_type() leave:\n");
return is_equal;
}
void
ia_css_dma_configure_from_info(
- struct dma_port_config *config,
- const struct ia_css_frame_info *info)
+ struct dma_port_config *config,
+ const struct ia_css_frame_info *info)
{
unsigned int is_raw_packed = info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED;
- unsigned int bits_per_pixel = is_raw_packed ? info->raw_bit_depth : ia_css_elems_bytes_from_info(info) * 8;
+ unsigned int bits_per_pixel = is_raw_packed ? info->raw_bit_depth :
+ ia_css_elems_bytes_from_info(info) * 8;
unsigned int pix_per_ddrword = HIVE_ISP_DDR_WORD_BITS / bits_per_pixel;
unsigned int words_per_line = CEIL_DIV(info->padded_width, pix_per_ddrword);
unsigned int elems_b = pix_per_ddrword;
**************************************************************************/
static void frame_init_plane(struct ia_css_frame_plane *plane,
- unsigned int width,
- unsigned int stride,
- unsigned int height,
- unsigned int offset)
+ unsigned int width,
+ unsigned int stride,
+ unsigned int height,
+ unsigned int offset)
{
plane->height = height;
plane->width = width;
}
static void frame_init_single_plane(struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bytes_per_pixel)
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bytes_per_pixel)
{
unsigned int stride;
}
static void frame_init_raw_single_plane(
- struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bits_per_pixel)
+ struct ia_css_frame *frame,
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bits_per_pixel)
{
unsigned int stride;
assert(frame);
stride = HIVE_ISP_DDR_WORD_BYTES *
- CEIL_DIV(subpixels_per_line,
- HIVE_ISP_DDR_WORD_BITS / bits_per_pixel);
+ CEIL_DIV(subpixels_per_line,
+ HIVE_ISP_DDR_WORD_BITS / bits_per_pixel);
frame->data_bytes = stride * height;
frame_init_plane(plane, subpixels_per_line, stride, height, 0);
return;
}
static void frame_init_mipi_plane(struct ia_css_frame *frame,
- struct ia_css_frame_plane *plane,
- unsigned int height,
- unsigned int subpixels_per_line,
- unsigned int bytes_per_pixel)
+ struct ia_css_frame_plane *plane,
+ unsigned int height,
+ unsigned int subpixels_per_line,
+ unsigned int bytes_per_pixel)
{
unsigned int stride;
}
static void frame_init_yuv_planes(struct ia_css_frame *frame,
- unsigned int horizontal_decimation,
- unsigned int vertical_decimation,
- bool swap_uv,
- unsigned int bytes_per_element)
+ unsigned int horizontal_decimation,
+ unsigned int vertical_decimation,
+ bool swap_uv,
+ unsigned int bytes_per_element)
{
unsigned int y_width = frame->info.padded_width,
- y_height = frame->info.res.height,
- uv_width = y_width / horizontal_decimation,
- uv_height = y_height / vertical_decimation,
- y_stride, y_bytes, uv_bytes, uv_stride;
+ y_height = frame->info.res.height,
+ uv_width = y_width / horizontal_decimation,
+ uv_height = y_height / vertical_decimation,
+ y_stride, y_bytes, uv_bytes, uv_stride;
y_stride = y_width * bytes_per_element;
uv_stride = uv_width * bytes_per_element;
}
static void frame_init_rgb_planes(struct ia_css_frame *frame,
- unsigned int bytes_per_element)
+ unsigned int bytes_per_element)
{
unsigned int width = frame->info.res.width,
- height = frame->info.res.height, stride, bytes;
+ height = frame->info.res.height, stride, bytes;
stride = width * bytes_per_element;
bytes = stride * height;
static void frame_init_qplane6_planes(struct ia_css_frame *frame)
{
unsigned int width = frame->info.padded_width / 2,
- height = frame->info.res.height / 2, bytes, stride;
+ height = frame->info.res.height / 2, bytes, stride;
stride = width * 2;
bytes = stride * height;
{
enum ia_css_err err;
struct ia_css_frame *me = frame_create(width,
- height,
- format,
- padded_width,
- raw_bit_depth,
- contiguous,
- true);
+ height,
+ format,
+ padded_width,
+ raw_bit_depth,
+ contiguous,
+ true);
if (!me)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
return 1; /* bytes per pixel */
if (info->format == IA_CSS_FRAME_FORMAT_RAW
- || (info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)) {
+ || (info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)) {
if (info->raw_bit_depth)
return CEIL_DIV(info->raw_bit_depth, 8);
else
}
void ia_css_frame_info_to_frame_sp_info(
- struct ia_css_frame_sp_info *to,
- const struct ia_css_frame_info *from)
+ struct ia_css_frame_sp_info *to,
+ const struct ia_css_frame_info *from)
{
ia_css_resolution_to_sp_resolution(&to->res, &from->res);
to->padded_width = (uint16_t)from->padded_width;
}
void ia_css_resolution_to_sp_resolution(
- struct ia_css_sp_resolution *to,
- const struct ia_css_resolution *from)
+ struct ia_css_sp_resolution *to,
+ const struct ia_css_resolution *from)
{
to->width = (uint16_t)from->width;
to->height = (uint16_t)from->height;
enum ia_css_err
ia_css_frame_find_crop_resolution(const struct ia_css_resolution *in_res,
- const struct ia_css_resolution *out_res,
- struct ia_css_resolution *crop_res)
-{
+ const struct ia_css_resolution *out_res,
+ struct ia_css_resolution *crop_res) {
u32 wd_even_ceil, ht_even_ceil;
u32 in_ratio, out_ratio;
return IA_CSS_ERR_INVALID_ARGUMENTS;
IA_CSS_ENTER_PRIVATE("in(%ux%u) -> out(%ux%u)", in_res->width,
- in_res->height, out_res->width, out_res->height);
+ in_res->height, out_res->width, out_res->height);
if ((in_res->width == 0)
- || (in_res->height == 0)
- || (out_res->width == 0)
- || (out_res->height == 0))
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ || (in_res->height == 0)
+ || (out_res->width == 0)
+ || (out_res->height == 0))
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
if ((out_res->width > in_res->width) ||
- (out_res->height > in_res->height))
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ (out_res->height > in_res->height))
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
/* If aspect ratio (width/height) of out_res is higher than the aspect
* ratio of the in_res, then we crop vertically, otherwise we crop
in_ratio = in_res->width * out_res->height;
out_ratio = out_res->width * in_res->height;
- if (in_ratio == out_ratio) {
+ if (in_ratio == out_ratio)
+ {
crop_res->width = in_res->width;
crop_res->height = in_res->height;
- } else if (out_ratio > in_ratio) {
+ } else if (out_ratio > in_ratio)
+ {
crop_res->width = in_res->width;
crop_res->height = ROUND_DIV(out_res->height * crop_res->width,
- out_res->width);
- } else {
+ out_res->width);
+ } else
+ {
crop_res->height = in_res->height;
crop_res->width = ROUND_DIV(out_res->width * crop_res->height,
- out_res->height);
+ out_res->height);
}
/* Round new (cropped) width and height to an even number.
*/
wd_even_ceil = EVEN_CEIL(crop_res->width);
ht_even_ceil = EVEN_CEIL(crop_res->height);
- if ((wd_even_ceil > in_res->width) || (ht_even_ceil > in_res->height)) {
+ if ((wd_even_ceil > in_res->width) || (ht_even_ceil > in_res->height))
+ {
crop_res->width = EVEN_FLOOR(crop_res->width);
crop_res->height = EVEN_FLOOR(crop_res->height);
- } else {
+ } else
+ {
crop_res->width = wd_even_ceil;
crop_res->height = ht_even_ceil;
}
IA_CSS_LEAVE_PRIVATE("in(%ux%u) -> out(%ux%u)", crop_res->width,
- crop_res->height, out_res->width, out_res->height);
+ crop_res->height, out_res->width, out_res->height);
return IA_CSS_SUCCESS;
}
#endif
extern bool ifmtr_set_if_blocking_mode_reset;
unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
- const struct ia_css_stream_config *config);
+ const struct ia_css_stream_config *config);
unsigned int ia_css_ifmtr_columns_needed_for_bayer_order(
- const struct ia_css_stream_config *config);
+ const struct ia_css_stream_config *config);
enum ia_css_err ia_css_ifmtr_configure(struct ia_css_stream_config *config,
struct ia_css_binary *binary);
* Static functions declarations
************************************************************/
static enum ia_css_err ifmtr_start_column(
- const struct ia_css_stream_config *config,
- unsigned int bin_in,
- unsigned int *start_column);
+ const struct ia_css_stream_config *config,
+ unsigned int bin_in,
+ unsigned int *start_column);
static enum ia_css_err ifmtr_input_start_line(
- const struct ia_css_stream_config *config,
- unsigned int bin_in,
- unsigned int *start_line);
+ const struct ia_css_stream_config *config,
+ unsigned int bin_in,
+ unsigned int *start_line);
static void ifmtr_set_if_blocking_mode(
- const input_formatter_cfg_t * const config_a,
- const input_formatter_cfg_t * const config_b);
+ const input_formatter_cfg_t *const config_a,
+ const input_formatter_cfg_t *const config_b);
/************************************************************
* Public functions
* to correct in case the input bayer order is different.
*/
unsigned int ia_css_ifmtr_lines_needed_for_bayer_order(
- const struct ia_css_stream_config *config)
+ const struct ia_css_stream_config *config)
{
assert(config);
if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
}
unsigned int ia_css_ifmtr_columns_needed_for_bayer_order(
- const struct ia_css_stream_config *config)
+ const struct ia_css_stream_config *config)
{
assert(config);
if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
struct ia_css_binary *binary)
{
unsigned int start_line, start_column = 0,
- cropped_height,
- cropped_width,
- num_vectors,
- buffer_height = 2,
- buffer_width,
- two_ppc,
- vmem_increment = 0,
- deinterleaving = 0,
- deinterleaving_b = 0,
- width_a = 0,
- width_b = 0,
- bits_per_pixel,
- vectors_per_buffer,
- vectors_per_line = 0,
- buffers_per_line = 0,
- buf_offset_a = 0,
- buf_offset_b = 0,
- line_width = 0,
- width_b_factor = 1, start_column_b,
- left_padding = 0;
+ cropped_height,
+ cropped_width,
+ num_vectors,
+ buffer_height = 2,
+ buffer_width,
+ two_ppc,
+ vmem_increment = 0,
+ deinterleaving = 0,
+ deinterleaving_b = 0,
+ width_a = 0,
+ width_b = 0,
+ bits_per_pixel,
+ vectors_per_buffer,
+ vectors_per_line = 0,
+ buffers_per_line = 0,
+ buf_offset_a = 0,
+ buf_offset_b = 0,
+ line_width = 0,
+ width_b_factor = 1, start_column_b,
+ left_padding = 0;
input_formatter_cfg_t if_a_config, if_b_config;
enum atomisp_input_format input_format;
enum ia_css_err err = IA_CSS_SUCCESS;
cropped_width = binary->in_frame_info.res.width;
/* This should correspond to the input buffer definition for
ISP binaries in input_buf.isp.h */
- if (binary->info->sp.enable.continuous && binary->info->sp.pipeline.mode != IA_CSS_BINARY_MODE_COPY)
+ if (binary->info->sp.enable.continuous &&
+ binary->info->sp.pipeline.mode != IA_CSS_BINARY_MODE_COPY)
buffer_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
else
buffer_width = binary->info->sp.input.max_width;
start_column_b = start_column;
bits_per_pixel = input_formatter_get_alignment(INPUT_FORMATTER0_ID)
- * 8 / ISP_VEC_NELEMS;
+ * 8 / ISP_VEC_NELEMS;
switch (input_format) {
case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
if (two_ppc) {
vectors_per_line = num_vectors / buffer_height;
/* Even lines are half size */
line_width = vectors_per_line *
- input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
- 2;
+ input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
+ 2;
start_column /= 2;
} else {
vmem_increment = 1;
vectors_per_line = num_vectors / buffer_height;
/* Even lines are half size */
line_width = vectors_per_line *
- input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
- 2;
+ input_formatter_get_alignment(INPUT_FORMATTER0_ID) /
+ 2;
start_column *= deinterleaving;
start_column /= 2;
start_column_b = start_column;
vmem_increment = 1;
deinterleaving = 2;
if ((!binary) || (config->continuous && binary
- && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)) {
+ && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)) {
/* !binary -> sp raw copy pipe, no deinterleaving */
deinterleaving = 1;
}
}
if (!line_width)
line_width = vectors_per_line *
- input_formatter_get_alignment(INPUT_FORMATTER0_ID);
+ input_formatter_get_alignment(INPUT_FORMATTER0_ID);
if (!buffers_per_line)
buffers_per_line = deinterleaving;
line_width = CEIL_MUL(line_width,
if (config->mode == IA_CSS_INPUT_MODE_TPG &&
((binary && binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_VIDEO) ||
- (!binary))) {
+ (!binary))) {
/* !binary -> sp raw copy pipe */
/* workaround for TPG in video mode */
start_line = 0;
buffer_width *= deinterleaving;
/* Patch from bayer to rgb */
num_vectors = num_vectors / 2 *
- deinterleaving * width_b_factor;
+ deinterleaving * width_b_factor;
vectors_per_line = num_vectors / buffer_height;
line_width = vectors_per_line *
- input_formatter_get_alignment(INPUT_FORMATTER0_ID);
+ input_formatter_get_alignment(INPUT_FORMATTER0_ID);
}
if_b_config.start_line = start_line;
if_b_config.start_column = start_column_b;
* Static functions
************************************************************/
static void ifmtr_set_if_blocking_mode(
- const input_formatter_cfg_t * const config_a,
- const input_formatter_cfg_t * const config_b)
+ const input_formatter_cfg_t *const config_a,
+ const input_formatter_cfg_t *const config_b)
{
int i;
bool block[] = { false, false, false, false };
}
static enum ia_css_err ifmtr_start_column(
- const struct ia_css_stream_config *config,
- unsigned int bin_in,
- unsigned int *start_column)
+ const struct ia_css_stream_config *config,
+ unsigned int bin_in,
+ unsigned int *start_column)
{
unsigned int in = config->input_config.input_res.width, start,
- for_bayer = ia_css_ifmtr_columns_needed_for_bayer_order(config);
+ for_bayer = ia_css_ifmtr_columns_needed_for_bayer_order(config);
if (bin_in + 2 * for_bayer > in)
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
static enum ia_css_err ifmtr_input_start_line(
- const struct ia_css_stream_config *config,
- unsigned int bin_in,
- unsigned int *start_line)
+ const struct ia_css_stream_config *config,
+ unsigned int bin_in,
+ unsigned int *start_line)
{
unsigned int in = config->input_config.input_res.height, start,
- for_bayer = ia_css_ifmtr_lines_needed_for_bayer_order(config);
+ for_bayer = ia_css_ifmtr_lines_needed_for_bayer_order(config);
if (bin_in + 2 * for_bayer > in)
return IA_CSS_ERR_INVALID_ARGUMENTS;
/* SP access */
void ia_css_inputfifo_send_input_frame(
- const unsigned short *data,
- unsigned int width,
- unsigned int height,
- unsigned int ch_id,
- enum atomisp_input_format input_format,
- bool two_ppc);
+ const unsigned short *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int ch_id,
+ enum atomisp_input_format input_format,
+ bool two_ppc);
void ia_css_inputfifo_start_frame(
- unsigned int ch_id,
- enum atomisp_input_format input_format,
- bool two_ppc);
+ unsigned int ch_id,
+ enum atomisp_input_format input_format,
+ bool two_ppc);
void ia_css_inputfifo_send_line(
- unsigned int ch_id,
- const unsigned short *data,
- unsigned int width,
- const unsigned short *data2,
- unsigned int width2);
+ unsigned int ch_id,
+ const unsigned short *data,
+ unsigned int width,
+ const unsigned short *data2,
+ unsigned int width2);
void ia_css_inputfifo_send_embedded_line(
- unsigned int ch_id,
- enum atomisp_input_format data_type,
- const unsigned short *data,
- unsigned int width);
+ unsigned int ch_id,
+ enum atomisp_input_format data_type,
+ const unsigned short *data,
+ unsigned int width);
void ia_css_inputfifo_end_frame(
- unsigned int ch_id);
+ unsigned int ch_id);
#endif /* _IA_CSS_INPUTFIFO_H */
/* Streaming to MIPI */
static unsigned int inputfifo_wrap_marker(
-/* static inline unsigned inputfifo_wrap_marker( */
- unsigned int marker)
+ /* static inline unsigned inputfifo_wrap_marker( */
+ unsigned int marker)
{
return marker |
- (inputfifo_curr_ch_id << HIVE_STR_TO_MIPI_CH_ID_LSB) |
- (inputfifo_curr_fmt_type << _HIVE_STR_TO_MIPI_FMT_TYPE_LSB);
+ (inputfifo_curr_ch_id << HIVE_STR_TO_MIPI_CH_ID_LSB) |
+ (inputfifo_curr_fmt_type << _HIVE_STR_TO_MIPI_FMT_TYPE_LSB);
}
static inline void
}
static void inputfifo_send_data_a(
-/* static inline void inputfifo_send_data_a( */
-unsigned int data)
+ /* static inline void inputfifo_send_data_a( */
+ unsigned int data)
{
unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
(data << HIVE_STR_TO_MIPI_DATA_A_LSB);
}
static void inputfifo_send_data_b(
-/* static inline void inputfifo_send_data_b( */
- unsigned int data)
+ /* static inline void inputfifo_send_data_b( */
+ unsigned int data)
{
unsigned int token = (1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
(data << _HIVE_STR_TO_MIPI_DATA_B_LSB);
}
static void inputfifo_send_data(
-/* static inline void inputfifo_send_data( */
- unsigned int a,
- unsigned int b)
+ /* static inline void inputfifo_send_data( */
+ unsigned int a,
+ unsigned int b)
{
unsigned int token = ((1 << HIVE_STR_TO_MIPI_VALID_A_BIT) |
(1 << HIVE_STR_TO_MIPI_VALID_B_BIT) |
/* static inline void inputfifo_send_sol(void) */
{
hrt_data token = inputfifo_wrap_marker(
- 1 << HIVE_STR_TO_MIPI_SOL_BIT);
+ 1 << HIVE_STR_TO_MIPI_SOL_BIT);
_sh_css_fifo_snd(token);
return;
/* static inline void inputfifo_send_eol(void) */
{
hrt_data token = inputfifo_wrap_marker(
- 1 << HIVE_STR_TO_MIPI_EOL_BIT);
+ 1 << HIVE_STR_TO_MIPI_EOL_BIT);
_sh_css_fifo_snd(token);
return;
}
/* static inline void inputfifo_send_sof(void) */
{
hrt_data token = inputfifo_wrap_marker(
- 1 << HIVE_STR_TO_MIPI_SOF_BIT);
+ 1 << HIVE_STR_TO_MIPI_SOF_BIT);
_sh_css_fifo_snd(token);
return;
/* static inline void inputfifo_send_eof(void) */
{
hrt_data token = inputfifo_wrap_marker(
- 1 << HIVE_STR_TO_MIPI_EOF_BIT);
+ 1 << HIVE_STR_TO_MIPI_EOF_BIT);
_sh_css_fifo_snd(token);
return;
}
#ifdef __ON__
static void inputfifo_send_ch_id(
-/* static inline void inputfifo_send_ch_id( */
- unsigned int ch_id)
+ /* static inline void inputfifo_send_ch_id( */
+ unsigned int ch_id)
{
hrt_data token;
}
static void inputfifo_send_fmt_type(
-/* static inline void inputfifo_send_fmt_type( */
- unsigned int fmt_type)
+ /* static inline void inputfifo_send_fmt_type( */
+ unsigned int fmt_type)
{
hrt_data token;
#endif /* __ON__ */
static void inputfifo_send_ch_id_and_fmt_type(
-/* static inline
-void inputfifo_send_ch_id_and_fmt_type( */
- unsigned int ch_id,
- unsigned int fmt_type)
+ /* static inline
+ void inputfifo_send_ch_id_and_fmt_type( */
+ unsigned int ch_id,
+ unsigned int fmt_type)
{
hrt_data token;
}
static void inputfifo_start_frame(
-/* static inline void inputfifo_start_frame( */
- unsigned int ch_id,
- unsigned int fmt_type)
+ /* static inline void inputfifo_start_frame( */
+ unsigned int ch_id,
+ unsigned int fmt_type)
{
inputfifo_send_ch_id_and_fmt_type(ch_id, fmt_type);
inputfifo_send_sof();
}
static void inputfifo_end_frame(
- unsigned int marker_cycles)
+ unsigned int marker_cycles)
{
unsigned int i;
}
static void inputfifo_send_line2(
- const unsigned short *data,
- unsigned int width,
- const unsigned short *data2,
- unsigned int width2,
- unsigned int hblank_cycles,
- unsigned int marker_cycles,
- unsigned int two_ppc,
- enum inputfifo_mipi_data_type type)
+ const unsigned short *data,
+ unsigned int width,
+ const unsigned short *data2,
+ unsigned int width2,
+ unsigned int hblank_cycles,
+ unsigned int marker_cycles,
+ unsigned int two_ppc,
+ enum inputfifo_mipi_data_type type)
{
unsigned int i, is_rgb = 0, is_legacy = 0;
* if the file contains an odd number of bytes.
*/
inputfifo_send_data(
- data[0], 0);
+ data[0], 0);
} else {
inputfifo_send_data(
- data[0], data[1]);
+ data[0], data[1]);
}
/* Additional increment because we send 2 pixels */
data++;
* if the file contains an odd number of bytes.
*/
inputfifo_send_data(
- data2[0], 0);
+ data2[0], 0);
} else {
inputfifo_send_data(
- data2[0], data2[1]);
+ data2[0], data2[1]);
}
/* Additional increment because we send 2 pixels */
data2++;
static void
inputfifo_send_line(const unsigned short *data,
- unsigned int width,
- unsigned int hblank_cycles,
- unsigned int marker_cycles,
- unsigned int two_ppc,
- enum inputfifo_mipi_data_type type)
+ unsigned int width,
+ unsigned int hblank_cycles,
+ unsigned int marker_cycles,
+ unsigned int two_ppc,
+ enum inputfifo_mipi_data_type type)
{
assert(data);
inputfifo_send_line2(data, width, NULL, 0,
- hblank_cycles,
- marker_cycles,
- two_ppc,
- type);
+ hblank_cycles,
+ marker_cycles,
+ two_ppc,
+ type);
}
/* Send a frame of data into the input network via the GP FIFO.
*/
static void inputfifo_send_frame(
- const unsigned short *data,
- unsigned int width,
- unsigned int height,
- unsigned int ch_id,
- unsigned int fmt_type,
- unsigned int hblank_cycles,
- unsigned int marker_cycles,
- unsigned int two_ppc,
- enum inputfifo_mipi_data_type type)
+ const unsigned short *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int ch_id,
+ unsigned int fmt_type,
+ unsigned int hblank_cycles,
+ unsigned int marker_cycles,
+ unsigned int two_ppc,
+ enum inputfifo_mipi_data_type type)
{
unsigned int i;
if ((type == inputfifo_mipi_data_type_yuv420) &&
(i & 1) == 1) {
inputfifo_send_line(data, 2 * width,
- hblank_cycles,
- marker_cycles,
- two_ppc, type);
+ hblank_cycles,
+ marker_cycles,
+ two_ppc, type);
data += 2 * width;
} else {
inputfifo_send_line(data, width,
- hblank_cycles,
- marker_cycles,
- two_ppc, type);
+ hblank_cycles,
+ marker_cycles,
+ two_ppc, type);
data += width;
}
}
}
static enum inputfifo_mipi_data_type inputfifo_determine_type(
- enum atomisp_input_format input_format)
+ enum atomisp_input_format input_format)
{
enum inputfifo_mipi_data_type type;
type = inputfifo_mipi_data_type_regular;
if (input_format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
type =
- inputfifo_mipi_data_type_yuv420_legacy;
+ inputfifo_mipi_data_type_yuv420_legacy;
} else if (input_format == ATOMISP_INPUT_FORMAT_YUV420_8 ||
input_format == ATOMISP_INPUT_FORMAT_YUV420_10 ||
input_format == ATOMISP_INPUT_FORMAT_YUV420_16) {
type =
- inputfifo_mipi_data_type_yuv420;
+ inputfifo_mipi_data_type_yuv420;
} else if (input_format >= ATOMISP_INPUT_FORMAT_RGB_444 &&
input_format <= ATOMISP_INPUT_FORMAT_RGB_888) {
type =
- inputfifo_mipi_data_type_rgb;
+ inputfifo_mipi_data_type_rgb;
}
return type;
}
static struct inputfifo_instance *inputfifo_get_inst(
- unsigned int ch_id)
+ unsigned int ch_id)
{
return &inputfifo_inst_admin[ch_id];
}
void ia_css_inputfifo_send_input_frame(
- const unsigned short *data,
- unsigned int width,
- unsigned int height,
- unsigned int ch_id,
- enum atomisp_input_format input_format,
- bool two_ppc)
+ const unsigned short *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int ch_id,
+ enum atomisp_input_format input_format,
+ bool two_ppc)
{
unsigned int fmt_type, hblank_cycles, marker_cycles;
enum inputfifo_mipi_data_type type;
hblank_cycles = HBLANK_CYCLES;
marker_cycles = MARKER_CYCLES;
ia_css_isys_convert_stream_format_to_mipi_format(input_format,
- MIPI_PREDICTOR_NONE,
- &fmt_type);
+ MIPI_PREDICTOR_NONE,
+ &fmt_type);
type = inputfifo_determine_type(input_format);
inputfifo_send_frame(data, width, height,
- ch_id, fmt_type, hblank_cycles, marker_cycles,
- two_ppc, type);
+ ch_id, fmt_type, hblank_cycles, marker_cycles,
+ two_ppc, type);
}
void ia_css_inputfifo_start_frame(
- unsigned int ch_id,
- enum atomisp_input_format input_format,
- bool two_ppc)
+ unsigned int ch_id,
+ enum atomisp_input_format input_format,
+ bool two_ppc)
{
struct inputfifo_instance *s2mi;
s2mi->ch_id = ch_id;
ia_css_isys_convert_stream_format_to_mipi_format(input_format,
- MIPI_PREDICTOR_NONE,
- &s2mi->fmt_type);
+ MIPI_PREDICTOR_NONE,
+ &s2mi->fmt_type);
s2mi->two_ppc = two_ppc;
s2mi->type = inputfifo_determine_type(input_format);
s2mi->hblank_cycles = HBLANK_CYCLES;
}
void ia_css_inputfifo_send_line(
- unsigned int ch_id,
- const unsigned short *data,
- unsigned int width,
- const unsigned short *data2,
- unsigned int width2)
+ unsigned int ch_id,
+ const unsigned short *data,
+ unsigned int width,
+ const unsigned short *data2,
+ unsigned int width2)
{
struct inputfifo_instance *s2mi;
inputfifo_curr_fmt_type = (s2mi->fmt_type) & _HIVE_ISP_FMT_TYPE_MASK;
inputfifo_send_line2(data, width, data2, width2,
- s2mi->hblank_cycles,
- s2mi->marker_cycles,
- s2mi->two_ppc,
- s2mi->type);
+ s2mi->hblank_cycles,
+ s2mi->marker_cycles,
+ s2mi->two_ppc,
+ s2mi->type);
}
void ia_css_inputfifo_send_embedded_line(
- unsigned int ch_id,
- enum atomisp_input_format data_type,
- const unsigned short *data,
- unsigned int width)
+ unsigned int ch_id,
+ enum atomisp_input_format data_type,
+ const unsigned short *data,
+ unsigned int width)
{
struct inputfifo_instance *s2mi;
unsigned int fmt_type;
assert(data);
s2mi = inputfifo_get_inst(ch_id);
ia_css_isys_convert_stream_format_to_mipi_format(data_type,
- MIPI_PREDICTOR_NONE, &fmt_type);
+ MIPI_PREDICTOR_NONE, &fmt_type);
/* Set format_type for metadata line. */
inputfifo_curr_fmt_type = fmt_type & _HIVE_ISP_FMT_TYPE_MASK;
inputfifo_send_line(data, width, s2mi->hblank_cycles, s2mi->marker_cycles,
- s2mi->two_ppc, inputfifo_mipi_data_type_regular);
+ s2mi->two_ppc, inputfifo_mipi_data_type_regular);
}
void ia_css_inputfifo_end_frame(
- unsigned int ch_id)
+ unsigned int ch_id)
{
struct inputfifo_instance *s2mi;
/* Set functions for parameter memory descriptors */
void
ia_css_isp_param_set_mem_init(
- struct ia_css_isp_param_host_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- char *address, size_t size);
+ struct ia_css_isp_param_host_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ char *address, size_t size);
void
ia_css_isp_param_set_css_mem_init(
- struct ia_css_isp_param_css_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- hrt_vaddress address, size_t size);
+ struct ia_css_isp_param_css_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ hrt_vaddress address, size_t size);
void
ia_css_isp_param_set_isp_mem_init(
- struct ia_css_isp_param_isp_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- u32 address, size_t size);
+ struct ia_css_isp_param_isp_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ u32 address, size_t size);
/* Get functions for parameter memory descriptors */
-const struct ia_css_host_data*
+const struct ia_css_host_data *
ia_css_isp_param_get_mem_init(
- const struct ia_css_isp_param_host_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem);
+ const struct ia_css_isp_param_host_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem);
-const struct ia_css_data*
+const struct ia_css_data *
ia_css_isp_param_get_css_mem_init(
- const struct ia_css_isp_param_css_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem);
+ const struct ia_css_isp_param_css_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem);
-const struct ia_css_isp_data*
+const struct ia_css_isp_data *
ia_css_isp_param_get_isp_mem_init(
- const struct ia_css_isp_param_isp_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem);
+ const struct ia_css_isp_param_isp_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem);
/* Initialize the memory interface sizes and addresses */
void
ia_css_init_memory_interface(
- struct ia_css_isp_param_css_segments *isp_mem_if,
- const struct ia_css_isp_param_host_segments *mem_params,
- const struct ia_css_isp_param_css_segments *css_params);
+ struct ia_css_isp_param_css_segments *isp_mem_if,
+ const struct ia_css_isp_param_host_segments *mem_params,
+ const struct ia_css_isp_param_css_segments *css_params);
/* Allocate memory parameters */
enum ia_css_err
ia_css_isp_param_allocate_isp_parameters(
- struct ia_css_isp_param_host_segments *mem_params,
- struct ia_css_isp_param_css_segments *css_params,
- const struct ia_css_isp_param_isp_segments *mem_initializers);
+ struct ia_css_isp_param_host_segments *mem_params,
+ struct ia_css_isp_param_css_segments *css_params,
+ const struct ia_css_isp_param_isp_segments *mem_initializers);
/* Destroy memory parameters */
void
ia_css_isp_param_destroy_isp_parameters(
- struct ia_css_isp_param_host_segments *mem_params,
- struct ia_css_isp_param_css_segments *css_params);
+ struct ia_css_isp_param_host_segments *mem_params,
+ struct ia_css_isp_param_css_segments *css_params);
/* Load fw parameters */
void
ia_css_isp_param_load_fw_params(
- const char *fw,
- union ia_css_all_memory_offsets *mem_offsets,
- const struct ia_css_isp_param_memory_offsets *memory_offsets,
- bool init);
+ const char *fw,
+ union ia_css_all_memory_offsets *mem_offsets,
+ const struct ia_css_isp_param_memory_offsets *memory_offsets,
+ bool init);
/* Copy host parameter images to ddr */
enum ia_css_err
ia_css_isp_param_copy_isp_mem_if_to_ddr(
- struct ia_css_isp_param_css_segments *ddr,
- const struct ia_css_isp_param_host_segments *host,
- enum ia_css_param_class pclass);
+ struct ia_css_isp_param_css_segments *ddr,
+ const struct ia_css_isp_param_host_segments *host,
+ enum ia_css_param_class pclass);
/* Enable a pipeline by setting the control field in the isp dmem parameters */
void
ia_css_isp_param_enable_pipeline(
- const struct ia_css_isp_param_host_segments *mem_params);
+ const struct ia_css_isp_param_host_segments *mem_params);
#endif /* _IA_CSS_ISP_PARAM_H_ */
void
ia_css_isp_param_set_mem_init(
- struct ia_css_isp_param_host_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- char *address, size_t size)
+ struct ia_css_isp_param_host_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ char *address, size_t size)
{
mem_init->params[pclass][mem].address = address;
mem_init->params[pclass][mem].size = (uint32_t)size;
void
ia_css_isp_param_set_css_mem_init(
- struct ia_css_isp_param_css_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- hrt_vaddress address, size_t size)
+ struct ia_css_isp_param_css_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ hrt_vaddress address, size_t size)
{
mem_init->params[pclass][mem].address = address;
mem_init->params[pclass][mem].size = (uint32_t)size;
void
ia_css_isp_param_set_isp_mem_init(
- struct ia_css_isp_param_isp_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem,
- u32 address, size_t size)
+ struct ia_css_isp_param_isp_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem,
+ u32 address, size_t size)
{
mem_init->params[pclass][mem].address = address;
mem_init->params[pclass][mem].size = (uint32_t)size;
}
/* Get functions for parameter memory descriptors */
-const struct ia_css_host_data*
+const struct ia_css_host_data *
ia_css_isp_param_get_mem_init(
- const struct ia_css_isp_param_host_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem)
+ const struct ia_css_isp_param_host_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem)
{
return &mem_init->params[pclass][mem];
}
-const struct ia_css_data*
+const struct ia_css_data *
ia_css_isp_param_get_css_mem_init(
- const struct ia_css_isp_param_css_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem)
+ const struct ia_css_isp_param_css_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem)
{
return &mem_init->params[pclass][mem];
}
-const struct ia_css_isp_data*
+const struct ia_css_isp_data *
ia_css_isp_param_get_isp_mem_init(
- const struct ia_css_isp_param_isp_segments *mem_init,
- enum ia_css_param_class pclass,
- enum ia_css_isp_memories mem)
+ const struct ia_css_isp_param_isp_segments *mem_init,
+ enum ia_css_param_class pclass,
+ enum ia_css_isp_memories mem)
{
return &mem_init->params[pclass][mem];
}
void
ia_css_init_memory_interface(
- struct ia_css_isp_param_css_segments *isp_mem_if,
- const struct ia_css_isp_param_host_segments *mem_params,
- const struct ia_css_isp_param_css_segments *css_params)
+ struct ia_css_isp_param_css_segments *isp_mem_if,
+ const struct ia_css_isp_param_host_segments *mem_params,
+ const struct ia_css_isp_param_css_segments *css_params)
{
unsigned int pclass, mem;
continue;
isp_mem_if->params[pclass][mem].size = mem_params->params[pclass][mem].size;
if (pclass != IA_CSS_PARAM_CLASS_PARAM)
- isp_mem_if->params[pclass][mem].address = css_params->params[pclass][mem].address;
+ isp_mem_if->params[pclass][mem].address =
+ css_params->params[pclass][mem].address;
}
}
}
enum ia_css_err
ia_css_isp_param_allocate_isp_parameters(
- struct ia_css_isp_param_host_segments *mem_params,
- struct ia_css_isp_param_css_segments *css_params,
- const struct ia_css_isp_param_isp_segments *mem_initializers)
-{
+ struct ia_css_isp_param_host_segments *mem_params,
+ struct ia_css_isp_param_css_segments *css_params,
+ const struct ia_css_isp_param_isp_segments *mem_initializers) {
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int mem, pclass;
pclass = IA_CSS_PARAM_CLASS_PARAM;
- for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
+ for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++)
+ {
for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
u32 size = 0;
void
ia_css_isp_param_destroy_isp_parameters(
- struct ia_css_isp_param_host_segments *mem_params,
- struct ia_css_isp_param_css_segments *css_params)
+ struct ia_css_isp_param_host_segments *mem_params,
+ struct ia_css_isp_param_css_segments *css_params)
{
unsigned int mem, pclass;
void
ia_css_isp_param_load_fw_params(
- const char *fw,
- union ia_css_all_memory_offsets *mem_offsets,
- const struct ia_css_isp_param_memory_offsets *memory_offsets,
- bool init)
+ const char *fw,
+ union ia_css_all_memory_offsets *mem_offsets,
+ const struct ia_css_isp_param_memory_offsets *memory_offsets,
+ bool init)
{
unsigned int pclass;
enum ia_css_err
ia_css_isp_param_copy_isp_mem_if_to_ddr(
- struct ia_css_isp_param_css_segments *ddr,
- const struct ia_css_isp_param_host_segments *host,
- enum ia_css_param_class pclass)
-{
+ struct ia_css_isp_param_css_segments *ddr,
+ const struct ia_css_isp_param_host_segments *host,
+ enum ia_css_param_class pclass) {
unsigned int mem;
- for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
+ for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++)
+ {
size_t size = host->params[pclass][mem].size;
hrt_vaddress ddr_mem_ptr = ddr->params[pclass][mem].address;
char *host_mem_ptr = host->params[pclass][mem].address;
void
ia_css_isp_param_enable_pipeline(
- const struct ia_css_isp_param_host_segments *mem_params)
+ const struct ia_css_isp_param_host_segments *mem_params)
{
/* By protocol b0 of the mandatory uint32_t first field of the
input parameter is a disable bit*/
if (mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].size == 0)
return;
- *(uint32_t *)&mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].address[dmem_offset] = 0x0;
+ *(uint32_t *)
+ &mem_params->params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM0].address[dmem_offset]
+ = 0x0;
}
input_system_error_t ia_css_isys_init(void);
void ia_css_isys_uninit(void);
enum mipi_port_id ia_css_isys_port_to_mipi_port(
- enum mipi_port_id api_port);
+ enum mipi_port_id api_port);
#endif
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
* there is already a stream registered with the same handle
*/
enum ia_css_err ia_css_isys_csi_rx_register_stream(
- enum mipi_port_id port,
- uint32_t isys_stream_id);
+ enum mipi_port_id port,
+ uint32_t isys_stream_id);
/**
* @brief Unregister one (virtual) stream. This is used to track when all
* there is no stream registered with that handle
*/
enum ia_css_err ia_css_isys_csi_rx_unregister_stream(
- enum mipi_port_id port,
- uint32_t isys_stream_id);
+ enum mipi_port_id port,
+ uint32_t isys_stream_id);
enum ia_css_err ia_css_isys_convert_compressed_format(
- struct ia_css_csi2_compression *comp,
- struct input_system_cfg_s *cfg);
+ struct ia_css_csi2_compression *comp,
+ struct input_system_cfg_s *cfg);
unsigned int ia_css_csi2_calculate_input_system_alignment(
- enum atomisp_input_format fmt_type);
+ enum atomisp_input_format fmt_type);
#endif
#if !defined(USE_INPUT_SYSTEM_VERSION_2401)
/* CSS Receiver */
void ia_css_isys_rx_configure(
- const rx_cfg_t *config,
- const enum ia_css_input_mode input_mode);
+ const rx_cfg_t *config,
+ const enum ia_css_input_mode input_mode);
void ia_css_isys_rx_disable(void);
* format type must be sumitted correctly by the application.
*/
enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
- enum atomisp_input_format input_format,
- mipi_predictor_t compression,
- unsigned int *fmt_type);
+ enum atomisp_input_format input_format,
+ mipi_predictor_t compression,
+ unsigned int *fmt_type);
#ifdef USE_INPUT_SYSTEM_VERSION_2401
/**
* Virtual Input System. (Input System 2401)
*/
ia_css_isys_error_t ia_css_isys_stream_create(
- ia_css_isys_descr_t *isys_stream_descr,
- ia_css_isys_stream_h isys_stream,
- uint32_t isys_stream_id);
+ ia_css_isys_descr_t *isys_stream_descr,
+ ia_css_isys_stream_h isys_stream,
+ uint32_t isys_stream_id);
void ia_css_isys_stream_destroy(
- ia_css_isys_stream_h isys_stream);
+ ia_css_isys_stream_h isys_stream);
ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
- ia_css_isys_stream_h isys_stream,
- ia_css_isys_descr_t *isys_stream_descr,
- ia_css_isys_stream_cfg_t *isys_stream_cfg);
+ ia_css_isys_stream_h isys_stream,
+ ia_css_isys_descr_t *isys_stream_descr,
+ ia_css_isys_stream_cfg_t *isys_stream_cfg);
void ia_css_isys_csi_rx_lut_rmgr_init(void);
void ia_css_isys_csi_rx_lut_rmgr_uninit(void);
bool ia_css_isys_csi_rx_lut_rmgr_acquire(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry);
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry);
void ia_css_isys_csi_rx_lut_rmgr_release(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry);
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry);
void ia_css_isys_ibuf_rmgr_init(void);
void ia_css_isys_ibuf_rmgr_uninit(void);
bool ia_css_isys_ibuf_rmgr_acquire(
- u32 size,
- uint32_t *start_addr);
+ u32 size,
+ uint32_t *start_addr);
void ia_css_isys_ibuf_rmgr_release(
- uint32_t *start_addr);
+ uint32_t *start_addr);
void ia_css_isys_dma_channel_rmgr_init(void);
void ia_css_isys_dma_channel_rmgr_uninit(void);
bool ia_css_isys_dma_channel_rmgr_acquire(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel);
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel);
void ia_css_isys_dma_channel_rmgr_release(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel);
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel);
void ia_css_isys_stream2mmio_sid_rmgr_init(void);
void ia_css_isys_stream2mmio_sid_rmgr_uninit(void);
bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid);
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid);
void ia_css_isys_stream2mmio_sid_rmgr_release(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid);
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid);
/* end of Virtual Input System */
#endif
typedef bool ia_css_isys_error_t;
static inline uint32_t ia_css_isys_generate_stream_id(
- u32 sp_thread_id,
- uint32_t stream_id)
+ u32 sp_thread_id,
+ uint32_t stream_id)
{
return sp_thread_id * IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH + stream_id;
}
}
bool ia_css_isys_csi_rx_lut_rmgr_acquire(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry)
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry)
{
bool retval = false;
u32 max_num_packets_of_type;
u16 i;
assert(backend < N_CSI_RX_BACKEND_ID);
- assert((packet_type == CSI_MIPI_PACKET_TYPE_LONG) || (packet_type == CSI_MIPI_PACKET_TYPE_SHORT));
+ assert((packet_type == CSI_MIPI_PACKET_TYPE_LONG) ||
+ (packet_type == CSI_MIPI_PACKET_TYPE_SHORT));
assert(entry);
if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
}
void ia_css_isys_csi_rx_lut_rmgr_release(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry)
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry)
{
u32 max_num_packets;
isys_csi_rx_rsrc_t *cur_rsrc = NULL;
assert(backend < N_CSI_RX_BACKEND_ID);
assert(entry);
- assert((packet_type >= CSI_MIPI_PACKET_TYPE_LONG) || (packet_type <= CSI_MIPI_PACKET_TYPE_SHORT));
+ assert((packet_type >= CSI_MIPI_PACKET_TYPE_LONG) ||
+ (packet_type <= CSI_MIPI_PACKET_TYPE_SHORT));
if ((backend < N_CSI_RX_BACKEND_ID) && (entry)) {
if (packet_type == CSI_MIPI_PACKET_TYPE_LONG) {
}
enum ia_css_err ia_css_isys_csi_rx_register_stream(
- enum mipi_port_id port,
- uint32_t isys_stream_id)
+ enum mipi_port_id port,
+ uint32_t isys_stream_id)
{
enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
}
enum ia_css_err ia_css_isys_csi_rx_unregister_stream(
- enum mipi_port_id port,
- uint32_t isys_stream_id)
+ enum mipi_port_id port,
+ uint32_t isys_stream_id)
{
enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
}
bool ia_css_isys_ibuf_rmgr_acquire(
- u32 size,
- uint32_t *start_addr)
+ u32 size,
+ uint32_t *start_addr)
{
bool retval = false;
bool input_buffer_found = false;
}
void ia_css_isys_ibuf_rmgr_release(
- uint32_t *start_addr)
+ uint32_t *start_addr)
{
u16 i;
ibuf_handle_t *handle = NULL;
}
bool ia_css_isys_dma_channel_rmgr_acquire(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel)
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel)
{
bool retval = false;
isys2401_dma_channel i;
}
void ia_css_isys_dma_channel_rmgr_release(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel)
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel)
{
isys2401_dma_channel max_dma_channel;
isys_dma_rsrc_t *cur_rsrc = NULL;
return error;
error = input_system_csi_xmem_channel_cfg(
- 0, /*ch_id */
- INPUT_SYSTEM_PORT_A, /*port */
- backend_ch0, /*backend_ch */
- 32, /*mem_region_size */
- 6, /*nof_mem_regions */
- acq_mem_region_size, /*acq_mem_region_size */
- acq_nof_mem_regions, /*acq_nof_mem_regions */
- targetB, /*target */
- 3); /*nof_xmem_buffers */
+ 0, /*ch_id */
+ INPUT_SYSTEM_PORT_A, /*port */
+ backend_ch0, /*backend_ch */
+ 32, /*mem_region_size */
+ 6, /*nof_mem_regions */
+ acq_mem_region_size, /*acq_mem_region_size */
+ acq_nof_mem_regions, /*acq_nof_mem_regions */
+ targetB, /*target */
+ 3); /*nof_xmem_buffers */
if (error != INPUT_SYSTEM_ERR_NO_ERROR)
return error;
error = input_system_csi_xmem_channel_cfg(
- 1, /*ch_id */
- INPUT_SYSTEM_PORT_B, /*port */
- backend_ch0, /*backend_ch */
- 16, /*mem_region_size */
- 3, /*nof_mem_regions */
- acq_mem_region_size, /*acq_mem_region_size */
- acq_nof_mem_regions, /*acq_nof_mem_regions */
- targetB, /*target */
- 3); /*nof_xmem_buffers */
+ 1, /*ch_id */
+ INPUT_SYSTEM_PORT_B, /*port */
+ backend_ch0, /*backend_ch */
+ 16, /*mem_region_size */
+ 3, /*nof_mem_regions */
+ acq_mem_region_size, /*acq_mem_region_size */
+ acq_nof_mem_regions, /*acq_nof_mem_regions */
+ targetB, /*target */
+ 3); /*nof_xmem_buffers */
if (error != INPUT_SYSTEM_ERR_NO_ERROR)
return error;
error = input_system_csi_xmem_channel_cfg(
- 2, /*ch_id */
- INPUT_SYSTEM_PORT_C, /*port */
- backend_ch1, /*backend_ch */
- 32, /*mem_region_size */
- 3, /*nof_mem_regions */
- acq_mem_region_size, /*acq_mem_region_size */
- acq_nof_mem_regions, /*acq_nof_mem_regions */
- targetC, /*target */
- 2); /*nof_xmem_buffers */
+ 2, /*ch_id */
+ INPUT_SYSTEM_PORT_C, /*port */
+ backend_ch1, /*backend_ch */
+ 32, /*mem_region_size */
+ 3, /*nof_mem_regions */
+ acq_mem_region_size, /*acq_mem_region_size */
+ acq_nof_mem_regions, /*acq_nof_mem_regions */
+ targetC, /*target */
+ 2); /*nof_xmem_buffers */
if (error != INPUT_SYSTEM_ERR_NO_ERROR)
return error;
ia_css_isys_stream2mmio_sid_rmgr_init();
isys2401_dma_set_max_burst_size(ISYS2401_DMA0_ID,
- 1 /* Non Burst DMA transactions */);
+ 1 /* Non Burst DMA transactions */);
/* Enable 2401 input system IRQ status for driver to retrieve */
isys_irqc_status_enable(ISYS_IRQ0_ID);
}
bool ia_css_isys_stream2mmio_sid_rmgr_acquire(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid)
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid)
{
bool retval = false;
stream2mmio_sid_ID_t max_sid;
}
void ia_css_isys_stream2mmio_sid_rmgr_release(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid)
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid)
{
stream2mmio_sid_ID_t max_sid;
isys_stream2mmio_rsrc_t *cur_rsrc = NULL;
void ia_css_isys_rx_enable_all_interrupts(enum mipi_port_id port)
{
hrt_data bits = receiver_port_reg_load(RX0_ID,
- port,
- _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+ port,
+ _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
bits |= (1U << _HRT_CSS_RECEIVER_IRQ_OVERRUN_BIT) |
#if defined(HAS_RX_VERSION_2)
- (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_INIT_TIMEOUT_BIT) |
#endif
- (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_HS_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_CORRECTED_BIT) |
- /*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT) | */
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_DATA_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_DATA_TIMEOUT_BIT) |
- (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ESCAPE_BIT);
+ (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_ENTRY_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_SLEEP_MODE_EXIT_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_HS_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_SOT_SYNC_HS_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CONTROL_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_DOUBLE_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_CORRECTED_BIT) |
+ /*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_ECC_NO_CORRECTION_BIT) | */
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_CRC_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ID_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_SYNC_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_FRAME_DATA_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_DATA_TIMEOUT_BIT) |
+ (1U << _HRT_CSS_RECEIVER_IRQ_ERR_ESCAPE_BIT);
/*(1U << _HRT_CSS_RECEIVER_IRQ_ERR_LINE_SYNC_BIT); */
receiver_port_reg_store(RX0_ID,
ia_css_rx_port_clear_irq_info(MIPI_PORT1_ID, irq_infos);
}
-void ia_css_rx_port_clear_irq_info(enum mipi_port_id api_port, unsigned int irq_infos)
+void ia_css_rx_port_clear_irq_info(enum mipi_port_id api_port,
+ unsigned int irq_infos)
{
enum mipi_port_id port = ia_css_isys_port_to_mipi_port(api_port);
ia_css_isys_rx_clear_irq_info(port, irq_infos);
}
-void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port, unsigned int irq_infos)
+void ia_css_isys_rx_clear_irq_info(enum mipi_port_id port,
+ unsigned int irq_infos)
{
hrt_data bits = receiver_port_reg_load(RX0_ID,
- port,
- _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
+ port,
+ _HRT_CSS_RECEIVER_IRQ_ENABLE_REG_IDX);
/* MW: Why do we remap the receiver bitmap */
if (irq_infos & IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN)
#endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */
enum ia_css_err ia_css_isys_convert_stream_format_to_mipi_format(
- enum atomisp_input_format input_format,
- mipi_predictor_t compression,
- unsigned int *fmt_type)
+ enum atomisp_input_format input_format,
+ mipi_predictor_t compression,
+ unsigned int *fmt_type)
{
assert(fmt_type);
/*
}
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
-static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(enum ia_css_csi2_compression_type type)
+static mipi_predictor_t sh_css_csi2_compression_type_2_mipi_predictor(
+ enum ia_css_csi2_compression_type type)
{
mipi_predictor_t predictor = MIPI_PREDICTOR_NONE;
}
enum ia_css_err ia_css_isys_convert_compressed_format(
- struct ia_css_csi2_compression *comp,
- struct input_system_cfg_s *cfg)
+ struct ia_css_csi2_compression *comp,
+ struct input_system_cfg_s *cfg)
{
enum ia_css_err err = IA_CSS_SUCCESS;
default:
err = IA_CSS_ERR_INVALID_ARGUMENTS;
}
- } else if (comp->uncompressed_bits_per_pixel == UNCOMPRESSED_BITS_PER_PIXEL_12) {
+ } else if (comp->uncompressed_bits_per_pixel ==
+ UNCOMPRESSED_BITS_PER_PIXEL_12) {
switch (comp->compressed_bits_per_pixel) {
case COMPRESSED_BITS_PER_PIXEL_6:
cfg->csi_port_attr.comp_scheme = MIPI_COMPRESSOR_12_6_12;
}
} else
err = IA_CSS_ERR_INVALID_ARGUMENTS;
- cfg->csi_port_attr.comp_predictor = sh_css_csi2_compression_type_2_mipi_predictor(comp->type);
+ cfg->csi_port_attr.comp_predictor =
+ sh_css_csi2_compression_type_2_mipi_predictor(comp->type);
cfg->csi_port_attr.comp_enable = true;
} else /* No compression */
cfg->csi_port_attr.comp_enable = false;
}
unsigned int ia_css_csi2_calculate_input_system_alignment(
- enum atomisp_input_format fmt_type)
+ enum atomisp_input_format fmt_type)
{
unsigned int memory_alignment_in_bytes = HIVE_ISP_DDR_WORD_BYTES;
enum mipi_port_id port;
if ((!config)
- || (config->mode >= N_RX_MODE)
- || (config->port >= N_MIPI_PORT_ID)) {
+ || (config->mode >= N_RX_MODE)
+ || (config->port >= N_MIPI_PORT_ID)) {
assert(0);
return;
}
/* AM: Check whether this is a problem with multiple streams. */
if (MIPI_PORT_LANES[config->mode][port] != MIPI_0LANE_CFG) {
receiver_port_reg_store(RX0_ID, port,
- _HRT_CSS_RECEIVER_FUNC_PROG_REG_IDX,
- config->timeout);
+ _HRT_CSS_RECEIVER_FUNC_PROG_REG_IDX,
+ config->timeout);
receiver_port_reg_store(RX0_ID, port,
- _HRT_CSS_RECEIVER_2400_INIT_COUNT_REG_IDX,
- config->initcount);
+ _HRT_CSS_RECEIVER_2400_INIT_COUNT_REG_IDX,
+ config->initcount);
receiver_port_reg_store(RX0_ID, port,
- _HRT_CSS_RECEIVER_2400_SYNC_COUNT_REG_IDX,
- config->synccount);
+ _HRT_CSS_RECEIVER_2400_SYNC_COUNT_REG_IDX,
+ config->synccount);
receiver_port_reg_store(RX0_ID, port,
- _HRT_CSS_RECEIVER_2400_RX_COUNT_REG_IDX,
- config->rxcount);
+ _HRT_CSS_RECEIVER_2400_RX_COUNT_REG_IDX,
+ config->rxcount);
port_enabled[port] = true;
/* MW: A bit of a hack, straight wiring of the capture
* units,assuming they are linearly enumerated. */
input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_A_IDX
- + (unsigned int)port,
- INPUT_SYSTEM_CSI_BACKEND);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_A_IDX
+ + (unsigned int)port,
+ INPUT_SYSTEM_CSI_BACKEND);
/* MW: Like the integration test example we overwite,
* the GPREG_MUX register */
input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MUX_IDX,
- (input_system_multiplex_t)port);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MUX_IDX,
+ (input_system_multiplex_t)port);
} else {
/*
* AM: A bit of a hack, wiring the input system.
*/
input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MULTICAST_A_IDX
- + (unsigned int)port,
- INPUT_SYSTEM_INPUT_BUFFER);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MULTICAST_A_IDX
+ + (unsigned int)port,
+ INPUT_SYSTEM_INPUT_BUFFER);
input_system_sub_system_reg_store(INPUT_SYSTEM0_ID,
- GPREGS_UNIT0_ID,
- HIVE_ISYS_GPREG_MUX_IDX,
- INPUT_SYSTEM_ACQUISITION_UNIT);
+ GPREGS_UNIT0_ID,
+ HIVE_ISYS_GPREG_MUX_IDX,
+ INPUT_SYSTEM_ACQUISITION_UNIT);
}
}
/*
#endif
static bool create_input_system_channel(
- input_system_cfg_t *cfg,
- bool metadata,
- input_system_channel_t *channel);
+ input_system_cfg_t *cfg,
+ bool metadata,
+ input_system_channel_t *channel);
static void destroy_input_system_channel(
- input_system_channel_t *channel);
+ input_system_channel_t *channel);
static bool create_input_system_input_port(
- input_system_cfg_t *cfg,
- input_system_input_port_t *input_port);
+ input_system_cfg_t *cfg,
+ input_system_input_port_t *input_port);
static void destroy_input_system_input_port(
- input_system_input_port_t *input_port);
+ input_system_input_port_t *input_port);
static bool calculate_input_system_channel_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- input_system_channel_cfg_t *channel_cfg,
- bool metadata);
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ input_system_channel_cfg_t *channel_cfg,
+ bool metadata);
static bool calculate_input_system_input_port_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- input_system_input_port_cfg_t *input_port_cfg);
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ input_system_input_port_cfg_t *input_port_cfg);
static bool acquire_sid(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid);
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid);
static void release_sid(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid);
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid);
static bool acquire_ib_buffer(
- s32 bits_per_pixel,
- s32 pixels_per_line,
- s32 lines_per_frame,
- s32 align_in_bytes,
- bool online,
- ib_buffer_t *buf);
+ s32 bits_per_pixel,
+ s32 pixels_per_line,
+ s32 lines_per_frame,
+ s32 align_in_bytes,
+ bool online,
+ ib_buffer_t *buf);
static void release_ib_buffer(
- ib_buffer_t *buf);
+ ib_buffer_t *buf);
static bool acquire_dma_channel(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel);
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel);
static void release_dma_channel(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel);
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel);
static bool acquire_be_lut_entry(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry);
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry);
static void release_be_lut_entry(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry);
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry);
static bool calculate_tpg_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- pixelgen_tpg_cfg_t *cfg);
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ pixelgen_tpg_cfg_t *cfg);
static bool calculate_prbs_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- pixelgen_prbs_cfg_t *cfg);
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ pixelgen_prbs_cfg_t *cfg);
static bool calculate_fe_cfg(
- const input_system_cfg_t *isys_cfg,
- csi_rx_frontend_cfg_t *cfg);
+ const input_system_cfg_t *isys_cfg,
+ csi_rx_frontend_cfg_t *cfg);
static bool calculate_be_cfg(
- const input_system_input_port_t *input_port,
- const input_system_cfg_t *isys_cfg,
- bool metadata,
- csi_rx_backend_cfg_t *cfg);
+ const input_system_input_port_t *input_port,
+ const input_system_cfg_t *isys_cfg,
+ bool metadata,
+ csi_rx_backend_cfg_t *cfg);
static bool calculate_stream2mmio_cfg(
- const input_system_cfg_t *isys_cfg,
- bool metadata,
- stream2mmio_cfg_t *cfg);
+ const input_system_cfg_t *isys_cfg,
+ bool metadata,
+ stream2mmio_cfg_t *cfg);
static bool calculate_ibuf_ctrl_cfg(
- const input_system_channel_t *channel,
- const input_system_input_port_t *input_port,
- const input_system_cfg_t *isys_cfg,
- ibuf_ctrl_cfg_t *cfg);
+ const input_system_channel_t *channel,
+ const input_system_input_port_t *input_port,
+ const input_system_cfg_t *isys_cfg,
+ ibuf_ctrl_cfg_t *cfg);
static bool calculate_isys2401_dma_cfg(
- const input_system_channel_t *channel,
- const input_system_cfg_t *isys_cfg,
- isys2401_dma_cfg_t *cfg);
+ const input_system_channel_t *channel,
+ const input_system_cfg_t *isys_cfg,
+ isys2401_dma_cfg_t *cfg);
static bool calculate_isys2401_dma_port_cfg(
- const input_system_cfg_t *isys_cfg,
- bool raw_packed,
- bool metadata,
- isys2401_dma_port_cfg_t *cfg);
+ const input_system_cfg_t *isys_cfg,
+ bool raw_packed,
+ bool metadata,
+ isys2401_dma_port_cfg_t *cfg);
static csi_mipi_packet_type_t get_csi_mipi_packet_type(
- int32_t data_type);
+ int32_t data_type);
static int32_t calculate_stride(
- s32 bits_per_pixel,
- s32 pixels_per_line,
- bool raw_packed,
- int32_t align_in_bytes);
+ s32 bits_per_pixel,
+ s32 pixels_per_line,
+ bool raw_packed,
+ int32_t align_in_bytes);
/* end of Forwarded Declaration */
*
**************************************************/
ia_css_isys_error_t ia_css_isys_stream_create(
- ia_css_isys_descr_t *isys_stream_descr,
- ia_css_isys_stream_h isys_stream,
- uint32_t isys_stream_id)
+ ia_css_isys_descr_t *isys_stream_descr,
+ ia_css_isys_stream_h isys_stream,
+ uint32_t isys_stream_id)
{
ia_css_isys_error_t rc;
if (!isys_stream_descr || !isys_stream ||
- isys_stream_id >= SH_CSS_MAX_ISYS_CHANNEL_NODES)
+ isys_stream_id >= SH_CSS_MAX_ISYS_CHANNEL_NODES)
return false;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_isys_stream_create() enter:\n");
+ "ia_css_isys_stream_create() enter:\n");
/*Reset isys_stream to 0*/
memset(isys_stream, 0, sizeof(*isys_stream));
isys_stream->id = isys_stream_id;
isys_stream->linked_isys_stream_id = isys_stream_descr->linked_isys_stream_id;
- rc = create_input_system_input_port(isys_stream_descr, &isys_stream->input_port);
+ rc = create_input_system_input_port(isys_stream_descr,
+ &isys_stream->input_port);
if (rc == false)
return false;
- rc = create_input_system_channel(isys_stream_descr, false, &isys_stream->channel);
+ rc = create_input_system_channel(isys_stream_descr, false,
+ &isys_stream->channel);
if (rc == false) {
destroy_input_system_input_port(&isys_stream->input_port);
return false;
#endif
/* create metadata channel */
if (isys_stream_descr->metadata.enable) {
- rc = create_input_system_channel(isys_stream_descr, true, &isys_stream->md_channel);
+ rc = create_input_system_channel(isys_stream_descr, true,
+ &isys_stream->md_channel);
if (rc == false) {
destroy_input_system_input_port(&isys_stream->input_port);
destroy_input_system_channel(&isys_stream->channel);
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_isys_stream_create() leave:\n");
+ "ia_css_isys_stream_create() leave:\n");
return true;
}
void ia_css_isys_stream_destroy(
- ia_css_isys_stream_h isys_stream)
+ ia_css_isys_stream_h isys_stream)
{
destroy_input_system_input_port(&isys_stream->input_port);
destroy_input_system_channel(&isys_stream->channel);
}
ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
- ia_css_isys_stream_h isys_stream,
- ia_css_isys_descr_t *isys_stream_descr,
- ia_css_isys_stream_cfg_t *isys_stream_cfg)
+ ia_css_isys_stream_h isys_stream,
+ ia_css_isys_descr_t *isys_stream_descr,
+ ia_css_isys_stream_cfg_t *isys_stream_cfg)
{
ia_css_isys_error_t rc;
if (!isys_stream_cfg ||
- !isys_stream_descr ||
- !isys_stream)
+ !isys_stream_descr ||
+ !isys_stream)
return false;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_isys_stream_calculate_cfg() enter:\n");
+ "ia_css_isys_stream_calculate_cfg() enter:\n");
rc = calculate_input_system_channel_cfg(
- &isys_stream->channel,
- &isys_stream->input_port,
- isys_stream_descr,
- &isys_stream_cfg->channel_cfg,
- false);
+ &isys_stream->channel,
+ &isys_stream->input_port,
+ isys_stream_descr,
+ &isys_stream_cfg->channel_cfg,
+ false);
if (rc == false)
return false;
if (isys_stream_descr->metadata.enable) {
isys_stream_cfg->enable_metadata = true;
rc = calculate_input_system_channel_cfg(
- &isys_stream->md_channel,
- &isys_stream->input_port,
- isys_stream_descr,
- &isys_stream_cfg->md_channel_cfg,
- true);
+ &isys_stream->md_channel,
+ &isys_stream->input_port,
+ isys_stream_descr,
+ &isys_stream_cfg->md_channel_cfg,
+ true);
if (rc == false)
return false;
}
rc = calculate_input_system_input_port_cfg(
- &isys_stream->channel,
- &isys_stream->input_port,
- isys_stream_descr,
- &isys_stream_cfg->input_port_cfg);
+ &isys_stream->channel,
+ &isys_stream->input_port,
+ isys_stream_descr,
+ &isys_stream_cfg->input_port_cfg);
if (rc == false)
return false;
isys_stream->valid = 1;
isys_stream_cfg->valid = 1;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_isys_stream_calculate_cfg() leave:\n");
+ "ia_css_isys_stream_calculate_cfg() leave:\n");
return rc;
}
*
**************************************************/
static bool create_input_system_channel(
- input_system_cfg_t *cfg,
- bool metadata,
- input_system_channel_t *me)
+ input_system_cfg_t *cfg,
+ bool metadata,
+ input_system_channel_t *me)
{
bool rc = true;
}
if (!acquire_ib_buffer(
- metadata ? cfg->metadata.bits_per_pixel : cfg->input_port_resolution.bits_per_pixel,
- metadata ? cfg->metadata.pixels_per_line : cfg->input_port_resolution.pixels_per_line,
- metadata ? cfg->metadata.lines_per_frame : cfg->input_port_resolution.lines_per_frame,
- metadata ? cfg->metadata.align_req_in_bytes : cfg->input_port_resolution.align_req_in_bytes,
- cfg->online,
- &me->ib_buffer)) {
+ metadata ? cfg->metadata.bits_per_pixel :
+ cfg->input_port_resolution.bits_per_pixel,
+ metadata ? cfg->metadata.pixels_per_line :
+ cfg->input_port_resolution.pixels_per_line,
+ metadata ? cfg->metadata.lines_per_frame :
+ cfg->input_port_resolution.lines_per_frame,
+ metadata ? cfg->metadata.align_req_in_bytes :
+ cfg->input_port_resolution.align_req_in_bytes,
+ cfg->online,
+ &me->ib_buffer)) {
release_sid(me->stream2mmio_id, &me->stream2mmio_sid_id);
return false;
}
}
static void destroy_input_system_channel(
- input_system_channel_t *me)
+ input_system_channel_t *me)
{
release_sid(me->stream2mmio_id,
- &me->stream2mmio_sid_id);
+ &me->stream2mmio_sid_id);
release_ib_buffer(&me->ib_buffer);
}
static bool create_input_system_input_port(
- input_system_cfg_t *cfg,
- input_system_input_port_t *me)
+ input_system_cfg_t *cfg,
+ input_system_input_port_t *me)
{
csi_mipi_packet_type_t packet_type;
bool rc = true;
me->csi_rx.packet_type = packet_type;
rc = acquire_be_lut_entry(
- me->csi_rx.backend_id,
- packet_type,
- &me->csi_rx.backend_lut_entry);
+ me->csi_rx.backend_id,
+ packet_type,
+ &me->csi_rx.backend_lut_entry);
break;
case INPUT_SYSTEM_PIXELGEN_PORT0_ID:
me->pixelgen.pixelgen_id = PIXELGEN0_ID;
me->csi_rx.packet_type = packet_type;
rc = acquire_be_lut_entry(
- me->csi_rx.backend_id,
- packet_type,
- &me->csi_rx.backend_lut_entry);
+ me->csi_rx.backend_id,
+ packet_type,
+ &me->csi_rx.backend_lut_entry);
break;
case INPUT_SYSTEM_PIXELGEN_PORT1_ID:
me->pixelgen.pixelgen_id = PIXELGEN1_ID;
me->csi_rx.packet_type = packet_type;
rc = acquire_be_lut_entry(
- me->csi_rx.backend_id,
- packet_type,
- &me->csi_rx.backend_lut_entry);
+ me->csi_rx.backend_id,
+ packet_type,
+ &me->csi_rx.backend_lut_entry);
break;
case INPUT_SYSTEM_PIXELGEN_PORT2_ID:
me->pixelgen.pixelgen_id = PIXELGEN2_ID;
me->metadata.packet_type = CSI_MIPI_PACKET_TYPE_UNDEFINED;
if (rc && cfg->metadata.enable) {
me->metadata.packet_type = get_csi_mipi_packet_type(
- cfg->metadata.fmt_type);
+ cfg->metadata.fmt_type);
rc = acquire_be_lut_entry(
- me->csi_rx.backend_id,
- me->metadata.packet_type,
- &me->metadata.backend_lut_entry);
+ me->csi_rx.backend_id,
+ me->metadata.packet_type,
+ &me->metadata.backend_lut_entry);
}
return rc;
}
static void destroy_input_system_input_port(
- input_system_input_port_t *me)
+ input_system_input_port_t *me)
{
if (me->source_type == INPUT_SYSTEM_SOURCE_TYPE_SENSOR) {
release_be_lut_entry(
- me->csi_rx.backend_id,
- me->csi_rx.packet_type,
- &me->csi_rx.backend_lut_entry);
+ me->csi_rx.backend_id,
+ me->csi_rx.packet_type,
+ &me->csi_rx.backend_lut_entry);
}
if (me->metadata.packet_type != CSI_MIPI_PACKET_TYPE_UNDEFINED) {
/*Free the backend lut allocated for metadata*/
release_be_lut_entry(
- me->csi_rx.backend_id,
- me->metadata.packet_type,
- &me->metadata.backend_lut_entry);
+ me->csi_rx.backend_id,
+ me->metadata.packet_type,
+ &me->metadata.backend_lut_entry);
}
}
static bool calculate_input_system_channel_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- input_system_channel_cfg_t *channel_cfg,
- bool metadata)
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ input_system_channel_cfg_t *channel_cfg,
+ bool metadata)
{
bool rc;
rc = calculate_stream2mmio_cfg(isys_cfg, metadata,
- &channel_cfg->stream2mmio_cfg);
+ &channel_cfg->stream2mmio_cfg);
if (!rc)
return false;
rc = calculate_ibuf_ctrl_cfg(
- channel,
- input_port,
- isys_cfg,
- &channel_cfg->ibuf_ctrl_cfg);
+ channel,
+ input_port,
+ isys_cfg,
+ &channel_cfg->ibuf_ctrl_cfg);
if (!rc)
return false;
if (metadata)
- channel_cfg->ibuf_ctrl_cfg.stores_per_frame = isys_cfg->metadata.lines_per_frame;
+ channel_cfg->ibuf_ctrl_cfg.stores_per_frame =
+ isys_cfg->metadata.lines_per_frame;
rc = calculate_isys2401_dma_cfg(
- channel,
- isys_cfg,
- &channel_cfg->dma_cfg);
+ channel,
+ isys_cfg,
+ &channel_cfg->dma_cfg);
if (!rc)
return false;
rc = calculate_isys2401_dma_port_cfg(
- isys_cfg,
- false,
- metadata,
- &channel_cfg->dma_src_port_cfg);
+ isys_cfg,
+ false,
+ metadata,
+ &channel_cfg->dma_src_port_cfg);
if (!rc)
return false;
rc = calculate_isys2401_dma_port_cfg(
- isys_cfg,
- isys_cfg->raw_packed,
- metadata,
- &channel_cfg->dma_dest_port_cfg);
+ isys_cfg,
+ isys_cfg->raw_packed,
+ metadata,
+ &channel_cfg->dma_dest_port_cfg);
if (!rc)
return false;
}
static bool calculate_input_system_input_port_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- input_system_input_port_cfg_t *input_port_cfg)
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ input_system_input_port_cfg_t *input_port_cfg)
{
bool rc;
switch (input_port->source_type) {
case INPUT_SYSTEM_SOURCE_TYPE_SENSOR:
rc = calculate_fe_cfg(
- isys_cfg,
- &input_port_cfg->csi_rx_cfg.frontend_cfg);
+ isys_cfg,
+ &input_port_cfg->csi_rx_cfg.frontend_cfg);
rc &= calculate_be_cfg(
- input_port,
- isys_cfg,
- false,
- &input_port_cfg->csi_rx_cfg.backend_cfg);
+ input_port,
+ isys_cfg,
+ false,
+ &input_port_cfg->csi_rx_cfg.backend_cfg);
if (rc && isys_cfg->metadata.enable)
rc &= calculate_be_cfg(input_port, isys_cfg, true,
- &input_port_cfg->csi_rx_cfg.md_backend_cfg);
+ &input_port_cfg->csi_rx_cfg.md_backend_cfg);
break;
case INPUT_SYSTEM_SOURCE_TYPE_TPG:
rc = calculate_tpg_cfg(
- channel,
- input_port,
- isys_cfg,
- &input_port_cfg->pixelgen_cfg.tpg_cfg);
+ channel,
+ input_port,
+ isys_cfg,
+ &input_port_cfg->pixelgen_cfg.tpg_cfg);
break;
case INPUT_SYSTEM_SOURCE_TYPE_PRBS:
rc = calculate_prbs_cfg(
- channel,
- input_port,
- isys_cfg,
- &input_port_cfg->pixelgen_cfg.prbs_cfg);
+ channel,
+ input_port,
+ isys_cfg,
+ &input_port_cfg->pixelgen_cfg.prbs_cfg);
break;
default:
rc = false;
}
static bool acquire_sid(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid)
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid)
{
return ia_css_isys_stream2mmio_sid_rmgr_acquire(stream2mmio, sid);
}
static void release_sid(
- stream2mmio_ID_t stream2mmio,
- stream2mmio_sid_ID_t *sid)
+ stream2mmio_ID_t stream2mmio,
+ stream2mmio_sid_ID_t *sid)
{
ia_css_isys_stream2mmio_sid_rmgr_release(stream2mmio, sid);
}
/* See also: ia_css_dma_configure_from_info() */
static int32_t calculate_stride(
- s32 bits_per_pixel,
- s32 pixels_per_line,
- bool raw_packed,
- int32_t align_in_bytes)
+ s32 bits_per_pixel,
+ s32 pixels_per_line,
+ bool raw_packed,
+ int32_t align_in_bytes)
{
s32 bytes_per_line;
s32 pixels_per_word;
}
static bool acquire_ib_buffer(
- s32 bits_per_pixel,
- s32 pixels_per_line,
- s32 lines_per_frame,
- s32 align_in_bytes,
- bool online,
- ib_buffer_t *buf)
+ s32 bits_per_pixel,
+ s32 pixels_per_line,
+ s32 lines_per_frame,
+ s32 align_in_bytes,
+ bool online,
+ ib_buffer_t *buf)
{
- buf->stride = calculate_stride(bits_per_pixel, pixels_per_line, false, align_in_bytes);
+ buf->stride = calculate_stride(bits_per_pixel, pixels_per_line, false,
+ align_in_bytes);
if (online)
buf->lines = 4; /* use double buffering for online usecases */
else
buf->lines = 2;
(void)(lines_per_frame);
- return ia_css_isys_ibuf_rmgr_acquire(buf->stride * buf->lines, &buf->start_addr);
+ return ia_css_isys_ibuf_rmgr_acquire(buf->stride * buf->lines,
+ &buf->start_addr);
}
static void release_ib_buffer(
- ib_buffer_t *buf)
+ ib_buffer_t *buf)
{
ia_css_isys_ibuf_rmgr_release(&buf->start_addr);
}
static bool acquire_dma_channel(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel)
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel)
{
return ia_css_isys_dma_channel_rmgr_acquire(dma_id, channel);
}
static void release_dma_channel(
- isys2401_dma_ID_t dma_id,
- isys2401_dma_channel *channel)
+ isys2401_dma_ID_t dma_id,
+ isys2401_dma_channel *channel)
{
ia_css_isys_dma_channel_rmgr_release(dma_id, channel);
}
static bool acquire_be_lut_entry(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry)
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry)
{
return ia_css_isys_csi_rx_lut_rmgr_acquire(backend, packet_type, entry);
}
static void release_be_lut_entry(
- csi_rx_backend_ID_t backend,
- csi_mipi_packet_type_t packet_type,
- csi_rx_backend_lut_entry_t *entry)
+ csi_rx_backend_ID_t backend,
+ csi_mipi_packet_type_t packet_type,
+ csi_rx_backend_lut_entry_t *entry)
{
ia_css_isys_csi_rx_lut_rmgr_release(backend, packet_type, entry);
}
static bool calculate_tpg_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- pixelgen_tpg_cfg_t *cfg)
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ pixelgen_tpg_cfg_t *cfg)
{
(void)channel;
(void)input_port;
memcpy_s(
- (void *)cfg,
- sizeof(pixelgen_tpg_cfg_t),
- (void *)(&isys_cfg->tpg_port_attr),
- sizeof(pixelgen_tpg_cfg_t));
+ (void *)cfg,
+ sizeof(pixelgen_tpg_cfg_t),
+ (void *)(&isys_cfg->tpg_port_attr),
+ sizeof(pixelgen_tpg_cfg_t));
return true;
}
static bool calculate_prbs_cfg(
- input_system_channel_t *channel,
- input_system_input_port_t *input_port,
- input_system_cfg_t *isys_cfg,
- pixelgen_prbs_cfg_t *cfg)
+ input_system_channel_t *channel,
+ input_system_input_port_t *input_port,
+ input_system_cfg_t *isys_cfg,
+ pixelgen_prbs_cfg_t *cfg)
{
(void)channel;
(void)input_port;
memcpy_s(
- (void *)cfg,
- sizeof(pixelgen_prbs_cfg_t),
- (void *)(&isys_cfg->prbs_port_attr),
- sizeof(pixelgen_prbs_cfg_t));
+ (void *)cfg,
+ sizeof(pixelgen_prbs_cfg_t),
+ (void *)(&isys_cfg->prbs_port_attr),
+ sizeof(pixelgen_prbs_cfg_t));
return true;
}
static bool calculate_fe_cfg(
- const input_system_cfg_t *isys_cfg,
- csi_rx_frontend_cfg_t *cfg)
+ const input_system_cfg_t *isys_cfg,
+ csi_rx_frontend_cfg_t *cfg)
{
cfg->active_lanes = isys_cfg->csi_port_attr.active_lanes;
return true;
}
static bool calculate_be_cfg(
- const input_system_input_port_t *input_port,
- const input_system_cfg_t *isys_cfg,
- bool metadata,
- csi_rx_backend_cfg_t *cfg)
+ const input_system_input_port_t *input_port,
+ const input_system_cfg_t *isys_cfg,
+ bool metadata,
+ csi_rx_backend_cfg_t *cfg)
{
memcpy_s(
- (void *)(&cfg->lut_entry),
- sizeof(csi_rx_backend_lut_entry_t),
- metadata ? (void *)(&input_port->metadata.backend_lut_entry) :
- (void *)(&input_port->csi_rx.backend_lut_entry),
- sizeof(csi_rx_backend_lut_entry_t));
+ (void *)(&cfg->lut_entry),
+ sizeof(csi_rx_backend_lut_entry_t),
+ metadata ? (void *)(&input_port->metadata.backend_lut_entry) :
+ (void *)(&input_port->csi_rx.backend_lut_entry),
+ sizeof(csi_rx_backend_lut_entry_t));
cfg->csi_mipi_cfg.virtual_channel = isys_cfg->csi_port_attr.ch_id;
if (metadata) {
- cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(isys_cfg->metadata.fmt_type);
+ cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(
+ isys_cfg->metadata.fmt_type);
cfg->csi_mipi_cfg.comp_enable = false;
cfg->csi_mipi_cfg.data_type = isys_cfg->metadata.fmt_type;
} else {
- cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(isys_cfg->csi_port_attr.fmt_type);
+ cfg->csi_mipi_packet_type = get_csi_mipi_packet_type(
+ isys_cfg->csi_port_attr.fmt_type);
cfg->csi_mipi_cfg.data_type = isys_cfg->csi_port_attr.fmt_type;
cfg->csi_mipi_cfg.comp_enable = isys_cfg->csi_port_attr.comp_enable;
cfg->csi_mipi_cfg.comp_scheme = isys_cfg->csi_port_attr.comp_scheme;
cfg->csi_mipi_cfg.comp_predictor = isys_cfg->csi_port_attr.comp_predictor;
- cfg->csi_mipi_cfg.comp_bit_idx = cfg->csi_mipi_cfg.data_type - MIPI_FORMAT_CUSTOM0;
+ cfg->csi_mipi_cfg.comp_bit_idx = cfg->csi_mipi_cfg.data_type -
+ MIPI_FORMAT_CUSTOM0;
}
return true;
}
static bool calculate_stream2mmio_cfg(
- const input_system_cfg_t *isys_cfg,
- bool metadata,
- stream2mmio_cfg_t *cfg
+ const input_system_cfg_t *isys_cfg,
+ bool metadata,
+ stream2mmio_cfg_t *cfg
)
{
cfg->bits_per_pixel = metadata ? isys_cfg->metadata.bits_per_pixel :
- isys_cfg->input_port_resolution.bits_per_pixel;
+ isys_cfg->input_port_resolution.bits_per_pixel;
cfg->enable_blocking =
- ((isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_TPG) ||
- (isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_PRBS));
+ ((isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_TPG) ||
+ (isys_cfg->mode == INPUT_SYSTEM_SOURCE_TYPE_PRBS));
return true;
}
static bool calculate_ibuf_ctrl_cfg(
- const input_system_channel_t *channel,
- const input_system_input_port_t *input_port,
- const input_system_cfg_t *isys_cfg,
- ibuf_ctrl_cfg_t *cfg)
+ const input_system_channel_t *channel,
+ const input_system_input_port_t *input_port,
+ const input_system_cfg_t *isys_cfg,
+ ibuf_ctrl_cfg_t *cfg)
{
const s32 bits_per_byte = 8;
s32 bits_per_pixel;
bytes_per_pixel = ceil_div(bits_per_pixel, bits_per_byte);
left_padding = CEIL_MUL(isys_cfg->output_port_attr.left_padding, ISP_VEC_NELEMS)
- * bytes_per_pixel;
+ * bytes_per_pixel;
cfg->online = isys_cfg->online;
cfg->ib_buffer.lines = channel->ib_buffer.lines;
/*
-#ifndef ISP2401
+ #ifndef ISP2401
* zhengjie.lu@intel.com:
-#endif
+ #endif
* "dest_buf_cfg" should be part of the input system output
* port configuration.
*
if (cfg->online) {
cfg->dest_buf_cfg.start_addr = ISP_INPUT_BUF_START_ADDR + left_padding;
cfg->dest_buf_cfg.stride = bytes_per_pixel
- * isys_cfg->output_port_attr.max_isp_input_width;
+ * isys_cfg->output_port_attr.max_isp_input_width;
cfg->dest_buf_cfg.lines = LINES_OF_ISP_INPUT_BUF;
} else if (isys_cfg->raw_packed) {
cfg->dest_buf_cfg.stride = calculate_stride(bits_per_pixel,
- isys_cfg->input_port_resolution.pixels_per_line,
- isys_cfg->raw_packed,
- isys_cfg->input_port_resolution.align_req_in_bytes);
+ isys_cfg->input_port_resolution.pixels_per_line,
+ isys_cfg->raw_packed,
+ isys_cfg->input_port_resolution.align_req_in_bytes);
} else {
cfg->dest_buf_cfg.stride = channel->ib_buffer.stride;
}
/*
-#ifndef ISP2401
+ #ifndef ISP2401
* zhengjie.lu@intel.com:
-#endif
+ #endif
* "items_per_store" is hard coded as "1", which is ONLY valid
* when the CSI-MIPI long packet is transferred.
*
}
static bool calculate_isys2401_dma_cfg(
- const input_system_channel_t *channel,
- const input_system_cfg_t *isys_cfg,
- isys2401_dma_cfg_t *cfg)
+ const input_system_channel_t *channel,
+ const input_system_cfg_t *isys_cfg,
+ isys2401_dma_cfg_t *cfg)
{
cfg->channel = channel->dma_channel;
/* See also: ia_css_dma_configure_from_info() */
static bool calculate_isys2401_dma_port_cfg(
- const input_system_cfg_t *isys_cfg,
- bool raw_packed,
- bool metadata,
- isys2401_dma_port_cfg_t *cfg)
+ const input_system_cfg_t *isys_cfg,
+ bool raw_packed,
+ bool metadata,
+ isys2401_dma_port_cfg_t *cfg)
{
s32 bits_per_pixel;
s32 pixels_per_line;
align_req_in_bytes = isys_cfg->input_port_resolution.align_req_in_bytes;
}
- cfg->stride = calculate_stride(bits_per_pixel, pixels_per_line, raw_packed, align_req_in_bytes);
+ cfg->stride = calculate_stride(bits_per_pixel, pixels_per_line, raw_packed,
+ align_req_in_bytes);
if (!raw_packed)
bits_per_pixel = CEIL_MUL(bits_per_pixel, 8);
}
static csi_mipi_packet_type_t get_csi_mipi_packet_type(
- int32_t data_type)
+ int32_t data_type)
{
csi_mipi_packet_type_t packet_type;
* externally and needs sane defaults
*/
enum ia_css_err ia_css_pipeline_create(
- struct ia_css_pipeline *pipeline,
- enum ia_css_pipe_id pipe_id,
- unsigned int pipe_num,
- unsigned int dvs_frame_delay);
+ struct ia_css_pipeline *pipeline,
+ enum ia_css_pipe_id pipe_id,
+ unsigned int pipe_num,
+ unsigned int dvs_frame_delay);
/* @brief destroy a pipeline
*
* arguments.
*/
enum ia_css_err ia_css_pipeline_create_and_add_stage(
- struct ia_css_pipeline *pipeline,
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_pipeline_stage **stage);
+ struct ia_css_pipeline *pipeline,
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_pipeline_stage **stage);
/* @brief Finalize the stages in a pipeline
*
* This API is expected to be called after adding all stages
*/
void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
- bool continuous);
+ bool continuous);
/* @brief gets a stage from the pipeline
*
*
*/
enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
- int mode,
- struct ia_css_pipeline_stage **stage);
+ int mode,
+ struct ia_css_pipeline_stage **stage);
/* @brief Gets a pipeline stage corresponding Firmware handle from the pipeline
*
* @return IA_CSS_SUCCESS or error code upon error.
*
*/
-enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
- u32 fw_handle,
- struct ia_css_pipeline_stage **stage);
+enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline
+ *pipeline,
+ u32 fw_handle,
+ struct ia_css_pipeline_stage **stage);
/* @brief Gets the Firmware handle corresponding the stage num from the pipeline
*
* @return IA_CSS_SUCCESS or error code upon error.
*
*/
-enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
- u32 stage_num,
- uint32_t *fw_handle);
+enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline
+ *pipeline,
+ u32 stage_num,
+ uint32_t *fw_handle);
/* @brief gets the output stage from the pipeline
*
*
*/
enum ia_css_err ia_css_pipeline_get_output_stage(
- struct ia_css_pipeline *pipeline,
- int mode,
- struct ia_css_pipeline_stage **stage);
+ struct ia_css_pipeline *pipeline,
+ int mode,
+ struct ia_css_pipeline_stage **stage);
/* @brief Checks whether the pipeline uses params
*
static void pipeline_map_num_to_sp_thread(unsigned int pipe_num);
static void pipeline_unmap_num_to_sp_thread(unsigned int pipe_num);
static void pipeline_init_defaults(
- struct ia_css_pipeline *pipeline,
- enum ia_css_pipe_id pipe_id,
- unsigned int pipe_num,
- unsigned int dvs_frame_delay);
+ struct ia_css_pipeline *pipeline,
+ enum ia_css_pipe_id pipe_id,
+ unsigned int pipe_num,
+ unsigned int dvs_frame_delay);
static void pipeline_stage_destroy(struct ia_css_pipeline_stage *stage);
static enum ia_css_err pipeline_stage_create(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_pipeline_stage **new_stage);
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_pipeline_stage **new_stage);
static void ia_css_pipeline_set_zoom_stage(struct ia_css_pipeline *pipeline);
static void ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me,
bool continuous);
}
enum ia_css_err ia_css_pipeline_create(
- struct ia_css_pipeline *pipeline,
- enum ia_css_pipe_id pipe_id,
- unsigned int pipe_num,
- unsigned int dvs_frame_delay)
+ struct ia_css_pipeline *pipeline,
+ enum ia_css_pipe_id pipe_id,
+ unsigned int pipe_num,
+ unsigned int dvs_frame_delay)
{
assert(pipeline);
IA_CSS_ENTER_PRIVATE("pipeline = %p, pipe_id = %d, pipe_num = %d, dvs_frame_delay = %d",
- pipeline, pipe_id, pipe_num, dvs_frame_delay);
+ pipeline, pipe_id, pipe_num, dvs_frame_delay);
if (!pipeline) {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
assert(pipeline);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_start() enter: pipe_id=%d, pipeline=%p\n",
- pipe_id, pipeline);
+ "ia_css_pipeline_start() enter: pipe_id=%d, pipeline=%p\n",
+ pipe_id, pipeline);
pipeline->pipe_id = pipe_id;
sh_css_sp_init_pipeline(pipeline, pipe_id, pipe_num,
false, false, false, true, SH_CSS_BDS_FACTOR_1_00,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
NULL, NULL);
#endif
ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
if (!sh_css_sp_is_running()) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_start() error,leaving\n");
+ "ia_css_pipeline_start() error,leaving\n");
/* queues are invalid*/
return;
}
0);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_start() leave: return_void\n");
+ "ia_css_pipeline_start() leave: return_void\n");
}
/*
unsigned int i;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "pipeline_num_to_sp_thread_map:\n");
+ "pipeline_num_to_sp_thread_map:\n");
for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "pipe_num: %u, tid: 0x%x\n", i, pipeline_num_to_sp_thread_map[i]);
+ "pipe_num: %u, tid: 0x%x\n", i, pipeline_num_to_sp_thread_map[i]);
}
}
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_request_stop() enter: pipeline=%p\n",
- pipeline);
+ "ia_css_pipeline_request_stop() enter: pipeline=%p\n",
+ pipeline);
pipeline->stop_requested = true;
/* Send stop event to the sp*/
/* This needs improvement, stop on all the pipes available
* in the stream*/
ia_css_pipeline_get_sp_thread_id(pipeline->pipe_num, &thread_id);
- if (!sh_css_sp_is_running())
- {
+ if (!sh_css_sp_is_running()) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_request_stop() leaving\n");
+ "ia_css_pipeline_request_stop() leaving\n");
/* queues are invalid */
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
sh_css_sp_uninit_pipeline(pipeline->pipe_num);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_request_stop() leave: return_err=%d\n",
- err);
+ "ia_css_pipeline_request_stop() leave: return_err=%d\n",
+ err);
return err;
}
pipeline_stage_destroy(s);
s = next;
}
- pipeline_init_defaults(pipeline, pipeline->pipe_id, pipeline->pipe_num, pipeline->dvs_frame_delay);
+ pipeline_init_defaults(pipeline, pipeline->pipe_id, pipeline->pipe_num,
+ pipeline->dvs_frame_delay);
IA_CSS_LEAVE_PRIVATE("void");
}
* output arguments.
*/
enum ia_css_err ia_css_pipeline_create_and_add_stage(
- struct ia_css_pipeline *pipeline,
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_pipeline_stage **stage)
+ struct ia_css_pipeline *pipeline,
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *last, *new_stage = NULL;
enum ia_css_err err;
last = pipeline->stages;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_create_and_add_stage() enter:\n");
+ "ia_css_pipeline_create_and_add_stage() enter:\n");
if (!stage_desc->binary && !stage_desc->firmware
&& (stage_desc->sp_func == IA_CSS_PIPELINE_NO_FUNC)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_create_and_add_stage() done: Invalid args\n");
+ "ia_css_pipeline_create_and_add_stage() done: Invalid args\n");
return IA_CSS_ERR_INTERNAL_ERROR;
}
* stage, if no previous stage, it's an error.
*/
if ((stage_desc->sp_func == IA_CSS_PIPELINE_NO_FUNC)
- && (!stage_desc->in_frame)
- && (!stage_desc->firmware)
- && (!stage_desc->binary->online)) {
+ && (!stage_desc->in_frame)
+ && (!stage_desc->firmware)
+ && (!stage_desc->binary->online)) {
/* Do this only for ISP stages*/
if (last && last->args.out_frame[0])
stage_desc->in_frame = last->args.out_frame[0];
err = pipeline_stage_create(stage_desc, &new_stage);
if (err != IA_CSS_SUCCESS) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_create_and_add_stage() done: stage_create_failed\n");
+ "ia_css_pipeline_create_and_add_stage() done: stage_create_failed\n");
return err;
}
*stage = new_stage;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_create_and_add_stage() done:\n");
+ "ia_css_pipeline_create_and_add_stage() done:\n");
return IA_CSS_SUCCESS;
}
void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline,
- bool continuous)
+ bool continuous)
{
unsigned int i = 0;
struct ia_css_pipeline_stage *stage;
}
enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline,
- int mode,
- struct ia_css_pipeline_stage **stage)
+ int mode,
+ struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *s;
assert(pipeline);
assert(stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_get_stage() enter:\n");
+ "ia_css_pipeline_get_stage() enter:\n");
for (s = pipeline->stages; s; s = s->next) {
if (s->mode == mode) {
*stage = s;
return IA_CSS_ERR_INTERNAL_ERROR;
}
-enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeline,
- u32 fw_handle,
- struct ia_css_pipeline_stage **stage)
+enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline
+ *pipeline,
+ u32 fw_handle,
+ struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *s;
return IA_CSS_ERR_INTERNAL_ERROR;
}
-enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeline,
- u32 stage_num,
- uint32_t *fw_handle)
+enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline
+ *pipeline,
+ u32 stage_num,
+ uint32_t *fw_handle)
{
struct ia_css_pipeline_stage *s;
}
enum ia_css_err ia_css_pipeline_get_output_stage(
- struct ia_css_pipeline *pipeline,
- int mode,
- struct ia_css_pipeline_stage **stage)
+ struct ia_css_pipeline *pipeline,
+ int mode,
+ struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *s;
assert(pipeline);
assert(stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_get_output_stage() enter:\n");
+ "ia_css_pipeline_get_output_stage() enter:\n");
*stage = NULL;
/* First find acceleration firmware at end of pipe */
return false;
}
- ret = (bool)(pipeline_num_to_sp_thread_map[key] != (unsigned int)PIPELINE_NUM_UNMAPPED);
+ ret = (bool)(pipeline_num_to_sp_thread_map[key] != (unsigned int)
+ PIPELINE_NUM_UNMAPPED);
IA_CSS_LEAVE_PRIVATE("return = %d", ret);
return ret;
/* pipe is not mapped to any thread */
assert(pipeline_num_to_sp_thread_map[pipe_num]
- == (unsigned int)PIPELINE_NUM_UNMAPPED);
+ == (unsigned int)PIPELINE_NUM_UNMAPPED);
for (i = 0; i < SH_CSS_MAX_SP_THREADS; i++) {
if (pipeline_sp_thread_list[i] ==
unsigned int thread_id;
assert(pipeline_num_to_sp_thread_map[pipe_num]
- != (unsigned int)PIPELINE_NUM_UNMAPPED);
+ != (unsigned int)PIPELINE_NUM_UNMAPPED);
thread_id = pipeline_num_to_sp_thread_map[pipe_num];
pipeline_num_to_sp_thread_map[pipe_num] = PIPELINE_NUM_UNMAPPED;
}
static enum ia_css_err pipeline_stage_create(
- struct ia_css_pipeline_stage_desc *stage_desc,
- struct ia_css_pipeline_stage **new_stage)
+ struct ia_css_pipeline_stage_desc *stage_desc,
+ struct ia_css_pipeline_stage **new_stage)
{
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_pipeline_stage *stage = NULL;
for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
if (!(out_frame[i]) && (binary)
- && (binary->out_frame_info[i].res.width)) {
+ && (binary->out_frame_info[i].res.width)) {
err = ia_css_frame_allocate_from_info(&out_frame[i],
- &binary->out_frame_info[i]);
+ &binary->out_frame_info[i]);
if (err != IA_CSS_SUCCESS)
goto ERR;
stage->out_frame_allocated[i] = true;
if (!vf_frame) {
if ((binary && binary->vf_frame_info.res.width) ||
(firmware && firmware->info.isp.sp.enable.vf_veceven)
- ) {
+ ) {
err = ia_css_frame_allocate_from_info(&vf_frame,
- &binary->vf_frame_info);
+ &binary->vf_frame_info);
if (err != IA_CSS_SUCCESS)
goto ERR;
stage->vf_frame_allocated = true;
}
} else if (vf_frame && binary && binary->vf_frame_info.res.width
- && !firmware) {
+ && !firmware) {
/* only mark as allocated if buffer pointer available */
if (vf_frame->data != mmgr_NULL)
stage->vf_frame_allocated = true;
}
static void pipeline_init_defaults(
- struct ia_css_pipeline *pipeline,
- enum ia_css_pipe_id pipe_id,
- unsigned int pipe_num,
- unsigned int dvs_frame_delay)
+ struct ia_css_pipeline *pipeline,
+ enum ia_css_pipe_id pipe_id,
+ unsigned int pipe_num,
+ unsigned int dvs_frame_delay)
{
unsigned int i;
stage->enable_zoom = true;
} else if (pipeline->pipe_id == IA_CSS_PIPE_ID_CAPTURE) {
/* in capture pipeline, capture_pp stage should do zoom */
- err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+ err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+ &stage);
if (err == IA_CSS_SUCCESS)
stage->enable_zoom = true;
} else if (pipeline->pipe_id == IA_CSS_PIPE_ID_VIDEO) {
stage->enable_zoom = true;
} else if (pipeline->pipe_id == IA_CSS_PIPE_ID_YUVPP) {
/* in yuvpp pipeline, first yuv_scaler stage should do zoom */
- err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+ err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+ &stage);
if (err == IA_CSS_SUCCESS)
stage->enable_zoom = true;
}
}
static void
-ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me, bool continuous)
+ia_css_pipeline_configure_inout_port(struct ia_css_pipeline *me,
+ bool continuous)
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_pipeline_configure_inout_port() enter: pipe_id(%d) continuous(%d)\n",
- me->pipe_id, continuous);
+ "ia_css_pipeline_configure_inout_port() enter: pipe_id(%d) continuous(%d)\n",
+ me->pipe_id, continuous);
switch (me->pipe_id) {
- case IA_CSS_PIPE_ID_PREVIEW:
- case IA_CSS_PIPE_ID_VIDEO:
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)(continuous ? SH_CSS_COPYSINK_TYPE : SH_CSS_HOST_TYPE), 1);
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- break;
- case IA_CSS_PIPE_ID_COPY: /*Copy pipe ports configured to "offline" mode*/
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- if (continuous) {
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_COPYSINK_TYPE, 1);
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_TAGGERSINK_TYPE, 1);
- } else {
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- }
- break;
- case IA_CSS_PIPE_ID_CAPTURE:
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)(continuous ? SH_CSS_TAGGERSINK_TYPE : SH_CSS_HOST_TYPE),
- 1);
+ case IA_CSS_PIPE_ID_PREVIEW:
+ case IA_CSS_PIPE_ID_VIDEO:
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)(continuous ? SH_CSS_COPYSINK_TYPE : SH_CSS_HOST_TYPE), 1);
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ break;
+ case IA_CSS_PIPE_ID_COPY: /*Copy pipe ports configured to "offline" mode*/
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ if (continuous) {
SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- break;
- case IA_CSS_PIPE_ID_YUVPP:
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)(SH_CSS_HOST_TYPE), 1);
- SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- break;
- case IA_CSS_PIPE_ID_ACC:
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_COPYSINK_TYPE, 1);
SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_TAGGERSINK_TYPE, 1);
+ } else {
SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
- break;
- default:
- break;
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ }
+ break;
+ case IA_CSS_PIPE_ID_CAPTURE:
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)(continuous ? SH_CSS_TAGGERSINK_TYPE : SH_CSS_HOST_TYPE),
+ 1);
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ break;
+ case IA_CSS_PIPE_ID_YUVPP:
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)(SH_CSS_HOST_TYPE), 1);
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ break;
+ case IA_CSS_PIPE_ID_ACC:
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ SH_CSS_PIPE_PORT_CONFIG_SET(me->inout_port_config,
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
+ break;
+ default:
+ break;
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "ia_css_pipeline_configure_inout_port() leave: inout_port_config(%x)\n",
- me->inout_port_config);
+ "ia_css_pipeline_configure_inout_port() leave: inout_port_config(%x)\n",
+ me->inout_port_config);
}
*
*/
int ia_css_queue_local_init(
- ia_css_queue_t *qhandle,
- ia_css_queue_local_t *desc);
+ ia_css_queue_t *qhandle,
+ ia_css_queue_local_t *desc);
/* @brief Initialize a remote queue instance
*
* @return EINVAL - Invalid argument.
*/
int ia_css_queue_remote_init(
- ia_css_queue_t *qhandle,
- ia_css_queue_remote_t *desc);
+ ia_css_queue_t *qhandle,
+ ia_css_queue_remote_t *desc);
/* @brief Uninitialize a queue instance
*
*
*/
int ia_css_queue_uninit(
- ia_css_queue_t *qhandle);
+ ia_css_queue_t *qhandle);
/* @brief Enqueue an item in the queue instance
*
*
*/
int ia_css_queue_enqueue(
- ia_css_queue_t *qhandle,
- uint32_t item);
+ ia_css_queue_t *qhandle,
+ uint32_t item);
/* @brief Dequeue an item from the queue instance
*
*
*/
int ia_css_queue_dequeue(
- ia_css_queue_t *qhandle,
- uint32_t *item);
+ ia_css_queue_t *qhandle,
+ uint32_t *item);
/* @brief Check if the queue is empty
*
*
*/
int ia_css_queue_is_empty(
- ia_css_queue_t *qhandle,
- bool *is_empty);
+ ia_css_queue_t *qhandle,
+ bool *is_empty);
/* @brief Check if the queue is full
*
*
*/
int ia_css_queue_is_full(
- ia_css_queue_t *qhandle,
- bool *is_full);
+ ia_css_queue_t *qhandle,
+ bool *is_full);
/* @brief Get used space in the queue
*
*
*/
int ia_css_queue_get_used_space(
- ia_css_queue_t *qhandle,
- uint32_t *size);
+ ia_css_queue_t *qhandle,
+ uint32_t *size);
/* @brief Get free space in the queue
*
*
*/
int ia_css_queue_get_free_space(
- ia_css_queue_t *qhandle,
- uint32_t *size);
+ ia_css_queue_t *qhandle,
+ uint32_t *size);
/* @brief Peek at an element in the queue
*
*
*/
int ia_css_queue_peek(
- ia_css_queue_t *qhandle,
- u32 offset,
- uint32_t *element);
+ ia_css_queue_t *qhandle,
+ u32 offset,
+ uint32_t *element);
/* @brief Get the usable size for the queue
*
*
*/
int ia_css_queue_get_size(
- ia_css_queue_t *qhandle,
- uint32_t *size);
+ ia_css_queue_t *qhandle,
+ uint32_t *size);
#endif /* __IA_CSS_QUEUE_H */
* Queue Public APIs
*****************************************************************************/
int ia_css_queue_local_init(
- ia_css_queue_t *qhandle,
- ia_css_queue_local_t *desc)
+ ia_css_queue_t *qhandle,
+ ia_css_queue_local_t *desc)
{
if (NULL == qhandle || NULL == desc
- || NULL == desc->cb_elems || NULL == desc->cb_desc) {
+ || NULL == desc->cb_elems || NULL == desc->cb_desc) {
/* Invalid parameters, return error*/
return EINVAL;
}
/* Create a local circular buffer queue*/
ia_css_circbuf_create(&qhandle->desc.cb_local,
- desc->cb_elems,
- desc->cb_desc);
+ desc->cb_elems,
+ desc->cb_desc);
return 0;
}
int ia_css_queue_remote_init(
- ia_css_queue_t *qhandle,
- ia_css_queue_remote_t *desc)
+ ia_css_queue_t *qhandle,
+ ia_css_queue_remote_t *desc)
{
if (NULL == qhandle || NULL == desc) {
/* Invalid parameters, return error*/
}
int ia_css_queue_uninit(
- ia_css_queue_t *qhandle)
+ ia_css_queue_t *qhandle)
{
if (!qhandle)
return EINVAL;
}
int ia_css_queue_enqueue(
- ia_css_queue_t *qhandle,
- uint32_t item)
+ ia_css_queue_t *qhandle,
+ uint32_t item)
{
int error = 0;
}
int ia_css_queue_dequeue(
- ia_css_queue_t *qhandle,
- uint32_t *item)
+ ia_css_queue_t *qhandle,
+ uint32_t *item)
{
int error = 0;
}
int ia_css_queue_is_full(
- ia_css_queue_t *qhandle,
- bool *is_full)
+ ia_css_queue_t *qhandle,
+ bool *is_full)
{
int error = 0;
}
int ia_css_queue_get_free_space(
- ia_css_queue_t *qhandle,
- uint32_t *size)
+ ia_css_queue_t *qhandle,
+ uint32_t *size)
{
int error = 0;
}
int ia_css_queue_get_used_space(
- ia_css_queue_t *qhandle,
- uint32_t *size)
+ ia_css_queue_t *qhandle,
+ uint32_t *size)
{
int error = 0;
}
int ia_css_queue_peek(
- ia_css_queue_t *qhandle,
- u32 offset,
- uint32_t *element)
+ ia_css_queue_t *qhandle,
+ u32 offset,
+ uint32_t *element)
{
u32 num_elems = 0;
int error = 0;
}
int ia_css_queue_is_empty(
- ia_css_queue_t *qhandle,
- bool *is_empty)
+ ia_css_queue_t *qhandle,
+ bool *is_empty)
{
int error = 0;
}
int ia_css_queue_get_size(
- ia_css_queue_t *qhandle,
- uint32_t *size)
+ ia_css_queue_t *qhandle,
+ uint32_t *size)
{
int error = 0;
#include "assert_support.h"
int ia_css_queue_load(
- struct ia_css_queue *rdesc,
- ia_css_circbuf_desc_t *cb_desc,
- uint32_t ignore_desc_flags)
+ struct ia_css_queue *rdesc,
+ ia_css_circbuf_desc_t *cb_desc,
+ uint32_t ignore_desc_flags)
{
if (!rdesc || !cb_desc)
return EINVAL;
if (0 == (ignore_desc_flags & QUEUE_IGNORE_SIZE_FLAG)) {
cb_desc->size = sp_dmem_load_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, size));
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, size));
if (cb_desc->size == 0) {
/* Adding back the workaround which was removed
if (0 == (ignore_desc_flags & QUEUE_IGNORE_START_FLAG))
cb_desc->start = sp_dmem_load_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, start));
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, start));
if (0 == (ignore_desc_flags & QUEUE_IGNORE_END_FLAG))
cb_desc->end = sp_dmem_load_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, end));
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, end));
if (0 == (ignore_desc_flags & QUEUE_IGNORE_STEP_FLAG))
cb_desc->step = sp_dmem_load_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, step));
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, step));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
/* doing DMA transfer of entire structure */
mmgr_load(rdesc->desc.remote.cb_desc_addr,
- (void *)cb_desc,
- sizeof(ia_css_circbuf_desc_t));
+ (void *)cb_desc,
+ sizeof(ia_css_circbuf_desc_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
/* Not supported yet */
return ENOTSUP;
}
int ia_css_queue_store(
- struct ia_css_queue *rdesc,
- ia_css_circbuf_desc_t *cb_desc,
- uint32_t ignore_desc_flags)
+ struct ia_css_queue *rdesc,
+ ia_css_circbuf_desc_t *cb_desc,
+ uint32_t ignore_desc_flags)
{
if (!rdesc || !cb_desc)
return EINVAL;
if (0 == (ignore_desc_flags & QUEUE_IGNORE_SIZE_FLAG))
sp_dmem_store_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, size),
- cb_desc->size);
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, size),
+ cb_desc->size);
if (0 == (ignore_desc_flags & QUEUE_IGNORE_START_FLAG))
sp_dmem_store_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, start),
- cb_desc->start);
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, start),
+ cb_desc->start);
if (0 == (ignore_desc_flags & QUEUE_IGNORE_END_FLAG))
sp_dmem_store_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, end),
- cb_desc->end);
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, end),
+ cb_desc->end);
if (0 == (ignore_desc_flags & QUEUE_IGNORE_STEP_FLAG))
sp_dmem_store_uint8(rdesc->proc_id,
- rdesc->desc.remote.cb_desc_addr
- + offsetof(ia_css_circbuf_desc_t, step),
- cb_desc->step);
+ rdesc->desc.remote.cb_desc_addr
+ + offsetof(ia_css_circbuf_desc_t, step),
+ cb_desc->step);
} else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
/* doing DMA transfer of entire structure */
mmgr_store(rdesc->desc.remote.cb_desc_addr,
- (void *)cb_desc,
- sizeof(ia_css_circbuf_desc_t));
+ (void *)cb_desc,
+ sizeof(ia_css_circbuf_desc_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
/* Not supported yet */
return ENOTSUP;
}
int ia_css_queue_item_load(
- struct ia_css_queue *rdesc,
- u8 position,
- ia_css_circbuf_elem_t *item)
+ struct ia_css_queue *rdesc,
+ u8 position,
+ ia_css_circbuf_elem_t *item)
{
if (!rdesc || !item)
return EINVAL;
if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
sp_dmem_load(rdesc->proc_id,
- rdesc->desc.remote.cb_elems_addr
- + position * sizeof(ia_css_circbuf_elem_t),
- item,
- sizeof(ia_css_circbuf_elem_t));
+ rdesc->desc.remote.cb_elems_addr
+ + position * sizeof(ia_css_circbuf_elem_t),
+ item,
+ sizeof(ia_css_circbuf_elem_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
mmgr_load(rdesc->desc.remote.cb_elems_addr
- + position * sizeof(ia_css_circbuf_elem_t),
- (void *)item,
- sizeof(ia_css_circbuf_elem_t));
+ + position * sizeof(ia_css_circbuf_elem_t),
+ (void *)item,
+ sizeof(ia_css_circbuf_elem_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
/* Not supported yet */
return ENOTSUP;
}
int ia_css_queue_item_store(
- struct ia_css_queue *rdesc,
- u8 position,
- ia_css_circbuf_elem_t *item)
+ struct ia_css_queue *rdesc,
+ u8 position,
+ ia_css_circbuf_elem_t *item)
{
if (!rdesc || !item)
return EINVAL;
if (rdesc->location == IA_CSS_QUEUE_LOC_SP) {
sp_dmem_store(rdesc->proc_id,
- rdesc->desc.remote.cb_elems_addr
- + position * sizeof(ia_css_circbuf_elem_t),
- item,
- sizeof(ia_css_circbuf_elem_t));
+ rdesc->desc.remote.cb_elems_addr
+ + position * sizeof(ia_css_circbuf_elem_t),
+ item,
+ sizeof(ia_css_circbuf_elem_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_HOST) {
mmgr_store(rdesc->desc.remote.cb_elems_addr
- + position * sizeof(ia_css_circbuf_elem_t),
- (void *)item,
- sizeof(ia_css_circbuf_elem_t));
+ + position * sizeof(ia_css_circbuf_elem_t),
+ (void *)item,
+ sizeof(ia_css_circbuf_elem_t));
} else if (rdesc->location == IA_CSS_QUEUE_LOC_ISP) {
/* Not supported yet */
return ENOTSUP;
};
int ia_css_queue_load(
- struct ia_css_queue *rdesc,
- ia_css_circbuf_desc_t *cb_desc,
- uint32_t ignore_desc_flags);
+ struct ia_css_queue *rdesc,
+ ia_css_circbuf_desc_t *cb_desc,
+ uint32_t ignore_desc_flags);
int ia_css_queue_store(
- struct ia_css_queue *rdesc,
- ia_css_circbuf_desc_t *cb_desc,
- uint32_t ignore_desc_flags);
+ struct ia_css_queue *rdesc,
+ ia_css_circbuf_desc_t *cb_desc,
+ uint32_t ignore_desc_flags);
int ia_css_queue_item_load(
- struct ia_css_queue *rdesc,
- u8 position,
- ia_css_circbuf_elem_t *item);
+ struct ia_css_queue *rdesc,
+ u8 position,
+ ia_css_circbuf_elem_t *item);
int ia_css_queue_item_store(
- struct ia_css_queue *rdesc,
- u8 position,
- ia_css_circbuf_elem_t *item);
+ struct ia_css_queue *rdesc,
+ u8 position,
+ ia_css_circbuf_elem_t *item);
#endif /* __QUEUE_ACCESS_H */
* @param pool The pointer to the pool
*/
STORAGE_CLASS_RMGR_H enum ia_css_err ia_css_rmgr_init_vbuf(
- struct ia_css_rmgr_vbuf_pool *pool);
+ struct ia_css_rmgr_vbuf_pool *pool);
/**
* @brief Uninitialize the resource pool (host, vbuf)
* @param pool The pointer to the pool
*/
STORAGE_CLASS_RMGR_H void ia_css_rmgr_uninit_vbuf(
- struct ia_css_rmgr_vbuf_pool *pool);
+ struct ia_css_rmgr_vbuf_pool *pool);
/**
* @brief Acquire a handle from the pool (host, vbuf)
* @param handle The pointer to the handle
*/
STORAGE_CLASS_RMGR_H void ia_css_rmgr_acq_vbuf(
- struct ia_css_rmgr_vbuf_pool *pool,
- struct ia_css_rmgr_vbuf_handle **handle);
+ struct ia_css_rmgr_vbuf_pool *pool,
+ struct ia_css_rmgr_vbuf_handle **handle);
/**
* @brief Release a handle to the pool (host, vbuf)
* @param handle The pointer to the handle
*/
STORAGE_CLASS_RMGR_H void ia_css_rmgr_rel_vbuf(
- struct ia_css_rmgr_vbuf_pool *pool,
- struct ia_css_rmgr_vbuf_handle **handle);
+ struct ia_css_rmgr_vbuf_pool *pool,
+ struct ia_css_rmgr_vbuf_handle **handle);
/**
* @brief Retain the reference count for a handle (host, vbuf)
*/
if (!*handle) {
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "ia_css_i_host_refcount_retain_vbuf() failed to find empty slot!\n");
+ "ia_css_i_host_refcount_retain_vbuf() failed to find empty slot!\n");
return;
}
(*handle)->vptr = h->vptr;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_rmgr_uninit_vbuf()\n");
if (!pool) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+ "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
return;
}
if (pool->handles) {
for (i = 0; i < pool->size; i++) {
if (pool->handles[i]) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- " freeing/releasing %x (count=%d)\n",
- pool->handles[i]->vptr,
- pool->handles[i]->count);
+ " freeing/releasing %x (count=%d)\n",
+ pool->handles[i]->vptr,
+ pool->handles[i]->count);
/* free memory */
hmm_free(pool->handles[i]->vptr);
/* remove from refcount admin */
ia_css_rmgr_refcount_release_vbuf(
- &pool->handles[i]);
+ &pool->handles[i]);
}
}
/* now free the pool handles list */
/* ! Load firmware on to specfied SP
*/
enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
- ia_css_spctrl_cfg *spctrl_cfg);
+ ia_css_spctrl_cfg *spctrl_cfg);
#ifdef ISP2401
/*! Setup registers for reloading FW */
/* Load firmware */
enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
- ia_css_spctrl_cfg *spctrl_cfg)
+ ia_css_spctrl_cfg *spctrl_cfg)
{
hrt_vaddress code_addr = mmgr_NULL;
struct ia_css_sp_init_dmem_cfg *init_dmem_cfg;
init_dmem_cfg->bss_size = spctrl_cfg->bss_size;
init_dmem_cfg->sp_id = sp_id;
- spctrl_cofig_info[sp_id].spctrl_config_dmem_addr = spctrl_cfg->spctrl_config_dmem_addr;
- spctrl_cofig_info[sp_id].spctrl_state_dmem_addr = spctrl_cfg->spctrl_state_dmem_addr;
+ spctrl_cofig_info[sp_id].spctrl_config_dmem_addr =
+ spctrl_cfg->spctrl_config_dmem_addr;
+ spctrl_cofig_info[sp_id].spctrl_state_dmem_addr =
+ spctrl_cfg->spctrl_state_dmem_addr;
/* store code (text + icache) and data to DDR
*
/* now we program the base address into the icache and
* invalidate the cache.
*/
- sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].code_addr);
+ sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG,
+ (hrt_data)spctrl_cofig_info[sp_id].code_addr);
sp_ctrl_setbit(sp_id, SP_ICACHE_INV_REG, SP_ICACHE_INV_BIT);
spctrl_loaded[sp_id] = true;
return IA_CSS_SUCCESS;
/* now we program the base address into the icache and
* invalidate the cache.
*/
- sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].code_addr);
+ sp_ctrl_store(sp_id, SP_ICACHE_ADDR_REG,
+ (hrt_data)spctrl_cofig_info[sp_id].code_addr);
sp_ctrl_setbit(sp_id, SP_ICACHE_INV_REG, SP_ICACHE_INV_BIT);
spctrl_loaded[sp_id] = true;
}
assert(sizeof(unsigned int) <= sizeof(hrt_data));
sp_dmem_store(sp_id,
- spctrl_cofig_info[sp_id].spctrl_config_dmem_addr,
- &spctrl_cofig_info[sp_id].dmem_config,
- sizeof(spctrl_cofig_info[sp_id].dmem_config));
+ spctrl_cofig_info[sp_id].spctrl_config_dmem_addr,
+ &spctrl_cofig_info[sp_id].dmem_config,
+ sizeof(spctrl_cofig_info[sp_id].dmem_config));
/* set the start address */
- sp_ctrl_store(sp_id, SP_START_ADDR_REG, (hrt_data)spctrl_cofig_info[sp_id].sp_entry);
+ sp_ctrl_store(sp_id, SP_START_ADDR_REG,
+ (hrt_data)spctrl_cofig_info[sp_id].sp_entry);
sp_ctrl_setbit(sp_id, SP_SC_REG, SP_RUN_BIT);
sp_ctrl_setbit(sp_id, SP_SC_REG, SP_START_BIT);
return IA_CSS_SUCCESS;
enum ia_css_err
ia_css_timer_get_current_tick(
- struct ia_css_clock_tick *curr_ts) {
+ struct ia_css_clock_tick *curr_ts) {
assert(curr_ts);
- if (!curr_ts) {
+ if (!curr_ts)
+ {
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
curr_ts->ticks = (clock_value_t)gp_timer_read(GP_TIMER_SEL);
the stream seed contains all the data required to "grow" the seed again after it was closed.
*/
struct sh_css_stream_seed {
- struct ia_css_stream **orig_stream; /* pointer to restore the original handle */
+ struct ia_css_stream
+ **orig_stream; /* pointer to restore the original handle */
struct ia_css_stream *stream; /* handle, used as ID too.*/
struct ia_css_stream_config stream_config; /* stream config struct */
int num_pipes;
struct ia_css_pipe *pipes[IA_CSS_PIPE_ID_NUM]; /* pipe handles */
- struct ia_css_pipe **orig_pipes[IA_CSS_PIPE_ID_NUM]; /* pointer to restore original handle */
- struct ia_css_pipe_config pipe_config[IA_CSS_PIPE_ID_NUM]; /* pipe config structs */
+ struct ia_css_pipe
+ **orig_pipes[IA_CSS_PIPE_ID_NUM]; /* pointer to restore original handle */
+ struct ia_css_pipe_config
+ pipe_config[IA_CSS_PIPE_ID_NUM]; /* pipe config structs */
};
#define MAX_ACTIVE_STREAMS 5
sh_css_pipes_have_stopped(struct ia_css_stream *stream);
static enum ia_css_err
-ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format format);
+ia_css_pipe_check_format(struct ia_css_pipe *pipe,
+ enum ia_css_frame_format format);
static enum ia_css_err
check_pipe_resolutions(const struct ia_css_pipe *pipe);
static enum ia_css_err
ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
- struct ia_css_fw_info *firmware);
+ struct ia_css_fw_info *firmware);
static void
ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
- struct ia_css_fw_info *firmware);
+ struct ia_css_fw_info *firmware);
static void
ia_css_reset_defaults(struct sh_css *css);
static void
sh_css_init_host_sp_control_vars(void);
-static enum ia_css_err set_num_primary_stages(unsigned int *num, enum ia_css_pipe_version version);
+static enum ia_css_err set_num_primary_stages(unsigned int *num,
+ enum ia_css_pipe_version version);
static bool
need_capture_pp(const struct ia_css_pipe *pipe);
need_yuv_scaler_stage(const struct ia_css_pipe *pipe);
static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
- struct ia_css_frame_info *cas_scaler_in_info,
- struct ia_css_frame_info *cas_scaler_out_info,
- struct ia_css_frame_info *cas_scaler_vf_info,
- struct ia_css_cas_binary_descr *descr);
+ struct ia_css_frame_info *cas_scaler_in_info,
+ struct ia_css_frame_info *cas_scaler_out_info,
+ struct ia_css_frame_info *cas_scaler_vf_info,
+ struct ia_css_cas_binary_descr *descr);
-static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr *descr);
+static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr
+ *descr);
static bool
need_downscaling(const struct ia_css_resolution in_res,
- const struct ia_css_resolution out_res);
+ const struct ia_css_resolution out_res);
static bool need_capt_ldc(const struct ia_css_pipe *pipe);
static
enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
- struct ia_css_pipe *pipe,
- struct ia_css_frame_info *info,
- unsigned int idx);
+ struct ia_css_pipe *pipe,
+ struct ia_css_frame_info *info,
+ unsigned int idx);
static enum ia_css_err
sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
static enum ia_css_err
init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *vf_frame, unsigned int idx);
+ struct ia_css_frame *vf_frame, unsigned int idx);
static enum ia_css_err
init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *frame, enum ia_css_frame_format format);
+ struct ia_css_frame *frame, enum ia_css_frame_format format);
static enum ia_css_err
init_out_frameinfo_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *out_frame, unsigned int idx);
+ struct ia_css_frame *out_frame, unsigned int idx);
static enum ia_css_err
sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
static enum ia_css_err
alloc_continuous_frames(
- struct ia_css_pipe *pipe, bool init_time);
+ struct ia_css_pipe *pipe, bool init_time);
static void
pipe_global_init(void);
static enum ia_css_err
-pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number);
+pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
+ unsigned int *pipe_number);
static void
pipe_release_pipe_num(unsigned int pipe_num);
static enum ia_css_err
create_host_copy_pipeline(struct ia_css_pipe *pipe,
- unsigned int max_input_width,
- struct ia_css_frame *out_frame);
+ unsigned int max_input_width,
+ struct ia_css_frame *out_frame);
static enum ia_css_err
create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe);
static unsigned int
sh_css_get_sw_interrupt_value(unsigned int irq);
-static struct ia_css_binary *ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe);
+static struct ia_css_binary *ia_css_pipe_get_shading_correction_binary(
+ const struct ia_css_pipe *pipe);
static struct ia_css_binary *
ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe);
static struct sh_css_hmm_buffer_record
*sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
- enum ia_css_buffer_type type,
- hrt_address kernel_ptr);
+ enum ia_css_buffer_type type,
+ hrt_address kernel_ptr);
static struct sh_css_hmm_buffer_record
*sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
- enum ia_css_buffer_type type);
+ enum ia_css_buffer_type type);
void
ia_css_get_acc_configs(
- struct ia_css_pipe *pipe,
- struct ia_css_isp_config *config);
+ struct ia_css_pipe *pipe,
+ struct ia_css_isp_config *config);
#if CONFIG_ON_FRAME_ENQUEUE()
-static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info *info, struct frame_data_wrapper *frame);
+static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info
+ *info, struct frame_data_wrapper *frame);
#endif
#ifdef USE_INPUT_SYSTEM_VERSION_2401
-static unsigned int get_crop_lines_for_bayer_order(const struct ia_css_stream_config *config);
-static unsigned int get_crop_columns_for_bayer_order(const struct ia_css_stream_config *config);
+static unsigned int get_crop_lines_for_bayer_order(const struct
+ ia_css_stream_config *config);
+static unsigned int get_crop_columns_for_bayer_order(const struct
+ ia_css_stream_config *config);
static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
- unsigned int *extra_row, unsigned int *extra_column);
+ unsigned int *extra_row, unsigned int *extra_column);
#endif
#ifdef ISP2401
#ifdef USE_INPUT_SYSTEM_VERSION_2401
static enum ia_css_err
aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
- struct ia_css_pipe *pipes[],
- bool *do_crop_status);
+ struct ia_css_pipe *pipes[],
+ bool *do_crop_status);
static bool
aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe);
static enum ia_css_err
aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
- struct ia_css_resolution *effective_res);
+ struct ia_css_resolution *effective_res);
#endif
#endif
* by the copy binary given the stream format.
* */
static enum ia_css_err
-verify_copy_out_frame_format(struct ia_css_pipe *pipe)
-{
+verify_copy_out_frame_format(struct ia_css_pipe *pipe) {
enum ia_css_frame_format out_fmt = pipe->output_info[0].format;
unsigned int i, found = 0;
assert(pipe);
assert(pipe->stream);
- switch (pipe->stream->config.input_config.format) {
+ switch (pipe->stream->config.input_config.format)
+ {
case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
case ATOMISP_INPUT_FORMAT_YUV420_8:
for (i = 0; i < ARRAY_SIZE(yuv420_copy_formats) && !found; i++)
case ATOMISP_INPUT_FORMAT_RAW_14:
case ATOMISP_INPUT_FORMAT_RAW_16:
found = (out_fmt == IA_CSS_FRAME_FORMAT_RAW) ||
- (out_fmt == IA_CSS_FRAME_FORMAT_RAW_PACKED);
+ (out_fmt == IA_CSS_FRAME_FORMAT_RAW_PACKED);
break;
case ATOMISP_INPUT_FORMAT_BINARY_8:
found = (out_fmt == IA_CSS_FRAME_FORMAT_BINARY_8);
if (stream)
bpp = ia_css_util_input_format_bpp(stream->config.input_config.format,
- stream->config.pixels_per_clock == 2);
+ stream->config.pixels_per_clock == 2);
return bpp;
}
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
static enum ia_css_err
-sh_css_config_input_network(struct ia_css_stream *stream)
-{
+sh_css_config_input_network(struct ia_css_stream *stream) {
unsigned int fmt_type;
struct ia_css_pipe *pipe = stream->last_pipe;
struct ia_css_binary *binary = NULL;
assert(pipe);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_config_input_network() enter:\n");
+ "sh_css_config_input_network() enter:\n");
if (pipe->pipeline.stages)
binary = pipe->pipeline.stages->binary;
err = ia_css_isys_convert_stream_format_to_mipi_format(
- stream->config.input_config.format,
- stream->csi_rx_config.comp,
- &fmt_type);
+ stream->config.input_config.format,
+ stream->csi_rx_config.comp,
+ &fmt_type);
if (err != IA_CSS_SUCCESS)
return err;
sh_css_sp_program_input_circuit(fmt_type,
stream->config.mode);
if ((binary && (binary->online || stream->config.continuous)) ||
- pipe->config.mode == IA_CSS_PIPE_MODE_COPY) {
+ pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+ {
err = ia_css_ifmtr_configure(&stream->config,
- binary);
+ binary);
if (err != IA_CSS_SUCCESS)
return err;
}
if (stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
- stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
+ stream->config.mode == IA_CSS_INPUT_MODE_PRBS)
+ {
unsigned int hblank_cycles = 100,
- vblank_lines = 6,
- width,
- height,
- vblank_cycles;
- width = (stream->config.input_config.input_res.width) / (1 + (stream->config.pixels_per_clock == 2));
+ vblank_lines = 6,
+ width,
+ height,
+ vblank_cycles;
+ width = (stream->config.input_config.input_res.width) / (1 +
+ (stream->config.pixels_per_clock == 2));
height = stream->config.input_config.input_res.height;
vblank_cycles = vblank_lines * (width + hblank_cycles);
sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
#if defined(IS_ISP_2400_SYSTEM)
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
/* TODO: move define to proper file in tools */
- #define GP_ISEL_TPG_MODE 0x90058
+#define GP_ISEL_TPG_MODE 0x90058
ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
}
#endif
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_config_input_network() leave:\n");
+ "sh_css_config_input_network() leave:\n");
return IA_CSS_SUCCESS;
}
#elif !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
- enum atomisp_input_format format,
- unsigned int pixels_per_line)
+ enum atomisp_input_format format,
+ unsigned int pixels_per_line)
{
unsigned int rval;
}
static bool sh_css_translate_stream_cfg_to_input_system_input_port_id(
- struct ia_css_stream_config *stream_cfg,
- ia_css_isys_descr_t *isys_stream_descr)
+ struct ia_css_stream_config *stream_cfg,
+ ia_css_isys_descr_t *isys_stream_descr)
{
bool rc;
}
static bool sh_css_translate_stream_cfg_to_input_system_input_port_type(
- struct ia_css_stream_config *stream_cfg,
- ia_css_isys_descr_t *isys_stream_descr)
+ struct ia_css_stream_config *stream_cfg,
+ ia_css_isys_descr_t *isys_stream_descr)
{
bool rc;
}
static bool sh_css_translate_stream_cfg_to_input_system_input_port_attr(
- struct ia_css_stream_config *stream_cfg,
- ia_css_isys_descr_t *isys_stream_descr,
- int isys_stream_idx)
+ struct ia_css_stream_config *stream_cfg,
+ ia_css_isys_descr_t *isys_stream_descr,
+ int isys_stream_idx)
{
bool rc;
isys_stream_descr->tpg_port_attr.color_cfg.G2 = 100;
isys_stream_descr->tpg_port_attr.color_cfg.B2 = 160;
- isys_stream_descr->tpg_port_attr.mask_cfg.h_mask = stream_cfg->source.tpg.x_mask;
- isys_stream_descr->tpg_port_attr.mask_cfg.v_mask = stream_cfg->source.tpg.y_mask;
- isys_stream_descr->tpg_port_attr.mask_cfg.hv_mask = stream_cfg->source.tpg.xy_mask;
+ isys_stream_descr->tpg_port_attr.mask_cfg.h_mask =
+ stream_cfg->source.tpg.x_mask;
+ isys_stream_descr->tpg_port_attr.mask_cfg.v_mask =
+ stream_cfg->source.tpg.y_mask;
+ isys_stream_descr->tpg_port_attr.mask_cfg.hv_mask =
+ stream_cfg->source.tpg.xy_mask;
- isys_stream_descr->tpg_port_attr.delta_cfg.h_delta = stream_cfg->source.tpg.x_delta;
- isys_stream_descr->tpg_port_attr.delta_cfg.v_delta = stream_cfg->source.tpg.y_delta;
+ isys_stream_descr->tpg_port_attr.delta_cfg.h_delta =
+ stream_cfg->source.tpg.x_delta;
+ isys_stream_descr->tpg_port_attr.delta_cfg.v_delta =
+ stream_cfg->source.tpg.y_delta;
/*
* TODO
*/
isys_stream_descr->tpg_port_attr.sync_gen_cfg.hblank_cycles = 100;
isys_stream_descr->tpg_port_attr.sync_gen_cfg.vblank_cycles = 100;
- isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_clock = stream_cfg->pixels_per_clock;
+ isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_clock =
+ stream_cfg->pixels_per_clock;
isys_stream_descr->tpg_port_attr.sync_gen_cfg.nr_of_frames = (uint32_t)~(0x0);
- isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_line = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
- isys_stream_descr->tpg_port_attr.sync_gen_cfg.lines_per_frame = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
+ isys_stream_descr->tpg_port_attr.sync_gen_cfg.pixels_per_line =
+ stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
+ isys_stream_descr->tpg_port_attr.sync_gen_cfg.lines_per_frame =
+ stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
break;
case IA_CSS_INPUT_MODE_PRBS:
*/
isys_stream_descr->prbs_port_attr.sync_gen_cfg.hblank_cycles = 100;
isys_stream_descr->prbs_port_attr.sync_gen_cfg.vblank_cycles = 100;
- isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_clock = stream_cfg->pixels_per_clock;
+ isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_clock =
+ stream_cfg->pixels_per_clock;
isys_stream_descr->prbs_port_attr.sync_gen_cfg.nr_of_frames = (uint32_t)~(0x0);
- isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_line = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
- isys_stream_descr->prbs_port_attr.sync_gen_cfg.lines_per_frame = stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
+ isys_stream_descr->prbs_port_attr.sync_gen_cfg.pixels_per_line =
+ stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.width;
+ isys_stream_descr->prbs_port_attr.sync_gen_cfg.lines_per_frame =
+ stream_cfg->isys_config[IA_CSS_STREAM_DEFAULT_ISYS_STREAM_IDX].input_res.height;
break;
- case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
- {
+ case IA_CSS_INPUT_MODE_BUFFERED_SENSOR: {
enum ia_css_err err;
unsigned int fmt_type;
err = ia_css_isys_convert_stream_format_to_mipi_format(
- stream_cfg->isys_config[isys_stream_idx].format,
- MIPI_PREDICTOR_NONE,
- &fmt_type);
+ stream_cfg->isys_config[isys_stream_idx].format,
+ MIPI_PREDICTOR_NONE,
+ &fmt_type);
if (err != IA_CSS_SUCCESS)
rc = false;
- isys_stream_descr->csi_port_attr.active_lanes = stream_cfg->source.port.num_lanes;
+ isys_stream_descr->csi_port_attr.active_lanes =
+ stream_cfg->source.port.num_lanes;
isys_stream_descr->csi_port_attr.fmt_type = fmt_type;
isys_stream_descr->csi_port_attr.ch_id = stream_cfg->channel_id;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
isys_stream_descr->online = stream_cfg->online;
#endif
err |= ia_css_isys_convert_compressed_format(
- &stream_cfg->source.port.compression,
- isys_stream_descr);
+ &stream_cfg->source.port.compression,
+ isys_stream_descr);
if (err != IA_CSS_SUCCESS)
rc = false;
isys_stream_descr->metadata.enable = false;
if (stream_cfg->metadata_config.resolution.height > 0) {
err = ia_css_isys_convert_stream_format_to_mipi_format(
- stream_cfg->metadata_config.data_type,
- MIPI_PREDICTOR_NONE,
- &fmt_type);
+ stream_cfg->metadata_config.data_type,
+ MIPI_PREDICTOR_NONE,
+ &fmt_type);
if (err != IA_CSS_SUCCESS)
rc = false;
isys_stream_descr->metadata.fmt_type = fmt_type;
isys_stream_descr->metadata.bits_per_pixel =
- ia_css_util_input_format_bpp(stream_cfg->metadata_config.data_type, true);
- isys_stream_descr->metadata.pixels_per_line = stream_cfg->metadata_config.resolution.width;
- isys_stream_descr->metadata.lines_per_frame = stream_cfg->metadata_config.resolution.height;
+ ia_css_util_input_format_bpp(stream_cfg->metadata_config.data_type, true);
+ isys_stream_descr->metadata.pixels_per_line =
+ stream_cfg->metadata_config.resolution.width;
+ isys_stream_descr->metadata.lines_per_frame =
+ stream_cfg->metadata_config.resolution.height;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
/* For new input system, number of str2mmio requests must be even.
* So we round up number of metadata lines to be even. */
if (isys_stream_descr->metadata.lines_per_frame > 0)
isys_stream_descr->metadata.lines_per_frame +=
- (isys_stream_descr->metadata.lines_per_frame & 1);
+ (isys_stream_descr->metadata.lines_per_frame & 1);
#endif
isys_stream_descr->metadata.align_req_in_bytes =
- ia_css_csi2_calculate_input_system_alignment(stream_cfg->metadata_config.data_type);
+ ia_css_csi2_calculate_input_system_alignment(
+ stream_cfg->metadata_config.data_type);
isys_stream_descr->metadata.enable = true;
}
}
static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
- struct ia_css_stream_config *stream_cfg,
- ia_css_isys_descr_t *isys_stream_descr,
- int isys_stream_idx)
+ struct ia_css_stream_config *stream_cfg,
+ ia_css_isys_descr_t *isys_stream_descr,
+ int isys_stream_idx)
{
unsigned int bits_per_subpixel;
unsigned int max_subpixels_per_line;
fmt_type = stream_cfg->isys_config[isys_stream_idx].format;
if ((stream_cfg->mode == IA_CSS_INPUT_MODE_SENSOR ||
- stream_cfg->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) &&
- stream_cfg->source.port.compression.type != IA_CSS_CSI2_COMPRESSION_TYPE_NONE) {
+ stream_cfg->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) &&
+ stream_cfg->source.port.compression.type != IA_CSS_CSI2_COMPRESSION_TYPE_NONE) {
if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
- UNCOMPRESSED_BITS_PER_PIXEL_10) {
- fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
+ UNCOMPRESSED_BITS_PER_PIXEL_10) {
+ fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
} else if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
- UNCOMPRESSED_BITS_PER_PIXEL_12) {
- fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
+ UNCOMPRESSED_BITS_PER_PIXEL_12) {
+ fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
} else
return false;
}
bits_per_subpixel =
- sh_css_stream_format_2_bits_per_subpixel(fmt_type);
+ sh_css_stream_format_2_bits_per_subpixel(fmt_type);
if (bits_per_subpixel == 0)
return false;
max_subpixels_per_line =
- csi2_protocol_calculate_max_subpixels_per_line(fmt_type,
- stream_cfg->isys_config[isys_stream_idx].input_res.width);
+ csi2_protocol_calculate_max_subpixels_per_line(fmt_type,
+ stream_cfg->isys_config[isys_stream_idx].input_res.width);
if (max_subpixels_per_line == 0)
return false;
/* HW needs subpixel info for their settings */
isys_stream_descr->input_port_resolution.bits_per_pixel = bits_per_subpixel;
- isys_stream_descr->input_port_resolution.pixels_per_line = max_subpixels_per_line;
+ isys_stream_descr->input_port_resolution.pixels_per_line =
+ max_subpixels_per_line;
isys_stream_descr->input_port_resolution.lines_per_frame = lines_per_frame;
- isys_stream_descr->input_port_resolution.align_req_in_bytes = align_req_in_bytes;
+ isys_stream_descr->input_port_resolution.align_req_in_bytes =
+ align_req_in_bytes;
return true;
}
static bool sh_css_translate_stream_cfg_to_isys_stream_descr(
- struct ia_css_stream_config *stream_cfg,
- bool early_polling,
- ia_css_isys_descr_t *isys_stream_descr,
- int isys_stream_idx)
+ struct ia_css_stream_config *stream_cfg,
+ bool early_polling,
+ ia_css_isys_descr_t *isys_stream_descr,
+ int isys_stream_idx)
{
bool rc;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_translate_stream_cfg_to_isys_stream_descr() enter:\n");
- rc = sh_css_translate_stream_cfg_to_input_system_input_port_id(stream_cfg, isys_stream_descr);
- rc &= sh_css_translate_stream_cfg_to_input_system_input_port_type(stream_cfg, isys_stream_descr);
- rc &= sh_css_translate_stream_cfg_to_input_system_input_port_attr(stream_cfg, isys_stream_descr, isys_stream_idx);
- rc &= sh_css_translate_stream_cfg_to_input_system_input_port_resolution(stream_cfg, isys_stream_descr, isys_stream_idx);
+ "sh_css_translate_stream_cfg_to_isys_stream_descr() enter:\n");
+ rc = sh_css_translate_stream_cfg_to_input_system_input_port_id(stream_cfg,
+ isys_stream_descr);
+ rc &= sh_css_translate_stream_cfg_to_input_system_input_port_type(stream_cfg,
+ isys_stream_descr);
+ rc &= sh_css_translate_stream_cfg_to_input_system_input_port_attr(stream_cfg,
+ isys_stream_descr, isys_stream_idx);
+ rc &= sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
+ stream_cfg, isys_stream_descr, isys_stream_idx);
isys_stream_descr->raw_packed = stream_cfg->pack_raw_pixels;
- isys_stream_descr->linked_isys_stream_id = (int8_t)stream_cfg->isys_config[isys_stream_idx].linked_isys_stream_id;
+ isys_stream_descr->linked_isys_stream_id = (int8_t)
+ stream_cfg->isys_config[isys_stream_idx].linked_isys_stream_id;
/*
* Early polling is required for timestamp accuracy in certain case.
* The ISYS HW polling is started on
* Only 2401 relevant ??
*/
isys_stream_descr->polling_mode
- = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
- : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
+ = early_polling ? INPUT_SYSTEM_POLL_ON_CAPTURE_REQUEST
+ : INPUT_SYSTEM_POLL_ON_WAIT_FOR_FRAME;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
+ "sh_css_translate_stream_cfg_to_isys_stream_descr() leave:\n");
return rc;
}
static bool sh_css_translate_binary_info_to_input_system_output_port_attr(
- struct ia_css_binary *binary,
- ia_css_isys_descr_t *isys_stream_descr)
+ struct ia_css_binary *binary,
+ ia_css_isys_descr_t *isys_stream_descr)
{
if (!binary)
return false;
isys_stream_descr->output_port_attr.left_padding = binary->left_padding;
- isys_stream_descr->output_port_attr.max_isp_input_width = binary->info->sp.input.max_width;
+ isys_stream_descr->output_port_attr.max_isp_input_width =
+ binary->info->sp.input.max_width;
return true;
}
static enum ia_css_err
-sh_css_config_input_network(struct ia_css_stream *stream)
-{
+sh_css_config_input_network(struct ia_css_stream *stream) {
bool rc;
ia_css_isys_descr_t isys_stream_descr;
unsigned int sp_thread_id;
assert(stream);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_config_input_network() enter 0x%p:\n", stream);
+ "sh_css_config_input_network() enter 0x%p:\n", stream);
- if (stream->config.continuous == true) {
+ if (stream->config.continuous == true)
+ {
if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
pipe = stream->last_pipe;
} else if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_YUVPP) {
} else if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
pipe = stream->last_pipe->pipe_settings.video.copy_pipe;
}
- } else {
+ } else
+ {
pipe = stream->last_pipe;
if (stream->last_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
/*
if (pipe->pipeline.stages->binary)
binary = pipe->pipeline.stages->binary;
- if (binary) {
+ if (binary)
+ {
/* this was being done in ifmtr in 2400.
* online and cont bypass the init_in_frameinfo_memory_defaults
* so need to do it here
/* get the target input terminal */
sp_pipeline_input_terminal = &sh_css_sp_group.pipe_io[sp_thread_id].input;
- for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
+ for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++)
+ {
/* initialization */
memset((void *)(&isys_stream_descr), 0, sizeof(ia_css_isys_descr_t));
sp_pipeline_input_terminal->context.virtual_input_system_stream[i].valid = 0;
/* translate the stream configuration to the Input System (2401) configuration */
rc = sh_css_translate_stream_cfg_to_isys_stream_descr(
- &stream->config,
- early_polling,
- &(isys_stream_descr), i);
+ &stream->config,
+ early_polling,
+ &(isys_stream_descr), i);
if (stream->config.online) {
rc &= sh_css_translate_binary_info_to_input_system_output_port_attr(
- binary,
- &(isys_stream_descr));
+ binary,
+ &(isys_stream_descr));
}
if (!rc)
/* create the virtual Input System (2401) */
rc = ia_css_isys_stream_create(
- &(isys_stream_descr),
- &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
- isys_stream_id);
+ &(isys_stream_descr),
+ &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
+ isys_stream_id);
if (!rc)
return IA_CSS_ERR_INTERNAL_ERROR;
/* calculate the configuration of the virtual Input System (2401) */
rc = ia_css_isys_stream_calculate_cfg(
- &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
- &(isys_stream_descr),
- &sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i]);
+ &sp_pipeline_input_terminal->context.virtual_input_system_stream[i],
+ &(isys_stream_descr),
+ &sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i]);
if (!rc) {
- ia_css_isys_stream_destroy(&sp_pipeline_input_terminal->context.virtual_input_system_stream[i]);
+ ia_css_isys_stream_destroy(
+ &sp_pipeline_input_terminal->context.virtual_input_system_stream[i]);
return IA_CSS_ERR_INTERNAL_ERROR;
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_config_input_network() leave:\n");
+ "sh_css_config_input_network() leave:\n");
return IA_CSS_SUCCESS;
}
static inline struct ia_css_pipe *stream_get_last_pipe(
- struct ia_css_stream *stream)
+ struct ia_css_stream *stream)
{
struct ia_css_pipe *last_pipe = NULL;
}
static inline struct ia_css_pipe *stream_get_copy_pipe(
- struct ia_css_stream *stream)
+ struct ia_css_stream *stream)
{
struct ia_css_pipe *copy_pipe = NULL;
struct ia_css_pipe *last_pipe = NULL;
(stream->config.continuous)) {
pipe_id = last_pipe->mode;
switch (pipe_id) {
- case IA_CSS_PIPE_ID_PREVIEW:
- copy_pipe = last_pipe->pipe_settings.preview.copy_pipe;
- break;
- case IA_CSS_PIPE_ID_VIDEO:
- copy_pipe = last_pipe->pipe_settings.video.copy_pipe;
- break;
- default:
- copy_pipe = NULL;
- break;
+ case IA_CSS_PIPE_ID_PREVIEW:
+ copy_pipe = last_pipe->pipe_settings.preview.copy_pipe;
+ break;
+ case IA_CSS_PIPE_ID_VIDEO:
+ copy_pipe = last_pipe->pipe_settings.video.copy_pipe;
+ break;
+ default:
+ copy_pipe = NULL;
+ break;
}
}
}
static inline struct ia_css_pipe *stream_get_target_pipe(
- struct ia_css_stream *stream)
+ struct ia_css_stream *stream)
{
struct ia_css_pipe *target_pipe;
}
static enum ia_css_err stream_csi_rx_helper(
- struct ia_css_stream *stream,
- enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
+ struct ia_css_stream *stream,
+ enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
{
enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
u32 sp_thread_id, stream_id;
goto exit;
rc = ia_css_pipeline_get_sp_thread_id(
- ia_css_pipe_get_pipe_num(target_pipe),
- &sp_thread_id);
+ ia_css_pipe_get_pipe_num(target_pipe),
+ &sp_thread_id);
if (!rc)
goto exit;
}
static inline enum ia_css_err stream_register_with_csi_rx(
- struct ia_css_stream *stream)
+ struct ia_css_stream *stream)
{
return stream_csi_rx_helper(stream, ia_css_isys_csi_rx_register_stream);
}
static inline enum ia_css_err stream_unregister_with_csi_rx(
- struct ia_css_stream *stream)
+ struct ia_css_stream *stream)
{
return stream_csi_rx_helper(stream, ia_css_isys_csi_rx_unregister_stream);
}
if ((hist->run[i] == 0) && (hist->run[i] == hist->stall[i]))
continue;
sh_css_print("%s %d\t%d\t%d\n",
- core_name, i, hist->run[i], hist->stall[i]);
+ core_name, i, hist->run[i], hist->stall[i]);
cnt_run += hist->run[i];
cnt_stall += hist->stall[i];
}
sh_css_print(" Statistics for %s, cnt_run = %d, cnt_stall = %d, hist->length = %d\n",
- core_name, cnt_run, cnt_stall, hist->length);
+ core_name, cnt_run, cnt_stall, hist->length);
}
static void print_pc_histogram(void)
if (metrics->mode == IA_CSS_BINARY_MODE_PREVIEW ||
metrics->mode == IA_CSS_BINARY_MODE_VF_PP) {
sh_css_print("pc_histogram for binary %d is SKIPPED\n",
- metrics->id);
+ metrics->id);
continue;
}
static void input_frame_info(struct ia_css_frame_info frame_info)
{
sh_css_print("SH_CSS:input_frame_info() -- frame->info.res.width = %d, frame->info.res.height = %d, format = %d\n",
- frame_info.res.width, frame_info.res.height, frame_info.format);
+ frame_info.res.width, frame_info.res.height, frame_info.format);
}
#endif /* WITH_PC_MONITORING */
/* start the copy function on the SP */
static enum ia_css_err
start_copy_on_sp(struct ia_css_pipe *pipe,
- struct ia_css_frame *out_frame)
-{
+ struct ia_css_frame *out_frame) {
(void)out_frame;
assert(pipe);
assert(pipe->stream);
sh_css_sp_start_binary_copy(ia_css_pipe_get_pipe_num(pipe), out_frame, pipe->stream->config.pixels_per_clock == 2);
#if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
- if (pipe->stream->reconfigure_css_rx) {
- ia_css_isys_rx_configure(&pipe->stream->csi_rx_config, pipe->stream->config.mode);
+ if (pipe->stream->reconfigure_css_rx)
+ {
+ ia_css_isys_rx_configure(&pipe->stream->csi_rx_config,
+ pipe->stream->config.mode);
pipe->stream->reconfigure_css_rx = false;
}
#endif
}
static void start_pipe(
- struct ia_css_pipe *me,
- enum sh_css_pipe_config_override copy_ovrd,
- enum ia_css_input_mode input_mode)
+ struct ia_css_pipe *me,
+ enum sh_css_pipe_config_override copy_ovrd,
+ enum ia_css_input_mode input_mode)
{
#if defined(HAS_NO_INPUT_SYSTEM)
(void)input_mode;
&me->stream->info.metadata_info
#if !defined(HAS_NO_INPUT_SYSTEM)
, (input_mode == IA_CSS_INPUT_MODE_MEMORY) ?
- (enum mipi_port_id)0 :
- me->stream->config.source.port.port
+ (enum mipi_port_id)0 :
+ me->stream->config.source.port.port
#endif
#ifdef ISP2401
, &me->config.internal_frame_origin_bqs_on_sctbl,
me->stream->isp_params_configs
#endif
- );
+ );
if (me->config.mode != IA_CSS_PIPE_MODE_COPY) {
struct ia_css_pipeline_stage *stage;
assert(stream);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_invalidate_shading_tables() enter:\n");
+ "sh_css_invalidate_shading_tables() enter:\n");
for (i = 0; i < stream->num_pipes; i++) {
assert(stream->pipes[i]);
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_invalidate_shading_tables() leave: return_void\n");
+ "sh_css_invalidate_shading_tables() leave: return_void\n");
}
#ifndef ISP2401
/* Enable SW interrupt 0, this is used to signal ISYS events */
cnd_virq_enable_channel(
- (virq_id_t)(IRQ_SW_CHANNEL0_ID + IRQ_SW_CHANNEL_OFFSET),
- true);
+ (virq_id_t)(IRQ_SW_CHANNEL0_ID + IRQ_SW_CHANNEL_OFFSET),
+ true);
/* Enable SW interrupt 1, this is used to signal PSYS events */
cnd_virq_enable_channel(
- (virq_id_t)(IRQ_SW_CHANNEL1_ID + IRQ_SW_CHANNEL_OFFSET),
- true);
+ (virq_id_t)(IRQ_SW_CHANNEL1_ID + IRQ_SW_CHANNEL_OFFSET),
+ true);
#if !defined(HAS_IRQ_MAP_VERSION_2)
/* IRQ_SW_CHANNEL2_ID does not exist on 240x systems */
cnd_virq_enable_channel(
- (virq_id_t)(IRQ_SW_CHANNEL2_ID + IRQ_SW_CHANNEL_OFFSET),
- true);
+ (virq_id_t)(IRQ_SW_CHANNEL2_ID + IRQ_SW_CHANNEL_OFFSET),
+ true);
virq_clear_all();
#endif
#endif
static bool sh_css_setup_spctrl_config(const struct ia_css_fw_info *fw,
- const char *program,
- ia_css_spctrl_cfg *spctrl_cfg)
+ const char *program,
+ ia_css_spctrl_cfg *spctrl_cfg)
{
if ((!fw) || (!spctrl_cfg))
return false;
void
ia_css_unload_firmware(void)
{
- if (sh_css_num_binaries)
- {
+ if (sh_css_num_binaries) {
/* we have already loaded before so get rid of the old stuff */
ia_css_binary_uninit();
sh_css_unload_firmware();
enum ia_css_err
ia_css_load_firmware(const struct ia_css_env *env,
- const struct ia_css_fw *fw)
-{
+ const struct ia_css_fw *fw) {
enum ia_css_err err;
if (!env)
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_load_firmware() enter\n");
/* make sure we initialize my_css */
- if (my_css.flush != env->cpu_mem_env.flush) {
+ if (my_css.flush != env->cpu_mem_env.flush)
+ {
ia_css_reset_defaults(&my_css);
my_css.flush = env->cpu_mem_env.flush;
}
ia_css_unload_firmware(); /* in case we are called twice */
err = sh_css_load_firmware(fw->data, fw->bytes);
- if (err == IA_CSS_SUCCESS) {
+ if (err == IA_CSS_SUCCESS)
+ {
err = ia_css_binary_init_infos();
if (err == IA_CSS_SUCCESS)
fw_explicitly_loaded = true;
ia_css_init(const struct ia_css_env *env,
const struct ia_css_fw *fw,
u32 mmu_l1_base,
- enum ia_css_irq_type irq_type)
-{
+ enum ia_css_irq_type irq_type) {
enum ia_css_err err;
ia_css_spctrl_cfg spctrl_cfg;
if (!fw && !fw_explicitly_loaded)
return IA_CSS_ERR_INVALID_ARGUMENTS;
if (!env)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
sh_css_printf = env->print_env.debug_print;
ia_css_device_access_init(&env->hw_access_env);
select = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_select)
- & (~GPIO_FLASH_PIN_MASK);
+ & (~GPIO_FLASH_PIN_MASK);
enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e)
- | GPIO_FLASH_PIN_MASK;
+ | GPIO_FLASH_PIN_MASK;
sh_css_mmu_set_page_table_base_index(mmu_l1_base);
#ifndef ISP2401
my_css_save.mmu_base = mmu_l1_base;
my_css.flush = flush_func;
err = ia_css_rmgr_init();
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR(err);
return err;
}
{
my_css_save_initialized = true;
my_css_save.mode = sh_css_mode_working;
- memset(my_css_save.stream_seeds, 0, sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
+ memset(my_css_save.stream_seeds, 0,
+ sizeof(struct sh_css_stream_seed) * MAX_ACTIVE_STREAMS);
IA_CSS_LOG("init: %d mode=%d", my_css_save_initialized, my_css_save.mode);
}
#endif
gpio_reg_store(GPIO0_ID, _gpio_block_reg_do_0, 0);
err = ia_css_refcount_init(REFCOUNT_SIZE);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR(err);
return err;
}
err = sh_css_params_init();
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR(err);
return err;
}
return IA_CSS_ERR_INTERNAL_ERROR;
err = ia_css_spctrl_load_fw(SP0_ID, &spctrl_cfg);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR(err);
return err;
}
#if WITH_PC_MONITORING
- if (!thread_alive) {
+ if (!thread_alive)
+ {
thread_alive++;
sh_css_print("PC_MONITORING: %s() -- create thread DISABLED\n",
__func__);
spying_thread_create();
}
#endif
- if (!sh_css_hrt_system_is_idle()) {
+ if (!sh_css_hrt_system_is_idle())
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_SYSTEM_NOT_IDLE);
return IA_CSS_ERR_SYSTEM_NOT_IDLE;
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_suspend() enter\n");
my_css_save.mode = sh_css_mode_suspend;
for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
- if (my_css_save.stream_seeds[i].stream)
- {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> unloading seed %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
+ if (my_css_save.stream_seeds[i].stream) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> unloading seed %d (%p)\n", i,
+ my_css_save.stream_seeds[i].stream);
ia_css_stream_unload(my_css_save.stream_seeds[i].stream);
}
my_css_save.mode = sh_css_mode_working;
ia_css_stop_sp();
ia_css_uninit();
for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> after 1: seed %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> after 1: seed %d (%p)\n", i,
+ my_css_save.stream_seeds[i].stream);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_suspend() leave\n");
return IA_CSS_SUCCESS;
}
enum ia_css_err
-ia_css_resume(void)
-{
+ia_css_resume(void) {
int i, j;
enum ia_css_err err;
my_css_save.mode = sh_css_mode_resume;
for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> seed stream %p\n", my_css_save.stream_seeds[i].stream);
- if (my_css_save.stream_seeds[i].stream)
- {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> seed stream %p\n",
+ my_css_save.stream_seeds[i].stream);
+ if (my_css_save.stream_seeds[i].stream) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "==*> loading seed %d\n", i);
err = ia_css_stream_load(my_css_save.stream_seeds[i].stream);
- if (err != IA_CSS_SUCCESS)
- {
+ if (err != IA_CSS_SUCCESS) {
if (i)
for (j = 0; j < i; j++)
ia_css_stream_unload(my_css_save.stream_seeds[j].stream);
return err;
}
err = ia_css_stream_start(my_css_save.stream_seeds[i].stream);
- if (err != IA_CSS_SUCCESS)
- {
- for (j = 0; j <= i; j++)
- {
+ if (err != IA_CSS_SUCCESS) {
+ for (j = 0; j <= i; j++) {
ia_css_stream_stop(my_css_save.stream_seeds[j].stream);
ia_css_stream_unload(my_css_save.stream_seeds[j].stream);
}
}
*my_css_save.stream_seeds[i].orig_stream = my_css_save.stream_seeds[i].stream;
for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
- *my_css_save.stream_seeds[i].orig_pipes[j] = my_css_save.stream_seeds[i].pipes[j];
+ *my_css_save.stream_seeds[i].orig_pipes[j] =
+ my_css_save.stream_seeds[i].pipes[j];
}
}
my_css_save.mode = sh_css_mode_working;
}
enum ia_css_err
-ia_css_enable_isys_event_queue(bool enable)
-{
+ia_css_enable_isys_event_queue(bool enable) {
if (sh_css_sp_is_running())
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
sh_css_sp_enable_isys_event_queue(enable);
void *sh_css_malloc(size_t size)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%zu\n", size);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%zu\n",
+ size);
/* FIXME: This first test can probably go away */
if (size == 0)
return NULL;
{
void *p;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%zu, size=%zu\n", N, size);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_calloc() enter: N=%zu, size=%zu\n", N, size);
/* FIXME: this test can probably go away */
if (size > 0) {
* doing it from stream_create since we could run out of sp threads due to
* allocation on inactive pipelines. */
static enum ia_css_err
-map_sp_threads(struct ia_css_stream *stream, bool map)
-{
+map_sp_threads(struct ia_css_stream *stream, bool map) {
struct ia_css_pipe *main_pipe = NULL;
struct ia_css_pipe *copy_pipe = NULL;
struct ia_css_pipe *capture_pipe = NULL;
IA_CSS_ENTER_PRIVATE("stream = %p, map = %s",
stream, map ? "true" : "false");
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ia_css_pipeline_map(main_pipe->pipe_num, map);
- switch (pipe_id) {
+ switch (pipe_id)
+ {
case IA_CSS_PIPE_ID_PREVIEW:
copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
break;
}
- if (acc_pipe) {
+ if (acc_pipe)
+ {
ia_css_pipeline_map(acc_pipe->pipe_num, map);
}
- if (capture_pipe) {
+ if (capture_pipe)
+ {
ia_css_pipeline_map(capture_pipe->pipe_num, map);
}
/* Firmware expects copy pipe to be the last pipe mapped. (if needed) */
- if (copy_pipe) {
+ if (copy_pipe)
+ {
ia_css_pipeline_map(copy_pipe->pipe_num, map);
}
/* DH regular multi pipe - not continuous mode: map the next pipes too */
- if (!stream->config.continuous) {
+ if (!stream->config.continuous)
+ {
int i;
for (i = 1; i < stream->num_pipes; i++)
/* creates a host pipeline skeleton for all pipes in a stream. Called during
* stream_create. */
static enum ia_css_err
-create_host_pipeline_structure(struct ia_css_stream *stream)
-{
+create_host_pipeline_structure(struct ia_css_stream *stream) {
struct ia_css_pipe *copy_pipe = NULL, *capture_pipe = NULL;
struct ia_css_pipe *acc_pipe = NULL;
enum ia_css_pipe_id pipe_id;
struct ia_css_pipe *main_pipe = NULL;
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int copy_pipe_delay = 0,
- capture_pipe_delay = 0;
+ capture_pipe_delay = 0;
assert(stream);
IA_CSS_ENTER_PRIVATE("stream = %p", stream);
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
main_pipe = stream->last_pipe;
assert(main_pipe);
- if (!main_pipe) {
+ if (!main_pipe)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
pipe_id = main_pipe->mode;
- switch (pipe_id) {
+ switch (pipe_id)
+ {
case IA_CSS_PIPE_ID_PREVIEW:
copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
copy_pipe_delay = main_pipe->dvs_frame_delay;
capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
capture_pipe_delay = IA_CSS_FRAME_DELAY_0;
acc_pipe = main_pipe->pipe_settings.preview.acc_pipe;
- err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+ err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+ main_pipe->pipe_num, main_pipe->dvs_frame_delay);
break;
case IA_CSS_PIPE_ID_VIDEO:
copy_pipe_delay = main_pipe->dvs_frame_delay;
capture_pipe = main_pipe->pipe_settings.video.capture_pipe;
capture_pipe_delay = IA_CSS_FRAME_DELAY_0;
- err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+ err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+ main_pipe->pipe_num, main_pipe->dvs_frame_delay);
break;
case IA_CSS_PIPE_ID_CAPTURE:
case IA_CSS_PIPE_ID_YUVPP:
err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
- main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+ main_pipe->pipe_num, main_pipe->dvs_frame_delay);
break;
case IA_CSS_PIPE_ID_ACC:
- err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode, main_pipe->pipe_num, main_pipe->dvs_frame_delay);
+ err = ia_css_pipeline_create(&main_pipe->pipeline, main_pipe->mode,
+ main_pipe->pipe_num, main_pipe->dvs_frame_delay);
break;
default:
err = IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if ((err == IA_CSS_SUCCESS) && copy_pipe) {
+ if ((err == IA_CSS_SUCCESS) && copy_pipe)
+ {
err = ia_css_pipeline_create(©_pipe->pipeline,
- copy_pipe->mode,
- copy_pipe->pipe_num,
- copy_pipe_delay);
+ copy_pipe->mode,
+ copy_pipe->pipe_num,
+ copy_pipe_delay);
}
- if ((err == IA_CSS_SUCCESS) && capture_pipe) {
+ if ((err == IA_CSS_SUCCESS) && capture_pipe)
+ {
err = ia_css_pipeline_create(&capture_pipe->pipeline,
- capture_pipe->mode,
- capture_pipe->pipe_num,
- capture_pipe_delay);
+ capture_pipe->mode,
+ capture_pipe->pipe_num,
+ capture_pipe_delay);
}
- if ((err == IA_CSS_SUCCESS) && acc_pipe) {
- err = ia_css_pipeline_create(&acc_pipe->pipeline, acc_pipe->mode, acc_pipe->pipe_num, main_pipe->dvs_frame_delay);
+ if ((err == IA_CSS_SUCCESS) && acc_pipe)
+ {
+ err = ia_css_pipeline_create(&acc_pipe->pipeline, acc_pipe->mode,
+ acc_pipe->pipe_num, main_pipe->dvs_frame_delay);
}
/* DH regular multi pipe - not continuous mode: create the next pipelines too */
- if (!stream->config.continuous) {
+ if (!stream->config.continuous)
+ {
int i;
for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err; i++) {
main_pipe = stream->pipes[i];
err = ia_css_pipeline_create(&main_pipe->pipeline,
- main_pipe->mode,
- main_pipe->pipe_num,
- main_pipe->dvs_frame_delay);
+ main_pipe->mode,
+ main_pipe->pipe_num,
+ main_pipe->dvs_frame_delay);
}
}
/* creates a host pipeline for all pipes in a stream. Called during
* stream_start. */
static enum ia_css_err
-create_host_pipeline(struct ia_css_stream *stream)
-{
+create_host_pipeline(struct ia_css_stream *stream) {
struct ia_css_pipe *copy_pipe = NULL, *capture_pipe = NULL;
struct ia_css_pipe *acc_pipe = NULL;
enum ia_css_pipe_id pipe_id;
unsigned int max_input_width = 0;
IA_CSS_ENTER_PRIVATE("stream = %p", stream);
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
/* No continuous frame allocation for capture pipe. It uses the
* "main" pipe's frames. */
if ((pipe_id == IA_CSS_PIPE_ID_PREVIEW) ||
- (pipe_id == IA_CSS_PIPE_ID_VIDEO)) {
+ (pipe_id == IA_CSS_PIPE_ID_VIDEO))
+ {
/* About pipe_id == IA_CSS_PIPE_ID_PREVIEW && stream->config.mode != IA_CSS_INPUT_MODE_MEMORY:
* The original condition pipe_id == IA_CSS_PIPE_ID_PREVIEW is too strong. E.g. in SkyCam (with memory
* based input frames) there is no continuous mode and thus no need for allocated continuous frames
* reason the stream->config.mode != IA_CSS_INPUT_MODE_MEMORY has beed added.
*/
if (stream->config.continuous ||
- (pipe_id == IA_CSS_PIPE_ID_PREVIEW && stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)) {
+ (pipe_id == IA_CSS_PIPE_ID_PREVIEW &&
+ stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)) {
err = alloc_continuous_frames(main_pipe, true);
if (err != IA_CSS_SUCCESS)
goto ERR;
#if defined(USE_INPUT_SYSTEM_VERSION_2)
/* old isys: need to allocate_mipi_frames() even in IA_CSS_PIPE_MODE_COPY */
- if (pipe_id != IA_CSS_PIPE_ID_ACC) {
+ if (pipe_id != IA_CSS_PIPE_ID_ACC)
+ {
err = allocate_mipi_frames(main_pipe, &stream->info);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
if ((pipe_id != IA_CSS_PIPE_ID_ACC) &&
- (main_pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
+ (main_pipe->config.mode != IA_CSS_PIPE_MODE_COPY))
+ {
err = allocate_mipi_frames(main_pipe, &stream->info);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
#endif
- switch (pipe_id) {
+ switch (pipe_id)
+ {
case IA_CSS_PIPE_ID_PREVIEW:
copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
capture_pipe = main_pipe->pipe_settings.preview.capture_pipe;
acc_pipe = main_pipe->pipe_settings.preview.acc_pipe;
max_input_width =
- main_pipe->pipe_settings.preview.preview_binary.info->sp.input.max_width;
+ main_pipe->pipe_settings.preview.preview_binary.info->sp.input.max_width;
err = create_host_preview_pipeline(main_pipe);
if (err != IA_CSS_SUCCESS)
copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
capture_pipe = main_pipe->pipe_settings.video.capture_pipe;
max_input_width =
- main_pipe->pipe_settings.video.video_binary.info->sp.input.max_width;
+ main_pipe->pipe_settings.video.video_binary.info->sp.input.max_width;
err = create_host_video_pipeline(main_pipe);
if (err != IA_CSS_SUCCESS)
if (err != IA_CSS_SUCCESS)
goto ERR;
- if (copy_pipe) {
+ if (copy_pipe)
+ {
err = create_host_copy_pipeline(copy_pipe, max_input_width,
- main_pipe->continuous_frames[0]);
+ main_pipe->continuous_frames[0]);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
- if (capture_pipe) {
+ if (capture_pipe)
+ {
err = create_host_capture_pipeline(capture_pipe);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
- if (acc_pipe) {
+ if (acc_pipe)
+ {
err = create_host_acc_pipeline(acc_pipe);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
/* DH regular multi pipe - not continuous mode: create the next pipelines too */
- if (!stream->config.continuous) {
+ if (!stream->config.continuous)
+ {
int i;
for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err; i++) {
static enum ia_css_err
init_pipe_defaults(enum ia_css_pipe_mode mode,
- struct ia_css_pipe *pipe,
- bool copy_pipe)
-{
- if (!pipe) {
+ struct ia_css_pipe *pipe,
+ bool copy_pipe) {
+ if (!pipe)
+ {
IA_CSS_ERROR("NULL pipe parameter");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
*pipe = IA_CSS_DEFAULT_PIPE;
/* TODO: JB should not be needed, but temporary backward reference */
- switch (mode) {
+ switch (mode)
+ {
case IA_CSS_PIPE_MODE_PREVIEW:
pipe->mode = IA_CSS_PIPE_ID_PREVIEW;
pipe->pipe_settings.preview = IA_CSS_DEFAULT_PREVIEW_SETTINGS;
}
static enum ia_css_err
-pipe_generate_pipe_num(const struct ia_css_pipe *pipe, unsigned int *pipe_number)
-{
+pipe_generate_pipe_num(const struct ia_css_pipe *pipe,
+ unsigned int *pipe_number) {
const u8 INVALID_PIPE_NUM = (uint8_t)~(0);
u8 pipe_num = INVALID_PIPE_NUM;
u8 i;
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_ERROR("NULL pipe parameter");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
/* Assign a new pipe_num .... search for empty place */
- for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
+ for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++)
+ {
if (!my_css.all_pipes[i]) {
/*position is reserved */
my_css.all_pipes[i] = (struct ia_css_pipe *)pipe;
break;
}
}
- if (pipe_num == INVALID_PIPE_NUM) {
+ if (pipe_num == INVALID_PIPE_NUM)
+ {
/* Max number of pipes already allocated */
IA_CSS_ERROR("Max number of pipes already created");
return IA_CSS_ERR_RESOURCE_EXHAUSTED;
my_css.all_pipes[pipe_num] = NULL;
my_css.pipe_counter--;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "pipe_release_pipe_num (%d)\n", pipe_num);
+ "pipe_release_pipe_num (%d)\n", pipe_num);
}
static enum ia_css_err
create_pipe(enum ia_css_pipe_mode mode,
struct ia_css_pipe **pipe,
- bool copy_pipe)
-{
+ bool copy_pipe) {
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_pipe *me;
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_ERROR("NULL pipe parameter");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
err = init_pipe_defaults(mode, me, copy_pipe);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
kfree(me);
return err;
}
err = pipe_generate_pipe_num(me, &me->pipe_num);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
kfree(me);
return err;
}
for (i = 0; i < IA_CSS_PIPELINE_NUM_MAX; i++) {
if (my_css.all_pipes[i] &&
- ia_css_pipe_get_pipe_num(my_css.all_pipes[i]) == pipe_num) {
+ ia_css_pipe_get_pipe_num(my_css.all_pipes[i]) == pipe_num) {
return my_css.all_pipes[i];
}
}
/* loop through the stages and unload them */
for (stage = pipeline->stages; stage; stage = stage->next) {
struct ia_css_fw_info *firmware = (struct ia_css_fw_info *)
- stage->firmware;
+ stage->firmware;
if (firmware)
ia_css_pipe_unload_extension(pipe, firmware);
}
}
enum ia_css_err
-ia_css_pipe_destroy(struct ia_css_pipe *pipe)
-{
+ia_css_pipe_destroy(struct ia_css_pipe *pipe) {
enum ia_css_err err = IA_CSS_SUCCESS;
IA_CSS_ENTER("pipe = %p", pipe);
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if (pipe->stream) {
+ if (pipe->stream)
+ {
IA_CSS_LOG("ia_css_stream_destroy not called!");
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- switch (pipe->config.mode) {
+ switch (pipe->config.mode)
+ {
case IA_CSS_PIPE_MODE_PREVIEW:
/* need to take into account that this function is also called
on the internal copy pipe */
if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
ia_css_frame_free_multiple(NUM_CONTINUOUS_FRAMES,
- pipe->continuous_frames);
+ pipe->continuous_frames);
ia_css_metadata_free_multiple(NUM_CONTINUOUS_FRAMES,
- pipe->cont_md_buffers);
+ pipe->cont_md_buffers);
if (pipe->pipe_settings.preview.copy_pipe) {
err = ia_css_pipe_destroy(pipe->pipe_settings.preview.copy_pipe);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
- err);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
+ err);
}
}
break;
case IA_CSS_PIPE_MODE_VIDEO:
if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
ia_css_frame_free_multiple(NUM_CONTINUOUS_FRAMES,
- pipe->continuous_frames);
+ pipe->continuous_frames);
ia_css_metadata_free_multiple(NUM_CONTINUOUS_FRAMES,
- pipe->cont_md_buffers);
+ pipe->cont_md_buffers);
if (pipe->pipe_settings.video.copy_pipe) {
err = ia_css_pipe_destroy(pipe->pipe_settings.video.copy_pipe);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
- err);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipe_destroy(): destroyed internal copy pipe err=%d\n",
+ err);
}
}
#ifndef ISP2401
- ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES, pipe->pipe_settings.video.tnr_frames);
+ ia_css_frame_free_multiple(NUM_VIDEO_TNR_FRAMES,
+ pipe->pipe_settings.video.tnr_frames);
#else
- ia_css_frame_free_multiple(NUM_TNR_FRAMES, pipe->pipe_settings.video.tnr_frames);
+ ia_css_frame_free_multiple(NUM_TNR_FRAMES,
+ pipe->pipe_settings.video.tnr_frames);
#endif
- ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES, pipe->pipe_settings.video.delay_frames);
+ ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES,
+ pipe->pipe_settings.video.delay_frames);
break;
case IA_CSS_PIPE_MODE_CAPTURE:
- ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES, pipe->pipe_settings.capture.delay_frames);
+ ia_css_frame_free_multiple(MAX_NUM_VIDEO_DELAY_FRAMES,
+ pipe->pipe_settings.capture.delay_frames);
break;
case IA_CSS_PIPE_MODE_ACC:
sh_css_pipe_free_acc_binaries(pipe);
pipe_release_pipe_num(ia_css_pipe_get_pipe_num(pipe));
/* Temporarily, not every sh_css_pipe has an acc_extension. */
- if (pipe->config.acc_extension) {
+ if (pipe->config.acc_extension)
+ {
ia_css_pipe_unload_extension(pipe, pipe->config.acc_extension);
}
kfree(pipe);
#if defined(HAS_IRQ_MAP_VERSION_2)
enum ia_css_err ia_css_irq_translate(
- unsigned int *irq_infos)
+ unsigned int *irq_infos)
{
virq_id_t irq;
enum hrt_isp_css_irq_status status = hrt_isp_css_irq_status_more_irqs;
unsigned int infos = 0;
-/* irq_infos can be NULL, but that would make the function useless */
-/* assert(irq_infos != NULL); */
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_irq_translate() enter: irq_infos=%p\n", irq_infos);
+ /* irq_infos can be NULL, but that would make the function useless */
+ /* assert(irq_infos != NULL); */
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_irq_translate() enter: irq_infos=%p\n", irq_infos);
while (status == hrt_isp_css_irq_status_more_irqs) {
status = virq_get_channel_id(&irq);
if (irq_infos)
*irq_infos = infos;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_irq_translate() leave: irq_infos=%u\n",
- infos);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_irq_translate() leave: irq_infos=%u\n",
+ infos);
return IA_CSS_SUCCESS;
}
enum ia_css_err ia_css_irq_enable(
- enum ia_css_irq_info info,
- bool enable)
+ enum ia_css_irq_info info,
+ bool enable)
{
virq_id_t irq = N_virq_id;
}
#else
-#error "sh_css.c: IRQ MAP must be one of \
- {IRQ_MAP_VERSION_2}"
+#error "sh_css.c: IRQ MAP must be one of { IRQ_MAP_VERSION_2 }"
#endif
static unsigned int
{
unsigned int irq_value;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_get_sw_interrupt_value() enter: irq=%d\n", irq);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_get_sw_interrupt_value() enter: irq=%d\n", irq);
irq_value = sh_css_sp_get_sw_interrupt_value(irq);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_get_sw_interrupt_value() leave: irq_value=%d\n", irq_value);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_get_sw_interrupt_value() leave: irq_value=%d\n", irq_value);
return irq_value;
}
/* configure and load the copy binary, the next binary is used to
determine whether the copy binary needs to do left padding. */
static enum ia_css_err load_copy_binary(
- struct ia_css_pipe *pipe,
- struct ia_css_binary *copy_binary,
- struct ia_css_binary *next_binary)
+ struct ia_css_pipe *pipe,
+ struct ia_css_binary *copy_binary,
+ struct ia_css_binary *next_binary)
{
struct ia_css_frame_info copy_out_info, copy_in_info, copy_vf_info;
unsigned int left_padding;
assert(pipe);
assert(copy_binary);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "load_copy_binary() enter:\n");
+ "load_copy_binary() enter:\n");
if (next_binary) {
copy_out_info = next_binary->in_frame_info;
}
ia_css_pipe_get_copy_binarydesc(pipe, ©_descr,
- ©_in_info, ©_out_info, (next_binary) ? NULL : NULL/*TODO: ©_vf_info*/);
+ ©_in_info, ©_out_info,
+ (next_binary) ? NULL : NULL/*TODO: ©_vf_info*/);
err = ia_css_binary_find(©_descr, copy_binary);
if (err != IA_CSS_SUCCESS)
return err;
static enum ia_css_err
alloc_continuous_frames(
- struct ia_css_pipe *pipe, bool init_time)
-{
+ struct ia_css_pipe *pipe, bool init_time) {
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_frame_info ref_info;
enum ia_css_pipe_id pipe_id;
IA_CSS_ENTER_PRIVATE("pipe = %p, init_time = %d", pipe, init_time);
- if ((!pipe) || (!pipe->stream)) {
+ if ((!pipe) || (!pipe->stream))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
pipe_id = pipe->mode;
continuous = pipe->stream->config.continuous;
- if (continuous) {
+ if (continuous)
+ {
if (init_time) {
num_frames = pipe->stream->config.init_num_cont_raw_buf;
pipe->stream->continuous_pipe = pipe;
} else
num_frames = pipe->stream->config.target_num_cont_raw_buf;
- } else {
- num_frames = NUM_ONLINE_INIT_CONTINUOUS_FRAMES;
+ } else
+ {
+ num_frames = NUM_ONLINE_INIT_CONTINUOUS_FRAMES;
}
- if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
+ if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+ {
ref_info = pipe->pipe_settings.preview.preview_binary.in_frame_info;
- } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) {
+ } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
+ {
ref_info = pipe->pipe_settings.video.video_binary.in_frame_info;
- } else {
+ } else
+ {
/* should not happen */
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
#endif
#if !defined(HAS_NO_PACKED_RAW_PIXELS)
- if (pipe->stream->config.pack_raw_pixels) {
+ if (pipe->stream->config.pack_raw_pixels)
+ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW_PACKED\n");
+ "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW_PACKED\n");
ref_info.format = IA_CSS_FRAME_FORMAT_RAW_PACKED;
} else
#endif
{
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW\n");
+ "alloc_continuous_frames() IA_CSS_FRAME_FORMAT_RAW\n");
ref_info.format = IA_CSS_FRAME_FORMAT_RAW;
}
/* Write format back to binary */
- if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
- pipe->pipe_settings.preview.preview_binary.in_frame_info.format = ref_info.format;
+ if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+ {
+ pipe->pipe_settings.preview.preview_binary.in_frame_info.format =
+ ref_info.format;
capture_pipe = pipe->pipe_settings.preview.capture_pipe;
- } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO) {
+ } else if (pipe_id == IA_CSS_PIPE_ID_VIDEO)
+ {
pipe->pipe_settings.video.video_binary.in_frame_info.format = ref_info.format;
capture_pipe = pipe->pipe_settings.video.capture_pipe;
- } else {
+ } else
+ {
/* should not happen */
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
else
idx = pipe->stream->config.init_num_cont_raw_buf;
- for (i = idx; i < NUM_CONTINUOUS_FRAMES; i++) {
+ for (i = idx; i < NUM_CONTINUOUS_FRAMES; i++)
+ {
/* free previous frame */
if (pipe->continuous_frames[i]) {
ia_css_frame_free(pipe->continuous_frames[i]);
if (i < num_frames) {
/* allocate new frame */
err = ia_css_frame_allocate_from_info(
- &pipe->continuous_frames[i],
- &ref_info);
+ &pipe->continuous_frames[i],
+ &ref_info);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
/* allocate metadata buffer */
pipe->cont_md_buffers[i] = ia_css_metadata_allocate(
- &pipe->stream->info.metadata_info);
+ &pipe->stream->info.metadata_info);
}
}
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
}
enum ia_css_err
-ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream)
-{
+ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream) {
if (!stream)
return IA_CSS_ERR_INVALID_ARGUMENTS;
return alloc_continuous_frames(stream->continuous_pipe, false);
}
static enum ia_css_err
-load_preview_binaries(struct ia_css_pipe *pipe)
-{
+load_preview_binaries(struct ia_css_pipe *pipe) {
struct ia_css_frame_info prev_in_info,
- prev_bds_out_info,
- prev_out_info,
- prev_vf_info;
+ prev_bds_out_info,
+ prev_out_info,
+ prev_vf_info;
struct ia_css_binary_descr preview_descr;
bool online;
enum ia_css_err err = IA_CSS_SUCCESS;
* */
need_vf_pp = pipe->config.enable_dz;
need_vf_pp |= pipe_out_info->format != IA_CSS_FRAME_FORMAT_YUV_LINE &&
- !(pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12 ||
- pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_16 ||
- pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_TILEY);
+ !(pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12 ||
+ pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_16 ||
+ pipe_out_info->format == IA_CSS_FRAME_FORMAT_NV12_TILEY);
/* Preview step 1 */
if (pipe->vf_yuv_ds_input_info.res.width)
IA_CSS_FRAME_FORMAT_YUV_LINE);
err = ia_css_pipe_get_preview_binarydesc(
- pipe,
- &preview_descr,
- &prev_in_info,
- &prev_bds_out_info,
- &prev_out_info,
- &prev_vf_info);
+ pipe,
+ &preview_descr,
+ &prev_in_info,
+ &prev_bds_out_info,
+ &prev_out_info,
+ &prev_vf_info);
if (err != IA_CSS_SUCCESS)
return err;
err = ia_css_binary_find(&preview_descr, &mycs->preview_binary);
pipe->info.num_invalid_frames = pipe->num_invalid_frames;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "load_preview_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
- pipe->num_invalid_frames, pipe->dvs_frame_delay);
+ "load_preview_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
+ pipe->num_invalid_frames, pipe->dvs_frame_delay);
#endif
/* The vf_pp binary is needed when (further) YUV downscaling is required */
* then the preview binary selection is done again.
*/
if (need_vf_pp &&
- (mycs->preview_binary.out_frame_info[0].format != IA_CSS_FRAME_FORMAT_YUV_LINE)) {
+ (mycs->preview_binary.out_frame_info[0].format != IA_CSS_FRAME_FORMAT_YUV_LINE))
+ {
/* Preview step 2 */
if (pipe->vf_yuv_ds_input_info.res.width)
prev_vf_info = pipe->vf_yuv_ds_input_info;
prev_vf_info = *pipe_out_info;
ia_css_frame_info_set_format(&prev_vf_info,
- IA_CSS_FRAME_FORMAT_YUV_LINE);
+ IA_CSS_FRAME_FORMAT_YUV_LINE);
err = ia_css_pipe_get_preview_binarydesc(
- pipe,
- &preview_descr,
- &prev_in_info,
- &prev_bds_out_info,
- &prev_out_info,
- &prev_vf_info);
+ pipe,
+ &preview_descr,
+ &prev_in_info,
+ &prev_bds_out_info,
+ &prev_out_info,
+ &prev_vf_info);
if (err != IA_CSS_SUCCESS)
return err;
err = ia_css_binary_find(&preview_descr,
- &mycs->preview_binary);
+ &mycs->preview_binary);
if (err != IA_CSS_SUCCESS)
return err;
}
- if (need_vf_pp) {
+ if (need_vf_pp)
+ {
struct ia_css_binary_descr vf_pp_descr;
/* Viewfinder post-processing */
ia_css_pipe_get_vfpp_binarydesc(pipe, &vf_pp_descr,
- &mycs->preview_binary.out_frame_info[0],
- pipe_out_info);
+ &mycs->preview_binary.out_frame_info[0],
+ pipe_out_info);
err = ia_css_binary_find(&vf_pp_descr,
- &mycs->vf_pp_binary);
+ &mycs->vf_pp_binary);
if (err != IA_CSS_SUCCESS)
return err;
}
#endif
/* Copy */
- if (need_isp_copy_binary) {
+ if (need_isp_copy_binary)
+ {
err = load_copy_binary(pipe,
&mycs->copy_binary,
&mycs->preview_binary);
return err;
}
- if (pipe->shading_table) {
+ if (pipe->shading_table)
+ {
ia_css_shading_table_free(pipe->shading_table);
pipe->shading_table = NULL;
}
}
static enum ia_css_err
-unload_preview_binaries(struct ia_css_pipe *pipe)
-{
+unload_preview_binaries(struct ia_css_pipe *pipe) {
IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+ if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
}
static const struct ia_css_fw_info *last_output_firmware(
- const struct ia_css_fw_info *fw)
+ const struct ia_css_fw_info *fw)
{
const struct ia_css_fw_info *last_fw = NULL;
-/* fw can be NULL */
+ /* fw can be NULL */
IA_CSS_ENTER_LEAVE_PRIVATE("");
for (; fw; fw = fw->next) {
}
static enum ia_css_err add_firmwares(
- struct ia_css_pipeline *me,
- struct ia_css_binary *binary,
- const struct ia_css_fw_info *fw,
- const struct ia_css_fw_info *last_fw,
- unsigned int binary_mode,
- struct ia_css_frame *in_frame,
- struct ia_css_frame *out_frame,
- struct ia_css_frame *vf_frame,
- struct ia_css_pipeline_stage **my_stage,
- struct ia_css_pipeline_stage **vf_stage)
+ struct ia_css_pipeline *me,
+ struct ia_css_binary *binary,
+ const struct ia_css_fw_info *fw,
+ const struct ia_css_fw_info *last_fw,
+ unsigned int binary_mode,
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *out_frame,
+ struct ia_css_frame *vf_frame,
+ struct ia_css_pipeline_stage **my_stage,
+ struct ia_css_pipeline_stage **vf_stage)
{
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_pipeline_stage *extra_stage = NULL;
struct ia_css_pipeline_stage_desc stage_desc;
-/* all args can be NULL ??? */
+ /* all args can be NULL ??? */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "add_firmwares() enter:\n");
+ "add_firmwares() enter:\n");
for (; fw; fw = fw->next) {
struct ia_css_frame *out[IA_CSS_BINARY_MAX_OUTPUT_PORTS] = {NULL};
vf = vf_frame;
}
ia_css_pipe_get_firmwares_stage_desc(&stage_desc, binary,
- out, in, vf, fw, binary_mode);
+ out, in, vf, fw, binary_mode);
err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- &extra_stage);
+ &stage_desc,
+ &extra_stage);
if (err != IA_CSS_SUCCESS)
return err;
if (fw->info.isp.sp.enable.output != 0)
}
static enum ia_css_err add_vf_pp_stage(
- struct ia_css_pipe *pipe,
- struct ia_css_frame *in_frame,
- struct ia_css_frame *out_frame,
- struct ia_css_binary *vf_pp_binary,
- struct ia_css_pipeline_stage **vf_pp_stage)
+ struct ia_css_pipe *pipe,
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *out_frame,
+ struct ia_css_binary *vf_pp_binary,
+ struct ia_css_pipeline_stage **vf_pp_stage)
{
struct ia_css_pipeline *me = NULL;
const struct ia_css_fw_info *last_fw = NULL;
struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
struct ia_css_pipeline_stage_desc stage_desc;
-/* out_frame can be NULL ??? */
+ /* out_frame can be NULL ??? */
if (!pipe)
return IA_CSS_ERR_INVALID_ARGUMENTS;
me = &pipe->pipeline;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "add_vf_pp_stage() enter:\n");
+ "add_vf_pp_stage() enter:\n");
*vf_pp_stage = NULL;
if (last_fw) {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc, vf_pp_binary,
- out_frames, in_frame, NULL);
+ out_frames, in_frame, NULL);
} else {
ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc, vf_pp_binary,
- out_frames, in_frame, NULL);
+ out_frames, in_frame, NULL);
}
err = ia_css_pipeline_create_and_add_stage(me, &stage_desc, vf_pp_stage);
if (err != IA_CSS_SUCCESS)
}
static enum ia_css_err add_yuv_scaler_stage(
- struct ia_css_pipe *pipe,
- struct ia_css_pipeline *me,
- struct ia_css_frame *in_frame,
- struct ia_css_frame *out_frame,
- struct ia_css_frame *internal_out_frame,
- struct ia_css_binary *yuv_scaler_binary,
- struct ia_css_pipeline_stage **pre_vf_pp_stage)
+ struct ia_css_pipe *pipe,
+ struct ia_css_pipeline *me,
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *out_frame,
+ struct ia_css_frame *internal_out_frame,
+ struct ia_css_binary *yuv_scaler_binary,
+ struct ia_css_pipeline_stage **pre_vf_pp_stage)
{
const struct ia_css_fw_info *last_fw;
enum ia_css_err err = IA_CSS_SUCCESS;
assert(yuv_scaler_binary);
assert(pre_vf_pp_stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "add_yuv_scaler_stage() enter:\n");
+ "add_yuv_scaler_stage() enter:\n");
*pre_vf_pp_stage = NULL;
ia_css_pipe_util_create_output_frames(out_frames);
if (last_fw) {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc,
- yuv_scaler_binary, out_frames, in_frame, vf_frame);
+ yuv_scaler_binary, out_frames, in_frame, vf_frame);
} else {
ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
ia_css_pipe_util_set_output_frames(out_frames, 1, internal_out_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc,
- yuv_scaler_binary, out_frames, in_frame, vf_frame);
+ yuv_scaler_binary, out_frames, in_frame, vf_frame);
}
err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc,
in_frame, out_frame, vf_frame,
NULL, pre_vf_pp_stage);
/* If a firmware produce vf_pp output, we set that as vf_pp input */
- (*pre_vf_pp_stage)->args.vf_downscale_log2 = yuv_scaler_binary->vf_downscale_log2;
+ (*pre_vf_pp_stage)->args.vf_downscale_log2 =
+ yuv_scaler_binary->vf_downscale_log2;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "add_yuv_scaler_stage() leave:\n");
+ "add_yuv_scaler_stage() leave:\n");
return err;
}
static enum ia_css_err add_capture_pp_stage(
- struct ia_css_pipe *pipe,
- struct ia_css_pipeline *me,
- struct ia_css_frame *in_frame,
- struct ia_css_frame *out_frame,
- struct ia_css_binary *capture_pp_binary,
- struct ia_css_pipeline_stage **capture_pp_stage)
+ struct ia_css_pipe *pipe,
+ struct ia_css_pipeline *me,
+ struct ia_css_frame *in_frame,
+ struct ia_css_frame *out_frame,
+ struct ia_css_binary *capture_pp_binary,
+ struct ia_css_pipeline_stage **capture_pp_stage)
{
const struct ia_css_fw_info *last_fw = NULL;
enum ia_css_err err = IA_CSS_SUCCESS;
assert(capture_pp_binary);
assert(capture_pp_stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "add_capture_pp_stage() enter:\n");
+ "add_capture_pp_stage() enter:\n");
*capture_pp_stage = NULL;
ia_css_pipe_util_create_output_frames(out_frames);
last_fw = last_output_firmware(pipe->output_stage);
err = ia_css_frame_allocate_from_info(&vf_frame,
- &capture_pp_binary->vf_frame_info);
+ &capture_pp_binary->vf_frame_info);
if (err != IA_CSS_SUCCESS)
return err;
if (last_fw) {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc,
- capture_pp_binary, out_frames, NULL, vf_frame);
+ capture_pp_binary, out_frames, NULL, vf_frame);
} else {
ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc,
- capture_pp_binary, out_frames, NULL, vf_frame);
+ capture_pp_binary, out_frames, NULL, vf_frame);
}
err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc,
/* If a firmware produce vf_pp output, we set that as vf_pp input */
if (*capture_pp_stage) {
(*capture_pp_stage)->args.vf_downscale_log2 =
- capture_pp_binary->vf_downscale_log2;
+ capture_pp_binary->vf_downscale_log2;
}
return err;
}
fw = &sh_css_sp_fw;
HIVE_ADDR_host_sp_queues_initialized =
- fw->info.sp.host_sp_queues_initialized;
+ fw->info.sp.host_sp_queues_initialized;
ia_css_bufq_init();
/* set "host_sp_queues_initialized" to "true" */
sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(host_sp_queues_initialized),
- (uint32_t)(1));
+ (unsigned int)sp_address_of(host_sp_queues_initialized),
+ (uint32_t)(1));
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_setup_queues() leave:\n");
}
static enum ia_css_err
init_vf_frameinfo_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *vf_frame, unsigned int idx)
-{
+ struct ia_css_frame *vf_frame, unsigned int idx) {
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int thread_id;
enum sh_css_queue_id queue_id;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
static unsigned int
get_crop_lines_for_bayer_order(
- const struct ia_css_stream_config *config)
+ const struct ia_css_stream_config *config)
{
assert(config);
if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_BGGR)
static unsigned int
get_crop_columns_for_bayer_order(
- const struct ia_css_stream_config *config)
+ const struct ia_css_stream_config *config)
{
assert(config);
if ((config->input_config.bayer_order == IA_CSS_BAYER_ORDER_RGGB)
/* This function is to get the sum of all extra pixels in addition to the effective
* input, it includes dvs envelop and filter run-in */
static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
- unsigned int *extra_row, unsigned int *extra_column)
+ unsigned int *extra_row, unsigned int *extra_column)
{
enum ia_css_pipe_id pipe_id = pipe->mode;
unsigned int left_cropping = 0, top_cropping = 0;
switch (pipe_id) {
case IA_CSS_PIPE_ID_PREVIEW:
if (pipe->pipe_settings.preview.preview_binary.info) {
- left_cropping = pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.left_cropping;
- top_cropping = pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.top_cropping;
+ left_cropping =
+ pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.left_cropping;
+ top_cropping =
+ pipe->pipe_settings.preview.preview_binary.info->sp.pipeline.top_cropping;
}
dvs_env = pipe->pipe_settings.preview.preview_binary.dvs_envelope;
break;
case IA_CSS_PIPE_ID_VIDEO:
if (pipe->pipe_settings.video.video_binary.info) {
- left_cropping = pipe->pipe_settings.video.video_binary.info->sp.pipeline.left_cropping;
- top_cropping = pipe->pipe_settings.video.video_binary.info->sp.pipeline.top_cropping;
+ left_cropping =
+ pipe->pipe_settings.video.video_binary.info->sp.pipeline.left_cropping;
+ top_cropping =
+ pipe->pipe_settings.video.video_binary.info->sp.pipeline.top_cropping;
}
dvs_env = pipe->pipe_settings.video.video_binary.dvs_envelope;
break;
case IA_CSS_PIPE_ID_CAPTURE:
for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
if (pipe->pipe_settings.capture.primary_binary[i].info) {
- left_cropping += pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.left_cropping;
- top_cropping += pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.top_cropping;
+ left_cropping +=
+ pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.left_cropping;
+ top_cropping +=
+ pipe->pipe_settings.capture.primary_binary[i].info->sp.pipeline.top_cropping;
}
- dvs_env.width += pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.width;
- dvs_env.height += pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.height;
+ dvs_env.width +=
+ pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.width;
+ dvs_env.height +=
+ pipe->pipe_settings.capture.primary_binary[i].dvs_envelope.height;
}
break;
default:
assert(in_frame);
IA_CSS_ENTER_PRIVATE("pipe = %p effective_wd = %u effective_ht = %u",
- pipe, pipe->config.input_effective_res.width,
- pipe->config.input_effective_res.height);
+ pipe, pipe->config.input_effective_res.width,
+ pipe->config.input_effective_res.height);
input_res = &pipe->stream->config.input_config.input_res;
#ifndef ISP2401
static enum ia_css_err
init_in_frameinfo_memory_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *frame, enum ia_css_frame_format format)
-{
+ struct ia_css_frame *frame, enum ia_css_frame_format format) {
struct ia_css_frame *in_frame;
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int thread_id;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
if (format == IA_CSS_FRAME_FORMAT_RAW)
in_frame->info.format = (pipe->stream->config.pack_raw_pixels) ?
- IA_CSS_FRAME_FORMAT_RAW_PACKED : IA_CSS_FRAME_FORMAT_RAW;
+ IA_CSS_FRAME_FORMAT_RAW_PACKED : IA_CSS_FRAME_FORMAT_RAW;
#endif
in_frame->info.res.width = pipe->stream->config.input_config.input_res.width;
in_frame->info.res.height = pipe->stream->config.input_config.input_res.height;
in_frame->info.raw_bit_depth =
- ia_css_pipe_util_pipe_input_format_bpp(pipe);
+ ia_css_pipe_util_pipe_input_format_bpp(pipe);
ia_css_frame_info_set_width(&in_frame->info, pipe->stream->config.input_config.input_res.width, 0);
in_frame->contiguous = false;
in_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
err = ia_css_frame_init_planes(in_frame);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "init_in_frameinfo_memory_defaults() bayer_order = %d:\n", in_frame->info.raw_bayer_order);
+ "init_in_frameinfo_memory_defaults() bayer_order = %d:\n", in_frame->info.raw_bayer_order);
return err;
}
static enum ia_css_err
init_out_frameinfo_defaults(struct ia_css_pipe *pipe,
- struct ia_css_frame *out_frame, unsigned int idx)
-{
+ struct ia_css_frame *out_frame, unsigned int idx) {
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int thread_id;
enum sh_css_queue_id queue_id;
{
struct ia_css_pipeline_stage_desc stage_desc;
struct ia_css_binary *copy_binary, *video_binary,
- *yuv_scaler_binary, *vf_pp_binary;
+ *yuv_scaler_binary, *vf_pp_binary;
struct ia_css_pipeline_stage *copy_stage = NULL;
struct ia_css_pipeline_stage *video_stage = NULL;
struct ia_css_pipeline_stage *yuv_scaler_stage = NULL;
/* When the input system is 2401, always enable 'in_frameinfo_memory'
* except for the following: online or continuous
*/
- need_in_frameinfo_memory = !(pipe->stream->config.online || pipe->stream->config.continuous);
+ need_in_frameinfo_memory = !(pipe->stream->config.online ||
+ pipe->stream->config.continuous);
#else
/* Construct in_frame info (only in case we have dynamic input */
- need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+ need_in_frameinfo_memory = pipe->stream->config.mode ==
+ IA_CSS_INPUT_MODE_MEMORY;
#endif
/* Construct in_frame info (only in case we have dynamic input */
if (need_in_frameinfo_memory) {
in_frame = &pipe->in_frame_struct;
- err = init_in_frameinfo_memory_defaults(pipe, in_frame, IA_CSS_FRAME_FORMAT_RAW);
+ err = init_in_frameinfo_memory_defaults(pipe, in_frame,
+ IA_CSS_FRAME_FORMAT_RAW);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
if (need_copy) {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, NULL, NULL);
+ out_frames, NULL, NULL);
err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc,
©_stage);
#endif
}
- ia_css_pipe_util_set_output_frames(out_frames, 0, need_yuv_pp ? NULL : out_frame);
+ ia_css_pipe_util_set_output_frames(out_frames, 0,
+ need_yuv_pp ? NULL : out_frame);
/* when the video binary supports a second output pin,
it can directly produce the vf_frame. */
if (need_vf_pp) {
ia_css_pipe_get_generic_stage_desc(&stage_desc, video_binary,
- out_frames, in_frame, NULL);
+ out_frames, in_frame, NULL);
} else {
ia_css_pipe_get_generic_stage_desc(&stage_desc, video_binary,
- out_frames, in_frame, vf_frame);
+ out_frames, in_frame, vf_frame);
}
err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- &video_stage);
+ &stage_desc,
+ &video_stage);
if (err != IA_CSS_SUCCESS)
goto ERR;
/* If we use copy iso video, the input must be yuv iso raw */
if (video_stage) {
video_stage->args.copy_vf =
- video_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
+ video_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
video_stage->args.copy_output = video_stage->args.copy_vf;
}
for (frm = 0; frm < NUM_TNR_FRAMES; frm++) {
#endif
video_stage->args.tnr_frames[frm] =
- pipe->pipe_settings.video.tnr_frames[frm];
+ pipe->pipe_settings.video.tnr_frames[frm];
}
for (frm = 0; frm < MAX_NUM_VIDEO_DELAY_FRAMES; frm++) {
video_stage->args.delay_frames[frm] =
- pipe->pipe_settings.video.delay_frames[frm];
+ pipe->pipe_settings.video.delay_frames[frm];
}
}
/* Append Extension on Video out, if enabled */
if (!need_vf_pp && video_stage && pipe->config.acc_extension &&
- (pipe->config.acc_extension->info.isp.type == IA_CSS_ACC_OUTPUT))
- {
+ (pipe->config.acc_extension->info.isp.type == IA_CSS_ACC_OUTPUT)) {
struct ia_css_frame *out = NULL;
struct ia_css_frame *in = NULL;
}
err = add_firmwares(me, video_binary, pipe->output_stage,
- last_output_firmware(pipe->output_stage),
- IA_CSS_BINARY_MODE_VIDEO,
- in, out, NULL, &video_stage, NULL);
+ last_output_firmware(pipe->output_stage),
+ IA_CSS_BINARY_MODE_VIDEO,
+ in, out, NULL, &video_stage, NULL);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
}
pipe->pipeline.acquire_isp_each_stage = false;
- ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+ ia_css_pipeline_finalize_stages(&pipe->pipeline,
+ pipe->stream->config.continuous);
ERR:
IA_CSS_LEAVE_ERR_PRIVATE(err);
}
static enum ia_css_err
-create_host_acc_pipeline(struct ia_css_pipe *pipe)
-{
+create_host_acc_pipeline(struct ia_css_pipe *pipe) {
enum ia_css_err err = IA_CSS_SUCCESS;
const struct ia_css_fw_info *fw;
unsigned int i;
IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (!pipe->stream)) {
+ if ((!pipe) || (!pipe->stream))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
pipe->pipeline.num_execs = pipe->config.acc_num_execs;
/* Reset pipe_qos_config to default disable all QOS extension stages */
if (pipe->config.acc_extension)
- pipe->pipeline.pipe_qos_config = 0;
+ pipe->pipeline.pipe_qos_config = 0;
fw = pipe->vf_stage;
- for (i = 0; fw; fw = fw->next) {
+ for (i = 0; fw; fw = fw->next)
+ {
err = sh_css_pipeline_add_acc_stage(&pipe->pipeline, fw);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
- for (i = 0; i < pipe->config.num_acc_stages; i++) {
+ for (i = 0; i < pipe->config.num_acc_stages; i++)
+ {
struct ia_css_fw_info *fw = pipe->config.acc_stages[i];
err = sh_css_pipeline_add_acc_stage(&pipe->pipeline, fw);
/* Create stages for preview */
static enum ia_css_err
-create_host_preview_pipeline(struct ia_css_pipe *pipe)
-{
+create_host_preview_pipeline(struct ia_css_pipe *pipe) {
struct ia_css_pipeline_stage *copy_stage = NULL;
struct ia_css_pipeline_stage *preview_stage = NULL;
struct ia_css_pipeline_stage *vf_pp_stage = NULL;
#endif
IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+ if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
online = pipe->stream->config.online;
continuous = pipe->stream->config.continuous;
need_in_frameinfo_memory =
- !((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
+ !((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
#else
/* Construct in_frame info (only in case we have dynamic input */
need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
#endif
- if (need_in_frameinfo_memory) {
- err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame, IA_CSS_FRAME_FORMAT_RAW);
+ if (need_in_frameinfo_memory)
+ {
+ err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame,
+ IA_CSS_FRAME_FORMAT_RAW);
if (err != IA_CSS_SUCCESS)
goto ERR;
in_frame = &me->in_frame;
- } else {
+ } else
+ {
in_frame = NULL;
}
if (pipe->pipe_settings.preview.vf_pp_binary.info)
vf_pp_binary = &pipe->pipe_settings.preview.vf_pp_binary;
- if (pipe->pipe_settings.preview.copy_binary.info) {
+ if (pipe->pipe_settings.preview.copy_binary.info)
+ {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, NULL, NULL);
+ out_frames, NULL, NULL);
err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- ©_stage);
+ &stage_desc,
+ ©_stage);
if (err != IA_CSS_SUCCESS)
goto ERR;
in_frame = me->stages->args.out_frame[0];
#ifndef ISP2401
- } else {
+ } else
+ {
#else
- } else if (pipe->stream->config.continuous) {
+ } else if (pipe->stream->config.continuous)
+ {
#endif
#ifdef USE_INPUT_SYSTEM_VERSION_2401
/* When continuous is enabled, configure in_frame with the
#endif
}
- if (vf_pp_binary) {
+ if (vf_pp_binary)
+ {
ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
ia_css_pipe_get_generic_stage_desc(&stage_desc, preview_binary,
- out_frames, in_frame, NULL);
- } else {
+ out_frames, in_frame, NULL);
+ } else
+ {
ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc, preview_binary,
- out_frames, in_frame, NULL);
+ out_frames, in_frame, NULL);
}
err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc,
goto ERR;
/* If we use copy iso preview, the input must be yuv iso raw */
preview_stage->args.copy_vf =
- preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
+ preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY;
preview_stage->args.copy_output = !preview_stage->args.copy_vf;
- if (preview_stage->args.copy_vf && !preview_stage->args.out_vf_frame) {
+ if (preview_stage->args.copy_vf && !preview_stage->args.out_vf_frame)
+ {
/* in case of copy, use the vf frame as output frame */
preview_stage->args.out_vf_frame =
- preview_stage->args.out_frame[0];
+ preview_stage->args.out_frame[0];
}
- if (vf_pp_binary) {
+ if (vf_pp_binary)
+ {
if (preview_binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_COPY)
in_frame = preview_stage->args.out_vf_frame;
else
in_frame = preview_stage->args.out_frame[0];
err = add_vf_pp_stage(pipe, in_frame, out_frame, vf_pp_binary,
- &vf_pp_stage);
+ &vf_pp_stage);
if (err != IA_CSS_SUCCESS)
goto ERR;
}
unsigned int i;
sh_css_update_host2sp_cont_num_raw_frames
- (pipe->stream->config.init_num_cont_raw_buf, true);
+ (pipe->stream->config.init_num_cont_raw_buf, true);
sh_css_update_host2sp_cont_num_raw_frames
- (pipe->stream->config.target_num_cont_raw_buf, false);
+ (pipe->stream->config.target_num_cont_raw_buf, false);
/* Hand-over all the SP-internal buffers */
for (i = 0; i < pipe->stream->config.init_num_cont_raw_buf; i++) {
sh_css_update_host2sp_offline_frame(i,
- pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
+ pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
}
}
}
static enum ia_css_err
-preview_start(struct ia_css_pipe *pipe)
-{
+preview_start(struct ia_css_pipe *pipe) {
struct ia_css_pipeline *me;
struct ia_css_binary *copy_binary, *preview_binary, *vf_pp_binary = NULL;
enum ia_css_err err = IA_CSS_SUCCESS;
enum ia_css_input_mode preview_pipe_input_mode;
IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW)) {
+ if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_PREVIEW))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
copy_ovrd = 1 << thread_id;
- if (pipe->stream->cont_capt) {
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
+ if (pipe->stream->cont_capt)
+ {
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+ &thread_id);
copy_ovrd |= 1 << thread_id;
}
}
/* Construct and load the copy pipe */
- if (pipe->stream->config.continuous) {
+ if (pipe->stream->config.continuous)
+ {
sh_css_sp_init_pipeline(©_pipe->pipeline,
- IA_CSS_PIPE_ID_COPY,
- (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
- false,
- pipe->stream->config.pixels_per_clock == 2, false,
- false, pipe->required_bds_factor,
- copy_ovrd,
- pipe->stream->config.mode,
- &pipe->stream->config.metadata_config,
+ IA_CSS_PIPE_ID_COPY,
+ (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
+ false,
+ pipe->stream->config.pixels_per_clock == 2, false,
+ false, pipe->required_bds_factor,
+ copy_ovrd,
+ pipe->stream->config.mode,
+ &pipe->stream->config.metadata_config,
#ifndef ISP2401
- &pipe->stream->info.metadata_info
+ &pipe->stream->info.metadata_info
#else
- &pipe->stream->info.metadata_info,
+ &pipe->stream->info.metadata_info,
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
#ifndef ISP2401
- , pipe->stream->config.source.port.port
+ , pipe->stream->config.source.port.port
#else
- pipe->stream->config.source.port.port,
+ pipe->stream->config.source.port.port,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
- & pipe->config.internal_frame_origin_bqs_on_sctbl,
- pipe->stream->isp_params_configs);
+ & pipe->config.internal_frame_origin_bqs_on_sctbl,
+ pipe->stream->isp_params_configs);
#endif
/* make the preview pipe start with mem mode input, copy handles
}
/* Construct and load the capture pipe */
- if (pipe->stream->cont_capt) {
+ if (pipe->stream->cont_capt)
+ {
sh_css_sp_init_pipeline(&capture_pipe->pipeline,
- IA_CSS_PIPE_ID_CAPTURE,
- (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
- capture_pipe->config.default_capture_config.enable_xnr != 0,
- capture_pipe->stream->config.pixels_per_clock == 2,
- true, /* continuous */
- false, /* offline */
- capture_pipe->required_bds_factor,
- 0,
- IA_CSS_INPUT_MODE_MEMORY,
- &pipe->stream->config.metadata_config,
+ IA_CSS_PIPE_ID_CAPTURE,
+ (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
+ capture_pipe->config.default_capture_config.enable_xnr != 0,
+ capture_pipe->stream->config.pixels_per_clock == 2,
+ true, /* continuous */
+ false, /* offline */
+ capture_pipe->required_bds_factor,
+ 0,
+ IA_CSS_INPUT_MODE_MEMORY,
+ &pipe->stream->config.metadata_config,
#ifndef ISP2401
- &pipe->stream->info.metadata_info
+ &pipe->stream->info.metadata_info
#else
- &pipe->stream->info.metadata_info,
+ &pipe->stream->info.metadata_info,
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
#ifndef ISP2401
- , (enum mipi_port_id)0
+ , (enum mipi_port_id)0
#else
- (enum mipi_port_id)0,
+ (enum mipi_port_id)0,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
- & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
- capture_pipe->stream->isp_params_configs);
+ & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
+ capture_pipe->stream->isp_params_configs);
#endif
}
- if (acc_pipe) {
+ if (acc_pipe)
+ {
sh_css_sp_init_pipeline(&acc_pipe->pipeline,
- IA_CSS_PIPE_ID_ACC,
- (uint8_t)ia_css_pipe_get_pipe_num(acc_pipe),
- false,
- pipe->stream->config.pixels_per_clock == 2,
- false, /* continuous */
- false, /* offline */
- pipe->required_bds_factor,
- 0,
- IA_CSS_INPUT_MODE_MEMORY,
- NULL,
+ IA_CSS_PIPE_ID_ACC,
+ (uint8_t)ia_css_pipe_get_pipe_num(acc_pipe),
+ false,
+ pipe->stream->config.pixels_per_clock == 2,
+ false, /* continuous */
+ false, /* offline */
+ pipe->required_bds_factor,
+ 0,
+ IA_CSS_INPUT_MODE_MEMORY,
+ NULL,
#ifndef ISP2401
- NULL
+ NULL
#else
- NULL,
+ NULL,
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
#ifndef ISP2401
- , (enum mipi_port_id)0
+ , (enum mipi_port_id)0
#else
- (enum mipi_port_id)0,
+ (enum mipi_port_id)0,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
- & pipe->config.internal_frame_origin_bqs_on_sctbl,
- pipe->stream->isp_params_configs);
+ & pipe->config.internal_frame_origin_bqs_on_sctbl,
+ pipe->stream->isp_params_configs);
#endif
}
enum ia_css_err
ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe,
- const struct ia_css_buffer *buffer)
-{
+ const struct ia_css_buffer *buffer) {
enum ia_css_err return_err = IA_CSS_SUCCESS;
unsigned int thread_id;
enum sh_css_queue_id queue_id;
IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
- if ((!pipe) || (!buffer)) {
+ if ((!pipe) || (!buffer))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
/* following code will be enabled when IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME
is removed */
#if 0
- if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
+ if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
+ {
bool found_pipe = false;
for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
if ((buffer->data.frame->info.res.width == pipe->output_info[i].res.width) &&
- (buffer->data.frame->info.res.height == pipe->output_info[i].res.height)) {
+ (buffer->data.frame->info.res.height == pipe->output_info[i].res.height)) {
buf_type += i;
found_pipe = true;
break;
if (!found_pipe)
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME) {
+ if (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
+ {
bool found_pipe = false;
for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
if ((buffer->data.frame->info.res.width == pipe->vf_output_info[i].res.width) &&
- (buffer->data.frame->info.res.height == pipe->vf_output_info[i].res.height)) {
+ (buffer->data.frame->info.res.height == pipe->vf_output_info[i].res.height)) {
buf_type += i;
found_pipe = true;
break;
assert(buf_type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE);
if ((buf_type == IA_CSS_BUFFER_TYPE_INVALID) ||
(buf_type >= IA_CSS_NUM_DYNAMIC_BUFFER_TYPE) ||
- (pipe_id >= IA_CSS_PIPE_ID_NUM)) {
+ (pipe_id >= IA_CSS_PIPE_ID_NUM))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
}
ret_err = ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- if (!ret_err) {
+ if (!ret_err)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ret_err = ia_css_query_internal_queue_id(buf_type, thread_id, &queue_id);
- if (!ret_err) {
+ if (!ret_err)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES)) {
+ if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
IA_CSS_LOG("SP is not running!");
IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
/* SP is not running. The queues are not valid */
ddr_buffer.cookie_ptr = buffer->driver_cookie;
ddr_buffer.timing_data = buffer->timing_data;
- if (buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS) {
+ if (buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS)
+ {
if (!buffer->data.stats_3a) {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.stats_3a);
ddr_buffer.payload.s3a = *buffer->data.stats_3a;
- } else if (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS) {
+ } else if (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
+ {
if (!buffer->data.stats_dvs) {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.stats_dvs);
ddr_buffer.payload.dis = *buffer->data.stats_dvs;
- } else if (buf_type == IA_CSS_BUFFER_TYPE_METADATA) {
+ } else if (buf_type == IA_CSS_BUFFER_TYPE_METADATA)
+ {
if (!buffer->data.metadata) {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
ddr_buffer.kernel_ptr = HOST_ADDRESS(buffer->data.metadata);
ddr_buffer.payload.metadata = *buffer->data.metadata;
} else if ((buf_type == IA_CSS_BUFFER_TYPE_INPUT_FRAME)
- || (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
- || (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
- || (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
- || (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME)) {
+ || (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)
+ || (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
+ || (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
+ || (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME))
+ {
if (!buffer->data.frame) {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
ddr_buffer.payload.frame.flashed = 0;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipe_enqueue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
- buf_type, buffer->data.frame->data);
+ "ia_css_pipe_enqueue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
+ buf_type, buffer->data.frame->data);
#if CONFIG_ON_FRAME_ENQUEUE()
return_err = set_config_on_frame_enqueue(
- &buffer->data.frame->info,
- &ddr_buffer.payload.frame);
+ &buffer->data.frame->info,
+ &ddr_buffer.payload.frame);
if (return_err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR(return_err);
return return_err;
assert(h_vbuf);
assert(h_vbuf->vptr != 0x0);
- if ((!h_vbuf) || (h_vbuf->vptr == 0x0)) {
+ if ((!h_vbuf) || (h_vbuf->vptr == 0x0))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
}
mmgr_store(h_vbuf->vptr,
- (void *)(&ddr_buffer),
- sizeof(struct sh_css_hmm_buffer));
+ (void *)(&ddr_buffer),
+ sizeof(struct sh_css_hmm_buffer));
if ((buf_type == IA_CSS_BUFFER_TYPE_3A_STATISTICS)
- || (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
- || (buf_type == IA_CSS_BUFFER_TYPE_LACE_STATISTICS)) {
+ || (buf_type == IA_CSS_BUFFER_TYPE_DIS_STATISTICS)
+ || (buf_type == IA_CSS_BUFFER_TYPE_LACE_STATISTICS))
+ {
if (!pipeline) {
ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &h_vbuf);
IA_CSS_LOG("pipeline is empty!");
if (STATS_ENABLED(stage)) {
/* there is a stage that needs it */
return_err = ia_css_bufq_enqueue_buffer(thread_id,
- queue_id,
- (uint32_t)h_vbuf->vptr);
+ queue_id,
+ (uint32_t)h_vbuf->vptr);
}
}
} else if ((buf_type == IA_CSS_BUFFER_TYPE_INPUT_FRAME)
|| (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)
|| (buf_type == IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME)
|| (buf_type == IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME)
- || (buf_type == IA_CSS_BUFFER_TYPE_METADATA)) {
+ || (buf_type == IA_CSS_BUFFER_TYPE_METADATA))
+ {
return_err = ia_css_bufq_enqueue_buffer(thread_id,
queue_id,
(uint32_t)h_vbuf->vptr);
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
- if ((return_err == IA_CSS_SUCCESS) && (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)) {
+ if ((return_err == IA_CSS_SUCCESS) &&
+ (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME)) {
IA_CSS_LOG("pfp: enqueued OF %d to q %d thread %d",
- ddr_buffer.payload.frame.frame_data,
- queue_id, thread_id);
+ ddr_buffer.payload.frame.frame_data,
+ queue_id, thread_id);
}
#endif
}
- if (return_err == IA_CSS_SUCCESS) {
+ if (return_err == IA_CSS_SUCCESS)
+ {
if (sh_css_hmm_buffer_record_acquire(
- h_vbuf, buf_type,
- HOST_ADDRESS(ddr_buffer.kernel_ptr))) {
+ h_vbuf, buf_type,
+ HOST_ADDRESS(ddr_buffer.kernel_ptr))) {
IA_CSS_LOG("send vbuf=%p", h_vbuf);
} else {
return_err = IA_CSS_ERR_INTERNAL_ERROR;
* Tell the SP which queues are not empty,
* by sending the software event.
*/
- if (return_err == IA_CSS_SUCCESS) {
+ if (return_err == IA_CSS_SUCCESS)
+ {
if (!sh_css_sp_is_running()) {
/* SP is not running. The queues are not valid */
IA_CSS_LOG("SP is not running!");
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
return_err = ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
- (uint8_t)thread_id,
- queue_id,
- 0);
- } else {
+ IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
+ (uint8_t)thread_id,
+ queue_id,
+ 0);
+ } else
+ {
ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &h_vbuf);
IA_CSS_ERROR("buffer not enqueued");
}
*/
enum ia_css_err
ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe,
- struct ia_css_buffer *buffer)
-{
+ struct ia_css_buffer *buffer) {
enum ia_css_err return_err;
enum sh_css_queue_id queue_id;
hrt_vaddress ddr_buffer_addr = (hrt_vaddress)0;
IA_CSS_ENTER("pipe=%p, buffer=%p", pipe, buffer);
- if ((!pipe) || (!buffer)) {
+ if ((!pipe) || (!buffer))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ddr_buffer.kernel_ptr = 0;
ret_err = ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- if (!ret_err) {
+ if (!ret_err)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
ret_err = ia_css_query_internal_queue_id(buf_type, thread_id, &queue_id);
- if (!ret_err) {
+ if (!ret_err)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES)) {
+ if ((queue_id <= SH_CSS_INVALID_QUEUE_ID) || (queue_id >= SH_CSS_MAX_NUM_QUEUES))
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
IA_CSS_LOG("SP is not running!");
IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
/* SP is not running. The queues are not valid */
}
return_err = ia_css_bufq_dequeue_buffer(queue_id,
- (uint32_t *)&ddr_buffer_addr);
+ (uint32_t *)&ddr_buffer_addr);
- if (return_err == IA_CSS_SUCCESS) {
+ if (return_err == IA_CSS_SUCCESS)
+ {
struct ia_css_frame *frame;
struct sh_css_hmm_buffer_record *hmm_buffer_record = NULL;
/* Validate the ddr_buffer_addr and buf_type */
hmm_buffer_record = sh_css_hmm_buffer_record_validate(
- ddr_buffer_addr, buf_type);
+ ddr_buffer_addr, buf_type);
if (hmm_buffer_record) {
/* valid hmm_buffer_record found. Save the kernel_ptr
* for validation after performing mmgr_load. The
sh_css_hmm_buffer_record_reset(hmm_buffer_record);
} else {
IA_CSS_ERROR("hmm_buffer_record not found (0x%x) buf_type(%d)",
- ddr_buffer_addr, buf_type);
+ ddr_buffer_addr, buf_type);
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
}
mmgr_load(ddr_buffer_addr,
- &ddr_buffer,
- sizeof(struct sh_css_hmm_buffer));
+ &ddr_buffer,
+ sizeof(struct sh_css_hmm_buffer));
/* if the kernel_ptr is 0 or an invalid, return an error.
* do not access the buffer via the kernal_ptr.
buffer->timing_data = ddr_buffer.timing_data;
if ((buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) ||
- (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)) {
+ (buf_type == IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME)) {
buffer->isys_eof_clock_tick.ticks = ddr_buffer.isys_eof_clock_tick;
}
case IA_CSS_BUFFER_TYPE_INPUT_FRAME:
case IA_CSS_BUFFER_TYPE_OUTPUT_FRAME:
case IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME:
- if ((pipe) && (pipe->stop_requested == true))
- {
+ if ((pipe) && (pipe->stop_requested == true)) {
#if defined(USE_INPUT_SYSTEM_VERSION_2)
/* free mipi frames only for old input system
* for 2401 it is done in ia_css_stream_destroy call
frame->isp_config_id = ddr_buffer.payload.frame.isp_parameters_id;
if (ddr_buffer.payload.frame.flashed == 1)
frame->flash_state =
- IA_CSS_FRAME_FLASH_STATE_PARTIAL;
+ IA_CSS_FRAME_FLASH_STATE_PARTIAL;
if (ddr_buffer.payload.frame.flashed == 2)
frame->flash_state =
- IA_CSS_FRAME_FLASH_STATE_FULL;
+ IA_CSS_FRAME_FLASH_STATE_FULL;
frame->valid = pipe->num_invalid_frames == 0;
if (!frame->valid)
pipe->num_invalid_frames--;
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
if (buf_type == IA_CSS_BUFFER_TYPE_OUTPUT_FRAME) {
IA_CSS_LOG("pfp: dequeued OF %d with config id %d thread %d",
- frame->data, frame->isp_config_id, thread_id);
+ frame->data, frame->isp_config_id, thread_id);
}
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipe_dequeue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
- buf_type, buffer->data.frame->data);
+ "ia_css_pipe_dequeue_buffer() buf_type=%d, data(DDR address)=0x%x\n",
+ buf_type, buffer->data.frame->data);
break;
case IA_CSS_BUFFER_TYPE_3A_STATISTICS:
buffer->data.stats_3a =
- (struct ia_css_isp_3a_statistics *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
+ (struct ia_css_isp_3a_statistics *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
buffer->exp_id = ddr_buffer.payload.s3a.exp_id;
buffer->data.stats_3a->exp_id = ddr_buffer.payload.s3a.exp_id;
buffer->data.stats_3a->isp_config_id = ddr_buffer.payload.s3a.isp_config_id;
break;
case IA_CSS_BUFFER_TYPE_DIS_STATISTICS:
buffer->data.stats_dvs =
- (struct ia_css_isp_dvs_statistics *)
- HOST_ADDRESS(ddr_buffer.kernel_ptr);
+ (struct ia_css_isp_dvs_statistics *)
+ HOST_ADDRESS(ddr_buffer.kernel_ptr);
buffer->exp_id = ddr_buffer.payload.dis.exp_id;
buffer->data.stats_dvs->exp_id = ddr_buffer.payload.dis.exp_id;
break;
break;
case IA_CSS_BUFFER_TYPE_METADATA:
buffer->data.metadata =
- (struct ia_css_metadata *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
+ (struct ia_css_metadata *)HOST_ADDRESS(ddr_buffer.kernel_ptr);
buffer->exp_id = ddr_buffer.payload.metadata.exp_id;
buffer->data.metadata->exp_id = ddr_buffer.payload.metadata.exp_id;
break;
* Tell the SP which queues are not full,
* by sending the software event.
*/
- if (return_err == IA_CSS_SUCCESS) {
+ if (return_err == IA_CSS_SUCCESS)
+ {
if (!sh_css_sp_is_running()) {
IA_CSS_LOG("SP is not running!");
IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
- 0,
- queue_id,
- 0);
+ IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
+ 0,
+ queue_id,
+ 0);
}
IA_CSS_LEAVE("buffer=%p", buffer);
};
enum ia_css_err
-ia_css_dequeue_event(struct ia_css_event *event)
-{
+ia_css_dequeue_event(struct ia_css_event *event) {
return ia_css_dequeue_psys_event(event);
}
enum ia_css_err
-ia_css_dequeue_psys_event(struct ia_css_event *event)
-{
+ia_css_dequeue_psys_event(struct ia_css_event *event) {
enum ia_css_pipe_id pipe_id = 0;
u8 payload[4] = {0, 0, 0, 0};
enum ia_css_err ret_err;
if (!event)
return IA_CSS_ERR_INVALID_ARGUMENTS;
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
/* SP is not running. The queues are not valid */
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
/* Tell the SP that we dequeued an event from the event queue. */
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
/* Events are decoded into 4 bytes of payload, the first byte
* contains the sp event type. This is converted to a host enum.
event->timer_code = 0;
event->timer_subcode = 0;
- if (event->type == IA_CSS_EVENT_TYPE_TIMER) {
+ if (event->type == IA_CSS_EVENT_TYPE_TIMER)
+ {
/* timer event ??? get the 2nd event and decode the data into the event struct */
u32 tmp_data;
/* 1st event: LSB 16-bit timer data and code */
return ret_err;
}
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_EVENT_DEQUEUED, 0, 0, 0);
event->type = convert_event_sp_to_host_domain[payload[0]];
- /* It's a timer */
+ /* It's a timer */
if (event->type == IA_CSS_EVENT_TYPE_TIMER) {
/* 2nd event data: MSB 16-bit timer and subcode */
tmp_data = ((payload[1] & 0xFF) | ((payload[3] & 0xFF) << 8));
IA_CSS_ERROR("Missing 2nd timer event. Timer event discarded");
}
}
- if (event->type == IA_CSS_EVENT_TYPE_PORT_EOF) {
+ if (event->type == IA_CSS_EVENT_TYPE_PORT_EOF)
+ {
event->port = (enum mipi_port_id)payload[1];
event->exp_id = payload[3];
- } else if (event->type == IA_CSS_EVENT_TYPE_FW_WARNING) {
+ } else if (event->type == IA_CSS_EVENT_TYPE_FW_WARNING)
+ {
event->fw_warning = (enum ia_css_fw_warning)payload[1];
/* exp_id is only available in these warning types */
if (event->fw_warning == IA_CSS_FW_WARNING_EXP_ID_LOCKED ||
event->fw_warning == IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED)
event->exp_id = payload[3];
- } else if (event->type == IA_CSS_EVENT_TYPE_FW_ASSERT) {
+ } else if (event->type == IA_CSS_EVENT_TYPE_FW_ASSERT)
+ {
event->fw_assert_module_id = payload[1]; /* module */
event->fw_assert_line_no = (payload[2] << 8) + payload[3];
/* payload[2] is line_no>>8, payload[3] is line_no&0xff */
- } else if (event->type != IA_CSS_EVENT_TYPE_TIMER) {
+ } else if (event->type != IA_CSS_EVENT_TYPE_TIMER)
+ {
/* pipe related events.
* payload[1] contains the pipe_num,
* payload[2] contains the pipe_id. These are different. */
n = event->pipe->stream->num_pipes;
for (i = 0; i < n; i++) {
struct ia_css_pipe *p =
- event->pipe->stream->pipes[i];
+ event->pipe->stream->pipes[i];
if (p->config.mode == IA_CSS_PIPE_MODE_CAPTURE) {
event->pipe = p;
break;
u32 stage_num = (uint32_t)payload[3];
ret_err = ia_css_pipeline_get_fw_from_stage(
- &event->pipe->pipeline,
- stage_num,
- &event->fw_handle);
+ &event->pipe->pipeline,
+ stage_num,
+ &event->fw_handle);
if (ret_err != IA_CSS_SUCCESS) {
IA_CSS_ERROR("Invalid stage num received for ACC event. stage_num:%u",
stage_num);
}
enum ia_css_err
-ia_css_dequeue_isys_event(struct ia_css_event *event)
-{
+ia_css_dequeue_isys_event(struct ia_css_event *event) {
u8 payload[4] = {0, 0, 0, 0};
enum ia_css_err err = IA_CSS_SUCCESS;
if (!event)
return IA_CSS_ERR_INVALID_ARGUMENTS;
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
/* SP is not running. The queues are not valid */
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
assert(pipe->stream);
start_pipe(pipe, SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD,
- pipe->stream->config.mode);
+ pipe->stream->config.mode);
}
static enum ia_css_err
-sh_css_pipe_start(struct ia_css_stream *stream)
-{
+sh_css_pipe_start(struct ia_css_stream *stream) {
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_pipe *pipe;
IA_CSS_ENTER_PRIVATE("stream = %p", stream);
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
pipe = stream->last_pipe;
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
pipe_id = pipe->mode;
- if (stream->started == true) {
+ if (stream->started == true)
+ {
IA_CSS_WARNING("Cannot start stream that is already started");
IA_CSS_LEAVE_ERR(err);
return err;
pipe->stop_requested = false;
- switch (pipe_id) {
+ switch (pipe_id)
+ {
case IA_CSS_PIPE_ID_PREVIEW:
err = preview_start(pipe);
break;
err = IA_CSS_ERR_INVALID_ARGUMENTS;
}
/* DH regular multi pipe - not continuous mode: start the next pipes too */
- if (!stream->config.continuous) {
+ if (!stream->config.continuous)
+ {
int i;
for (i = 1; i < stream->num_pipes && IA_CSS_SUCCESS == err ; i++) {
}
}
}
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
* don't use ISP parameters anyway. So this should be okay.
* The SP binary (jpeg) copy does not use any parameters.
*/
- if (!copy_on_sp(pipe)) {
+ if (!copy_on_sp(pipe))
+ {
sh_css_invalidate_params(stream);
err = sh_css_param_update_isp_params(pipe,
- stream->isp_params_configs, true, NULL);
+ stream->isp_params_configs, true, NULL);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
/* SP is not running. The queues are not valid */
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
(uint8_t)thread_id, 0, 0);
/* DH regular multi pipe - not continuous mode: enqueue event to the next pipes too */
- if (!stream->config.continuous) {
+ if (!stream->config.continuous)
+ {
int i;
for (i = 1; i < stream->num_pipes; i++) {
ia_css_pipeline_get_sp_thread_id(
- ia_css_pipe_get_pipe_num(stream->pipes[i]),
- &thread_id);
+ ia_css_pipe_get_pipe_num(stream->pipes[i]),
+ &thread_id);
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_START_STREAM,
- (uint8_t)thread_id, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_START_STREAM,
+ (uint8_t)thread_id, 0, 0);
}
}
/* in case of continuous capture mode, we also start capture thread and copy thread*/
- if (pipe->stream->config.continuous) {
+ if (pipe->stream->config.continuous)
+ {
struct ia_css_pipe *copy_pipe = NULL;
if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
}
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(copy_pipe), &thread_id);
- /* by the time we reach here q is initialized and handle is available.*/
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(copy_pipe),
+ &thread_id);
+ /* by the time we reach here q is initialized and handle is available.*/
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_START_STREAM,
- (uint8_t)thread_id, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_START_STREAM,
+ (uint8_t)thread_id, 0, 0);
}
- if (pipe->stream->cont_capt) {
+ if (pipe->stream->cont_capt)
+ {
struct ia_css_pipe *capture_pipe = NULL;
if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
return IA_CSS_ERR_INTERNAL_ERROR;
}
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
- /* by the time we reach here q is initialized and handle is available.*/
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+ &thread_id);
+ /* by the time we reach here q is initialized and handle is available.*/
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_START_STREAM,
- (uint8_t)thread_id, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_START_STREAM,
+ (uint8_t)thread_id, 0, 0);
}
/* in case of PREVIEW mode, check whether QOS acc_pipe is available, then start the qos pipe */
- if (pipe_id == IA_CSS_PIPE_ID_PREVIEW) {
+ if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+ {
struct ia_css_pipe *acc_pipe = NULL;
acc_pipe = pipe->pipe_settings.preview.acc_pipe;
if (acc_pipe) {
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(acc_pipe), &thread_id);
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(acc_pipe),
+ &thread_id);
/* by the time we reach here q is initialized and handle is available.*/
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_START_STREAM,
- (uint8_t)thread_id, 0, 0);
+ IA_CSS_PSYS_SW_EVENT_START_STREAM,
+ (uint8_t)thread_id, 0, 0);
}
}
void
sh_css_enable_cont_capt(bool enable, bool stop_copy_preview)
{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_enable_cont_capt() enter: enable=%d\n", enable);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_enable_cont_capt() enter: enable=%d\n", enable);
//my_css.cont_capt = enable;
- my_css.stop_copy_preview = stop_copy_preview;
+ my_css.stop_copy_preview = stop_copy_preview;
}
bool
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
#else
assert(stream);
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LOG("stream does NOT exist!");
err = IA_CSS_ERR_INTERNAL_ERROR;
goto ERR;
pipe = find_pipe_by_num(pipe_num);
continuous = pipe && pipe->stream->config.continuous;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_continuous_is_enabled() leave: enable=%d\n",
- continuous);
+ "sh_css_continuous_is_enabled() leave: enable=%d\n",
+ continuous);
return continuous;
}
#else
main_pipe = stream->last_pipe;
assert(main_pipe);
- if (!main_pipe) {
+ if (!main_pipe)
+ {
IA_CSS_LOG("main_pipe does NOT exist!");
err = IA_CSS_ERR_INTERNAL_ERROR;
goto ERR;
#ifndef ISP2401
enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+ int *buffer_depth) {
if (!buffer_depth)
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_max_buffer_depth() enter: void\n");
return IA_CSS_SUCCESS;
}
#else
- main_pipe_id = main_pipe->mode;
- IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id);
+main_pipe_id = main_pipe->mode;
+IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id);
#endif
#ifndef ISP2401
enum ia_css_err
-ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
-{
+ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n", buffer_depth);
(void)stream;
if (buffer_depth > NUM_CONTINUOUS_FRAMES || buffer_depth < 1)
return IA_CSS_SUCCESS;
}
#else
- /*
- * Stop all "ia_css_pipe" instances in this target
- * "ia_css_stream" instance.
- */
- for (i = 0; i < stream->num_pipes; i++) {
- /* send the "stop" request to the "ia_css_pipe" instance */
- IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
- stream->pipes[i]->pipeline.pipe_id);
- err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline);
+/*
+ * Stop all "ia_css_pipe" instances in this target
+ * "ia_css_stream" instance.
+ */
+for (i = 0; i < stream->num_pipes; i++)
+{
+ /* send the "stop" request to the "ia_css_pipe" instance */
+ IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
+ stream->pipes[i]->pipeline.pipe_id);
+ err = ia_css_pipeline_request_stop(&stream->pipes[i]->pipeline);
#endif
#ifndef ISP2401
enum ia_css_err
-ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_buffer_depth(struct ia_css_stream *stream,
+ int *buffer_depth) {
if (!buffer_depth)
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_buffer_depth() enter: void\n");
#else
- /*
- * Exit this loop if "ia_css_pipeline_request_stop()"
- * returns the error code.
- *
- * The error code would be generated in the following
- * two cases:
- * (1) The Scalar Processor has already been stopped.
- * (2) The "Host->SP" event queue is full.
- *
- * As the convention of using CSS API 2.0/2.1, such CSS
- * error code would be propogated from the CSS-internal
- * API returned value to the CSS API returned value. Then
- * the CSS driver should capture these error code and
- * handle it in the driver exception handling mechanism.
- */
- if (err != IA_CSS_SUCCESS) {
- goto ERR;
- }
- }
-
- /*
- * In the CSS firmware use scenario "Continuous Preview"
- * as well as "Continuous Video", the "ia_css_pipe" instance
- * "Copy Pipe" is activated. This "Copy Pipe" is private to
- * the CSS firmware so that it is not listed in the target
- * "ia_css_stream" instance.
- *
- * We need to stop this "Copy Pipe", as well.
- */
- if (main_pipe->stream->config.continuous) {
- struct ia_css_pipe *copy_pipe = NULL;
+/*
+ * Exit this loop if "ia_css_pipeline_request_stop()"
+ * returns the error code.
+ *
+ * The error code would be generated in the following
+ * two cases:
+ * (1) The Scalar Processor has already been stopped.
+ * (2) The "Host->SP" event queue is full.
+ *
+ * As the convention of using CSS API 2.0/2.1, such CSS
+ * error code would be propogated from the CSS-internal
+ * API returned value to the CSS API returned value. Then
+ * the CSS driver should capture these error code and
+ * handle it in the driver exception handling mechanism.
+ */
+if (err != IA_CSS_SUCCESS) {
+ goto ERR;
+}
+}
- /* get the reference to "Copy Pipe" */
- if (main_pipe_id == IA_CSS_PIPE_ID_PREVIEW)
- copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
- else if (main_pipe_id == IA_CSS_PIPE_ID_VIDEO)
- copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
+/*
+ * In the CSS firmware use scenario "Continuous Preview"
+ * as well as "Continuous Video", the "ia_css_pipe" instance
+ * "Copy Pipe" is activated. This "Copy Pipe" is private to
+ * the CSS firmware so that it is not listed in the target
+ * "ia_css_stream" instance.
+ *
+ * We need to stop this "Copy Pipe", as well.
+ */
+if (main_pipe->stream->config.continuous)
+{
+ struct ia_css_pipe *copy_pipe = NULL;
- /* return the error code if "Copy Pipe" does NOT exist */
- assert(copy_pipe);
- if (!copy_pipe) {
- IA_CSS_LOG("Copy Pipe does NOT exist!");
- err = IA_CSS_ERR_INTERNAL_ERROR;
- goto ERR;
- }
+ /* get the reference to "Copy Pipe" */
+ if (main_pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+ copy_pipe = main_pipe->pipe_settings.preview.copy_pipe;
+ else if (main_pipe_id == IA_CSS_PIPE_ID_VIDEO)
+ copy_pipe = main_pipe->pipe_settings.video.copy_pipe;
- /* send the "stop" request to "Copy Pipe" */
- IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
- copy_pipe->pipeline.pipe_id);
- err = ia_css_pipeline_request_stop(©_pipe->pipeline);
+ /* return the error code if "Copy Pipe" does NOT exist */
+ assert(copy_pipe);
+ if (!copy_pipe) {
+ IA_CSS_LOG("Copy Pipe does NOT exist!");
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ goto ERR;
}
+ /* send the "stop" request to "Copy Pipe" */
+ IA_CSS_LOG("Send the stop-request to the pipe: pipe_id=%d",
+ copy_pipe->pipeline.pipe_id);
+ err = ia_css_pipeline_request_stop(©_pipe->pipeline);
+}
+
ERR:
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+IA_CSS_LEAVE_ERR_PRIVATE(err);
+return err;
}
/*
for (i = 0; i < stream->num_pipes; i++) {
rval = rval && ia_css_pipeline_has_stopped(&stream->pipes[i]->pipeline);
IA_CSS_LOG("Pipe has stopped: pipe_id=%d, stopped=%d",
- stream->pipes[i]->pipeline.pipe_id,
- rval);
+ stream->pipes[i]->pipeline.pipe_id,
+ rval);
}
/*
/* check if "Copy Pipe" has stopped or not */
rval = rval && ia_css_pipeline_has_stopped(©_pipe->pipeline);
IA_CSS_LOG("Pipe has stopped: pipe_id=%d, stopped=%d",
- copy_pipe->pipeline.pipe_id,
- rval);
+ copy_pipe->pipeline.pipe_id,
+ rval);
}
RET:
struct ia_css_pipe *pipe;
bool continuous;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_continuous_is_enabled() enter: pipe_num=%d\n", pipe_num);
pipe = find_pipe_by_num(pipe_num);
continuous = pipe && pipe->stream->config.continuous;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_continuous_is_enabled() leave: enable=%d\n",
- continuous);
+ "sh_css_continuous_is_enabled() leave: enable=%d\n",
+ continuous);
return continuous;
}
enum ia_css_err
-ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream,
+ int *buffer_depth) {
if (!buffer_depth)
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_max_buffer_depth() enter: void\n");
}
enum ia_css_err
-ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth)
-{
+ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_set_buffer_depth() enter: num_frames=%d\n", buffer_depth);
(void)stream;
if (buffer_depth > NUM_CONTINUOUS_FRAMES || buffer_depth < 1)
}
enum ia_css_err
-ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth)
-{
+ia_css_stream_get_buffer_depth(struct ia_css_stream *stream,
+ int *buffer_depth) {
if (!buffer_depth)
return IA_CSS_ERR_INVALID_ARGUMENTS;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_buffer_depth() enter: void\n");
{
OP___assert(port < N_CSI_PORTS);
OP___assert(idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_get_mipi_sizes_for_check(port %d, idx %d): %d\n",
- port, idx, my_css.mipi_sizes_for_check[port][idx]);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_get_mipi_sizes_for_check(port %d, idx %d): %d\n",
+ port, idx, my_css.mipi_sizes_for_check[port][idx]);
return my_css.mipi_sizes_for_check[port][idx];
}
#endif
static enum ia_css_err sh_css_pipe_configure_output(
- struct ia_css_pipe *pipe,
- unsigned int width,
- unsigned int height,
- unsigned int padded_width,
- enum ia_css_frame_format format,
- unsigned int idx)
+ struct ia_css_pipe *pipe,
+ unsigned int width,
+ unsigned int height,
+ unsigned int padded_width,
+ enum ia_css_frame_format format,
+ unsigned int idx)
{
enum ia_css_err err = IA_CSS_SUCCESS;
}
if (pipe->output_info[idx].res.width != width ||
pipe->output_info[idx].res.height != height ||
- pipe->output_info[idx].format != format)
- {
+ pipe->output_info[idx].format != format) {
ia_css_frame_info_init(
- &pipe->output_info[idx],
- width,
- height,
- format,
- padded_width);
+ &pipe->output_info[idx],
+ width,
+ height,
+ format,
+ padded_width);
}
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
return IA_CSS_SUCCESS;
assert(pipe_config);
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_pipe_get_shading_info() enter:\n");
+ "sh_css_pipe_get_shading_info() enter:\n");
binary = ia_css_pipe_get_shading_correction_binary(pipe);
- if (binary) {
+ if (binary)
+ {
err = ia_css_binary_get_shading_info(binary,
- IA_CSS_SHADING_CORRECTION_TYPE_1,
- pipe->required_bds_factor,
- (const struct ia_css_stream_config *)&pipe->stream->config,
+ IA_CSS_SHADING_CORRECTION_TYPE_1,
+ pipe->required_bds_factor,
+ (const struct ia_css_stream_config *)&pipe->stream->config,
#ifndef ISP2401
- info);
+ info);
#else
- shading_info, pipe_config);
+ shading_info, pipe_config);
#endif
/* Other function calls can be added here when other shading correction types will be added
* in the future.
*/
- } else {
+ } else
+ {
/* When the pipe does not have a binary which has the shading
* correction, this function does not need to fill the shading
* information. It is not a error case, and then
static enum ia_css_err
sh_css_pipe_get_grid_info(struct ia_css_pipe *pipe,
- struct ia_css_grid_info *info)
-{
+ struct ia_css_grid_info *info) {
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_binary *binary = NULL;
binary = ia_css_pipe_get_s3a_binary(pipe);
- if (binary) {
+ if (binary)
+ {
err = ia_css_binary_3a_grid_info(binary, info, pipe);
if (err != IA_CSS_SUCCESS)
goto ERR;
binary = ia_css_pipe_get_sdis_binary(pipe);
- if (binary) {
+ if (binary)
+ {
ia_css_binary_dvs_grid_info(binary, info, pipe);
ia_css_binary_dvs_stat_grid_info(binary, info, pipe);
- } else {
+ } else
+ {
memset(&info->dvs_grid.dvs_grid_info, 0,
- sizeof(info->dvs_grid.dvs_grid_info));
+ sizeof(info->dvs_grid.dvs_grid_info));
memset(&info->dvs_grid.dvs_stat_grid_info, 0,
- sizeof(info->dvs_grid.dvs_stat_grid_info));
+ sizeof(info->dvs_grid.dvs_stat_grid_info));
}
- if (binary) {
+ if (binary)
+ {
/* copy pipe does not have ISP binary*/
info->isp_in_width = binary->internal_frame_info.res.width;
info->isp_in_height = binary->internal_frame_info.res.height;
*
*/
static enum ia_css_err
-ia_css_pipe_check_format(struct ia_css_pipe *pipe, enum ia_css_frame_format format)
-{
+ia_css_pipe_check_format(struct ia_css_pipe *pipe,
+ enum ia_css_frame_format format) {
const enum ia_css_frame_format *supported_formats;
int number_of_formats;
int found = 0;
IA_CSS_ENTER_PRIVATE("");
- if (NULL == pipe || NULL == pipe->pipe_settings.video.video_binary.info) {
+ if (NULL == pipe || NULL == pipe->pipe_settings.video.video_binary.info)
+ {
IA_CSS_ERROR("Pipe or binary info is not set");
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
supported_formats = pipe->pipe_settings.video.video_binary.info->output_formats;
number_of_formats = sizeof(pipe->pipe_settings.video.video_binary.info->output_formats) / sizeof(enum ia_css_frame_format);
- for (i = 0; i < number_of_formats && !found; i++) {
+ for (i = 0; i < number_of_formats && !found; i++)
+ {
if (supported_formats[i] == format) {
found = 1;
break;
}
}
- if (!found) {
+ if (!found)
+ {
IA_CSS_ERROR("Requested format is not supported by binary");
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
- } else {
+ } else
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
return IA_CSS_SUCCESS;
}
static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe)
{
struct ia_css_frame_info video_in_info, tnr_info,
- *video_vf_info, video_bds_out_info, *pipe_out_info, *pipe_vf_out_info;
+ *video_vf_info, video_bds_out_info, *pipe_out_info, *pipe_vf_out_info;
bool online;
enum ia_css_err err = IA_CSS_SUCCESS;
bool continuous = pipe->stream->config.continuous;
return IA_CSS_ERR_INVALID_ARGUMENTS;
if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
err = ia_css_util_check_vf_out_info(pipe_out_info,
- pipe_vf_out_info);
+ pipe_vf_out_info);
if (err != IA_CSS_SUCCESS)
return err;
} else {
/* Video */
if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
video_vf_info = pipe_vf_out_info;
- vf_res_different_than_output = (video_vf_info->res.width != video_bin_out_info.res.width) ||
- (video_vf_info->res.height != video_bin_out_info.res.height);
+ vf_res_different_than_output = (video_vf_info->res.width !=
+ video_bin_out_info.res.width) ||
+ (video_vf_info->res.height != video_bin_out_info.res.height);
} else {
video_vf_info = NULL;
}
video_bin_out_info.format = IA_CSS_FRAME_FORMAT_NV12;
err = ia_css_pipe_create_cas_scaler_desc_single_output(
- &video_bin_out_info,
- pipe_out_info,
- NULL,
- &cas_scaler_descr);
+ &video_bin_out_info,
+ pipe_out_info,
+ NULL,
+ &cas_scaler_descr);
if (err != IA_CSS_SUCCESS)
return err;
mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
- sizeof(struct ia_css_binary), GFP_KERNEL);
+ sizeof(struct ia_css_binary), GFP_KERNEL);
if (!mycs->yuv_scaler_binary) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
return err;
}
mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage
- * sizeof(bool), GFP_KERNEL);
+ * sizeof(bool), GFP_KERNEL);
if (!mycs->is_output_stage) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
return err;
mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
ia_css_pipe_get_yuvscaler_binarydesc(pipe,
- &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
- &cas_scaler_descr.out_info[i],
- &cas_scaler_descr.internal_out_info[i],
- &cas_scaler_descr.vf_info[i]);
+ &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+ &cas_scaler_descr.out_info[i],
+ &cas_scaler_descr.internal_out_info[i],
+ &cas_scaler_descr.vf_info[i]);
err = ia_css_binary_find(&yuv_scaler_descr,
- &mycs->yuv_scaler_binary[i]);
+ &mycs->yuv_scaler_binary[i]);
if (err != IA_CSS_SUCCESS) {
kfree(mycs->is_output_stage);
mycs->is_output_stage = NULL;
enum ia_css_frame_format vf_info_format;
err = ia_css_pipe_get_video_binarydesc(pipe,
- &video_descr, &video_in_info, &video_bds_out_info, &video_bin_out_info, video_vf_info,
- pipe->stream->config.left_padding);
+ &video_descr, &video_in_info, &video_bds_out_info, &video_bin_out_info,
+ video_vf_info,
+ pipe->stream->config.left_padding);
if (err != IA_CSS_SUCCESS)
return err;
/* If the binary has single output pin, we need vf_pp if additional
* scaling is needed for vf */
need_vf_pp |= ((num_output_pins == 1) &&
- ((video_vf_info->res.width << vf_ds_log2 != pipe_out_info->res.width) ||
- (video_vf_info->res.height << vf_ds_log2 != pipe_out_info->res.height)));
+ ((video_vf_info->res.width << vf_ds_log2 != pipe_out_info->res.width) ||
+ (video_vf_info->res.height << vf_ds_log2 != pipe_out_info->res.height)));
}
if (need_vf_pp) {
/* save the current vf_info format for restoration later */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "load_video_binaries() need_vf_pp; find video binary with YUV_LINE again\n");
+ "load_video_binaries() need_vf_pp; find video binary with YUV_LINE again\n");
vf_info_format = video_vf_info->format;
if (!pipe->config.enable_vfpp_bci)
ia_css_frame_info_set_format(video_vf_info,
- IA_CSS_FRAME_FORMAT_YUV_LINE);
+ IA_CSS_FRAME_FORMAT_YUV_LINE);
ia_css_binary_destroy_isp_parameters(&mycs->video_binary);
err = ia_css_binary_find(&video_descr,
- &mycs->video_binary);
+ &mycs->video_binary);
/* restore original vf_info format */
ia_css_frame_info_set_format(video_vf_info,
- vf_info_format);
+ vf_info_format);
if (err != IA_CSS_SUCCESS)
return err;
}
pipe->num_invalid_frames *= 2;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "load_video_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
- pipe->num_invalid_frames, pipe->dvs_frame_delay);
+ "load_video_binaries() num_invalid_frames=%d dvs_frame_delay=%d\n",
+ pipe->num_invalid_frames, pipe->dvs_frame_delay);
-/* pqiao TODO: temp hack for PO, should be removed after offline YUVPP is enabled */
+ /* pqiao TODO: temp hack for PO, should be removed after offline YUVPP is enabled */
#if !defined(USE_INPUT_SYSTEM_VERSION_2401)
/* Copy */
if (!online && !continuous) {
struct ia_css_binary_descr vf_pp_descr;
if (mycs->video_binary.vf_frame_info.format
- == IA_CSS_FRAME_FORMAT_YUV_LINE) {
+ == IA_CSS_FRAME_FORMAT_YUV_LINE) {
ia_css_pipe_get_vfpp_binarydesc(pipe, &vf_pp_descr,
- &mycs->video_binary.vf_frame_info,
- pipe_vf_out_info);
+ &mycs->video_binary.vf_frame_info,
+ pipe_vf_out_info);
} else {
/* output from main binary is not yuv line. currently this is
* possible only when bci is enabled on vfpp output */
assert(pipe->config.enable_vfpp_bci == true);
ia_css_pipe_get_yuvscaler_binarydesc(pipe, &vf_pp_descr,
- &mycs->video_binary.vf_frame_info,
- pipe_vf_out_info, NULL, NULL);
+ &mycs->video_binary.vf_frame_info,
+ pipe_vf_out_info, NULL, NULL);
}
err = ia_css_binary_find(&vf_pp_descr,
- &mycs->vf_pp_binary);
+ &mycs->vf_pp_binary);
if (err != IA_CSS_SUCCESS)
return err;
}
* output_system_in_resolution(GDC_out_resolution) is
* being used, then select that as it will also be in resolution for
* TNR. At present, it only make sense for Skycam */
- if (pipe->config.output_system_in_res.width && pipe->config.output_system_in_res.height) {
+ if (pipe->config.output_system_in_res.width &&
+ pipe->config.output_system_in_res.height) {
tnr_width = pipe->config.output_system_in_res.width;
tnr_height = pipe->config.output_system_in_res.height;
} else {
/* Make tnr reference buffers output block width(in pix) align */
tnr_info.res.width =
- CEIL_MUL(tnr_width,
- (mycs->video_binary.info->sp.block.block_width * ISP_NWAY));
+ CEIL_MUL(tnr_width,
+ (mycs->video_binary.info->sp.block.block_width * ISP_NWAY));
tnr_info.padded_width = tnr_info.res.width;
#endif
/* Make tnr reference buffers output block height align */
#ifndef ISP2401
tnr_info.res.height =
- CEIL_MUL(tnr_info.res.height,
- mycs->video_binary.info->sp.block.output_block_height);
+ CEIL_MUL(tnr_info.res.height,
+ mycs->video_binary.info->sp.block.output_block_height);
#else
tnr_info.res.height =
- CEIL_MUL(tnr_height,
- mycs->video_binary.info->sp.block.output_block_height);
+ CEIL_MUL(tnr_height,
+ mycs->video_binary.info->sp.block.output_block_height);
#endif
} else {
tnr_info = mycs->video_binary.internal_frame_info;
mycs->tnr_frames[i] = NULL;
}
err = ia_css_frame_allocate_from_info(
- &mycs->tnr_frames[i],
- &tnr_info);
+ &mycs->tnr_frames[i],
+ &tnr_info);
if (err != IA_CSS_SUCCESS)
return err;
}
}
static enum ia_css_err
-unload_video_binaries(struct ia_css_pipe *pipe)
-{
+unload_video_binaries(struct ia_css_pipe *pipe) {
unsigned int i;
IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO)) {
+ if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_VIDEO))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
copy_ovrd = 1 << thread_id;
if (pipe->stream->cont_capt) {
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe), &thread_id);
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(capture_pipe),
+ &thread_id);
copy_ovrd |= 1 << thread_id;
}
}
/* Construct and load the copy pipe */
if (pipe->stream->config.continuous) {
sh_css_sp_init_pipeline(©_pipe->pipeline,
- IA_CSS_PIPE_ID_COPY,
- (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
- false,
- pipe->stream->config.pixels_per_clock == 2, false,
- false, pipe->required_bds_factor,
- copy_ovrd,
- pipe->stream->config.mode,
- &pipe->stream->config.metadata_config,
+ IA_CSS_PIPE_ID_COPY,
+ (uint8_t)ia_css_pipe_get_pipe_num(copy_pipe),
+ false,
+ pipe->stream->config.pixels_per_clock == 2, false,
+ false, pipe->required_bds_factor,
+ copy_ovrd,
+ pipe->stream->config.mode,
+ &pipe->stream->config.metadata_config,
#ifndef ISP2401
- &pipe->stream->info.metadata_info
+ &pipe->stream->info.metadata_info
#else
- &pipe->stream->info.metadata_info,
+ &pipe->stream->info.metadata_info,
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
#ifndef ISP2401
- , pipe->stream->config.source.port.port
+ , pipe->stream->config.source.port.port
#else
- pipe->stream->config.source.port.port,
+ pipe->stream->config.source.port.port,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
- & copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
- copy_pipe->stream->isp_params_configs);
+ & copy_pipe->config.internal_frame_origin_bqs_on_sctbl,
+ copy_pipe->stream->isp_params_configs);
#endif
/* make the video pipe start with mem mode input, copy handles
/* Construct and load the capture pipe */
if (pipe->stream->cont_capt) {
sh_css_sp_init_pipeline(&capture_pipe->pipeline,
- IA_CSS_PIPE_ID_CAPTURE,
- (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
- capture_pipe->config.default_capture_config.enable_xnr != 0,
- capture_pipe->stream->config.pixels_per_clock == 2,
- true, /* continuous */
- false, /* offline */
- capture_pipe->required_bds_factor,
- 0,
- IA_CSS_INPUT_MODE_MEMORY,
- &pipe->stream->config.metadata_config,
+ IA_CSS_PIPE_ID_CAPTURE,
+ (uint8_t)ia_css_pipe_get_pipe_num(capture_pipe),
+ capture_pipe->config.default_capture_config.enable_xnr != 0,
+ capture_pipe->stream->config.pixels_per_clock == 2,
+ true, /* continuous */
+ false, /* offline */
+ capture_pipe->required_bds_factor,
+ 0,
+ IA_CSS_INPUT_MODE_MEMORY,
+ &pipe->stream->config.metadata_config,
#ifndef ISP2401
- &pipe->stream->info.metadata_info
+ &pipe->stream->info.metadata_info
#else
- &pipe->stream->info.metadata_info,
+ &pipe->stream->info.metadata_info,
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
#ifndef ISP2401
- , (enum mipi_port_id)0
+ , (enum mipi_port_id)0
#else
- (enum mipi_port_id)0,
+ (enum mipi_port_id)0,
#endif
#endif
#ifndef ISP2401
- );
+ );
#else
- & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
- capture_pipe->stream->isp_params_configs);
+ & capture_pipe->config.internal_frame_origin_bqs_on_sctbl,
+ capture_pipe->stream->isp_params_configs);
#endif
}
static
enum ia_css_err sh_css_pipe_get_viewfinder_frame_info(
- struct ia_css_pipe *pipe,
- struct ia_css_frame_info *info,
- unsigned int idx)
+ struct ia_css_pipe *pipe,
+ struct ia_css_frame_info *info,
+ unsigned int idx)
{
assert(pipe);
assert(info);
-/* We could print the pointer as input arg, and the values as output */
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_get_viewfinder_frame_info() enter: void\n");
+ /* We could print the pointer as input arg, and the values as output */
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_pipe_get_viewfinder_frame_info() enter: void\n");
if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE &&
(pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW ||
*info = pipe->vf_output_info[idx];
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_pipe_get_viewfinder_frame_info() leave: \
+ "sh_css_pipe_get_viewfinder_frame_info() leave: \
info.res.width=%d, info.res.height=%d, \
info.padded_width=%d, info.format=%d, \
info.raw_bit_depth=%d, info.raw_bayer_order=%d\n",
- info->res.width, info->res.height,
- info->padded_width, info->format,
- info->raw_bit_depth, info->raw_bayer_order);
+ info->res.width, info->res.height,
+ info->padded_width, info->format,
+ info->raw_bit_depth, info->raw_bayer_order);
return IA_CSS_SUCCESS;
}
sh_css_pipe_configure_viewfinder(struct ia_css_pipe *pipe, unsigned int width,
unsigned int height, unsigned int min_width,
enum ia_css_frame_format format,
- unsigned int idx)
-{
+ unsigned int idx) {
enum ia_css_err err = IA_CSS_SUCCESS;
IA_CSS_ENTER_PRIVATE("pipe = %p, width = %d, height = %d, min_width = %d, format = %d, idx = %d\n",
pipe, width, height, min_width, format, idx);
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
err = ia_css_util_check_res(width, height);
- if (err != IA_CSS_SUCCESS) {
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
if (pipe->vf_output_info[idx].res.width != width ||
pipe->vf_output_info[idx].res.height != height ||
- pipe->vf_output_info[idx].format != format) {
+ pipe->vf_output_info[idx].format != format)
+ {
ia_css_frame_info_init(&pipe->vf_output_info[idx], width, height,
format, min_width);
}
assert(pipe);
IA_CSS_ENTER_PRIVATE("");
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
if (pipe->pipe_settings.capture.copy_binary.info)
return IA_CSS_SUCCESS;
goto ERR;
err = load_copy_binary(pipe,
- &pipe->pipe_settings.capture.copy_binary,
- NULL);
+ &pipe->pipe_settings.capture.copy_binary,
+ NULL);
ERR:
IA_CSS_LEAVE_ERR_PRIVATE(err);
}
static bool need_capture_pp(
- const struct ia_css_pipe *pipe)
+ const struct ia_css_pipe *pipe)
{
const struct ia_css_frame_info *out_info = &pipe->output_info[0];
}
static bool need_capt_ldc(
- const struct ia_css_pipe *pipe)
+ const struct ia_css_pipe *pipe)
{
IA_CSS_ENTER_LEAVE_PRIVATE("");
assert(pipe);
return (pipe->extra_config.enable_dvs_6axis) ? true : false;
}
-static enum ia_css_err set_num_primary_stages(unsigned int *num, enum ia_css_pipe_version version)
+static enum ia_css_err set_num_primary_stages(unsigned int *num,
+ enum ia_css_pipe_version version)
{
enum ia_css_err err = IA_CSS_SUCCESS;
}
static enum ia_css_err load_primary_binaries(
- struct ia_css_pipe *pipe)
+ struct ia_css_pipe *pipe)
{
bool online = false;
bool memory = false;
bool sensor = false;
#endif
struct ia_css_frame_info prim_in_info,
- prim_out_info,
- capt_pp_out_info, vf_info,
- *vf_pp_in_info, *pipe_out_info,
+ prim_out_info,
+ capt_pp_out_info, vf_info,
+ *vf_pp_in_info, *pipe_out_info,
#ifndef ISP2401
- *pipe_vf_out_info, *capt_pp_in_info,
- capt_ldc_out_info;
+ *pipe_vf_out_info, *capt_pp_in_info,
+ capt_ldc_out_info;
#else
- *pipe_vf_out_info;
+ *pipe_vf_out_info;
#endif
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_capture_settings *mycs;
IA_CSS_ENTER_PRIVATE("");
assert(pipe);
assert(pipe->stream);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
online = pipe->stream->config.online;
memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
if (mycs->primary_binary[0].info)
return IA_CSS_SUCCESS;
- err = set_num_primary_stages(&mycs->num_primary_stage, pipe->config.isp_pipe_version);
+ err = set_num_primary_stages(&mycs->num_primary_stage,
+ pipe->config.isp_pipe_version);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
factor. */
vf_info = *pipe_vf_out_info;
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
+ /*
+ * WARNING: The #if def flag has been added below as a
+ * temporary solution to solve the problem of enabling the
+ * view finder in a single binary in a capture flow. The
+ * vf-pp stage has been removed for Skycam in the solution
+ * provided. The vf-pp stage should be re-introduced when
+ * required. This should not be considered as a clean solution.
+ * Proper investigation should be done to come up with the clean
+ * solution.
+ * */
ia_css_frame_info_set_format(&vf_info, IA_CSS_FRAME_FORMAT_YUV_LINE);
/* TODO: All this yuv_scaler and capturepp calculation logic
capt_pp_out_info.res.height /= MAX_PREFERRED_YUV_DS_PER_STEP;
ia_css_frame_info_set_width(&capt_pp_out_info, capt_pp_out_info.res.width, 0);
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
+ /*
+ * WARNING: The #if def flag has been added below as a
+ * temporary solution to solve the problem of enabling the
+ * view finder in a single binary in a capture flow. The
+ * vf-pp stage has been removed for Skycam in the solution
+ * provided. The vf-pp stage should be re-introduced when
+ * required. This should not be considered as a clean solution.
+ * Proper investigation should be done to come up with the clean
+ * solution.
+ * */
need_extra_yuv_scaler = need_downscaling(capt_pp_out_info.res,
- pipe_out_info->res);
+ pipe_out_info->res);
if (need_extra_yuv_scaler) {
struct ia_css_cas_binary_descr cas_scaler_descr = { };
err = ia_css_pipe_create_cas_scaler_desc_single_output(
- &capt_pp_out_info,
- pipe_out_info,
- NULL,
- &cas_scaler_descr);
+ &capt_pp_out_info,
+ pipe_out_info,
+ NULL,
+ &cas_scaler_descr);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
- sizeof(struct ia_css_binary), GFP_KERNEL);
+ sizeof(struct ia_css_binary), GFP_KERNEL);
if (!mycs->yuv_scaler_binary) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
- sizeof(bool), GFP_KERNEL);
+ sizeof(bool), GFP_KERNEL);
if (!mycs->is_output_stage) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR_PRIVATE(err);
mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
ia_css_pipe_get_yuvscaler_binarydesc(pipe,
- &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
- &cas_scaler_descr.out_info[i],
- &cas_scaler_descr.internal_out_info[i],
- &cas_scaler_descr.vf_info[i]);
+ &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+ &cas_scaler_descr.out_info[i],
+ &cas_scaler_descr.internal_out_info[i],
+ &cas_scaler_descr.vf_info[i]);
err = ia_css_binary_find(&yuv_scaler_descr,
- &mycs->yuv_scaler_binary[i]);
+ &mycs->yuv_scaler_binary[i]);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
struct ia_css_binary_descr capt_ldc_descr;
ia_css_pipe_get_ldc_binarydesc(pipe,
- &capt_ldc_descr, &prim_out_info,
- &capt_pp_out_info);
+ &capt_ldc_descr, &prim_out_info,
+ &capt_pp_out_info);
#endif
#ifdef ISP2401
err = ia_css_binary_find(&capt_ldc_descr,
- &mycs->capture_ldc_binary);
+ &mycs->capture_ldc_binary);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
} else if (need_pp) {
#endif
- /* we build up the pipeline starting at the end */
- /* Capture post-processing */
+ /* we build up the pipeline starting at the end */
+ /* Capture post-processing */
#ifndef ISP2401
- if (need_pp) {
+ if (need_pp) {
#endif
- struct ia_css_binary_descr capture_pp_descr;
+ struct ia_css_binary_descr capture_pp_descr;
#ifndef ISP2401
- capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
+ capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
#endif
- ia_css_pipe_get_capturepp_binarydesc(pipe,
+ ia_css_pipe_get_capturepp_binarydesc(pipe,
#ifndef ISP2401
- &capture_pp_descr, capt_pp_in_info,
+ &capture_pp_descr, capt_pp_in_info,
#else
- &capture_pp_descr, &prim_out_info,
+ &capture_pp_descr, &prim_out_info,
#endif
- &capt_pp_out_info, &vf_info);
- err = ia_css_binary_find(&capture_pp_descr,
- &mycs->capture_pp_binary);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ &capt_pp_out_info, &vf_info);
+ err = ia_css_binary_find(&capture_pp_descr,
+ &mycs->capture_pp_binary);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
#ifndef ISP2401
- if (need_ldc) {
- struct ia_css_binary_descr capt_ldc_descr;
+ if (need_ldc) {
+ struct ia_css_binary_descr capt_ldc_descr;
- ia_css_pipe_get_ldc_binarydesc(pipe,
- &capt_ldc_descr, &prim_out_info,
- &capt_ldc_out_info);
+ ia_css_pipe_get_ldc_binarydesc(pipe,
+ &capt_ldc_descr, &prim_out_info,
+ &capt_ldc_out_info);
- err = ia_css_binary_find(&capt_ldc_descr,
- &mycs->capture_ldc_binary);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ err = ia_css_binary_find(&capt_ldc_descr,
+ &mycs->capture_ldc_binary);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
}
- }
#endif
- } else {
- prim_out_info = *pipe_out_info;
- }
+ } else {
+ prim_out_info = *pipe_out_info;
+ }
- /* Primary */
- {
- struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
+ /* Primary */
+ {
+ struct ia_css_binary_descr prim_descr[MAX_NUM_PRIMARY_STAGES];
+
+ for (i = 0; i < mycs->num_primary_stage; i++) {
+ struct ia_css_frame_info *local_vf_info = NULL;
+
+ if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0] &&
+ (i == mycs->num_primary_stage - 1))
+ local_vf_info = &vf_info;
+ ia_css_pipe_get_primary_binarydesc(pipe, &prim_descr[i], &prim_in_info,
+ &prim_out_info, local_vf_info, i);
+ err = ia_css_binary_find(&prim_descr[i], &mycs->primary_binary[i]);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
+ }
- for (i = 0; i < mycs->num_primary_stage; i++) {
- struct ia_css_frame_info *local_vf_info = NULL;
+ /* Viewfinder post-processing */
+ if (need_pp) {
+ vf_pp_in_info =
+ &mycs->capture_pp_binary.vf_frame_info;
+ } else {
+ vf_pp_in_info =
+ &mycs->primary_binary[mycs->num_primary_stage - 1].vf_frame_info;
+ }
- if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0] && (i == mycs->num_primary_stage - 1))
- local_vf_info = &vf_info;
- ia_css_pipe_get_primary_binarydesc(pipe, &prim_descr[i], &prim_in_info, &prim_out_info, local_vf_info, i);
- err = ia_css_binary_find(&prim_descr[i], &mycs->primary_binary[i]);
+ /*
+ * WARNING: The #if def flag has been added below as a
+ * temporary solution to solve the problem of enabling the
+ * view finder in a single binary in a capture flow. The
+ * vf-pp stage has been removed for Skycam in the solution
+ * provided. The vf-pp stage should be re-introduced when
+ * required. Thisshould not be considered as a clean solution.
+ * Proper * investigation should be done to come up with the clean
+ * solution.
+ * */
+ if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
+ struct ia_css_binary_descr vf_pp_descr;
+
+ ia_css_pipe_get_vfpp_binarydesc(pipe,
+ &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+ err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
}
- }
-
- /* Viewfinder post-processing */
- if (need_pp) {
- vf_pp_in_info =
- &mycs->capture_pp_binary.vf_frame_info;
- } else {
- vf_pp_in_info =
- &mycs->primary_binary[mycs->num_primary_stage - 1].vf_frame_info;
- }
-
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed for Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. Thisshould not be considered as a clean solution.
- * Proper * investigation should be done to come up with the clean
- * solution.
- * */
- if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
- {
- struct ia_css_binary_descr vf_pp_descr;
+ err = allocate_delay_frames(pipe);
- ia_css_pipe_get_vfpp_binarydesc(pipe,
- &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
- err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
+ if (err != IA_CSS_SUCCESS)
return err;
- }
- }
- err = allocate_delay_frames(pipe);
-
- if (err != IA_CSS_SUCCESS)
- return err;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* When the input system is 2401, only the Direct Sensor Mode
- * Offline Capture uses the ISP copy binary.
- */
- need_isp_copy_binary = !online && sensor;
+ /* When the input system is 2401, only the Direct Sensor Mode
+ * Offline Capture uses the ISP copy binary.
+ */
+ need_isp_copy_binary = !online && sensor;
#else
- need_isp_copy_binary = !online && !continuous && !memory;
+ need_isp_copy_binary = !online && !continuous && !memory;
#endif
- /* ISP Copy */
- if (need_isp_copy_binary) {
- err = load_copy_binary(pipe,
- &mycs->copy_binary,
- &mycs->primary_binary[0]);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ /* ISP Copy */
+ if (need_isp_copy_binary) {
+ err = load_copy_binary(pipe,
+ &mycs->copy_binary,
+ &mycs->primary_binary[0]);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
}
- }
- return IA_CSS_SUCCESS;
-}
+ return IA_CSS_SUCCESS;
+ }
-static enum ia_css_err
-allocate_delay_frames(struct ia_css_pipe *pipe)
-{
- unsigned int num_delay_frames = 0, i = 0;
- unsigned int dvs_frame_delay = 0;
- struct ia_css_frame_info ref_info;
- enum ia_css_err err = IA_CSS_SUCCESS;
- enum ia_css_pipe_id mode = IA_CSS_PIPE_ID_VIDEO;
- struct ia_css_frame **delay_frames = NULL;
+ static enum ia_css_err
+ allocate_delay_frames(struct ia_css_pipe *pipe) {
+ unsigned int num_delay_frames = 0, i = 0;
+ unsigned int dvs_frame_delay = 0;
+ struct ia_css_frame_info ref_info;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_pipe_id mode = IA_CSS_PIPE_ID_VIDEO;
+ struct ia_css_frame **delay_frames = NULL;
- IA_CSS_ENTER_PRIVATE("");
+ IA_CSS_ENTER_PRIVATE("");
- if (!pipe) {
- IA_CSS_ERROR("Invalid args - pipe %p", pipe);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ if (!pipe)
+ {
+ IA_CSS_ERROR("Invalid args - pipe %p", pipe);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- mode = pipe->mode;
- dvs_frame_delay = pipe->dvs_frame_delay;
+ mode = pipe->mode;
+ dvs_frame_delay = pipe->dvs_frame_delay;
- if (dvs_frame_delay > 0)
- num_delay_frames = dvs_frame_delay + 1;
+ if (dvs_frame_delay > 0)
+ num_delay_frames = dvs_frame_delay + 1;
- switch (mode) {
- case IA_CSS_PIPE_ID_CAPTURE:
+ switch (mode)
{
+ case IA_CSS_PIPE_ID_CAPTURE: {
struct ia_css_capture_settings *mycs_capture = &pipe->pipe_settings.capture;
(void)mycs_capture;
return err;
}
break;
- case IA_CSS_PIPE_ID_VIDEO:
- {
+ case IA_CSS_PIPE_ID_VIDEO: {
struct ia_css_video_settings *mycs_video = &pipe->pipe_settings.video;
ref_info = mycs_video->video_binary.internal_frame_info;
delay_frames = mycs_video->delay_frames;
}
break;
- case IA_CSS_PIPE_ID_PREVIEW:
- {
+ case IA_CSS_PIPE_ID_PREVIEW: {
struct ia_css_preview_settings *mycs_preview = &pipe->pipe_settings.preview;
ref_info = mycs_preview->preview_binary.internal_frame_info;
break;
default:
return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+
+ ref_info.raw_bit_depth = SH_CSS_REF_BIT_DEPTH;
+
+ assert(num_delay_frames <= MAX_NUM_VIDEO_DELAY_FRAMES);
+ for (i = 0; i < num_delay_frames; i++)
+ {
+ err = ia_css_frame_allocate_from_info(&delay_frames[i], &ref_info);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ IA_CSS_LEAVE_PRIVATE("");
+ return IA_CSS_SUCCESS;
}
- ref_info.raw_bit_depth = SH_CSS_REF_BIT_DEPTH;
+ static enum ia_css_err load_advanced_binaries(
+ struct ia_css_pipe *pipe) {
+ struct ia_css_frame_info pre_in_info, gdc_in_info,
+ post_in_info, post_out_info,
+ vf_info, *vf_pp_in_info, *pipe_out_info,
+ *pipe_vf_out_info;
+ bool need_pp;
+ bool need_isp_copy = true;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+
+ IA_CSS_ENTER_PRIVATE("");
+
+ assert(pipe);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
+ if (pipe->pipe_settings.capture.pre_isp_binary.info)
+ return IA_CSS_SUCCESS;
+ pipe_out_info = &pipe->output_info[0];
+ pipe_vf_out_info = &pipe->vf_output_info[0];
- assert(num_delay_frames <= MAX_NUM_VIDEO_DELAY_FRAMES);
- for (i = 0; i < num_delay_frames; i++) {
- err = ia_css_frame_allocate_from_info(&delay_frames[i], &ref_info);
+ vf_info = *pipe_vf_out_info;
+ err = ia_css_util_check_vf_out_info(pipe_out_info, &vf_info);
if (err != IA_CSS_SUCCESS)
return err;
- }
- IA_CSS_LEAVE_PRIVATE("");
- return IA_CSS_SUCCESS;
-}
+ need_pp = need_capture_pp(pipe);
-static enum ia_css_err load_advanced_binaries(
- struct ia_css_pipe *pipe)
-{
- struct ia_css_frame_info pre_in_info, gdc_in_info,
- post_in_info, post_out_info,
- vf_info, *vf_pp_in_info, *pipe_out_info,
- *pipe_vf_out_info;
- bool need_pp;
- bool need_isp_copy = true;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ ia_css_frame_info_set_format(&vf_info,
+ IA_CSS_FRAME_FORMAT_YUV_LINE);
- IA_CSS_ENTER_PRIVATE("");
+ /* we build up the pipeline starting at the end */
+ /* Capture post-processing */
+ if (need_pp) {
+ struct ia_css_binary_descr capture_pp_descr;
- assert(pipe);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
- if (pipe->pipe_settings.capture.pre_isp_binary.info)
- return IA_CSS_SUCCESS;
- pipe_out_info = &pipe->output_info[0];
- pipe_vf_out_info = &pipe->vf_output_info[0];
+ ia_css_pipe_get_capturepp_binarydesc(pipe,
+ &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
+ err = ia_css_binary_find(&capture_pp_descr,
+ &pipe->pipe_settings.capture.capture_pp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ } else {
+ post_out_info = *pipe_out_info;
+ }
- vf_info = *pipe_vf_out_info;
- err = ia_css_util_check_vf_out_info(pipe_out_info, &vf_info);
- if (err != IA_CSS_SUCCESS)
- return err;
- need_pp = need_capture_pp(pipe);
+ /* Post-gdc */
+ {
+ struct ia_css_binary_descr post_gdc_descr;
- ia_css_frame_info_set_format(&vf_info,
- IA_CSS_FRAME_FORMAT_YUV_LINE);
+ ia_css_pipe_get_post_gdc_binarydesc(pipe,
+ &post_gdc_descr, &post_in_info, &post_out_info, &vf_info);
+ err = ia_css_binary_find(&post_gdc_descr,
+ &pipe->pipe_settings.capture.post_isp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
- /* we build up the pipeline starting at the end */
- /* Capture post-processing */
- if (need_pp) {
- struct ia_css_binary_descr capture_pp_descr;
-
- ia_css_pipe_get_capturepp_binarydesc(pipe,
- &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
- err = ia_css_binary_find(&capture_pp_descr,
- &pipe->pipe_settings.capture.capture_pp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- } else {
- post_out_info = *pipe_out_info;
- }
+ /* Gdc */
+ {
+ struct ia_css_binary_descr gdc_descr;
- /* Post-gdc */
- {
- struct ia_css_binary_descr post_gdc_descr;
+ ia_css_pipe_get_gdc_binarydesc(pipe, &gdc_descr, &gdc_in_info,
+ &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
+ err = ia_css_binary_find(&gdc_descr,
+ &pipe->pipe_settings.capture.anr_gdc_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
+ pipe->pipe_settings.capture.post_isp_binary.left_padding;
- ia_css_pipe_get_post_gdc_binarydesc(pipe,
- &post_gdc_descr, &post_in_info, &post_out_info, &vf_info);
- err = ia_css_binary_find(&post_gdc_descr,
- &pipe->pipe_settings.capture.post_isp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
+ /* Pre-gdc */
+ {
+ struct ia_css_binary_descr pre_gdc_descr;
- /* Gdc */
- {
- struct ia_css_binary_descr gdc_descr;
+ ia_css_pipe_get_pre_gdc_binarydesc(pipe, &pre_gdc_descr, &pre_in_info,
+ &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
+ err = ia_css_binary_find(&pre_gdc_descr,
+ &pipe->pipe_settings.capture.pre_isp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ pipe->pipe_settings.capture.pre_isp_binary.left_padding =
+ pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
- ia_css_pipe_get_gdc_binarydesc(pipe, &gdc_descr, &gdc_in_info,
- &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
- err = ia_css_binary_find(&gdc_descr,
- &pipe->pipe_settings.capture.anr_gdc_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
- pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
- pipe->pipe_settings.capture.post_isp_binary.left_padding;
+ /* Viewfinder post-processing */
+ if (need_pp) {
+ vf_pp_in_info =
+ &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
+ } else {
+ vf_pp_in_info =
+ &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+ }
- /* Pre-gdc */
- {
- struct ia_css_binary_descr pre_gdc_descr;
+ {
+ struct ia_css_binary_descr vf_pp_descr;
+
+ ia_css_pipe_get_vfpp_binarydesc(pipe,
+ &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+ err = ia_css_binary_find(&vf_pp_descr,
+ &pipe->pipe_settings.capture.vf_pp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
- ia_css_pipe_get_pre_gdc_binarydesc(pipe, &pre_gdc_descr, &pre_in_info,
- &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
- err = ia_css_binary_find(&pre_gdc_descr,
+ /* Copy */
+#ifdef USE_INPUT_SYSTEM_VERSION_2401
+ /* For CSI2+, only the direct sensor mode/online requires ISP copy */
+ need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+#endif
+ if (need_isp_copy)
+ load_copy_binary(pipe,
+ &pipe->pipe_settings.capture.copy_binary,
&pipe->pipe_settings.capture.pre_isp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
- pipe->pipe_settings.capture.pre_isp_binary.left_padding =
- pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
- /* Viewfinder post-processing */
- if (need_pp) {
- vf_pp_in_info =
- &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
- } else {
- vf_pp_in_info =
- &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+ return err;
}
- {
- struct ia_css_binary_descr vf_pp_descr;
-
- ia_css_pipe_get_vfpp_binarydesc(pipe,
- &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
- err = ia_css_binary_find(&vf_pp_descr,
- &pipe->pipe_settings.capture.vf_pp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
+ static enum ia_css_err load_bayer_isp_binaries(
+ struct ia_css_pipe *pipe) {
+ struct ia_css_frame_info pre_isp_in_info, *pipe_out_info;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_binary_descr pre_de_descr;
- /* Copy */
-#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* For CSI2+, only the direct sensor mode/online requires ISP copy */
- need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
-#endif
- if (need_isp_copy)
- load_copy_binary(pipe,
- &pipe->pipe_settings.capture.copy_binary,
- &pipe->pipe_settings.capture.pre_isp_binary);
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
+ pipe_out_info = &pipe->output_info[0];
- return err;
-}
+ if (pipe->pipe_settings.capture.pre_isp_binary.info)
+ return IA_CSS_SUCCESS;
-static enum ia_css_err load_bayer_isp_binaries(
- struct ia_css_pipe *pipe)
-{
- struct ia_css_frame_info pre_isp_in_info, *pipe_out_info;
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_binary_descr pre_de_descr;
+ err = ia_css_frame_check_info(pipe_out_info);
+ if (err != IA_CSS_SUCCESS)
+ return err;
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
- pipe_out_info = &pipe->output_info[0];
+ ia_css_pipe_get_pre_de_binarydesc(pipe, &pre_de_descr,
+ &pre_isp_in_info,
+ pipe_out_info);
- if (pipe->pipe_settings.capture.pre_isp_binary.info)
- return IA_CSS_SUCCESS;
+ err = ia_css_binary_find(&pre_de_descr,
+ &pipe->pipe_settings.capture.pre_isp_binary);
- err = ia_css_frame_check_info(pipe_out_info);
- if (err != IA_CSS_SUCCESS)
return err;
+ }
- ia_css_pipe_get_pre_de_binarydesc(pipe, &pre_de_descr,
- &pre_isp_in_info,
- pipe_out_info);
-
- err = ia_css_binary_find(&pre_de_descr,
- &pipe->pipe_settings.capture.pre_isp_binary);
-
- return err;
-}
+ static enum ia_css_err load_low_light_binaries(
+ struct ia_css_pipe *pipe) {
+ struct ia_css_frame_info pre_in_info, anr_in_info,
+ post_in_info, post_out_info,
+ vf_info, *pipe_vf_out_info, *pipe_out_info,
+ *vf_pp_in_info;
+ bool need_pp;
+ bool need_isp_copy = true;
+ enum ia_css_err err = IA_CSS_SUCCESS;
-static enum ia_css_err load_low_light_binaries(
- struct ia_css_pipe *pipe)
-{
- struct ia_css_frame_info pre_in_info, anr_in_info,
- post_in_info, post_out_info,
- vf_info, *pipe_vf_out_info, *pipe_out_info,
- *vf_pp_in_info;
- bool need_pp;
- bool need_isp_copy = true;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+ if (pipe->pipe_settings.capture.pre_isp_binary.info)
+ return IA_CSS_SUCCESS;
+ pipe_vf_out_info = &pipe->vf_output_info[0];
+ pipe_out_info = &pipe->output_info[0];
- if (pipe->pipe_settings.capture.pre_isp_binary.info)
- return IA_CSS_SUCCESS;
- pipe_vf_out_info = &pipe->vf_output_info[0];
- pipe_out_info = &pipe->output_info[0];
+ vf_info = *pipe_vf_out_info;
+ err = ia_css_util_check_vf_out_info(pipe_out_info,
+ &vf_info);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ need_pp = need_capture_pp(pipe);
- vf_info = *pipe_vf_out_info;
- err = ia_css_util_check_vf_out_info(pipe_out_info,
- &vf_info);
- if (err != IA_CSS_SUCCESS)
- return err;
- need_pp = need_capture_pp(pipe);
+ ia_css_frame_info_set_format(&vf_info,
+ IA_CSS_FRAME_FORMAT_YUV_LINE);
- ia_css_frame_info_set_format(&vf_info,
- IA_CSS_FRAME_FORMAT_YUV_LINE);
+ /* we build up the pipeline starting at the end */
+ /* Capture post-processing */
+ if (need_pp) {
+ struct ia_css_binary_descr capture_pp_descr;
- /* we build up the pipeline starting at the end */
- /* Capture post-processing */
- if (need_pp) {
- struct ia_css_binary_descr capture_pp_descr;
-
- ia_css_pipe_get_capturepp_binarydesc(pipe,
- &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
- err = ia_css_binary_find(&capture_pp_descr,
- &pipe->pipe_settings.capture.capture_pp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- } else {
- post_out_info = *pipe_out_info;
- }
+ ia_css_pipe_get_capturepp_binarydesc(pipe,
+ &capture_pp_descr, &post_out_info, pipe_out_info, &vf_info);
+ err = ia_css_binary_find(&capture_pp_descr,
+ &pipe->pipe_settings.capture.capture_pp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ } else {
+ post_out_info = *pipe_out_info;
+ }
- /* Post-anr */
- {
- struct ia_css_binary_descr post_anr_descr;
+ /* Post-anr */
+ {
+ struct ia_css_binary_descr post_anr_descr;
- ia_css_pipe_get_post_anr_binarydesc(pipe,
- &post_anr_descr, &post_in_info, &post_out_info, &vf_info);
- err = ia_css_binary_find(&post_anr_descr,
- &pipe->pipe_settings.capture.post_isp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
+ ia_css_pipe_get_post_anr_binarydesc(pipe,
+ &post_anr_descr, &post_in_info, &post_out_info, &vf_info);
+ err = ia_css_binary_find(&post_anr_descr,
+ &pipe->pipe_settings.capture.post_isp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
- /* Anr */
- {
- struct ia_css_binary_descr anr_descr;
+ /* Anr */
+ {
+ struct ia_css_binary_descr anr_descr;
- ia_css_pipe_get_anr_binarydesc(pipe, &anr_descr, &anr_in_info,
- &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
- err = ia_css_binary_find(&anr_descr,
- &pipe->pipe_settings.capture.anr_gdc_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
- pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
- pipe->pipe_settings.capture.post_isp_binary.left_padding;
+ ia_css_pipe_get_anr_binarydesc(pipe, &anr_descr, &anr_in_info,
+ &pipe->pipe_settings.capture.post_isp_binary.in_frame_info);
+ err = ia_css_binary_find(&anr_descr,
+ &pipe->pipe_settings.capture.anr_gdc_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ pipe->pipe_settings.capture.anr_gdc_binary.left_padding =
+ pipe->pipe_settings.capture.post_isp_binary.left_padding;
- /* Pre-anr */
- {
- struct ia_css_binary_descr pre_anr_descr;
+ /* Pre-anr */
+ {
+ struct ia_css_binary_descr pre_anr_descr;
- ia_css_pipe_get_pre_anr_binarydesc(pipe, &pre_anr_descr, &pre_in_info,
- &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
- err = ia_css_binary_find(&pre_anr_descr,
- &pipe->pipe_settings.capture.pre_isp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
- pipe->pipe_settings.capture.pre_isp_binary.left_padding =
- pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
+ ia_css_pipe_get_pre_anr_binarydesc(pipe, &pre_anr_descr, &pre_in_info,
+ &pipe->pipe_settings.capture.anr_gdc_binary.in_frame_info);
+ err = ia_css_binary_find(&pre_anr_descr,
+ &pipe->pipe_settings.capture.pre_isp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
+ pipe->pipe_settings.capture.pre_isp_binary.left_padding =
+ pipe->pipe_settings.capture.anr_gdc_binary.left_padding;
- /* Viewfinder post-processing */
- if (need_pp) {
- vf_pp_in_info =
- &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
- } else {
- vf_pp_in_info =
- &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
- }
+ /* Viewfinder post-processing */
+ if (need_pp) {
+ vf_pp_in_info =
+ &pipe->pipe_settings.capture.capture_pp_binary.vf_frame_info;
+ } else {
+ vf_pp_in_info =
+ &pipe->pipe_settings.capture.post_isp_binary.vf_frame_info;
+ }
- {
- struct ia_css_binary_descr vf_pp_descr;
+ {
+ struct ia_css_binary_descr vf_pp_descr;
- ia_css_pipe_get_vfpp_binarydesc(pipe,
- &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
- err = ia_css_binary_find(&vf_pp_descr,
- &pipe->pipe_settings.capture.vf_pp_binary);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
+ ia_css_pipe_get_vfpp_binarydesc(pipe,
+ &vf_pp_descr, vf_pp_in_info, pipe_vf_out_info);
+ err = ia_css_binary_find(&vf_pp_descr,
+ &pipe->pipe_settings.capture.vf_pp_binary);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
- /* Copy */
+ /* Copy */
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* For CSI2+, only the direct sensor mode/online requires ISP copy */
- need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+ /* For CSI2+, only the direct sensor mode/online requires ISP copy */
+ need_isp_copy = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
#endif
- if (need_isp_copy)
- err = load_copy_binary(pipe,
- &pipe->pipe_settings.capture.copy_binary,
- &pipe->pipe_settings.capture.pre_isp_binary);
+ if (need_isp_copy)
+ err = load_copy_binary(pipe,
+ &pipe->pipe_settings.capture.copy_binary,
+ &pipe->pipe_settings.capture.pre_isp_binary);
- return err;
-}
+ return err;
+ }
-static bool copy_on_sp(struct ia_css_pipe *pipe)
-{
- bool rval;
+ static bool copy_on_sp(struct ia_css_pipe *pipe) {
+ bool rval;
- assert(pipe);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n");
+ assert(pipe);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "copy_on_sp() enter:\n");
- rval = true;
+ rval = true;
- rval &= (pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
+ rval &= (pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
- rval &= (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW);
+ rval &= (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW);
- rval &= ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) ||
- (pipe->config.mode == IA_CSS_PIPE_MODE_COPY));
+ rval &= ((pipe->stream->config.input_config.format ==
+ ATOMISP_INPUT_FORMAT_BINARY_8) ||
+ (pipe->config.mode == IA_CSS_PIPE_MODE_COPY));
- return rval;
-}
+ return rval;
+ }
-static enum ia_css_err load_capture_binaries(
- struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
- bool must_be_raw;
+ static enum ia_css_err load_capture_binaries(
+ struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ bool must_be_raw;
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE ||
+ pipe->mode == IA_CSS_PIPE_ID_COPY);
- if (pipe->pipe_settings.capture.primary_binary[0].info) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
- }
+ if (pipe->pipe_settings.capture.primary_binary[0].info) {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
+ }
- /* in primary, advanced,low light or bayer,
- the input format must be raw */
- must_be_raw =
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT;
- err = ia_css_util_check_input(&pipe->stream->config, must_be_raw, false);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- if (copy_on_sp(pipe) &&
- pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
- ia_css_frame_info_init(
- &pipe->output_info[0],
- JPEG_BYTES,
- 1,
- IA_CSS_FRAME_FORMAT_BINARY_8,
- 0);
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
- }
+ /* in primary, advanced,low light or bayer,
+ the input format must be raw */
+ must_be_raw =
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT;
+ err = ia_css_util_check_input(&pipe->stream->config, must_be_raw, false);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ if (copy_on_sp(pipe) &&
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
+ ia_css_frame_info_init(
+ &pipe->output_info[0],
+ JPEG_BYTES,
+ 1,
+ IA_CSS_FRAME_FORMAT_BINARY_8,
+ 0);
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
+ }
- switch (pipe->config.default_capture_config.mode) {
- case IA_CSS_CAPTURE_MODE_RAW:
- err = load_copy_binaries(pipe);
+ switch (pipe->config.default_capture_config.mode) {
+ case IA_CSS_CAPTURE_MODE_RAW:
+ err = load_copy_binaries(pipe);
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
- if (err == IA_CSS_SUCCESS)
- pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
+ if (err == IA_CSS_SUCCESS)
+ pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
#endif
- break;
- case IA_CSS_CAPTURE_MODE_BAYER:
- err = load_bayer_isp_binaries(pipe);
- break;
- case IA_CSS_CAPTURE_MODE_PRIMARY:
- err = load_primary_binaries(pipe);
- break;
- case IA_CSS_CAPTURE_MODE_ADVANCED:
- err = load_advanced_binaries(pipe);
- break;
- case IA_CSS_CAPTURE_MODE_LOW_LIGHT:
- err = load_low_light_binaries(pipe);
- break;
- }
- if (err != IA_CSS_SUCCESS) {
+ break;
+ case IA_CSS_CAPTURE_MODE_BAYER:
+ err = load_bayer_isp_binaries(pipe);
+ break;
+ case IA_CSS_CAPTURE_MODE_PRIMARY:
+ err = load_primary_binaries(pipe);
+ break;
+ case IA_CSS_CAPTURE_MODE_ADVANCED:
+ err = load_advanced_binaries(pipe);
+ break;
+ case IA_CSS_CAPTURE_MODE_LOW_LIGHT:
+ err = load_low_light_binaries(pipe);
+ break;
+ }
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
+ static enum ia_css_err
+ unload_capture_binaries(struct ia_css_pipe *pipe) {
+ unsigned int i;
-static enum ia_css_err
-unload_capture_binaries(struct ia_css_pipe *pipe)
-{
- unsigned int i;
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ if ((!pipe) || ((pipe->mode != IA_CSS_PIPE_ID_CAPTURE) && (pipe->mode != IA_CSS_PIPE_ID_COPY)))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ ia_css_binary_unload(&pipe->pipe_settings.capture.copy_binary);
+ for (i = 0; i < MAX_NUM_PRIMARY_STAGES; i++)
+ ia_css_binary_unload(&pipe->pipe_settings.capture.primary_binary[i]);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.pre_isp_binary);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.anr_gdc_binary);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.post_isp_binary);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.capture_pp_binary);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.capture_ldc_binary);
+ ia_css_binary_unload(&pipe->pipe_settings.capture.vf_pp_binary);
- if ((!pipe) || ((pipe->mode != IA_CSS_PIPE_ID_CAPTURE) && (pipe->mode != IA_CSS_PIPE_ID_COPY))) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ for (i = 0; i < pipe->pipe_settings.capture.num_yuv_scaler; i++)
+ ia_css_binary_unload(&pipe->pipe_settings.capture.yuv_scaler_binary[i]);
+
+ kfree(pipe->pipe_settings.capture.is_output_stage);
+ pipe->pipe_settings.capture.is_output_stage = NULL;
+ kfree(pipe->pipe_settings.capture.yuv_scaler_binary);
+ pipe->pipe_settings.capture.yuv_scaler_binary = NULL;
+
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
}
- ia_css_binary_unload(&pipe->pipe_settings.capture.copy_binary);
- for (i = 0; i < MAX_NUM_PRIMARY_STAGES; i++)
- ia_css_binary_unload(&pipe->pipe_settings.capture.primary_binary[i]);
- ia_css_binary_unload(&pipe->pipe_settings.capture.pre_isp_binary);
- ia_css_binary_unload(&pipe->pipe_settings.capture.anr_gdc_binary);
- ia_css_binary_unload(&pipe->pipe_settings.capture.post_isp_binary);
- ia_css_binary_unload(&pipe->pipe_settings.capture.capture_pp_binary);
- ia_css_binary_unload(&pipe->pipe_settings.capture.capture_ldc_binary);
- ia_css_binary_unload(&pipe->pipe_settings.capture.vf_pp_binary);
- for (i = 0; i < pipe->pipe_settings.capture.num_yuv_scaler; i++)
- ia_css_binary_unload(&pipe->pipe_settings.capture.yuv_scaler_binary[i]);
+ static bool
+ need_downscaling(const struct ia_css_resolution in_res,
+ const struct ia_css_resolution out_res) {
+ if (in_res.width > out_res.width || in_res.height > out_res.height)
+ return true;
- kfree(pipe->pipe_settings.capture.is_output_stage);
- pipe->pipe_settings.capture.is_output_stage = NULL;
- kfree(pipe->pipe_settings.capture.yuv_scaler_binary);
- pipe->pipe_settings.capture.yuv_scaler_binary = NULL;
+ return false;
+ }
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
-}
+ static bool
+ need_yuv_scaler_stage(const struct ia_css_pipe *pipe) {
+ unsigned int i;
+ struct ia_css_resolution in_res, out_res;
-static bool
-need_downscaling(const struct ia_css_resolution in_res,
- const struct ia_css_resolution out_res)
-{
- if (in_res.width > out_res.width || in_res.height > out_res.height)
- return true;
+ bool need_format_conversion = false;
- return false;
-}
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
-static bool
-need_yuv_scaler_stage(const struct ia_css_pipe *pipe)
-{
- unsigned int i;
- struct ia_css_resolution in_res, out_res;
+ /* TODO: make generic function */
+ need_format_conversion =
+ ((pipe->stream->config.input_config.format ==
+ ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) &&
+ (pipe->output_info[0].format != IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8));
- bool need_format_conversion = false;
+ in_res = pipe->config.input_effective_res;
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
-
- /* TODO: make generic function */
- need_format_conversion =
- ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) &&
- (pipe->output_info[0].format != IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8));
-
- in_res = pipe->config.input_effective_res;
+ if (pipe->config.enable_dz)
+ return true;
- if (pipe->config.enable_dz)
- return true;
+ if ((pipe->output_info[0].res.width != 0) && need_format_conversion)
+ return true;
- if ((pipe->output_info[0].res.width != 0) && need_format_conversion)
- return true;
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+ out_res = pipe->output_info[i].res;
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- out_res = pipe->output_info[i].res;
+ /* A non-zero width means it is a valid output port */
+ if ((out_res.width != 0) && need_downscaling(in_res, out_res))
+ return true;
+ }
- /* A non-zero width means it is a valid output port */
- if ((out_res.width != 0) && need_downscaling(in_res, out_res))
- return true;
+ return false;
}
- return false;
-}
-
-/* TODO: it is temporarily created from ia_css_pipe_create_cas_scaler_desc */
-/* which has some hard-coded knowledge which prevents reuse of the function. */
-/* Later, merge this with ia_css_pipe_create_cas_scaler_desc */
-static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
- struct ia_css_frame_info *cas_scaler_in_info,
- struct ia_css_frame_info *cas_scaler_out_info,
- struct ia_css_frame_info *cas_scaler_vf_info,
- struct ia_css_cas_binary_descr *descr)
-{
- unsigned int i;
- unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_frame_info tmp_in_info;
+ /* TODO: it is temporarily created from ia_css_pipe_create_cas_scaler_desc */
+ /* which has some hard-coded knowledge which prevents reuse of the function. */
+ /* Later, merge this with ia_css_pipe_create_cas_scaler_desc */
+ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output(
+ struct ia_css_frame_info *cas_scaler_in_info,
+ struct ia_css_frame_info *cas_scaler_out_info,
+ struct ia_css_frame_info *cas_scaler_vf_info,
+ struct ia_css_cas_binary_descr *descr) {
+ unsigned int i;
+ unsigned int hor_ds_factor = 0, ver_ds_factor = 0;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_frame_info tmp_in_info;
- unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
+ unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
- assert(cas_scaler_in_info);
- assert(cas_scaler_out_info);
+ assert(cas_scaler_in_info);
+ assert(cas_scaler_out_info);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() enter:\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_create_cas_scaler_desc() enter:\n");
- /* We assume that this function is used only for single output port case. */
- descr->num_output_stage = 1;
+ /* We assume that this function is used only for single output port case. */
+ descr->num_output_stage = 1;
- hor_ds_factor = CEIL_DIV(cas_scaler_in_info->res.width, cas_scaler_out_info->res.width);
- ver_ds_factor = CEIL_DIV(cas_scaler_in_info->res.height, cas_scaler_out_info->res.height);
- /* use the same horizontal and vertical downscaling factor for simplicity */
- assert(hor_ds_factor == ver_ds_factor);
+ hor_ds_factor = CEIL_DIV(cas_scaler_in_info->res.width,
+ cas_scaler_out_info->res.width);
+ ver_ds_factor = CEIL_DIV(cas_scaler_in_info->res.height,
+ cas_scaler_out_info->res.height);
+ /* use the same horizontal and vertical downscaling factor for simplicity */
+ assert(hor_ds_factor == ver_ds_factor);
- i = 1;
- while (i < hor_ds_factor) {
- descr->num_stage++;
- i *= max_scale_factor_per_stage;
- }
+ i = 1;
+ while (i < hor_ds_factor) {
+ descr->num_stage++;
+ i *= max_scale_factor_per_stage;
+ }
- descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->in_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->internal_out_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->out_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->vf_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
- if (!descr->is_output_stage) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
+ descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+ GFP_KERNEL);
+ if (!descr->in_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->internal_out_info = kmalloc(descr->num_stage * sizeof(
+ struct ia_css_frame_info), GFP_KERNEL);
+ if (!descr->internal_out_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+ GFP_KERNEL);
+ if (!descr->out_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+ GFP_KERNEL);
+ if (!descr->vf_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
+ if (!descr->is_output_stage) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
- tmp_in_info = *cas_scaler_in_info;
- for (i = 0; i < descr->num_stage; i++) {
- descr->in_info[i] = tmp_in_info;
- if ((tmp_in_info.res.width / max_scale_factor_per_stage) <= cas_scaler_out_info->res.width) {
- descr->is_output_stage[i] = true;
- if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
- descr->internal_out_info[i].res.width = cas_scaler_out_info->res.width;
- descr->internal_out_info[i].res.height = cas_scaler_out_info->res.height;
- descr->internal_out_info[i].padded_width = cas_scaler_out_info->padded_width;
- descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
- } else {
- assert(i == (descr->num_stage - 1));
- descr->internal_out_info[i].res.width = 0;
- descr->internal_out_info[i].res.height = 0;
- }
- descr->out_info[i].res.width = cas_scaler_out_info->res.width;
- descr->out_info[i].res.height = cas_scaler_out_info->res.height;
- descr->out_info[i].padded_width = cas_scaler_out_info->padded_width;
- descr->out_info[i].format = cas_scaler_out_info->format;
- if (cas_scaler_vf_info) {
- descr->vf_info[i].res.width = cas_scaler_vf_info->res.width;
- descr->vf_info[i].res.height = cas_scaler_vf_info->res.height;
- descr->vf_info[i].padded_width = cas_scaler_vf_info->padded_width;
- ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+ tmp_in_info = *cas_scaler_in_info;
+ for (i = 0; i < descr->num_stage; i++) {
+ descr->in_info[i] = tmp_in_info;
+ if ((tmp_in_info.res.width / max_scale_factor_per_stage) <=
+ cas_scaler_out_info->res.width) {
+ descr->is_output_stage[i] = true;
+ if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
+ descr->internal_out_info[i].res.width = cas_scaler_out_info->res.width;
+ descr->internal_out_info[i].res.height = cas_scaler_out_info->res.height;
+ descr->internal_out_info[i].padded_width = cas_scaler_out_info->padded_width;
+ descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+ } else {
+ assert(i == (descr->num_stage - 1));
+ descr->internal_out_info[i].res.width = 0;
+ descr->internal_out_info[i].res.height = 0;
+ }
+ descr->out_info[i].res.width = cas_scaler_out_info->res.width;
+ descr->out_info[i].res.height = cas_scaler_out_info->res.height;
+ descr->out_info[i].padded_width = cas_scaler_out_info->padded_width;
+ descr->out_info[i].format = cas_scaler_out_info->format;
+ if (cas_scaler_vf_info) {
+ descr->vf_info[i].res.width = cas_scaler_vf_info->res.width;
+ descr->vf_info[i].res.height = cas_scaler_vf_info->res.height;
+ descr->vf_info[i].padded_width = cas_scaler_vf_info->padded_width;
+ ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+ } else {
+ descr->vf_info[i].res.width = 0;
+ descr->vf_info[i].res.height = 0;
+ descr->vf_info[i].padded_width = 0;
+ }
} else {
+ descr->is_output_stage[i] = false;
+ descr->internal_out_info[i].res.width = tmp_in_info.res.width /
+ max_scale_factor_per_stage;
+ descr->internal_out_info[i].res.height = tmp_in_info.res.height /
+ max_scale_factor_per_stage;
+ descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+ ia_css_frame_info_init(&descr->internal_out_info[i],
+ tmp_in_info.res.width / max_scale_factor_per_stage,
+ tmp_in_info.res.height / max_scale_factor_per_stage,
+ IA_CSS_FRAME_FORMAT_YUV420, 0);
+ descr->out_info[i].res.width = 0;
+ descr->out_info[i].res.height = 0;
descr->vf_info[i].res.width = 0;
descr->vf_info[i].res.height = 0;
- descr->vf_info[i].padded_width = 0;
}
- } else {
- descr->is_output_stage[i] = false;
- descr->internal_out_info[i].res.width = tmp_in_info.res.width / max_scale_factor_per_stage;
- descr->internal_out_info[i].res.height = tmp_in_info.res.height / max_scale_factor_per_stage;
- descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
- ia_css_frame_info_init(&descr->internal_out_info[i],
- tmp_in_info.res.width / max_scale_factor_per_stage,
- tmp_in_info.res.height / max_scale_factor_per_stage,
- IA_CSS_FRAME_FORMAT_YUV420, 0);
- descr->out_info[i].res.width = 0;
- descr->out_info[i].res.height = 0;
- descr->vf_info[i].res.width = 0;
- descr->vf_info[i].res.height = 0;
- }
- tmp_in_info = descr->internal_out_info[i];
- }
+ tmp_in_info = descr->internal_out_info[i];
+ }
ERR:
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
- err);
- return err;
-}
-
-/* FIXME: merge most of this and single output version */
-static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pipe,
- struct ia_css_cas_binary_descr *descr)
-{
- struct ia_css_frame_info in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
- struct ia_css_frame_info *out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
- struct ia_css_frame_info *vf_out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
- struct ia_css_frame_info tmp_in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
- unsigned int i, j;
- unsigned int hor_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
- ver_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
- scale_factor = 0;
- unsigned int num_stages = 0;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
+ err);
+ return err;
+ }
- unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
+ /* FIXME: merge most of this and single output version */
+ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(
+ struct ia_css_pipe *pipe,
+ struct ia_css_cas_binary_descr *descr) {
+ struct ia_css_frame_info in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
+ struct ia_css_frame_info *out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+ struct ia_css_frame_info *vf_out_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+ struct ia_css_frame_info tmp_in_info = IA_CSS_BINARY_DEFAULT_FRAME_INFO;
+ unsigned int i, j;
+ unsigned int hor_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
+ ver_scale_factor[IA_CSS_PIPE_MAX_OUTPUT_STAGE],
+ scale_factor = 0;
+ unsigned int num_stages = 0;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() enter:\n");
+ unsigned int max_scale_factor_per_stage = MAX_PREFERRED_YUV_DS_PER_STEP;
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- out_info[i] = NULL;
- vf_out_info[i] = NULL;
- hor_scale_factor[i] = 0;
- ver_scale_factor[i] = 0;
- }
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_create_cas_scaler_desc() enter:\n");
- in_info.res = pipe->config.input_effective_res;
- in_info.padded_width = in_info.res.width;
- descr->num_output_stage = 0;
- /* Find out how much scaling we need for each output */
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- if (pipe->output_info[i].res.width != 0) {
- out_info[i] = &pipe->output_info[i];
- if (pipe->vf_output_info[i].res.width != 0)
- vf_out_info[i] = &pipe->vf_output_info[i];
- descr->num_output_stage += 1;
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+ out_info[i] = NULL;
+ vf_out_info[i] = NULL;
+ hor_scale_factor[i] = 0;
+ ver_scale_factor[i] = 0;
}
- if (out_info[i]) {
- hor_scale_factor[i] = CEIL_DIV(in_info.res.width, out_info[i]->res.width);
- ver_scale_factor[i] = CEIL_DIV(in_info.res.height, out_info[i]->res.height);
- /* use the same horizontal and vertical scaling factor for simplicity */
- assert(hor_scale_factor[i] == ver_scale_factor[i]);
- scale_factor = 1;
- do {
- num_stages++;
- scale_factor *= max_scale_factor_per_stage;
- } while (scale_factor < hor_scale_factor[i]);
+ in_info.res = pipe->config.input_effective_res;
+ in_info.padded_width = in_info.res.width;
+ descr->num_output_stage = 0;
+ /* Find out how much scaling we need for each output */
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+ if (pipe->output_info[i].res.width != 0) {
+ out_info[i] = &pipe->output_info[i];
+ if (pipe->vf_output_info[i].res.width != 0)
+ vf_out_info[i] = &pipe->vf_output_info[i];
+ descr->num_output_stage += 1;
+ }
- in_info.res = out_info[i]->res;
+ if (out_info[i]) {
+ hor_scale_factor[i] = CEIL_DIV(in_info.res.width, out_info[i]->res.width);
+ ver_scale_factor[i] = CEIL_DIV(in_info.res.height, out_info[i]->res.height);
+ /* use the same horizontal and vertical scaling factor for simplicity */
+ assert(hor_scale_factor[i] == ver_scale_factor[i]);
+ scale_factor = 1;
+ do {
+ num_stages++;
+ scale_factor *= max_scale_factor_per_stage;
+ } while (scale_factor < hor_scale_factor[i]);
+
+ in_info.res = out_info[i]->res;
+ }
}
- }
- if (need_yuv_scaler_stage(pipe) && (num_stages == 0))
- num_stages = 1;
+ if (need_yuv_scaler_stage(pipe) && (num_stages == 0))
+ num_stages = 1;
- descr->num_stage = num_stages;
+ descr->num_stage = num_stages;
- descr->in_info = kmalloc_array(descr->num_stage, sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->in_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->internal_out_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->out_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL);
- if (!descr->vf_info) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
- if (!descr->is_output_stage) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
+ descr->in_info = kmalloc_array(descr->num_stage,
+ sizeof(struct ia_css_frame_info), GFP_KERNEL);
+ if (!descr->in_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->internal_out_info = kmalloc(descr->num_stage * sizeof(
+ struct ia_css_frame_info), GFP_KERNEL);
+ if (!descr->internal_out_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+ GFP_KERNEL);
+ if (!descr->out_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info),
+ GFP_KERNEL);
+ if (!descr->vf_info) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL);
+ if (!descr->is_output_stage) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- if (out_info[i]) {
- if (i > 0) {
- assert((out_info[i - 1]->res.width >= out_info[i]->res.width) &&
- (out_info[i - 1]->res.height >= out_info[i]->res.height));
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+ if (out_info[i]) {
+ if (i > 0) {
+ assert((out_info[i - 1]->res.width >= out_info[i]->res.width) &&
+ (out_info[i - 1]->res.height >= out_info[i]->res.height));
+ }
}
}
- }
-
- tmp_in_info.res = pipe->config.input_effective_res;
- tmp_in_info.format = IA_CSS_FRAME_FORMAT_YUV420;
- for (i = 0, j = 0; i < descr->num_stage; i++) {
- assert(j < 2);
- assert(out_info[j]);
- descr->in_info[i] = tmp_in_info;
- if ((tmp_in_info.res.width / max_scale_factor_per_stage) <= out_info[j]->res.width) {
- descr->is_output_stage[i] = true;
- if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
- descr->internal_out_info[i].res.width = out_info[j]->res.width;
- descr->internal_out_info[i].res.height = out_info[j]->res.height;
- descr->internal_out_info[i].padded_width = out_info[j]->padded_width;
- descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
- } else {
- assert(i == (descr->num_stage - 1));
- descr->internal_out_info[i].res.width = 0;
- descr->internal_out_info[i].res.height = 0;
- }
- descr->out_info[i].res.width = out_info[j]->res.width;
- descr->out_info[i].res.height = out_info[j]->res.height;
- descr->out_info[i].padded_width = out_info[j]->padded_width;
- descr->out_info[i].format = out_info[j]->format;
- if (vf_out_info[j]) {
- descr->vf_info[i].res.width = vf_out_info[j]->res.width;
- descr->vf_info[i].res.height = vf_out_info[j]->res.height;
- descr->vf_info[i].padded_width = vf_out_info[j]->padded_width;
- ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+ tmp_in_info.res = pipe->config.input_effective_res;
+ tmp_in_info.format = IA_CSS_FRAME_FORMAT_YUV420;
+ for (i = 0, j = 0; i < descr->num_stage; i++) {
+ assert(j < 2);
+ assert(out_info[j]);
+
+ descr->in_info[i] = tmp_in_info;
+ if ((tmp_in_info.res.width / max_scale_factor_per_stage) <=
+ out_info[j]->res.width) {
+ descr->is_output_stage[i] = true;
+ if ((descr->num_output_stage > 1) && (i != (descr->num_stage - 1))) {
+ descr->internal_out_info[i].res.width = out_info[j]->res.width;
+ descr->internal_out_info[i].res.height = out_info[j]->res.height;
+ descr->internal_out_info[i].padded_width = out_info[j]->padded_width;
+ descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+ } else {
+ assert(i == (descr->num_stage - 1));
+ descr->internal_out_info[i].res.width = 0;
+ descr->internal_out_info[i].res.height = 0;
+ }
+ descr->out_info[i].res.width = out_info[j]->res.width;
+ descr->out_info[i].res.height = out_info[j]->res.height;
+ descr->out_info[i].padded_width = out_info[j]->padded_width;
+ descr->out_info[i].format = out_info[j]->format;
+ if (vf_out_info[j]) {
+ descr->vf_info[i].res.width = vf_out_info[j]->res.width;
+ descr->vf_info[i].res.height = vf_out_info[j]->res.height;
+ descr->vf_info[i].padded_width = vf_out_info[j]->padded_width;
+ ia_css_frame_info_set_format(&descr->vf_info[i], IA_CSS_FRAME_FORMAT_YUV_LINE);
+ } else {
+ descr->vf_info[i].res.width = 0;
+ descr->vf_info[i].res.height = 0;
+ descr->vf_info[i].padded_width = 0;
+ }
+ j++;
} else {
+ descr->is_output_stage[i] = false;
+ descr->internal_out_info[i].res.width = tmp_in_info.res.width /
+ max_scale_factor_per_stage;
+ descr->internal_out_info[i].res.height = tmp_in_info.res.height /
+ max_scale_factor_per_stage;
+ descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
+ ia_css_frame_info_init(&descr->internal_out_info[i],
+ tmp_in_info.res.width / max_scale_factor_per_stage,
+ tmp_in_info.res.height / max_scale_factor_per_stage,
+ IA_CSS_FRAME_FORMAT_YUV420, 0);
+ descr->out_info[i].res.width = 0;
+ descr->out_info[i].res.height = 0;
descr->vf_info[i].res.width = 0;
descr->vf_info[i].res.height = 0;
- descr->vf_info[i].padded_width = 0;
}
- j++;
- } else {
- descr->is_output_stage[i] = false;
- descr->internal_out_info[i].res.width = tmp_in_info.res.width / max_scale_factor_per_stage;
- descr->internal_out_info[i].res.height = tmp_in_info.res.height / max_scale_factor_per_stage;
- descr->internal_out_info[i].format = IA_CSS_FRAME_FORMAT_YUV420;
- ia_css_frame_info_init(&descr->internal_out_info[i],
- tmp_in_info.res.width / max_scale_factor_per_stage,
- tmp_in_info.res.height / max_scale_factor_per_stage,
- IA_CSS_FRAME_FORMAT_YUV420, 0);
- descr->out_info[i].res.width = 0;
- descr->out_info[i].res.height = 0;
- descr->vf_info[i].res.width = 0;
- descr->vf_info[i].res.height = 0;
- }
- tmp_in_info = descr->internal_out_info[i];
- }
+ tmp_in_info = descr->internal_out_info[i];
+ }
ERR:
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
- err);
- return err;
-}
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_create_cas_scaler_desc() leave, err=%d\n",
+ err);
+ return err;
+ }
-static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr *descr)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_destroy_cas_scaler_desc() enter:\n");
- kfree(descr->in_info);
- descr->in_info = NULL;
- kfree(descr->internal_out_info);
- descr->internal_out_info = NULL;
- kfree(descr->out_info);
- descr->out_info = NULL;
- kfree(descr->vf_info);
- descr->vf_info = NULL;
- kfree(descr->is_output_stage);
- descr->is_output_stage = NULL;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_destroy_cas_scaler_desc() leave\n");
-}
+ static void ia_css_pipe_destroy_cas_scaler_desc(struct ia_css_cas_binary_descr
+ *descr) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_destroy_cas_scaler_desc() enter:\n");
+ kfree(descr->in_info);
+ descr->in_info = NULL;
+ kfree(descr->internal_out_info);
+ descr->internal_out_info = NULL;
+ kfree(descr->out_info);
+ descr->out_info = NULL;
+ kfree(descr->vf_info);
+ descr->vf_info = NULL;
+ kfree(descr->is_output_stage);
+ descr->is_output_stage = NULL;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "ia_css_pipe_destroy_cas_scaler_desc() leave\n");
+ }
-static enum ia_css_err
-load_yuvpp_binaries(struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
- bool need_scaler = false;
- struct ia_css_frame_info *vf_pp_in_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
- struct ia_css_yuvpp_settings *mycs;
- struct ia_css_binary *next_binary;
- struct ia_css_cas_binary_descr cas_scaler_descr = { };
- unsigned int i, j;
- bool need_isp_copy_binary = false;
+ static enum ia_css_err
+ load_yuvpp_binaries(struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ bool need_scaler = false;
+ struct ia_css_frame_info *vf_pp_in_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+ struct ia_css_yuvpp_settings *mycs;
+ struct ia_css_binary *next_binary;
+ struct ia_css_cas_binary_descr cas_scaler_descr = { };
+ unsigned int i, j;
+ bool need_isp_copy_binary = false;
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->stream);
- assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->stream);
+ assert(pipe->mode == IA_CSS_PIPE_ID_YUVPP);
- if (pipe->pipe_settings.yuvpp.copy_binary.info)
- goto ERR;
+ if (pipe->pipe_settings.yuvpp.copy_binary.info)
+ goto ERR;
- /* Set both must_be_raw and must_be_yuv to false then yuvpp can take rgb inputs */
- err = ia_css_util_check_input(&pipe->stream->config, false, false);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ /* Set both must_be_raw and must_be_yuv to false then yuvpp can take rgb inputs */
+ err = ia_css_util_check_input(&pipe->stream->config, false, false);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
- mycs = &pipe->pipe_settings.yuvpp;
+ mycs = &pipe->pipe_settings.yuvpp;
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- if (pipe->vf_output_info[i].res.width != 0) {
- err = ia_css_util_check_vf_out_info(&pipe->output_info[i],
- &pipe->vf_output_info[i]);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+ {
+ if (pipe->vf_output_info[i].res.width != 0) {
+ err = ia_css_util_check_vf_out_info(&pipe->output_info[i],
+ &pipe->vf_output_info[i]);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ }
+ vf_pp_in_info[i] = NULL;
}
- vf_pp_in_info[i] = NULL;
- }
- need_scaler = need_yuv_scaler_stage(pipe);
+ need_scaler = need_yuv_scaler_stage(pipe);
- /* we build up the pipeline starting at the end */
- /* Capture post-processing */
- if (need_scaler) {
- struct ia_css_binary_descr yuv_scaler_descr;
+ /* we build up the pipeline starting at the end */
+ /* Capture post-processing */
+ if (need_scaler)
+ {
+ struct ia_css_binary_descr yuv_scaler_descr;
- err = ia_css_pipe_create_cas_scaler_desc(pipe,
- &cas_scaler_descr);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
- mycs->num_output = cas_scaler_descr.num_output_stage;
- mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
- mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
- sizeof(struct ia_css_binary), GFP_KERNEL);
- if (!mycs->yuv_scaler_binary) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
- sizeof(bool), GFP_KERNEL);
- if (!mycs->is_output_stage) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- for (i = 0; i < cas_scaler_descr.num_stage; i++) {
- mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
- ia_css_pipe_get_yuvscaler_binarydesc(pipe,
- &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
- &cas_scaler_descr.out_info[i],
- &cas_scaler_descr.internal_out_info[i],
- &cas_scaler_descr.vf_info[i]);
- err = ia_css_binary_find(&yuv_scaler_descr,
- &mycs->yuv_scaler_binary[i]);
+ err = ia_css_pipe_create_cas_scaler_desc(pipe,
+ &cas_scaler_descr);
if (err != IA_CSS_SUCCESS)
goto ERR;
+ mycs->num_output = cas_scaler_descr.num_output_stage;
+ mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
+ mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
+ sizeof(struct ia_css_binary), GFP_KERNEL);
+ if (!mycs->yuv_scaler_binary) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
+ sizeof(bool), GFP_KERNEL);
+ if (!mycs->is_output_stage) {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
+ }
+ for (i = 0; i < cas_scaler_descr.num_stage; i++) {
+ mycs->is_output_stage[i] = cas_scaler_descr.is_output_stage[i];
+ ia_css_pipe_get_yuvscaler_binarydesc(pipe,
+ &yuv_scaler_descr, &cas_scaler_descr.in_info[i],
+ &cas_scaler_descr.out_info[i],
+ &cas_scaler_descr.internal_out_info[i],
+ &cas_scaler_descr.vf_info[i]);
+ err = ia_css_binary_find(&yuv_scaler_descr,
+ &mycs->yuv_scaler_binary[i]);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ }
+ ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+ } else
+ {
+ mycs->num_output = 1;
}
- ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
- } else {
- mycs->num_output = 1;
- }
- if (need_scaler) {
- next_binary = &mycs->yuv_scaler_binary[0];
- } else {
- next_binary = NULL;
- }
+ if (need_scaler)
+ {
+ next_binary = &mycs->yuv_scaler_binary[0];
+ } else
+ {
+ next_binary = NULL;
+ }
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
- /*
- * NOTES
- * - Why does the "yuvpp" pipe needs "isp_copy_binary" (i.e. ISP Copy) when
- * its input is "ATOMISP_INPUT_FORMAT_YUV422_8"?
- *
- * In most use cases, the first stage in the "yuvpp" pipe is the "yuv_scale_
- * binary". However, the "yuv_scale_binary" does NOT support the input-frame
- * format as "IA_CSS_STREAM _FORMAT_YUV422_8".
- *
- * Hence, the "isp_copy_binary" is required to be present in front of the "yuv
- * _scale_binary". It would translate the input-frame to the frame formats that
- * are supported by the "yuv_scale_binary".
- *
- * Please refer to "FrameWork/css/isp/pipes/capture_pp/capture_pp_1.0/capture_
- * pp_defs.h" for the list of input-frame formats that are supported by the
- * "yuv_scale_binary".
- */
- need_isp_copy_binary =
- (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8);
-#else /* !USE_INPUT_SYSTEM_VERSION_2401 */
- need_isp_copy_binary = true;
-#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
-
- if (need_isp_copy_binary) {
- err = load_copy_binary(pipe,
- &mycs->copy_binary,
- next_binary);
-
- if (err != IA_CSS_SUCCESS)
- goto ERR;
-
/*
* NOTES
- * - Why is "pipe->pipe_settings.capture.copy_binary.online" specified?
+ * - Why does the "yuvpp" pipe needs "isp_copy_binary" (i.e. ISP Copy) when
+ * its input is "ATOMISP_INPUT_FORMAT_YUV422_8"?
*
- * In some use cases, the first stage in the "yuvpp" pipe is the
- * "isp_copy_binary". The "isp_copy_binary" is designed to process
- * the input from either the system DDR or from the IPU internal VMEM.
- * So it provides the flag "online" to specify where its input is from,
- * i.e.:
+ * In most use cases, the first stage in the "yuvpp" pipe is the "yuv_scale_
+ * binary". However, the "yuv_scale_binary" does NOT support the input-frame
+ * format as "IA_CSS_STREAM _FORMAT_YUV422_8".
*
- * (1) "online <= true", the input is from the IPU internal VMEM.
- * (2) "online <= false", the input is from the system DDR.
+ * Hence, the "isp_copy_binary" is required to be present in front of the "yuv
+ * _scale_binary". It would translate the input-frame to the frame formats that
+ * are supported by the "yuv_scale_binary".
*
- * In other use cases, the first stage in the "yuvpp" pipe is the
- * "yuv_scale_binary". "The "yuv_scale_binary" is designed to process the
- * input ONLY from the system DDR. So it does not provide the flag "online"
- * to specify where its input is from.
+ * Please refer to "FrameWork/css/isp/pipes/capture_pp/capture_pp_1.0/capture_
+ * pp_defs.h" for the list of input-frame formats that are supported by the
+ * "yuv_scale_binary".
*/
- pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
- }
+ need_isp_copy_binary =
+ (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8);
+#else /* !USE_INPUT_SYSTEM_VERSION_2401 */
+ need_isp_copy_binary = true;
+#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
- /* Viewfinder post-processing */
- if (need_scaler) {
- for (i = 0, j = 0; i < mycs->num_yuv_scaler; i++) {
- if (mycs->is_output_stage[i]) {
- assert(j < 2);
- vf_pp_in_info[j] =
- &mycs->yuv_scaler_binary[i].vf_frame_info;
- j++;
+ if (need_isp_copy_binary)
+ {
+ err = load_copy_binary(pipe,
+ &mycs->copy_binary,
+ next_binary);
+
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+
+ /*
+ * NOTES
+ * - Why is "pipe->pipe_settings.capture.copy_binary.online" specified?
+ *
+ * In some use cases, the first stage in the "yuvpp" pipe is the
+ * "isp_copy_binary". The "isp_copy_binary" is designed to process
+ * the input from either the system DDR or from the IPU internal VMEM.
+ * So it provides the flag "online" to specify where its input is from,
+ * i.e.:
+ *
+ * (1) "online <= true", the input is from the IPU internal VMEM.
+ * (2) "online <= false", the input is from the system DDR.
+ *
+ * In other use cases, the first stage in the "yuvpp" pipe is the
+ * "yuv_scale_binary". "The "yuv_scale_binary" is designed to process the
+ * input ONLY from the system DDR. So it does not provide the flag "online"
+ * to specify where its input is from.
+ */
+ pipe->pipe_settings.capture.copy_binary.online = pipe->stream->config.online;
+ }
+
+ /* Viewfinder post-processing */
+ if (need_scaler)
+ {
+ for (i = 0, j = 0; i < mycs->num_yuv_scaler; i++) {
+ if (mycs->is_output_stage[i]) {
+ assert(j < 2);
+ vf_pp_in_info[j] =
+ &mycs->yuv_scaler_binary[i].vf_frame_info;
+ j++;
+ }
+ }
+ mycs->num_vf_pp = j;
+ } else
+ {
+ vf_pp_in_info[0] =
+ &mycs->copy_binary.vf_frame_info;
+ for (i = 1; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
+ vf_pp_in_info[i] = NULL;
}
+ mycs->num_vf_pp = 1;
}
- mycs->num_vf_pp = j;
- } else {
- vf_pp_in_info[0] =
- &mycs->copy_binary.vf_frame_info;
- for (i = 1; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- vf_pp_in_info[i] = NULL;
+ mycs->vf_pp_binary = kzalloc(mycs->num_vf_pp * sizeof(struct ia_css_binary),
+ GFP_KERNEL);
+ if (!mycs->vf_pp_binary)
+ {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ goto ERR;
}
- mycs->num_vf_pp = 1;
- }
- mycs->vf_pp_binary = kzalloc(mycs->num_vf_pp * sizeof(struct ia_css_binary),
- GFP_KERNEL);
- if (!mycs->vf_pp_binary) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- goto ERR;
- }
- {
- struct ia_css_binary_descr vf_pp_descr;
+ {
+ struct ia_css_binary_descr vf_pp_descr;
- for (i = 0; i < mycs->num_vf_pp; i++) {
- if (pipe->vf_output_info[i].res.width != 0) {
- ia_css_pipe_get_vfpp_binarydesc(pipe,
- &vf_pp_descr, vf_pp_in_info[i], &pipe->vf_output_info[i]);
- err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary[i]);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ for (i = 0; i < mycs->num_vf_pp; i++)
+ {
+ if (pipe->vf_output_info[i].res.width != 0) {
+ ia_css_pipe_get_vfpp_binarydesc(pipe,
+ &vf_pp_descr, vf_pp_in_info[i], &pipe->vf_output_info[i]);
+ err = ia_css_binary_find(&vf_pp_descr, &mycs->vf_pp_binary[i]);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ }
}
}
- }
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
ERR:
- if (need_scaler) {
- ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+ if (need_scaler)
+ {
+ ia_css_pipe_destroy_cas_scaler_desc(&cas_scaler_descr);
+ }
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "load_yuvpp_binaries() leave, err=%d\n",
+ err);
+ return err;
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "load_yuvpp_binaries() leave, err=%d\n",
- err);
- return err;
-}
-static enum ia_css_err
-unload_yuvpp_binaries(struct ia_css_pipe *pipe)
-{
- unsigned int i;
+ static enum ia_css_err
+ unload_yuvpp_binaries(struct ia_css_pipe *pipe) {
+ unsigned int i;
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- ia_css_binary_unload(&pipe->pipe_settings.yuvpp.copy_binary);
- for (i = 0; i < pipe->pipe_settings.yuvpp.num_yuv_scaler; i++) {
- ia_css_binary_unload(&pipe->pipe_settings.yuvpp.yuv_scaler_binary[i]);
- }
- for (i = 0; i < pipe->pipe_settings.yuvpp.num_vf_pp; i++) {
- ia_css_binary_unload(&pipe->pipe_settings.yuvpp.vf_pp_binary[i]);
- }
- kfree(pipe->pipe_settings.yuvpp.is_output_stage);
- pipe->pipe_settings.yuvpp.is_output_stage = NULL;
- kfree(pipe->pipe_settings.yuvpp.yuv_scaler_binary);
- pipe->pipe_settings.yuvpp.yuv_scaler_binary = NULL;
- kfree(pipe->pipe_settings.yuvpp.vf_pp_binary);
- pipe->pipe_settings.yuvpp.vf_pp_binary = NULL;
+ if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ ia_css_binary_unload(&pipe->pipe_settings.yuvpp.copy_binary);
+ for (i = 0; i < pipe->pipe_settings.yuvpp.num_yuv_scaler; i++)
+ {
+ ia_css_binary_unload(&pipe->pipe_settings.yuvpp.yuv_scaler_binary[i]);
+ }
+ for (i = 0; i < pipe->pipe_settings.yuvpp.num_vf_pp; i++)
+ {
+ ia_css_binary_unload(&pipe->pipe_settings.yuvpp.vf_pp_binary[i]);
+ }
+ kfree(pipe->pipe_settings.yuvpp.is_output_stage);
+ pipe->pipe_settings.yuvpp.is_output_stage = NULL;
+ kfree(pipe->pipe_settings.yuvpp.yuv_scaler_binary);
+ pipe->pipe_settings.yuvpp.yuv_scaler_binary = NULL;
+ kfree(pipe->pipe_settings.yuvpp.vf_pp_binary);
+ pipe->pipe_settings.yuvpp.vf_pp_binary = NULL;
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
-}
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
+ }
-static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe)
-{
- struct ia_css_binary *copy_binary;
- enum ia_css_err err = IA_CSS_SUCCESS;
- enum sh_css_pipe_config_override copy_ovrd;
- enum ia_css_input_mode yuvpp_pipe_input_mode;
+ static enum ia_css_err yuvpp_start(struct ia_css_pipe *pipe) {
+ struct ia_css_binary *copy_binary;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ enum sh_css_pipe_config_override copy_ovrd;
+ enum ia_css_input_mode yuvpp_pipe_input_mode;
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ if ((!pipe) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- yuvpp_pipe_input_mode = pipe->stream->config.mode;
+ yuvpp_pipe_input_mode = pipe->stream->config.mode;
- copy_binary = &pipe->pipe_settings.yuvpp.copy_binary;
+ copy_binary = &pipe->pipe_settings.yuvpp.copy_binary;
- sh_css_metrics_start_frame();
+ sh_css_metrics_start_frame();
- /* multi stream video needs mipi buffers */
+ /* multi stream video needs mipi buffers */
#if !defined(HAS_NO_INPUT_SYSTEM) && (defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401))
- err = send_mipi_frames(pipe);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ err = send_mipi_frames(pipe);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
#endif
- {
- unsigned int thread_id;
+ {
+ unsigned int thread_id;
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- copy_ovrd = 1 << thread_id;
- }
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ copy_ovrd = 1 << thread_id;
+ }
- start_pipe(pipe, copy_ovrd, yuvpp_pipe_input_mode);
+ start_pipe(pipe, copy_ovrd, yuvpp_pipe_input_mode);
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
-static enum ia_css_err
-sh_css_pipe_unload_binaries(struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ static enum ia_css_err
+ sh_css_pipe_unload_binaries(struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if (!pipe) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
- if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
- }
+ if (!pipe)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
+ if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
+ }
- switch (pipe->mode) {
- case IA_CSS_PIPE_ID_PREVIEW:
- err = unload_preview_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_VIDEO:
- err = unload_video_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_CAPTURE:
- err = unload_capture_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_YUVPP:
- err = unload_yuvpp_binaries(pipe);
- break;
- default:
- break;
+ switch (pipe->mode)
+ {
+ case IA_CSS_PIPE_ID_PREVIEW:
+ err = unload_preview_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_VIDEO:
+ err = unload_video_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_CAPTURE:
+ err = unload_capture_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_YUVPP:
+ err = unload_yuvpp_binaries(pipe);
+ break;
+ default:
+ break;
+ }
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
}
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
-static enum ia_css_err
-sh_css_pipe_load_binaries(struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ static enum ia_css_err
+ sh_css_pipe_load_binaries(struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- assert(pipe);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_load_binaries() enter:\n");
+ assert(pipe);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "sh_css_pipe_load_binaries() enter:\n");
- /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
- if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
- return err;
+ /* PIPE_MODE_COPY has no binaries, but has output frames to outside*/
+ if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+ return err;
- switch (pipe->mode) {
- case IA_CSS_PIPE_ID_PREVIEW:
- err = load_preview_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_VIDEO:
- err = load_video_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_CAPTURE:
- err = load_capture_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_YUVPP:
- err = load_yuvpp_binaries(pipe);
- break;
- case IA_CSS_PIPE_ID_ACC:
- break;
- default:
- err = IA_CSS_ERR_INTERNAL_ERROR;
- break;
- }
- if (err != IA_CSS_SUCCESS) {
- if (sh_css_pipe_unload_binaries(pipe) != IA_CSS_SUCCESS) {
- /* currently css does not support multiple error returns in a single function,
- * using IA_CSS_ERR_INTERNAL_ERROR in this case */
+ switch (pipe->mode)
+ {
+ case IA_CSS_PIPE_ID_PREVIEW:
+ err = load_preview_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_VIDEO:
+ err = load_video_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_CAPTURE:
+ err = load_capture_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_YUVPP:
+ err = load_yuvpp_binaries(pipe);
+ break;
+ case IA_CSS_PIPE_ID_ACC:
+ break;
+ default:
err = IA_CSS_ERR_INTERNAL_ERROR;
+ break;
+ }
+ if (err != IA_CSS_SUCCESS)
+ {
+ if (sh_css_pipe_unload_binaries(pipe) != IA_CSS_SUCCESS) {
+ /* currently css does not support multiple error returns in a single function,
+ * using IA_CSS_ERR_INTERNAL_ERROR in this case */
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ }
}
+ return err;
}
- return err;
-}
-
-static enum ia_css_err
-create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
-{
- struct ia_css_pipeline *me;
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_pipeline_stage *vf_pp_stage = NULL,
- *copy_stage = NULL,
- *yuv_scaler_stage = NULL;
- struct ia_css_binary *copy_binary,
- *vf_pp_binary,
- *yuv_scaler_binary;
- bool need_scaler = false;
- unsigned int num_stage, num_vf_pp_stage, num_output_stage;
- unsigned int i, j;
- struct ia_css_frame *in_frame = NULL;
- struct ia_css_frame *out_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
- struct ia_css_frame *bin_out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
- struct ia_css_frame *vf_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
- struct ia_css_pipeline_stage_desc stage_desc;
- bool need_in_frameinfo_memory = false;
+ static enum ia_css_err
+ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe) {
+ struct ia_css_pipeline *me;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_pipeline_stage *vf_pp_stage = NULL,
+ *copy_stage = NULL,
+ *yuv_scaler_stage = NULL;
+ struct ia_css_binary *copy_binary,
+ *vf_pp_binary,
+ *yuv_scaler_binary;
+ bool need_scaler = false;
+ unsigned int num_stage, num_vf_pp_stage, num_output_stage;
+ unsigned int i, j;
+
+ struct ia_css_frame *in_frame = NULL;
+ struct ia_css_frame *out_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+ struct ia_css_frame *bin_out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
+ struct ia_css_frame *vf_frame[IA_CSS_PIPE_MAX_OUTPUT_STAGE];
+ struct ia_css_pipeline_stage_desc stage_desc;
+ bool need_in_frameinfo_memory = false;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- bool sensor = false;
- bool buffered_sensor = false;
- bool online = false;
- bool continuous = false;
+ bool sensor = false;
+ bool buffered_sensor = false;
+ bool online = false;
+ bool continuous = false;
#endif
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- me = &pipe->pipeline;
- ia_css_pipeline_clean(me);
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- out_frame[i] = NULL;
- vf_frame[i] = NULL;
- }
- ia_css_pipe_util_create_output_frames(bin_out_frame);
- num_stage = pipe->pipe_settings.yuvpp.num_yuv_scaler;
- num_vf_pp_stage = pipe->pipe_settings.yuvpp.num_vf_pp;
- num_output_stage = pipe->pipe_settings.yuvpp.num_output;
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ if ((!pipe) || (!pipe->stream) || (pipe->mode != IA_CSS_PIPE_ID_YUVPP))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ me = &pipe->pipeline;
+ ia_css_pipeline_clean(me);
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+ {
+ out_frame[i] = NULL;
+ vf_frame[i] = NULL;
+ }
+ ia_css_pipe_util_create_output_frames(bin_out_frame);
+ num_stage = pipe->pipe_settings.yuvpp.num_yuv_scaler;
+ num_vf_pp_stage = pipe->pipe_settings.yuvpp.num_vf_pp;
+ num_output_stage = pipe->pipe_settings.yuvpp.num_output;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* When the input system is 2401, always enable 'in_frameinfo_memory'
- * except for the following:
- * - Direct Sensor Mode Online Capture
- * - Direct Sensor Mode Continuous Capture
- * - Buffered Sensor Mode Continuous Capture
- */
- sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
- buffered_sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
- online = pipe->stream->config.online;
- continuous = pipe->stream->config.continuous;
- need_in_frameinfo_memory =
+ /* When the input system is 2401, always enable 'in_frameinfo_memory'
+ * except for the following:
+ * - Direct Sensor Mode Online Capture
+ * - Direct Sensor Mode Continuous Capture
+ * - Buffered Sensor Mode Continuous Capture
+ */
+ sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR;
+ buffered_sensor = pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
+ online = pipe->stream->config.online;
+ continuous = pipe->stream->config.continuous;
+ need_in_frameinfo_memory =
!((sensor && (online || continuous)) || (buffered_sensor && continuous));
#else
- /* Construct in_frame info (only in case we have dynamic input */
- need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+ /* Construct in_frame info (only in case we have dynamic input */
+ need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
#endif
- /* the input frame can come from:
- * a) memory: connect yuvscaler to me->in_frame
- * b) sensor, via copy binary: connect yuvscaler to copy binary later on */
- if (need_in_frameinfo_memory) {
- /* TODO: improve for different input formats. */
-
- /*
- * "pipe->stream->config.input_config.format" represents the sensor output
- * frame format, e.g. YUV422 8-bit.
- *
- * "in_frame_format" represents the imaging pipe's input frame format, e.g.
- * Bayer-Quad RAW.
- */
- int in_frame_format;
+ /* the input frame can come from:
+ * a) memory: connect yuvscaler to me->in_frame
+ * b) sensor, via copy binary: connect yuvscaler to copy binary later on */
+ if (need_in_frameinfo_memory)
+ {
+ /* TODO: improve for different input formats. */
- if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
- in_frame_format = IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8;
- } else if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8) {
/*
- * When the sensor output frame format is "ATOMISP_INPUT_FORMAT_YUV422_8",
- * the "isp_copy_var" binary is selected as the first stage in the yuvpp
- * pipe.
- *
- * For the "isp_copy_var" binary, it reads the YUV422-8 pixels from
- * the frame buffer (at DDR) to the frame-line buffer (at VMEM).
- *
- * By now, the "isp_copy_var" binary does NOT provide a separated
- * frame-line buffer to store the YUV422-8 pixels. Instead, it stores
- * the YUV422-8 pixels in the frame-line buffer which is designed to
- * store the Bayer-Quad RAW pixels.
+ * "pipe->stream->config.input_config.format" represents the sensor output
+ * frame format, e.g. YUV422 8-bit.
*
- * To direct the "isp_copy_var" binary reading from the RAW frame-line
- * buffer, its input frame format must be specified as "IA_CSS_FRAME_
- * FORMAT_RAW".
+ * "in_frame_format" represents the imaging pipe's input frame format, e.g.
+ * Bayer-Quad RAW.
*/
- in_frame_format = IA_CSS_FRAME_FORMAT_RAW;
- } else {
- in_frame_format = IA_CSS_FRAME_FORMAT_NV12;
- }
-
- err = init_in_frameinfo_memory_defaults(pipe,
- &me->in_frame,
- in_frame_format);
-
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ int in_frame_format;
+
+ if (pipe->stream->config.input_config.format ==
+ ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
+ in_frame_format = IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8;
+ } else if (pipe->stream->config.input_config.format ==
+ ATOMISP_INPUT_FORMAT_YUV422_8) {
+ /*
+ * When the sensor output frame format is "ATOMISP_INPUT_FORMAT_YUV422_8",
+ * the "isp_copy_var" binary is selected as the first stage in the yuvpp
+ * pipe.
+ *
+ * For the "isp_copy_var" binary, it reads the YUV422-8 pixels from
+ * the frame buffer (at DDR) to the frame-line buffer (at VMEM).
+ *
+ * By now, the "isp_copy_var" binary does NOT provide a separated
+ * frame-line buffer to store the YUV422-8 pixels. Instead, it stores
+ * the YUV422-8 pixels in the frame-line buffer which is designed to
+ * store the Bayer-Quad RAW pixels.
+ *
+ * To direct the "isp_copy_var" binary reading from the RAW frame-line
+ * buffer, its input frame format must be specified as "IA_CSS_FRAME_
+ * FORMAT_RAW".
+ */
+ in_frame_format = IA_CSS_FRAME_FORMAT_RAW;
+ } else {
+ in_frame_format = IA_CSS_FRAME_FORMAT_NV12;
+ }
- in_frame = &me->in_frame;
- } else {
- in_frame = NULL;
- }
+ err = init_in_frameinfo_memory_defaults(pipe,
+ &me->in_frame,
+ in_frame_format);
- for (i = 0; i < num_output_stage; i++) {
- assert(i < IA_CSS_PIPE_MAX_OUTPUT_STAGE);
- if (pipe->output_info[i].res.width != 0) {
- err = init_out_frameinfo_defaults(pipe, &me->out_frame[i], i);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
- out_frame[i] = &me->out_frame[i];
+
+ in_frame = &me->in_frame;
+ } else
+ {
+ in_frame = NULL;
}
- /* Construct vf_frame info (only in case we have VF) */
- if (pipe->vf_output_info[i].res.width != 0) {
- err = init_vf_frameinfo_defaults(pipe, &me->vf_frame[i], i);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ for (i = 0; i < num_output_stage; i++)
+ {
+ assert(i < IA_CSS_PIPE_MAX_OUTPUT_STAGE);
+ if (pipe->output_info[i].res.width != 0) {
+ err = init_out_frameinfo_defaults(pipe, &me->out_frame[i], i);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ out_frame[i] = &me->out_frame[i];
+ }
+
+ /* Construct vf_frame info (only in case we have VF) */
+ if (pipe->vf_output_info[i].res.width != 0) {
+ err = init_vf_frameinfo_defaults(pipe, &me->vf_frame[i], i);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ vf_frame[i] = &me->vf_frame[i];
}
- vf_frame[i] = &me->vf_frame[i];
}
- }
- copy_binary = &pipe->pipe_settings.yuvpp.copy_binary;
- vf_pp_binary = pipe->pipe_settings.yuvpp.vf_pp_binary;
- yuv_scaler_binary = pipe->pipe_settings.yuvpp.yuv_scaler_binary;
- need_scaler = need_yuv_scaler_stage(pipe);
+ copy_binary = &pipe->pipe_settings.yuvpp.copy_binary;
+ vf_pp_binary = pipe->pipe_settings.yuvpp.vf_pp_binary;
+ yuv_scaler_binary = pipe->pipe_settings.yuvpp.yuv_scaler_binary;
+ need_scaler = need_yuv_scaler_stage(pipe);
- if (pipe->pipe_settings.yuvpp.copy_binary.info) {
- struct ia_css_frame *in_frame_local = NULL;
+ if (pipe->pipe_settings.yuvpp.copy_binary.info)
+ {
+ struct ia_css_frame *in_frame_local = NULL;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* After isp copy is enabled in_frame needs to be passed. */
- if (!online)
- in_frame_local = in_frame;
+ /* After isp copy is enabled in_frame needs to be passed. */
+ if (!online)
+ in_frame_local = in_frame;
#endif
- if (need_scaler) {
- ia_css_pipe_util_set_output_frames(bin_out_frame, 0, NULL);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- bin_out_frame, in_frame_local, NULL);
- } else {
- ia_css_pipe_util_set_output_frames(bin_out_frame, 0, out_frame[0]);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- bin_out_frame, in_frame_local, NULL);
- }
-
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- ©_stage);
-
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
-
- if (copy_stage) {
- /* if we use yuv scaler binary, vf output should be from there */
- copy_stage->args.copy_vf = !need_scaler;
- /* for yuvpp pipe, it should always be enabled */
- copy_stage->args.copy_output = true;
- /* connect output of copy binary to input of yuv scaler */
- in_frame = copy_stage->args.out_frame[0];
- }
- }
-
- if (need_scaler) {
- struct ia_css_frame *tmp_out_frame = NULL;
- struct ia_css_frame *tmp_vf_frame = NULL;
- struct ia_css_frame *tmp_in_frame = in_frame;
-
- for (i = 0, j = 0; i < num_stage; i++) {
- assert(j < num_output_stage);
- if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
- tmp_out_frame = out_frame[j];
- tmp_vf_frame = vf_frame[j];
+ if (need_scaler) {
+ ia_css_pipe_util_set_output_frames(bin_out_frame, 0, NULL);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+ bin_out_frame, in_frame_local, NULL);
} else {
- tmp_out_frame = NULL;
- tmp_vf_frame = NULL;
+ ia_css_pipe_util_set_output_frames(bin_out_frame, 0, out_frame[0]);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+ bin_out_frame, in_frame_local, NULL);
}
- err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
- NULL,
- &yuv_scaler_binary[i],
- &yuv_scaler_stage);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ ©_stage);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
- /* we use output port 1 as internal output port */
- tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
- if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
- if (tmp_vf_frame && (tmp_vf_frame->info.res.width != 0)) {
- in_frame = yuv_scaler_stage->args.out_vf_frame;
- err = add_vf_pp_stage(pipe, in_frame, tmp_vf_frame, &vf_pp_binary[j],
- &vf_pp_stage);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- }
- j++;
+ if (copy_stage) {
+ /* if we use yuv scaler binary, vf output should be from there */
+ copy_stage->args.copy_vf = !need_scaler;
+ /* for yuvpp pipe, it should always be enabled */
+ copy_stage->args.copy_output = true;
+ /* connect output of copy binary to input of yuv scaler */
+ in_frame = copy_stage->args.out_frame[0];
}
}
- } else if (copy_stage) {
- if (vf_frame[0] && vf_frame[0]->info.res.width != 0) {
- in_frame = copy_stage->args.out_vf_frame;
- err = add_vf_pp_stage(pipe, in_frame, vf_frame[0], &vf_pp_binary[0],
- &vf_pp_stage);
- }
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- }
- ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+ if (need_scaler)
+ {
+ struct ia_css_frame *tmp_out_frame = NULL;
+ struct ia_css_frame *tmp_vf_frame = NULL;
+ struct ia_css_frame *tmp_in_frame = in_frame;
+
+ for (i = 0, j = 0; i < num_stage; i++) {
+ assert(j < num_output_stage);
+ if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
+ tmp_out_frame = out_frame[j];
+ tmp_vf_frame = vf_frame[j];
+ } else {
+ tmp_out_frame = NULL;
+ tmp_vf_frame = NULL;
+ }
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
+ NULL,
+ &yuv_scaler_binary[i],
+ &yuv_scaler_stage);
- return IA_CSS_SUCCESS;
-}
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ /* we use output port 1 as internal output port */
+ tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
+ if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
+ if (tmp_vf_frame && (tmp_vf_frame->info.res.width != 0)) {
+ in_frame = yuv_scaler_stage->args.out_vf_frame;
+ err = add_vf_pp_stage(pipe, in_frame, tmp_vf_frame, &vf_pp_binary[j],
+ &vf_pp_stage);
+
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
+ j++;
+ }
+ }
+ } else if (copy_stage)
+ {
+ if (vf_frame[0] && vf_frame[0]->info.res.width != 0) {
+ in_frame = copy_stage->args.out_vf_frame;
+ err = add_vf_pp_stage(pipe, in_frame, vf_frame[0], &vf_pp_binary[0],
+ &vf_pp_stage);
+ }
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
-static enum ia_css_err
-create_host_copy_pipeline(struct ia_css_pipe *pipe,
- unsigned int max_input_width,
- struct ia_css_frame *out_frame)
-{
- struct ia_css_pipeline *me;
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_pipeline_stage_desc stage_desc;
+ ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "create_host_copy_pipeline() enter:\n");
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- /* pipeline already created as part of create_host_pipeline_structure */
- me = &pipe->pipeline;
- ia_css_pipeline_clean(me);
+ return IA_CSS_SUCCESS;
+ }
- /* Construct out_frame info */
- out_frame->contiguous = false;
- out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
+ static enum ia_css_err
+ create_host_copy_pipeline(struct ia_css_pipe *pipe,
+ unsigned int max_input_width,
+ struct ia_css_frame *out_frame) {
+ struct ia_css_pipeline *me;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_pipeline_stage_desc stage_desc;
- if (copy_on_sp(pipe) &&
- pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
- ia_css_frame_info_init(
- &out_frame->info,
- JPEG_BYTES,
- 1,
- IA_CSS_FRAME_FORMAT_BINARY_8,
- 0);
- } else if (out_frame->info.format == IA_CSS_FRAME_FORMAT_RAW) {
- out_frame->info.raw_bit_depth =
- ia_css_pipe_util_pipe_input_format_bpp(pipe);
- }
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "create_host_copy_pipeline() enter:\n");
- me->num_stages = 1;
- me->pipe_id = IA_CSS_PIPE_ID_COPY;
- pipe->mode = IA_CSS_PIPE_ID_COPY;
+ /* pipeline already created as part of create_host_pipeline_structure */
+ me = &pipe->pipeline;
+ ia_css_pipeline_clean(me);
- ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
- IA_CSS_PIPELINE_RAW_COPY, max_input_width);
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- NULL);
+ /* Construct out_frame info */
+ out_frame->contiguous = false;
+ out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
- ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
+ if (copy_on_sp(pipe) &&
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8)
+ {
+ ia_css_frame_info_init(
+ &out_frame->info,
+ JPEG_BYTES,
+ 1,
+ IA_CSS_FRAME_FORMAT_BINARY_8,
+ 0);
+ } else if (out_frame->info.format == IA_CSS_FRAME_FORMAT_RAW)
+ {
+ out_frame->info.raw_bit_depth =
+ ia_css_pipe_util_pipe_input_format_bpp(pipe);
+ }
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "create_host_copy_pipeline() leave:\n");
+ me->num_stages = 1;
+ me->pipe_id = IA_CSS_PIPE_ID_COPY;
+ pipe->mode = IA_CSS_PIPE_ID_COPY;
- return err;
-}
+ ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
+ IA_CSS_PIPELINE_RAW_COPY, max_input_width);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ NULL);
-static enum ia_css_err
-create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe)
-{
- struct ia_css_pipeline *me = &pipe->pipeline;
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_pipeline_stage_desc stage_desc;
- struct ia_css_frame *out_frame = &me->out_frame[0];
- struct ia_css_pipeline_stage *out_stage = NULL;
- unsigned int thread_id;
- enum sh_css_queue_id queue_id;
- unsigned int max_input_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
+ ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "create_host_isyscopy_capture_pipeline() enter:\n");
- ia_css_pipeline_clean(me);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "create_host_copy_pipeline() leave:\n");
- /* Construct out_frame info */
- err = sh_css_pipe_get_output_frame_info(pipe, &out_frame->info, 0);
- if (err != IA_CSS_SUCCESS)
return err;
- out_frame->contiguous = false;
- out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, &queue_id);
- out_frame->dynamic_queue_id = queue_id;
- out_frame->buf_type = IA_CSS_BUFFER_TYPE_OUTPUT_FRAME;
+ }
- me->num_stages = 1;
- me->pipe_id = IA_CSS_PIPE_ID_CAPTURE;
- pipe->mode = IA_CSS_PIPE_ID_CAPTURE;
- ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
- IA_CSS_PIPELINE_ISYS_COPY, max_input_width);
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc, &out_stage);
- if (err != IA_CSS_SUCCESS)
- return err;
+ static enum ia_css_err
+ create_host_isyscopy_capture_pipeline(struct ia_css_pipe *pipe) {
+ struct ia_css_pipeline *me = &pipe->pipeline;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_pipeline_stage_desc stage_desc;
+ struct ia_css_frame *out_frame = &me->out_frame[0];
+ struct ia_css_pipeline_stage *out_stage = NULL;
+ unsigned int thread_id;
+ enum sh_css_queue_id queue_id;
+ unsigned int max_input_width = MAX_VECTORS_PER_INPUT_LINE_CONT * ISP_VEC_NELEMS;
- ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "create_host_isyscopy_capture_pipeline() enter:\n");
+ ia_css_pipeline_clean(me);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "create_host_isyscopy_capture_pipeline() leave:\n");
+ /* Construct out_frame info */
+ err = sh_css_pipe_get_output_frame_info(pipe, &out_frame->info, 0);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ out_frame->contiguous = false;
+ out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, &queue_id);
+ out_frame->dynamic_queue_id = queue_id;
+ out_frame->buf_type = IA_CSS_BUFFER_TYPE_OUTPUT_FRAME;
+
+ me->num_stages = 1;
+ me->pipe_id = IA_CSS_PIPE_ID_CAPTURE;
+ pipe->mode = IA_CSS_PIPE_ID_CAPTURE;
+ ia_css_pipe_get_sp_func_stage_desc(&stage_desc, out_frame,
+ IA_CSS_PIPELINE_ISYS_COPY, max_input_width);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc, &out_stage);
+ if (err != IA_CSS_SUCCESS)
+ return err;
- return err;
-}
+ ia_css_pipeline_finalize_stages(me, pipe->stream->config.continuous);
-static enum ia_css_err
-create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
-{
- struct ia_css_pipeline *me;
- enum ia_css_err err = IA_CSS_SUCCESS;
- enum ia_css_capture_mode mode;
- struct ia_css_pipeline_stage *current_stage = NULL;
- struct ia_css_pipeline_stage *yuv_scaler_stage = NULL;
- struct ia_css_binary *copy_binary,
- *primary_binary[MAX_NUM_PRIMARY_STAGES],
- *vf_pp_binary,
- *pre_isp_binary,
- *anr_gdc_binary,
- *post_isp_binary,
- *yuv_scaler_binary,
- *capture_pp_binary,
- *capture_ldc_binary;
- bool need_pp = false;
- bool raw;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "create_host_isyscopy_capture_pipeline() leave:\n");
- struct ia_css_frame *in_frame;
- struct ia_css_frame *out_frame;
- struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
- struct ia_css_frame *vf_frame;
- struct ia_css_pipeline_stage_desc stage_desc;
- bool need_in_frameinfo_memory = false;
+ return err;
+ }
+
+ static enum ia_css_err
+ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe) {
+ struct ia_css_pipeline *me;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_capture_mode mode;
+ struct ia_css_pipeline_stage *current_stage = NULL;
+ struct ia_css_pipeline_stage *yuv_scaler_stage = NULL;
+ struct ia_css_binary *copy_binary,
+ *primary_binary[MAX_NUM_PRIMARY_STAGES],
+ *vf_pp_binary,
+ *pre_isp_binary,
+ *anr_gdc_binary,
+ *post_isp_binary,
+ *yuv_scaler_binary,
+ *capture_pp_binary,
+ *capture_ldc_binary;
+ bool need_pp = false;
+ bool raw;
+
+ struct ia_css_frame *in_frame;
+ struct ia_css_frame *out_frame;
+ struct ia_css_frame *out_frames[IA_CSS_BINARY_MAX_OUTPUT_PORTS];
+ struct ia_css_frame *vf_frame;
+ struct ia_css_pipeline_stage_desc stage_desc;
+ bool need_in_frameinfo_memory = false;
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- bool sensor = false;
- bool buffered_sensor = false;
- bool online = false;
- bool continuous = false;
+ bool sensor = false;
+ bool buffered_sensor = false;
+ bool online = false;
+ bool continuous = false;
#endif
- unsigned int i, num_yuv_scaler, num_primary_stage;
- bool need_yuv_pp = false;
- bool *is_output_stage = NULL;
- bool need_ldc = false;
+ unsigned int i, num_yuv_scaler, num_primary_stage;
+ bool need_yuv_pp = false;
+ bool *is_output_stage = NULL;
+ bool need_ldc = false;
- IA_CSS_ENTER_PRIVATE("");
- assert(pipe);
- assert(pipe->stream);
- assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
+ IA_CSS_ENTER_PRIVATE("");
+ assert(pipe);
+ assert(pipe->stream);
+ assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE || pipe->mode == IA_CSS_PIPE_ID_COPY);
- me = &pipe->pipeline;
- mode = pipe->config.default_capture_config.mode;
- raw = (mode == IA_CSS_CAPTURE_MODE_RAW);
- ia_css_pipeline_clean(me);
- ia_css_pipe_util_create_output_frames(out_frames);
+ me = &pipe->pipeline;
+ mode = pipe->config.default_capture_config.mode;
+ raw = (mode == IA_CSS_CAPTURE_MODE_RAW);
+ ia_css_pipeline_clean(me);
+ ia_css_pipe_util_create_output_frames(out_frames);
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- /* When the input system is 2401, always enable 'in_frameinfo_memory'
- * except for the following:
- * - Direct Sensor Mode Online Capture
- * - Direct Sensor Mode Online Capture
- * - Direct Sensor Mode Continuous Capture
- * - Buffered Sensor Mode Continuous Capture
- */
- sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR);
- buffered_sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
- online = pipe->stream->config.online;
- continuous = pipe->stream->config.continuous;
- need_in_frameinfo_memory =
+ /* When the input system is 2401, always enable 'in_frameinfo_memory'
+ * except for the following:
+ * - Direct Sensor Mode Online Capture
+ * - Direct Sensor Mode Online Capture
+ * - Direct Sensor Mode Continuous Capture
+ * - Buffered Sensor Mode Continuous Capture
+ */
+ sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_SENSOR);
+ buffered_sensor = (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
+ online = pipe->stream->config.online;
+ continuous = pipe->stream->config.continuous;
+ need_in_frameinfo_memory =
!((sensor && (online || continuous)) || (buffered_sensor && (online || continuous)));
#else
- /* Construct in_frame info (only in case we have dynamic input */
- need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+ /* Construct in_frame info (only in case we have dynamic input */
+ need_in_frameinfo_memory = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
#endif
- if (need_in_frameinfo_memory) {
- err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame, IA_CSS_FRAME_FORMAT_RAW);
- if (err != IA_CSS_SUCCESS) {
+ if (need_in_frameinfo_memory)
+ {
+ err = init_in_frameinfo_memory_defaults(pipe, &me->in_frame,
+ IA_CSS_FRAME_FORMAT_RAW);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+
+ in_frame = &me->in_frame;
+ } else
+ {
+ in_frame = NULL;
+ }
+
+ err = init_out_frameinfo_defaults(pipe, &me->out_frame[0], 0);
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
+ out_frame = &me->out_frame[0];
- in_frame = &me->in_frame;
- } else {
- in_frame = NULL;
- }
-
- err = init_out_frameinfo_defaults(pipe, &me->out_frame[0], 0);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- out_frame = &me->out_frame[0];
-
- /* Construct vf_frame info (only in case we have VF) */
- if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0]) {
- if (mode == IA_CSS_CAPTURE_MODE_RAW || mode == IA_CSS_CAPTURE_MODE_BAYER) {
- /* These modes don't support viewfinder output */
+ /* Construct vf_frame info (only in case we have VF) */
+ if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
+ {
+ if (mode == IA_CSS_CAPTURE_MODE_RAW || mode == IA_CSS_CAPTURE_MODE_BAYER) {
+ /* These modes don't support viewfinder output */
+ vf_frame = NULL;
+ } else {
+ init_vf_frameinfo_defaults(pipe, &me->vf_frame[0], 0);
+ vf_frame = &me->vf_frame[0];
+ }
+ } else
+ {
vf_frame = NULL;
- } else {
- init_vf_frameinfo_defaults(pipe, &me->vf_frame[0], 0);
- vf_frame = &me->vf_frame[0];
}
- } else {
- vf_frame = NULL;
- }
- copy_binary = &pipe->pipe_settings.capture.copy_binary;
- num_primary_stage = pipe->pipe_settings.capture.num_primary_stage;
- if ((num_primary_stage == 0) && (mode == IA_CSS_CAPTURE_MODE_PRIMARY)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
- return IA_CSS_ERR_INTERNAL_ERROR;
- }
- for (i = 0; i < num_primary_stage; i++) {
- primary_binary[i] = &pipe->pipe_settings.capture.primary_binary[i];
- }
- vf_pp_binary = &pipe->pipe_settings.capture.vf_pp_binary;
- pre_isp_binary = &pipe->pipe_settings.capture.pre_isp_binary;
- anr_gdc_binary = &pipe->pipe_settings.capture.anr_gdc_binary;
- post_isp_binary = &pipe->pipe_settings.capture.post_isp_binary;
- capture_pp_binary = &pipe->pipe_settings.capture.capture_pp_binary;
- yuv_scaler_binary = pipe->pipe_settings.capture.yuv_scaler_binary;
- num_yuv_scaler = pipe->pipe_settings.capture.num_yuv_scaler;
- is_output_stage = pipe->pipe_settings.capture.is_output_stage;
- capture_ldc_binary = &pipe->pipe_settings.capture.capture_ldc_binary;
-
- need_pp = (need_capture_pp(pipe) || pipe->output_stage) &&
- mode != IA_CSS_CAPTURE_MODE_RAW &&
- mode != IA_CSS_CAPTURE_MODE_BAYER;
- need_yuv_pp = (yuv_scaler_binary && yuv_scaler_binary->info);
- need_ldc = (capture_ldc_binary && capture_ldc_binary->info);
-
- if (pipe->pipe_settings.capture.copy_binary.info) {
- if (raw) {
- ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+ copy_binary = &pipe->pipe_settings.capture.copy_binary;
+ num_primary_stage = pipe->pipe_settings.capture.num_primary_stage;
+ if ((num_primary_stage == 0) && (mode == IA_CSS_CAPTURE_MODE_PRIMARY))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+ return IA_CSS_ERR_INTERNAL_ERROR;
+ }
+ for (i = 0; i < num_primary_stage; i++)
+ {
+ primary_binary[i] = &pipe->pipe_settings.capture.primary_binary[i];
+ }
+ vf_pp_binary = &pipe->pipe_settings.capture.vf_pp_binary;
+ pre_isp_binary = &pipe->pipe_settings.capture.pre_isp_binary;
+ anr_gdc_binary = &pipe->pipe_settings.capture.anr_gdc_binary;
+ post_isp_binary = &pipe->pipe_settings.capture.post_isp_binary;
+ capture_pp_binary = &pipe->pipe_settings.capture.capture_pp_binary;
+ yuv_scaler_binary = pipe->pipe_settings.capture.yuv_scaler_binary;
+ num_yuv_scaler = pipe->pipe_settings.capture.num_yuv_scaler;
+ is_output_stage = pipe->pipe_settings.capture.is_output_stage;
+ capture_ldc_binary = &pipe->pipe_settings.capture.capture_ldc_binary;
+
+ need_pp = (need_capture_pp(pipe) || pipe->output_stage) &&
+ mode != IA_CSS_CAPTURE_MODE_RAW &&
+ mode != IA_CSS_CAPTURE_MODE_BAYER;
+ need_yuv_pp = (yuv_scaler_binary && yuv_scaler_binary->info);
+ need_ldc = (capture_ldc_binary && capture_ldc_binary->info);
+
+ if (pipe->pipe_settings.capture.copy_binary.info)
+ {
+ if (raw) {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
- if (!continuous) {
+ if (!continuous) {
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+ out_frames, in_frame, NULL);
+ } else {
+ in_frame = pipe->stream->last_pipe->continuous_frames[0];
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
+ out_frames, in_frame, NULL);
+ }
+#else
ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, in_frame, NULL);
+ out_frames, NULL, NULL);
+#endif
} else {
- in_frame = pipe->stream->last_pipe->continuous_frames[0];
+ ia_css_pipe_util_set_output_frames(out_frames, 0, in_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, in_frame, NULL);
+ out_frames, NULL, NULL);
}
-#else
- ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, NULL, NULL);
-#endif
- } else {
- ia_css_pipe_util_set_output_frames(out_frames, 0, in_frame);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, copy_binary,
- out_frames, NULL, NULL);
- }
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- ¤t_stage);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ ¤t_stage);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ } else if (pipe->stream->config.continuous)
+ {
+ in_frame = pipe->stream->last_pipe->continuous_frames[0];
}
- } else if (pipe->stream->config.continuous) {
- in_frame = pipe->stream->last_pipe->continuous_frames[0];
- }
- if (mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
- struct ia_css_frame *local_in_frame = NULL;
- struct ia_css_frame *local_out_frame = NULL;
+ if (mode == IA_CSS_CAPTURE_MODE_PRIMARY)
+ {
+ struct ia_css_frame *local_in_frame = NULL;
+ struct ia_css_frame *local_out_frame = NULL;
- for (i = 0; i < num_primary_stage; i++) {
- if (i == 0)
- local_in_frame = in_frame;
- else
- local_in_frame = NULL;
+ for (i = 0; i < num_primary_stage; i++) {
+ if (i == 0)
+ local_in_frame = in_frame;
+ else
+ local_in_frame = NULL;
#ifndef ISP2401
- if (!need_pp && (i == num_primary_stage - 1))
+ if (!need_pp && (i == num_primary_stage - 1))
#else
- if (!need_pp && (i == num_primary_stage - 1) && !need_ldc)
+ if (!need_pp && (i == num_primary_stage - 1) && !need_ldc)
#endif
- local_out_frame = out_frame;
- else
- local_out_frame = NULL;
- ia_css_pipe_util_set_output_frames(out_frames, 0, local_out_frame);
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The
- * vf-pp stage has been removed from Skycam in the solution
- * provided. The vf-pp stage should be re-introduced when
- * required. This * should not be considered as a clean solution.
- * Proper investigation should be done to come up with the clean
- * solution.
- * */
- ia_css_pipe_get_generic_stage_desc(&stage_desc, primary_binary[i],
- out_frames, local_in_frame, NULL);
+ local_out_frame = out_frame;
+ else
+ local_out_frame = NULL;
+ ia_css_pipe_util_set_output_frames(out_frames, 0, local_out_frame);
+ /*
+ * WARNING: The #if def flag has been added below as a
+ * temporary solution to solve the problem of enabling the
+ * view finder in a single binary in a capture flow. The
+ * vf-pp stage has been removed from Skycam in the solution
+ * provided. The vf-pp stage should be re-introduced when
+ * required. This * should not be considered as a clean solution.
+ * Proper investigation should be done to come up with the clean
+ * solution.
+ * */
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, primary_binary[i],
+ out_frames, local_in_frame, NULL);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ ¤t_stage);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
+ /* If we use copy iso primary,
+ the input must be yuv iso raw */
+ current_stage->args.copy_vf =
+ primary_binary[0]->info->sp.pipeline.mode ==
+ IA_CSS_BINARY_MODE_COPY;
+ current_stage->args.copy_output = current_stage->args.copy_vf;
+ } else if (mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+ mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT)
+ {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
+ out_frames, in_frame, NULL);
err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- ¤t_stage);
+ &stage_desc, NULL);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
- }
- /* If we use copy iso primary,
- the input must be yuv iso raw */
- current_stage->args.copy_vf =
- primary_binary[0]->info->sp.pipeline.mode ==
- IA_CSS_BINARY_MODE_COPY;
- current_stage->args.copy_output = current_stage->args.copy_vf;
- } else if (mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
- mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
- ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
- out_frames, in_frame, NULL);
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc, NULL);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, anr_gdc_binary,
- out_frames, NULL, NULL);
- err = ia_css_pipeline_create_and_add_stage(me,
+ ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, anr_gdc_binary,
+ out_frames, NULL, NULL);
+ err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc, NULL);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- if (need_pp) {
- ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
- out_frames, NULL, NULL);
- } else {
- ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
- out_frames, NULL, NULL);
- }
+ if (need_pp) {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
+ out_frames, NULL, NULL);
+ } else {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, post_isp_binary,
+ out_frames, NULL, NULL);
+ }
- err = ia_css_pipeline_create_and_add_stage(me,
+ err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc, ¤t_stage);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- } else if (mode == IA_CSS_CAPTURE_MODE_BAYER) {
- ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
- out_frames, in_frame, NULL);
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- NULL);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ } else if (mode == IA_CSS_CAPTURE_MODE_BAYER)
+ {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, pre_isp_binary,
+ out_frames, in_frame, NULL);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ NULL);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
}
- }
#ifndef ISP2401
- if (need_pp && current_stage) {
- struct ia_css_frame *local_in_frame = NULL;
+ if (need_pp && current_stage)
+ {
+ struct ia_css_frame *local_in_frame = NULL;
- local_in_frame = current_stage->args.out_frame[0];
+ local_in_frame = current_stage->args.out_frame[0];
- if (need_ldc) {
- ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+ if (need_ldc) {
+ ia_css_pipe_util_set_output_frames(out_frames, 0, NULL);
+ ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
+ out_frames, local_in_frame, NULL);
+ err = ia_css_pipeline_create_and_add_stage(me,
+ &stage_desc,
+ ¤t_stage);
+ local_in_frame = current_stage->args.out_frame[0];
+ }
+ err = add_capture_pp_stage(pipe, me, local_in_frame,
+ need_yuv_pp ? NULL : out_frame,
+#else
+ /* ldc and capture_pp not supported in same pipeline */
+ if (need_ldc && current_stage)
+ {
+ in_frame = current_stage->args.out_frame[0];
+ ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
- out_frames, local_in_frame, NULL);
+ out_frames, in_frame, NULL);
err = ia_css_pipeline_create_and_add_stage(me,
&stage_desc,
- ¤t_stage);
- local_in_frame = current_stage->args.out_frame[0];
- }
- err = add_capture_pp_stage(pipe, me, local_in_frame, need_yuv_pp ? NULL : out_frame,
-#else
- /* ldc and capture_pp not supported in same pipeline */
- if (need_ldc && current_stage) {
- in_frame = current_stage->args.out_frame[0];
- ia_css_pipe_util_set_output_frames(out_frames, 0, out_frame);
- ia_css_pipe_get_generic_stage_desc(&stage_desc, capture_ldc_binary,
- out_frames, in_frame, NULL);
- err = ia_css_pipeline_create_and_add_stage(me,
- &stage_desc,
- NULL);
- } else if (need_pp && current_stage) {
- in_frame = current_stage->args.out_frame[0];
- err = add_capture_pp_stage(pipe, me, in_frame, need_yuv_pp ? NULL : out_frame,
+ NULL);
+ } else if (need_pp && current_stage)
+ {
+ in_frame = current_stage->args.out_frame[0];
+ err = add_capture_pp_stage(pipe, me, in_frame, need_yuv_pp ? NULL : out_frame,
#endif
- capture_pp_binary,
- ¤t_stage);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- }
-
- if (need_yuv_pp && current_stage) {
- struct ia_css_frame *tmp_in_frame = current_stage->args.out_frame[0];
- struct ia_css_frame *tmp_out_frame = NULL;
-
- for (i = 0; i < num_yuv_scaler; i++) {
- if (is_output_stage[i] == true)
- tmp_out_frame = out_frame;
- else
- tmp_out_frame = NULL;
-
- err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
- NULL,
- &yuv_scaler_binary[i],
- &yuv_scaler_stage);
+ capture_pp_binary,
+ ¤t_stage);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
- /* we use output port 1 as internal output port */
- tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
}
- }
-
-/*
- * WARNING: The #if def flag has been added below as a
- * temporary solution to solve the problem of enabling the
- * view finder in a single binary in a capture flow. The vf-pp
- * stage has been removed from Skycam in the solution provided.
- * The vf-pp stage should be re-introduced when required. This
- * should not be considered as a clean solution. Proper
- * investigation should be done to come up with the clean solution.
- * */
- if (mode != IA_CSS_CAPTURE_MODE_RAW && mode != IA_CSS_CAPTURE_MODE_BAYER && current_stage && vf_frame) {
- in_frame = current_stage->args.out_vf_frame;
- err = add_vf_pp_stage(pipe, in_frame, vf_frame, vf_pp_binary,
- ¤t_stage);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- }
- ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "create_host_regular_capture_pipeline() leave:\n");
-
- return IA_CSS_SUCCESS;
-}
-
-static enum ia_css_err
-create_host_capture_pipeline(struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
-
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-
- if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
- err = create_host_isyscopy_capture_pipeline(pipe);
- else
- err = create_host_regular_capture_pipeline(pipe);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
-
- IA_CSS_LEAVE_ERR_PRIVATE(err);
-
- return err;
-}
-
-static enum ia_css_err capture_start(
- struct ia_css_pipe *pipe)
-{
- struct ia_css_pipeline *me;
-
- enum ia_css_err err = IA_CSS_SUCCESS;
- enum sh_css_pipe_config_override copy_ovrd;
-
- IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
- if (!pipe) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
-
- me = &pipe->pipeline;
+ if (need_yuv_pp && current_stage)
+ {
+ struct ia_css_frame *tmp_in_frame = current_stage->args.out_frame[0];
+ struct ia_css_frame *tmp_out_frame = NULL;
- if ((pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) &&
- (pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
- if (copy_on_sp(pipe)) {
- err = start_copy_on_sp(pipe, &me->out_frame[0]);
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ for (i = 0; i < num_yuv_scaler; i++) {
+ if (is_output_stage[i] == true)
+ tmp_out_frame = out_frame;
+ else
+ tmp_out_frame = NULL;
+
+ err = add_yuv_scaler_stage(pipe, me, tmp_in_frame, tmp_out_frame,
+ NULL,
+ &yuv_scaler_binary[i],
+ &yuv_scaler_stage);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ /* we use output port 1 as internal output port */
+ tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
+ }
}
- }
-#if defined(USE_INPUT_SYSTEM_VERSION_2)
- /* old isys: need to send_mipi_frames() in all pipe modes */
- err = send_mipi_frames(pipe);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
-#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
- if (pipe->config.mode != IA_CSS_PIPE_MODE_COPY) {
- err = send_mipi_frames(pipe);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ /*
+ * WARNING: The #if def flag has been added below as a
+ * temporary solution to solve the problem of enabling the
+ * view finder in a single binary in a capture flow. The vf-pp
+ * stage has been removed from Skycam in the solution provided.
+ * The vf-pp stage should be re-introduced when required. This
+ * should not be considered as a clean solution. Proper
+ * investigation should be done to come up with the clean solution.
+ * */
+ if (mode != IA_CSS_CAPTURE_MODE_RAW && mode != IA_CSS_CAPTURE_MODE_BAYER && current_stage && vf_frame)
+ {
+ in_frame = current_stage->args.out_vf_frame;
+ err = add_vf_pp_stage(pipe, in_frame, vf_frame, vf_pp_binary,
+ ¤t_stage);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
}
- }
-
-#endif
+ ia_css_pipeline_finalize_stages(&pipe->pipeline, pipe->stream->config.continuous);
- {
- unsigned int thread_id;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "create_host_regular_capture_pipeline() leave:\n");
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- copy_ovrd = 1 << thread_id;
+ return IA_CSS_SUCCESS;
}
- start_pipe(pipe, copy_ovrd, pipe->stream->config.mode);
-#if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
- /*
- * old isys: for IA_CSS_PIPE_MODE_COPY pipe, isys rx has to be configured,
- * which is currently done in start_binary(); but COPY pipe contains no binary,
- * and does not call start_binary(); so we need to configure the rx here.
- */
- if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY && pipe->stream->reconfigure_css_rx) {
- ia_css_isys_rx_configure(&pipe->stream->csi_rx_config, pipe->stream->config.mode);
- pipe->stream->reconfigure_css_rx = false;
- }
-#endif
+ static enum ia_css_err
+ create_host_capture_pipeline(struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
-static enum ia_css_err
-sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
- struct ia_css_frame_info *info,
- unsigned int idx)
-{
- assert(pipe);
- assert(info);
+ if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY)
+ err = create_host_isyscopy_capture_pipeline(pipe);
+ else
+ err = create_host_regular_capture_pipeline(pipe);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_pipe_get_output_frame_info() enter:\n");
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
- *info = pipe->output_info[idx];
- if (copy_on_sp(pipe) &&
- pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
- ia_css_frame_info_init(
- info,
- JPEG_BYTES,
- 1,
- IA_CSS_FRAME_FORMAT_BINARY_8,
- 0);
- } else if (info->format == IA_CSS_FRAME_FORMAT_RAW ||
- info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED) {
- info->raw_bit_depth =
- ia_css_pipe_util_pipe_input_format_bpp(pipe);
+ return err;
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_pipe_get_output_frame_info() leave:\n");
- return IA_CSS_SUCCESS;
-}
+ static enum ia_css_err capture_start(
+ struct ia_css_pipe *pipe) {
+ struct ia_css_pipeline *me;
-#if !defined(HAS_NO_INPUT_SYSTEM)
-void
-ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
- const unsigned short *data,
- unsigned int width,
- unsigned int height)
-{
- assert(stream);
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ enum sh_css_pipe_config_override copy_ovrd;
- ia_css_inputfifo_send_input_frame(
- data, width, height,
- stream->config.channel_id,
- stream->config.input_config.format,
- stream->config.pixels_per_clock == 2);
-}
+ IA_CSS_ENTER_PRIVATE("pipe = %p", pipe);
+ if (!pipe) {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
-void
-ia_css_stream_start_input_frame(const struct ia_css_stream *stream)
-{
- assert(stream);
+ me = &pipe->pipeline;
- ia_css_inputfifo_start_frame(
- stream->config.channel_id,
- stream->config.input_config.format,
- stream->config.pixels_per_clock == 2);
-}
+ if ((pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) &&
+ (pipe->config.mode != IA_CSS_PIPE_MODE_COPY)) {
+ if (copy_on_sp(pipe)) {
+ err = start_copy_on_sp(pipe, &me->out_frame[0]);
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
-void
-ia_css_stream_send_input_line(const struct ia_css_stream *stream,
- const unsigned short *data,
- unsigned int width,
- const unsigned short *data2,
- unsigned int width2)
-{
- assert(stream);
+#if defined(USE_INPUT_SYSTEM_VERSION_2)
+ /* old isys: need to send_mipi_frames() in all pipe modes */
+ err = send_mipi_frames(pipe);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+#elif defined(USE_INPUT_SYSTEM_VERSION_2401)
+ if (pipe->config.mode != IA_CSS_PIPE_MODE_COPY) {
+ err = send_mipi_frames(pipe);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
- ia_css_inputfifo_send_line(stream->config.channel_id,
- data, width, data2, width2);
-}
+#endif
-void
-ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
- enum atomisp_input_format format,
- const unsigned short *data,
- unsigned int width)
-{
- assert(stream);
- if (!data || width == 0)
- return;
- ia_css_inputfifo_send_embedded_line(stream->config.channel_id,
- format, data, width);
-}
+ {
+ unsigned int thread_id;
-void
-ia_css_stream_end_input_frame(const struct ia_css_stream *stream)
-{
- assert(stream);
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ copy_ovrd = 1 << thread_id;
+ }
+ start_pipe(pipe, copy_ovrd, pipe->stream->config.mode);
- ia_css_inputfifo_end_frame(stream->config.channel_id);
-}
+#if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
+ /*
+ * old isys: for IA_CSS_PIPE_MODE_COPY pipe, isys rx has to be configured,
+ * which is currently done in start_binary(); but COPY pipe contains no binary,
+ * and does not call start_binary(); so we need to configure the rx here.
+ */
+ if (pipe->config.mode == IA_CSS_PIPE_MODE_COPY &&
+ pipe->stream->reconfigure_css_rx) {
+ ia_css_isys_rx_configure(&pipe->stream->csi_rx_config,
+ pipe->stream->config.mode);
+ pipe->stream->reconfigure_css_rx = false;
+ }
#endif
-static void
-append_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware)
-{
- IA_CSS_ENTER_PRIVATE("l = %p, firmware = %p", l, firmware);
- if (!l) {
- IA_CSS_ERROR("NULL fw_info");
- IA_CSS_LEAVE_PRIVATE("");
- return;
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
}
- while (*l)
- l = &(*l)->next;
- *l = firmware;
- /*firmware->next = NULL;*/ /* when multiple acc extensions are loaded, 'next' can be not NULL */
- IA_CSS_LEAVE_PRIVATE("");
-}
-
-static void
-remove_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware)
-{
- assert(*l);
- assert(firmware);
- (void)l;
- (void)firmware;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() enter:\n");
-
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() leave:\n");
- return; /* removing single and multiple firmware is handled in acc_unload_extension() */
-}
-static enum ia_css_err upload_isp_code(struct ia_css_fw_info *firmware)
-{
- hrt_vaddress binary;
+ static enum ia_css_err
+ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
+ struct ia_css_frame_info *info,
+ unsigned int idx) {
+ assert(pipe);
+ assert(info);
- if (!firmware) {
- IA_CSS_ERROR("NULL input parameter");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- binary = firmware->info.isp.xmem_addr;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_pipe_get_output_frame_info() enter:\n");
- if (!binary) {
- unsigned int size = firmware->blob.size;
- const unsigned char *blob;
- const unsigned char *binary_name;
+ *info = pipe->output_info[idx];
+ if (copy_on_sp(pipe) &&
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8)
+ {
+ ia_css_frame_info_init(
+ info,
+ JPEG_BYTES,
+ 1,
+ IA_CSS_FRAME_FORMAT_BINARY_8,
+ 0);
+ } else if (info->format == IA_CSS_FRAME_FORMAT_RAW ||
+ info->format == IA_CSS_FRAME_FORMAT_RAW_PACKED)
+ {
+ info->raw_bit_depth =
+ ia_css_pipe_util_pipe_input_format_bpp(pipe);
+ }
- binary_name =
- (const unsigned char *)(IA_CSS_EXT_ISP_PROG_NAME(
- firmware));
- blob = binary_name +
- strlen((const char *)binary_name) +
- 1;
- binary = sh_css_load_blob(blob, size);
- firmware->info.isp.xmem_addr = binary;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_pipe_get_output_frame_info() leave:\n");
+ return IA_CSS_SUCCESS;
}
- if (!binary)
- return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- return IA_CSS_SUCCESS;
-}
+#if !defined(HAS_NO_INPUT_SYSTEM)
+ void
+ ia_css_stream_send_input_frame(const struct ia_css_stream *stream,
+ const unsigned short *data,
+ unsigned int width,
+ unsigned int height) {
+ assert(stream);
+
+ ia_css_inputfifo_send_input_frame(
+ data, width, height,
+ stream->config.channel_id,
+ stream->config.input_config.format,
+ stream->config.pixels_per_clock == 2);
+ }
+
+ void
+ ia_css_stream_start_input_frame(const struct ia_css_stream *stream) {
+ assert(stream);
+
+ ia_css_inputfifo_start_frame(
+ stream->config.channel_id,
+ stream->config.input_config.format,
+ stream->config.pixels_per_clock == 2);
+ }
+
+ void
+ ia_css_stream_send_input_line(const struct ia_css_stream *stream,
+ const unsigned short *data,
+ unsigned int width,
+ const unsigned short *data2,
+ unsigned int width2) {
+ assert(stream);
+
+ ia_css_inputfifo_send_line(stream->config.channel_id,
+ data, width, data2, width2);
+ }
+
+ void
+ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
+ enum atomisp_input_format format,
+ const unsigned short *data,
+ unsigned int width) {
+ assert(stream);
+ if (!data || width == 0)
+ return;
+ ia_css_inputfifo_send_embedded_line(stream->config.channel_id,
+ format, data, width);
+ }
+
+ void
+ ia_css_stream_end_input_frame(const struct ia_css_stream *stream) {
+ assert(stream);
+
+ ia_css_inputfifo_end_frame(stream->config.channel_id);
+ }
+#endif
+
+ static void
+ append_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware) {
+ IA_CSS_ENTER_PRIVATE("l = %p, firmware = %p", l, firmware);
+ if (!l) {
+ IA_CSS_ERROR("NULL fw_info");
+ IA_CSS_LEAVE_PRIVATE("");
+ return;
+ }
+ while (*l)
+ l = &(*l)->next;
+ *l = firmware;
+ /*firmware->next = NULL;*/ /* when multiple acc extensions are loaded, 'next' can be not NULL */
+ IA_CSS_LEAVE_PRIVATE("");
+ }
-static enum ia_css_err
-acc_load_extension(struct ia_css_fw_info *firmware)
-{
- enum ia_css_err err;
- struct ia_css_fw_info *hd = firmware;
+ static void
+ remove_firmware(struct ia_css_fw_info **l, struct ia_css_fw_info *firmware) {
+ assert(*l);
+ assert(firmware);
+ (void)l;
+ (void)firmware;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() enter:\n");
- while (hd) {
- err = upload_isp_code(hd);
- if (err != IA_CSS_SUCCESS)
- return err;
- hd = hd->next;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "remove_firmware() leave:\n");
+ return; /* removing single and multiple firmware is handled in acc_unload_extension() */
}
- if (!firmware)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- firmware->loaded = true;
- return IA_CSS_SUCCESS;
-}
-
-static void
-acc_unload_extension(struct ia_css_fw_info *firmware)
-{
- struct ia_css_fw_info *hd = firmware;
- struct ia_css_fw_info *hdn = NULL;
+ static enum ia_css_err upload_isp_code(struct ia_css_fw_info *firmware) {
+ hrt_vaddress binary;
- if (!firmware) /* should not happen */
- return;
- /* unload and remove multiple firmwares */
- while (hd) {
- hdn = (hd->next) ? &(*hd->next) : NULL;
- if (hd->info.isp.xmem_addr) {
- hmm_free(hd->info.isp.xmem_addr);
- hd->info.isp.xmem_addr = mmgr_NULL;
+ if (!firmware) {
+ IA_CSS_ERROR("NULL input parameter");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- hd->isp_code = NULL;
- hd->next = NULL;
- hd = hdn;
- }
+ binary = firmware->info.isp.xmem_addr;
- firmware->loaded = false;
-}
-
-/* Load firmware for extension */
-static enum ia_css_err
-ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
- struct ia_css_fw_info *firmware)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ if (!binary) {
+ unsigned int size = firmware->blob.size;
+ const unsigned char *blob;
+ const unsigned char *binary_name;
- IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+ binary_name =
+ (const unsigned char *)(IA_CSS_EXT_ISP_PROG_NAME(
+ firmware));
+ blob = binary_name +
+ strlen((const char *)binary_name) +
+ 1;
+ binary = sh_css_load_blob(blob, size);
+ firmware->info.isp.xmem_addr = binary;
+ }
- if ((!firmware) || (!pipe)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ if (!binary)
+ return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
+ return IA_CSS_SUCCESS;
}
- if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT) {
- if (&pipe->output_stage)
- append_firmware(&pipe->output_stage, firmware);
- else {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
- return IA_CSS_ERR_INTERNAL_ERROR;
- }
- } else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER) {
- if (&pipe->vf_stage)
- append_firmware(&pipe->vf_stage, firmware);
- else {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
- return IA_CSS_ERR_INTERNAL_ERROR;
+ static enum ia_css_err
+ acc_load_extension(struct ia_css_fw_info *firmware) {
+ enum ia_css_err err;
+ struct ia_css_fw_info *hd = firmware;
+
+ while (hd)
+ {
+ err = upload_isp_code(hd);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ hd = hd->next;
}
+
+ if (!firmware)
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ firmware->loaded = true;
+ return IA_CSS_SUCCESS;
}
- err = acc_load_extension(firmware);
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
+ static void
+ acc_unload_extension(struct ia_css_fw_info *firmware) {
+ struct ia_css_fw_info *hd = firmware;
+ struct ia_css_fw_info *hdn = NULL;
-/* Unload firmware for extension */
-static void
-ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
- struct ia_css_fw_info *firmware)
-{
- IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+ if (!firmware) /* should not happen */
+ return;
+ /* unload and remove multiple firmwares */
+ while (hd) {
+ hdn = (hd->next) ? &(*hd->next) : NULL;
+ if (hd->info.isp.xmem_addr) {
+ hmm_free(hd->info.isp.xmem_addr);
+ hd->info.isp.xmem_addr = mmgr_NULL;
+ }
+ hd->isp_code = NULL;
+ hd->next = NULL;
+ hd = hdn;
+ }
- if ((!firmware) || (!pipe)) {
- IA_CSS_ERROR("NULL input parameters");
- IA_CSS_LEAVE_PRIVATE("");
- return;
+ firmware->loaded = false;
}
- if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
- remove_firmware(&pipe->output_stage, firmware);
- else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
- remove_firmware(&pipe->vf_stage, firmware);
- acc_unload_extension(firmware);
+ /* Load firmware for extension */
+ static enum ia_css_err
+ ia_css_pipe_load_extension(struct ia_css_pipe *pipe,
+ struct ia_css_fw_info *firmware) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_LEAVE_PRIVATE("");
-}
+ IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
-bool
-ia_css_pipeline_uses_params(struct ia_css_pipeline *me)
-{
- struct ia_css_pipeline_stage *stage;
+ if ((!firmware) || (!pipe))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- assert(me);
+ if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
+ {
+ if (&pipe->output_stage)
+ append_firmware(&pipe->output_stage, firmware);
+ else {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+ return IA_CSS_ERR_INTERNAL_ERROR;
+ }
+ } else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
+ {
+ if (&pipe->vf_stage)
+ append_firmware(&pipe->vf_stage, firmware);
+ else {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
+ return IA_CSS_ERR_INTERNAL_ERROR;
+ }
+ }
+ err = acc_load_extension(firmware);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_uses_params() enter: me=%p\n", me);
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- for (stage = me->stages; stage; stage = stage->next)
- if (stage->binary_info && stage->binary_info->enable.params) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_uses_params() leave: return_bool=true\n");
- return true;
+ /* Unload firmware for extension */
+ static void
+ ia_css_pipe_unload_extension(struct ia_css_pipe *pipe,
+ struct ia_css_fw_info *firmware) {
+ IA_CSS_ENTER_PRIVATE("fw = %p pipe = %p", firmware, pipe);
+
+ if ((!firmware) || (!pipe)) {
+ IA_CSS_ERROR("NULL input parameters");
+ IA_CSS_LEAVE_PRIVATE("");
+ return;
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipeline_uses_params() leave: return_bool=false\n");
- return false;
-}
-static enum ia_css_err
-sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
- const void *acc_fw)
-{
- struct ia_css_fw_info *fw = (struct ia_css_fw_info *)acc_fw;
- /* In QoS case, load_extension already called, so skipping */
- enum ia_css_err err = IA_CSS_SUCCESS;
+ if (firmware->info.isp.type == IA_CSS_ACC_OUTPUT)
+ remove_firmware(&pipe->output_stage, firmware);
+ else if (firmware->info.isp.type == IA_CSS_ACC_VIEWFINDER)
+ remove_firmware(&pipe->vf_stage, firmware);
+ acc_unload_extension(firmware);
+
+ IA_CSS_LEAVE_PRIVATE("");
+ }
- if (fw->loaded == false)
- err = acc_load_extension(fw);
+ bool
+ ia_css_pipeline_uses_params(struct ia_css_pipeline *me) {
+ struct ia_css_pipeline_stage *stage;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_pipeline_add_acc_stage() enter: pipeline=%p, acc_fw=%p\n",
- pipeline, acc_fw);
+ assert(me);
- if (err == IA_CSS_SUCCESS) {
- struct ia_css_pipeline_stage_desc stage_desc;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipeline_uses_params() enter: me=%p\n", me);
- ia_css_pipe_get_acc_stage_desc(&stage_desc, NULL, fw);
- err = ia_css_pipeline_create_and_add_stage(pipeline,
- &stage_desc,
- NULL);
+ for (stage = me->stages; stage; stage = stage->next)
+ if (stage->binary_info && stage->binary_info->enable.params) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipeline_uses_params() leave: return_bool=true\n");
+ return true;
+ }
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipeline_uses_params() leave: return_bool=false\n");
+ return false;
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n", err);
- return err;
-}
+ static enum ia_css_err
+ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline,
+ const void *acc_fw) {
+ struct ia_css_fw_info *fw = (struct ia_css_fw_info *)acc_fw;
+ /* In QoS case, load_extension already called, so skipping */
+ enum ia_css_err err = IA_CSS_SUCCESS;
-/*
- * @brief Tag a specific frame in continuous capture.
- * Refer to "sh_css_internal.h" for details.
- */
-enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
- unsigned int exp_id)
-{
- struct sh_css_tag_descr tag_descr;
- u32 encoded_tag_descr;
- enum ia_css_err err;
+ if (fw->loaded == false)
+ err = acc_load_extension(fw);
- assert(stream);
- IA_CSS_ENTER("exp_id=%d", exp_id);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_pipeline_add_acc_stage() enter: pipeline=%p, acc_fw=%p\n",
+ pipeline, acc_fw);
- /* Only continuous streams have a tagger */
- if (exp_id == 0 || !stream->config.continuous) {
- IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ if (err == IA_CSS_SUCCESS)
+ {
+ struct ia_css_pipeline_stage_desc stage_desc;
- if (!sh_css_sp_is_running()) {
- /* SP is not running. The queues are not valid */
- IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
- return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ ia_css_pipe_get_acc_stage_desc(&stage_desc, NULL, fw);
+ err = ia_css_pipeline_create_and_add_stage(pipeline,
+ &stage_desc,
+ NULL);
+ }
+
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "sh_css_pipeline_add_acc_stage() leave: return_err=%d\n", err);
+ return err;
}
- /* Create the tag descriptor from the parameters */
- sh_css_create_tag_descr(0, 0, 0, exp_id, &tag_descr);
- /* Encode the tag descriptor into a 32-bit value */
- encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
- /* Enqueue the encoded tag to the host2sp queue.
- * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
- * on both host and the SP side.
- * It is mainly because it is enough to have only one tag_cmd queue */
- err = ia_css_bufq_enqueue_tag_cmd(encoded_tag_descr);
+ /*
+ * @brief Tag a specific frame in continuous capture.
+ * Refer to "sh_css_internal.h" for details.
+ */
+ enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream,
+ unsigned int exp_id) {
+ struct sh_css_tag_descr tag_descr;
+ u32 encoded_tag_descr;
+ enum ia_css_err err;
- IA_CSS_LEAVE_ERR(err);
- return err;
-}
+ assert(stream);
+ IA_CSS_ENTER("exp_id=%d", exp_id);
-/*
- * @brief Configure the continuous capture.
- * Refer to "sh_css_internal.h" for details.
- */
-enum ia_css_err ia_css_stream_capture(
- struct ia_css_stream *stream,
- int num_captures,
- unsigned int skip,
- int offset)
-{
- struct sh_css_tag_descr tag_descr;
- unsigned int encoded_tag_descr;
- enum ia_css_err return_err;
+ /* Only continuous streams have a tagger */
+ if (exp_id == 0 || !stream->config.continuous) {
+ IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- if (!stream)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ if (!sh_css_sp_is_running()) {
+ /* SP is not running. The queues are not valid */
+ IA_CSS_LEAVE_ERR(IA_CSS_ERR_RESOURCE_NOT_AVAILABLE);
+ return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ }
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_capture() enter: num_captures=%d, skip=%d, offset=%d\n",
- num_captures, skip, offset);
+ /* Create the tag descriptor from the parameters */
+ sh_css_create_tag_descr(0, 0, 0, exp_id, &tag_descr);
+ /* Encode the tag descriptor into a 32-bit value */
+ encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
+ /* Enqueue the encoded tag to the host2sp queue.
+ * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
+ * on both host and the SP side.
+ * It is mainly because it is enough to have only one tag_cmd queue */
+ err = ia_css_bufq_enqueue_tag_cmd(encoded_tag_descr);
- /* Check if the tag descriptor is valid */
- if (num_captures < SH_CSS_MINIMUM_TAG_ID) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_capture() leave: return_err=%d\n",
- IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
}
- /* Create the tag descriptor from the parameters */
- sh_css_create_tag_descr(num_captures, skip, offset, 0, &tag_descr);
-
- /* Encode the tag descriptor into a 32-bit value */
- encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
+ /*
+ * @brief Configure the continuous capture.
+ * Refer to "sh_css_internal.h" for details.
+ */
+ enum ia_css_err ia_css_stream_capture(
+ struct ia_css_stream *stream,
+ int num_captures,
+ unsigned int skip,
+ int offset) {
+ struct sh_css_tag_descr tag_descr;
+ unsigned int encoded_tag_descr;
+ enum ia_css_err return_err;
+
+ if (!stream)
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- if (!sh_css_sp_is_running()) {
- /* SP is not running. The queues are not valid */
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_capture() leaving:queues unavailable\n");
- return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
- }
+ "ia_css_stream_capture() enter: num_captures=%d, skip=%d, offset=%d\n",
+ num_captures, skip, offset);
+
+ /* Check if the tag descriptor is valid */
+ if (num_captures < SH_CSS_MINIMUM_TAG_ID) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_capture() leave: return_err=%d\n",
+ IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- /* Enqueue the encoded tag to the host2sp queue.
- * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
- * on both host and the SP side.
- * It is mainly because it is enough to have only one tag_cmd queue */
- return_err = ia_css_bufq_enqueue_tag_cmd((uint32_t)encoded_tag_descr);
+ /* Create the tag descriptor from the parameters */
+ sh_css_create_tag_descr(num_captures, skip, offset, 0, &tag_descr);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_capture() leave: return_err=%d\n",
- return_err);
+ /* Encode the tag descriptor into a 32-bit value */
+ encoded_tag_descr = sh_css_encode_tag_descr(&tag_descr);
- return return_err;
-}
+ if (!sh_css_sp_is_running()) {
+ /* SP is not running. The queues are not valid */
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_capture() leaving:queues unavailable\n");
+ return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ }
-void ia_css_stream_request_flash(struct ia_css_stream *stream)
-{
- (void)stream;
+ /* Enqueue the encoded tag to the host2sp queue.
+ * Note: The pipe and stage IDs for tag_cmd queue are hard-coded to 0
+ * on both host and the SP side.
+ * It is mainly because it is enough to have only one tag_cmd queue */
+ return_err = ia_css_bufq_enqueue_tag_cmd((uint32_t)encoded_tag_descr);
+
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_capture() leave: return_err=%d\n",
+ return_err);
+
+ return return_err;
+ }
- assert(stream);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_request_flash() enter: void\n");
+ void ia_css_stream_request_flash(struct ia_css_stream *stream) {
+ (void)stream;
+
+ assert(stream);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_request_flash() enter: void\n");
#ifndef ISP2401
- sh_css_write_host2sp_command(host2sp_cmd_start_flash);
+ sh_css_write_host2sp_command(host2sp_cmd_start_flash);
#else
- if (sh_css_sp_is_running()) {
- if (!sh_css_write_host2sp_command(host2sp_cmd_start_flash)) {
- IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
- ia_css_debug_dump_sp_sw_debug_info();
- ia_css_debug_dump_debug_info(NULL);
- }
- } else
- IA_CSS_LOG("SP is not running!");
+ if (sh_css_sp_is_running()) {
+ if (!sh_css_write_host2sp_command(host2sp_cmd_start_flash)) {
+ IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
+ ia_css_debug_dump_sp_sw_debug_info();
+ ia_css_debug_dump_debug_info(NULL);
+ }
+ } else
+ IA_CSS_LOG("SP is not running!");
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_request_flash() leave: return_void\n");
-}
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_request_flash() leave: return_void\n");
+ }
-static void
-sh_css_init_host_sp_control_vars(void)
-{
- const struct ia_css_fw_info *fw;
- unsigned int HIVE_ADDR_ia_css_ispctrl_sp_isp_started;
+ static void
+ sh_css_init_host_sp_control_vars(void) {
+ const struct ia_css_fw_info *fw;
+ unsigned int HIVE_ADDR_ia_css_ispctrl_sp_isp_started;
- unsigned int HIVE_ADDR_host_sp_queues_initialized;
- unsigned int HIVE_ADDR_sp_sleep_mode;
- unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
+ unsigned int HIVE_ADDR_host_sp_queues_initialized;
+ unsigned int HIVE_ADDR_sp_sleep_mode;
+ unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
#ifndef ISP2401
- unsigned int HIVE_ADDR_sp_stop_copy_preview;
+ unsigned int HIVE_ADDR_sp_stop_copy_preview;
#endif
- unsigned int HIVE_ADDR_host_sp_com;
- unsigned int o = offsetof(struct host_sp_communication, host2sp_command)
- / sizeof(int);
+ unsigned int HIVE_ADDR_host_sp_com;
+ unsigned int o = offsetof(struct host_sp_communication, host2sp_command)
+ / sizeof(int);
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
- unsigned int i;
+ unsigned int i;
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_init_host_sp_control_vars() enter: void\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_init_host_sp_control_vars() enter: void\n");
- fw = &sh_css_sp_fw;
- HIVE_ADDR_ia_css_ispctrl_sp_isp_started = fw->info.sp.isp_started;
+ fw = &sh_css_sp_fw;
+ HIVE_ADDR_ia_css_ispctrl_sp_isp_started = fw->info.sp.isp_started;
- HIVE_ADDR_host_sp_queues_initialized =
- fw->info.sp.host_sp_queues_initialized;
- HIVE_ADDR_sp_sleep_mode = fw->info.sp.sleep_mode;
- HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb = fw->info.sp.invalidate_tlb;
+ HIVE_ADDR_host_sp_queues_initialized =
+ fw->info.sp.host_sp_queues_initialized;
+ HIVE_ADDR_sp_sleep_mode = fw->info.sp.sleep_mode;
+ HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb = fw->info.sp.invalidate_tlb;
#ifndef ISP2401
- HIVE_ADDR_sp_stop_copy_preview = fw->info.sp.stop_copy_preview;
+ HIVE_ADDR_sp_stop_copy_preview = fw->info.sp.stop_copy_preview;
#endif
- HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
+ HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
- (void)HIVE_ADDR_ia_css_ispctrl_sp_isp_started; /* Suppres warnings in CRUN */
+ (void)HIVE_ADDR_ia_css_ispctrl_sp_isp_started; /* Suppres warnings in CRUN */
- (void)HIVE_ADDR_sp_sleep_mode;
- (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
+ (void)HIVE_ADDR_sp_sleep_mode;
+ (void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
#ifndef ISP2401
- (void)HIVE_ADDR_sp_stop_copy_preview;
-#endif
- (void)HIVE_ADDR_host_sp_com;
-
- sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(ia_css_ispctrl_sp_isp_started),
- (uint32_t)(0));
-
- sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(host_sp_queues_initialized),
- (uint32_t)(0));
- sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(sp_sleep_mode),
- (uint32_t)(0));
- sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
- (uint32_t)(false));
+ (void)HIVE_ADDR_sp_stop_copy_preview;
+#endif
+ (void)HIVE_ADDR_host_sp_com;
+
+ sp_dmem_store_uint32(SP0_ID,
+ (unsigned int)sp_address_of(ia_css_ispctrl_sp_isp_started),
+ (uint32_t)(0));
+
+ sp_dmem_store_uint32(SP0_ID,
+ (unsigned int)sp_address_of(host_sp_queues_initialized),
+ (uint32_t)(0));
+ sp_dmem_store_uint32(SP0_ID,
+ (unsigned int)sp_address_of(sp_sleep_mode),
+ (uint32_t)(0));
+ sp_dmem_store_uint32(SP0_ID,
+ (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
+ (uint32_t)(false));
#ifndef ISP2401
- sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(sp_stop_copy_preview),
- my_css.stop_copy_preview ? (uint32_t)(1) : (uint32_t)(0));
+ sp_dmem_store_uint32(SP0_ID,
+ (unsigned int)sp_address_of(sp_stop_copy_preview),
+ my_css.stop_copy_preview ? (uint32_t)(1) : (uint32_t)(0));
#endif
- store_sp_array_uint(host_sp_com, o, host2sp_cmd_ready);
+ store_sp_array_uint(host_sp_com, o, host2sp_cmd_ready);
#if !defined(HAS_NO_INPUT_SYSTEM)
- for (i = 0; i < N_CSI_PORTS; i++) {
- sh_css_update_host2sp_num_mipi_frames
+ for (i = 0; i < N_CSI_PORTS; i++) {
+ sh_css_update_host2sp_num_mipi_frames
(my_css.num_mipi_frames[i]);
- }
+ }
#endif
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_init_host_sp_control_vars() leave: return_void\n");
-}
-
-/*
- * create the internal structures and fill in the configuration data
- */
-void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_config_defaults()\n");
- *pipe_config = DEFAULT_PIPE_CONFIG;
-}
-
-void
-ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config)
-{
- if (!extra_config) {
- IA_CSS_ERROR("NULL input parameter");
- return;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
+ "sh_css_init_host_sp_control_vars() leave: return_void\n");
}
- extra_config->enable_raw_binning = false;
- extra_config->enable_yuv_ds = false;
- extra_config->enable_high_speed = false;
- extra_config->enable_dvs_6axis = false;
- extra_config->enable_reduced_pipe = false;
- extra_config->disable_vf_pp = false;
- extra_config->enable_fractional_ds = false;
-}
-
-void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_config_defaults()\n");
- assert(stream_config);
- memset(stream_config, 0, sizeof(*stream_config));
- stream_config->online = true;
- stream_config->left_padding = -1;
- stream_config->pixels_per_clock = 1;
- /* temporary default value for backwards compatibility.
- * This field used to be hardcoded within CSS but this has now
- * been moved to the stream_config struct. */
- stream_config->source.port.rxcount = 0x04040404;
-}
-
-static enum ia_css_err
-ia_css_acc_pipe_create(struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ /*
+ * create the internal structures and fill in the configuration data
+ */
+ void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_config_defaults()\n");
+ *pipe_config = DEFAULT_PIPE_CONFIG;
+ }
+
+ void
+ ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config
+ *extra_config) {
+ if (!extra_config) {
+ IA_CSS_ERROR("NULL input parameter");
+ return;
+ }
+
+ extra_config->enable_raw_binning = false;
+ extra_config->enable_yuv_ds = false;
+ extra_config->enable_high_speed = false;
+ extra_config->enable_dvs_6axis = false;
+ extra_config->enable_reduced_pipe = false;
+ extra_config->disable_vf_pp = false;
+ extra_config->enable_fractional_ds = false;
+ }
+
+ void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_config_defaults()\n");
+ assert(stream_config);
+ memset(stream_config, 0, sizeof(*stream_config));
+ stream_config->online = true;
+ stream_config->left_padding = -1;
+ stream_config->pixels_per_clock = 1;
+ /* temporary default value for backwards compatibility.
+ * This field used to be hardcoded within CSS but this has now
+ * been moved to the stream_config struct. */
+ stream_config->source.port.rxcount = 0x04040404;
+ }
+
+ static enum ia_css_err
+ ia_css_acc_pipe_create(struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
+
+ if (!pipe)
+ {
+ IA_CSS_ERROR("NULL input parameter");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- if (!pipe) {
- IA_CSS_ERROR("NULL input parameter");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ /* There is not meaning for num_execs = 0 semantically. Run atleast once. */
+ if (pipe->config.acc_num_execs == 0)
+ pipe->config.acc_num_execs = 1;
- /* There is not meaning for num_execs = 0 semantically. Run atleast once. */
- if (pipe->config.acc_num_execs == 0)
- pipe->config.acc_num_execs = 1;
+ if (pipe->config.acc_extension)
+ {
+ err = ia_css_pipe_load_extension(pipe, pipe->config.acc_extension);
+ }
- if (pipe->config.acc_extension) {
- err = ia_css_pipe_load_extension(pipe, pipe->config.acc_extension);
+ return err;
}
- return err;
-}
-
-enum ia_css_err
-ia_css_pipe_create(const struct ia_css_pipe_config *config,
- struct ia_css_pipe **pipe)
-{
+ enum ia_css_err
+ ia_css_pipe_create(const struct ia_css_pipe_config *config,
+ struct ia_css_pipe **pipe) {
#ifndef ISP2401
- if (!config)
+ if (!config)
#else
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
+ IA_CSS_ENTER_PRIVATE("config = %p, pipe = %p", config, pipe);
- if (!config) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ if (!config)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
#endif
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
#ifndef ISP2401
- if (!pipe)
+ if (!pipe)
#else
}
- if (!pipe) {
+ if (!pipe)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
#endif
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
#ifndef ISP2401
- return ia_css_pipe_create_extra(config, NULL, pipe);
+ return ia_css_pipe_create_extra(config, NULL, pipe);
#else
}
err = ia_css_pipe_create_extra(config, NULL, pipe);
- if (err == IA_CSS_SUCCESS) {
+ if (err == IA_CSS_SUCCESS)
+ {
IA_CSS_LOG("pipe created successfully = %p", *pipe);
}
return err;
#endif
-}
-
-enum ia_css_err
-ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
- const struct ia_css_pipe_extra_config *extra_config,
- struct ia_css_pipe **pipe)
-{
- enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
- struct ia_css_pipe *internal_pipe = NULL;
- unsigned int i;
-
- IA_CSS_ENTER_PRIVATE("config = %p, extra_config = %p and pipe = %p", config, extra_config, pipe);
-
- /* do not allow to create more than the maximum limit */
- if (my_css.pipe_counter >= IA_CSS_PIPELINE_NUM_MAX) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_EXHAUSTED);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- if ((!pipe) || (!config)) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ enum ia_css_err
+ ia_css_pipe_create_extra(const struct ia_css_pipe_config *config,
+ const struct ia_css_pipe_extra_config *extra_config,
+ struct ia_css_pipe **pipe) {
+ enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
+ struct ia_css_pipe *internal_pipe = NULL;
+ unsigned int i;
- ia_css_debug_dump_pipe_config(config);
- ia_css_debug_dump_pipe_extra_config(extra_config);
+ IA_CSS_ENTER_PRIVATE("config = %p, extra_config = %p and pipe = %p", config, extra_config, pipe);
- err = create_pipe(config->mode, &internal_pipe, false);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ /* do not allow to create more than the maximum limit */
+ if (my_css.pipe_counter >= IA_CSS_PIPELINE_NUM_MAX)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_RESOURCE_EXHAUSTED);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- /* now we have a pipe structure to fill */
- internal_pipe->config = *config;
- if (extra_config)
- internal_pipe->extra_config = *extra_config;
- else
- ia_css_pipe_extra_config_defaults(&internal_pipe->extra_config);
+ if ((!pipe) || (!config))
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- if (config->mode == IA_CSS_PIPE_MODE_ACC) {
- /* Temporary hack to migrate acceleration to CSS 2.0.
- * In the future the code for all pipe types should be
- * unified. */
- *pipe = internal_pipe;
- if (!internal_pipe->config.acc_extension &&
- internal_pipe->config.num_acc_stages == 0){ /* if no acc binary and no standalone stage */
- *pipe = NULL;
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
+ ia_css_debug_dump_pipe_config(config);
+ ia_css_debug_dump_pipe_extra_config(extra_config);
+
+ err = create_pipe(config->mode, &internal_pipe, false);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
}
- return ia_css_acc_pipe_create(internal_pipe);
- }
- /* Use config value when dvs_frame_delay setting equal to 2, otherwise always 1 by default */
- if (internal_pipe->config.dvs_frame_delay == IA_CSS_FRAME_DELAY_2)
- internal_pipe->dvs_frame_delay = 2;
- else
- internal_pipe->dvs_frame_delay = 1;
+ /* now we have a pipe structure to fill */
+ internal_pipe->config = *config;
+ if (extra_config)
+ internal_pipe->extra_config = *extra_config;
+ else
+ ia_css_pipe_extra_config_defaults(&internal_pipe->extra_config);
- /* we still keep enable_raw_binning for backward compatibility, for any new
- fractional bayer downscaling, we should use bayer_ds_out_res. if both are
- specified, bayer_ds_out_res will take precedence.if none is specified, we
- set bayer_ds_out_res equal to IF output resolution(IF may do cropping on
- sensor output) or use default decimation factor 1. */
- if (internal_pipe->extra_config.enable_raw_binning &&
- internal_pipe->config.bayer_ds_out_res.width) {
- /* fill some code here, if no code is needed, please remove it during integration */
- }
+ if (config->mode == IA_CSS_PIPE_MODE_ACC)
+ {
+ /* Temporary hack to migrate acceleration to CSS 2.0.
+ * In the future the code for all pipe types should be
+ * unified. */
+ *pipe = internal_pipe;
+ if (!internal_pipe->config.acc_extension &&
+ internal_pipe->config.num_acc_stages ==
+ 0) { /* if no acc binary and no standalone stage */
+ *pipe = NULL;
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
+ }
+ return ia_css_acc_pipe_create(internal_pipe);
+ }
- /* YUV downscaling */
- if ((internal_pipe->config.vf_pp_in_res.width ||
- internal_pipe->config.capt_pp_in_res.width)) {
- enum ia_css_frame_format format;
+ /* Use config value when dvs_frame_delay setting equal to 2, otherwise always 1 by default */
+ if (internal_pipe->config.dvs_frame_delay == IA_CSS_FRAME_DELAY_2)
+ internal_pipe->dvs_frame_delay = 2;
+ else
+ internal_pipe->dvs_frame_delay = 1;
+
+ /* we still keep enable_raw_binning for backward compatibility, for any new
+ fractional bayer downscaling, we should use bayer_ds_out_res. if both are
+ specified, bayer_ds_out_res will take precedence.if none is specified, we
+ set bayer_ds_out_res equal to IF output resolution(IF may do cropping on
+ sensor output) or use default decimation factor 1. */
+ if (internal_pipe->extra_config.enable_raw_binning &&
+ internal_pipe->config.bayer_ds_out_res.width)
+ {
+ /* fill some code here, if no code is needed, please remove it during integration */
+ }
- if (internal_pipe->config.vf_pp_in_res.width) {
- format = IA_CSS_FRAME_FORMAT_YUV_LINE;
- ia_css_frame_info_init(
- &internal_pipe->vf_yuv_ds_input_info,
- internal_pipe->config.vf_pp_in_res.width,
- internal_pipe->config.vf_pp_in_res.height,
- format, 0);
+ /* YUV downscaling */
+ if ((internal_pipe->config.vf_pp_in_res.width ||
+ internal_pipe->config.capt_pp_in_res.width))
+ {
+ enum ia_css_frame_format format;
+
+ if (internal_pipe->config.vf_pp_in_res.width) {
+ format = IA_CSS_FRAME_FORMAT_YUV_LINE;
+ ia_css_frame_info_init(
+ &internal_pipe->vf_yuv_ds_input_info,
+ internal_pipe->config.vf_pp_in_res.width,
+ internal_pipe->config.vf_pp_in_res.height,
+ format, 0);
+ }
+ if (internal_pipe->config.capt_pp_in_res.width) {
+ format = IA_CSS_FRAME_FORMAT_YUV420;
+ ia_css_frame_info_init(
+ &internal_pipe->out_yuv_ds_input_info,
+ internal_pipe->config.capt_pp_in_res.width,
+ internal_pipe->config.capt_pp_in_res.height,
+ format, 0);
+ }
}
- if (internal_pipe->config.capt_pp_in_res.width) {
- format = IA_CSS_FRAME_FORMAT_YUV420;
+ if (internal_pipe->config.vf_pp_in_res.width &&
+ internal_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+ {
ia_css_frame_info_init(
- &internal_pipe->out_yuv_ds_input_info,
- internal_pipe->config.capt_pp_in_res.width,
- internal_pipe->config.capt_pp_in_res.height,
- format, 0);
+ &internal_pipe->vf_yuv_ds_input_info,
+ internal_pipe->config.vf_pp_in_res.width,
+ internal_pipe->config.vf_pp_in_res.height,
+ IA_CSS_FRAME_FORMAT_YUV_LINE, 0);
}
- }
- if (internal_pipe->config.vf_pp_in_res.width &&
- internal_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) {
- ia_css_frame_info_init(
- &internal_pipe->vf_yuv_ds_input_info,
- internal_pipe->config.vf_pp_in_res.width,
- internal_pipe->config.vf_pp_in_res.height,
- IA_CSS_FRAME_FORMAT_YUV_LINE, 0);
- }
- /* handle bayer downscaling output info */
- if (internal_pipe->config.bayer_ds_out_res.width) {
+ /* handle bayer downscaling output info */
+ if (internal_pipe->config.bayer_ds_out_res.width)
+ {
ia_css_frame_info_init(
- &internal_pipe->bds_output_info,
- internal_pipe->config.bayer_ds_out_res.width,
- internal_pipe->config.bayer_ds_out_res.height,
- IA_CSS_FRAME_FORMAT_RAW, 0);
- }
-
- /* handle output info, assume always needed */
- for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++) {
- if (internal_pipe->config.output_info[i].res.width) {
- err = sh_css_pipe_configure_output(
- internal_pipe,
- internal_pipe->config.output_info[i].res.width,
- internal_pipe->config.output_info[i].res.height,
- internal_pipe->config.output_info[i].padded_width,
- internal_pipe->config.output_info[i].format,
- i);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- sh_css_free(internal_pipe);
- internal_pipe = NULL;
- return err;
- }
+ &internal_pipe->bds_output_info,
+ internal_pipe->config.bayer_ds_out_res.width,
+ internal_pipe->config.bayer_ds_out_res.height,
+ IA_CSS_FRAME_FORMAT_RAW, 0);
}
- /* handle vf output info, when configured */
- internal_pipe->enable_viewfinder[i] = (internal_pipe->config.vf_output_info[i].res.width != 0);
- if (internal_pipe->config.vf_output_info[i].res.width) {
- err = sh_css_pipe_configure_viewfinder(
- internal_pipe,
- internal_pipe->config.vf_output_info[i].res.width,
- internal_pipe->config.vf_output_info[i].res.height,
- internal_pipe->config.vf_output_info[i].padded_width,
- internal_pipe->config.vf_output_info[i].format,
- i);
+ /* handle output info, assume always needed */
+ for (i = 0; i < IA_CSS_PIPE_MAX_OUTPUT_STAGE; i++)
+ {
+ if (internal_pipe->config.output_info[i].res.width) {
+ err = sh_css_pipe_configure_output(
+ internal_pipe,
+ internal_pipe->config.output_info[i].res.width,
+ internal_pipe->config.output_info[i].res.height,
+ internal_pipe->config.output_info[i].padded_width,
+ internal_pipe->config.output_info[i].format,
+ i);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ sh_css_free(internal_pipe);
+ internal_pipe = NULL;
+ return err;
+ }
+ }
+
+ /* handle vf output info, when configured */
+ internal_pipe->enable_viewfinder[i] =
+ (internal_pipe->config.vf_output_info[i].res.width != 0);
+ if (internal_pipe->config.vf_output_info[i].res.width) {
+ err = sh_css_pipe_configure_viewfinder(
+ internal_pipe,
+ internal_pipe->config.vf_output_info[i].res.width,
+ internal_pipe->config.vf_output_info[i].res.height,
+ internal_pipe->config.vf_output_info[i].padded_width,
+ internal_pipe->config.vf_output_info[i].format,
+ i);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ sh_css_free(internal_pipe);
+ internal_pipe = NULL;
+ return err;
+ }
+ }
+ }
+ if (internal_pipe->config.acc_extension)
+ {
+ err = ia_css_pipe_load_extension(internal_pipe,
+ internal_pipe->config.acc_extension);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
sh_css_free(internal_pipe);
- internal_pipe = NULL;
return err;
}
}
- }
- if (internal_pipe->config.acc_extension) {
- err = ia_css_pipe_load_extension(internal_pipe,
- internal_pipe->config.acc_extension);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- sh_css_free(internal_pipe);
- return err;
- }
- }
- /* set all info to zeroes first */
- memset(&internal_pipe->info, 0, sizeof(internal_pipe->info));
+ /* set all info to zeroes first */
+ memset(&internal_pipe->info, 0, sizeof(internal_pipe->info));
- /* all went well, return the pipe */
- *pipe = internal_pipe;
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
-}
-
-enum ia_css_err
-ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
- struct ia_css_pipe_info *pipe_info)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_pipe_get_info()\n");
- assert(pipe_info);
- if (!pipe_info) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "ia_css_pipe_get_info: pipe_info cannot be NULL\n");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ /* all went well, return the pipe */
+ *pipe = internal_pipe;
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ return IA_CSS_SUCCESS;
}
- if (!pipe || !pipe->stream) {
- ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "ia_css_pipe_get_info: ia_css_stream_create needs to be called before ia_css_[stream/pipe]_get_info\n");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+
+ enum ia_css_err
+ ia_css_pipe_get_info(const struct ia_css_pipe *pipe,
+ struct ia_css_pipe_info *pipe_info) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_pipe_get_info()\n");
+ assert(pipe_info);
+ if (!pipe_info)
+ {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+ "ia_css_pipe_get_info: pipe_info cannot be NULL\n");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ if (!pipe || !pipe->stream)
+ {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
+ "ia_css_pipe_get_info: ia_css_stream_create needs to be called before ia_css_[stream/pipe]_get_info\n");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ /* we succeeded return the info */
+ *pipe_info = pipe->info;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_get_info() leave\n");
+ return IA_CSS_SUCCESS;
}
- /* we succeeded return the info */
- *pipe_info = pipe->info;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_pipe_get_info() leave\n");
- return IA_CSS_SUCCESS;
-}
-bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info)
-{
- unsigned int i;
+ bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info) {
+ unsigned int i;
- if (pipe_info) {
- for (i = 0; i < IA_CSS_DVS_STAT_NUM_OF_LEVELS; i++) {
- if (pipe_info->grid_info.dvs_grid.dvs_stat_grid_info.grd_cfg[i].grd_start.enable)
- return true;
+ if (pipe_info) {
+ for (i = 0; i < IA_CSS_DVS_STAT_NUM_OF_LEVELS; i++) {
+ if (pipe_info->grid_info.dvs_grid.dvs_stat_grid_info.grd_cfg[i].grd_start.enable)
+ return true;
+ }
}
- }
- return false;
-}
+ return false;
+ }
#ifdef ISP2401
-enum ia_css_err
-ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
- int pin_index,
- enum ia_css_frame_format new_format)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_pipe_override_frame_format(struct ia_css_pipe *pipe,
+ int pin_index,
+ enum ia_css_frame_format new_format) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER_PRIVATE("pipe = %p, pin_index = %d, new_formats = %d", pipe, pin_index, new_format);
+ IA_CSS_ENTER_PRIVATE("pipe = %p, pin_index = %d, new_formats = %d", pipe, pin_index, new_format);
- if (!pipe) {
- IA_CSS_ERROR("pipe is not set");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- if (0 != pin_index && 1 != pin_index) {
- IA_CSS_ERROR("pin index is not valid");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- if (new_format != IA_CSS_FRAME_FORMAT_NV12_TILEY) {
- IA_CSS_ERROR("new format is not valid");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- } else {
- err = ia_css_pipe_check_format(pipe, new_format);
- if (err == IA_CSS_SUCCESS) {
- if (pin_index == 0) {
- pipe->output_info[0].format = new_format;
- } else {
- pipe->vf_output_info[0].format = new_format;
+ if (!pipe)
+ {
+ IA_CSS_ERROR("pipe is not set");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ if (0 != pin_index && 1 != pin_index)
+ {
+ IA_CSS_ERROR("pin index is not valid");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ if (new_format != IA_CSS_FRAME_FORMAT_NV12_TILEY)
+ {
+ IA_CSS_ERROR("new format is not valid");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ } else
+ {
+ err = ia_css_pipe_check_format(pipe, new_format);
+ if (err == IA_CSS_SUCCESS) {
+ if (pin_index == 0) {
+ pipe->output_info[0].format = new_format;
+ } else {
+ pipe->vf_output_info[0].format = new_format;
+ }
}
}
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
}
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
#endif
#if defined(USE_INPUT_SYSTEM_VERSION_2)
-/* Configuration of INPUT_SYSTEM_VERSION_2401 is done on SP */
-static enum ia_css_err
-ia_css_stream_configure_rx(struct ia_css_stream *stream)
-{
- struct ia_css_input_port *config;
-
- assert(stream);
-
- config = &stream->config.source.port;
-/* AM: this code is not reliable, especially for 2400 */
- if (config->num_lanes == 1)
- stream->csi_rx_config.mode = MONO_1L_1L_0L;
- else if (config->num_lanes == 2)
- stream->csi_rx_config.mode = MONO_2L_1L_0L;
- else if (config->num_lanes == 3)
- stream->csi_rx_config.mode = MONO_3L_1L_0L;
- else if (config->num_lanes == 4)
- stream->csi_rx_config.mode = MONO_4L_1L_0L;
- else if (config->num_lanes != 0)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ /* Configuration of INPUT_SYSTEM_VERSION_2401 is done on SP */
+ static enum ia_css_err
+ ia_css_stream_configure_rx(struct ia_css_stream *stream) {
+ struct ia_css_input_port *config;
+
+ assert(stream);
+
+ config = &stream->config.source.port;
+ /* AM: this code is not reliable, especially for 2400 */
+ if (config->num_lanes == 1)
+ stream->csi_rx_config.mode = MONO_1L_1L_0L;
+ else if (config->num_lanes == 2)
+ stream->csi_rx_config.mode = MONO_2L_1L_0L;
+ else if (config->num_lanes == 3)
+ stream->csi_rx_config.mode = MONO_3L_1L_0L;
+ else if (config->num_lanes == 4)
+ stream->csi_rx_config.mode = MONO_4L_1L_0L;
+ else if (config->num_lanes != 0)
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- if (config->port > MIPI_PORT2_ID)
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- stream->csi_rx_config.port =
+ if (config->port > MIPI_PORT2_ID)
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ stream->csi_rx_config.port =
ia_css_isys_port_to_mipi_port(config->port);
- stream->csi_rx_config.timeout = config->timeout;
- stream->csi_rx_config.initcount = 0;
- stream->csi_rx_config.synccount = 0x28282828;
- stream->csi_rx_config.rxcount = config->rxcount;
- if (config->compression.type == IA_CSS_CSI2_COMPRESSION_TYPE_NONE)
- stream->csi_rx_config.comp = MIPI_PREDICTOR_NONE;
- else {
- /* not implemented yet, requires extension of the rx_cfg_t
- * struct */
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- stream->csi_rx_config.is_two_ppc = (stream->config.pixels_per_clock == 2);
- stream->reconfigure_css_rx = true;
- return IA_CSS_SUCCESS;
-}
-#endif
-
-static struct ia_css_pipe *
-find_pipe(struct ia_css_pipe *pipes[],
- unsigned int num_pipes,
- enum ia_css_pipe_mode mode,
- bool copy_pipe)
-{
- unsigned int i;
-
- assert(pipes);
- for (i = 0; i < num_pipes; i++) {
- assert(pipes[i]);
- if (pipes[i]->config.mode != mode)
- continue;
- if (copy_pipe && pipes[i]->mode != IA_CSS_PIPE_ID_COPY)
- continue;
- return pipes[i];
+ stream->csi_rx_config.timeout = config->timeout;
+ stream->csi_rx_config.initcount = 0;
+ stream->csi_rx_config.synccount = 0x28282828;
+ stream->csi_rx_config.rxcount = config->rxcount;
+ if (config->compression.type == IA_CSS_CSI2_COMPRESSION_TYPE_NONE)
+ stream->csi_rx_config.comp = MIPI_PREDICTOR_NONE;
+ else
+ {
+ /* not implemented yet, requires extension of the rx_cfg_t
+ * struct */
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ stream->csi_rx_config.is_two_ppc = (stream->config.pixels_per_clock == 2);
+ stream->reconfigure_css_rx = true;
+ return IA_CSS_SUCCESS;
}
- return NULL;
-}
-
-static enum ia_css_err
-ia_css_acc_stream_create(struct ia_css_stream *stream)
-{
- int i;
- enum ia_css_err err = IA_CSS_SUCCESS;
+#endif
- assert(stream);
- IA_CSS_ENTER_PRIVATE("stream = %p", stream);
+ static struct ia_css_pipe *
+ find_pipe(struct ia_css_pipe *pipes[],
+ unsigned int num_pipes,
+ enum ia_css_pipe_mode mode,
+ bool copy_pipe) {
+ unsigned int i;
- if (!stream) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ assert(pipes);
+ for (i = 0; i < num_pipes; i++) {
+ assert(pipes[i]);
+ if (pipes[i]->config.mode != mode)
+ continue;
+ if (copy_pipe && pipes[i]->mode != IA_CSS_PIPE_ID_COPY)
+ continue;
+ return pipes[i];
+ }
+ return NULL;
}
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *pipe = stream->pipes[i];
+ static enum ia_css_err
+ ia_css_acc_stream_create(struct ia_css_stream *stream) {
+ int i;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+
+ assert(stream);
+ IA_CSS_ENTER_PRIVATE("stream = %p", stream);
- assert(pipe);
- if (!pipe) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
- pipe->stream = stream;
- }
+ for (i = 0; i < stream->num_pipes; i++)
+ {
+ struct ia_css_pipe *pipe = stream->pipes[i];
- /* Map SP threads before doing anything. */
- err = map_sp_threads(stream, true);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ assert(pipe);
+ if (!pipe) {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+
+ pipe->stream = stream;
+ }
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *pipe = stream->pipes[i];
+ /* Map SP threads before doing anything. */
+ err = map_sp_threads(stream, true);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- assert(pipe);
- ia_css_pipe_map_queue(pipe, true);
- }
+ for (i = 0; i < stream->num_pipes; i++)
+ {
+ struct ia_css_pipe *pipe = stream->pipes[i];
- err = create_host_pipeline_structure(stream);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ assert(pipe);
+ ia_css_pipe_map_queue(pipe, true);
+ }
+
+ err = create_host_pipeline_structure(stream);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- stream->started = false;
+ stream->started = false;
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
-}
+ return IA_CSS_SUCCESS;
+ }
-static enum ia_css_err
-metadata_info_init(const struct ia_css_metadata_config *mdc,
- struct ia_css_metadata_info *md)
-{
- /* Either both width and height should be set or neither */
- if ((mdc->resolution.height > 0) ^ (mdc->resolution.width > 0))
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ static enum ia_css_err
+ metadata_info_init(const struct ia_css_metadata_config *mdc,
+ struct ia_css_metadata_info *md) {
+ /* Either both width and height should be set or neither */
+ if ((mdc->resolution.height > 0) ^ (mdc->resolution.width > 0))
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- md->resolution = mdc->resolution;
- /* We round up the stride to a multiple of the width
- * of the port going to DDR, this is a HW requirements (DMA). */
- md->stride = CEIL_MUL(mdc->resolution.width, HIVE_ISP_DDR_WORD_BYTES);
- md->size = mdc->resolution.height * md->stride;
- return IA_CSS_SUCCESS;
-}
+ md->resolution = mdc->resolution;
+ /* We round up the stride to a multiple of the width
+ * of the port going to DDR, this is a HW requirements (DMA). */
+ md->stride = CEIL_MUL(mdc->resolution.width, HIVE_ISP_DDR_WORD_BYTES);
+ md->size = mdc->resolution.height * md->stride;
+ return IA_CSS_SUCCESS;
+ }
#ifdef ISP2401
-static enum ia_css_err check_pipe_resolutions(const struct ia_css_pipe *pipe)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ static enum ia_css_err check_pipe_resolutions(const struct ia_css_pipe *pipe) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER_PRIVATE("");
+ IA_CSS_ENTER_PRIVATE("");
- if (!pipe || !pipe->stream) {
- IA_CSS_ERROR("null arguments");
- err = IA_CSS_ERR_INTERNAL_ERROR;
- goto EXIT;
- }
+ if (!pipe || !pipe->stream) {
+ IA_CSS_ERROR("null arguments");
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ goto EXIT;
+ }
- if (ia_css_util_check_res(pipe->config.input_effective_res.width,
- pipe->config.input_effective_res.height) != IA_CSS_SUCCESS) {
- IA_CSS_ERROR("effective resolution not supported");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- goto EXIT;
- }
- if (!ia_css_util_resolution_is_zero(pipe->stream->config.input_config.input_res)) {
- if (!ia_css_util_res_leq(pipe->config.input_effective_res,
- pipe->stream->config.input_config.input_res)) {
- IA_CSS_ERROR("effective resolution is larger than input resolution");
+ if (ia_css_util_check_res(pipe->config.input_effective_res.width,
+ pipe->config.input_effective_res.height) != IA_CSS_SUCCESS) {
+ IA_CSS_ERROR("effective resolution not supported");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ goto EXIT;
+ }
+ if (!ia_css_util_resolution_is_zero(
+ pipe->stream->config.input_config.input_res)) {
+ if (!ia_css_util_res_leq(pipe->config.input_effective_res,
+ pipe->stream->config.input_config.input_res)) {
+ IA_CSS_ERROR("effective resolution is larger than input resolution");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ goto EXIT;
+ }
+ }
+ if (!ia_css_util_resolution_is_even(pipe->config.output_info[0].res)) {
+ IA_CSS_ERROR("output resolution must be even");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ goto EXIT;
+ }
+ if (!ia_css_util_resolution_is_even(pipe->config.vf_output_info[0].res)) {
+ IA_CSS_ERROR("VF resolution must be even");
err = IA_CSS_ERR_INVALID_ARGUMENTS;
goto EXIT;
}
- }
- if (!ia_css_util_resolution_is_even(pipe->config.output_info[0].res)) {
- IA_CSS_ERROR("output resolution must be even");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- goto EXIT;
- }
- if (!ia_css_util_resolution_is_even(pipe->config.vf_output_info[0].res)) {
- IA_CSS_ERROR("VF resolution must be even");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- goto EXIT;
- }
EXIT:
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
-}
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
#endif
-enum ia_css_err
-ia_css_stream_create(const struct ia_css_stream_config *stream_config,
- int num_pipes,
- struct ia_css_pipe *pipes[],
- struct ia_css_stream **stream)
-{
- struct ia_css_pipe *curr_pipe;
- struct ia_css_stream *curr_stream = NULL;
- bool spcopyonly;
- bool sensor_binning_changed;
- int i, j;
- enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
- struct ia_css_metadata_info md_info;
+ enum ia_css_err
+ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
+ int num_pipes,
+ struct ia_css_pipe *pipes[],
+ struct ia_css_stream **stream) {
+ struct ia_css_pipe *curr_pipe;
+ struct ia_css_stream *curr_stream = NULL;
+ bool spcopyonly;
+ bool sensor_binning_changed;
+ int i, j;
+ enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
+ struct ia_css_metadata_info md_info;
#ifndef ISP2401
- struct ia_css_resolution effective_res;
+ struct ia_css_resolution effective_res;
#else
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- bool aspect_ratio_crop_enabled = false;
+ bool aspect_ratio_crop_enabled = false;
#endif
#endif
- IA_CSS_ENTER("num_pipes=%d", num_pipes);
- ia_css_debug_dump_stream_config(stream_config, num_pipes);
+ IA_CSS_ENTER("num_pipes=%d", num_pipes);
+ ia_css_debug_dump_stream_config(stream_config, num_pipes);
- /* some checks */
- if (num_pipes == 0 ||
- !stream ||
- !pipes) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ /* some checks */
+ if (num_pipes == 0 ||
+ !stream ||
+ !pipes)
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
#if defined(USE_INPUT_SYSTEM_VERSION_2)
- /* We don't support metadata for JPEG stream, since they both use str2mem */
- if (stream_config->input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8 &&
- stream_config->metadata_config.resolution.height > 0) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ /* We don't support metadata for JPEG stream, since they both use str2mem */
+ if (stream_config->input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8 &&
+ stream_config->metadata_config.resolution.height > 0)
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
#endif
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- if (stream_config->online && stream_config->pack_raw_pixels) {
- IA_CSS_LOG("online and pack raw is invalid on input system 2401");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ if (stream_config->online && stream_config->pack_raw_pixels)
+ {
+ IA_CSS_LOG("online and pack raw is invalid on input system 2401");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
- ia_css_debug_pipe_graph_dump_stream_config(stream_config);
+ ia_css_debug_pipe_graph_dump_stream_config(stream_config);
- /* check if mipi size specified */
- if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ /* check if mipi size specified */
+ if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- if (!stream_config->online)
+ if (!stream_config->online)
#endif
- {
- unsigned int port = (unsigned int)stream_config->source.port.port;
+ {
+ unsigned int port = (unsigned int)stream_config->source.port.port;
- if (port >= N_MIPI_PORT_ID) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ if (port >= N_MIPI_PORT_ID) {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
+
+ if (my_css.size_mem_words != 0) {
+ my_css.mipi_frame_size[port] = my_css.size_mem_words;
+ } else if (stream_config->mipi_buffer_config.size_mem_words != 0) {
+ my_css.mipi_frame_size[port] = stream_config->mipi_buffer_config.size_mem_words;
+ } else {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_create() exit: error, need to set mipi frame size.\n");
+ assert(stream_config->mipi_buffer_config.size_mem_words != 0);
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
+
+ if (my_css.size_mem_words != 0) {
+ my_css.num_mipi_frames[port] =
+ 2; /* Temp change: Default for backwards compatibility. */
+ } else if (stream_config->mipi_buffer_config.nof_mipi_buffers != 0) {
+ my_css.num_mipi_frames[port] =
+ stream_config->mipi_buffer_config.nof_mipi_buffers;
+ } else {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_create() exit: error, need to set number of mipi frames.\n");
+ assert(stream_config->mipi_buffer_config.nof_mipi_buffers != 0);
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
+ }
+#endif
+
+ /* Currently we only supported metadata up to a certain size. */
+ err = metadata_info_init(&stream_config->metadata_config, &md_info);
+ if (err != IA_CSS_SUCCESS)
+ {
IA_CSS_LEAVE_ERR(err);
return err;
}
- if (my_css.size_mem_words != 0) {
- my_css.mipi_frame_size[port] = my_css.size_mem_words;
- } else if (stream_config->mipi_buffer_config.size_mem_words != 0) {
- my_css.mipi_frame_size[port] = stream_config->mipi_buffer_config.size_mem_words;
- } else {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_create() exit: error, need to set mipi frame size.\n");
- assert(stream_config->mipi_buffer_config.size_mem_words != 0);
- err = IA_CSS_ERR_INTERNAL_ERROR;
+ /* allocate the stream instance */
+ curr_stream = kmalloc(sizeof(struct ia_css_stream), GFP_KERNEL);
+ if (!curr_stream)
+ {
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR(err);
return err;
}
+ /* default all to 0 */
+ memset(curr_stream, 0, sizeof(struct ia_css_stream));
+ curr_stream->info.metadata_info = md_info;
- if (my_css.size_mem_words != 0) {
- my_css.num_mipi_frames[port] = 2; /* Temp change: Default for backwards compatibility. */
- } else if (stream_config->mipi_buffer_config.nof_mipi_buffers != 0) {
- my_css.num_mipi_frames[port] = stream_config->mipi_buffer_config.nof_mipi_buffers;
- } else {
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
- "ia_css_stream_create() exit: error, need to set number of mipi frames.\n");
- assert(stream_config->mipi_buffer_config.nof_mipi_buffers != 0);
- err = IA_CSS_ERR_INTERNAL_ERROR;
+ /* allocate pipes */
+ curr_stream->num_pipes = num_pipes;
+ curr_stream->pipes = kcalloc(num_pipes, sizeof(struct ia_css_pipe *), GFP_KERNEL);
+ if (!curr_stream->pipes)
+ {
+ curr_stream->num_pipes = 0;
+ kfree(curr_stream);
+ curr_stream = NULL;
+ err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR(err);
return err;
}
- }
-#endif
-
- /* Currently we only supported metadata up to a certain size. */
- err = metadata_info_init(&stream_config->metadata_config, &md_info);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
-
- /* allocate the stream instance */
- curr_stream = kmalloc(sizeof(struct ia_css_stream), GFP_KERNEL);
- if (!curr_stream) {
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
- /* default all to 0 */
- memset(curr_stream, 0, sizeof(struct ia_css_stream));
- curr_stream->info.metadata_info = md_info;
-
- /* allocate pipes */
- curr_stream->num_pipes = num_pipes;
- curr_stream->pipes = kcalloc(num_pipes, sizeof(struct ia_css_pipe *), GFP_KERNEL);
- if (!curr_stream->pipes) {
- curr_stream->num_pipes = 0;
- kfree(curr_stream);
- curr_stream = NULL;
- err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
- /* store pipes */
- spcopyonly = (num_pipes == 1) && (pipes[0]->config.mode == IA_CSS_PIPE_MODE_COPY);
- for (i = 0; i < num_pipes; i++)
- curr_stream->pipes[i] = pipes[i];
- curr_stream->last_pipe = curr_stream->pipes[0];
- /* take over stream config */
- curr_stream->config = *stream_config;
+ /* store pipes */
+ spcopyonly = (num_pipes == 1) && (pipes[0]->config.mode == IA_CSS_PIPE_MODE_COPY);
+ for (i = 0; i < num_pipes; i++)
+ curr_stream->pipes[i] = pipes[i];
+ curr_stream->last_pipe = curr_stream->pipes[0];
+ /* take over stream config */
+ curr_stream->config = *stream_config;
#if defined(USE_INPUT_SYSTEM_VERSION_2401) && defined(CSI2P_DISABLE_ISYS2401_ONLINE_MODE)
- if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR &&
- stream_config->online)
- curr_stream->config.online = false;
+ if (stream_config->mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR &&
+ stream_config->online)
+ curr_stream->config.online = false;
#endif
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- if (curr_stream->config.online) {
- curr_stream->config.source.port.num_lanes = stream_config->source.port.num_lanes;
- curr_stream->config.mode = IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
- }
+ if (curr_stream->config.online)
+ {
+ curr_stream->config.source.port.num_lanes =
+ stream_config->source.port.num_lanes;
+ curr_stream->config.mode = IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
+ }
#endif
- /* in case driver doesn't configure init number of raw buffers, configure it here */
- if (curr_stream->config.target_num_cont_raw_buf == 0)
- curr_stream->config.target_num_cont_raw_buf = NUM_CONTINUOUS_FRAMES;
- if (curr_stream->config.init_num_cont_raw_buf == 0)
- curr_stream->config.init_num_cont_raw_buf = curr_stream->config.target_num_cont_raw_buf;
+ /* in case driver doesn't configure init number of raw buffers, configure it here */
+ if (curr_stream->config.target_num_cont_raw_buf == 0)
+ curr_stream->config.target_num_cont_raw_buf = NUM_CONTINUOUS_FRAMES;
+ if (curr_stream->config.init_num_cont_raw_buf == 0)
+ curr_stream->config.init_num_cont_raw_buf = curr_stream->config.target_num_cont_raw_buf;
- /* Enable locking & unlocking of buffers in RAW buffer pool */
- if (curr_stream->config.ia_css_enable_raw_buffer_locking)
- sh_css_sp_configure_enable_raw_pool_locking(
- curr_stream->config.lock_all);
+ /* Enable locking & unlocking of buffers in RAW buffer pool */
+ if (curr_stream->config.ia_css_enable_raw_buffer_locking)
+ sh_css_sp_configure_enable_raw_pool_locking(
+ curr_stream->config.lock_all);
- /* copy mode specific stuff */
- switch (curr_stream->config.mode) {
+ /* copy mode specific stuff */
+ switch (curr_stream->config.mode)
+ {
case IA_CSS_INPUT_MODE_SENSOR:
case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
#if defined(USE_INPUT_SYSTEM_VERSION_2)
- ia_css_stream_configure_rx(curr_stream);
+ ia_css_stream_configure_rx(curr_stream);
#endif
- break;
- case IA_CSS_INPUT_MODE_TPG:
+ break;
+ case IA_CSS_INPUT_MODE_TPG:
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
- IA_CSS_LOG("tpg_configuration: x_mask=%d, y_mask=%d, x_delta=%d, y_delta=%d, xy_mask=%d",
- curr_stream->config.source.tpg.x_mask,
- curr_stream->config.source.tpg.y_mask,
- curr_stream->config.source.tpg.x_delta,
- curr_stream->config.source.tpg.y_delta,
- curr_stream->config.source.tpg.xy_mask);
-
- sh_css_sp_configure_tpg(
- curr_stream->config.source.tpg.x_mask,
- curr_stream->config.source.tpg.y_mask,
- curr_stream->config.source.tpg.x_delta,
- curr_stream->config.source.tpg.y_delta,
- curr_stream->config.source.tpg.xy_mask);
+ IA_CSS_LOG("tpg_configuration: x_mask=%d, y_mask=%d, x_delta=%d, y_delta=%d, xy_mask=%d",
+ curr_stream->config.source.tpg.x_mask,
+ curr_stream->config.source.tpg.y_mask,
+ curr_stream->config.source.tpg.x_delta,
+ curr_stream->config.source.tpg.y_delta,
+ curr_stream->config.source.tpg.xy_mask);
+
+ sh_css_sp_configure_tpg(
+ curr_stream->config.source.tpg.x_mask,
+ curr_stream->config.source.tpg.y_mask,
+ curr_stream->config.source.tpg.x_delta,
+ curr_stream->config.source.tpg.y_delta,
+ curr_stream->config.source.tpg.xy_mask);
#endif
- break;
- case IA_CSS_INPUT_MODE_PRBS:
+ break;
+ case IA_CSS_INPUT_MODE_PRBS:
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
- IA_CSS_LOG("mode prbs");
- sh_css_sp_configure_prbs(curr_stream->config.source.prbs.seed);
+ IA_CSS_LOG("mode prbs");
+ sh_css_sp_configure_prbs(curr_stream->config.source.prbs.seed);
#endif
- break;
- case IA_CSS_INPUT_MODE_MEMORY:
- IA_CSS_LOG("mode memory");
- curr_stream->reconfigure_css_rx = false;
- break;
- default:
- IA_CSS_LOG("mode sensor/default");
- }
+ break;
+ case IA_CSS_INPUT_MODE_MEMORY:
+ IA_CSS_LOG("mode memory");
+ curr_stream->reconfigure_css_rx = false;
+ break;
+ default:
+ IA_CSS_LOG("mode sensor/default");
+ }
#ifdef ISP2401
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- err = aspect_ratio_crop_init(curr_stream,
- pipes,
- &aspect_ratio_crop_enabled);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ err = aspect_ratio_crop_init(curr_stream,
+ pipes,
+ &aspect_ratio_crop_enabled);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
#endif
#endif
- for (i = 0; i < num_pipes; i++) {
+ for (i = 0; i < num_pipes; i++)
+ {
#ifdef ISP2401
- struct ia_css_resolution effective_res;
+ struct ia_css_resolution effective_res;
#endif
- curr_pipe = pipes[i];
- /* set current stream */
- curr_pipe->stream = curr_stream;
- /* take over effective info */
+ curr_pipe = pipes[i];
+ /* set current stream */
+ curr_pipe->stream = curr_stream;
+ /* take over effective info */
- effective_res = curr_pipe->config.input_effective_res;
- if (effective_res.height == 0 || effective_res.width == 0) {
- effective_res = curr_pipe->stream->config.input_config.effective_res;
+ effective_res = curr_pipe->config.input_effective_res;
+ if (effective_res.height == 0 || effective_res.width == 0) {
+ effective_res = curr_pipe->stream->config.input_config.effective_res;
#ifdef ISP2401
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
- /* The aspect ratio cropping is currently only
- * supported on the new input system. */
- if (aspect_ratio_crop_check(aspect_ratio_crop_enabled, curr_pipe)) {
- struct ia_css_resolution crop_res;
-
- err = aspect_ratio_crop(curr_pipe, &crop_res);
- if (err == IA_CSS_SUCCESS) {
- effective_res = crop_res;
- } else {
- /* in case of error fallback to default
- * effective resolution from driver. */
- IA_CSS_LOG("aspect_ratio_crop() failed with err(%d)", err);
+ /* The aspect ratio cropping is currently only
+ * supported on the new input system. */
+ if (aspect_ratio_crop_check(aspect_ratio_crop_enabled, curr_pipe)) {
+ struct ia_css_resolution crop_res;
+
+ err = aspect_ratio_crop(curr_pipe, &crop_res);
+ if (err == IA_CSS_SUCCESS) {
+ effective_res = crop_res;
+ } else {
+ /* in case of error fallback to default
+ * effective resolution from driver. */
+ IA_CSS_LOG("aspect_ratio_crop() failed with err(%d)", err);
+ }
}
- }
#endif
#endif
- curr_pipe->config.input_effective_res = effective_res;
+ curr_pipe->config.input_effective_res = effective_res;
+ }
+ IA_CSS_LOG("effective_res=%dx%d",
+ effective_res.width,
+ effective_res.height);
}
- IA_CSS_LOG("effective_res=%dx%d",
- effective_res.width,
- effective_res.height);
- }
#ifdef ISP2401
- for (i = 0; i < num_pipes; i++) {
- if (pipes[i]->config.mode != IA_CSS_PIPE_MODE_ACC &&
- pipes[i]->config.mode != IA_CSS_PIPE_MODE_COPY) {
- err = check_pipe_resolutions(pipes[i]);
- if (err != IA_CSS_SUCCESS) {
- goto ERR;
+ for (i = 0; i < num_pipes; i++)
+ {
+ if (pipes[i]->config.mode != IA_CSS_PIPE_MODE_ACC &&
+ pipes[i]->config.mode != IA_CSS_PIPE_MODE_COPY) {
+ err = check_pipe_resolutions(pipes[i]);
+ if (err != IA_CSS_SUCCESS) {
+ goto ERR;
+ }
}
}
- }
#endif
- err = ia_css_stream_isp_parameters_init(curr_stream);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
- IA_CSS_LOG("isp_params_configs: %p", curr_stream->isp_params_configs);
+ err = ia_css_stream_isp_parameters_init(curr_stream);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ IA_CSS_LOG("isp_params_configs: %p", curr_stream->isp_params_configs);
- if (num_pipes == 1 && pipes[0]->config.mode == IA_CSS_PIPE_MODE_ACC) {
- *stream = curr_stream;
- err = ia_css_acc_stream_create(curr_stream);
- goto ERR;
- }
- /* sensor binning */
- if (!spcopyonly) {
- sensor_binning_changed =
- sh_css_params_set_binning_factor(curr_stream, curr_stream->config.sensor_binning_factor);
- } else {
- sensor_binning_changed = false;
- }
-
- IA_CSS_LOG("sensor_binning=%d, changed=%d",
- curr_stream->config.sensor_binning_factor, sensor_binning_changed);
- /* loop over pipes */
- IA_CSS_LOG("num_pipes=%d", num_pipes);
- curr_stream->cont_capt = false;
- /* Temporary hack: we give the preview pipe a reference to the capture
- * pipe in continuous capture mode. */
- if (curr_stream->config.continuous) {
- /* Search for the preview pipe and create the copy pipe */
- struct ia_css_pipe *preview_pipe;
- struct ia_css_pipe *video_pipe;
- struct ia_css_pipe *acc_pipe;
- struct ia_css_pipe *capture_pipe = NULL;
- struct ia_css_pipe *copy_pipe = NULL;
+ if (num_pipes == 1 && pipes[0]->config.mode == IA_CSS_PIPE_MODE_ACC)
+ {
+ *stream = curr_stream;
+ err = ia_css_acc_stream_create(curr_stream);
+ goto ERR;
+ }
+ /* sensor binning */
+ if (!spcopyonly)
+ {
+ sensor_binning_changed =
+ sh_css_params_set_binning_factor(curr_stream,
+ curr_stream->config.sensor_binning_factor);
+ } else
+ {
+ sensor_binning_changed = false;
+ }
- if (num_pipes >= 2) {
- curr_stream->cont_capt = true;
- curr_stream->disable_cont_vf = curr_stream->config.disable_cont_viewfinder;
+ IA_CSS_LOG("sensor_binning=%d, changed=%d",
+ curr_stream->config.sensor_binning_factor, sensor_binning_changed);
+ /* loop over pipes */
+ IA_CSS_LOG("num_pipes=%d", num_pipes);
+ curr_stream->cont_capt = false;
+ /* Temporary hack: we give the preview pipe a reference to the capture
+ * pipe in continuous capture mode. */
+ if (curr_stream->config.continuous)
+ {
+ /* Search for the preview pipe and create the copy pipe */
+ struct ia_css_pipe *preview_pipe;
+ struct ia_css_pipe *video_pipe;
+ struct ia_css_pipe *acc_pipe;
+ struct ia_css_pipe *capture_pipe = NULL;
+ struct ia_css_pipe *copy_pipe = NULL;
+
+ if (num_pipes >= 2) {
+ curr_stream->cont_capt = true;
+ curr_stream->disable_cont_vf = curr_stream->config.disable_cont_viewfinder;
#ifndef ISP2401
- curr_stream->stop_copy_preview = my_css.stop_copy_preview;
-#endif
- }
-
- /* Create copy pipe here, since it may not be exposed to the driver */
- preview_pipe = find_pipe(pipes, num_pipes,
- IA_CSS_PIPE_MODE_PREVIEW, false);
- video_pipe = find_pipe(pipes, num_pipes,
- IA_CSS_PIPE_MODE_VIDEO, false);
- acc_pipe = find_pipe(pipes, num_pipes,
- IA_CSS_PIPE_MODE_ACC, false);
- if (acc_pipe && num_pipes == 2 && curr_stream->cont_capt == true)
- curr_stream->cont_capt = false; /* preview + QoS case will not need cont_capt switch */
- if (curr_stream->cont_capt == true) {
- capture_pipe = find_pipe(pipes, num_pipes,
- IA_CSS_PIPE_MODE_CAPTURE, false);
- if (!capture_pipe) {
- err = IA_CSS_ERR_INTERNAL_ERROR;
- goto ERR;
+ curr_stream->stop_copy_preview = my_css.stop_copy_preview;
+#endif
}
- }
- /* We do not support preview and video pipe at the same time */
- if (preview_pipe && video_pipe) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- goto ERR;
- }
- if (preview_pipe && !preview_pipe->pipe_settings.preview.copy_pipe) {
- err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, ©_pipe, true);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
- ia_css_pipe_config_defaults(©_pipe->config);
- preview_pipe->pipe_settings.preview.copy_pipe = copy_pipe;
- copy_pipe->stream = curr_stream;
- }
- if (preview_pipe && (curr_stream->cont_capt == true)) {
- preview_pipe->pipe_settings.preview.capture_pipe = capture_pipe;
- }
- if (video_pipe && !video_pipe->pipe_settings.video.copy_pipe) {
- err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, ©_pipe, true);
- if (err != IA_CSS_SUCCESS)
+ /* Create copy pipe here, since it may not be exposed to the driver */
+ preview_pipe = find_pipe(pipes, num_pipes,
+ IA_CSS_PIPE_MODE_PREVIEW, false);
+ video_pipe = find_pipe(pipes, num_pipes,
+ IA_CSS_PIPE_MODE_VIDEO, false);
+ acc_pipe = find_pipe(pipes, num_pipes,
+ IA_CSS_PIPE_MODE_ACC, false);
+ if (acc_pipe && num_pipes == 2 && curr_stream->cont_capt == true)
+ curr_stream->cont_capt =
+ false; /* preview + QoS case will not need cont_capt switch */
+ if (curr_stream->cont_capt == true) {
+ capture_pipe = find_pipe(pipes, num_pipes,
+ IA_CSS_PIPE_MODE_CAPTURE, false);
+ if (!capture_pipe) {
+ err = IA_CSS_ERR_INTERNAL_ERROR;
+ goto ERR;
+ }
+ }
+ /* We do not support preview and video pipe at the same time */
+ if (preview_pipe && video_pipe) {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
goto ERR;
- ia_css_pipe_config_defaults(©_pipe->config);
- video_pipe->pipe_settings.video.copy_pipe = copy_pipe;
- copy_pipe->stream = curr_stream;
- }
- if (video_pipe && (curr_stream->cont_capt == true)) {
- video_pipe->pipe_settings.video.capture_pipe = capture_pipe;
- }
- if (preview_pipe && acc_pipe) {
- preview_pipe->pipe_settings.preview.acc_pipe = acc_pipe;
+ }
+
+ if (preview_pipe && !preview_pipe->pipe_settings.preview.copy_pipe) {
+ err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, ©_pipe, true);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ ia_css_pipe_config_defaults(©_pipe->config);
+ preview_pipe->pipe_settings.preview.copy_pipe = copy_pipe;
+ copy_pipe->stream = curr_stream;
+ }
+ if (preview_pipe && (curr_stream->cont_capt == true)) {
+ preview_pipe->pipe_settings.preview.capture_pipe = capture_pipe;
+ }
+ if (video_pipe && !video_pipe->pipe_settings.video.copy_pipe) {
+ err = create_pipe(IA_CSS_PIPE_MODE_CAPTURE, ©_pipe, true);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ ia_css_pipe_config_defaults(©_pipe->config);
+ video_pipe->pipe_settings.video.copy_pipe = copy_pipe;
+ copy_pipe->stream = curr_stream;
+ }
+ if (video_pipe && (curr_stream->cont_capt == true)) {
+ video_pipe->pipe_settings.video.capture_pipe = capture_pipe;
+ }
+ if (preview_pipe && acc_pipe) {
+ preview_pipe->pipe_settings.preview.acc_pipe = acc_pipe;
+ }
}
- }
- for (i = 0; i < num_pipes; i++) {
- curr_pipe = pipes[i];
- /* set current stream */
- curr_pipe->stream = curr_stream;
+ for (i = 0; i < num_pipes; i++)
+ {
+ curr_pipe = pipes[i];
+ /* set current stream */
+ curr_pipe->stream = curr_stream;
#ifndef ISP2401
- /* take over effective info */
+ /* take over effective info */
- effective_res = curr_pipe->config.input_effective_res;
- err = ia_css_util_check_res(
- effective_res.width,
- effective_res.height);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ effective_res = curr_pipe->config.input_effective_res;
+ err = ia_css_util_check_res(
+ effective_res.width,
+ effective_res.height);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
#endif
- /* sensor binning per pipe */
- if (sensor_binning_changed)
- sh_css_pipe_free_shading_table(curr_pipe);
- }
-
- /* now pipes have been configured, info should be available */
- for (i = 0; i < num_pipes; i++) {
- struct ia_css_pipe_info *pipe_info = NULL;
+ /* sensor binning per pipe */
+ if (sensor_binning_changed)
+ sh_css_pipe_free_shading_table(curr_pipe);
+ }
- curr_pipe = pipes[i];
+ /* now pipes have been configured, info should be available */
+ for (i = 0; i < num_pipes; i++)
+ {
+ struct ia_css_pipe_info *pipe_info = NULL;
- err = sh_css_pipe_load_binaries(curr_pipe);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
+ curr_pipe = pipes[i];
- /* handle each pipe */
- pipe_info = &curr_pipe->info;
- for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
- err = sh_css_pipe_get_output_frame_info(curr_pipe,
- &pipe_info->output_info[j], j);
+ err = sh_css_pipe_load_binaries(curr_pipe);
if (err != IA_CSS_SUCCESS)
goto ERR;
- }
+
+ /* handle each pipe */
+ pipe_info = &curr_pipe->info;
+ for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
+ err = sh_css_pipe_get_output_frame_info(curr_pipe,
+ &pipe_info->output_info[j], j);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ }
#ifdef ISP2401
- pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
+ pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
#endif
- if (!spcopyonly) {
- err = sh_css_pipe_get_shading_info(curr_pipe,
+ if (!spcopyonly) {
+ err = sh_css_pipe_get_shading_info(curr_pipe,
#ifndef ISP2401
- &pipe_info->shading_info);
+ &pipe_info->shading_info);
#else
- & pipe_info->shading_info, &curr_pipe->config);
+ & pipe_info->shading_info, &curr_pipe->config);
#endif
- if (err != IA_CSS_SUCCESS)
- goto ERR;
- err = sh_css_pipe_get_grid_info(curr_pipe,
- &pipe_info->grid_info);
- if (err != IA_CSS_SUCCESS)
- goto ERR;
- for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
- sh_css_pipe_get_viewfinder_frame_info(curr_pipe,
- &pipe_info->vf_output_info[j], j);
if (err != IA_CSS_SUCCESS)
goto ERR;
+ err = sh_css_pipe_get_grid_info(curr_pipe,
+ &pipe_info->grid_info);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ for (j = 0; j < IA_CSS_PIPE_MAX_OUTPUT_STAGE; j++) {
+ sh_css_pipe_get_viewfinder_frame_info(curr_pipe,
+ &pipe_info->vf_output_info[j], j);
+ if (err != IA_CSS_SUCCESS)
+ goto ERR;
+ }
}
- }
- my_css.active_pipes[ia_css_pipe_get_pipe_num(curr_pipe)] = curr_pipe;
- }
+ my_css.active_pipes[ia_css_pipe_get_pipe_num(curr_pipe)] = curr_pipe;
+ }
- curr_stream->started = false;
+ curr_stream->started = false;
- /* Map SP threads before doing anything. */
- err = map_sp_threads(curr_stream, true);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LOG("map_sp_threads: return_err=%d", err);
- goto ERR;
- }
+ /* Map SP threads before doing anything. */
+ err = map_sp_threads(curr_stream, true);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LOG("map_sp_threads: return_err=%d", err);
+ goto ERR;
+ }
- for (i = 0; i < num_pipes; i++) {
- curr_pipe = pipes[i];
- ia_css_pipe_map_queue(curr_pipe, true);
- }
+ for (i = 0; i < num_pipes; i++)
+ {
+ curr_pipe = pipes[i];
+ ia_css_pipe_map_queue(curr_pipe, true);
+ }
- /* Create host side pipeline objects without stages */
- err = create_host_pipeline_structure(curr_stream);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LOG("create_host_pipeline_structure: return_err=%d", err);
- goto ERR;
- }
+ /* Create host side pipeline objects without stages */
+ err = create_host_pipeline_structure(curr_stream);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LOG("create_host_pipeline_structure: return_err=%d", err);
+ goto ERR;
+ }
- /* assign curr_stream */
- *stream = curr_stream;
+ /* assign curr_stream */
+ *stream = curr_stream;
ERR:
#ifndef ISP2401
- if (err == IA_CSS_SUCCESS)
- {
- /* working mode: enter into the seed list */
- if (my_css_save.mode == sh_css_mode_working) {
- for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
- if (!my_css_save.stream_seeds[i].stream) {
- IA_CSS_LOG("entered stream into loc=%d", i);
- my_css_save.stream_seeds[i].orig_stream = stream;
- my_css_save.stream_seeds[i].stream = curr_stream;
- my_css_save.stream_seeds[i].num_pipes = num_pipes;
- my_css_save.stream_seeds[i].stream_config = *stream_config;
- for (j = 0; j < num_pipes; j++) {
- my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config;
- my_css_save.stream_seeds[i].pipes[j] = pipes[j];
- my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j];
+ if (err == IA_CSS_SUCCESS)
+ {
+ /* working mode: enter into the seed list */
+ if (my_css_save.mode == sh_css_mode_working) {
+ for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+ if (!my_css_save.stream_seeds[i].stream) {
+ IA_CSS_LOG("entered stream into loc=%d", i);
+ my_css_save.stream_seeds[i].orig_stream = stream;
+ my_css_save.stream_seeds[i].stream = curr_stream;
+ my_css_save.stream_seeds[i].num_pipes = num_pipes;
+ my_css_save.stream_seeds[i].stream_config = *stream_config;
+ for (j = 0; j < num_pipes; j++) {
+ my_css_save.stream_seeds[i].pipe_config[j] = pipes[j]->config;
+ my_css_save.stream_seeds[i].pipes[j] = pipes[j];
+ my_css_save.stream_seeds[i].orig_pipes[j] = &pipes[j];
+ }
+ break;
}
- break;
}
- }
#else
- if (err == IA_CSS_SUCCESS) {
- err = ia_css_save_stream(curr_stream);
+ if (err == IA_CSS_SUCCESS)
+ {
+ err = ia_css_save_stream(curr_stream);
#endif
- } else {
- ia_css_stream_destroy(curr_stream);
- }
+ } else
+ {
+ ia_css_stream_destroy(curr_stream);
+ }
#ifndef ISP2401
- IA_CSS_LEAVE("return_err=%d mode=%d", err, my_css_save.mode);
+ IA_CSS_LEAVE("return_err=%d mode=%d", err, my_css_save.mode);
#else
- IA_CSS_LEAVE("return_err=%d", err);
+ IA_CSS_LEAVE("return_err=%d", err);
#endif
- return err;
-}
+ return err;
+ }
-enum ia_css_err
-ia_css_stream_destroy(struct ia_css_stream *stream)
-{
- int i;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_stream_destroy(struct ia_css_stream *stream) {
+ int i;
+ enum ia_css_err err = IA_CSS_SUCCESS;
#ifdef ISP2401
- enum ia_css_err err1 = IA_CSS_SUCCESS;
- enum ia_css_err err2 = IA_CSS_SUCCESS;
+ enum ia_css_err err1 = IA_CSS_SUCCESS;
+ enum ia_css_err err2 = IA_CSS_SUCCESS;
#endif
- IA_CSS_ENTER_PRIVATE("stream = %p", stream);
- if (!stream) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
+ IA_CSS_ENTER_PRIVATE("stream = %p", stream);
+ if (!stream)
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
- ia_css_stream_isp_parameters_uninit(stream);
+ ia_css_stream_isp_parameters_uninit(stream);
- if ((stream->last_pipe) &&
- ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num)) {
+ if ((stream->last_pipe) &&
+ ia_css_pipeline_is_mapped(stream->last_pipe->pipe_num))
+ {
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *entry = stream->pipes[i];
- unsigned int sp_thread_id;
- struct sh_css_sp_pipeline_terminal *sp_pipeline_input_terminal;
-
- assert(entry);
- if (entry) {
- /* get the SP thread id */
- if (ia_css_pipeline_get_sp_thread_id(
- ia_css_pipe_get_pipe_num(entry), &sp_thread_id) != true)
- return IA_CSS_ERR_INTERNAL_ERROR;
- /* get the target input terminal */
- sp_pipeline_input_terminal =
+ for (i = 0; i < stream->num_pipes; i++) {
+ struct ia_css_pipe *entry = stream->pipes[i];
+ unsigned int sp_thread_id;
+ struct sh_css_sp_pipeline_terminal *sp_pipeline_input_terminal;
+
+ assert(entry);
+ if (entry) {
+ /* get the SP thread id */
+ if (ia_css_pipeline_get_sp_thread_id(
+ ia_css_pipe_get_pipe_num(entry), &sp_thread_id) != true)
+ return IA_CSS_ERR_INTERNAL_ERROR;
+ /* get the target input terminal */
+ sp_pipeline_input_terminal =
&sh_css_sp_group.pipe_io[sp_thread_id].input;
- for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
- ia_css_isys_stream_h isys_stream =
+ for (i = 0; i < IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH; i++) {
+ ia_css_isys_stream_h isys_stream =
&sp_pipeline_input_terminal->context.virtual_input_system_stream[i];
- if (stream->config.isys_config[i].valid && isys_stream->valid)
- ia_css_isys_stream_destroy(isys_stream);
+ if (stream->config.isys_config[i].valid && isys_stream->valid)
+ ia_css_isys_stream_destroy(isys_stream);
+ }
}
}
- }
#ifndef ISP2401
- if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+ if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
#else
- if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
- stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
- stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
-#endif
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *entry = stream->pipes[i];
- /* free any mipi frames that are remaining:
- * some test stream create-destroy cycles do not generate output frames
- * and the mipi buffer is not freed in the deque function
- */
- if (entry)
- free_mipi_frames(entry);
+ if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
+ stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+ stream->config.mode == IA_CSS_INPUT_MODE_PRBS) {
+#endif
+ for (i = 0; i < stream->num_pipes; i++) {
+ struct ia_css_pipe *entry = stream->pipes[i];
+ /* free any mipi frames that are remaining:
+ * some test stream create-destroy cycles do not generate output frames
+ * and the mipi buffer is not freed in the deque function
+ */
+ if (entry)
+ free_mipi_frames(entry);
+ }
}
- }
- stream_unregister_with_csi_rx(stream);
+ stream_unregister_with_csi_rx(stream);
#endif
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *curr_pipe = stream->pipes[i];
+ for (i = 0; i < stream->num_pipes; i++) {
+ struct ia_css_pipe *curr_pipe = stream->pipes[i];
- assert(curr_pipe);
- ia_css_pipe_map_queue(curr_pipe, false);
- }
+ assert(curr_pipe);
+ ia_css_pipe_map_queue(curr_pipe, false);
+ }
- err = map_sp_threads(stream, false);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
+ err = map_sp_threads(stream, false);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
}
- }
- /* remove references from pipes to stream */
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *entry = stream->pipes[i];
-
- assert(entry);
- if (entry) {
- /* clear reference to stream */
- entry->stream = NULL;
- /* check internal copy pipe */
- if (entry->mode == IA_CSS_PIPE_ID_PREVIEW &&
- entry->pipe_settings.preview.copy_pipe) {
- IA_CSS_LOG("clearing stream on internal preview copy pipe");
- entry->pipe_settings.preview.copy_pipe->stream = NULL;
- }
- if (entry->mode == IA_CSS_PIPE_ID_VIDEO &&
- entry->pipe_settings.video.copy_pipe) {
- IA_CSS_LOG("clearing stream on internal video copy pipe");
- entry->pipe_settings.video.copy_pipe->stream = NULL;
+ /* remove references from pipes to stream */
+ for (i = 0; i < stream->num_pipes; i++)
+ {
+ struct ia_css_pipe *entry = stream->pipes[i];
+
+ assert(entry);
+ if (entry) {
+ /* clear reference to stream */
+ entry->stream = NULL;
+ /* check internal copy pipe */
+ if (entry->mode == IA_CSS_PIPE_ID_PREVIEW &&
+ entry->pipe_settings.preview.copy_pipe) {
+ IA_CSS_LOG("clearing stream on internal preview copy pipe");
+ entry->pipe_settings.preview.copy_pipe->stream = NULL;
+ }
+ if (entry->mode == IA_CSS_PIPE_ID_VIDEO &&
+ entry->pipe_settings.video.copy_pipe) {
+ IA_CSS_LOG("clearing stream on internal video copy pipe");
+ entry->pipe_settings.video.copy_pipe->stream = NULL;
+ }
+ err = sh_css_pipe_unload_binaries(entry);
}
- err = sh_css_pipe_unload_binaries(entry);
}
- }
- /* free associated memory of stream struct */
- kfree(stream->pipes);
- stream->pipes = NULL;
- stream->num_pipes = 0;
+ /* free associated memory of stream struct */
+ kfree(stream->pipes);
+ stream->pipes = NULL;
+ stream->num_pipes = 0;
#ifndef ISP2401
- /* working mode: take out of the seed list */
- if (my_css_save.mode == sh_css_mode_working)
- for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
- if (my_css_save.stream_seeds[i].stream == stream)
- {
- IA_CSS_LOG("took out stream %d", i);
- my_css_save.stream_seeds[i].stream = NULL;
- break;
- }
+ /* working mode: take out of the seed list */
+ if (my_css_save.mode == sh_css_mode_working)
+ for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+ if (my_css_save.stream_seeds[i].stream == stream)
+ {
+ IA_CSS_LOG("took out stream %d", i);
+ my_css_save.stream_seeds[i].stream = NULL;
+ break;
+ }
#else
- err2 = ia_css_save_restore_remove_stream(stream);
+ err2 = ia_css_save_restore_remove_stream(stream);
- err1 = (err != IA_CSS_SUCCESS) ? err : err2;
+ err1 = (err != IA_CSS_SUCCESS) ? err : err2;
#endif
- kfree(stream);
+ kfree(stream);
#ifndef ISP2401
- IA_CSS_LEAVE_ERR(err);
+ IA_CSS_LEAVE_ERR(err);
#else
- IA_CSS_LEAVE_ERR(err1);
+ IA_CSS_LEAVE_ERR(err1);
#endif
#ifndef ISP2401
- return err;
+ return err;
#else
- return err1;
+ return err1;
#endif
-}
+ }
-enum ia_css_err
-ia_css_stream_get_info(const struct ia_css_stream *stream,
- struct ia_css_stream_info *stream_info)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_info: enter/exit\n");
- assert(stream);
- assert(stream_info);
+ enum ia_css_err
+ ia_css_stream_get_info(const struct ia_css_stream *stream,
+ struct ia_css_stream_info *stream_info) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_get_info: enter/exit\n");
+ assert(stream);
+ assert(stream_info);
- *stream_info = stream->info;
- return IA_CSS_SUCCESS;
-}
+ *stream_info = stream->info;
+ return IA_CSS_SUCCESS;
+ }
-/*
- * Rebuild a stream, including allocating structs, setting configuration and
- * building the required pipes.
- * The data is taken from the css_save struct updated upon stream creation.
- * The stream handle is used to identify the correct entry in the css_save struct
- */
-enum ia_css_err
-ia_css_stream_load(struct ia_css_stream *stream)
-{
+ /*
+ * Rebuild a stream, including allocating structs, setting configuration and
+ * building the required pipes.
+ * The data is taken from the css_save struct updated upon stream creation.
+ * The stream handle is used to identify the correct entry in the css_save struct
+ */
+ enum ia_css_err
+ ia_css_stream_load(struct ia_css_stream *stream) {
#ifndef ISP2401
- int i;
- enum ia_css_err err;
+ int i;
+ enum ia_css_err err;
- assert(stream);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() enter,\n");
- for (i = 0; i < MAX_ACTIVE_STREAMS; i++) {
- if (my_css_save.stream_seeds[i].stream == stream) {
- int j;
-
- for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++) {
- if ((err = ia_css_pipe_create(&my_css_save.stream_seeds[i].pipe_config[j], &my_css_save.stream_seeds[i].pipes[j])) != IA_CSS_SUCCESS) {
- if (j) {
- int k;
-
- for (k = 0; k < j; k++)
- ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[k]);
+ assert(stream);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() enter,\n");
+ for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+ {
+ if (my_css_save.stream_seeds[i].stream == stream) {
+ int j;
+
+ for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++) {
+ if ((err = ia_css_pipe_create(&my_css_save.stream_seeds[i].pipe_config[j],
+ &my_css_save.stream_seeds[i].pipes[j])) != IA_CSS_SUCCESS) {
+ if (j) {
+ int k;
+
+ for (k = 0; k < j; k++)
+ ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[k]);
+ }
+ return err;
}
+ }
+ err = ia_css_stream_create(&my_css_save.stream_seeds[i].stream_config,
+ my_css_save.stream_seeds[i].num_pipes,
+ my_css_save.stream_seeds[i].pipes,
+ &my_css_save.stream_seeds[i].stream);
+ if (err != IA_CSS_SUCCESS) {
+ ia_css_stream_destroy(stream);
+ for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
+ ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
return err;
}
+ break;
}
- err = ia_css_stream_create(&my_css_save.stream_seeds[i].stream_config,
- my_css_save.stream_seeds[i].num_pipes,
- my_css_save.stream_seeds[i].pipes,
- &my_css_save.stream_seeds[i].stream);
- if (err != IA_CSS_SUCCESS) {
- ia_css_stream_destroy(stream);
- for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
- ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
- return err;
- }
- break;
}
- }
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit,\n");
- return IA_CSS_SUCCESS;
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_load() exit,\n");
+ return IA_CSS_SUCCESS;
#else
- /* TODO remove function - DEPRECATED */
- (void)stream;
- return IA_CSS_ERR_NOT_SUPPORTED;
+ /* TODO remove function - DEPRECATED */
+ (void)stream;
+ return IA_CSS_ERR_NOT_SUPPORTED;
#endif
-}
+ }
-enum ia_css_err
-ia_css_stream_start(struct ia_css_stream *stream)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_stream_start(struct ia_css_stream *stream) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER("stream = %p", stream);
- if ((!stream) || (!stream->last_pipe)) {
- IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
- IA_CSS_LOG("starting %d", stream->last_pipe->mode);
+ IA_CSS_ENTER("stream = %p", stream);
+ if ((!stream) || (!stream->last_pipe))
+ {
+ IA_CSS_LEAVE_ERR(IA_CSS_ERR_INVALID_ARGUMENTS);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ IA_CSS_LOG("starting %d", stream->last_pipe->mode);
- sh_css_sp_set_disable_continuous_viewfinder(stream->disable_cont_vf);
+ sh_css_sp_set_disable_continuous_viewfinder(stream->disable_cont_vf);
- /* Create host side pipeline. */
- err = create_host_pipeline(stream);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ /* Create host side pipeline. */
+ err = create_host_pipeline(stream);
+ if (err != IA_CSS_SUCCESS)
+ {
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
#if !defined(HAS_NO_INPUT_SYSTEM)
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
- if ((stream->config.mode == IA_CSS_INPUT_MODE_SENSOR) ||
- (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
- stream_register_with_csi_rx(stream);
+ if ((stream->config.mode == IA_CSS_INPUT_MODE_SENSOR) ||
+ (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR))
+ stream_register_with_csi_rx(stream);
#endif
#endif
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
- /* Initialize mipi size checks */
- if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
- {
- unsigned int idx;
- unsigned int port = (unsigned int)(stream->config.source.port.port);
+ /* Initialize mipi size checks */
+ if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ {
+ unsigned int idx;
+ unsigned int port = (unsigned int)(stream->config.source.port.port);
- for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
- sh_css_sp_group.config.mipi_sizes_for_check[port][idx] = sh_css_get_mipi_sizes_for_check(port, idx);
+ for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
+ sh_css_sp_group.config.mipi_sizes_for_check[port][idx] =
+ sh_css_get_mipi_sizes_for_check(port, idx);
+ }
}
- }
#endif
#if !defined(HAS_NO_INPUT_SYSTEM)
- if (stream->config.mode != IA_CSS_INPUT_MODE_MEMORY) {
- err = sh_css_config_input_network(stream);
- if (err != IA_CSS_SUCCESS)
- return err;
- }
+ if (stream->config.mode != IA_CSS_INPUT_MODE_MEMORY)
+ {
+ err = sh_css_config_input_network(stream);
+ if (err != IA_CSS_SUCCESS)
+ return err;
+ }
#endif /* !HAS_NO_INPUT_SYSTEM */
- err = sh_css_pipe_start(stream);
- IA_CSS_LEAVE_ERR(err);
- return err;
-}
+ err = sh_css_pipe_start(stream);
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
-enum ia_css_err
-ia_css_stream_stop(struct ia_css_stream *stream)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_stream_stop(struct ia_css_stream *stream) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop() enter/exit\n");
- assert(stream);
- assert(stream->last_pipe);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop: stopping %d\n",
- stream->last_pipe->mode);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop() enter/exit\n");
+ assert(stream);
+ assert(stream->last_pipe);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_stop: stopping %d\n",
+ stream->last_pipe->mode);
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
- /* De-initialize mipi size checks */
- if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
- {
- unsigned int idx;
- unsigned int port = (unsigned int)(stream->config.source.port.port);
+ /* De-initialize mipi size checks */
+ if (stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ {
+ unsigned int idx;
+ unsigned int port = (unsigned int)(stream->config.source.port.port);
- for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
- sh_css_sp_group.config.mipi_sizes_for_check[port][idx] = 0;
+ for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT; idx++) {
+ sh_css_sp_group.config.mipi_sizes_for_check[port][idx] = 0;
+ }
}
- }
#endif
#ifndef ISP2401
- err = ia_css_pipeline_request_stop(&stream->last_pipe->pipeline);
+ err = ia_css_pipeline_request_stop(&stream->last_pipe->pipeline);
#else
- err = sh_css_pipes_stop(stream);
+ err = sh_css_pipes_stop(stream);
#endif
- if (err != IA_CSS_SUCCESS)
- return err;
+ if (err != IA_CSS_SUCCESS)
+ return err;
- /* Ideally, unmapping should happen after pipeline_stop, but current
- * semantics do not allow that. */
- /* err = map_sp_threads(stream, false); */
+ /* Ideally, unmapping should happen after pipeline_stop, but current
+ * semantics do not allow that. */
+ /* err = map_sp_threads(stream, false); */
- return err;
-}
+ return err;
+ }
-bool
-ia_css_stream_has_stopped(struct ia_css_stream *stream)
-{
- bool stopped;
+ bool
+ ia_css_stream_has_stopped(struct ia_css_stream *stream) {
+ bool stopped;
- assert(stream);
+ assert(stream);
#ifndef ISP2401
- stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
+ stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
#else
- stopped = sh_css_pipes_have_stopped(stream);
+ stopped = sh_css_pipes_have_stopped(stream);
#endif
- return stopped;
-}
+ return stopped;
+ }
#ifndef ISP2401
-/*
- * Destroy the stream and all the pipes related to it.
- * The stream handle is used to identify the correct entry in the css_save struct
- */
-enum ia_css_err
-ia_css_stream_unload(struct ia_css_stream *stream)
-{
- int i;
+ /*
+ * Destroy the stream and all the pipes related to it.
+ * The stream handle is used to identify the correct entry in the css_save struct
+ */
+ enum ia_css_err
+ ia_css_stream_unload(struct ia_css_stream *stream) {
+ int i;
- assert(stream);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n");
- /* some checks */
- assert(stream);
- for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
- if (my_css_save.stream_seeds[i].stream == stream)
- {
- int j;
+ assert(stream);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() enter,\n");
+ /* some checks */
+ assert(stream);
+ for (i = 0; i < MAX_ACTIVE_STREAMS; i++)
+ if (my_css_save.stream_seeds[i].stream == stream)
+ {
+ int j;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload(): unloading %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
- ia_css_stream_destroy(stream);
- for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
- ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload(): after unloading %d (%p)\n", i, my_css_save.stream_seeds[i].stream);
- break;
- }
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n");
- return IA_CSS_SUCCESS;
-}
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_unload(): unloading %d (%p)\n", i,
+ my_css_save.stream_seeds[i].stream);
+ ia_css_stream_destroy(stream);
+ for (j = 0; j < my_css_save.stream_seeds[i].num_pipes; j++)
+ ia_css_pipe_destroy(my_css_save.stream_seeds[i].pipes[j]);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_stream_unload(): after unloading %d (%p)\n", i,
+ my_css_save.stream_seeds[i].stream);
+ break;
+ }
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_stream_unload() exit,\n");
+ return IA_CSS_SUCCESS;
+ }
#endif
-enum ia_css_err
-ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe, enum ia_css_pipe_id *pipe_id)
-{
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_temp_pipe_to_pipe_id() enter/exit\n");
- if (pipe)
- *pipe_id = pipe->mode;
- else
- *pipe_id = IA_CSS_PIPE_ID_COPY;
+ enum ia_css_err
+ ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
+ enum ia_css_pipe_id *pipe_id) {
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_temp_pipe_to_pipe_id() enter/exit\n");
+ if (pipe)
+ *pipe_id = pipe->mode;
+ else
+ *pipe_id = IA_CSS_PIPE_ID_COPY;
- return IA_CSS_SUCCESS;
-}
+ return IA_CSS_SUCCESS;
+ }
-enum atomisp_input_format
-ia_css_stream_get_format(const struct ia_css_stream *stream)
-{
- return stream->config.input_config.format;
-}
+ enum atomisp_input_format
+ ia_css_stream_get_format(const struct ia_css_stream *stream) {
+ return stream->config.input_config.format;
+ }
-bool
-ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream)
-{
- return (stream->config.pixels_per_clock == 2);
-}
+ bool
+ ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream) {
+ return (stream->config.pixels_per_clock == 2);
+ }
-struct ia_css_binary *
-ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream)
-{
- struct ia_css_pipe *pipe;
+ struct ia_css_binary *
+ ia_css_stream_get_shading_correction_binary(const struct ia_css_stream
+ *stream) {
+ struct ia_css_pipe *pipe;
- assert(stream);
+ assert(stream);
- pipe = stream->pipes[0];
+ pipe = stream->pipes[0];
- if (stream->num_pipes == 2) {
- assert(stream->pipes[1]);
- if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
- stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
- pipe = stream->pipes[1];
- }
+ if (stream->num_pipes == 2) {
+ assert(stream->pipes[1]);
+ if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
+ stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+ pipe = stream->pipes[1];
+ }
- return ia_css_pipe_get_shading_correction_binary(pipe);
-}
+ return ia_css_pipe_get_shading_correction_binary(pipe);
+ }
-struct ia_css_binary *
-ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream)
-{
- int i;
- struct ia_css_pipe *video_pipe = NULL;
+ struct ia_css_binary *
+ ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream) {
+ int i;
+ struct ia_css_pipe *video_pipe = NULL;
- /* First we find the video pipe */
- for (i = 0; i < stream->num_pipes; i++) {
- struct ia_css_pipe *pipe = stream->pipes[i];
+ /* First we find the video pipe */
+ for (i = 0; i < stream->num_pipes; i++) {
+ struct ia_css_pipe *pipe = stream->pipes[i];
- if (pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
- video_pipe = pipe;
- break;
+ if (pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) {
+ video_pipe = pipe;
+ break;
+ }
}
+ if (video_pipe)
+ return &video_pipe->pipe_settings.video.video_binary;
+ return NULL;
}
- if (video_pipe)
- return &video_pipe->pipe_settings.video.video_binary;
- return NULL;
-}
-struct ia_css_binary *
-ia_css_stream_get_3a_binary(const struct ia_css_stream *stream)
-{
- struct ia_css_pipe *pipe;
- struct ia_css_binary *s3a_binary = NULL;
+ struct ia_css_binary *
+ ia_css_stream_get_3a_binary(const struct ia_css_stream *stream) {
+ struct ia_css_pipe *pipe;
+ struct ia_css_binary *s3a_binary = NULL;
- assert(stream);
+ assert(stream);
- pipe = stream->pipes[0];
+ pipe = stream->pipes[0];
- if (stream->num_pipes == 2) {
- assert(stream->pipes[1]);
- if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
- stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
- pipe = stream->pipes[1];
- }
+ if (stream->num_pipes == 2) {
+ assert(stream->pipes[1]);
+ if (stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_VIDEO ||
+ stream->pipes[1]->config.mode == IA_CSS_PIPE_MODE_PREVIEW)
+ pipe = stream->pipes[1];
+ }
- s3a_binary = ia_css_pipe_get_s3a_binary(pipe);
+ s3a_binary = ia_css_pipe_get_s3a_binary(pipe);
- return s3a_binary;
-}
+ return s3a_binary;
+ }
-enum ia_css_err
-ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width)
-{
- struct ia_css_pipe *pipe;
+ enum ia_css_err
+ ia_css_stream_set_output_padded_width(struct ia_css_stream *stream,
+ unsigned int output_padded_width) {
+ struct ia_css_pipe *pipe;
- assert(stream);
+ assert(stream);
- pipe = stream->last_pipe;
+ pipe = stream->last_pipe;
- assert(pipe);
+ assert(pipe);
- /* set the config also just in case (redundant info? why do we save config in pipe?) */
- pipe->config.output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
- pipe->output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
+ /* set the config also just in case (redundant info? why do we save config in pipe?) */
+ pipe->config.output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
+ pipe->output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
- return IA_CSS_SUCCESS;
-}
+ return IA_CSS_SUCCESS;
+ }
-static struct ia_css_binary *
-ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe)
-{
- struct ia_css_binary *binary = NULL;
+ static struct ia_css_binary *
+ ia_css_pipe_get_shading_correction_binary(const struct ia_css_pipe *pipe) {
+ struct ia_css_binary *binary = NULL;
- assert(pipe);
+ assert(pipe);
- switch (pipe->config.mode) {
- case IA_CSS_PIPE_MODE_PREVIEW:
- binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
- break;
- case IA_CSS_PIPE_MODE_VIDEO:
- binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
- break;
- case IA_CSS_PIPE_MODE_CAPTURE:
- if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
- unsigned int i;
+ switch (pipe->config.mode) {
+ case IA_CSS_PIPE_MODE_PREVIEW:
+ binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
+ break;
+ case IA_CSS_PIPE_MODE_VIDEO:
+ binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
+ break;
+ case IA_CSS_PIPE_MODE_CAPTURE:
+ if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
+ unsigned int i;
- for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
- if (pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.sc) {
- binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.primary_binary[i];
- break;
+ for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
+ if (pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.sc) {
+ binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.primary_binary[i];
+ break;
+ }
}
- }
- } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER)
- binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
- else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
- if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
+ } else if (pipe->config.default_capture_config.mode ==
+ IA_CSS_CAPTURE_MODE_BAYER)
binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
- else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2)
- binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.post_isp_binary;
+ else if (pipe->config.default_capture_config.mode ==
+ IA_CSS_CAPTURE_MODE_ADVANCED ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
+ if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
+ binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
+ else if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_2_2)
+ binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.post_isp_binary;
+ }
+ break;
+ default:
+ break;
}
- break;
- default:
- break;
- }
- if (binary && binary->info->sp.enable.sc)
- return binary;
+ if (binary && binary->info->sp.enable.sc)
+ return binary;
- return NULL;
-}
+ return NULL;
+ }
-static struct ia_css_binary *
-ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe)
-{
- struct ia_css_binary *binary = NULL;
+ static struct ia_css_binary *
+ ia_css_pipe_get_s3a_binary(const struct ia_css_pipe *pipe) {
+ struct ia_css_binary *binary = NULL;
- assert(pipe);
+ assert(pipe);
- switch (pipe->config.mode) {
+ switch (pipe->config.mode) {
case IA_CSS_PIPE_MODE_PREVIEW:
binary = (struct ia_css_binary *)&pipe->pipe_settings.preview.preview_binary;
break;
break;
}
}
- } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER)
+ } else if (pipe->config.default_capture_config.mode ==
+ IA_CSS_CAPTURE_MODE_BAYER)
binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
- else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
+ else if (pipe->config.default_capture_config.mode ==
+ IA_CSS_CAPTURE_MODE_ADVANCED ||
pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT) {
if (pipe->config.isp_pipe_version == IA_CSS_PIPE_VERSION_1)
binary = (struct ia_css_binary *)&pipe->pipe_settings.capture.pre_isp_binary;
break;
default:
break;
- }
+ }
- if (binary && !binary->info->sp.enable.s3a)
- binary = NULL;
+ if (binary && !binary->info->sp.enable.s3a)
+ binary = NULL;
- return binary;
-}
+ return binary;
+ }
-static struct ia_css_binary *
-ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe)
-{
- struct ia_css_binary *binary = NULL;
+ static struct ia_css_binary *
+ ia_css_pipe_get_sdis_binary(const struct ia_css_pipe *pipe) {
+ struct ia_css_binary *binary = NULL;
- assert(pipe);
+ assert(pipe);
- switch (pipe->config.mode) {
+ switch (pipe->config.mode) {
case IA_CSS_PIPE_MODE_VIDEO:
binary = (struct ia_css_binary *)&pipe->pipe_settings.video.video_binary;
break;
default:
break;
- }
+ }
- if (binary && !binary->info->sp.enable.dis)
- binary = NULL;
+ if (binary && !binary->info->sp.enable.dis)
+ binary = NULL;
- return binary;
-}
+ return binary;
+ }
-struct ia_css_pipeline *
-ia_css_pipe_get_pipeline(const struct ia_css_pipe *pipe)
-{
- assert(pipe);
+ struct ia_css_pipeline *
+ ia_css_pipe_get_pipeline(const struct ia_css_pipe *pipe) {
+ assert(pipe);
- return (struct ia_css_pipeline *)&pipe->pipeline;
-}
+ return (struct ia_css_pipeline *)&pipe->pipeline;
+ }
-unsigned int
-ia_css_pipe_get_pipe_num(const struct ia_css_pipe *pipe)
-{
- assert(pipe);
+ unsigned int
+ ia_css_pipe_get_pipe_num(const struct ia_css_pipe *pipe) {
+ assert(pipe);
- /* KW was not sure this function was not returning a value
- that was out of range; so added an assert, and, for the
- case when asserts are not enabled, clip to the largest
- value; pipe_num is unsigned so the value cannot be too small
- */
- assert(pipe->pipe_num < IA_CSS_PIPELINE_NUM_MAX);
+ /* KW was not sure this function was not returning a value
+ that was out of range; so added an assert, and, for the
+ case when asserts are not enabled, clip to the largest
+ value; pipe_num is unsigned so the value cannot be too small
+ */
+ assert(pipe->pipe_num < IA_CSS_PIPELINE_NUM_MAX);
- if (pipe->pipe_num >= IA_CSS_PIPELINE_NUM_MAX)
- return (IA_CSS_PIPELINE_NUM_MAX - 1);
+ if (pipe->pipe_num >= IA_CSS_PIPELINE_NUM_MAX)
+ return (IA_CSS_PIPELINE_NUM_MAX - 1);
- return pipe->pipe_num;
-}
+ return pipe->pipe_num;
+ }
-unsigned int
-ia_css_pipe_get_isp_pipe_version(const struct ia_css_pipe *pipe)
-{
- assert(pipe);
+ unsigned int
+ ia_css_pipe_get_isp_pipe_version(const struct ia_css_pipe *pipe) {
+ assert(pipe);
- return (unsigned int)pipe->config.isp_pipe_version;
-}
+ return (unsigned int)pipe->config.isp_pipe_version;
+ }
#define SP_START_TIMEOUT_US 30000000
-enum ia_css_err
-ia_css_start_sp(void)
-{
- unsigned long timeout;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_start_sp(void) {
+ unsigned long timeout;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER("");
- sh_css_sp_start_isp();
+ IA_CSS_ENTER("");
+ sh_css_sp_start_isp();
- /* waiting for the SP is completely started */
- timeout = SP_START_TIMEOUT_US;
- while ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout) {
- timeout--;
- hrt_sleep();
- }
- if (timeout == 0) {
- IA_CSS_ERROR("timeout during SP initialization");
- return IA_CSS_ERR_INTERNAL_ERROR;
- }
+ /* waiting for the SP is completely started */
+ timeout = SP_START_TIMEOUT_US;
+ while ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout)
+ {
+ timeout--;
+ hrt_sleep();
+ }
+ if (timeout == 0)
+ {
+ IA_CSS_ERROR("timeout during SP initialization");
+ return IA_CSS_ERR_INTERNAL_ERROR;
+ }
- /* Workaround, in order to run two streams in parallel. See TASK 4271*/
- /* TODO: Fix this. */
+ /* Workaround, in order to run two streams in parallel. See TASK 4271*/
+ /* TODO: Fix this. */
- sh_css_init_host_sp_control_vars();
+ sh_css_init_host_sp_control_vars();
- /* buffers should be initialized only when sp is started */
- /* AM: At the moment it will be done only when there is no stream active. */
+ /* buffers should be initialized only when sp is started */
+ /* AM: At the moment it will be done only when there is no stream active. */
- sh_css_setup_queues();
- ia_css_bufq_dump_queue_info();
+ sh_css_setup_queues();
+ ia_css_bufq_dump_queue_info();
#ifdef ISP2401
- if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
- ia_css_set_system_mode(IA_CSS_SYS_MODE_WORKING);
- }
+ if (ia_css_is_system_mode_suspend_or_resume() == false) /* skip in suspend/resume flow */
+ {
+ ia_css_set_system_mode(IA_CSS_SYS_MODE_WORKING);
+ }
#endif
- IA_CSS_LEAVE_ERR(err);
- return err;
-}
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
-/*
- * Time to wait SP for termincate. Only condition when this can happen
- * is a fatal hw failure, but we must be able to detect this and emit
- * a proper error trace.
- */
+ /*
+ * Time to wait SP for termincate. Only condition when this can happen
+ * is a fatal hw failure, but we must be able to detect this and emit
+ * a proper error trace.
+ */
#define SP_SHUTDOWN_TIMEOUT_US 200000
-enum ia_css_err
-ia_css_stop_sp(void)
-{
- unsigned long timeout;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ enum ia_css_err
+ ia_css_stop_sp(void) {
+ unsigned long timeout;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER("void");
+ IA_CSS_ENTER("void");
- if (!sh_css_sp_is_running()) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE("SP already stopped : return_err=%d", err);
+ if (!sh_css_sp_is_running())
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE("SP already stopped : return_err=%d", err);
- /* Return an error - stop SP should not have been called by driver */
- return err;
- }
+ /* Return an error - stop SP should not have been called by driver */
+ return err;
+ }
- /* For now, stop whole SP */
+ /* For now, stop whole SP */
#ifndef ISP2401
- sh_css_write_host2sp_command(host2sp_cmd_terminate);
+ sh_css_write_host2sp_command(host2sp_cmd_terminate);
#else
- if (!sh_css_write_host2sp_command(host2sp_cmd_terminate)) {
- IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
- ia_css_debug_dump_sp_sw_debug_info();
- ia_css_debug_dump_debug_info(NULL);
- }
+ if (!sh_css_write_host2sp_command(host2sp_cmd_terminate))
+ {
+ IA_CSS_ERROR("Call to 'sh-css_write_host2sp_command()' failed");
+ ia_css_debug_dump_sp_sw_debug_info();
+ ia_css_debug_dump_debug_info(NULL);
+ }
#endif
- sh_css_sp_set_sp_running(false);
+ sh_css_sp_set_sp_running(false);
- timeout = SP_SHUTDOWN_TIMEOUT_US;
- while (!ia_css_spctrl_is_idle(SP0_ID) && timeout) {
- timeout--;
- hrt_sleep();
- }
- if ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED))
- IA_CSS_WARNING("SP has not terminated (SW)");
+ timeout = SP_SHUTDOWN_TIMEOUT_US;
+ while (!ia_css_spctrl_is_idle(SP0_ID) && timeout)
+ {
+ timeout--;
+ hrt_sleep();
+ }
+ if ((ia_css_spctrl_get_state(SP0_ID) != IA_CSS_SP_SW_TERMINATED))
+ IA_CSS_WARNING("SP has not terminated (SW)");
- if (timeout == 0) {
- IA_CSS_WARNING("SP is not idle");
- ia_css_debug_dump_sp_sw_debug_info();
- }
- timeout = SP_SHUTDOWN_TIMEOUT_US;
- while (!isp_ctrl_getbit(ISP0_ID, ISP_SC_REG, ISP_IDLE_BIT) && timeout) {
- timeout--;
- hrt_sleep();
- }
- if (timeout == 0) {
- IA_CSS_WARNING("ISP is not idle");
- ia_css_debug_dump_sp_sw_debug_info();
- }
+ if (timeout == 0)
+ {
+ IA_CSS_WARNING("SP is not idle");
+ ia_css_debug_dump_sp_sw_debug_info();
+ }
+ timeout = SP_SHUTDOWN_TIMEOUT_US;
+ while (!isp_ctrl_getbit(ISP0_ID, ISP_SC_REG, ISP_IDLE_BIT) && timeout)
+ {
+ timeout--;
+ hrt_sleep();
+ }
+ if (timeout == 0)
+ {
+ IA_CSS_WARNING("ISP is not idle");
+ ia_css_debug_dump_sp_sw_debug_info();
+ }
- sh_css_hmm_buffer_record_uninit();
+ sh_css_hmm_buffer_record_uninit();
#ifndef ISP2401
- /* clear pending param sets from refcount */
- sh_css_param_clear_param_sets();
-#else
- if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
/* clear pending param sets from refcount */
sh_css_param_clear_param_sets();
- ia_css_set_system_mode(IA_CSS_SYS_MODE_INIT); /* System is initialized but not 'running' */
- }
+#else
+ if (ia_css_is_system_mode_suspend_or_resume() == false) /* skip in suspend/resume flow */
+ {
+ /* clear pending param sets from refcount */
+ sh_css_param_clear_param_sets();
+ ia_css_set_system_mode(
+ IA_CSS_SYS_MODE_INIT); /* System is initialized but not 'running' */
+ }
#endif
- IA_CSS_LEAVE_ERR(err);
- return err;
-}
-
-enum ia_css_err
-ia_css_update_continuous_frames(struct ia_css_stream *stream)
-{
- struct ia_css_pipe *pipe;
- unsigned int i;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
- ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE,
- "sh_css_update_continuous_frames() enter:\n");
+ enum ia_css_err
+ ia_css_update_continuous_frames(struct ia_css_stream *stream) {
+ struct ia_css_pipe *pipe;
+ unsigned int i;
- if (!stream) {
ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE,
- "sh_css_update_continuous_frames() leave: invalid stream, return_void\n");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ IA_CSS_DEBUG_TRACE,
+ "sh_css_update_continuous_frames() enter:\n");
- pipe = stream->continuous_pipe;
+ if (!stream)
+ {
+ ia_css_debug_dtrace(
+ IA_CSS_DEBUG_TRACE,
+ "sh_css_update_continuous_frames() leave: invalid stream, return_void\n");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- for (i = stream->config.init_num_cont_raw_buf;
- i < stream->config.target_num_cont_raw_buf; i++) {
- sh_css_update_host2sp_offline_frame(i,
- pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
- }
- sh_css_update_host2sp_cont_num_raw_frames
- (stream->config.target_num_cont_raw_buf, true);
- ia_css_debug_dtrace(
- IA_CSS_DEBUG_TRACE,
- "sh_css_update_continuous_frames() leave: return_void\n");
+ pipe = stream->continuous_pipe;
- return IA_CSS_SUCCESS;
-}
+ for (i = stream->config.init_num_cont_raw_buf;
+ i < stream->config.target_num_cont_raw_buf; i++)
+ {
+ sh_css_update_host2sp_offline_frame(i,
+ pipe->continuous_frames[i], pipe->cont_md_buffers[i]);
+ }
+ sh_css_update_host2sp_cont_num_raw_frames
+ (stream->config.target_num_cont_raw_buf, true);
+ ia_css_debug_dtrace(
+ IA_CSS_DEBUG_TRACE,
+ "sh_css_update_continuous_frames() leave: return_void\n");
-void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map)
-{
- unsigned int thread_id;
- enum ia_css_pipe_id pipe_id;
- unsigned int pipe_num;
- bool need_input_queue;
+ return IA_CSS_SUCCESS;
+ }
- IA_CSS_ENTER("");
- assert(pipe);
+ void ia_css_pipe_map_queue(struct ia_css_pipe *pipe, bool map) {
+ unsigned int thread_id;
+ enum ia_css_pipe_id pipe_id;
+ unsigned int pipe_num;
+ bool need_input_queue;
- pipe_id = pipe->mode;
- pipe_num = pipe->pipe_num;
+ IA_CSS_ENTER("");
+ assert(pipe);
- ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
+ pipe_id = pipe->mode;
+ pipe_num = pipe->pipe_num;
+
+ ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
#if defined(HAS_NO_INPUT_SYSTEM) || defined(USE_INPUT_SYSTEM_VERSION_2401)
- need_input_queue = true;
+ need_input_queue = true;
#else
- need_input_queue = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
+ need_input_queue = pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY;
#endif
- /* map required buffer queues to resources */
- /* TODO: to be improved */
- if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+ /* map required buffer queues to resources */
+ /* TODO: to be improved */
+ if (pipe->mode == IA_CSS_PIPE_ID_PREVIEW) {
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
#endif
- if (pipe->pipe_settings.preview.preview_binary.info &&
- pipe->pipe_settings.preview.preview_binary.info->sp.enable.s3a)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
- } else if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE) {
- unsigned int i;
+ if (pipe->pipe_settings.preview.preview_binary.info &&
+ pipe->pipe_settings.preview.preview_binary.info->sp.enable.s3a)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+ } else if (pipe->mode == IA_CSS_PIPE_ID_CAPTURE) {
+ unsigned int i;
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
#endif
- if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
- for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
- if (pipe->pipe_settings.capture.primary_binary[i].info &&
- pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.s3a) {
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
- break;
+ if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
+ for (i = 0; i < pipe->pipe_settings.capture.num_primary_stage; i++) {
+ if (pipe->pipe_settings.capture.primary_binary[i].info &&
+ pipe->pipe_settings.capture.primary_binary[i].info->sp.enable.s3a) {
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+ break;
+ }
}
+ } else if (pipe->config.default_capture_config.mode ==
+ IA_CSS_CAPTURE_MODE_ADVANCED ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT ||
+ pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) {
+ if (pipe->pipe_settings.capture.pre_isp_binary.info &&
+ pipe->pipe_settings.capture.pre_isp_binary.info->sp.enable.s3a)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
}
- } else if (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_ADVANCED ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_LOW_LIGHT ||
- pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_BAYER) {
- if (pipe->pipe_settings.capture.pre_isp_binary.info &&
- pipe->pipe_settings.capture.pre_isp_binary.info->sp.enable.s3a)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
- }
- } else if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
- if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+ } else if (pipe->mode == IA_CSS_PIPE_ID_VIDEO) {
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+ if (pipe->enable_viewfinder[IA_CSS_PIPE_OUTPUT_STAGE_0])
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
+#if defined SH_CSS_ENABLE_METADATA
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+#endif
+ if (pipe->pipe_settings.video.video_binary.info &&
+ pipe->pipe_settings.video.video_binary.info->sp.enable.s3a)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
+ if (pipe->pipe_settings.video.video_binary.info &&
+ (pipe->pipe_settings.video.video_binary.info->sp.enable.dis
+ ))
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_DIS_STATISTICS, map);
+ } else if (pipe->mode == IA_CSS_PIPE_ID_COPY) {
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+ if (!pipe->stream->config.continuous)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
-#endif
- if (pipe->pipe_settings.video.video_binary.info &&
- pipe->pipe_settings.video.video_binary.info->sp.enable.s3a)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_3A_STATISTICS, map);
- if (pipe->pipe_settings.video.video_binary.info &&
- (pipe->pipe_settings.video.video_binary.info->sp.enable.dis
- ))
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_DIS_STATISTICS, map);
- } else if (pipe->mode == IA_CSS_PIPE_ID_COPY) {
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- if (!pipe->stream->config.continuous)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+#endif
+ } else if (pipe->mode == IA_CSS_PIPE_ID_ACC) {
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
-#endif
- } else if (pipe->mode == IA_CSS_PIPE_ID_ACC) {
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET, map);
-#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
#endif
- } else if (pipe->mode == IA_CSS_PIPE_ID_YUVPP) {
- unsigned int idx;
+ } else if (pipe->mode == IA_CSS_PIPE_ID_YUVPP) {
+ unsigned int idx;
- for (idx = 0; idx < IA_CSS_PIPE_MAX_OUTPUT_STAGE; idx++) {
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME + idx, map);
- if (pipe->enable_viewfinder[idx])
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME + idx, map);
- }
- if (need_input_queue)
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
+ for (idx = 0; idx < IA_CSS_PIPE_MAX_OUTPUT_STAGE; idx++) {
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME + idx, map);
+ if (pipe->enable_viewfinder[idx])
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME + idx, map);
+ }
+ if (need_input_queue)
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_INPUT_FRAME, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_PARAMETER_SET, map);
#if defined SH_CSS_ENABLE_METADATA
- ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
+ ia_css_queue_map(thread_id, IA_CSS_BUFFER_TYPE_METADATA, map);
#endif
+ }
+ IA_CSS_LEAVE("");
}
- IA_CSS_LEAVE("");
-}
#if CONFIG_ON_FRAME_ENQUEUE()
-static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info *info, struct frame_data_wrapper *frame)
-{
- frame->config_on_frame_enqueue.padded_width = 0;
-
- /* currently we support configuration on frame enqueue only on YUV formats */
- /* on other formats the padded_width is zeroed for no configuration override */
- switch (info->format) {
- case IA_CSS_FRAME_FORMAT_YUV420:
- case IA_CSS_FRAME_FORMAT_NV12:
- if (info->padded_width > info->res.width)
- {
- frame->config_on_frame_enqueue.padded_width = info->padded_width;
- } else if ((info->padded_width < info->res.width) && (info->padded_width > 0))
- {
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ static enum ia_css_err set_config_on_frame_enqueue(struct ia_css_frame_info
+ *info, struct frame_data_wrapper *frame) {
+ frame->config_on_frame_enqueue.padded_width = 0;
+
+ /* currently we support configuration on frame enqueue only on YUV formats */
+ /* on other formats the padded_width is zeroed for no configuration override */
+ switch (info->format) {
+ case IA_CSS_FRAME_FORMAT_YUV420:
+ case IA_CSS_FRAME_FORMAT_NV12:
+ if (info->padded_width > info->res.width) {
+ frame->config_on_frame_enqueue.padded_width = info->padded_width;
+ } else if ((info->padded_width < info->res.width) && (info->padded_width > 0)) {
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
+ /* nothing to do if width == padded width or padded width is zeroed (the same) */
+ break;
+ default:
+ break;
}
- /* nothing to do if width == padded width or padded width is zeroed (the same) */
- break;
- default:
- break;
- }
- return IA_CSS_SUCCESS;
-}
+ return IA_CSS_SUCCESS;
+ }
#endif
-enum ia_css_err
-ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id)
-{
- enum ia_css_err ret;
+ enum ia_css_err
+ ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id) {
+ enum ia_css_err ret;
- IA_CSS_ENTER("");
+ IA_CSS_ENTER("");
- /* Only continuous streams have a tagger to which we can send the
- * unlock message. */
- if (!stream || !stream->config.continuous) {
- IA_CSS_ERROR("invalid stream pointer");
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ /* Only continuous streams have a tagger to which we can send the
+ * unlock message. */
+ if (!stream || !stream->config.continuous)
+ {
+ IA_CSS_ERROR("invalid stream pointer");
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- if (exp_id > IA_CSS_ISYS_MAX_EXPOSURE_ID ||
- exp_id < IA_CSS_ISYS_MIN_EXPOSURE_ID) {
- IA_CSS_ERROR("invalid expsure ID: %d\n", exp_id);
- return IA_CSS_ERR_INVALID_ARGUMENTS;
- }
+ if (exp_id > IA_CSS_ISYS_MAX_EXPOSURE_ID ||
+ exp_id < IA_CSS_ISYS_MIN_EXPOSURE_ID)
+ {
+ IA_CSS_ERROR("invalid expsure ID: %d\n", exp_id);
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
+ }
- /* Send the event. Since we verified that the exp_id is valid,
- * we can safely assign it to an 8-bit argument here. */
- ret = ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_UNLOCK_RAW_BUFFER, exp_id, 0, 0);
+ /* Send the event. Since we verified that the exp_id is valid,
+ * we can safely assign it to an 8-bit argument here. */
+ ret = ia_css_bufq_enqueue_psys_event(
+ IA_CSS_PSYS_SW_EVENT_UNLOCK_RAW_BUFFER, exp_id, 0, 0);
- IA_CSS_LEAVE_ERR(ret);
- return ret;
-}
+ IA_CSS_LEAVE_ERR(ret);
+ return ret;
+ }
-/* @brief Set the state (Enable or Disable) of the Extension stage in the
- * given pipe.
- */
-enum ia_css_err
-ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool enable)
-{
- unsigned int thread_id;
- struct ia_css_pipeline_stage *stage;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ /* @brief Set the state (Enable or Disable) of the Extension stage in the
+ * given pipe.
+ */
+ enum ia_css_err
+ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle,
+ bool enable) {
+ unsigned int thread_id;
+ struct ia_css_pipeline_stage *stage;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER("");
+ IA_CSS_ENTER("");
- /* Parameter Check */
- if (!pipe || !pipe->stream) {
- IA_CSS_ERROR("Invalid Pipe.");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!(pipe->config.acc_extension)) {
- IA_CSS_ERROR("Invalid Pipe(No Extension Firmware)");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!sh_css_sp_is_running()) {
- IA_CSS_ERROR("Leaving: queue unavailable.");
- err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
- } else {
- /* Query the threadid and stage_num for the Extension firmware*/
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
- if (err == IA_CSS_SUCCESS) {
- /* Set the Extension State;. TODO: Add check for stage firmware.type (QOS)*/
- err = ia_css_bufq_enqueue_psys_event(
- (uint8_t)IA_CSS_PSYS_SW_EVENT_STAGE_ENABLE_DISABLE,
- (uint8_t)thread_id,
- (uint8_t)stage->stage_num,
- enable ? 1 : 0);
+ /* Parameter Check */
+ if (!pipe || !pipe->stream)
+ {
+ IA_CSS_ERROR("Invalid Pipe.");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!(pipe->config.acc_extension))
+ {
+ IA_CSS_ERROR("Invalid Pipe(No Extension Firmware)");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!sh_css_sp_is_running())
+ {
+ IA_CSS_ERROR("Leaving: queue unavailable.");
+ err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ } else
+ {
+ /* Query the threadid and stage_num for the Extension firmware*/
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
if (err == IA_CSS_SUCCESS) {
- if (enable)
- SH_CSS_QOS_STAGE_ENABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
- else
- SH_CSS_QOS_STAGE_DISABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+ /* Set the Extension State;. TODO: Add check for stage firmware.type (QOS)*/
+ err = ia_css_bufq_enqueue_psys_event(
+ (uint8_t)IA_CSS_PSYS_SW_EVENT_STAGE_ENABLE_DISABLE,
+ (uint8_t)thread_id,
+ (uint8_t)stage->stage_num,
+ enable ? 1 : 0);
+ if (err == IA_CSS_SUCCESS) {
+ if (enable)
+ SH_CSS_QOS_STAGE_ENABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+ else
+ SH_CSS_QOS_STAGE_DISABLE(&sh_css_sp_group.pipe[thread_id], stage->stage_num);
+ }
}
}
+ IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, enable);
+ return err;
}
- IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, enable);
- return err;
-}
-/* @brief Get the state (Enable or Disable) of the Extension stage in the
- * given pipe.
- */
-enum ia_css_err
-ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool *enable)
-{
- struct ia_css_pipeline_stage *stage;
- unsigned int thread_id;
- enum ia_css_err err = IA_CSS_SUCCESS;
+ /* @brief Get the state (Enable or Disable) of the Extension stage in the
+ * given pipe.
+ */
+ enum ia_css_err
+ ia_css_pipe_get_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle,
+ bool *enable) {
+ struct ia_css_pipeline_stage *stage;
+ unsigned int thread_id;
+ enum ia_css_err err = IA_CSS_SUCCESS;
- IA_CSS_ENTER("");
+ IA_CSS_ENTER("");
- /* Parameter Check */
- if (!pipe || !pipe->stream) {
- IA_CSS_ERROR("Invalid Pipe.");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!(pipe->config.acc_extension)) {
- IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!sh_css_sp_is_running()) {
- IA_CSS_ERROR("Leaving: queue unavailable.");
- err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
- } else {
- /* Query the threadid and stage_num corresponding to the Extension firmware*/
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
+ /* Parameter Check */
+ if (!pipe || !pipe->stream)
+ {
+ IA_CSS_ERROR("Invalid Pipe.");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!(pipe->config.acc_extension))
+ {
+ IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!sh_css_sp_is_running())
+ {
+ IA_CSS_ERROR("Leaving: queue unavailable.");
+ err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ } else
+ {
+ /* Query the threadid and stage_num corresponding to the Extension firmware*/
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
- if (err == IA_CSS_SUCCESS) {
- /* Get the Extension State */
- *enable = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id], stage->stage_num)) ? true : false;
+ if (err == IA_CSS_SUCCESS) {
+ /* Get the Extension State */
+ *enable = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id],
+ stage->stage_num)) ? true : false;
+ }
}
+ IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, *enable);
+ return err;
}
- IA_CSS_LEAVE("err:%d handle:%u enable:%d", err, fw_handle, *enable);
- return err;
-}
#ifdef ISP2401
-enum ia_css_err
-ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_handle,
- struct ia_css_isp_param_css_segments *css_seg, struct ia_css_isp_param_isp_segments *isp_seg)
-{
- unsigned int HIVE_ADDR_sp_group;
- static struct sh_css_sp_group sp_group;
- static struct sh_css_sp_stage sp_stage;
- static struct sh_css_isp_stage isp_stage;
- const struct ia_css_fw_info *fw;
- unsigned int thread_id;
- struct ia_css_pipeline_stage *stage;
- enum ia_css_err err = IA_CSS_SUCCESS;
- int stage_num = 0;
- enum ia_css_isp_memories mem;
- bool enabled;
+ enum ia_css_err
+ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe,
+ uint32_t fw_handle,
+ struct ia_css_isp_param_css_segments *css_seg,
+ struct ia_css_isp_param_isp_segments *isp_seg) {
+ unsigned int HIVE_ADDR_sp_group;
+ static struct sh_css_sp_group sp_group;
+ static struct sh_css_sp_stage sp_stage;
+ static struct sh_css_isp_stage isp_stage;
+ const struct ia_css_fw_info *fw;
+ unsigned int thread_id;
+ struct ia_css_pipeline_stage *stage;
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ int stage_num = 0;
+ enum ia_css_isp_memories mem;
+ bool enabled;
- IA_CSS_ENTER("");
+ IA_CSS_ENTER("");
- fw = &sh_css_sp_fw;
+ fw = &sh_css_sp_fw;
- /* Parameter Check */
- if (!pipe || !pipe->stream) {
- IA_CSS_ERROR("Invalid Pipe.");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!(pipe->config.acc_extension)) {
- IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- } else if (!sh_css_sp_is_running()) {
- IA_CSS_ERROR("Leaving: queue unavailable.");
- err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
- } else {
- /* Query the thread_id and stage_num corresponding to the Extension firmware */
- ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
- err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
- if (err == IA_CSS_SUCCESS) {
- /* Get the Extension State */
- enabled = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id], stage->stage_num)) ? true : false;
- /* Update mapped arg only when extension stage is not enabled */
- if (enabled) {
- IA_CSS_ERROR("Leaving: cannot update when stage is enabled.");
- err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
- } else {
- stage_num = stage->stage_num;
-
- HIVE_ADDR_sp_group = fw->info.sp.group;
- sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(sp_group),
- &sp_group, sizeof(struct sh_css_sp_group));
- mmgr_load(sp_group.pipe[thread_id].sp_stage_addr[stage_num],
- &sp_stage, sizeof(struct sh_css_sp_stage));
-
- mmgr_load(sp_stage.isp_stage_addr,
- &isp_stage, sizeof(struct sh_css_isp_stage));
-
- for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
- isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
- css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
- isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
- css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
- isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
- isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
- isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
- isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
- }
+ /* Parameter Check */
+ if (!pipe || !pipe->stream)
+ {
+ IA_CSS_ERROR("Invalid Pipe.");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!(pipe->config.acc_extension))
+ {
+ IA_CSS_ERROR("Invalid Pipe (No Extension Firmware).");
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ } else if (!sh_css_sp_is_running())
+ {
+ IA_CSS_ERROR("Leaving: queue unavailable.");
+ err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ } else
+ {
+ /* Query the thread_id and stage_num corresponding to the Extension firmware */
+ ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &thread_id);
+ err = ia_css_pipeline_get_stage_from_fw(&pipe->pipeline, fw_handle, &stage);
+ if (err == IA_CSS_SUCCESS) {
+ /* Get the Extension State */
+ enabled = (SH_CSS_QOS_STAGE_IS_ENABLED(&sh_css_sp_group.pipe[thread_id],
+ stage->stage_num)) ? true : false;
+ /* Update mapped arg only when extension stage is not enabled */
+ if (enabled) {
+ IA_CSS_ERROR("Leaving: cannot update when stage is enabled.");
+ err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
+ } else {
+ stage_num = stage->stage_num;
+
+ HIVE_ADDR_sp_group = fw->info.sp.group;
+ sp_dmem_load(SP0_ID,
+ (unsigned int)sp_address_of(sp_group),
+ &sp_group, sizeof(struct sh_css_sp_group));
+ mmgr_load(sp_group.pipe[thread_id].sp_stage_addr[stage_num],
+ &sp_stage, sizeof(struct sh_css_sp_stage));
+
+ mmgr_load(sp_stage.isp_stage_addr,
+ &isp_stage, sizeof(struct sh_css_isp_stage));
+
+ for (mem = 0; mem < N_IA_CSS_ISP_MEMORIES; mem++) {
+ isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address =
+ css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
+ isp_stage.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size =
+ css_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
+ isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].address
+ =
+ isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].address;
+ isp_stage.binary_info.mem_initializers.params[IA_CSS_PARAM_CLASS_PARAM][mem].size
+ =
+ isp_seg->params[IA_CSS_PARAM_CLASS_PARAM][mem].size;
+ }
- mmgr_store(sp_stage.isp_stage_addr,
- &isp_stage, sizeof(struct sh_css_isp_stage));
+ mmgr_store(sp_stage.isp_stage_addr,
+ &isp_stage, sizeof(struct sh_css_isp_stage));
+ }
}
}
+ IA_CSS_LEAVE("err:%d handle:%u", err, fw_handle);
+ return err;
}
- IA_CSS_LEAVE("err:%d handle:%u", err, fw_handle);
- return err;
-}
#ifdef USE_INPUT_SYSTEM_VERSION_2401
-static enum ia_css_err
-aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
- struct ia_css_pipe *pipes[],
- bool *do_crop_status)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
- int i;
- struct ia_css_pipe *curr_pipe;
- u32 pipe_mask = 0;
+ static enum ia_css_err
+ aspect_ratio_crop_init(struct ia_css_stream *curr_stream,
+ struct ia_css_pipe *pipes[],
+ bool *do_crop_status) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ int i;
+ struct ia_css_pipe *curr_pipe;
+ u32 pipe_mask = 0;
- if ((!curr_stream) ||
- (curr_stream->num_pipes == 0) ||
- (!pipes) ||
- (!do_crop_status)) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ if ((!curr_stream) ||
+ (curr_stream->num_pipes == 0) ||
+ (!pipes) ||
+ (!do_crop_status))
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
- for (i = 0; i < curr_stream->num_pipes; i++) {
- curr_pipe = pipes[i];
- pipe_mask |= (1 << curr_pipe->config.mode);
- }
+ for (i = 0; i < curr_stream->num_pipes; i++)
+ {
+ curr_pipe = pipes[i];
+ pipe_mask |= (1 << curr_pipe->config.mode);
+ }
- *do_crop_status =
+ *do_crop_status =
(((pipe_mask & (1 << IA_CSS_PIPE_MODE_PREVIEW)) ||
(pipe_mask & (1 << IA_CSS_PIPE_MODE_VIDEO))) &&
- (pipe_mask & (1 << IA_CSS_PIPE_MODE_CAPTURE)) &&
- curr_stream->config.continuous);
- return IA_CSS_SUCCESS;
-}
+ (pipe_mask & (1 << IA_CSS_PIPE_MODE_CAPTURE)) &&
+ curr_stream->config.continuous);
+ return IA_CSS_SUCCESS;
+ }
-static bool
-aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe)
-{
- bool status = false;
+ static bool
+ aspect_ratio_crop_check(bool enabled, struct ia_css_pipe *curr_pipe) {
+ bool status = false;
+
+ if ((curr_pipe) && enabled) {
+ if ((curr_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) ||
+ (curr_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) ||
+ (curr_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE))
+ status = true;
+ }
- if ((curr_pipe) && enabled) {
- if ((curr_pipe->config.mode == IA_CSS_PIPE_MODE_PREVIEW) ||
- (curr_pipe->config.mode == IA_CSS_PIPE_MODE_VIDEO) ||
- (curr_pipe->config.mode == IA_CSS_PIPE_MODE_CAPTURE))
- status = true;
+ return status;
}
- return status;
-}
+ static enum ia_css_err
+ aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
+ struct ia_css_resolution *effective_res) {
+ enum ia_css_err err = IA_CSS_SUCCESS;
+ struct ia_css_resolution crop_res;
+ struct ia_css_resolution *in_res = NULL;
+ struct ia_css_resolution *out_res = NULL;
+ bool use_bds_output_info = false;
+ bool use_vf_pp_in_res = false;
+ bool use_capt_pp_in_res = false;
-static enum ia_css_err
-aspect_ratio_crop(struct ia_css_pipe *curr_pipe,
- struct ia_css_resolution *effective_res)
-{
- enum ia_css_err err = IA_CSS_SUCCESS;
- struct ia_css_resolution crop_res;
- struct ia_css_resolution *in_res = NULL;
- struct ia_css_resolution *out_res = NULL;
- bool use_bds_output_info = false;
- bool use_vf_pp_in_res = false;
- bool use_capt_pp_in_res = false;
-
- if ((!curr_pipe) ||
- (!effective_res)) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ if ((!curr_pipe) ||
+ (!effective_res))
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
- if ((curr_pipe->config.mode != IA_CSS_PIPE_MODE_PREVIEW) &&
- (curr_pipe->config.mode != IA_CSS_PIPE_MODE_VIDEO) &&
- (curr_pipe->config.mode != IA_CSS_PIPE_MODE_CAPTURE)) {
- err = IA_CSS_ERR_INVALID_ARGUMENTS;
- IA_CSS_LEAVE_ERR(err);
- return err;
- }
+ if ((curr_pipe->config.mode != IA_CSS_PIPE_MODE_PREVIEW) &&
+ (curr_pipe->config.mode != IA_CSS_PIPE_MODE_VIDEO) &&
+ (curr_pipe->config.mode != IA_CSS_PIPE_MODE_CAPTURE))
+ {
+ err = IA_CSS_ERR_INVALID_ARGUMENTS;
+ IA_CSS_LEAVE_ERR(err);
+ return err;
+ }
- use_bds_output_info =
+ use_bds_output_info =
((curr_pipe->bds_output_info.res.width != 0) &&
(curr_pipe->bds_output_info.res.height != 0));
- use_vf_pp_in_res =
+ use_vf_pp_in_res =
((curr_pipe->config.vf_pp_in_res.width != 0) &&
(curr_pipe->config.vf_pp_in_res.height != 0));
- use_capt_pp_in_res =
+ use_capt_pp_in_res =
((curr_pipe->config.capt_pp_in_res.width != 0) &&
(curr_pipe->config.capt_pp_in_res.height != 0));
- in_res = &curr_pipe->stream->config.input_config.effective_res;
- out_res = &curr_pipe->output_info[0].res;
+ in_res = &curr_pipe->stream->config.input_config.effective_res;
+ out_res = &curr_pipe->output_info[0].res;
- switch (curr_pipe->config.mode) {
- case IA_CSS_PIPE_MODE_PREVIEW:
- if (use_bds_output_info)
- out_res = &curr_pipe->bds_output_info.res;
- else if (use_vf_pp_in_res)
- out_res = &curr_pipe->config.vf_pp_in_res;
- break;
- case IA_CSS_PIPE_MODE_VIDEO:
- if (use_bds_output_info)
- out_res = &curr_pipe->bds_output_info.res;
- break;
- case IA_CSS_PIPE_MODE_CAPTURE:
- if (use_capt_pp_in_res)
- out_res = &curr_pipe->config.capt_pp_in_res;
- break;
- case IA_CSS_PIPE_MODE_ACC:
- case IA_CSS_PIPE_MODE_COPY:
- case IA_CSS_PIPE_MODE_YUVPP:
- default:
- IA_CSS_ERROR("aspect ratio cropping invalid args: mode[%d]\n",
- curr_pipe->config.mode);
- assert(0);
- break;
- }
+ switch (curr_pipe->config.mode)
+ {
+ case IA_CSS_PIPE_MODE_PREVIEW:
+ if (use_bds_output_info)
+ out_res = &curr_pipe->bds_output_info.res;
+ else if (use_vf_pp_in_res)
+ out_res = &curr_pipe->config.vf_pp_in_res;
+ break;
+ case IA_CSS_PIPE_MODE_VIDEO:
+ if (use_bds_output_info)
+ out_res = &curr_pipe->bds_output_info.res;
+ break;
+ case IA_CSS_PIPE_MODE_CAPTURE:
+ if (use_capt_pp_in_res)
+ out_res = &curr_pipe->config.capt_pp_in_res;
+ break;
+ case IA_CSS_PIPE_MODE_ACC:
+ case IA_CSS_PIPE_MODE_COPY:
+ case IA_CSS_PIPE_MODE_YUVPP:
+ default:
+ IA_CSS_ERROR("aspect ratio cropping invalid args: mode[%d]\n",
+ curr_pipe->config.mode);
+ assert(0);
+ break;
+ }
- err = ia_css_frame_find_crop_resolution(in_res, out_res, &crop_res);
- if (err == IA_CSS_SUCCESS) {
- *effective_res = crop_res;
- } else {
- /* in case of error fallback to default
- * effective resolution from driver. */
- IA_CSS_LOG("ia_css_frame_find_crop_resolution() failed with err(%d)", err);
+ err = ia_css_frame_find_crop_resolution(in_res, out_res, &crop_res);
+ if (err == IA_CSS_SUCCESS)
+ {
+ *effective_res = crop_res;
+ } else
+ {
+ /* in case of error fallback to default
+ * effective resolution from driver. */
+ IA_CSS_LOG("ia_css_frame_find_crop_resolution() failed with err(%d)", err);
+ }
+ return err;
}
- return err;
-}
#endif
#endif
-static void
-sh_css_hmm_buffer_record_init(void)
-{
- int i;
+ static void
+ sh_css_hmm_buffer_record_init(void) {
+ int i;
#ifndef ISP2401
- for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
- sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
-#else
- if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
- }
+#else
+ if (ia_css_is_system_mode_suspend_or_resume() ==
+ false) { /* skip in suspend/resume flow */
+ for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+ sh_css_hmm_buffer_record_reset(&hmm_buffer_record[i]);
+ }
#endif
+ }
}
-}
-static void
-sh_css_hmm_buffer_record_uninit(void)
-{
- int i;
- struct sh_css_hmm_buffer_record *buffer_record = NULL;
+ static void
+ sh_css_hmm_buffer_record_uninit(void) {
+ int i;
+ struct sh_css_hmm_buffer_record *buffer_record = NULL;
#ifndef ISP2401
- buffer_record = &hmm_buffer_record[0];
- for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
- if (buffer_record->in_use) {
- if (buffer_record->h_vbuf)
- ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
- sh_css_hmm_buffer_record_reset(buffer_record);
-#else
- if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
buffer_record = &hmm_buffer_record[0];
for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
if (buffer_record->in_use) {
if (buffer_record->h_vbuf)
ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
sh_css_hmm_buffer_record_reset(buffer_record);
+#else
+ if (ia_css_is_system_mode_suspend_or_resume() ==
+ false) { /* skip in suspend/resume flow */
+ buffer_record = &hmm_buffer_record[0];
+ for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+ if (buffer_record->in_use) {
+ if (buffer_record->h_vbuf)
+ ia_css_rmgr_rel_vbuf(hmm_buffer_pool, &buffer_record->h_vbuf);
+ sh_css_hmm_buffer_record_reset(buffer_record);
+ }
+ buffer_record++;
+#endif
}
+#ifndef ISP2401
buffer_record++;
#endif
}
-#ifndef ISP2401
- buffer_record++;
-#endif
}
-}
-static void
-sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record)
-{
- assert(buffer_record);
- buffer_record->in_use = false;
- buffer_record->type = IA_CSS_BUFFER_TYPE_INVALID;
- buffer_record->h_vbuf = NULL;
- buffer_record->kernel_ptr = 0;
-}
+ static void
+ sh_css_hmm_buffer_record_reset(struct sh_css_hmm_buffer_record *buffer_record) {
+ assert(buffer_record);
+ buffer_record->in_use = false;
+ buffer_record->type = IA_CSS_BUFFER_TYPE_INVALID;
+ buffer_record->h_vbuf = NULL;
+ buffer_record->kernel_ptr = 0;
+ }
-static struct sh_css_hmm_buffer_record
-*sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
- enum ia_css_buffer_type type,
- hrt_address kernel_ptr)
-{
- int i;
- struct sh_css_hmm_buffer_record *buffer_record = NULL;
- struct sh_css_hmm_buffer_record *out_buffer_record = NULL;
+ static struct sh_css_hmm_buffer_record
+ *sh_css_hmm_buffer_record_acquire(struct ia_css_rmgr_vbuf_handle *h_vbuf,
+ enum ia_css_buffer_type type,
+ hrt_address kernel_ptr) {
+ int i;
+ struct sh_css_hmm_buffer_record *buffer_record = NULL;
+ struct sh_css_hmm_buffer_record *out_buffer_record = NULL;
- assert(h_vbuf);
- assert((type > IA_CSS_BUFFER_TYPE_INVALID) && (type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE));
- assert(kernel_ptr != 0);
-
- buffer_record = &hmm_buffer_record[0];
- for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
- if (!buffer_record->in_use) {
- buffer_record->in_use = true;
- buffer_record->type = type;
- buffer_record->h_vbuf = h_vbuf;
- buffer_record->kernel_ptr = kernel_ptr;
- out_buffer_record = buffer_record;
- break;
+ assert(h_vbuf);
+ assert((type > IA_CSS_BUFFER_TYPE_INVALID) &&
+ (type < IA_CSS_NUM_DYNAMIC_BUFFER_TYPE));
+ assert(kernel_ptr != 0);
+
+ buffer_record = &hmm_buffer_record[0];
+ for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+ if (!buffer_record->in_use) {
+ buffer_record->in_use = true;
+ buffer_record->type = type;
+ buffer_record->h_vbuf = h_vbuf;
+ buffer_record->kernel_ptr = kernel_ptr;
+ out_buffer_record = buffer_record;
+ break;
+ }
+ buffer_record++;
}
- buffer_record++;
+
+ return out_buffer_record;
}
- return out_buffer_record;
-}
+ static struct sh_css_hmm_buffer_record
+ *sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
+ enum ia_css_buffer_type type) {
+ int i;
+ struct sh_css_hmm_buffer_record *buffer_record = NULL;
+ bool found_record = false;
-static struct sh_css_hmm_buffer_record
-*sh_css_hmm_buffer_record_validate(hrt_vaddress ddr_buffer_addr,
- enum ia_css_buffer_type type)
-{
- int i;
- struct sh_css_hmm_buffer_record *buffer_record = NULL;
- bool found_record = false;
-
- buffer_record = &hmm_buffer_record[0];
- for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
- if ((buffer_record->in_use) &&
- (buffer_record->type == type) &&
- (buffer_record->h_vbuf) &&
- (buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
- found_record = true;
- break;
+ buffer_record = &hmm_buffer_record[0];
+ for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
+ if ((buffer_record->in_use) &&
+ (buffer_record->type == type) &&
+ (buffer_record->h_vbuf) &&
+ (buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
+ found_record = true;
+ break;
+ }
+ buffer_record++;
}
- buffer_record++;
- }
- if (found_record)
- return buffer_record;
- else
- return NULL;
-}
+ if (found_record)
+ return buffer_record;
+ else
+ return NULL;
+ }
#define SH_CSS_BDS_FACTOR_5_00 (9)
#define SH_CSS_BDS_FACTOR_6_00 (10)
#define SH_CSS_BDS_FACTOR_8_00 (11)
-#define NUM_BDS_FACTORS (12)
+#define NUM_BDS_FACTORS (12)
#define PACK_BDS_FACTOR(factor) (1 << (factor))
* which will be replaced with the actual RELEASE_VERSION
* during package generation. Please do not modify */
#ifndef ISP2401
-static const char *release_version = STR(irci_stable_candrpv_0415_20150521_0458);
+static const char *release_version = STR(
+ irci_stable_candrpv_0415_20150521_0458);
#else
static const char *release_version = STR(irci_ecr - master_20150911_0724);
#endif
/* Setup sp/sp1 binary */
static enum ia_css_err
-setup_binary(struct ia_css_fw_info *fw, const char *fw_data, struct ia_css_fw_info *sh_css_fw, unsigned int binary_id)
-{
+setup_binary(struct ia_css_fw_info *fw, const char *fw_data,
+ struct ia_css_fw_info *sh_css_fw, unsigned int binary_id) {
const char *blob_data;
if ((!fw) || (!fw_data))
}
enum ia_css_err
-sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia_css_blob_descr *bd, unsigned int index)
-{
+sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
+ struct ia_css_blob_descr *bd,
+ unsigned int index) {
const char *name;
const unsigned char *blob;
blob = (const unsigned char *)fw + bi->blob.offset;
/* sanity check */
- if (bi->blob.size != bi->blob.text_size + bi->blob.icache_size + bi->blob.data_size + bi->blob.padding_size) {
+ if (bi->blob.size != bi->blob.text_size + bi->blob.icache_size + bi->blob.data_size + bi->blob.padding_size)
+ {
/* sanity check, note the padding bytes added for section to DDR alignment */
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
bd->blob = blob;
bd->header = *bi;
- if (bi->type == ia_css_isp_firmware || bi->type == ia_css_sp_firmware) {
+ if (bi->type == ia_css_isp_firmware || bi->type == ia_css_sp_firmware)
+ {
char *namebuffer;
namebuffer = kstrdup(name, GFP_KERNEL);
if (!namebuffer)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
bd->name = fw_minibuffer[index].name = namebuffer;
- } else {
+ } else
+ {
bd->name = name;
}
- if (bi->type == ia_css_isp_firmware) {
+ if (bi->type == ia_css_isp_firmware)
+ {
size_t paramstruct_size = sizeof(struct ia_css_memory_offsets);
size_t configstruct_size = sizeof(struct ia_css_config_memory_offsets);
size_t statestruct_size = sizeof(struct ia_css_state_memory_offsets);
- char *parambuf = kmalloc(paramstruct_size + configstruct_size + statestruct_size,
+ char *parambuf = kmalloc(paramstruct_size + configstruct_size +
+ statestruct_size,
GFP_KERNEL);
if (!parambuf)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
fw_minibuffer[index].buffer = parambuf;
/* copy ia_css_memory_offsets */
- memcpy(parambuf, (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_PARAM]),
- paramstruct_size);
+ memcpy(parambuf, (void *)(fw +
+ bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_PARAM]),
+ paramstruct_size);
bd->mem_offsets.array[IA_CSS_PARAM_CLASS_PARAM].ptr = parambuf;
/* copy ia_css_config_memory_offsets */
memcpy(parambuf + paramstruct_size,
- (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_CONFIG]),
- configstruct_size);
- bd->mem_offsets.array[IA_CSS_PARAM_CLASS_CONFIG].ptr = parambuf + paramstruct_size;
+ (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_CONFIG]),
+ configstruct_size);
+ bd->mem_offsets.array[IA_CSS_PARAM_CLASS_CONFIG].ptr = parambuf +
+ paramstruct_size;
/* copy ia_css_state_memory_offsets */
memcpy(parambuf + paramstruct_size + configstruct_size,
- (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_STATE]),
- statestruct_size);
- bd->mem_offsets.array[IA_CSS_PARAM_CLASS_STATE].ptr = parambuf + paramstruct_size + configstruct_size;
+ (void *)(fw + bi->blob.memory_offsets.offsets[IA_CSS_PARAM_CLASS_STATE]),
+ statestruct_size);
+ bd->mem_offsets.array[IA_CSS_PARAM_CLASS_STATE].ptr = parambuf +
+ paramstruct_size + configstruct_size;
}
return IA_CSS_SUCCESS;
}
enum ia_css_err
sh_css_load_firmware(const char *fw_data,
- unsigned int fw_size)
-{
+ unsigned int fw_size) {
unsigned int i;
struct ia_css_fw_info *binaries;
struct sh_css_fw_bi_file_h *file_header;
binaries = &firmware_header->binary_header;
strncpy(FW_rel_ver_name, file_header->version, min(sizeof(FW_rel_ver_name), sizeof(file_header->version)) - 1);
valid_firmware = sh_css_check_firmware_version(fw_data);
- if (!valid_firmware) {
+ if (!valid_firmware)
+ {
#if !defined(HRT_RTL)
IA_CSS_ERROR("CSS code version (%s) and firmware version (%s) mismatch!",
- file_header->version, release_version);
+ file_header->version, release_version);
return IA_CSS_ERR_VERSION_MISMATCH;
#endif
- } else {
+ } else
+ {
IA_CSS_LOG("successfully load firmware version %s", release_version);
}
sh_css_num_binaries = file_header->binary_nr;
/* Only allocate memory for ISP blob info */
- if (sh_css_num_binaries > NUM_OF_SPS) {
+ if (sh_css_num_binaries > NUM_OF_SPS)
+ {
sh_css_blob_info = kmalloc(
- (sh_css_num_binaries - NUM_OF_SPS) *
- sizeof(*sh_css_blob_info), GFP_KERNEL);
+ (sh_css_num_binaries - NUM_OF_SPS) *
+ sizeof(*sh_css_blob_info), GFP_KERNEL);
if (!sh_css_blob_info)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- } else {
+ } else
+ {
sh_css_blob_info = NULL;
}
if (!fw_minibuffer)
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- for (i = 0; i < sh_css_num_binaries; i++) {
+ for (i = 0; i < sh_css_num_binaries; i++)
+ {
struct ia_css_fw_info *bi = &binaries[i];
/* note: the var below is made static as it is quite large;
if it is not static it ends up on the stack which could
hrt_vaddress sh_css_load_blob(const unsigned char *blob, unsigned int size);
enum ia_css_err
-sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia_css_blob_descr *bd, unsigned int i);
+sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi,
+ struct ia_css_blob_descr *bd, unsigned int i);
#endif /* _SH_CSS_FIRMWARE_H_ */
* (e.g. frame_done)
*/
while (!sp_ctrl_getbit(SP0_ID, SP_SC_REG, SP_IDLE_BIT) &&
- ((irq_reg_load(IRQ0_ID,
- _HRT_IRQ_CONTROLLER_STATUS_REG_IDX) &
- (1U << (irq_id + IRQ_SW_CHANNEL_OFFSET))) == 0)) {
+ ((irq_reg_load(IRQ0_ID,
+ _HRT_IRQ_CONTROLLER_STATUS_REG_IDX) &
+ (1U << (irq_id + IRQ_SW_CHANNEL_OFFSET))) == 0)) {
hrt_sleep();
}
#define SH_CSS_ENABLE_METADATA_THREAD
#endif
- /*
- * SH_CSS_MAX_SP_THREADS:
- * sp threads visible to host with connected communication queues
- * these threads are capable of running an image pipe
- * SH_CSS_MAX_SP_INTERNAL_THREADS:
- * internal sp service threads, no communication queues to host
- * these threads can't be used as image pipe
- */
+/*
+ * SH_CSS_MAX_SP_THREADS:
+ * sp threads visible to host with connected communication queues
+ * these threads are capable of running an image pipe
+ * SH_CSS_MAX_SP_INTERNAL_THREADS:
+ * internal sp service threads, no communication queues to host
+ * these threads can't be used as image pipe
+ */
#if defined(SH_CSS_ENABLE_METADATA_THREAD)
#define SH_CSS_SP_INTERNAL_METADATA_THREAD 1
#define SH_CSS_SP_INTERNAL_SERVICE_THREAD 1
#ifdef __DISABLE_UNUSED_THREAD__
- #define SH_CSS_MAX_SP_THREADS 0
+#define SH_CSS_MAX_SP_THREADS 0
#else
- #define SH_CSS_MAX_SP_THREADS 5
+#define SH_CSS_MAX_SP_THREADS 5
#endif
#define SH_CSS_MAX_SP_INTERNAL_THREADS (\
ISP_FIRMWARE
};
- /*
- * JB: keep next enum in sync with thread id's
- * and pipe id's
- */
+/*
+* JB: keep next enum in sync with thread id's
+* and pipe id's
+*/
enum sh_css_pipe_config_override {
SH_CSS_PIPE_CONFIG_OVRD_NONE = 0,
SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD = 0xffff
};
struct ia_css_isp_parameter_set_info {
- struct sh_css_ddr_address_map mem_map;/** pointers to Parameters in ISP format IMPT:
+ struct sh_css_ddr_address_map
+ mem_map;/** pointers to Parameters in ISP format IMPT:
This should be first member of this struct */
- u32 isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
- ia_css_ptr output_frame_ptr;/** Output frame to which this config has to be applied (optional) */
+ u32
+ isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */
+ ia_css_ptr
+ output_frame_ptr;/** Output frame to which this config has to be applied (optional) */
};
/* this struct contains all arguments that can be passed to
a binary. It depends on the binary which ones are used. */
struct sh_css_binary_args {
struct ia_css_frame *in_frame; /* input frame */
- struct ia_css_frame *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES]; /* reference input frame */
+ struct ia_css_frame
+ *delay_frames[MAX_NUM_VIDEO_DELAY_FRAMES]; /* reference input frame */
#ifndef ISP2401
struct ia_css_frame *tnr_frames[NUM_VIDEO_TNR_FRAMES]; /* tnr frames */
#else
struct ia_css_frame *tnr_frames[NUM_TNR_FRAMES]; /* tnr frames */
#endif
- struct ia_css_frame *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS]; /* output frame */
+ struct ia_css_frame
+ *out_frame[IA_CSS_BINARY_MAX_OUTPUT_PORTS]; /* output frame */
struct ia_css_frame *out_vf_frame; /* viewfinder output frame */
bool copy_vf;
bool copy_output;
u8 a_changed;
u8 b_changed;
u8 isp_2ppc;
- struct sh_css_sp_input_formatter_set set[SH_CSS_MAX_IF_CONFIGS]; /* CSI-2 port is used as index. */
+ struct sh_css_sp_input_formatter_set
+ set[SH_CSS_MAX_IF_CONFIGS]; /* CSI-2 port is used as index. */
} input_formatter;
#endif
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
struct sh_css_sp_pipeline_terminal {
union {
/* Input System 2401 */
- virtual_input_system_stream_t virtual_input_system_stream[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+ virtual_input_system_stream_t
+ virtual_input_system_stream[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
} context;
/*
* TODO
*/
union {
/* Input System 2401 */
- virtual_input_system_stream_cfg_t virtual_input_system_stream_cfg[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
+ virtual_input_system_stream_cfg_t
+ virtual_input_system_stream_cfg[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
} ctrl;
};
* This function frees an array of metadata buffers.
*/
void
-ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bufs);
+ia_css_metadata_free_multiple(unsigned int num_bufs,
+ struct ia_css_metadata **bufs);
/* Macro for handling pipe_qos_config */
#define QOS_INVALID (~0U)
u8 isp_deci_log_factor;
u8 isp_vf_downscale_bits;
u8 deinterleaved;
-/*
- * NOTE: Programming the input circuit can only be done at the
- * start of a session. It is illegal to program it during execution
- * The input circuit defines the connectivity
- */
+ /*
+ * NOTE: Programming the input circuit can only be done at the
+ * start of a session. It is illegal to program it during execution
+ * The input circuit defines the connectivity
+ */
u8 program_input_circuit;
-/* enum ia_css_pipeline_stage_sp_func func; */
+ /* enum ia_css_pipeline_stage_sp_func func; */
u8 func;
/* The type of the pipe-stage */
/* enum sh_css_stage_type stage_type; */
CSS_ALIGN(u64 cookie_ptr, 8); /* TODO: check if this alignment is needed */
u64 kernel_ptr;
#else
- CSS_ALIGN(struct { u32 a[2]; } cookie_ptr, 8); /* TODO: check if this alignment is needed */
- struct { u32 a[2]; } kernel_ptr;
+ CSS_ALIGN(struct { u32 a[2]; } cookie_ptr,
+ 8); /* TODO: check if this alignment is needed */
+ struct {
+ u32 a[2];
+ } kernel_ptr;
#endif
struct ia_css_time_meas timing_data;
clock_value_t isys_eof_clock_tick;
* buffer and the "vf_out_frame" buffer.
*/
ia_css_circbuf_desc_t host2sp_buffer_queues_desc
- [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES];
ia_css_circbuf_elem_t host2sp_buffer_queues_elems
- [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES]
- [IA_CSS_NUM_ELEMS_HOST2SP_BUFFER_QUEUE];
+ [SH_CSS_MAX_SP_THREADS][SH_CSS_MAX_NUM_QUEUES]
+ [IA_CSS_NUM_ELEMS_HOST2SP_BUFFER_QUEUE];
ia_css_circbuf_desc_t sp2host_buffer_queues_desc
- [SH_CSS_MAX_NUM_QUEUES];
+ [SH_CSS_MAX_NUM_QUEUES];
ia_css_circbuf_elem_t sp2host_buffer_queues_elems
- [SH_CSS_MAX_NUM_QUEUES][IA_CSS_NUM_ELEMS_SP2HOST_BUFFER_QUEUE];
+ [SH_CSS_MAX_NUM_QUEUES][IA_CSS_NUM_ELEMS_SP2HOST_BUFFER_QUEUE];
/*
* The queues for the events.
ia_css_circbuf_desc_t host2sp_psys_event_queue_desc;
ia_css_circbuf_elem_t host2sp_psys_event_queue_elems
- [IA_CSS_NUM_ELEMS_HOST2SP_PSYS_EVENT_QUEUE];
+ [IA_CSS_NUM_ELEMS_HOST2SP_PSYS_EVENT_QUEUE];
ia_css_circbuf_desc_t sp2host_psys_event_queue_desc;
ia_css_circbuf_elem_t sp2host_psys_event_queue_elems
- [IA_CSS_NUM_ELEMS_SP2HOST_PSYS_EVENT_QUEUE];
+ [IA_CSS_NUM_ELEMS_SP2HOST_PSYS_EVENT_QUEUE];
#if !defined(HAS_NO_INPUT_SYSTEM)
/*
ia_css_circbuf_desc_t host2sp_isys_event_queue_desc;
ia_css_circbuf_elem_t host2sp_isys_event_queue_elems
- [IA_CSS_NUM_ELEMS_HOST2SP_ISYS_EVENT_QUEUE];
+ [IA_CSS_NUM_ELEMS_HOST2SP_ISYS_EVENT_QUEUE];
ia_css_circbuf_desc_t sp2host_isys_event_queue_desc;
ia_css_circbuf_elem_t sp2host_isys_event_queue_elems
- [IA_CSS_NUM_ELEMS_SP2HOST_ISYS_EVENT_QUEUE];
+ [IA_CSS_NUM_ELEMS_SP2HOST_ISYS_EVENT_QUEUE];
/*
* The queue for the tagger commands.
* CHECK: are these last two present on the 2401 ?
ia_css_circbuf_desc_t host2sp_tag_cmd_queue_desc;
ia_css_circbuf_elem_t host2sp_tag_cmd_queue_elems
- [IA_CSS_NUM_ELEMS_HOST2SP_TAG_CMD_QUEUE];
+ [IA_CSS_NUM_ELEMS_HOST2SP_TAG_CMD_QUEUE];
#endif
};
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
unsigned int
-sh_css_get_mipi_sizes_for_check(const unsigned int port, const unsigned int idx);
+sh_css_get_mipi_sizes_for_check(const unsigned int port,
+ const unsigned int idx);
#endif
void
sh_css_update_uds_and_crop_info(
- const struct ia_css_binary_info *info,
- const struct ia_css_frame_info *in_frame_info,
- const struct ia_css_frame_info *out_frame_info,
- const struct ia_css_resolution *dvs_env,
- const struct ia_css_dz_config *zoom,
- const struct ia_css_vector *motion_vector,
- struct sh_css_uds_info *uds, /* out */
- struct sh_css_crop_pos *sp_out_crop_pos, /* out */
-
- bool enable_zoom
- );
+ const struct ia_css_binary_info *info,
+ const struct ia_css_frame_info *in_frame_info,
+ const struct ia_css_frame_info *out_frame_info,
+ const struct ia_css_resolution *dvs_env,
+ const struct ia_css_dz_config *zoom,
+ const struct ia_css_vector *motion_vector,
+ struct sh_css_uds_info *uds, /* out */
+ struct sh_css_crop_pos *sp_out_crop_pos, /* out */
+
+ bool enable_zoom
+);
void
sh_css_invalidate_shading_tables(struct ia_css_stream *stream);
#ifdef USE_INPUT_SYSTEM_VERSION_2401
void
ia_css_get_crop_offsets(
- struct ia_css_pipe *pipe,
- struct ia_css_frame_info *in_frame);
+ struct ia_css_pipe *pipe,
+ struct ia_css_frame_info *in_frame);
#endif
#endif /* !defined(__ISP) */
struct ia_css_pipe **pipe);
void
-ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config *extra_config);
+ia_css_pipe_extra_config_defaults(struct ia_css_pipe_extra_config
+ *extra_config);
enum ia_css_err
ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe,
/* DEPRECATED. FPN is not supported. */
enum ia_css_err
sh_css_set_black_frame(struct ia_css_stream *stream,
- const struct ia_css_frame *raw_black_frame);
+ const struct ia_css_frame *raw_black_frame);
#ifndef ISP2401
void
static void
insert_binary_metrics(struct sh_css_binary_metrics **l,
- struct sh_css_binary_metrics *metrics)
+ struct sh_css_binary_metrics *metrics)
{
assert(l);
assert(*l);
#include "sw_event_global.h" /* IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY */
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
-static u32 ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
+static u32
+ref_count_mipi_allocation[N_CSI_PORTS]; /* Initialized in mipi_init */
#endif
enum ia_css_err
ia_css_mipi_frame_specify(const unsigned int size_mem_words,
- const bool contiguous)
-{
+ const bool contiguous) {
enum ia_css_err err = IA_CSS_SUCCESS;
my_css.size_mem_words = size_mem_words;
* Check if a source port or TPG/PRBS ID is valid
*/
static bool ia_css_mipi_is_source_port_valid(struct ia_css_pipe *pipe,
- unsigned int *pport)
+ unsigned int *pport)
{
bool ret = true;
unsigned int port = 0;
*/
enum ia_css_err
ia_css_mipi_frame_calculate_size(const unsigned int width,
- const unsigned int height,
- const enum atomisp_input_format format,
- const bool hasSOLandEOL,
- const unsigned int embedded_data_size_words,
- unsigned int *size_mem_words)
-{
+ const unsigned int height,
+ const enum atomisp_input_format format,
+ const bool hasSOLandEOL,
+ const unsigned int embedded_data_size_words,
+ unsigned int *size_mem_words) {
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int bits_per_pixel = 0;
IA_CSS_ENTER("padded_width=%d, height=%d, format=%d, hasSOLandEOL=%d, embedded_data_size_words=%d\n",
width_padded, height, format, hasSOLandEOL, embedded_data_size_words);
- switch (format) {
+ switch (format)
+ {
case ATOMISP_INPUT_FORMAT_RAW_6: /* 4p, 3B, 24bits */
- bits_per_pixel = 6; break;
+ bits_per_pixel = 6;
+ break;
case ATOMISP_INPUT_FORMAT_RAW_7: /* 8p, 7B, 56bits */
- bits_per_pixel = 7; break;
+ bits_per_pixel = 7;
+ break;
case ATOMISP_INPUT_FORMAT_RAW_8: /* 1p, 1B, 8bits */
case ATOMISP_INPUT_FORMAT_BINARY_8: /* 8bits, TODO: check. */
case ATOMISP_INPUT_FORMAT_YUV420_8: /* odd 2p, 2B, 16bits, even 2p, 4B, 32bits */
- bits_per_pixel = 8; break;
+ bits_per_pixel = 8;
+ break;
case ATOMISP_INPUT_FORMAT_YUV420_10: /* odd 4p, 5B, 40bits, even 4p, 10B, 80bits */
case ATOMISP_INPUT_FORMAT_RAW_10: /* 4p, 5B, 40bits */
#if !defined(HAS_NO_PACKED_RAW_PIXELS)
break;
case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY: /* 2p, 3B, 24bits */
case ATOMISP_INPUT_FORMAT_RAW_12: /* 2p, 3B, 24bits */
- bits_per_pixel = 12; break;
+ bits_per_pixel = 12;
+ break;
case ATOMISP_INPUT_FORMAT_RAW_14: /* 4p, 7B, 56bits */
- bits_per_pixel = 14; break;
+ bits_per_pixel = 14;
+ break;
case ATOMISP_INPUT_FORMAT_RGB_444: /* 1p, 2B, 16bits */
case ATOMISP_INPUT_FORMAT_RGB_555: /* 1p, 2B, 16bits */
case ATOMISP_INPUT_FORMAT_RGB_565: /* 1p, 2B, 16bits */
case ATOMISP_INPUT_FORMAT_YUV422_8: /* 2p, 4B, 32bits */
- bits_per_pixel = 16; break;
+ bits_per_pixel = 16;
+ break;
case ATOMISP_INPUT_FORMAT_RGB_666: /* 4p, 9B, 72bits */
- bits_per_pixel = 18; break;
+ bits_per_pixel = 18;
+ break;
case ATOMISP_INPUT_FORMAT_YUV422_10: /* 2p, 5B, 40bits */
- bits_per_pixel = 20; break;
+ bits_per_pixel = 20;
+ break;
case ATOMISP_INPUT_FORMAT_RGB_888: /* 1p, 3B, 24bits */
- bits_per_pixel = 24; break;
+ bits_per_pixel = 24;
+ break;
case ATOMISP_INPUT_FORMAT_YUV420_16: /* Not supported */
case ATOMISP_INPUT_FORMAT_YUV422_16: /* Not supported */
/* Even lines for YUV420 formats are double in bits_per_pixel. */
if (format == ATOMISP_INPUT_FORMAT_YUV420_8
- || format == ATOMISP_INPUT_FORMAT_YUV420_10
- || format == ATOMISP_INPUT_FORMAT_YUV420_16) {
- even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >> 3; /* ceil ( bits per line / 8) */
- } else {
+ || format == ATOMISP_INPUT_FORMAT_YUV420_10
+ || format == ATOMISP_INPUT_FORMAT_YUV420_16)
+ {
+ even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >>
+ 3; /* ceil ( bits per line / 8) */
+ } else
+ {
even_line_bytes = odd_line_bytes;
}
- /* a frame represented in memory: ()- optional; data - payload words.
+ /* a frame represented in memory: ()- optional; data - payload words.
* addr 0 1 2 3 4 5 6 7:
* first SOF (SOL) PACK_H data data data data data
* data data data data data data data data
*/
words_per_odd_line = (odd_line_bytes + 3) >> 2;
- /* ceil(odd_line_bytes/4); word = 4 bytes */
+ /* ceil(odd_line_bytes/4); word = 4 bytes */
words_per_even_line = (even_line_bytes + 3) >> 2;
words_for_first_line = words_per_odd_line + 2 + (hasSOLandEOL ? 1 : 0);
- /* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
+ /* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
words_per_odd_line += (1 + (hasSOLandEOL ? 2 : 0));
- /* each non-first line has format header, and optionally (SOL) and (EOL). */
+ /* each non-first line has format header, and optionally (SOL) and (EOL). */
words_per_even_line += (1 + (hasSOLandEOL ? 2 : 0));
mem_words_per_odd_line = (words_per_odd_line + 7) >> 3;
- /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
+ /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
mem_words_for_first_line = (words_for_first_line + 7) >> 3;
mem_words_per_even_line = (words_per_even_line + 7) >> 3;
mem_words_for_EOF = 1; /* last line consisit of the optional (EOL) and EOF */
mem_words = ((embedded_data_size_words + 7) >> 3) +
- mem_words_for_first_line +
- (((height + 1) >> 1) - 1) * mem_words_per_odd_line +
- /* ceil (height/2) - 1 (first line is calculated separatelly) */
- (height >> 1) * mem_words_per_even_line + /* floor(height/2) */
- mem_words_for_EOF;
+ mem_words_for_first_line +
+ (((height + 1) >> 1) - 1) * mem_words_per_odd_line +
+ /* ceil (height/2) - 1 (first line is calculated separatelly) */
+ (height >> 1) * mem_words_per_even_line + /* floor(height/2) */
+ mem_words_for_EOF;
*size_mem_words = mem_words; /* ceil(words/8); mem word is 32B = 8words. */
/* Check if the above is still needed. */
#if !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2)
enum ia_css_err
ia_css_mipi_frame_enable_check_on_size(const enum mipi_port_id port,
- const unsigned int size_mem_words)
-{
+ const unsigned int size_mem_words) {
u32 idx;
enum ia_css_err err = IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
OP___assert(size_mem_words != 0);
for (idx = 0; idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT &&
- my_css.mipi_sizes_for_check[port][idx] != 0;
- idx++) { /* do nothing */
+ my_css.mipi_sizes_for_check[port][idx] != 0;
+ idx++) /* do nothing */
+ {
}
- if (idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT) {
+ if (idx < IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT)
+ {
my_css.mipi_sizes_for_check[port][idx] = size_mem_words;
err = IA_CSS_SUCCESS;
}
enum ia_css_err
calculate_mipi_buff_size(
- struct ia_css_stream_config *stream_cfg,
- unsigned int *size_mem_words)
-{
+ struct ia_css_stream_config *stream_cfg,
+ unsigned int *size_mem_words) {
#if !defined(USE_INPUT_SYSTEM_VERSION_2401)
enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
(void)stream_cfg;
bits_per_pixel = sh_css_stream_format_2_bits_per_subpixel(format);
bits_per_pixel =
- (format == ATOMISP_INPUT_FORMAT_RAW_10 && pack_raw_pixels) ? bits_per_pixel : 16;
+ (format == ATOMISP_INPUT_FORMAT_RAW_10 && pack_raw_pixels) ? bits_per_pixel : 16;
if (bits_per_pixel == 0)
return IA_CSS_ERR_INTERNAL_ERROR;
/* Even lines for YUV420 formats are double in bits_per_pixel. */
if (format == ATOMISP_INPUT_FORMAT_YUV420_8
- || format == ATOMISP_INPUT_FORMAT_YUV420_10) {
- even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >> 3; /* ceil ( bits per line / 8) */
- } else {
+ || format == ATOMISP_INPUT_FORMAT_YUV420_10)
+ {
+ even_line_bytes = (width_padded * 2 * bits_per_pixel + 7) >>
+ 3; /* ceil ( bits per line / 8) */
+ } else
+ {
even_line_bytes = odd_line_bytes;
}
words_per_odd_line = (odd_line_bytes + 3) >> 2;
- /* ceil(odd_line_bytes/4); word = 4 bytes */
+ /* ceil(odd_line_bytes/4); word = 4 bytes */
words_per_even_line = (even_line_bytes + 3) >> 2;
mem_words_per_odd_line = (words_per_odd_line + 7) >> 3;
- /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
+ /* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
mem_words_per_even_line = (words_per_even_line + 7) >> 3;
mem_words_per_buff_line =
- (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;
+ (mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;
mem_words_per_buff = mem_words_per_buff_line * height;
*size_mem_words = mem_words_per_buff;
}
enum ia_css_err
-allocate_mipi_frames(struct ia_css_pipe *pipe, struct ia_css_stream_info *info)
-{
+allocate_mipi_frames(struct ia_css_pipe *pipe,
+ struct ia_css_stream_info *info) {
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
#ifndef ISP2401
struct ia_css_frame_info mipi_intermediate_info;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) enter:\n", pipe);
+ "allocate_mipi_frames(%p) enter:\n", pipe);
assert(pipe);
assert(pipe->stream);
- if ((!pipe) || (!pipe->stream)) {
+ if ((!pipe) || (!pipe->stream))
+ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit: pipe or stream is null.\n",
- pipe);
+ "allocate_mipi_frames(%p) exit: pipe or stream is null.\n",
+ pipe);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
#ifdef USE_INPUT_SYSTEM_VERSION_2401
- if (pipe->stream->config.online) {
+ if (pipe->stream->config.online)
+ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit: no buffers needed for 2401 pipe mode.\n",
- pipe);
+ "allocate_mipi_frames(%p) exit: no buffers needed for 2401 pipe mode.\n",
+ pipe);
return IA_CSS_SUCCESS;
}
#endif
#ifndef ISP2401
- if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+ if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ {
#else
if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS))
+ {
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit: no buffers needed for pipe mode.\n",
- pipe);
+ "allocate_mipi_frames(%p) exit: no buffers needed for pipe mode.\n",
+ pipe);
return IA_CSS_SUCCESS; /* AM TODO: Check */
}
#ifndef ISP2401
port = (unsigned int)pipe->stream->config.source.port.port;
assert(port < N_CSI_PORTS);
- if (port >= N_CSI_PORTS) {
+ if (port >= N_CSI_PORTS)
+ {
#else
- if (!ia_css_mipi_is_source_port_valid(pipe, &port)) {
+ if (!ia_css_mipi_is_source_port_valid(pipe, &port))
+ {
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit: error: port is not correct (port=%d).\n",
- pipe, port);
+ "allocate_mipi_frames(%p) exit: error: port is not correct (port=%d).\n",
+ pipe, port);
return IA_CSS_ERR_INTERNAL_ERROR;
}
#ifdef USE_INPUT_SYSTEM_VERSION_2401
err = calculate_mipi_buff_size(
- &pipe->stream->config,
- &my_css.mipi_frame_size[port]);
+ &pipe->stream->config,
+ &my_css.mipi_frame_size[port]);
#endif
#if defined(USE_INPUT_SYSTEM_VERSION_2)
- if (ref_count_mipi_allocation[port] != 0) {
+ if (ref_count_mipi_allocation[port] != 0)
+ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit: already allocated for this port (port=%d).\n",
- pipe, port);
+ "allocate_mipi_frames(%p) exit: already allocated for this port (port=%d).\n",
+ pipe, port);
return IA_CSS_SUCCESS;
}
#else
* TODO AM: Once that is changed (removed) this code should be removed as well.
* In that case only 2400 related code should remain.
*/
- if (ref_count_mipi_allocation[port] != 0) {
+ if (ref_count_mipi_allocation[port] != 0)
+ {
ref_count_mipi_allocation[port]++;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) leave: nothing to do, already allocated for this port (port=%d).\n",
- pipe, port);
+ "allocate_mipi_frames(%p) leave: nothing to do, already allocated for this port (port=%d).\n",
+ pipe, port);
return IA_CSS_SUCCESS;
}
#endif
{ /* limit the scope of i,j */
unsigned int i, j;
- for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
+ for (i = 0; i < my_css.num_mipi_frames[port]; i++)
+ {
/* free previous frame */
if (my_css.mipi_frames[port][i]) {
ia_css_frame_free(my_css.mipi_frames[port][i]);
if (i < my_css.num_mipi_frames[port]) {
/* allocate new frame */
err = ia_css_frame_allocate_with_buffer_size(
- &my_css.mipi_frames[port][i],
- my_css.mipi_frame_size[port] * HIVE_ISP_DDR_WORD_BYTES,
- false);
+ &my_css.mipi_frames[port][i],
+ my_css.mipi_frame_size[port] * HIVE_ISP_DDR_WORD_BYTES,
+ false);
if (err != IA_CSS_SUCCESS) {
for (j = 0; j < i; j++) {
if (my_css.mipi_frames[port][j]) {
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p, %d) exit: error: allocation failed.\n",
- pipe, port);
+ "allocate_mipi_frames(%p, %d) exit: error: allocation failed.\n",
+ pipe, port);
return err;
}
}
my_css.mipi_metadata[port][i] = ia_css_metadata_allocate(&info->metadata_info);
if (!my_css.mipi_metadata[port][i]) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_metadata(%p, %d) failed.\n",
- pipe, port);
+ "allocate_mipi_metadata(%p, %d) failed.\n",
+ pipe, port);
return err;
}
}
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "allocate_mipi_frames(%p) exit:\n", pipe);
+ "allocate_mipi_frames(%p) exit:\n", pipe);
return err;
#else
}
enum ia_css_err
-free_mipi_frames(struct ia_css_pipe *pipe)
-{
+free_mipi_frames(struct ia_css_pipe *pipe) {
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
#ifndef ISP2401
unsigned int port = 0;
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) enter:\n", pipe);
+ "free_mipi_frames(%p) enter:\n", pipe);
/* assert(pipe != NULL); TEMP: TODO: Should be assert only. */
- if (pipe) {
+ if (pipe)
+ {
assert(pipe->stream);
if ((!pipe) || (!pipe->stream)) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) exit: error: pipe or stream is null.\n",
- pipe);
+ "free_mipi_frames(%p) exit: error: pipe or stream is null.\n",
+ pipe);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
#else
if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) exit: error: wrong mode.\n",
- pipe);
+ "free_mipi_frames(%p) exit: error: wrong mode.\n",
+ pipe);
return err;
}
#endif
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
#ifndef ISP2401
- "free_mipi_frames(%p, %d) exit: error: pipe port is not correct.\n",
+ "free_mipi_frames(%p, %d) exit: error: pipe port is not correct.\n",
#else
- "free_mipi_frames(%p) exit: error: pipe port is not correct (port=%d).\n",
+ "free_mipi_frames(%p) exit: error: pipe port is not correct (port=%d).\n",
#endif
- pipe, port);
+ pipe, port);
return err;
}
#ifdef ISP2401
assert(ref_count_mipi_allocation[port] == 1);
if (ref_count_mipi_allocation[port] != 1) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) exit: error: wrong ref_count (ref_count=%d).\n",
- pipe, ref_count_mipi_allocation[port]);
+ "free_mipi_frames(%p) exit: error: wrong ref_count (ref_count=%d).\n",
+ pipe, ref_count_mipi_allocation[port]);
return err;
}
#endif
for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
if (my_css.mipi_frames[port][i]) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(port=%d, num=%d).\n", port, i);
+ "free_mipi_frames(port=%d, num=%d).\n", port, i);
ia_css_frame_free(my_css.mipi_frames[port][i]);
my_css.mipi_frames[port][i] = NULL;
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) exit (deallocated).\n", pipe);
+ "free_mipi_frames(%p) exit (deallocated).\n", pipe);
}
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
else {
* In that case only 2400 related code should remain.
*/
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(%p) leave: nothing to do, other streams still use this port (port=%d).\n",
- pipe, port);
+ "free_mipi_frames(%p) leave: nothing to do, other streams still use this port (port=%d).\n",
+ pipe, port);
}
#endif
}
- } else { /* pipe ==NULL */
+ } else /* pipe ==NULL */
+ {
/* AM TEMP: free-ing all mipi buffers just like a legacy code. */
for (port = CSI_PORT0_ID; port < N_CSI_PORTS; port++) {
unsigned int i;
for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
if (my_css.mipi_frames[port][i]) {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "free_mipi_frames(port=%d, num=%d).\n", port, i);
+ "free_mipi_frames(port=%d, num=%d).\n", port, i);
ia_css_frame_free(my_css.mipi_frames[port][i]);
my_css.mipi_frames[port][i] = NULL;
}
}
enum ia_css_err
-send_mipi_frames(struct ia_css_pipe *pipe)
-{
+send_mipi_frames(struct ia_css_pipe *pipe) {
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
enum ia_css_err err = IA_CSS_ERR_INTERNAL_ERROR;
unsigned int i;
assert(pipe);
assert(pipe->stream);
- if (!pipe || !pipe->stream) {
+ if (!pipe || !pipe->stream)
+ {
IA_CSS_ERROR("pipe or stream is null");
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
/* multi stream video needs mipi buffers */
/* nothing to be done in other cases. */
#ifndef ISP2401
- if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+ if (pipe->stream->config.mode != IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ {
#else
if (!(pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
- pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS)) {
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG ||
+ pipe->stream->config.mode == IA_CSS_INPUT_MODE_PRBS))
+ {
#endif
IA_CSS_LOG("nothing to be done for this mode");
return IA_CSS_SUCCESS;
#ifndef ISP2401
port = (unsigned int)pipe->stream->config.source.port.port;
assert(port < N_CSI_PORTS);
- if (port >= N_CSI_PORTS) {
+ if (port >= N_CSI_PORTS)
+ {
IA_CSS_ERROR("invalid port specified (%d)", port);
#else
- if (!ia_css_mipi_is_source_port_valid(pipe, &port)) {
- IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).\n", pipe, port);
+ if (!ia_css_mipi_is_source_port_valid(pipe, &port))
+ {
+ IA_CSS_ERROR("send_mipi_frames(%p) exit: invalid port specified (port=%d).\n",
+ pipe, port);
#endif
return err;
}
/* Hand-over the SP-internal mipi buffers */
- for (i = 0; i < my_css.num_mipi_frames[port]; i++) {
+ for (i = 0; i < my_css.num_mipi_frames[port]; i++)
+ {
/* Need to include the ofset for port. */
sh_css_update_host2sp_mipi_frame(port * NUM_MIPI_FRAMES_PER_STREAM + i,
- my_css.mipi_frames[port][i]);
+ my_css.mipi_frames[port][i]);
sh_css_update_host2sp_mipi_metadata(port * NUM_MIPI_FRAMES_PER_STREAM + i,
- my_css.mipi_metadata[port][i]);
+ my_css.mipi_metadata[port][i]);
}
sh_css_update_host2sp_num_mipi_frames(my_css.num_mipi_frames[port]);
* Send an event to inform the SP
* that all MIPI frames are passed.
**********************************/
- if (!sh_css_sp_is_running()) {
+ if (!sh_css_sp_is_running())
+ {
/* SP is not running. The queues are not valid */
IA_CSS_ERROR("sp is not running");
return err;
}
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY,
- (uint8_t)port,
- (uint8_t)my_css.num_mipi_frames[port],
- 0 /* not used */);
+ IA_CSS_PSYS_SW_EVENT_MIPI_BUFFERS_READY,
+ (uint8_t)port,
+ (uint8_t)my_css.num_mipi_frames[port],
+ 0 /* not used */);
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
#else
(void)pipe;
*/
enum ia_css_err
calculate_mipi_buff_size(
- struct ia_css_stream_config *stream_cfg,
- unsigned int *size_mem_words);
+ struct ia_css_stream_config *stream_cfg,
+ unsigned int *size_mem_words);
#endif /* __SH_CSS_MIPI_H */
const struct ia_css_fw_info *fw = &sh_css_sp_fw;
unsigned int HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb;
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() enter\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_mmu_invalidate_cache() enter\n");
/* if the SP is not running we should not access its dmem */
if (sh_css_sp_is_running()) {
(void)HIVE_ADDR_ia_css_dmaproxy_sp_invalidate_tlb; /* Suppres warnings in CRUN */
sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
- true);
+ (unsigned int)sp_address_of(ia_css_dmaproxy_sp_invalidate_tlb),
+ true);
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_mmu_invalidate_cache() leave\n");
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "ia_css_mmu_invalidate_cache() leave\n");
}
/* Deprecated, this is an HRT backend function (memory_access.h) */
#include "memory_access.h"
static struct ia_css_dvs_6axis_config *
-alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res, struct ia_css_dvs_6axis_config *dvs_config_src)
+alloc_dvs_6axis_table(const struct ia_css_resolution *frame_res,
+ struct ia_css_dvs_6axis_config *dvs_config_src)
{
unsigned int width_y = 0;
unsigned int height_y = 0;
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_dvs_6axis_config *dvs_config = NULL;
- dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_malloc(sizeof(struct ia_css_dvs_6axis_config));
+ dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_malloc(sizeof(
+ struct ia_css_dvs_6axis_config));
if (!dvs_config) {
IA_CSS_ERROR("out of memory");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- } else
- { /*Initialize new struct with latest config settings*/
+ } else {
+ /*Initialize new struct with latest config settings*/
if (dvs_config_src) {
dvs_config->width_y = width_y = dvs_config_src->width_y;
dvs_config->height_y = height_y = dvs_config_src->height_y;
IA_CSS_LOG("alloc_dvs_6axis_table Y: W %d H %d", width_y, height_y);
} else if (frame_res) {
dvs_config->width_y = width_y = DVS_TABLE_IN_BLOCKDIM_X_LUMA(frame_res->width);
- dvs_config->height_y = height_y = DVS_TABLE_IN_BLOCKDIM_Y_LUMA(frame_res->height);
- dvs_config->width_uv = width_uv = DVS_TABLE_IN_BLOCKDIM_X_CHROMA(frame_res->width / 2); /* UV = Y/2, depens on colour format YUV 4.2.0*/
- dvs_config->height_uv = height_uv = DVS_TABLE_IN_BLOCKDIM_Y_CHROMA(frame_res->height / 2);/* UV = Y/2, depens on colour format YUV 4.2.0*/
+ dvs_config->height_y = height_y = DVS_TABLE_IN_BLOCKDIM_Y_LUMA(
+ frame_res->height);
+ dvs_config->width_uv = width_uv = DVS_TABLE_IN_BLOCKDIM_X_CHROMA(
+ frame_res->width /
+ 2); /* UV = Y/2, depens on colour format YUV 4.2.0*/
+ dvs_config->height_uv = height_uv = DVS_TABLE_IN_BLOCKDIM_Y_CHROMA(
+ frame_res->height /
+ 2);/* UV = Y/2, depens on colour format YUV 4.2.0*/
IA_CSS_LOG("alloc_dvs_6axis_table Y: W %d H %d", width_y, height_y);
}
/* Generate Y buffers */
- dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+ dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+ uint32_t));
if (!dvs_config->xcoords_y) {
IA_CSS_ERROR("out of memory");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto exit;
}
- dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+ dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+ uint32_t));
if (!dvs_config->ycoords_y) {
IA_CSS_ERROR("out of memory");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
/* Generate UV buffers */
IA_CSS_LOG("UV W %d H %d", width_uv, height_uv);
- dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+ dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+ sizeof(uint32_t));
if (!dvs_config->xcoords_uv) {
IA_CSS_ERROR("out of memory");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto exit;
}
- dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+ dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+ sizeof(uint32_t));
if (!dvs_config->ycoords_uv) {
IA_CSS_ERROR("out of memory");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
exit:
if (err != IA_CSS_SUCCESS) {
- free_dvs_6axis_table(&dvs_config); /* we might have allocated some memory, release this */
+ free_dvs_6axis_table(
+ &dvs_config); /* we might have allocated some memory, release this */
dvs_config = NULL;
}
}
}
static void
-init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config, const struct ia_css_resolution *dvs_offset)
+init_dvs_6axis_table_from_default(struct ia_css_dvs_6axis_config *dvs_config,
+ const struct ia_css_resolution *dvs_offset)
{
unsigned int x, y;
unsigned int width_y = dvs_config->width_y;
unsigned int height_uv = dvs_config->height_uv;
IA_CSS_LOG("Env_X=%d, Env_Y=%d, width_y=%d, height_y=%d",
- dvs_offset->width, dvs_offset->height, width_y, height_y);
+ dvs_offset->width, dvs_offset->height, width_y, height_y);
for (y = 0; y < height_y; y++) {
for (x = 0; x < width_y; x++) {
- dvs_config->xcoords_y[y * width_y + x] = (dvs_offset->width + x * DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
+ dvs_config->xcoords_y[y * width_y + x] = (dvs_offset->width + x *
+ DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
}
}
for (y = 0; y < height_y; y++) {
for (x = 0; x < width_y; x++) {
- dvs_config->ycoords_y[y * width_y + x] = (dvs_offset->height + y * DVS_BLOCKDIM_Y_LUMA) << DVS_COORD_FRAC_BITS;
+ dvs_config->ycoords_y[y * width_y + x] = (dvs_offset->height + y *
+ DVS_BLOCKDIM_Y_LUMA) << DVS_COORD_FRAC_BITS;
}
}
for (y = 0; y < height_uv; y++) {
- for (x = 0; x < width_uv; x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
- dvs_config->xcoords_uv[y * width_uv + x] = ((dvs_offset->width / 2) + x * DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
+ for (x = 0; x < width_uv;
+ x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
+ dvs_config->xcoords_uv[y * width_uv + x] = ((dvs_offset->width / 2) + x *
+ DVS_BLOCKDIM_X) << DVS_COORD_FRAC_BITS;
}
}
for (y = 0; y < height_uv; y++) {
- for (x = 0; x < width_uv; x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
- dvs_config->ycoords_uv[y * width_uv + x] = ((dvs_offset->height / 2) + y * DVS_BLOCKDIM_Y_CHROMA) << DVS_COORD_FRAC_BITS;
+ for (x = 0; x < width_uv;
+ x++) { /* Envelope dimensions set in Ypixels hence offset UV = offset Y/2 */
+ dvs_config->ycoords_uv[y * width_uv + x] = ((dvs_offset->height / 2) + y *
+ DVS_BLOCKDIM_Y_CHROMA) <<
+ DVS_COORD_FRAC_BITS;
}
}
}
static void
-init_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config, struct ia_css_dvs_6axis_config *dvs_config_src)
+init_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config,
+ struct ia_css_dvs_6axis_config *dvs_config_src)
{
unsigned int width_y = dvs_config->width_y;
unsigned int height_y = dvs_config->height_y;
unsigned int width_uv = dvs_config->width_uv;
unsigned int height_uv = dvs_config->height_uv;
- memcpy(dvs_config->xcoords_y, dvs_config_src->xcoords_y, (width_y * height_y * sizeof(uint32_t)));
- memcpy(dvs_config->ycoords_y, dvs_config_src->ycoords_y, (width_y * height_y * sizeof(uint32_t)));
- memcpy(dvs_config->xcoords_uv, dvs_config_src->xcoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
- memcpy(dvs_config->ycoords_uv, dvs_config_src->ycoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
+ memcpy(dvs_config->xcoords_y, dvs_config_src->xcoords_y,
+ (width_y * height_y * sizeof(uint32_t)));
+ memcpy(dvs_config->ycoords_y, dvs_config_src->ycoords_y,
+ (width_y * height_y * sizeof(uint32_t)));
+ memcpy(dvs_config->xcoords_uv, dvs_config_src->xcoords_uv,
+ (width_uv * height_uv * sizeof(uint32_t)));
+ memcpy(dvs_config->ycoords_uv, dvs_config_src->ycoords_uv,
+ (width_uv * height_uv * sizeof(uint32_t)));
}
struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table(const struct ia_css_resolution *frame_res, const struct ia_css_resolution *dvs_offset)
+generate_dvs_6axis_table(const struct ia_css_resolution *frame_res,
+ const struct ia_css_resolution *dvs_offset)
{
struct ia_css_dvs_6axis_config *dvs_6axis_table;
}
struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config_src)
+generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config
+ *dvs_config_src)
{
struct ia_css_dvs_6axis_config *dvs_6axis_table;
assert(dvs_6axis_config);
assert(*dvs_6axis_config);
- if ((dvs_6axis_config) && (*dvs_6axis_config))
- {
+ if ((dvs_6axis_config) && (*dvs_6axis_config)) {
IA_CSS_ENTER_PRIVATE("dvs_6axis_config %p", (*dvs_6axis_config));
- if ((*dvs_6axis_config)->xcoords_y)
- {
+ if ((*dvs_6axis_config)->xcoords_y) {
sh_css_free((*dvs_6axis_config)->xcoords_y);
(*dvs_6axis_config)->xcoords_y = NULL;
}
- if ((*dvs_6axis_config)->ycoords_y)
- {
+ if ((*dvs_6axis_config)->ycoords_y) {
sh_css_free((*dvs_6axis_config)->ycoords_y);
(*dvs_6axis_config)->ycoords_y = NULL;
}
/* Free up UV buffers */
- if ((*dvs_6axis_config)->xcoords_uv)
- {
+ if ((*dvs_6axis_config)->xcoords_uv) {
sh_css_free((*dvs_6axis_config)->xcoords_uv);
(*dvs_6axis_config)->xcoords_uv = NULL;
}
- if ((*dvs_6axis_config)->ycoords_uv)
- {
+ if ((*dvs_6axis_config)->ycoords_uv) {
sh_css_free((*dvs_6axis_config)->ycoords_uv);
(*dvs_6axis_config)->ycoords_uv = NULL;
}
}
void copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
- const struct ia_css_dvs_6axis_config *dvs_config_src)
+ const struct ia_css_dvs_6axis_config *dvs_config_src)
{
unsigned int width_y;
unsigned int height_y;
width_y = dvs_config_src->width_y;
height_y = dvs_config_src->height_y;
- width_uv = dvs_config_src->width_uv; /* = Y/2, depens on colour format YUV 4.2.0*/
+ width_uv =
+ dvs_config_src->width_uv; /* = Y/2, depens on colour format YUV 4.2.0*/
height_uv = dvs_config_src->height_uv;
- memcpy(dvs_config_dst->xcoords_y, dvs_config_src->xcoords_y, (width_y * height_y * sizeof(uint32_t)));
- memcpy(dvs_config_dst->ycoords_y, dvs_config_src->ycoords_y, (width_y * height_y * sizeof(uint32_t)));
+ memcpy(dvs_config_dst->xcoords_y, dvs_config_src->xcoords_y,
+ (width_y * height_y * sizeof(uint32_t)));
+ memcpy(dvs_config_dst->ycoords_y, dvs_config_src->ycoords_y,
+ (width_y * height_y * sizeof(uint32_t)));
- memcpy(dvs_config_dst->xcoords_uv, dvs_config_src->xcoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
- memcpy(dvs_config_dst->ycoords_uv, dvs_config_src->ycoords_uv, (width_uv * height_uv * sizeof(uint32_t)));
+ memcpy(dvs_config_dst->xcoords_uv, dvs_config_src->xcoords_uv,
+ (width_uv * height_uv * sizeof(uint32_t)));
+ memcpy(dvs_config_dst->ycoords_uv, dvs_config_src->ycoords_uv,
+ (width_uv * height_uv * sizeof(uint32_t)));
}
void
union ia_css_dvs_statistics_host *host_stats,
const union ia_css_dvs_statistics_isp *isp_stats)
{
- if (type == DVS_STATISTICS)
- {
+ if (type == DVS_STATISTICS) {
ia_css_get_dvs_statistics(host_stats->p_dvs_statistics_host,
- isp_stats->p_dvs_statistics_isp);
- } else if (type == DVS2_STATISTICS)
- {
+ isp_stats->p_dvs_statistics_isp);
+ } else if (type == DVS2_STATISTICS) {
ia_css_get_dvs2_statistics(host_stats->p_dvs2_statistics_host,
- isp_stats->p_dvs_statistics_isp);
+ isp_stats->p_dvs_statistics_isp);
}
return;
}
#endif
struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table(const struct ia_css_resolution *frame_res, const struct ia_css_resolution *dvs_offset);
+generate_dvs_6axis_table(const struct ia_css_resolution *frame_res,
+ const struct ia_css_resolution *dvs_offset);
struct ia_css_dvs_6axis_config *
-generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config *dvs_config_src);
+generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config
+ *dvs_config_src);
void
free_dvs_6axis_table(struct ia_css_dvs_6axis_config **dvs_6axis_config);
void
copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
- const struct ia_css_dvs_6axis_config *dvs_config_src);
+ const struct ia_css_dvs_6axis_config *dvs_config_src);
#endif
enum ia_css_sc_color color)
{
unsigned int i, j,
- sensor_width,
- sensor_height,
- table_width,
- table_height,
- table_cell_h,
- out_cell_size,
- in_cell_size,
- out_start_row,
- padded_width;
+ sensor_width,
+ sensor_height,
+ table_width,
+ table_height,
+ table_cell_h,
+ out_cell_size,
+ in_cell_size,
+ out_start_row,
+ padded_width;
int out_start_col, /* can be negative to indicate padded space */
table_cell_w;
unsigned short *in_ptr,
- *out_ptr;
+ *out_ptr;
assert(in_table);
assert(out_table);
src_y0 = clamp(src_y0, 0, (int)table_height - 1);
src_y1 = clamp(src_y1, 0, (int)table_height - 1);
ty = min(clamp(ty, 0, (int)sensor_height - 1),
- (int)table_cell_h);
+ (int)table_cell_h);
/* calculate closest source points for distance computation */
sy0 = min(src_y0 * in_cell_size, sensor_height - 1);
s_ll = in_ptr[(table_width * src_y1) + src_x0];
s_lr = in_ptr[(table_width * src_y1) + src_x1];
- *out_ptr = (unsigned short)((dx0 * dy0 * s_lr + dx0 * dy1 * s_ur + dx1 * dy0 * s_ll + dx1 * dy1 * s_ul) /
- (divx * divy));
+ *out_ptr = (unsigned short)((dx0 * dy0 * s_lr + dx0 * dy1 * s_ur + dx1 * dy0 *
+ s_ll + dx1 * dy1 * s_ul) /
+ (divx * divy));
}
}
}
void
sh_css_params_shading_id_table_generate(
- struct ia_css_shading_table **target_table,
+ struct ia_css_shading_table **target_table,
#ifndef ISP2401
- const struct ia_css_binary *binary)
+ const struct ia_css_binary *binary)
#else
- unsigned int table_width,
- unsigned int table_height)
+ unsigned int table_width,
+ unsigned int table_height)
#endif
{
/* initialize table with ones, shift becomes zero */
unsigned int bds_factor)
{
unsigned int input_width,
- input_height,
- table_width,
- table_height,
- left_padding,
- top_padding,
- padded_width,
- left_cropping,
- i;
+ input_height,
+ table_width,
+ table_height,
+ left_padding,
+ top_padding,
+ padded_width,
+ left_cropping,
+ i;
unsigned int bds_numerator, bds_denominator;
int right_padding;
sh_css_params_shading_id_table_generate(target_table, binary);
#else
sh_css_params_shading_id_table_generate(target_table,
- binary->sctbl_legacy_width_per_color, binary->sctbl_legacy_height);
+ binary->sctbl_legacy_width_per_color, binary->sctbl_legacy_height);
#endif
return;
}
shading correction is performed in the bayer domain (before bayer
down scaling). */
#if defined(USE_INPUT_SYSTEM_VERSION_2401)
- padded_width = CEIL_MUL(binary->effective_in_frame_res.width + 2 * ISP_VEC_NELEMS,
- 2 * ISP_VEC_NELEMS);
+ padded_width = CEIL_MUL(binary->effective_in_frame_res.width + 2 *
+ ISP_VEC_NELEMS,
+ 2 * ISP_VEC_NELEMS);
#endif
input_height = binary->in_frame_info.res.height;
input_width = binary->in_frame_info.res.width;
binary->dvs_envelope.width : 2 * ISP_VEC_NELEMS;
sh_css_bds_factor_get_numerator_denominator
- (bds_factor, &bds_numerator, &bds_denominator);
-
- left_padding = (left_padding + binary->info->sp.pipeline.left_cropping) * bds_numerator / bds_denominator - binary->info->sp.pipeline.left_cropping;
- right_padding = (binary->internal_frame_info.res.width - binary->effective_in_frame_res.width * bds_denominator / bds_numerator - left_cropping) * bds_numerator / bds_denominator;
- top_padding = binary->info->sp.pipeline.top_cropping * bds_numerator / bds_denominator - binary->info->sp.pipeline.top_cropping;
+ (bds_factor, &bds_numerator, &bds_denominator);
+
+ left_padding = (left_padding + binary->info->sp.pipeline.left_cropping) *
+ bds_numerator / bds_denominator -
+ binary->info->sp.pipeline.left_cropping;
+ right_padding = (binary->internal_frame_info.res.width -
+ binary->effective_in_frame_res.width * bds_denominator /
+ bds_numerator - left_cropping) * bds_numerator / bds_denominator;
+ top_padding = binary->info->sp.pipeline.top_cropping * bds_numerator /
+ bds_denominator -
+ binary->info->sp.pipeline.top_cropping;
#if !defined(USE_WINDOWS_BINNING_FACTOR)
/* @deprecated{This part of the code will be replaced by the code
struct ia_css_shading_table *
ia_css_shading_table_alloc(
- unsigned int width,
- unsigned int height)
+ unsigned int width,
+ unsigned int height)
{
unsigned int i;
struct ia_css_shading_table *me;
void
sh_css_params_shading_id_table_generate(
- struct ia_css_shading_table **target_table,
+ struct ia_css_shading_table **target_table,
#ifndef ISP2401
- const struct ia_css_binary *binary);
+ const struct ia_css_binary *binary);
#else
- unsigned int table_width,
- unsigned int table_height);
+ unsigned int table_width,
+ unsigned int table_height);
#endif
void
static hrt_vaddress xmem_sp_group_ptrs;
static hrt_vaddress xmem_sp_stage_ptrs[IA_CSS_PIPE_ID_NUM]
- [SH_CSS_MAX_STAGES];
+[SH_CSS_MAX_STAGES];
static hrt_vaddress xmem_isp_stage_ptrs[IA_CSS_PIPE_ID_NUM]
- [SH_CSS_MAX_STAGES];
+[SH_CSS_MAX_STAGES];
static hrt_vaddress default_gdc_lut;
static int interleaved_lut_temp[4][HRT_GDC_N];
*/
static const int zoom_table[4][HRT_GDC_N] = {
- { 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -2, -2, -2, -2, -2, -2, -2,
- -3, -3, -3, -3, -3, -3, -3, -4,
- -4, -4, -4, -4, -5, -5, -5, -5,
- -5, -5, -6, -6, -6, -6, -7, -7,
- -7, -7, -7, -8, -8, -8, -8, -9,
- -9, -9, -9, -10, -10, -10, -10, -11,
- -11, -11, -12, -12, -12, -12, -13, -13,
- -13, -14, -14, -14, -15, -15, -15, -15,
- -16, -16, -16, -17, -17, -17, -18, -18,
- -18, -19, -19, -20, -20, -20, -21, -21,
- -21, -22, -22, -22, -23, -23, -24, -24,
- -24, -25, -25, -25, -26, -26, -27, -27,
- -28, -28, -28, -29, -29, -30, -30, -30,
- -31, -31, -32, -32, -33, -33, -33, -34,
- -34, -35, -35, -36, -36, -37, -37, -37,
- -38, -38, -39, -39, -40, -40, -41, -41,
- -42, -42, -43, -43, -44, -44, -45, -45,
- -46, -46, -47, -47, -48, -48, -49, -49,
- -50, -50, -51, -51, -52, -52, -53, -53,
- -54, -54, -55, -55, -56, -56, -57, -57,
- -58, -59, -59, -60, -60, -61, -61, -62,
- -62, -63, -63, -64, -65, -65, -66, -66,
- -67, -67, -68, -69, -69, -70, -70, -71,
- -71, -72, -73, -73, -74, -74, -75, -75,
- -76, -77, -77, -78, -78, -79, -80, -80,
- -81, -81, -82, -83, -83, -84, -84, -85,
- -86, -86, -87, -87, -88, -89, -89, -90,
- -91, -91, -92, -92, -93, -94, -94, -95,
- -96, -96, -97, -97, -98, -99, -99, -100,
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -2, -2, -2, -2, -2, -2, -2,
+ -3, -3, -3, -3, -3, -3, -3, -4,
+ -4, -4, -4, -4, -5, -5, -5, -5,
+ -5, -5, -6, -6, -6, -6, -7, -7,
+ -7, -7, -7, -8, -8, -8, -8, -9,
+ -9, -9, -9, -10, -10, -10, -10, -11,
+ -11, -11, -12, -12, -12, -12, -13, -13,
+ -13, -14, -14, -14, -15, -15, -15, -15,
+ -16, -16, -16, -17, -17, -17, -18, -18,
+ -18, -19, -19, -20, -20, -20, -21, -21,
+ -21, -22, -22, -22, -23, -23, -24, -24,
+ -24, -25, -25, -25, -26, -26, -27, -27,
+ -28, -28, -28, -29, -29, -30, -30, -30,
+ -31, -31, -32, -32, -33, -33, -33, -34,
+ -34, -35, -35, -36, -36, -37, -37, -37,
+ -38, -38, -39, -39, -40, -40, -41, -41,
+ -42, -42, -43, -43, -44, -44, -45, -45,
+ -46, -46, -47, -47, -48, -48, -49, -49,
+ -50, -50, -51, -51, -52, -52, -53, -53,
+ -54, -54, -55, -55, -56, -56, -57, -57,
+ -58, -59, -59, -60, -60, -61, -61, -62,
+ -62, -63, -63, -64, -65, -65, -66, -66,
+ -67, -67, -68, -69, -69, -70, -70, -71,
+ -71, -72, -73, -73, -74, -74, -75, -75,
+ -76, -77, -77, -78, -78, -79, -80, -80,
+ -81, -81, -82, -83, -83, -84, -84, -85,
+ -86, -86, -87, -87, -88, -89, -89, -90,
+ -91, -91, -92, -92, -93, -94, -94, -95,
+ -96, -96, -97, -97, -98, -99, -99, -100,
-101, -101, -102, -102, -103, -104, -104, -105,
-106, -106, -107, -108, -108, -109, -109, -110,
-111, -111, -112, -113, -113, -114, -115, -115,
-124, -122, -121, -120, -118, -117, -115, -114,
-112, -110, -109, -107, -106, -104, -103, -101,
-100, -98, -96, -95, -93, -92, -90, -88,
- -87, -85, -83, -82, -80, -78, -77, -75,
- -73, -72, -70, -68, -67, -65, -63, -61,
- -60, -58, -56, -54, -52, -51, -49, -47,
- -45, -43, -42, -40, -38, -36, -34, -32,
- -31, -29, -27, -25, -23, -21, -19, -17,
- -15, -13, -11, -9, -7, -5, -3, -1
+ -87, -85, -83, -82, -80, -78, -77, -75,
+ -73, -72, -70, -68, -67, -65, -63, -61,
+ -60, -58, -56, -54, -52, -51, -49, -47,
+ -45, -43, -42, -40, -38, -36, -34, -32,
+ -31, -29, -27, -25, -23, -21, -19, -17,
+ -15, -13, -11, -9, -7, -5, -3, -1
},
- { 0, 2, 4, 6, 8, 10, 12, 14,
- 16, 18, 20, 22, 25, 27, 29, 31,
- 33, 36, 38, 40, 43, 45, 47, 50,
- 52, 54, 57, 59, 61, 64, 66, 69,
- 71, 74, 76, 79, 81, 84, 86, 89,
- 92, 94, 97, 99, 102, 105, 107, 110,
- 113, 116, 118, 121, 124, 127, 129, 132,
- 135, 138, 141, 144, 146, 149, 152, 155,
- 158, 161, 164, 167, 170, 173, 176, 179,
- 182, 185, 188, 191, 194, 197, 200, 203,
- 207, 210, 213, 216, 219, 222, 226, 229,
- 232, 235, 239, 242, 245, 248, 252, 255,
- 258, 262, 265, 269, 272, 275, 279, 282,
- 286, 289, 292, 296, 299, 303, 306, 310,
- 313, 317, 321, 324, 328, 331, 335, 338,
- 342, 346, 349, 353, 357, 360, 364, 368,
- 372, 375, 379, 383, 386, 390, 394, 398,
- 402, 405, 409, 413, 417, 421, 425, 429,
- 432, 436, 440, 444, 448, 452, 456, 460,
- 464, 468, 472, 476, 480, 484, 488, 492,
- 496, 500, 504, 508, 512, 516, 521, 525,
- 529, 533, 537, 541, 546, 550, 554, 558,
- 562, 567, 571, 575, 579, 584, 588, 592,
- 596, 601, 605, 609, 614, 618, 622, 627,
- 631, 635, 640, 644, 649, 653, 657, 662,
- 666, 671, 675, 680, 684, 689, 693, 698,
- 702, 707, 711, 716, 720, 725, 729, 734,
- 738, 743, 747, 752, 757, 761, 766, 771,
- 775, 780, 784, 789, 794, 798, 803, 808,
- 813, 817, 822, 827, 831, 836, 841, 846,
- 850, 855, 860, 865, 870, 874, 879, 884,
- 889, 894, 898, 903, 908, 913, 918, 923,
- 928, 932, 937, 942, 947, 952, 957, 962,
- 967, 972, 977, 982, 986, 991, 996, 1001,
+ {
+ 0, 2, 4, 6, 8, 10, 12, 14,
+ 16, 18, 20, 22, 25, 27, 29, 31,
+ 33, 36, 38, 40, 43, 45, 47, 50,
+ 52, 54, 57, 59, 61, 64, 66, 69,
+ 71, 74, 76, 79, 81, 84, 86, 89,
+ 92, 94, 97, 99, 102, 105, 107, 110,
+ 113, 116, 118, 121, 124, 127, 129, 132,
+ 135, 138, 141, 144, 146, 149, 152, 155,
+ 158, 161, 164, 167, 170, 173, 176, 179,
+ 182, 185, 188, 191, 194, 197, 200, 203,
+ 207, 210, 213, 216, 219, 222, 226, 229,
+ 232, 235, 239, 242, 245, 248, 252, 255,
+ 258, 262, 265, 269, 272, 275, 279, 282,
+ 286, 289, 292, 296, 299, 303, 306, 310,
+ 313, 317, 321, 324, 328, 331, 335, 338,
+ 342, 346, 349, 353, 357, 360, 364, 368,
+ 372, 375, 379, 383, 386, 390, 394, 398,
+ 402, 405, 409, 413, 417, 421, 425, 429,
+ 432, 436, 440, 444, 448, 452, 456, 460,
+ 464, 468, 472, 476, 480, 484, 488, 492,
+ 496, 500, 504, 508, 512, 516, 521, 525,
+ 529, 533, 537, 541, 546, 550, 554, 558,
+ 562, 567, 571, 575, 579, 584, 588, 592,
+ 596, 601, 605, 609, 614, 618, 622, 627,
+ 631, 635, 640, 644, 649, 653, 657, 662,
+ 666, 671, 675, 680, 684, 689, 693, 698,
+ 702, 707, 711, 716, 720, 725, 729, 734,
+ 738, 743, 747, 752, 757, 761, 766, 771,
+ 775, 780, 784, 789, 794, 798, 803, 808,
+ 813, 817, 822, 827, 831, 836, 841, 846,
+ 850, 855, 860, 865, 870, 874, 879, 884,
+ 889, 894, 898, 903, 908, 913, 918, 923,
+ 928, 932, 937, 942, 947, 952, 957, 962,
+ 967, 972, 977, 982, 986, 991, 996, 1001,
1006, 1011, 1016, 1021, 1026, 1031, 1036, 1041,
1046, 1051, 1056, 1062, 1067, 1072, 1077, 1082,
1087, 1092, 1097, 1102, 1107, 1112, 1117, 1122,
4093, 4093, 4094, 4094, 4094, 4094, 4095, 4095,
4095, 4095, 4095, 4095, 4095, 4095, 4095, 4095
},
- { 4096, 4095, 4095, 4095, 4095, 4095, 4095, 4095,
+ {
+ 4096, 4095, 4095, 4095, 4095, 4095, 4095, 4095,
4095, 4095, 4095, 4094, 4094, 4094, 4094, 4093,
4093, 4093, 4092, 4092, 4092, 4091, 4091, 4090,
4090, 4089, 4089, 4088, 4088, 4087, 4087, 4086,
1087, 1082, 1077, 1072, 1067, 1062, 1056, 1051,
1046, 1041, 1036, 1031, 1026, 1021, 1016, 1011,
1006, 1001, 996, 991, 986, 982, 977, 972,
- 967, 962, 957, 952, 947, 942, 937, 932,
- 928, 923, 918, 913, 908, 903, 898, 894,
- 889, 884, 879, 874, 870, 865, 860, 855,
- 850, 846, 841, 836, 831, 827, 822, 817,
- 813, 808, 803, 798, 794, 789, 784, 780,
- 775, 771, 766, 761, 757, 752, 747, 743,
- 738, 734, 729, 725, 720, 716, 711, 707,
- 702, 698, 693, 689, 684, 680, 675, 671,
- 666, 662, 657, 653, 649, 644, 640, 635,
- 631, 627, 622, 618, 614, 609, 605, 601,
- 596, 592, 588, 584, 579, 575, 571, 567,
- 562, 558, 554, 550, 546, 541, 537, 533,
- 529, 525, 521, 516, 512, 508, 504, 500,
- 496, 492, 488, 484, 480, 476, 472, 468,
- 464, 460, 456, 452, 448, 444, 440, 436,
- 432, 429, 425, 421, 417, 413, 409, 405,
- 402, 398, 394, 390, 386, 383, 379, 375,
- 372, 368, 364, 360, 357, 353, 349, 346,
- 342, 338, 335, 331, 328, 324, 321, 317,
- 313, 310, 306, 303, 299, 296, 292, 289,
- 286, 282, 279, 275, 272, 269, 265, 262,
- 258, 255, 252, 248, 245, 242, 239, 235,
- 232, 229, 226, 222, 219, 216, 213, 210,
- 207, 203, 200, 197, 194, 191, 188, 185,
- 182, 179, 176, 173, 170, 167, 164, 161,
- 158, 155, 152, 149, 146, 144, 141, 138,
- 135, 132, 129, 127, 124, 121, 118, 116,
- 113, 110, 107, 105, 102, 99, 97, 94,
- 92, 89, 86, 84, 81, 79, 76, 74,
- 71, 69, 66, 64, 61, 59, 57, 54,
- 52, 50, 47, 45, 43, 40, 38, 36,
- 33, 31, 29, 27, 25, 22, 20, 18,
- 16, 14, 12, 10, 8, 6, 4, 2
+ 967, 962, 957, 952, 947, 942, 937, 932,
+ 928, 923, 918, 913, 908, 903, 898, 894,
+ 889, 884, 879, 874, 870, 865, 860, 855,
+ 850, 846, 841, 836, 831, 827, 822, 817,
+ 813, 808, 803, 798, 794, 789, 784, 780,
+ 775, 771, 766, 761, 757, 752, 747, 743,
+ 738, 734, 729, 725, 720, 716, 711, 707,
+ 702, 698, 693, 689, 684, 680, 675, 671,
+ 666, 662, 657, 653, 649, 644, 640, 635,
+ 631, 627, 622, 618, 614, 609, 605, 601,
+ 596, 592, 588, 584, 579, 575, 571, 567,
+ 562, 558, 554, 550, 546, 541, 537, 533,
+ 529, 525, 521, 516, 512, 508, 504, 500,
+ 496, 492, 488, 484, 480, 476, 472, 468,
+ 464, 460, 456, 452, 448, 444, 440, 436,
+ 432, 429, 425, 421, 417, 413, 409, 405,
+ 402, 398, 394, 390, 386, 383, 379, 375,
+ 372, 368, 364, 360, 357, 353, 349, 346,
+ 342, 338, 335, 331, 328, 324, 321, 317,
+ 313, 310, 306, 303, 299, 296, 292, 289,
+ 286, 282, 279, 275, 272, 269, 265, 262,
+ 258, 255, 252, 248, 245, 242, 239, 235,
+ 232, 229, 226, 222, 219, 216, 213, 210,
+ 207, 203, 200, 197, 194, 191, 188, 185,
+ 182, 179, 176, 173, 170, 167, 164, 161,
+ 158, 155, 152, 149, 146, 144, 141, 138,
+ 135, 132, 129, 127, 124, 121, 118, 116,
+ 113, 110, 107, 105, 102, 99, 97, 94,
+ 92, 89, 86, 84, 81, 79, 76, 74,
+ 71, 69, 66, 64, 61, 59, 57, 54,
+ 52, 50, 47, 45, 43, 40, 38, 36,
+ 33, 31, 29, 27, 25, 22, 20, 18,
+ 16, 14, 12, 10, 8, 6, 4, 2
},
- { 0, -1, -3, -5, -7, -9, -11, -13,
- -15, -17, -19, -20, -23, -25, -27, -28,
- -30, -33, -34, -36, -39, -40, -42, -43,
- -45, -46, -49, -50, -52, -54, -56, -58,
- -60, -61, -62, -65, -66, -68, -70, -72,
- -73, -74, -77, -78, -80, -82, -83, -85,
- -87, -89, -90, -92, -93, -95, -96, -98,
+ {
+ 0, -1, -3, -5, -7, -9, -11, -13,
+ -15, -17, -19, -20, -23, -25, -27, -28,
+ -30, -33, -34, -36, -39, -40, -42, -43,
+ -45, -46, -49, -50, -52, -54, -56, -58,
+ -60, -61, -62, -65, -66, -68, -70, -72,
+ -73, -74, -77, -78, -80, -82, -83, -85,
+ -87, -89, -90, -92, -93, -95, -96, -98,
-100, -102, -103, -105, -106, -107, -108, -110,
-112, -114, -116, -116, -118, -120, -122, -122,
-124, -126, -127, -128, -130, -131, -133, -133,
-110, -110, -109, -109, -108, -107, -107, -106,
-105, -104, -104, -103, -102, -103, -102, -101,
-101, -100, -99, -99, -98, -97, -97, -96,
- -96, -95, -94, -94, -93, -92, -92, -91,
- -91, -90, -89, -88, -88, -88, -87, -86,
- -85, -86, -84, -84, -83, -82, -82, -81,
- -81, -80, -80, -78, -79, -77, -77, -77,
- -76, -76, -75, -74, -74, -73, -72, -72,
- -72, -71, -70, -70, -69, -68, -68, -68,
- -66, -67, -66, -65, -65, -65, -63, -63,
- -62, -62, -61, -61, -60, -60, -60, -58,
- -58, -58, -56, -56, -56, -55, -54, -55,
- -54, -54, -53, -52, -51, -51, -51, -50,
- -49, -49, -49, -49, -48, -47, -46, -46,
- -46, -46, -45, -43, -43, -43, -43, -42,
- -42, -42, -40, -40, -40, -39, -39, -38,
- -38, -38, -37, -37, -36, -36, -35, -35,
- -34, -35, -34, -33, -33, -32, -32, -31,
- -31, -31, -30, -29, -29, -29, -28, -27,
- -28, -28, -27, -26, -26, -25, -25, -25,
- -24, -24, -24, -23, -23, -22, -22, -22,
- -21, -21, -20, -20, -20, -20, -19, -18,
- -19, -18, -18, -17, -18, -17, -16, -17,
- -16, -15, -15, -15, -14, -14, -15, -13,
- -13, -13, -13, -12, -12, -11, -12, -11,
- -12, -10, -10, -10, -10, -10, -9, -10,
- -9, -9, -9, -8, -8, -7, -8, -7,
- -7, -7, -6, -6, -6, -7, -6, -6,
- -5, -5, -5, -5, -5, -4, -4, -5,
- -4, -4, -3, -3, -3, -3, -3, -2,
- -3, -2, -2, -2, -1, -2, -1, -2,
- -1, -1, -1, -1, -1, 0, -1, 0,
- -1, -1, 0, 0, -1, 0, 0, -1,
- 1, 1, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
+ -96, -95, -94, -94, -93, -92, -92, -91,
+ -91, -90, -89, -88, -88, -88, -87, -86,
+ -85, -86, -84, -84, -83, -82, -82, -81,
+ -81, -80, -80, -78, -79, -77, -77, -77,
+ -76, -76, -75, -74, -74, -73, -72, -72,
+ -72, -71, -70, -70, -69, -68, -68, -68,
+ -66, -67, -66, -65, -65, -65, -63, -63,
+ -62, -62, -61, -61, -60, -60, -60, -58,
+ -58, -58, -56, -56, -56, -55, -54, -55,
+ -54, -54, -53, -52, -51, -51, -51, -50,
+ -49, -49, -49, -49, -48, -47, -46, -46,
+ -46, -46, -45, -43, -43, -43, -43, -42,
+ -42, -42, -40, -40, -40, -39, -39, -38,
+ -38, -38, -37, -37, -36, -36, -35, -35,
+ -34, -35, -34, -33, -33, -32, -32, -31,
+ -31, -31, -30, -29, -29, -29, -28, -27,
+ -28, -28, -27, -26, -26, -25, -25, -25,
+ -24, -24, -24, -23, -23, -22, -22, -22,
+ -21, -21, -20, -20, -20, -20, -19, -18,
+ -19, -18, -18, -17, -18, -17, -16, -17,
+ -16, -15, -15, -15, -14, -14, -15, -13,
+ -13, -13, -13, -12, -12, -11, -12, -11,
+ -12, -10, -10, -10, -10, -10, -9, -10,
+ -9, -9, -9, -8, -8, -7, -8, -7,
+ -7, -7, -6, -6, -6, -7, -6, -6,
+ -5, -5, -5, -5, -5, -4, -4, -5,
+ -4, -4, -3, -3, -3, -3, -3, -2,
+ -3, -2, -2, -2, -1, -2, -1, -2,
+ -1, -1, -1, -1, -1, 0, -1, 0,
+ -1, -1, 0, 0, -1, 0, 0, -1,
+ 1, 1, 0, 0, 0, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
}
};
#else /* defined(CONFIG_CSI2_PLUS) */
static const int zoom_table[4][HRT_GDC_N] = {
- { 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
+ {
+ 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
- -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+ -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4, -7 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4
},
- { 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
+ {
+ 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4,
2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4,
94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4,
99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
- 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
- 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
- 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
- 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
- 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
- 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
- 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
- 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
- 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
- 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
- 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
- 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
- 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
- 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
- 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
- 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
- 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
- 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
- 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
- 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
- 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
- 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
- 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
- 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
- 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
- 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
- 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
- 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
- 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
- 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
- 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
- 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
- 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
- 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
- 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
- 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
- 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
- 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
- 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
- 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
- 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
- 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
- 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
- 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
- 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
- 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
- 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
- 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
- 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
- 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
- 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
- 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
- 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
- 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
- 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
- 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
- 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
- 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
- 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
- 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
- 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
- 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
- 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
- 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
- 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
- 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
- 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
- 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
- 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
- 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
- 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
- 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
- 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
- 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4
+ 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+ 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+ 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+ 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+ 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+ 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+ 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+ 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+ 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+ 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+ 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+ 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+ 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+ 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+ 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+ 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+ 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+ 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+ 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+ 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+ 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+ 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+ 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+ 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+ 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+ 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+ 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+ 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+ 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+ 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+ 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+ 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+ 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+ 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+ 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+ 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+ 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+ 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+ 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+ 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+ 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+ 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+ 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+ 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+ 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+ 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+ 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+ 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+ 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+ 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+ 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+ 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+ 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+ 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+ 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+ 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+ 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+ 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+ 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+ 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+ 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+ 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+ 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+ 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+ 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+ 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+ 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+ 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+ 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+ 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+ 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+ 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+ 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+ 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4
},
- { 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
- 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
- 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
- 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
- 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
- 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
- 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
- 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
- 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
- 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
- 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
- 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
- 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
- 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
- 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
- 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
- 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
- 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
- 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
- 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
- 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
- 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
- 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
- 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
- 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
- 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
- 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
- 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
- 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
- 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
- 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
- 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
- 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
- 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
- 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
- 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
- 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
- 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
- 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
- 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
- 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
- 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
- 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
- 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
- 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
- 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
- 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
- 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
- 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
- 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
- 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
- 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
- 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
- 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
- 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
- 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
- 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
- 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
- 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
- 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
- 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
- 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
- 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
- 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
- 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
- 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
- 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
- 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
- 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
- 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
- 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
- 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
- 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
- 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
- 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
- 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
- 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
- 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
- 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4,
- 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4,
- 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4,
- 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4,
- 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4,
- 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4,
- 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4,
- 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4,
- 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4,
- 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4,
- 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4,
- 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4,
- 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4,
- 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4,
- 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4,
- 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4,
- 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4,
- 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4,
- 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4,
- 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4,
- 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4,
- 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4,
- 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4,
- 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4,
- 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4,
- 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4,
- 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4,
- 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4,
- 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4,
- 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4,
- 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4,
- 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4,
- 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4,
- 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4,
- 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4,
- 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4,
- 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4,
- 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4,
- 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4,
- 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4,
- 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4,
- 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4,
- 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4,
- 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4,
- 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4,
- 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4
+ {
+ 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
+ 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4, 256 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4, 255 << 4,
+ 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+ 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4, 254 << 4,
+ 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+ 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4, 253 << 4,
+ 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+ 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4, 252 << 4,
+ 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+ 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4, 250 << 4,
+ 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+ 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4, 248 << 4,
+ 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+ 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4, 246 << 4,
+ 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+ 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4, 244 << 4,
+ 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+ 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4, 241 << 4,
+ 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+ 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4, 239 << 4,
+ 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+ 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4, 236 << 4,
+ 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+ 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4, 232 << 4,
+ 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+ 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4, 229 << 4,
+ 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+ 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4, 225 << 4,
+ 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+ 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4, 222 << 4,
+ 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+ 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4, 218 << 4,
+ 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+ 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4, 213 << 4,
+ 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+ 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4, 209 << 4,
+ 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+ 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4, 205 << 4,
+ 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+ 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4, 200 << 4,
+ 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+ 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4, 195 << 4,
+ 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+ 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4, 191 << 4,
+ 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+ 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4, 186 << 4,
+ 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+ 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4, 181 << 4,
+ 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+ 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4, 176 << 4,
+ 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+ 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4, 170 << 4,
+ 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+ 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4, 165 << 4,
+ 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+ 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4, 160 << 4,
+ 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+ 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4, 154 << 4,
+ 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+ 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4, 149 << 4,
+ 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+ 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4, 144 << 4,
+ 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+ 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4, 138 << 4,
+ 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+ 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4, 132 << 4,
+ 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+ 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4, 127 << 4,
+ 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+ 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4, 121 << 4,
+ 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+ 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4, 116 << 4,
+ 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+ 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4, 110 << 4,
+ 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+ 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4, 105 << 4,
+ 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
+ 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4, 99 << 4,
+ 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4,
+ 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4, 94 << 4,
+ 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4,
+ 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4, 88 << 4,
+ 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4,
+ 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4, 83 << 4,
+ 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4,
+ 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4, 78 << 4,
+ 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4,
+ 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4, 73 << 4,
+ 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4,
+ 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4, 67 << 4,
+ 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4,
+ 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4, 62 << 4,
+ 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4,
+ 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4, 58 << 4,
+ 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4,
+ 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4, 53 << 4,
+ 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4,
+ 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4, 48 << 4,
+ 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4,
+ 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4, 43 << 4,
+ 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4,
+ 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4, 39 << 4,
+ 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4,
+ 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4, 35 << 4,
+ 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4,
+ 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4, 31 << 4,
+ 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4,
+ 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4, 27 << 4,
+ 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4,
+ 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4, 23 << 4,
+ 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4,
+ 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4, 19 << 4,
+ 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4,
+ 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4, 16 << 4,
+ 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4,
+ 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4, 12 << 4,
+ 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4,
+ 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4, 9 << 4,
+ 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4,
+ 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4, 7 << 4,
+ 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4,
+ 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4, 4 << 4,
+ 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4,
+ 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4, 2 << 4
},
- { 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
+ {
+ 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
- -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+ -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4, -10 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4, -19 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4, -18 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4, -17 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4, -16 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4, -15 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4, -14 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4, -13 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4, -12 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4, -11 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4, -9 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4, -8 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4, -6 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4, -5 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4, -4 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4, -3 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4, -2 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
- -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
+ -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4, -1 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4, 0 << 4,
1 << 4, 1 << 4, 1 << 4, 1 << 4, 1 << 4, 1 << 4, 1 << 4, 1 << 4,
#endif
#else
#error "sh_css_params.c: GDC version must be \
- one of {GDC_VERSION_2}"
+one of {GDC_VERSION_2}"
#endif
static const struct ia_css_dz_config default_dz_config = {
HRT_GDC_N,
HRT_GDC_N,
- { \
+ {
+ \
{0, 0}, \
{0, 0}, \
}
static enum ia_css_err
ref_sh_css_ddr_address_map(
- struct sh_css_ddr_address_map *map,
- struct sh_css_ddr_address_map *out);
+ struct sh_css_ddr_address_map *map,
+ struct sh_css_ddr_address_map *out);
static enum ia_css_err
write_ia_css_isp_parameter_set_info_to_ddr(
- struct ia_css_isp_parameter_set_info *me,
- hrt_vaddress *out);
+ struct ia_css_isp_parameter_set_info *me,
+ hrt_vaddress *out);
static enum ia_css_err
free_ia_css_isp_parameter_set_info(hrt_vaddress ptr);
static enum ia_css_err
sh_css_params_write_to_ddr_internal(
- struct ia_css_pipe *pipe,
- unsigned int pipe_id,
- struct ia_css_isp_parameters *params,
- const struct ia_css_pipeline_stage *stage,
- struct sh_css_ddr_address_map *ddr_map,
- struct sh_css_ddr_address_map_size *ddr_map_size);
+ struct ia_css_pipe *pipe,
+ unsigned int pipe_id,
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_pipeline_stage *stage,
+ struct sh_css_ddr_address_map *ddr_map,
+ struct sh_css_ddr_address_map_size *ddr_map_size);
static enum ia_css_err
sh_css_create_isp_params(struct ia_css_stream *stream,
static bool
sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
- struct ia_css_isp_parameters *params,
- bool use_default_config,
- struct ia_css_pipe *pipe_in);
+ struct ia_css_isp_parameters *params,
+ bool use_default_config,
+ struct ia_css_pipe *pipe_in);
static enum ia_css_err
sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe_in);
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe_in);
static enum ia_css_err
sh_css_set_global_isp_config_on_pipe(
- struct ia_css_pipe *curr_pipe,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe);
+ struct ia_css_pipe *curr_pipe,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe);
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
static enum ia_css_err
sh_css_set_per_frame_isp_config_on_pipe(
- struct ia_css_stream *stream,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe);
+ struct ia_css_stream *stream,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe);
#endif
static enum ia_css_err
sh_css_update_uds_and_crop_info_based_on_zoom_region(
- const struct ia_css_binary_info *info,
- const struct ia_css_frame_info *in_frame_info,
- const struct ia_css_frame_info *out_frame_info,
- const struct ia_css_resolution *dvs_env,
- const struct ia_css_dz_config *zoom,
- const struct ia_css_vector *motion_vector,
- struct sh_css_uds_info *uds, /* out */
- struct sh_css_crop_pos *sp_out_crop_pos, /* out */
- struct ia_css_resolution pipe_in_res,
- bool enable_zoom);
+ const struct ia_css_binary_info *info,
+ const struct ia_css_frame_info *in_frame_info,
+ const struct ia_css_frame_info *out_frame_info,
+ const struct ia_css_resolution *dvs_env,
+ const struct ia_css_dz_config *zoom,
+ const struct ia_css_vector *motion_vector,
+ struct sh_css_uds_info *uds, /* out */
+ struct sh_css_crop_pos *sp_out_crop_pos, /* out */
+ struct ia_css_resolution pipe_in_res,
+ bool enable_zoom);
hrt_vaddress
sh_css_params_ddr_address_map(void)
assert(params);
data_ptr = params->fpn_config.data;
- isp_format_data_size = params->fpn_config.height * params->fpn_config.width * sizeof(uint32_t);
+ isp_format_data_size = params->fpn_config.height * params->fpn_config.width *
+ sizeof(uint32_t);
me = ia_css_host_data_allocate(isp_format_data_size);
}
static enum ia_css_err
-store_fpntbl(struct ia_css_isp_parameters *params, hrt_vaddress ptr)
-{
+store_fpntbl(struct ia_css_isp_parameters *params, hrt_vaddress ptr) {
struct ia_css_host_data *isp_data;
assert(params);
assert(ptr != mmgr_NULL);
isp_data = convert_allocate_fpntbl(params);
- if (!isp_data) {
+ if (!isp_data)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
* depends on precision of input frame data.
*/
if (val < 0) {
-/* Checkpatch patch */
+ /* Checkpatch patch */
val = 0;
} else if (val >= (1 << 13)) {
-/* Checkpatch patch */
-/* MW: BUG, is "13" a system or application property */
+ /* Checkpatch patch */
+ /* MW: BUG, is "13" a system or application property */
val = (1 << 13) - 1;
}
maxval = max(maxval, val);
*/
params->fpn_config.shift = 0;
while (maxval > 63) {
-/* MW: BUG, is "63" a system or application property */
+ /* MW: BUG, is "63" a system or application property */
maxval >>= 1;
params->fpn_config.shift++;
}
}
static enum ia_css_err
-sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe, bool *is_dp_10bpp) {
+sh_css_select_dp_10bpp_config(const struct ia_css_pipe *pipe,
+ bool *is_dp_10bpp) {
enum ia_css_err err = IA_CSS_SUCCESS;
/* Currently we check if 10bpp DPC configuration is required based
* on the use case,i.e. if BDS and DPC is both enabled. The more cleaner
* implementation. (This is because the configuration is set before a
* binary is selected, and the binary info is not available)
*/
- if ((!pipe) || (!is_dp_10bpp)) {
+ if ((!pipe) || (!is_dp_10bpp))
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
err = IA_CSS_ERR_INTERNAL_ERROR;
- } else {
+ } else
+ {
*is_dp_10bpp = false;
/* check if DPC is enabled from the host */
unsigned int required_bds_factor = SH_CSS_BDS_FACTOR_1_00;
if ((pipe->config.bayer_ds_out_res.width != 0) &&
- (pipe->config.bayer_ds_out_res.height != 0)) {
+ (pipe->config.bayer_ds_out_res.height != 0)) {
if (IA_CSS_SUCCESS == binarydesc_calculate_bds_factor(
pipe->config.input_effective_res,
pipe->config.bayer_ds_out_res,
enum ia_css_err
sh_css_set_black_frame(struct ia_css_stream *stream,
- const struct ia_css_frame *raw_black_frame)
-{
+ const struct ia_css_frame *raw_black_frame) {
struct ia_css_isp_parameters *params;
/* this function desperately needs to be moved to the ISP or SP such
* that it can use the DMA.
width = raw_black_frame->info.padded_width,
ptr = raw_black_frame->data
- + raw_black_frame->planes.raw.offset;
+ + raw_black_frame->planes.raw.offset;
IA_CSS_ENTER_PRIVATE("black_frame=%p", raw_black_frame);
if (params->fpn_config.data &&
- (params->fpn_config.width != width || params->fpn_config.height != height)) {
+ (params->fpn_config.width != width || params->fpn_config.height != height))
+ {
sh_css_free(params->fpn_config.data);
params->fpn_config.data = NULL;
}
- if (!params->fpn_config.data) {
+ if (!params->fpn_config.data)
+ {
params->fpn_config.data = sh_css_malloc(height * width * sizeof(short));
if (!params->fpn_config.data) {
IA_CSS_ERROR("out of memory");
}
/* store raw to fpntbl */
- for (y = 0; y < height; y++) {
+ for (y = 0; y < height; y++)
+ {
for (x = 0; x < width; x += (ISP_VEC_NELEMS * 2)) {
int ofs = y * width + x;
}
bool
-sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int binning_fact)
+sh_css_params_set_binning_factor(struct ia_css_stream *stream,
+ unsigned int binning_fact)
{
struct ia_css_isp_parameters *params;
static void
sh_css_update_shading_table_status(struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params)
+ struct ia_css_isp_parameters *params)
{
if (params && pipe && (pipe->pipe_num != params->sc_table_last_pipe_num)) {
params->sc_table_dirty = true;
void
ia_css_params_store_ia_css_host_data(
- hrt_vaddress ddr_addr,
- struct ia_css_host_data *data)
+ hrt_vaddress ddr_addr,
+ struct ia_css_host_data *data)
{
assert(data);
assert(data->address);
IA_CSS_ENTER_PRIVATE("");
mmgr_store(ddr_addr,
- (void *)(data->address),
- (size_t)data->size);
+ (void *)(data->address),
+ (size_t)data->size);
IA_CSS_LEAVE_PRIVATE("void");
}
struct ia_css_host_data *
ia_css_params_alloc_convert_sctbl(
- const struct ia_css_pipeline_stage *stage,
- const struct ia_css_shading_table *shading_table)
+ const struct ia_css_pipeline_stage *stage,
+ const struct ia_css_shading_table *shading_table)
{
const struct ia_css_binary *binary = stage->binary;
struct ia_css_host_data *sctbl;
aligned_width = binary->sctbl_aligned_width_per_color;
row_padding = aligned_width - shading_table->width;
- sctbl_size = shading_table->height * IA_CSS_SC_NUM_COLORS * aligned_width * sizeof(short);
+ sctbl_size = shading_table->height * IA_CSS_SC_NUM_COLORS * aligned_width *
+ sizeof(short);
sctbl = ia_css_host_data_allocate((size_t)sctbl_size);
return NULL;
ptr = (short int *)sctbl->address;
memset(ptr,
- 0,
- sctbl_size);
+ 0,
+ sctbl_size);
for (i = 0; i < shading_table->height; i++) {
for (j = 0; j < IA_CSS_SC_NUM_COLORS; j++) {
memcpy(ptr,
- &shading_table->data[j]
- [i * shading_table->width],
- shading_table->width * sizeof(short));
+ &shading_table->data[j]
+ [i * shading_table->width],
+ shading_table->width * sizeof(short));
ptr += aligned_width;
}
}
}
enum ia_css_err ia_css_params_store_sctbl(
- const struct ia_css_pipeline_stage *stage,
- hrt_vaddress sc_tbl,
- const struct ia_css_shading_table *sc_config)
+ const struct ia_css_pipeline_stage *stage,
+ hrt_vaddress sc_tbl,
+ const struct ia_css_shading_table *sc_config)
{
struct ia_css_host_data *isp_sc_tbl;
static enum ia_css_err
ia_css_process_zoom_and_motion(
- struct ia_css_isp_parameters *params,
- const struct ia_css_pipeline_stage *first_stage)
-{
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_pipeline_stage *first_stage) {
/* first_stage can be NULL */
const struct ia_css_pipeline_stage *stage;
enum ia_css_err err = IA_CSS_SUCCESS;
IA_CSS_ENTER_PRIVATE("");
/* Go through all stages to udate uds and cropping */
- for (stage = first_stage; stage; stage = stage->next) {
+ for (stage = first_stage; stage; stage = stage->next)
+ {
struct ia_css_binary *binary;
/* note: the var below is made static as it is quite large;
if it is not static it ends up on the stack which could
out_infos[0] = &args->out_frame[0]->info;
info = &stage->firmware->info.isp;
ia_css_binary_fill_info(info, false, false,
- ATOMISP_INPUT_FORMAT_RAW_10,
- args->in_frame ? &args->in_frame->info : NULL,
- NULL,
- out_infos,
- args->out_vf_frame ? &args->out_vf_frame->info
- : NULL,
- &tmp_binary,
- NULL,
- -1, true);
+ ATOMISP_INPUT_FORMAT_RAW_10,
+ args->in_frame ? &args->in_frame->info : NULL,
+ NULL,
+ out_infos,
+ args->out_vf_frame ? &args->out_vf_frame->info
+ : NULL,
+ &tmp_binary,
+ NULL,
+ -1, true);
binary = &tmp_binary;
binary->info = info;
}
if (params->dz_config.zoom_region.resolution.width == 0 &&
params->dz_config.zoom_region.resolution.height == 0) {
sh_css_update_uds_and_crop_info(
- &info->sp,
- &binary->in_frame_info,
- &binary->out_frame_info[0],
- &binary->dvs_envelope,
- ¶ms->dz_config,
- ¶ms->motion_config,
- ¶ms->uds[stage->stage_num].uds,
- ¶ms->uds[stage->stage_num].crop_pos,
- stage->enable_zoom);
+ &info->sp,
+ &binary->in_frame_info,
+ &binary->out_frame_info[0],
+ &binary->dvs_envelope,
+ ¶ms->dz_config,
+ ¶ms->motion_config,
+ ¶ms->uds[stage->stage_num].uds,
+ ¶ms->uds[stage->stage_num].crop_pos,
+ stage->enable_zoom);
} else {
err = sh_css_update_uds_and_crop_info_based_on_zoom_region(
- &info->sp,
- &binary->in_frame_info,
- &binary->out_frame_info[0],
- &binary->dvs_envelope,
- ¶ms->dz_config,
- ¶ms->motion_config,
- ¶ms->uds[stage->stage_num].uds,
- ¶ms->uds[stage->stage_num].crop_pos,
- pipe_in_res,
- stage->enable_zoom);
+ &info->sp,
+ &binary->in_frame_info,
+ &binary->out_frame_info[0],
+ &binary->dvs_envelope,
+ ¶ms->dz_config,
+ ¶ms->motion_config,
+ ¶ms->uds[stage->stage_num].uds,
+ ¶ms->uds[stage->stage_num].crop_pos,
+ pipe_in_res,
+ stage->enable_zoom);
if (err != IA_CSS_SUCCESS)
- return err;
+ return err;
}
}
params->isp_params_changed = true;
static void
sh_css_set_gamma_table(struct ia_css_isp_parameters *params,
- const struct ia_css_gamma_table *table)
+ const struct ia_css_gamma_table *table)
{
if (!table)
return;
static void
sh_css_get_gamma_table(const struct ia_css_isp_parameters *params,
- struct ia_css_gamma_table *table)
+ struct ia_css_gamma_table *table)
{
if (!table)
return;
static void
sh_css_set_ctc_table(struct ia_css_isp_parameters *params,
- const struct ia_css_ctc_table *table)
+ const struct ia_css_ctc_table *table)
{
if (!table)
return;
static void
sh_css_get_ctc_table(const struct ia_css_isp_parameters *params,
- struct ia_css_ctc_table *table)
+ struct ia_css_ctc_table *table)
{
if (!table)
return;
static void
sh_css_set_macc_table(struct ia_css_isp_parameters *params,
- const struct ia_css_macc_table *table)
+ const struct ia_css_macc_table *table)
{
if (!table)
return;
static void
sh_css_get_macc_table(const struct ia_css_isp_parameters *params,
- struct ia_css_macc_table *table)
+ struct ia_css_macc_table *table)
{
if (!table)
return;
}
void ia_css_morph_table_free(
- struct ia_css_morph_table *me)
+ struct ia_css_morph_table *me)
{
unsigned int i;
}
struct ia_css_morph_table *ia_css_morph_table_allocate(
- unsigned int width,
- unsigned int height)
+ unsigned int width,
+ unsigned int height)
{
unsigned int i;
struct ia_css_morph_table *me;
sizeof(*me->coordinates_y[i]));
if ((!me->coordinates_x[i]) ||
- (!me->coordinates_y[i])) {
+ (!me->coordinates_y[i])) {
ia_css_morph_table_free(me);
me = NULL;
return me;
}
static enum ia_css_err sh_css_params_default_morph_table(
- struct ia_css_morph_table **table,
- const struct ia_css_binary *binary)
+ struct ia_css_morph_table **table,
+ const struct ia_css_binary *binary)
{
/* MW 2400 advanced requires different scaling */
unsigned int i, j, k, step, width, height;
short start_x[IA_CSS_MORPH_TABLE_NUM_PLANES] = { -8, 0, -8, 0, 0, -8 },
- start_y[IA_CSS_MORPH_TABLE_NUM_PLANES] = { 0, 0, -8, -8, -8, 0 };
+ start_y[IA_CSS_MORPH_TABLE_NUM_PLANES] = { 0, 0, -8, -8, -8, 0 };
struct ia_css_morph_table *tab;
assert(table);
static void
sh_css_set_morph_table(struct ia_css_isp_parameters *params,
- const struct ia_css_morph_table *table)
+ const struct ia_css_morph_table *table)
{
if (!table)
return;
void
ia_css_translate_3a_statistics(
- struct ia_css_3a_statistics *host_stats,
- const struct ia_css_isp_3a_statistics_map *isp_stats)
+ struct ia_css_3a_statistics *host_stats,
+ const struct ia_css_isp_3a_statistics_map *isp_stats)
{
IA_CSS_ENTER("");
if (host_stats->grid.use_dmem) {
struct ia_css_isp_3a_statistics_map *
ia_css_isp_3a_statistics_map_allocate(
- const struct ia_css_isp_3a_statistics *isp_stats,
- void *data_ptr)
+ const struct ia_css_isp_3a_statistics *isp_stats,
+ void *data_ptr)
{
struct ia_css_isp_3a_statistics_map *me;
/* Windows compiler does not like adding sizes to a void *
me->dmem_stats = (void *)base_ptr;
me->vmem_stats_hi = (void *)(base_ptr + isp_stats->dmem_size);
me->vmem_stats_lo = (void *)(base_ptr + isp_stats->dmem_size +
- isp_stats->vmem_size);
+ isp_stats->vmem_size);
me->hmem_stats = (void *)(base_ptr + isp_stats->dmem_size +
- 2 * isp_stats->vmem_size);
+ 2 * isp_stats->vmem_size);
IA_CSS_LEAVE("map=%p", me);
return me;
enum ia_css_err
ia_css_get_3a_statistics(struct ia_css_3a_statistics *host_stats,
- const struct ia_css_isp_3a_statistics *isp_stats)
-{
+ const struct ia_css_isp_3a_statistics *isp_stats) {
struct ia_css_isp_3a_statistics_map *map;
enum ia_css_err ret = IA_CSS_SUCCESS;
assert(isp_stats);
map = ia_css_isp_3a_statistics_map_allocate(isp_stats, NULL);
- if (map) {
+ if (map)
+ {
mmgr_load(isp_stats->data_ptr, map->data_ptr, isp_stats->size);
ia_css_translate_3a_statistics(host_stats, map);
ia_css_isp_3a_statistics_map_free(map);
- } else {
+ } else
+ {
IA_CSS_ERROR("out of memory");
ret = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
*/
static void
ia_css_set_param_exceptions(const struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params)
+ struct ia_css_isp_parameters *params)
{
assert(params);
#ifdef ISP2401
static void
sh_css_set_dp_config(const struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params,
- const struct ia_css_dp_config *config)
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_dp_config *config)
{
if (!config)
return;
static void
sh_css_get_dp_config(const struct ia_css_pipe *pipe,
- const struct ia_css_isp_parameters *params,
- struct ia_css_dp_config *config)
+ const struct ia_css_isp_parameters *params,
+ struct ia_css_dp_config *config)
{
if (!config)
return;
static void
sh_css_set_nr_config(struct ia_css_isp_parameters *params,
- const struct ia_css_nr_config *config)
+ const struct ia_css_nr_config *config)
{
if (!config)
return;
static void
sh_css_set_ee_config(struct ia_css_isp_parameters *params,
- const struct ia_css_ee_config *config)
+ const struct ia_css_ee_config *config)
{
if (!config)
return;
static void
sh_css_get_ee_config(const struct ia_css_isp_parameters *params,
- struct ia_css_ee_config *config)
+ struct ia_css_ee_config *config)
{
if (!config)
return;
static void
sh_css_set_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_6axis_config *dvs_config)
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_dvs_6axis_config *dvs_config)
{
if (!dvs_config)
return;
static void
sh_css_get_pipe_dvs_6axis_config(const struct ia_css_pipe *pipe,
- const struct ia_css_isp_parameters *params,
- struct ia_css_dvs_6axis_config *dvs_config)
+ const struct ia_css_isp_parameters *params,
+ struct ia_css_dvs_6axis_config *dvs_config)
{
if (!dvs_config)
return;
(dvs_config->width_y == params->pipe_dvs_6axis_config[pipe->mode]->width_y) &&
(dvs_config->height_y == params->pipe_dvs_6axis_config[pipe->mode]->height_y) &&
(dvs_config->width_uv == params->pipe_dvs_6axis_config[pipe->mode]->width_uv) &&
- (dvs_config->height_uv == params->pipe_dvs_6axis_config[pipe->mode]->height_uv) &&
- dvs_config->xcoords_y &&
- dvs_config->ycoords_y &&
- dvs_config->xcoords_uv &&
- dvs_config->ycoords_uv)
- {
+ (dvs_config->height_uv == params->pipe_dvs_6axis_config[pipe->mode]->height_uv)
+ &&
+ dvs_config->xcoords_y &&
+ dvs_config->ycoords_y &&
+ dvs_config->xcoords_uv &&
+ dvs_config->ycoords_uv) {
copy_dvs_6axis_table(dvs_config, params->pipe_dvs_6axis_config[pipe->mode]);
}
static void
sh_css_set_baa_config(struct ia_css_isp_parameters *params,
- const struct ia_css_aa_config *config)
+ const struct ia_css_aa_config *config)
{
if (!config)
return;
static void
sh_css_get_baa_config(const struct ia_css_isp_parameters *params,
- struct ia_css_aa_config *config)
+ struct ia_css_aa_config *config)
{
if (!config)
return;
static void
sh_css_set_dz_config(struct ia_css_isp_parameters *params,
- const struct ia_css_dz_config *config)
+ const struct ia_css_dz_config *config)
{
if (!config)
return;
static void
sh_css_get_dz_config(const struct ia_css_isp_parameters *params,
- struct ia_css_dz_config *config)
+ struct ia_css_dz_config *config)
{
if (!config)
return;
static void
sh_css_set_motion_vector(struct ia_css_isp_parameters *params,
- const struct ia_css_vector *motion)
+ const struct ia_css_vector *motion)
{
if (!motion)
return;
static void
sh_css_get_motion_vector(const struct ia_css_isp_parameters *params,
- struct ia_css_vector *motion)
+ struct ia_css_vector *motion)
{
if (!motion)
return;
struct ia_css_isp_config *
sh_css_pipe_isp_config_get(struct ia_css_pipe *pipe)
{
- if (!pipe)
- {
+ if (!pipe) {
IA_CSS_ERROR("pipe=%p", NULL);
return NULL;
}
enum ia_css_err
ia_css_stream_set_isp_config(
- struct ia_css_stream *stream,
- const struct ia_css_isp_config *config)
-{
+ struct ia_css_stream *stream,
+ const struct ia_css_isp_config *config) {
return ia_css_stream_set_isp_config_on_pipe(stream, config, NULL);
}
enum ia_css_err
ia_css_stream_set_isp_config_on_pipe(
- struct ia_css_stream *stream,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe)
-{
+ struct ia_css_stream *stream,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe) {
enum ia_css_err err = IA_CSS_SUCCESS;
if ((!stream) || (!config))
enum ia_css_err
ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_config *config)
-{
+ struct ia_css_isp_config *config) {
struct ia_css_pipe *pipe_in = pipe;
enum ia_css_err err = IA_CSS_SUCCESS;
static enum ia_css_err
sh_css_set_global_isp_config_on_pipe(
- struct ia_css_pipe *curr_pipe,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe)
-{
+ struct ia_css_pipe *curr_pipe,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe) {
enum ia_css_err err = IA_CSS_SUCCESS;
enum ia_css_err err1 = IA_CSS_SUCCESS;
enum ia_css_err err2 = IA_CSS_SUCCESS;
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
static enum ia_css_err
sh_css_set_per_frame_isp_config_on_pipe(
- struct ia_css_stream *stream,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe)
-{
+ struct ia_css_stream *stream,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe) {
unsigned int i;
bool per_frame_config_created = false;
enum ia_css_err err = IA_CSS_SUCCESS;
IA_CSS_ENTER_PRIVATE("stream=%p, config=%p, pipe=%p", stream, config, pipe);
- if (!pipe) {
+ if (!pipe)
+ {
err = IA_CSS_ERR_INVALID_ARGUMENTS;
goto exit;
}
params = stream->per_frame_isp_params_configs;
/* update new ISP params object with the new config */
- if (!sh_css_init_isp_params_from_global(stream, params, false, pipe)) {
+ if (!sh_css_init_isp_params_from_global(stream, params, false, pipe))
+ {
err1 = IA_CSS_ERR_INVALID_ARGUMENTS;
}
* We do not return this error immediately, but instead continue with updating the ISP params
* to enable testing of features which are currently in TR phase. */
err = (err1 != IA_CSS_SUCCESS) ? err1 :
- (err2 != IA_CSS_SUCCESS) ? err2 :
- (err3 != IA_CSS_SUCCESS) ? err3 : err;
+ (err2 != IA_CSS_SUCCESS) ? err2 :
+ (err3 != IA_CSS_SUCCESS) ? err3 : err;
exit:
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
static enum ia_css_err
sh_css_init_isp_params_from_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_parameters *params,
- const struct ia_css_isp_config *config,
- struct ia_css_pipe *pipe_in)
-{
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_isp_config *config,
+ struct ia_css_pipe *pipe_in) {
enum ia_css_err err = IA_CSS_SUCCESS;
bool is_dp_10bpp = true;
sh_css_set_ee_config(params, config->ee_config);
sh_css_set_baa_config(params, config->baa_config);
if ((pipe->mode < IA_CSS_PIPE_ID_NUM) &&
- (params->pipe_dvs_6axis_config[pipe->mode]))
- sh_css_set_pipe_dvs_6axis_config(pipe, params, config->dvs_6axis_config);
+ (params->pipe_dvs_6axis_config[pipe->mode]))
+ sh_css_set_pipe_dvs_6axis_config(pipe, params, config->dvs_6axis_config);
sh_css_set_dz_config(params, config->dz_config);
sh_css_set_motion_vector(params, config->motion_vector);
sh_css_update_shading_table_status(pipe_in, params);
sh_css_set_macc_table(params, config->macc_table);
sh_css_set_gamma_table(params, config->gamma_table);
sh_css_set_ctc_table(params, config->ctc_table);
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
sh_css_set_shading_settings(params, config->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
params->dis_coef_table_changed = (config->dvs_coefs);
params->dvs2_coef_table_changed = (config->dvs2_coefs);
#endif
if (IA_CSS_SUCCESS ==
- sh_css_select_dp_10bpp_config(pipe, &is_dp_10bpp)) {
+ sh_css_select_dp_10bpp_config(pipe, &is_dp_10bpp))
+ {
/* return an error when both DPC and BDS is enabled by the
* user. */
/* we do not exit from this point immediately to allow internal
if (is_dp_10bpp) {
err = IA_CSS_ERR_INVALID_ARGUMENTS;
}
- } else {
+ } else
+ {
err = IA_CSS_ERR_INTERNAL_ERROR;
goto exit;
}
void
ia_css_stream_get_isp_config(
- const struct ia_css_stream *stream,
- struct ia_css_isp_config *config)
+ const struct ia_css_stream *stream,
+ struct ia_css_isp_config *config)
{
IA_CSS_ENTER("void");
ia_css_pipe_get_isp_config(stream->pipes[0], config);
void
ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe,
- struct ia_css_isp_config *config)
+ struct ia_css_isp_config *config)
{
struct ia_css_isp_parameters *params = NULL;
sh_css_get_ctc_table(params, config->ctc_table);
sh_css_get_dz_config(params, config->dz_config);
sh_css_get_motion_vector(params, config->motion_vector);
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
sh_css_get_shading_settings(params, config->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
config->output_frame = params->output_frame;
config->isp_config_id = params->isp_parameters_id;
* Deprecated: Implement mmgr_realloc()
*/
static bool realloc_isp_css_mm_buf(
- hrt_vaddress *curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err,
- uint16_t mmgr_attribute)
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err,
+ uint16_t mmgr_attribute)
{
s32 id;
id = IA_CSS_REFCOUNT_PARAM_BUFFER;
ia_css_refcount_decrement(id, *curr_buf);
*curr_buf = ia_css_refcount_increment(id, mmgr_alloc_attr(needed_size,
- mmgr_attribute));
+ mmgr_attribute));
if (!*curr_buf) {
*err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
static bool reallocate_buffer(
- hrt_vaddress *curr_buf,
- size_t *curr_size,
- size_t needed_size,
- bool force,
- enum ia_css_err *err)
+ hrt_vaddress *curr_buf,
+ size_t *curr_size,
+ size_t needed_size,
+ bool force,
+ enum ia_css_err *err)
{
bool ret;
u16 mmgr_attribute = MMGR_ATTRIBUTE_DEFAULT;
IA_CSS_ENTER_PRIVATE("void");
ret = realloc_isp_css_mm_buf(curr_buf,
- curr_size, needed_size, force, err, mmgr_attribute);
+ curr_size, needed_size, force, err, mmgr_attribute);
IA_CSS_LEAVE_PRIVATE("ret=%d", ret);
return ret;
if (grid->use_dmem) {
me->dmem_size = sizeof(struct ia_css_3a_output) *
- grid->aligned_width *
- grid->aligned_height;
+ grid->aligned_width *
+ grid->aligned_height;
} else {
me->vmem_size = ISP_S3ATBL_HI_LO_STRIDE_BYTES *
grid->aligned_height;
}
void
-ia_css_metadata_free_multiple(unsigned int num_bufs, struct ia_css_metadata **bufs)
+ia_css_metadata_free_multiple(unsigned int num_bufs,
+ struct ia_css_metadata **bufs)
{
unsigned int i;
static unsigned int g_param_buffer_enqueue_count;
enum ia_css_err
-ia_css_stream_isp_parameters_init(struct ia_css_stream *stream)
-{
+ia_css_stream_isp_parameters_init(struct ia_css_stream *stream) {
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int i;
struct sh_css_ddr_address_map *ddr_ptrs;
assert(stream);
IA_CSS_ENTER_PRIVATE("void");
- if (!stream) {
+ if (!stream)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INVALID_ARGUMENTS);
return IA_CSS_ERR_INVALID_ARGUMENTS;
}
goto ERR;
params = stream->isp_params_configs;
- if (!sh_css_init_isp_params_from_global(stream, params, true, NULL)) {
+ if (!sh_css_init_isp_params_from_global(stream, params, true, NULL))
+ {
/* we do not return the error immediately to enable internal
* firmware feature testing */
err = IA_CSS_ERR_INVALID_ARGUMENTS;
ddr_ptrs_size = ¶ms->ddr_ptrs_size;
/* create per pipe reference to general ddr_ptrs */
- for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
+ for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
+ {
ref_sh_css_ddr_address_map(ddr_ptrs, ¶ms->pipe_ddr_ptrs[i]);
params->pipe_ddr_ptrs_size[i] = *ddr_ptrs_size;
}
static void
ia_css_set_sdis_config(
- struct ia_css_isp_parameters *params,
- const struct ia_css_dvs_coefficients *dvs_coefs)
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_dvs_coefficients *dvs_coefs)
{
ia_css_set_sdis_horicoef_config(params, dvs_coefs);
ia_css_set_sdis_vertcoef_config(params, dvs_coefs);
static void
ia_css_set_sdis2_config(
- struct ia_css_isp_parameters *params,
- const struct ia_css_dvs2_coefficients *dvs2_coefs)
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_dvs2_coefficients *dvs2_coefs)
{
ia_css_set_sdis2_horicoef_config(params, dvs2_coefs);
ia_css_set_sdis2_vertcoef_config(params, dvs2_coefs);
static enum ia_css_err
sh_css_create_isp_params(struct ia_css_stream *stream,
- struct ia_css_isp_parameters **isp_params_out)
-{
+ struct ia_css_isp_parameters **isp_params_out) {
bool succ = true;
unsigned int i;
struct sh_css_ddr_address_map *ddr_ptrs;
enum ia_css_err err = IA_CSS_SUCCESS;
size_t params_size;
struct ia_css_isp_parameters *params =
- sh_css_malloc(sizeof(struct ia_css_isp_parameters));
+ sh_css_malloc(sizeof(struct ia_css_isp_parameters));
if (!params)
{
IA_CSS_ERROR("%s:%d error: cannot allocate memory", __FILE__, __LINE__);
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
- } else {
+ } else
+ {
memset(params, 0, sizeof(struct ia_css_isp_parameters));
}
ddr_ptrs = ¶ms->ddr_ptrs;
ddr_ptrs_size = ¶ms->ddr_ptrs_size;
- for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
+ for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
+ {
memset(¶ms->pipe_ddr_ptrs[i], 0,
- sizeof(params->pipe_ddr_ptrs[i]));
+ sizeof(params->pipe_ddr_ptrs[i]));
memset(¶ms->pipe_ddr_ptrs_size[i], 0,
- sizeof(params->pipe_ddr_ptrs_size[i]));
+ sizeof(params->pipe_ddr_ptrs_size[i]));
}
memset(ddr_ptrs, 0, sizeof(*ddr_ptrs));
params_size = sizeof(params->uds);
ddr_ptrs_size->isp_param = params_size;
ddr_ptrs->isp_param =
- ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
- mmgr_malloc(params_size));
+ ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+ mmgr_malloc(params_size));
succ &= (ddr_ptrs->isp_param != mmgr_NULL);
ddr_ptrs_size->macc_tbl = sizeof(struct ia_css_macc_table);
ddr_ptrs->macc_tbl =
- ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
- mmgr_malloc(sizeof(struct ia_css_macc_table)));
+ ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+ mmgr_malloc(sizeof(struct ia_css_macc_table)));
succ &= (ddr_ptrs->macc_tbl != mmgr_NULL);
*isp_params_out = params;
static bool
sh_css_init_isp_params_from_global(struct ia_css_stream *stream,
- struct ia_css_isp_parameters *params,
- bool use_default_config,
- struct ia_css_pipe *pipe_in)
+ struct ia_css_isp_parameters *params,
+ bool use_default_config,
+ struct ia_css_pipe *pipe_in)
{
bool retval = true;
int i = 0;
bool is_dp_10bpp = true;
- unsigned int isp_pipe_version = ia_css_pipe_get_isp_pipe_version(stream->pipes[0]);
+ unsigned int isp_pipe_version = ia_css_pipe_get_isp_pipe_version(
+ stream->pipes[0]);
struct ia_css_isp_parameters *stream_params = stream->isp_params_configs;
if (!use_default_config && !stream_params) {
params->output_frame = NULL;
params->isp_parameters_id = 0;
- if (use_default_config)
- {
+ if (use_default_config) {
ia_css_set_xnr3_config(params, &default_xnr3_config);
sh_css_set_nr_config(params, &default_nr_config);
sh_css_set_ctc_table(params, &default_ctc_table);
sh_css_set_baa_config(params, &default_baa_config);
sh_css_set_dz_config(params, &default_dz_config);
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
sh_css_set_shading_settings(params, &default_shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
ia_css_set_s3a_config(params, &default_3a_config);
ia_css_set_wb_config(params, &default_wb_config);
#else
for (i = 0; i < stream->num_pipes; i++) {
- if (sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp) == IA_CSS_SUCCESS) {
+ if (sh_css_select_dp_10bpp_config(stream->pipes[i],
+ &is_dp_10bpp) == IA_CSS_SUCCESS) {
/* set the return value as false if both DPC and
* BDS is enabled by the user. But we do not return
* the value immediately to enable internal firmware
#ifdef ISP2401
ia_css_tnr3_set_default_config(¶ms->tnr3_config);
#endif
- } else
- {
+ } else {
ia_css_set_xnr3_config(params, &stream_params->xnr3_config);
sh_css_set_nr_config(params, &stream_params->nr_config);
sh_css_set_ctc_table(params, &stream_params->ctc_table);
sh_css_set_baa_config(params, &stream_params->bds_config);
sh_css_set_dz_config(params, &stream_params->dz_config);
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
sh_css_set_shading_settings(params, &stream_params->shading_settings);
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
ia_css_set_s3a_config(params, &stream_params->s3a_config);
ia_css_set_wb_config(params, &stream_params->wb_config);
for (i = 0; i < stream->num_pipes; i++) {
if (IA_CSS_SUCCESS ==
- sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp)) {
+ sh_css_select_dp_10bpp_config(stream->pipes[i], &is_dp_10bpp)) {
/* set the return value as false if both DPC and
* BDS is enabled by the user. But we do not return
* the value immediately to enable internal firmware
}
if (stream->pipes[i]->mode < IA_CSS_PIPE_ID_NUM) {
sh_css_set_dp_config(stream->pipes[i], params,
- &stream_params->pipe_dp_config[stream->pipes[i]->mode]);
+ &stream_params->pipe_dp_config[stream->pipes[i]->mode]);
ia_css_set_param_exceptions(stream->pipes[i], params);
#endif
} else {
#endif
params->fpn_config.data = stream_params->fpn_config.data;
- params->config_changed[IA_CSS_FPN_ID] = stream_params->config_changed[IA_CSS_FPN_ID];
+ params->config_changed[IA_CSS_FPN_ID] =
+ stream_params->config_changed[IA_CSS_FPN_ID];
params->fpn_config.enabled = stream_params->fpn_config.enabled;
sh_css_set_motion_vector(params, &stream_params->motion_config);
if (stream_params->pipe_dvs_6axis_config[i]) {
if (params->pipe_dvs_6axis_config[i]) {
copy_dvs_6axis_table(params->pipe_dvs_6axis_config[i],
- stream_params->pipe_dvs_6axis_config[i]);
+ stream_params->pipe_dvs_6axis_config[i]);
} else {
params->pipe_dvs_6axis_config[i] =
- generate_dvs_6axis_table_from_config(stream_params->pipe_dvs_6axis_config[i]);
+ generate_dvs_6axis_table_from_config(stream_params->pipe_dvs_6axis_config[i]);
}
}
}
}
enum ia_css_err
-sh_css_params_init(void)
-{
+sh_css_params_init(void) {
int i, p;
IA_CSS_ENTER_PRIVATE("void");
g_param_buffer_dequeue_count = 0;
g_param_buffer_enqueue_count = 0;
- for (p = 0; p < IA_CSS_PIPE_ID_NUM; p++) {
+ for (p = 0; p < IA_CSS_PIPE_ID_NUM; p++)
+ {
for (i = 0; i < SH_CSS_MAX_STAGES; i++) {
xmem_sp_stage_ptrs[p][i] =
- ia_css_refcount_increment(-1,
- mmgr_calloc(1,
- sizeof(struct sh_css_sp_stage)));
+ ia_css_refcount_increment(-1,
+ mmgr_calloc(1,
+ sizeof(struct sh_css_sp_stage)));
xmem_isp_stage_ptrs[p][i] =
- ia_css_refcount_increment(-1,
- mmgr_calloc(1,
- sizeof(struct sh_css_isp_stage)));
+ ia_css_refcount_increment(-1,
+ mmgr_calloc(1,
+ sizeof(struct sh_css_isp_stage)));
if ((xmem_sp_stage_ptrs[p][i] == mmgr_NULL) ||
(xmem_isp_stage_ptrs[p][i] == mmgr_NULL)) {
ia_css_config_xnr_table();
sp_ddr_ptrs = ia_css_refcount_increment(-1, mmgr_calloc(1,
- CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
- HIVE_ISP_DDR_WORD_BYTES)));
+ CEIL_MUL(sizeof(struct sh_css_ddr_address_map),
+ HIVE_ISP_DDR_WORD_BYTES)));
xmem_sp_group_ptrs = ia_css_refcount_increment(-1, mmgr_calloc(1,
- sizeof(struct sh_css_sp_group)));
+ sizeof(struct sh_css_sp_group)));
if ((sp_ddr_ptrs == mmgr_NULL) ||
- (xmem_sp_group_ptrs == mmgr_NULL)) {
+ (xmem_sp_group_ptrs == mmgr_NULL))
+ {
ia_css_uninit();
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
* ia_css_init() has been called. */
if (pipe->stream && pipe->stream->started) {
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "unable to set scaler lut since stream has started\n");
+ "unable to set scaler lut since stream has started\n");
#ifndef ISP2401
store = false;
#else
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
#else
ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR,
- "unable to allocate scaler_pp_lut\n");
+ "unable to allocate scaler_pp_lut\n");
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
} else {
gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut,
- interleaved_lut_temp);
+ interleaved_lut_temp);
mmgr_store(pipe->scaler_pp_lut,
- (int *)interleaved_lut_temp,
- sizeof(zoom_table));
+ (int *)interleaved_lut_temp,
+ sizeof(zoom_table));
#endif
}
#ifndef ISP2401
- gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut, interleaved_lut_temp);
+ gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut,
+ interleaved_lut_temp);
mmgr_store(pipe->scaler_pp_lut, (int *)interleaved_lut_temp,
- sizeof(zoom_table));
+ sizeof(zoom_table));
#endif
}
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])zoom_table,
- interleaved_lut_temp);
+ interleaved_lut_temp);
mmgr_store(default_gdc_lut, (int *)interleaved_lut_temp,
- sizeof(zoom_table));
+ sizeof(zoom_table));
IA_CSS_LEAVE_PRIVATE("lut(%u) err=%d", default_gdc_lut, err);
return err;
}
static void free_param_set_callback(
- hrt_vaddress ptr)
+ hrt_vaddress ptr)
{
IA_CSS_ENTER_PRIVATE("void");
}
static void free_buffer_callback(
- hrt_vaddress ptr)
+ hrt_vaddress ptr)
{
IA_CSS_ENTER_PRIVATE("void");
/* free buffers */
for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
- sizeof(size_t)); i++) {
+ sizeof(size_t)); i++) {
if (addrs[i] == mmgr_NULL)
continue;
safe_free(IA_CSS_REFCOUNT_PARAM_BUFFER, addrs[i]);
int i;
struct ia_css_isp_parameters *params = stream->isp_params_configs;
struct ia_css_isp_parameters *per_frame_params =
- stream->per_frame_isp_params_configs;
+ stream->per_frame_isp_params_configs;
IA_CSS_ENTER_PRIVATE("void");
if (!params) {
}
/* free existing ddr_ptr maps */
- for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++)
- {
+ for (i = 0; i < IA_CSS_PIPE_ID_NUM; i++) {
free_map(¶ms->pipe_ddr_ptrs[i]);
if (per_frame_params)
free_map(&per_frame_params->pipe_ddr_ptrs[i]);
static struct ia_css_host_data *
convert_allocate_morph_plane(
- unsigned short *data,
- unsigned int width,
- unsigned int height,
- unsigned int aligned_width)
+ unsigned short *data,
+ unsigned int width,
+ unsigned int height,
+ unsigned int aligned_width)
{
unsigned int i, j, padding, w;
struct ia_css_host_data *me;
static enum ia_css_err
store_morph_plane(
- unsigned short *data,
- unsigned int width,
- unsigned int height,
- hrt_vaddress dest,
- unsigned int aligned_width)
-{
+ unsigned short *data,
+ unsigned int width,
+ unsigned int height,
+ hrt_vaddress dest,
+ unsigned int aligned_width) {
struct ia_css_host_data *isp_data;
assert(dest != mmgr_NULL);
isp_data = convert_allocate_morph_plane(data, width, height, aligned_width);
- if (!isp_data) {
+ if (!isp_data)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
}
static void sh_css_update_isp_params_to_ddr(
- struct ia_css_isp_parameters *params,
- hrt_vaddress ddr_ptr)
+ struct ia_css_isp_parameters *params,
+ hrt_vaddress ddr_ptr)
{
size_t size = sizeof(params->uds);
}
static void sh_css_update_isp_mem_params_to_ddr(
- const struct ia_css_binary *binary,
- hrt_vaddress ddr_mem_ptr,
- size_t size,
- enum ia_css_isp_memories mem)
+ const struct ia_css_binary *binary,
+ hrt_vaddress ddr_mem_ptr,
+ size_t size,
+ enum ia_css_isp_memories mem)
{
const struct ia_css_host_data *params;
IA_CSS_ENTER_PRIVATE("void");
- params = ia_css_isp_param_get_mem_init(&binary->mem_params, IA_CSS_PARAM_CLASS_PARAM, mem);
+ params = ia_css_isp_param_get_mem_init(&binary->mem_params,
+ IA_CSS_PARAM_CLASS_PARAM, mem);
mmgr_store(ddr_mem_ptr, params->address, size);
IA_CSS_LEAVE_PRIVATE("void");
unsigned int i;
hrt_vaddress cpy;
enum sh_css_queue_id param_queue_ids[3] = { IA_CSS_PARAMETER_SET_QUEUE_ID,
- IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID,
- SH_CSS_INVALID_QUEUE_ID};
+ IA_CSS_PER_FRAME_PARAMETER_SET_QUEUE_ID,
+ SH_CSS_INVALID_QUEUE_ID
+ };
IA_CSS_ENTER_PRIVATE("void");
for (i = 0; SH_CSS_INVALID_QUEUE_ID != param_queue_ids[i]; i++) {
cpy = (hrt_vaddress)0;
/* clean-up old copy */
- while (ia_css_bufq_dequeue_buffer(param_queue_ids[i], (uint32_t *)&cpy) == IA_CSS_SUCCESS) {
+ while (ia_css_bufq_dequeue_buffer(param_queue_ids[i],
+ (uint32_t *)&cpy) == IA_CSS_SUCCESS) {
/* TMP: keep track of dequeued param set count
*/
g_param_buffer_dequeue_count++;
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
- 0,
- param_queue_ids[i],
- 0);
+ IA_CSS_PSYS_SW_EVENT_BUFFER_DEQUEUED,
+ 0,
+ param_queue_ids[i],
+ 0);
IA_CSS_LOG("dequeued param set %x from %d, release ref", cpy, 0);
free_ia_css_isp_parameter_set_info(cpy);
if (params->config_changed[IA_CSS_OB_ID]) {
ia_css_ob_configure(¶ms->stream_configs.ob,
- isp_pipe_version, raw_bit_depth);
+ isp_pipe_version, raw_bit_depth);
}
if (params->config_changed[IA_CSS_S3A_ID]) {
ia_css_s3a_configure(raw_bit_depth);
enum ia_css_err
sh_css_param_update_isp_params(struct ia_css_pipe *curr_pipe,
- struct ia_css_isp_parameters *params,
- bool commit,
- struct ia_css_pipe *pipe_in)
-{
+ struct ia_css_isp_parameters *params,
+ bool commit,
+ struct ia_css_pipe *pipe_in) {
enum ia_css_err err = IA_CSS_SUCCESS;
hrt_vaddress cpy;
int i;
raw_bit_depth = ia_css_stream_input_format_bits_per_pixel(curr_pipe->stream);
/* now make the map available to the sp */
- if (!commit) {
+ if (!commit)
+ {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
/* enqueue a copies of the mem_map to
the designated pipelines */
- for (i = 0; i < curr_pipe->stream->num_pipes; i++) {
+ for (i = 0; i < curr_pipe->stream->num_pipes; i++)
+ {
struct ia_css_pipe *pipe;
struct sh_css_ddr_address_map *cur_map;
struct sh_css_ddr_address_map_size *cur_map_size;
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
ia_css_query_internal_queue_id(params->output_frame
- ? IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET
- : IA_CSS_BUFFER_TYPE_PARAMETER_SET,
- thread_id, &queue_id);
+ ? IA_CSS_BUFFER_TYPE_PER_FRAME_PARAMETER_SET
+ : IA_CSS_BUFFER_TYPE_PARAMETER_SET,
+ thread_id, &queue_id);
#else
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_PARAMETER_SET, thread_id, &queue_id);
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_PARAMETER_SET, thread_id,
+ &queue_id);
#endif
if (!sh_css_sp_is_running()) {
/* SP is not running. The queues are not valid */
/* we have to do this per pipeline because */
/* the processing is a.o. resolution dependent */
err = ia_css_process_zoom_and_motion(params,
- pipeline->stages);
+ pipeline->stages);
if (err != IA_CSS_SUCCESS)
- return err;
+ return err;
}
/* check if to actually update the parameters for this pipe */
/* When API change is implemented making good distinction between
continue;
process_kernel_parameters(pipeline->pipe_id,
- stage, params,
- isp_pipe_version, raw_bit_depth);
+ stage, params,
+ isp_pipe_version, raw_bit_depth);
err = sh_css_params_write_to_ddr_internal(
- pipe,
- pipeline->pipe_id,
- params,
- stage,
- cur_map,
- cur_map_size);
+ pipe,
+ pipeline->pipe_id,
+ params,
+ stage,
+ cur_map,
+ cur_map_size);
if (err != IA_CSS_SUCCESS)
break;
/* update isp_params to pipe specific copies */
if (params->isp_params_changed) {
reallocate_buffer(&cur_map->isp_param,
- &cur_map_size->isp_param,
- cur_map_size->isp_param,
- true,
- &err);
+ &cur_map_size->isp_param,
+ cur_map_size->isp_param,
+ true,
+ &err);
if (err != IA_CSS_SUCCESS)
break;
sh_css_update_isp_params_to_ddr(params, cur_map->isp_param);
/* last make referenced copy */
err = ref_sh_css_ddr_address_map(
- cur_map,
- &isp_params_info.mem_map);
+ cur_map,
+ &isp_params_info.mem_map);
if (err != IA_CSS_SUCCESS)
break;
/* Update output frame pointer */
isp_params_info.output_frame_ptr =
- (params->output_frame) ? params->output_frame->data : mmgr_NULL;
+ (params->output_frame) ? params->output_frame->data : mmgr_NULL;
/* now write the copy to ddr */
err = write_ia_css_isp_parameter_set_info_to_ddr(&isp_params_info, &cpy);
free_ia_css_isp_parameter_set_info(cpy);
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
IA_CSS_LOG("pfp: FAILED to add config id %d for OF %d to q %d on thread %d",
- isp_params_info.isp_parameters_id,
- isp_params_info.output_frame_ptr,
- queue_id, thread_id);
+ isp_params_info.isp_parameters_id,
+ isp_params_info.output_frame_ptr,
+ queue_id, thread_id);
#endif
break;
} else {
return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE;
}
ia_css_bufq_enqueue_psys_event(
- IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
- (uint8_t)thread_id,
- (uint8_t)queue_id,
- 0);
+ IA_CSS_PSYS_SW_EVENT_BUFFER_ENQUEUED,
+ (uint8_t)thread_id,
+ (uint8_t)queue_id,
+ 0);
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
IA_CSS_LOG("pfp: added config id %d for OF %d to q %d on thread %d",
- isp_params_info.isp_parameters_id,
- isp_params_info.output_frame_ptr,
- queue_id, thread_id);
+ isp_params_info.isp_parameters_id,
+ isp_params_info.output_frame_ptr,
+ queue_id, thread_id);
#endif
}
/* clean-up old copy */
params->morph_table_changed = false;
params->dz_config_changed = false;
params->motion_config_changed = false;
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
params->shading_settings_changed = false;
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
memset(¶ms->config_changed[0], 0, sizeof(params->config_changed));
static enum ia_css_err
sh_css_params_write_to_ddr_internal(
- struct ia_css_pipe *pipe,
- unsigned int pipe_id,
- struct ia_css_isp_parameters *params,
- const struct ia_css_pipeline_stage *stage,
- struct sh_css_ddr_address_map *ddr_map,
- struct sh_css_ddr_address_map_size *ddr_map_size)
-{
+ struct ia_css_pipe *pipe,
+ unsigned int pipe_id,
+ struct ia_css_isp_parameters *params,
+ const struct ia_css_pipeline_stage *stage,
+ struct sh_css_ddr_address_map *ddr_map,
+ struct sh_css_ddr_address_map_size *ddr_map_size) {
enum ia_css_err err;
const struct ia_css_binary *binary;
stage_num = stage->stage_num;
- if (binary->info->sp.enable.fpnr) {
+ if (binary->info->sp.enable.fpnr)
+ {
buff_realloced = reallocate_buffer(&ddr_map->fpn_tbl,
- &ddr_map_size->fpn_tbl,
- (size_t)(FPNTBL_BYTES(binary)),
- params->config_changed[IA_CSS_FPN_ID],
- &err);
+ &ddr_map_size->fpn_tbl,
+ (size_t)(FPNTBL_BYTES(binary)),
+ params->config_changed[IA_CSS_FPN_ID],
+ &err);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
}
- if (binary->info->sp.enable.sc) {
+ if (binary->info->sp.enable.sc)
+ {
u32 enable_conv = params->
- shading_settings.enable_shading_table_conversion;
+ shading_settings.enable_shading_table_conversion;
buff_realloced = reallocate_buffer(&ddr_map->sc_tbl,
- &ddr_map_size->sc_tbl,
- (size_t)(SCTBL_BYTES(binary)),
- params->sc_table_changed,
- &err);
+ &ddr_map_size->sc_tbl,
+ (size_t)(SCTBL_BYTES(binary)),
+ params->sc_table_changed,
+ &err);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
sh_css_params_shading_id_table_generate(¶ms->sc_config, binary);
#else
sh_css_params_shading_id_table_generate(¶ms->sc_config,
- binary->sctbl_width_per_color, binary->sctbl_height);
+ binary->sctbl_width_per_color, binary->sctbl_height);
#endif
if (!params->sc_config) {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
params->sc_config = NULL;
}
} else { /* legacy */
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
/* shading table is full resolution, reduce */
if (params->sc_config) {
ia_css_shading_table_free(params->sc_config);
params->sc_config = NULL;
}
prepare_shading_table(
- (const struct ia_css_shading_table *)params->sc_table,
- params->sensor_binning,
- ¶ms->sc_config,
- binary, pipe->required_bds_factor);
+ (const struct ia_css_shading_table *)params->sc_table,
+ params->sensor_binning,
+ ¶ms->sc_config,
+ binary, pipe->required_bds_factor);
if (!params->sc_config) {
IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
/* free the shading table */
ia_css_shading_table_free(params->sc_config);
params->sc_config = NULL;
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
}
}
}
/* DPC configuration is made pipe specific to allow flexibility in positioning of the
* DPC kernel. The code below sets the pipe specific configuration to
* individual binaries. */
- if (params->pipe_dpc_config_changed[pipe_id] && binary->info->sp.enable.dpc) {
- unsigned int size = stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
+ if (params->pipe_dpc_config_changed[pipe_id] && binary->info->sp.enable.dpc)
+ {
+ unsigned int size =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.size;
- unsigned int offset = stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
+ unsigned int offset =
+ stage->binary->info->mem_offsets.offsets.param->dmem.dp.offset;
if (size) {
ia_css_dp_encode((struct sh_css_isp_dp_params *)
- &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
- ¶ms->pipe_dp_config[pipe_id], size);
+ &binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset],
+ ¶ms->pipe_dp_config[pipe_id], size);
#endif
#ifdef ISP2401
params->isp_params_changed = true;
- params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] = true;
+ params->isp_mem_params_changed[pipe_id][stage->stage_num][IA_CSS_ISP_DMEM] =
+ true;
}
}
#endif
- if (params->config_changed[IA_CSS_MACC_ID] && binary->info->sp.enable.macc) {
+ if (params->config_changed[IA_CSS_MACC_ID] && binary->info->sp.enable.macc)
+ {
unsigned int i, j, idx;
unsigned int idx_map[] = {
- 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8};
+ 0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8
+ };
for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
idx = 4 * idx_map[i];
if (binary->info->sp.pipeline.isp_pipe_version == SH_CSS_ISP_PIPE_VERSION_1) {
converted_macc_table.data[idx] =
- (int16_t)sDIGIT_FITTING(params->macc_table.data[j],
- 13, SH_CSS_MACC_COEF_SHIFT);
+ (int16_t)sDIGIT_FITTING(params->macc_table.data[j],
+ 13, SH_CSS_MACC_COEF_SHIFT);
converted_macc_table.data[idx + 1] =
- (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 1],
- 13, SH_CSS_MACC_COEF_SHIFT);
+ (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 1],
+ 13, SH_CSS_MACC_COEF_SHIFT);
converted_macc_table.data[idx + 2] =
- (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 2],
- 13, SH_CSS_MACC_COEF_SHIFT);
+ (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 2],
+ 13, SH_CSS_MACC_COEF_SHIFT);
converted_macc_table.data[idx + 3] =
- (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 3],
- 13, SH_CSS_MACC_COEF_SHIFT);
- } else if (binary->info->sp.pipeline.isp_pipe_version == SH_CSS_ISP_PIPE_VERSION_2_2) {
+ (int16_t)sDIGIT_FITTING(params->macc_table.data[j + 3],
+ 13, SH_CSS_MACC_COEF_SHIFT);
+ } else if (binary->info->sp.pipeline.isp_pipe_version ==
+ SH_CSS_ISP_PIPE_VERSION_2_2) {
converted_macc_table.data[idx] =
- params->macc_table.data[j];
+ params->macc_table.data[j];
converted_macc_table.data[idx + 1] =
- params->macc_table.data[j + 1];
+ params->macc_table.data[j + 1];
converted_macc_table.data[idx + 2] =
- params->macc_table.data[j + 2];
+ params->macc_table.data[j + 2];
converted_macc_table.data[idx + 3] =
- params->macc_table.data[j + 3];
+ params->macc_table.data[j + 3];
}
}
reallocate_buffer(&ddr_map->macc_tbl,
return err;
}
mmgr_store(ddr_map->macc_tbl,
- converted_macc_table.data,
- sizeof(converted_macc_table.data));
+ converted_macc_table.data,
+ sizeof(converted_macc_table.data));
}
- if (binary->info->sp.enable.dvs_6axis) {
+ if (binary->info->sp.enable.dvs_6axis)
+ {
/* because UV is packed into the Y plane, calc total
* YYU size = /2 gives size of UV-only,
* total YYU size = UV-only * 3.
*/
buff_realloced = reallocate_buffer(
- &ddr_map->dvs_6axis_params_y,
- &ddr_map_size->dvs_6axis_params_y,
- (size_t)((DVS_6AXIS_BYTES(binary) / 2) * 3),
- params->pipe_dvs_6axis_config_changed[pipe_id],
- &err);
+ &ddr_map->dvs_6axis_params_y,
+ &ddr_map_size->dvs_6axis_params_y,
+ (size_t)((DVS_6AXIS_BYTES(binary) / 2) * 3),
+ params->pipe_dvs_6axis_config_changed[pipe_id],
+ &err);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
if (binary->dvs_envelope.width || binary->dvs_envelope.height) {
dvs_offset.width =
#endif
- (PIX_SHIFT_FILTER_RUN_IN_X + binary->dvs_envelope.width) / 2;
+ (PIX_SHIFT_FILTER_RUN_IN_X + binary->dvs_envelope.width) / 2;
#ifndef ISP2401
dvs_offset.height =
#else
- dvs_offset.height =
+ dvs_offset.height =
#endif
- (PIX_SHIFT_FILTER_RUN_IN_Y + binary->dvs_envelope.height) / 2;
+ (PIX_SHIFT_FILTER_RUN_IN_Y + binary->dvs_envelope.height) / 2;
#ifdef ISP2401
- }
+ }
#endif
- params->pipe_dvs_6axis_config[pipe_id] =
- generate_dvs_6axis_table(&binary->out_frame_info[0].res, &dvs_offset);
- if (!params->pipe_dvs_6axis_config[pipe_id]) {
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
- return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
- }
- params->pipe_dvs_6axis_config_changed[pipe_id] = true;
+ params->pipe_dvs_6axis_config[pipe_id] =
+ generate_dvs_6axis_table(&binary->out_frame_info[0].res, &dvs_offset);
+ if (!params->pipe_dvs_6axis_config[pipe_id]) {
+ IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY);
+ return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
}
-
- store_dvs_6axis_config(params->pipe_dvs_6axis_config[pipe_id],
- binary,
- dvs_in_frame_info,
- ddr_map->dvs_6axis_params_y);
- params->isp_params_changed = true;
+ params->pipe_dvs_6axis_config_changed[pipe_id] = true;
}
+
+ store_dvs_6axis_config(params->pipe_dvs_6axis_config[pipe_id],
+ binary,
+ dvs_in_frame_info,
+ ddr_map->dvs_6axis_params_y);
+ params->isp_params_changed = true;
}
+}
- if (binary->info->sp.enable.ca_gdc) {
- unsigned int i;
- hrt_vaddress *virt_addr_tetra_x[
- IA_CSS_MORPH_TABLE_NUM_PLANES];
- size_t *virt_size_tetra_x[
- IA_CSS_MORPH_TABLE_NUM_PLANES];
- hrt_vaddress *virt_addr_tetra_y[
- IA_CSS_MORPH_TABLE_NUM_PLANES];
- size_t *virt_size_tetra_y[
- IA_CSS_MORPH_TABLE_NUM_PLANES];
-
- virt_addr_tetra_x[0] = &ddr_map->tetra_r_x;
- virt_addr_tetra_x[1] = &ddr_map->tetra_gr_x;
- virt_addr_tetra_x[2] = &ddr_map->tetra_gb_x;
- virt_addr_tetra_x[3] = &ddr_map->tetra_b_x;
- virt_addr_tetra_x[4] = &ddr_map->tetra_ratb_x;
- virt_addr_tetra_x[5] = &ddr_map->tetra_batr_x;
-
- virt_size_tetra_x[0] = &ddr_map_size->tetra_r_x;
- virt_size_tetra_x[1] = &ddr_map_size->tetra_gr_x;
- virt_size_tetra_x[2] = &ddr_map_size->tetra_gb_x;
- virt_size_tetra_x[3] = &ddr_map_size->tetra_b_x;
- virt_size_tetra_x[4] = &ddr_map_size->tetra_ratb_x;
- virt_size_tetra_x[5] = &ddr_map_size->tetra_batr_x;
-
- virt_addr_tetra_y[0] = &ddr_map->tetra_r_y;
- virt_addr_tetra_y[1] = &ddr_map->tetra_gr_y;
- virt_addr_tetra_y[2] = &ddr_map->tetra_gb_y;
- virt_addr_tetra_y[3] = &ddr_map->tetra_b_y;
- virt_addr_tetra_y[4] = &ddr_map->tetra_ratb_y;
- virt_addr_tetra_y[5] = &ddr_map->tetra_batr_y;
-
- virt_size_tetra_y[0] = &ddr_map_size->tetra_r_y;
- virt_size_tetra_y[1] = &ddr_map_size->tetra_gr_y;
- virt_size_tetra_y[2] = &ddr_map_size->tetra_gb_y;
- virt_size_tetra_y[3] = &ddr_map_size->tetra_b_y;
- virt_size_tetra_y[4] = &ddr_map_size->tetra_ratb_y;
- virt_size_tetra_y[5] = &ddr_map_size->tetra_batr_y;
-
- buff_realloced = false;
- for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
- buff_realloced |=
- reallocate_buffer(virt_addr_tetra_x[i],
- virt_size_tetra_x[i],
- (size_t)
- (MORPH_PLANE_BYTES(binary)),
- params->morph_table_changed,
- &err);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- buff_realloced |=
- reallocate_buffer(virt_addr_tetra_y[i],
- virt_size_tetra_y[i],
- (size_t)
- (MORPH_PLANE_BYTES(binary)),
- params->morph_table_changed,
- &err);
+if (binary->info->sp.enable.ca_gdc)
+{
+ unsigned int i;
+ hrt_vaddress *virt_addr_tetra_x[
+ IA_CSS_MORPH_TABLE_NUM_PLANES];
+ size_t *virt_size_tetra_x[
+ IA_CSS_MORPH_TABLE_NUM_PLANES];
+ hrt_vaddress *virt_addr_tetra_y[
+ IA_CSS_MORPH_TABLE_NUM_PLANES];
+ size_t *virt_size_tetra_y[
+ IA_CSS_MORPH_TABLE_NUM_PLANES];
+
+ virt_addr_tetra_x[0] = &ddr_map->tetra_r_x;
+ virt_addr_tetra_x[1] = &ddr_map->tetra_gr_x;
+ virt_addr_tetra_x[2] = &ddr_map->tetra_gb_x;
+ virt_addr_tetra_x[3] = &ddr_map->tetra_b_x;
+ virt_addr_tetra_x[4] = &ddr_map->tetra_ratb_x;
+ virt_addr_tetra_x[5] = &ddr_map->tetra_batr_x;
+
+ virt_size_tetra_x[0] = &ddr_map_size->tetra_r_x;
+ virt_size_tetra_x[1] = &ddr_map_size->tetra_gr_x;
+ virt_size_tetra_x[2] = &ddr_map_size->tetra_gb_x;
+ virt_size_tetra_x[3] = &ddr_map_size->tetra_b_x;
+ virt_size_tetra_x[4] = &ddr_map_size->tetra_ratb_x;
+ virt_size_tetra_x[5] = &ddr_map_size->tetra_batr_x;
+
+ virt_addr_tetra_y[0] = &ddr_map->tetra_r_y;
+ virt_addr_tetra_y[1] = &ddr_map->tetra_gr_y;
+ virt_addr_tetra_y[2] = &ddr_map->tetra_gb_y;
+ virt_addr_tetra_y[3] = &ddr_map->tetra_b_y;
+ virt_addr_tetra_y[4] = &ddr_map->tetra_ratb_y;
+ virt_addr_tetra_y[5] = &ddr_map->tetra_batr_y;
+
+ virt_size_tetra_y[0] = &ddr_map_size->tetra_r_y;
+ virt_size_tetra_y[1] = &ddr_map_size->tetra_gr_y;
+ virt_size_tetra_y[2] = &ddr_map_size->tetra_gb_y;
+ virt_size_tetra_y[3] = &ddr_map_size->tetra_b_y;
+ virt_size_tetra_y[4] = &ddr_map_size->tetra_ratb_y;
+ virt_size_tetra_y[5] = &ddr_map_size->tetra_batr_y;
+
+ buff_realloced = false;
+ for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
+ buff_realloced |=
+ reallocate_buffer(virt_addr_tetra_x[i],
+ virt_size_tetra_x[i],
+ (size_t)
+ (MORPH_PLANE_BYTES(binary)),
+ params->morph_table_changed,
+ &err);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ buff_realloced |=
+ reallocate_buffer(virt_addr_tetra_y[i],
+ virt_size_tetra_y[i],
+ (size_t)
+ (MORPH_PLANE_BYTES(binary)),
+ params->morph_table_changed,
+ &err);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ }
+ if (params->morph_table_changed || buff_realloced) {
+ const struct ia_css_morph_table *table = params->morph_table;
+ struct ia_css_morph_table *id_table = NULL;
+
+ if ((table) &&
+ (table->width < binary->morph_tbl_width ||
+ table->height < binary->morph_tbl_height)) {
+ table = NULL;
+ }
+ if (!table) {
+ err = sh_css_params_default_morph_table(&id_table,
+ binary);
if (err != IA_CSS_SUCCESS) {
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
+ table = id_table;
}
- if (params->morph_table_changed || buff_realloced) {
- const struct ia_css_morph_table *table = params->morph_table;
- struct ia_css_morph_table *id_table = NULL;
-
- if ((table) &&
- (table->width < binary->morph_tbl_width ||
- table->height < binary->morph_tbl_height)) {
- table = NULL;
- }
- if (!table) {
- err = sh_css_params_default_morph_table(&id_table,
- binary);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- table = id_table;
- }
- for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
- store_morph_plane(table->coordinates_x[i],
- table->width,
- table->height,
- *virt_addr_tetra_x[i],
- binary->morph_tbl_aligned_width);
- store_morph_plane(table->coordinates_y[i],
- table->width,
- table->height,
- *virt_addr_tetra_y[i],
- binary->morph_tbl_aligned_width);
- }
- if (id_table)
- ia_css_morph_table_free(id_table);
+ for (i = 0; i < IA_CSS_MORPH_TABLE_NUM_PLANES; i++) {
+ store_morph_plane(table->coordinates_x[i],
+ table->width,
+ table->height,
+ *virt_addr_tetra_x[i],
+ binary->morph_tbl_aligned_width);
+ store_morph_plane(table->coordinates_y[i],
+ table->width,
+ table->height,
+ *virt_addr_tetra_y[i],
+ binary->morph_tbl_aligned_width);
}
+ if (id_table)
+ ia_css_morph_table_free(id_table);
}
+}
- /* After special cases like SC, FPN since they may change parameters */
- for (mem = 0; mem < N_IA_CSS_MEMORIES; mem++) {
- const struct ia_css_isp_data *isp_data =
- ia_css_isp_param_get_isp_mem_init(&binary->info->sp.mem_initializers, IA_CSS_PARAM_CLASS_PARAM, mem);
- size_t size = isp_data->size;
-
- if (!size) continue;
- buff_realloced = reallocate_buffer(&ddr_map->isp_mem_param[stage_num][mem],
- &ddr_map_size->isp_mem_param[stage_num][mem],
- size,
- params->isp_mem_params_changed[pipe_id][stage_num][mem],
- &err);
- if (err != IA_CSS_SUCCESS) {
- IA_CSS_LEAVE_ERR_PRIVATE(err);
- return err;
- }
- if (params->isp_mem_params_changed[pipe_id][stage_num][mem] || buff_realloced) {
- sh_css_update_isp_mem_params_to_ddr(binary,
- ddr_map->isp_mem_param[stage_num][mem],
- ddr_map_size->isp_mem_param[stage_num][mem], mem);
- }
+/* After special cases like SC, FPN since they may change parameters */
+for (mem = 0; mem < N_IA_CSS_MEMORIES; mem++)
+{
+ const struct ia_css_isp_data *isp_data =
+ ia_css_isp_param_get_isp_mem_init(&binary->info->sp.mem_initializers,
+ IA_CSS_PARAM_CLASS_PARAM, mem);
+ size_t size = isp_data->size;
+
+ if (!size) continue;
+ buff_realloced = reallocate_buffer(&ddr_map->isp_mem_param[stage_num][mem],
+ &ddr_map_size->isp_mem_param[stage_num][mem],
+ size,
+ params->isp_mem_params_changed[pipe_id][stage_num][mem],
+ &err);
+ if (err != IA_CSS_SUCCESS) {
+ IA_CSS_LEAVE_ERR_PRIVATE(err);
+ return err;
+ }
+ if (params->isp_mem_params_changed[pipe_id][stage_num][mem] || buff_realloced) {
+ sh_css_update_isp_mem_params_to_ddr(binary,
+ ddr_map->isp_mem_param[stage_num][mem],
+ ddr_map_size->isp_mem_param[stage_num][mem], mem);
}
+}
- IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
- return IA_CSS_SUCCESS;
+IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
+return IA_CSS_SUCCESS;
}
-const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream *stream)
+const struct ia_css_fpn_table *ia_css_get_fpn_table(struct ia_css_stream
+ *stream)
{
struct ia_css_isp_parameters *params;
return ¶ms->fpn_config;
}
-struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream *stream)
+struct ia_css_shading_table *ia_css_get_shading_table(struct ia_css_stream
+ *stream)
{
struct ia_css_shading_table *table = NULL;
struct ia_css_isp_parameters *params;
table = (struct ia_css_shading_table *)params->sc_table;
} else {
const struct ia_css_binary *binary
- = ia_css_stream_get_shading_correction_binary(stream);
+ = ia_css_stream_get_shading_correction_binary(stream);
if (binary) {
/* generate the identical shading table */
if (params->sc_config) {
#else
sh_css_params_shading_id_table_generate(¶ms->sc_config,
- binary->sctbl_width_per_color, binary->sctbl_height);
+ binary->sctbl_width_per_color, binary->sctbl_height);
#endif
table = params->sc_config;
/* The sc_config will be freed in the
}
}
} else {
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
const struct ia_css_binary *binary
- = ia_css_stream_get_shading_correction_binary(stream);
+ = ia_css_stream_get_shading_correction_binary(stream);
struct ia_css_pipe *pipe;
/**********************************************************************/
params->sc_config = NULL;
}
prepare_shading_table(
- (const struct ia_css_shading_table *)params->sc_table,
- params->sensor_binning,
- ¶ms->sc_config,
- binary, pipe->required_bds_factor);
+ (const struct ia_css_shading_table *)params->sc_table,
+ params->sensor_binning,
+ ¶ms->sc_config,
+ binary, pipe->required_bds_factor);
table = params->sc_config;
/* The sc_config will be freed in the
* ia_css_stream_isp_parameters_uninit function. */
}
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
}
IA_CSS_LEAVE("table=%p", table);
{
IA_CSS_ENTER_LEAVE_PRIVATE("void");
mmgr_store(xmem_sp_group_ptrs,
- &sh_css_sp_group,
- sizeof(struct sh_css_sp_group));
+ &sh_css_sp_group,
+ sizeof(struct sh_css_sp_group));
return xmem_sp_group_ptrs;
}
hrt_vaddress sh_css_store_sp_stage_to_ddr(
- unsigned int pipe,
- unsigned int stage)
+ unsigned int pipe,
+ unsigned int stage)
{
IA_CSS_ENTER_LEAVE_PRIVATE("void");
mmgr_store(xmem_sp_stage_ptrs[pipe][stage],
- &sh_css_sp_stage,
- sizeof(struct sh_css_sp_stage));
+ &sh_css_sp_stage,
+ sizeof(struct sh_css_sp_stage));
return xmem_sp_stage_ptrs[pipe][stage];
}
hrt_vaddress sh_css_store_isp_stage_to_ddr(
- unsigned int pipe,
- unsigned int stage)
+ unsigned int pipe,
+ unsigned int stage)
{
IA_CSS_ENTER_LEAVE_PRIVATE("void");
mmgr_store(xmem_isp_stage_ptrs[pipe][stage],
- &sh_css_isp_stage,
- sizeof(struct sh_css_isp_stage));
+ &sh_css_isp_stage,
+ sizeof(struct sh_css_isp_stage));
return xmem_isp_stage_ptrs[pipe][stage];
}
static enum ia_css_err ref_sh_css_ddr_address_map(
- struct sh_css_ddr_address_map *map,
- struct sh_css_ddr_address_map *out)
+ struct sh_css_ddr_address_map *map,
+ struct sh_css_ddr_address_map *out)
{
enum ia_css_err err = IA_CSS_SUCCESS;
unsigned int i;
/* copy map using size info */
for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
- sizeof(size_t)); i++) {
+ sizeof(size_t)); i++) {
if (in_addrs.addrs[i] == mmgr_NULL)
to_addrs.addrs[i] = mmgr_NULL;
else
- to_addrs.addrs[i] = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER, in_addrs.addrs[i]);
+ to_addrs.addrs[i] = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_BUFFER,
+ in_addrs.addrs[i]);
}
IA_CSS_LEAVE_ERR_PRIVATE(err);
}
static enum ia_css_err write_ia_css_isp_parameter_set_info_to_ddr(
- struct ia_css_isp_parameter_set_info *me,
- hrt_vaddress *out)
+ struct ia_css_isp_parameter_set_info *me,
+ hrt_vaddress *out)
{
enum ia_css_err err = IA_CSS_SUCCESS;
bool succ;
assert(out);
*out = ia_css_refcount_increment(IA_CSS_REFCOUNT_PARAM_SET_POOL, mmgr_malloc(
- sizeof(struct ia_css_isp_parameter_set_info)));
+ sizeof(struct ia_css_isp_parameter_set_info)));
succ = (*out != mmgr_NULL);
if (succ)
mmgr_store(*out,
- me, sizeof(struct ia_css_isp_parameter_set_info));
+ me, sizeof(struct ia_css_isp_parameter_set_info));
else
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
static enum ia_css_err
free_ia_css_isp_parameter_set_info(
- hrt_vaddress ptr)
-{
+ hrt_vaddress ptr) {
enum ia_css_err err = IA_CSS_SUCCESS;
struct ia_css_isp_parameter_set_info isp_params_info;
unsigned int i;
- hrt_vaddress *addrs = (hrt_vaddress *)&isp_params_info.mem_map;
+ hrt_vaddress *addrs = (hrt_vaddress *) &isp_params_info.mem_map;
IA_CSS_ENTER_PRIVATE("ptr = %u", ptr);
/* sanity check - ptr must be valid */
- if (!ia_css_refcount_is_valid(ptr)) {
- IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_SET_POOL(0x%x) invalid arg", __func__, ptr);
+ if (!ia_css_refcount_is_valid(ptr))
+ {
+ IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_SET_POOL(0x%x) invalid arg", __func__,
+ ptr);
err = IA_CSS_ERR_INVALID_ARGUMENTS;
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
mmgr_load(ptr, &isp_params_info.mem_map, sizeof(struct sh_css_ddr_address_map));
/* copy map using size info */
for (i = 0; i < (sizeof(struct sh_css_ddr_address_map_size) /
- sizeof(size_t)); i++) {
+ sizeof(size_t)); i++)
+ {
if (addrs[i] == mmgr_NULL)
continue;
ia_css_refcount_decrement(IA_CSS_REFCOUNT_PARAM_BUFFER, addrs[i]);
} else {
#endif
- IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_BUFFER(0x%x) invalid arg", __func__, ptr);
+ IA_CSS_ERROR("%s: IA_CSS_REFCOUNT_PARAM_BUFFER(0x%x) invalid arg", __func__,
+ ptr);
err = IA_CSS_ERR_INVALID_ARGUMENTS;
continue;
}
void
sh_css_update_uds_and_crop_info(
- const struct ia_css_binary_info *info,
- const struct ia_css_frame_info *in_frame_info,
- const struct ia_css_frame_info *out_frame_info,
- const struct ia_css_resolution *dvs_env,
- const struct ia_css_dz_config *zoom,
- const struct ia_css_vector *motion_vector,
- struct sh_css_uds_info *uds, /* out */
- struct sh_css_crop_pos *sp_out_crop_pos, /* out */
-
- bool enable_zoom)
+ const struct ia_css_binary_info *info,
+ const struct ia_css_frame_info *in_frame_info,
+ const struct ia_css_frame_info *out_frame_info,
+ const struct ia_css_resolution *dvs_env,
+ const struct ia_css_dz_config *zoom,
+ const struct ia_css_vector *motion_vector,
+ struct sh_css_uds_info *uds, /* out */
+ struct sh_css_crop_pos *sp_out_crop_pos, /* out */
+
+ bool enable_zoom)
{
IA_CSS_ENTER_PRIVATE("void");
* initialization.
*/
env_width = dvs_env->width -
- SH_CSS_MIN_DVS_ENVELOPE;
+ SH_CSS_MIN_DVS_ENVELOPE;
env_height = dvs_env->height -
- SH_CSS_MIN_DVS_ENVELOPE;
+ SH_CSS_MIN_DVS_ENVELOPE;
half_env_x = env_width / 2;
half_env_y = env_height / 2;
/**
*/
if (upscale_x) {
uds_xc = (in_frame_info->res.width
- + env_width
- + SH_CSS_MIN_DVS_ENVELOPE) / 2;
+ + env_width
+ + SH_CSS_MIN_DVS_ENVELOPE) / 2;
} else {
uds_xc = (out_frame_info->res.width
- + env_width) / 2
- + SH_CSS_MIN_DVS_ENVELOPE;
+ + env_width) / 2
+ + SH_CSS_MIN_DVS_ENVELOPE;
}
if (upscale_y) {
uds_yc = (in_frame_info->res.height
- + env_height
- + SH_CSS_MIN_DVS_ENVELOPE) / 2;
+ + env_height
+ + SH_CSS_MIN_DVS_ENVELOPE) / 2;
} else {
uds_yc = (out_frame_info->res.height
- + env_height) / 2
- + SH_CSS_MIN_DVS_ENVELOPE;
+ + env_height) / 2
+ + SH_CSS_MIN_DVS_ENVELOPE;
}
/* clip the motion vector to +/- half the envelope */
motion_x = clamp(motion_x, -half_env_x, half_env_x);
/* video nodz: here we can only crop. We make sure we
crop at least the first 8x8 pixels away. */
env_width = dvs_env->width -
- SH_CSS_MIN_DVS_ENVELOPE;
+ SH_CSS_MIN_DVS_ENVELOPE;
env_height = dvs_env->height -
- SH_CSS_MIN_DVS_ENVELOPE;
+ SH_CSS_MIN_DVS_ENVELOPE;
half_env_x = env_width / 2;
half_env_y = env_height / 2;
motion_x = clamp(motion_x, -half_env_x, half_env_x);
motion_y = clamp(motion_y, -half_env_y, half_env_y);
crop_x = SH_CSS_MIN_DVS_ENVELOPE
- + half_env_x + motion_x;
+ + half_env_x + motion_x;
crop_y = SH_CSS_MIN_DVS_ENVELOPE
- + half_env_y + motion_y;
+ + half_env_y + motion_y;
}
/* Must enforce that the crop position is even */
static enum ia_css_err
sh_css_update_uds_and_crop_info_based_on_zoom_region(
- const struct ia_css_binary_info *info,
- const struct ia_css_frame_info *in_frame_info,
- const struct ia_css_frame_info *out_frame_info,
- const struct ia_css_resolution *dvs_env,
- const struct ia_css_dz_config *zoom,
- const struct ia_css_vector *motion_vector,
- struct sh_css_uds_info *uds, /* out */
- struct sh_css_crop_pos *sp_out_crop_pos, /* out */
- struct ia_css_resolution pipe_in_res,
- bool enable_zoom)
-{
+ const struct ia_css_binary_info *info,
+ const struct ia_css_frame_info *in_frame_info,
+ const struct ia_css_frame_info *out_frame_info,
+ const struct ia_css_resolution *dvs_env,
+ const struct ia_css_dz_config *zoom,
+ const struct ia_css_vector *motion_vector,
+ struct sh_css_uds_info *uds, /* out */
+ struct sh_css_crop_pos *sp_out_crop_pos, /* out */
+ struct ia_css_resolution pipe_in_res,
+ bool enable_zoom) {
unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0;
enum ia_css_err err = IA_CSS_SUCCESS;
/* Note:
y1 = zoom->zoom_region.resolution.height + y0;
if ((x0 > x1) || (y0 > y1) || (x1 > pipe_in_res.width) || (y1 > pipe_in_res.height))
- return IA_CSS_ERR_INVALID_ARGUMENTS;
+ return IA_CSS_ERR_INVALID_ARGUMENTS;
- if (!enable_zoom) {
- uds->curr_dx = HRT_GDC_N;
- uds->curr_dy = HRT_GDC_N;
+ if (!enable_zoom)
+ {
+ uds->curr_dx = HRT_GDC_N;
+ uds->curr_dy = HRT_GDC_N;
}
- if (info->enable.dvs_envelope) {
+ if (info->enable.dvs_envelope)
+ {
/* Zoom region is only supported by the UDS module on ISP
* 2 and higher. It is not supported in video mode on ISP 1 */
return IA_CSS_ERR_INVALID_ARGUMENTS;
- } else {
+ } else
+ {
if (enable_zoom) {
/* A. Calculate dx/dy based on crop region using in_frame_info
* Scale the crop region if in_frame_info to the stage is not same as
y1 = (y1 * in_frame_info->res.height) / (pipe_in_res.height);
}
uds->curr_dx =
- ((x1 - x0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.width;
+ ((x1 - x0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.width;
uds->curr_dy =
- ((y1 - y0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.height;
+ ((y1 - y0 - filter_envelope) * HRT_GDC_N) / in_frame_info->res.height;
/* B. Calculate xc/yc based on crop region */
uds->xc = (uint16_t)x0 + (((x1) - (x0)) / 2);
uds->yc = (uint16_t)in_frame_info->res.height / 2;
}
- ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "uds->curr_dx=%d, uds->xc=%d, uds->yc=%d\n",
- uds->curr_dx, uds->xc, uds->yc);
+ ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
+ "uds->curr_dx=%d, uds->xc=%d, uds->yc=%d\n",
+ uds->curr_dx, uds->xc, uds->yc);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "x0=%d, y0=%d, x1=%d, y1=%d\n",
- x0, y0, x1, y1);
+ x0, y0, x1, y1);
sp_out_crop_pos->x = (uint16_t)info->pipeline.left_cropping;
sp_out_crop_pos->y = (uint16_t)info->pipeline.top_cropping;
}
goto err;
#if !defined(HAS_NO_HMEM)
/* No weighted histogram, no structure, treat the histogram data as a byte dump in a byte array */
- me->rgby_data = (struct ia_css_3a_rgby_output *)sh_css_malloc(sizeof_hmem(HMEM0_ID));
+ me->rgby_data = (struct ia_css_3a_rgby_output *)sh_css_malloc(sizeof_hmem(
+ HMEM0_ID));
#else
me->rgby_data = NULL;
#endif
me->grid = *grid;
me->hor_proj = sh_css_malloc(grid->height * IA_CSS_DVS_NUM_COEF_TYPES *
- sizeof(*me->hor_proj));
+ sizeof(*me->hor_proj));
if (!me->hor_proj)
goto err;
me->ver_proj = sh_css_malloc(grid->width * IA_CSS_DVS_NUM_COEF_TYPES *
- sizeof(*me->ver_proj));
+ sizeof(*me->ver_proj));
if (!me->ver_proj)
goto err;
me->grid = *grid;
me->hor_coefs = sh_css_malloc(grid->num_hor_coefs *
- IA_CSS_DVS_NUM_COEF_TYPES *
- sizeof(*me->hor_coefs));
+ IA_CSS_DVS_NUM_COEF_TYPES *
+ sizeof(*me->hor_coefs));
if (!me->hor_coefs)
goto err;
me->ver_coefs = sh_css_malloc(grid->num_ver_coefs *
- IA_CSS_DVS_NUM_COEF_TYPES *
- sizeof(*me->ver_coefs));
+ IA_CSS_DVS_NUM_COEF_TYPES *
+ sizeof(*me->ver_coefs));
if (!me->ver_coefs)
goto err;
me->grid = *grid;
me->hor_prod.odd_real = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->hor_prod.odd_real));
+ grid->aligned_height * sizeof(*me->hor_prod.odd_real));
if (!me->hor_prod.odd_real)
goto err;
me->hor_prod.odd_imag = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->hor_prod.odd_imag));
+ grid->aligned_height * sizeof(*me->hor_prod.odd_imag));
if (!me->hor_prod.odd_imag)
goto err;
me->hor_prod.even_real = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->hor_prod.even_real));
+ grid->aligned_height * sizeof(*me->hor_prod.even_real));
if (!me->hor_prod.even_real)
goto err;
me->hor_prod.even_imag = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->hor_prod.even_imag));
+ grid->aligned_height * sizeof(*me->hor_prod.even_imag));
if (!me->hor_prod.even_imag)
goto err;
me->ver_prod.odd_real = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->ver_prod.odd_real));
+ grid->aligned_height * sizeof(*me->ver_prod.odd_real));
if (!me->ver_prod.odd_real)
goto err;
me->ver_prod.odd_imag = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->ver_prod.odd_imag));
+ grid->aligned_height * sizeof(*me->ver_prod.odd_imag));
if (!me->ver_prod.odd_imag)
goto err;
me->ver_prod.even_real = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->ver_prod.even_real));
+ grid->aligned_height * sizeof(*me->ver_prod.even_real));
if (!me->ver_prod.even_real)
goto err;
me->ver_prod.even_imag = sh_css_malloc(grid->aligned_width *
- grid->aligned_height * sizeof(*me->ver_prod.even_imag));
+ grid->aligned_height * sizeof(*me->ver_prod.even_imag));
if (!me->ver_prod.even_imag)
goto err;
me->grid = *grid;
me->hor_coefs.odd_real = sh_css_malloc(grid->num_hor_coefs *
- sizeof(*me->hor_coefs.odd_real));
+ sizeof(*me->hor_coefs.odd_real));
if (!me->hor_coefs.odd_real)
goto err;
me->hor_coefs.odd_imag = sh_css_malloc(grid->num_hor_coefs *
- sizeof(*me->hor_coefs.odd_imag));
+ sizeof(*me->hor_coefs.odd_imag));
if (!me->hor_coefs.odd_imag)
goto err;
me->hor_coefs.even_real = sh_css_malloc(grid->num_hor_coefs *
- sizeof(*me->hor_coefs.even_real));
+ sizeof(*me->hor_coefs.even_real));
if (!me->hor_coefs.even_real)
goto err;
me->hor_coefs.even_imag = sh_css_malloc(grid->num_hor_coefs *
- sizeof(*me->hor_coefs.even_imag));
+ sizeof(*me->hor_coefs.even_imag));
if (!me->hor_coefs.even_imag)
goto err;
me->ver_coefs.odd_real = sh_css_malloc(grid->num_ver_coefs *
- sizeof(*me->ver_coefs.odd_real));
+ sizeof(*me->ver_coefs.odd_real));
if (!me->ver_coefs.odd_real)
goto err;
me->ver_coefs.odd_imag = sh_css_malloc(grid->num_ver_coefs *
- sizeof(*me->ver_coefs.odd_imag));
+ sizeof(*me->ver_coefs.odd_imag));
if (!me->ver_coefs.odd_imag)
goto err;
me->ver_coefs.even_real = sh_css_malloc(grid->num_ver_coefs *
- sizeof(*me->ver_coefs.even_real));
+ sizeof(*me->ver_coefs.even_real));
if (!me->ver_coefs.even_real)
goto err;
me->ver_coefs.even_imag = sh_css_malloc(grid->num_ver_coefs *
- sizeof(*me->ver_coefs.even_imag));
+ sizeof(*me->ver_coefs.even_imag));
if (!me->ver_coefs.even_imag)
goto err;
params = stream->isp_params_configs;
/* Backward compatibility by default consider pipe as Video*/
- if (!params || (params && !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
+ if (!params || (params &&
+ !params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO])) {
goto err;
}
- dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_calloc(1, sizeof(struct ia_css_dvs_6axis_config));
+ dvs_config = (struct ia_css_dvs_6axis_config *)sh_css_calloc(1,
+ sizeof(struct ia_css_dvs_6axis_config));
if (!dvs_config)
goto err;
- dvs_config->width_y = width_y = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_y;
- dvs_config->height_y = height_y = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_y;
- dvs_config->width_uv = width_uv = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_uv;
- dvs_config->height_uv = height_uv = params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_uv;
+ dvs_config->width_y = width_y =
+ params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_y;
+ dvs_config->height_y = height_y =
+ params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_y;
+ dvs_config->width_uv = width_uv =
+ params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->width_uv;
+ dvs_config->height_uv = height_uv =
+ params->pipe_dvs_6axis_config[IA_CSS_PIPE_ID_VIDEO]->height_uv;
IA_CSS_LOG("table Y: W %d H %d", width_y, height_y);
IA_CSS_LOG("table UV: W %d H %d", width_uv, height_uv);
- dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+ dvs_config->xcoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+ uint32_t));
if (!dvs_config->xcoords_y)
goto err;
- dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(uint32_t));
+ dvs_config->ycoords_y = (uint32_t *)sh_css_malloc(width_y * height_y * sizeof(
+ uint32_t));
if (!dvs_config->ycoords_y)
goto err;
- dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+ dvs_config->xcoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+ sizeof(uint32_t));
if (!dvs_config->xcoords_uv)
goto err;
- dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv * sizeof(uint32_t));
+ dvs_config->ycoords_uv = (uint32_t *)sh_css_malloc(width_uv * height_uv *
+ sizeof(uint32_t));
if (!dvs_config->ycoords_uv)
goto err;
pipe_id = pipeline->pipe_id;
if (pipe_id == IA_CSS_PIPE_ID_CAPTURE) {
- err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP, &stage);
+ err = ia_css_pipeline_get_stage(pipeline, IA_CSS_BINARY_MODE_CAPTURE_PP,
+ &stage);
if (err == IA_CSS_SUCCESS)
stage->enable_zoom = enable;
break;
struct ia_css_anr_config anr_config;
struct ia_css_ce_config ce_config;
struct ia_css_formats_config formats_config;
-/* ---- deprecated: replaced with pipe_dvs_6axis_config---- */
+ /* ---- deprecated: replaced with pipe_dvs_6axis_config---- */
struct ia_css_dvs_6axis_config *dvs_6axis_config;
struct ia_css_ecd_config ecd_config;
struct ia_css_ynr_config ynr_config;
struct ia_css_crop_config crop_config;
struct ia_css_output_config output_config;
struct ia_css_dvs_6axis_config *pipe_dvs_6axis_config[IA_CSS_PIPE_ID_NUM];
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
struct ia_css_shading_settings shading_settings;
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
struct ia_css_dvs_coefficients dvs_coefs;
struct ia_css_dvs2_coefficients dvs2_coefs;
bool isp_params_changed;
bool isp_mem_params_changed
- [IA_CSS_PIPE_ID_NUM][SH_CSS_MAX_STAGES][IA_CSS_NUM_MEMORIES];
+ [IA_CSS_PIPE_ID_NUM][SH_CSS_MAX_STAGES][IA_CSS_NUM_MEMORIES];
bool dz_config_changed;
bool motion_config_changed;
bool dis_coef_table_changed;
bool sc_table_dirty;
unsigned int sc_table_last_pipe_num;
bool anr_thres_changed;
-/* ---- deprecated: replaced with pipe_dvs_6axis_config_changed ---- */
+ /* ---- deprecated: replaced with pipe_dvs_6axis_config_changed ---- */
bool dvs_6axis_config_changed;
/* ------ pipe specific DPC configuration ------ */
/* Please note that this implementation is a temporary solution and
* should be replaced by CSS per pipe configuration when the support
* is ready (HSD 1303967698) */
bool pipe_dpc_config_changed[IA_CSS_PIPE_ID_NUM];
-/* ------ deprecated(bz675) : from ------ */
+ /* ------ deprecated(bz675) : from ------ */
bool shading_settings_changed;
-/* ------ deprecated(bz675) : to ------ */
+ /* ------ deprecated(bz675) : to ------ */
bool pipe_dvs_6axis_config_changed[IA_CSS_PIPE_ID_NUM];
bool config_changed[IA_CSS_NUM_PARAMETER_IDS];
struct sh_css_ddr_address_map_size pipe_ddr_ptrs_size[IA_CSS_PIPE_ID_NUM];
struct sh_css_ddr_address_map ddr_ptrs;
struct sh_css_ddr_address_map_size ddr_ptrs_size;
- struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */
+ struct ia_css_frame
+ *output_frame; /** Output frame the config is to be applied to (optional) */
u32 isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */
};
void
ia_css_params_store_ia_css_host_data(
- hrt_vaddress ddr_addr,
- struct ia_css_host_data *data);
+ hrt_vaddress ddr_addr,
+ struct ia_css_host_data *data);
enum ia_css_err
ia_css_params_store_sctbl(
- const struct ia_css_pipeline_stage *stage,
- hrt_vaddress ddr_addr,
- const struct ia_css_shading_table *shading_table);
+ const struct ia_css_pipeline_stage *stage,
+ hrt_vaddress ddr_addr,
+ const struct ia_css_shading_table *shading_table);
struct ia_css_host_data *
ia_css_params_alloc_convert_sctbl(
- const struct ia_css_pipeline_stage *stage,
- const struct ia_css_shading_table *shading_table);
+ const struct ia_css_pipeline_stage *stage,
+ const struct ia_css_shading_table *shading_table);
struct ia_css_isp_config *
sh_css_pipe_isp_config_get(struct ia_css_pipe *pipe);
{
assert(properties);
#if defined(HAS_GDC_VERSION_2) || defined(HAS_GDC_VERSION_3)
-/*
- * MW: We don't want to store the coordinates
- * full range in memory: Truncate
- */
+ /*
+ * MW: We don't want to store the coordinates
+ * full range in memory: Truncate
+ */
properties->gdc_coord_one = gdc_get_unity(GDC0_ID) / HRT_GDC_COORD_SCALE;
#else
#error "Unknown GDC version"
static void
sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
- const enum sh_css_queue_id queue_id,
- const hrt_vaddress xmem_addr,
- const enum ia_css_buffer_type buf_type);
+ const enum sh_css_queue_id queue_id,
+ const hrt_vaddress xmem_addr,
+ const enum ia_css_buffer_type buf_type);
static void
initialize_frame_buffer_attribute(struct ia_css_buffer_sp *buf_attr);
copy_isp_stage_to_sp_stage(void)
{
/* [WW07.5]type casting will cause potential issues */
- sh_css_sp_stage.num_stripes = (uint8_t)sh_css_isp_stage.binary_info.iterator.num_stripes;
- sh_css_sp_stage.row_stripes_height = (uint16_t)sh_css_isp_stage.binary_info.iterator.row_stripes_height;
- sh_css_sp_stage.row_stripes_overlap_lines = (uint16_t)sh_css_isp_stage.binary_info.iterator.row_stripes_overlap_lines;
- sh_css_sp_stage.top_cropping = (uint16_t)sh_css_isp_stage.binary_info.pipeline.top_cropping;
+ sh_css_sp_stage.num_stripes = (uint8_t)
+ sh_css_isp_stage.binary_info.iterator.num_stripes;
+ sh_css_sp_stage.row_stripes_height = (uint16_t)
+ sh_css_isp_stage.binary_info.iterator.row_stripes_height;
+ sh_css_sp_stage.row_stripes_overlap_lines = (uint16_t)
+ sh_css_isp_stage.binary_info.iterator.row_stripes_overlap_lines;
+ sh_css_sp_stage.top_cropping = (uint16_t)
+ sh_css_isp_stage.binary_info.pipeline.top_cropping;
/* moved to sh_css_sp_init_stage
sh_css_sp_stage.enable.vf_output =
sh_css_isp_stage.binary_info.enable.vf_veceven ||
sh_css_sp_stage.enable.sdis = sh_css_isp_stage.binary_info.enable.dis;
sh_css_sp_stage.enable.s3a = sh_css_isp_stage.binary_info.enable.s3a;
#ifdef ISP2401
- sh_css_sp_stage.enable.lace_stats = sh_css_isp_stage.binary_info.enable.lace_stats;
+ sh_css_sp_stage.enable.lace_stats =
+ sh_css_isp_stage.binary_info.enable.lace_stats;
#endif
}
void
-store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int stage)
+store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num,
+ unsigned int stage)
{
unsigned int thread_id;
copy_isp_stage_to_sp_stage();
if (id != IA_CSS_PIPE_ID_COPY)
sh_css_sp_stage.isp_stage_addr =
- sh_css_store_isp_stage_to_ddr(pipe_num, stage);
+ sh_css_store_isp_stage_to_ddr(pipe_num, stage);
sh_css_sp_group.pipe[thread_id].sp_stage_addr[stage] =
- sh_css_store_sp_stage_to_ddr(pipe_num, stage);
+ sh_css_store_sp_stage_to_ddr(pipe_num, stage);
/* Clear for next frame */
sh_css_sp_stage.program_input_circuit = false;
}
sp_dmem_store(SP0_ID,
- (unsigned int)sp_address_of(sp_per_frame_data),
- &per_frame_data,
- sizeof(per_frame_data));
+ (unsigned int)sp_address_of(sp_per_frame_data),
+ &per_frame_data,
+ sizeof(per_frame_data));
}
static void
sh_css_store_sp_per_frame_data(enum ia_css_pipe_id pipe_id,
- unsigned int pipe_num,
+ unsigned int pipe_num,
const struct ia_css_fw_info *sp_fw)
{
if (!sp_fw)
const struct ia_css_fw_info *fw = &sh_css_sp_fw;
unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
unsigned int i;
- unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output, debug) / sizeof(int);
+ unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
+ debug) / sizeof(int);
assert(state);
#endif
void
-sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_frame,
+sh_css_sp_start_binary_copy(unsigned int pipe_num,
+ struct ia_css_frame *out_frame,
unsigned int two_ppc)
{
enum ia_css_pipe_id pipe_id;
if (pipe->inout_port_config == 0) {
SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
}
IA_CSS_LOG("pipe_id %d port_config %08x",
pipe->pipe_id, pipe->inout_port_config);
sh_css_sp_stage.num = stage_num;
sh_css_sp_stage.stage_type = SH_CSS_SP_STAGE_TYPE;
sh_css_sp_stage.func =
- (unsigned int)IA_CSS_PIPELINE_BIN_COPY;
+ (unsigned int)IA_CSS_PIPELINE_BIN_COPY;
set_output_frame_buffer(out_frame, 0);
sampled, needs checking/improvement */
if (pipe_conf_override == SH_CSS_PIPE_CONFIG_OVRD_NO_OVRD)
pipe->pipe_config =
- (SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id);
+ (SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id);
else
pipe->pipe_config = pipe_conf_override;
if (pipe->inout_port_config == 0) {
SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
- (uint8_t)SH_CSS_PORT_INPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
+ (uint8_t)SH_CSS_PORT_INPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
SH_CSS_PIPE_PORT_CONFIG_SET(pipe->inout_port_config,
- (uint8_t)SH_CSS_PORT_OUTPUT,
- (uint8_t)SH_CSS_HOST_TYPE, 1);
+ (uint8_t)SH_CSS_PORT_OUTPUT,
+ (uint8_t)SH_CSS_HOST_TYPE, 1);
}
IA_CSS_LOG("pipe_id %d port_config %08x",
pipe->pipe_id, pipe->inout_port_config);
static void
sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame,
- unsigned int pipe_num, unsigned int max_input_width, unsigned int if_config_index)
+ unsigned int pipe_num, unsigned int max_input_width,
+ unsigned int if_config_index)
{
enum ia_css_pipe_id pipe_id;
unsigned int thread_id;
#if defined SH_CSS_ENABLE_METADATA
if (pipe->metadata.height > 0) {
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id, &queue_id);
- sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.metadata_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_METADATA);
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id,
+ &queue_id);
+ sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.metadata_buf,
+ queue_id, mmgr_EXCEPTION,
+ IA_CSS_BUFFER_TYPE_METADATA);
}
#endif
const struct ia_css_fw_info *fw = &sh_css_sp_fw;
unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
- bin_copy_bytes_copied) / sizeof(int);
+ bin_copy_bytes_copied) / sizeof(int);
(void)HIVE_ADDR_sp_output; /* To get rid of warning in CRUN */
return load_sp_array_uint(sp_output, offset);
}
{
const struct ia_css_fw_info *fw = &sh_css_sp_fw;
unsigned int HIVE_ADDR_sp_output = fw->info.sp.output;
- unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output, sw_interrupt_value)
- / sizeof(int);
+ unsigned int offset = (unsigned int)offsetof(struct sh_css_sp_output,
+ sw_interrupt_value)
+ / sizeof(int);
(void)HIVE_ADDR_sp_output; /* To get rid of warning in CRUN */
return load_sp_array_uint(sp_output, offset + irq);
}
static void
sh_css_copy_buffer_attr_to_spbuffer(struct ia_css_buffer_sp *dest_buf,
- const enum sh_css_queue_id queue_id,
- const hrt_vaddress xmem_addr,
- const enum ia_css_buffer_type buf_type)
+ const enum sh_css_queue_id queue_id,
+ const hrt_vaddress xmem_addr,
+ const enum ia_css_buffer_type buf_type)
{
assert(buf_type < IA_CSS_NUM_BUFFER_TYPE);
if (queue_id > SH_CSS_INVALID_QUEUE_ID) {
lines below. In order to satisfy KW an additional if
has been added. This one will always yield true.
*/
- if ((queue_id < SH_CSS_MAX_NUM_QUEUES))
- {
+ if ((queue_id < SH_CSS_MAX_NUM_QUEUES)) {
dest_buf->buf_src.queue_id = queue_id;
}
} else {
static void
sh_css_copy_frame_to_spframe(struct ia_css_frame_sp *sp_frame_out,
- const struct ia_css_frame *frame_in)
+ const struct ia_css_frame *frame_in)
{
assert(frame_in);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
- "sh_css_copy_frame_to_spframe():\n");
+ "sh_css_copy_frame_to_spframe():\n");
sh_css_copy_buffer_attr_to_spbuffer(&sp_frame_out->buf_attr,
- frame_in->dynamic_queue_id,
- frame_in->data,
- frame_in->buf_type);
+ frame_in->dynamic_queue_id,
+ frame_in->data,
+ frame_in->buf_type);
ia_css_frame_info_to_frame_sp_info(&sp_frame_out->info, &frame_in->info);
break;
case IA_CSS_FRAME_FORMAT_PLANAR_RGB888:
sp_frame_out->planes.planar_rgb.r.offset =
- frame_in->planes.planar_rgb.r.offset;
+ frame_in->planes.planar_rgb.r.offset;
sp_frame_out->planes.planar_rgb.g.offset =
- frame_in->planes.planar_rgb.g.offset;
+ frame_in->planes.planar_rgb.g.offset;
sp_frame_out->planes.planar_rgb.b.offset =
- frame_in->planes.planar_rgb.b.offset;
+ frame_in->planes.planar_rgb.b.offset;
break;
case IA_CSS_FRAME_FORMAT_YUYV:
case IA_CSS_FRAME_FORMAT_UYVY:
case IA_CSS_FRAME_FORMAT_NV16:
case IA_CSS_FRAME_FORMAT_NV61:
sp_frame_out->planes.nv.y.offset =
- frame_in->planes.nv.y.offset;
+ frame_in->planes.nv.y.offset;
sp_frame_out->planes.nv.uv.offset =
- frame_in->planes.nv.uv.offset;
+ frame_in->planes.nv.uv.offset;
break;
case IA_CSS_FRAME_FORMAT_YUV420:
case IA_CSS_FRAME_FORMAT_YUV422:
case IA_CSS_FRAME_FORMAT_YV12:
case IA_CSS_FRAME_FORMAT_YV16:
sp_frame_out->planes.yuv.y.offset =
- frame_in->planes.yuv.y.offset;
+ frame_in->planes.yuv.y.offset;
sp_frame_out->planes.yuv.u.offset =
- frame_in->planes.yuv.u.offset;
+ frame_in->planes.yuv.u.offset;
sp_frame_out->planes.yuv.v.offset =
- frame_in->planes.yuv.v.offset;
+ frame_in->planes.yuv.v.offset;
break;
case IA_CSS_FRAME_FORMAT_QPLANE6:
sp_frame_out->planes.plane6.r.offset =
- frame_in->planes.plane6.r.offset;
+ frame_in->planes.plane6.r.offset;
sp_frame_out->planes.plane6.r_at_b.offset =
- frame_in->planes.plane6.r_at_b.offset;
+ frame_in->planes.plane6.r_at_b.offset;
sp_frame_out->planes.plane6.gr.offset =
- frame_in->planes.plane6.gr.offset;
+ frame_in->planes.plane6.gr.offset;
sp_frame_out->planes.plane6.gb.offset =
- frame_in->planes.plane6.gb.offset;
+ frame_in->planes.plane6.gb.offset;
sp_frame_out->planes.plane6.b.offset =
- frame_in->planes.plane6.b.offset;
+ frame_in->planes.plane6.b.offset;
sp_frame_out->planes.plane6.b_at_r.offset =
- frame_in->planes.plane6.b_at_r.offset;
+ frame_in->planes.plane6.b_at_r.offset;
break;
case IA_CSS_FRAME_FORMAT_BINARY_8:
sp_frame_out->planes.binary.data.offset =
- frame_in->planes.binary.data.offset;
+ frame_in->planes.binary.data.offset;
break;
default:
/* This should not happen, but in case it does,
}
static enum ia_css_err
-set_input_frame_buffer(const struct ia_css_frame *frame)
-{
+set_input_frame_buffer(const struct ia_css_frame *frame) {
if (!frame)
return IA_CSS_ERR_INVALID_ARGUMENTS;
- switch (frame->info.format) {
+ switch (frame->info.format)
+ {
case IA_CSS_FRAME_FORMAT_QPLANE6:
case IA_CSS_FRAME_FORMAT_YUV420_16:
case IA_CSS_FRAME_FORMAT_RAW_PACKED:
static enum ia_css_err
set_output_frame_buffer(const struct ia_css_frame *frame,
- unsigned int idx)
-{
+ unsigned int idx) {
if (!frame)
return IA_CSS_ERR_INVALID_ARGUMENTS;
- switch (frame->info.format) {
+ switch (frame->info.format)
+ {
case IA_CSS_FRAME_FORMAT_YUV420:
case IA_CSS_FRAME_FORMAT_YUV422:
case IA_CSS_FRAME_FORMAT_YUV444:
}
static enum ia_css_err
-set_view_finder_buffer(const struct ia_css_frame *frame)
-{
+set_view_finder_buffer(const struct ia_css_frame *frame) {
if (!frame)
return IA_CSS_ERR_INVALID_ARGUMENTS;
- switch (frame->info.format) {
+ switch (frame->info.format)
+ {
/* the dual output pin */
case IA_CSS_FRAME_FORMAT_NV12:
case IA_CSS_FRAME_FORMAT_NV12_16:
#if !defined(HAS_NO_INPUT_FORMATTER)
void sh_css_sp_set_if_configs(
- const input_formatter_cfg_t *config_a,
- const input_formatter_cfg_t *config_b,
- const uint8_t if_config_index
- )
+ const input_formatter_cfg_t *config_a,
+ const input_formatter_cfg_t *config_b,
+ const uint8_t if_config_index
+)
{
assert(if_config_index < SH_CSS_MAX_IF_CONFIGS);
assert(config_a);
- sh_css_sp_group.config.input_formatter.set[if_config_index].config_a = *config_a;
+ sh_css_sp_group.config.input_formatter.set[if_config_index].config_a =
+ *config_a;
sh_css_sp_group.config.input_formatter.a_changed = true;
if (config_b) {
- sh_css_sp_group.config.input_formatter.set[if_config_index].config_b = *config_b;
+ sh_css_sp_group.config.input_formatter.set[if_config_index].config_b =
+ *config_b;
sh_css_sp_group.config.input_formatter.b_changed = true;
}
sh_css_sp_group.config.input_circuit.fmt_type = fmt_type;
sh_css_sp_group.config.input_circuit.ch_id = ch_id;
sh_css_sp_group.config.input_circuit.input_mode = input_mode;
-/*
- * The SP group is only loaded at SP boot time and is read once
- * change flags as "input_circuit_cfg_changed" must be reset on the SP
- */
+ /*
+ * The SP group is only loaded at SP boot time and is read once
+ * change flags as "input_circuit_cfg_changed" must be reset on the SP
+ */
sh_css_sp_group.config.input_circuit_cfg_changed = true;
sh_css_sp_stage.program_input_circuit = true;
}
}
static enum ia_css_err
-sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args)
-{
+sh_css_sp_write_frame_pointers(const struct sh_css_binary_args *args) {
enum ia_css_err err = IA_CSS_SUCCESS;
int i;
err = set_input_frame_buffer(args->in_frame);
if (err == IA_CSS_SUCCESS && args->out_vf_frame)
err = set_view_finder_buffer(args->out_vf_frame);
- for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+ for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+ {
if (err == IA_CSS_SUCCESS && args->out_frame[i])
err = set_output_frame_buffer(args->out_frame[i], i);
}
if (if_config_index == SH_CSS_IF_CONFIG_NOT_NEEDED) return;
#if !defined(HAS_NO_INPUT_FORMATTER)
assert(if_config_index < SH_CSS_MAX_IF_CONFIGS);
- sh_css_sp_group.config.input_formatter.set[if_config_index].stream_format = input_format;
+ sh_css_sp_group.config.input_formatter.set[if_config_index].stream_format =
+ input_format;
#else
(void)input_format;
#endif
}
static enum ia_css_err
-copy_isp_mem_if_to_ddr(struct ia_css_binary *binary)
-{
+copy_isp_mem_if_to_ddr(struct ia_css_binary *binary) {
enum ia_css_err err;
err = ia_css_isp_param_copy_isp_mem_if_to_ddr(
- &binary->css_params,
- &binary->mem_params,
- IA_CSS_PARAM_CLASS_CONFIG);
+ &binary->css_params,
+ &binary->mem_params,
+ IA_CSS_PARAM_CLASS_CONFIG);
if (err != IA_CSS_SUCCESS)
return err;
err = ia_css_isp_param_copy_isp_mem_if_to_ddr(
- &binary->css_params,
- &binary->mem_params,
- IA_CSS_PARAM_CLASS_STATE);
+ &binary->css_params,
+ &binary->mem_params,
+ IA_CSS_PARAM_CLASS_STATE);
if (err != IA_CSS_SUCCESS)
return err;
return IA_CSS_SUCCESS;
static enum ia_css_err
configure_isp_from_args(
- const struct sh_css_sp_pipeline *pipeline,
- const struct ia_css_binary *binary,
- const struct sh_css_binary_args *args,
- bool two_ppc,
- bool deinterleaved)
-{
+ const struct sh_css_sp_pipeline *pipeline,
+ const struct ia_css_binary *binary,
+ const struct sh_css_binary_args *args,
+ bool two_ppc,
+ bool deinterleaved) {
#ifdef ISP2401
struct ia_css_pipe *pipe = find_pipe_by_num(pipeline->pipe_num);
const struct ia_css_resolution *res;
ia_css_output0_configure(binary, &args->out_frame[0]->info);
#ifdef ISP2401
ia_css_sc_configure(binary, pipeline->shading.internal_frame_origin_x_bqs_on_sctbl,
- pipeline->shading.internal_frame_origin_y_bqs_on_sctbl);
+ pipeline->shading.internal_frame_origin_y_bqs_on_sctbl);
#endif
ia_css_iterator_configure(binary, &args->in_frame->info);
ia_css_dvs_configure(binary, &args->out_frame[0]->info);
static enum ia_css_err
sh_css_sp_init_stage(struct ia_css_binary *binary,
- const char *binary_name,
- const struct ia_css_blob_info *blob_info,
- const struct sh_css_binary_args *args,
- unsigned int pipe_num,
- unsigned int stage,
- bool xnr,
- const struct ia_css_isp_param_css_segments *isp_mem_if,
- unsigned int if_config_index,
- bool two_ppc)
-{
+ const char *binary_name,
+ const struct ia_css_blob_info *blob_info,
+ const struct sh_css_binary_args *args,
+ unsigned int pipe_num,
+ unsigned int stage,
+ bool xnr,
+ const struct ia_css_isp_param_css_segments *isp_mem_if,
+ unsigned int if_config_index,
+ bool two_ppc) {
const struct ia_css_binary_xinfo *xinfo;
const struct ia_css_binary_info *info;
enum ia_css_err err = IA_CSS_SUCCESS;
ia_css_pipeline_get_sp_thread_id(pipe_num, &thread_id);
- if (!info) {
+ if (!info)
+ {
sh_css_sp_group.pipe[thread_id].sp_stage_addr[stage] = mmgr_NULL;
return IA_CSS_SUCCESS;
}
sh_css_sp_stage.frames.effective_in_res.height = binary->effective_in_frame_res.height;
ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.in.info,
- &binary->in_frame_info);
- for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) {
+ &binary->in_frame_info);
+ for (i = 0; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++)
+ {
ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.out[i].info,
- &binary->out_frame_info[i]);
+ &binary->out_frame_info[i]);
}
ia_css_frame_info_to_frame_sp_info(&sh_css_sp_stage.frames.internal_frame_info,
- &binary->internal_frame_info);
+ &binary->internal_frame_info);
sh_css_sp_stage.dvs_envelope.width = binary->dvs_envelope.width;
sh_css_sp_stage.dvs_envelope.height = binary->dvs_envelope.height;
sh_css_sp_stage.isp_pipe_version = (uint8_t)info->pipeline.isp_pipe_version;
err = sh_css_sp_write_frame_pointers(args);
/* TODO: move it to a better place */
- if (binary->info->sp.enable.s3a) {
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_3A_STATISTICS, thread_id, &queue_id);
- sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.s3a_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_3A_STATISTICS);
+ if (binary->info->sp.enable.s3a)
+ {
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_3A_STATISTICS, thread_id,
+ &queue_id);
+ sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.s3a_buf, queue_id,
+ mmgr_EXCEPTION,
+ IA_CSS_BUFFER_TYPE_3A_STATISTICS);
}
- if (binary->info->sp.enable.dis) {
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_DIS_STATISTICS, thread_id, &queue_id);
- sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.dvs_buf, queue_id, mmgr_EXCEPTION, IA_CSS_BUFFER_TYPE_DIS_STATISTICS);
+ if (binary->info->sp.enable.dis)
+ {
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_DIS_STATISTICS, thread_id,
+ &queue_id);
+ sh_css_copy_buffer_attr_to_spbuffer(&sh_css_sp_stage.frames.dvs_buf, queue_id,
+ mmgr_EXCEPTION,
+ IA_CSS_BUFFER_TYPE_DIS_STATISTICS);
}
#if defined SH_CSS_ENABLE_METADATA
ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_METADATA, thread_id, &queue_id);
#ifdef USE_INPUT_SYSTEM_VERSION_2401
#ifndef ISP2401
- if (args->in_frame) {
+ if (args->in_frame)
+ {
pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
if (!pipe)
return IA_CSS_ERR_INTERNAL_ERROR;
ia_css_get_crop_offsets(pipe, &args->in_frame->info);
- } else if (&binary->in_frame_info) {
+ } else if (&binary->in_frame_info)
+ {
pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
if (!pipe)
return IA_CSS_ERR_INTERNAL_ERROR;
ia_css_get_crop_offsets(pipe, &binary->in_frame_info);
#else
- if (stage == 0) {
+ if (stage == 0)
+ {
if (args->in_frame) {
pipe = find_pipe_by_num(sh_css_sp_group.pipe[thread_id].pipe_num);
if (!pipe)
#endif
err = configure_isp_from_args(&sh_css_sp_group.pipe[thread_id],
- binary, args, two_ppc, sh_css_sp_stage.deinterleaved);
+ binary, args, two_ppc, sh_css_sp_stage.deinterleaved);
if (err != IA_CSS_SUCCESS)
return err;
* the original out res. for video pipe, it has two output pins --- out and
* vf_out, so it can keep these two resolutions already. */
if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW &&
- (binary->vf_downscale_log2 > 0)) {
+ (binary->vf_downscale_log2 > 0))
+ {
/* TODO: Remove this after preview output decimation is fixed
* by configuring out&vf info fiels properly */
sh_css_sp_stage.frames.out[0].info.padded_width
- <<= binary->vf_downscale_log2;
+ <<= binary->vf_downscale_log2;
sh_css_sp_stage.frames.out[0].info.res.width
- <<= binary->vf_downscale_log2;
+ <<= binary->vf_downscale_log2;
sh_css_sp_stage.frames.out[0].info.res.height
- <<= binary->vf_downscale_log2;
+ <<= binary->vf_downscale_log2;
}
err = copy_isp_mem_if_to_ddr(binary);
if (err != IA_CSS_SUCCESS)
unsigned int pipe_num,
bool xnr,
unsigned int if_config_index,
- bool two_ppc)
-{
+ bool two_ppc) {
struct ia_css_binary *binary;
const struct ia_css_fw_info *firmware;
const struct sh_css_binary_args *args;
unsigned int stage_num;
-/*
- * Initialiser required because of the "else" path below.
- * Is this a valid path ?
- */
+ /*
+ * Initialiser required because of the "else" path below.
+ * Is this a valid path ?
+ */
const char *binary_name = "";
const struct ia_css_binary_xinfo *info = NULL;
/* note: the var below is made static as it is quite large;
args = &stage->args;
stage_num = stage->stage_num;
- if (binary) {
+ if (binary)
+ {
info = binary->info;
binary_name = (const char *)(info->blob->name);
blob_info = &info->blob->header.blob;
ia_css_init_memory_interface(mem_if, &binary->mem_params, &binary->css_params);
- } else if (firmware) {
+ } else if (firmware)
+ {
const struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS] = {NULL};
if (args->out_frame[0])
out_infos[0] = &args->out_frame[0]->info;
info = &firmware->info.isp;
ia_css_binary_fill_info(info, false, false,
- ATOMISP_INPUT_FORMAT_RAW_10,
- args->in_frame ? &args->in_frame->info : NULL,
- NULL,
- out_infos,
- args->out_vf_frame ? &args->out_vf_frame->info
- : NULL,
- &tmp_binary,
- NULL,
- -1, true);
+ ATOMISP_INPUT_FORMAT_RAW_10,
+ args->in_frame ? &args->in_frame->info : NULL,
+ NULL,
+ out_infos,
+ args->out_vf_frame ? &args->out_vf_frame->info
+ : NULL,
+ &tmp_binary,
+ NULL,
+ -1, true);
binary = &tmp_binary;
binary->info = info;
binary_name = IA_CSS_EXT_ISP_PROG_NAME(firmware);
blob_info = &firmware->blob;
mem_if = (struct ia_css_isp_param_css_segments *)&firmware->mem_initializers;
- } else {
- /* SP stage */
- assert(stage->sp_func != IA_CSS_PIPELINE_NO_FUNC);
+ } else
+ {
+ /* SP stage */
+ assert(stage->sp_func != IA_CSS_PIPELINE_NO_FUNC);
/* binary and blob_info are now NULL.
These will be passed to sh_css_sp_init_stage
and dereferenced there, so passing a NULL
}
err = sh_css_sp_init_stage(binary,
- (const char *)binary_name,
- blob_info,
- args,
- pipe_num,
- stage_num,
- xnr,
- mem_if,
- if_config_index,
- two_ppc);
+ (const char *)binary_name,
+ blob_info,
+ args,
+ pipe_num,
+ stage_num,
+ xnr,
+ mem_if,
+ if_config_index,
+ two_ppc);
return err;
}
switch (stage->sp_func) {
case IA_CSS_PIPELINE_RAW_COPY:
sh_css_sp_start_raw_copy(args->out_frame[0],
- pipe_num, two_ppc,
- stage->max_input_width,
- copy_ovrd, if_config_index);
+ pipe_num, two_ppc,
+ stage->max_input_width,
+ copy_ovrd, if_config_index);
break;
case IA_CSS_PIPELINE_BIN_COPY:
assert(false); /* TBI */
case IA_CSS_PIPELINE_ISYS_COPY:
sh_css_sp_start_isys_copy(args->out_frame[0],
- pipe_num, stage->max_input_width, if_config_index);
+ pipe_num, stage->max_input_width, if_config_index);
break;
case IA_CSS_PIPELINE_NO_FUNC:
assert(false);
#endif
#ifdef ISP2401
,
- const struct ia_css_coordinate *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
+ const struct ia_css_coordinate
+ *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
positioned on shading table at shading correction in ISP. */
const struct ia_css_isp_parameters *params
#endif
- )
-{
+ ) {
/* Get first stage */
struct ia_css_pipeline_stage *stage = NULL;
struct ia_css_binary *first_binary = NULL;
first_binary = me->stages->binary;
if (input_mode == IA_CSS_INPUT_MODE_SENSOR ||
- input_mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR) {
+ input_mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
+ {
assert(port_id < N_MIPI_PORT_ID);
if (port_id >= N_MIPI_PORT_ID) /* should not happen but KW does not know */
return; /* we should be able to return an error */
if_config_index = (uint8_t)(port_id - MIPI_PORT0_ID);
- } else if (input_mode == IA_CSS_INPUT_MODE_MEMORY) {
+ } else if (input_mode == IA_CSS_INPUT_MODE_MEMORY)
+ {
if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
- } else {
+ } else
+ {
if_config_index = 0x0;
}
#else
memset(&sh_css_sp_group.pipe[thread_id], 0, sizeof(struct sh_css_sp_pipeline));
/* Count stages */
- for (stage = me->stages, num = 0; stage; stage = stage->next, num++) {
+ for (stage = me->stages, num = 0; stage; stage = stage->next, num++)
+ {
stage->stage_num = num;
ia_css_debug_pipe_graph_dump_stage(stage, id);
}
me->num_stages = num;
- if (first_binary) {
+ if (first_binary)
+ {
/* Init pipeline data */
sh_css_sp_init_group(two_ppc, first_binary->input_format,
offline, if_config_index);
sh_css_sp_group.pipe[thread_id].required_bds_factor = required_bds_factor;
#if !defined(HAS_NO_INPUT_SYSTEM)
sh_css_sp_group.pipe[thread_id].input_system_mode
- = (uint32_t)input_mode;
+ = (uint32_t)input_mode;
sh_css_sp_group.pipe[thread_id].port_id = port_id;
#endif
sh_css_sp_group.pipe[thread_id].dvs_frame_delay = (uint32_t)me->dvs_frame_delay;
/* TODO: next indicates from which queues parameters need to be
sampled, needs checking/improvement */
- if (ia_css_pipeline_uses_params(me)) {
+ if (ia_css_pipeline_uses_params(me))
+ {
sh_css_sp_group.pipe[thread_id].pipe_config =
- SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id;
+ SH_CSS_PIPE_CONFIG_SAMPLE_PARAMS << thread_id;
}
/* For continuous use-cases, SP copy is responsible for sampling the
pipe = find_pipe_by_num(pipe_num);
assert(pipe);
- if (!pipe) {
+ if (!pipe)
+ {
return;
}
sh_css_sp_group.pipe[thread_id].scaler_pp_lut = sh_css_pipe_get_pp_gdc_lut(pipe);
#if defined(SH_CSS_ENABLE_METADATA)
- if (md_info && md_info->size > 0) {
+ if (md_info && md_info->size > 0)
+ {
sh_css_sp_group.pipe[thread_id].metadata.width = md_info->resolution.width;
sh_css_sp_group.pipe[thread_id].metadata.height = md_info->resolution.height;
sh_css_sp_group.pipe[thread_id].metadata.stride = md_info->stride;
sh_css_sp_group.pipe[thread_id].metadata.size = md_info->size;
ia_css_isys_convert_stream_format_to_mipi_format(
- md_config->data_type, MIPI_PREDICTOR_NONE,
- &sh_css_sp_group.pipe[thread_id].metadata.format);
+ md_config->data_type, MIPI_PREDICTOR_NONE,
+ &sh_css_sp_group.pipe[thread_id].metadata.format);
}
#else
(void)md_config;
#if defined(SH_CSS_ENABLE_PER_FRAME_PARAMS)
sh_css_sp_group.pipe[thread_id].output_frame_queue_id = (uint32_t)SH_CSS_INVALID_QUEUE_ID;
- if (pipe_id != IA_CSS_PIPE_ID_COPY) {
- ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id, (enum sh_css_queue_id *)(&sh_css_sp_group.pipe[thread_id].output_frame_queue_id));
+ if (pipe_id != IA_CSS_PIPE_ID_COPY)
+ {
+ ia_css_query_internal_queue_id(IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, thread_id,
+ (enum sh_css_queue_id *)(
+ &sh_css_sp_group.pipe[thread_id].output_frame_queue_id));
}
#endif
* the parameters are passed to the isp for the shading table centering.
*/
if (internal_frame_origin_bqs_on_sctbl &&
- params && params->shading_settings.enable_shading_table_conversion == 0) {
+ params && params->shading_settings.enable_shading_table_conversion == 0)
+ {
sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl
- = (uint32_t)internal_frame_origin_bqs_on_sctbl->x;
+ = (uint32_t)internal_frame_origin_bqs_on_sctbl->x;
sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl
- = (uint32_t)internal_frame_origin_bqs_on_sctbl->y;
- } else {
- sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl = 0;
- sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl = 0;
+ = (uint32_t)internal_frame_origin_bqs_on_sctbl->y;
+ } else
+ {
+ sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_x_bqs_on_sctbl =
+ 0;
+ sh_css_sp_group.pipe[thread_id].shading.internal_frame_origin_y_bqs_on_sctbl =
+ 0;
}
#endif
IA_CSS_LOG("pipe_id %d port_config %08x",
pipe_id, sh_css_sp_group.pipe[thread_id].inout_port_config);
- for (stage = me->stages, num = 0; stage; stage = stage->next, num++) {
+ for (stage = me->stages, num = 0; stage; stage = stage->next, num++)
+ {
sh_css_sp_group.pipe[thread_id].num_stages++;
if (is_sp_stage(stage)) {
sp_init_sp_stage(stage, pipe_num, two_ppc,
- copy_ovrd, if_config_index);
+ copy_ovrd, if_config_index);
} else {
- if ((stage->stage_num != 0) || SH_CSS_PIPE_PORT_CONFIG_IS_CONTINUOUS(me->inout_port_config))
+ if ((stage->stage_num != 0) ||
+ SH_CSS_PIPE_PORT_CONFIG_IS_CONTINUOUS(me->inout_port_config))
tmp_if_config_index = SH_CSS_IF_CONFIG_NOT_NEEDED;
else
tmp_if_config_index = if_config_index;
bool sh_css_write_host2sp_command(enum host2sp_commands host2sp_command)
{
unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
- unsigned int offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_command)
- / sizeof(int);
+ unsigned int offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_command)
+ / sizeof(int);
enum host2sp_commands last_cmd = host2sp_cmd_error;
(void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */
}
enum host2sp_commands
-sh_css_read_host2sp_command(void)
-{
+sh_css_read_host2sp_command(void) {
unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
unsigned int offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_command)
- / sizeof(int);
+ / sizeof(int);
(void)HIVE_ADDR_host_sp_com; /* Suppres warnings in CRUN */
return (enum host2sp_commands)load_sp_array_uint(host_sp_com, offset);
}
*/
void
sh_css_update_host2sp_offline_frame(
- unsigned int frame_num,
- struct ia_css_frame *frame,
- struct ia_css_metadata *metadata)
+ unsigned int frame_num,
+ struct ia_css_frame *frame,
+ struct ia_css_metadata *metadata)
{
unsigned int HIVE_ADDR_host_sp_com;
unsigned int offset;
/* Write new frame data into SP DMEM */
HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_offline_frames)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_offline_frames)
+ / sizeof(int);
offset += frame_num;
store_sp_array_uint(host_sp_com, offset, frame ? frame->data : 0);
/* Write metadata buffer into SP DMEM */
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_offline_metadata)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_offline_metadata)
+ / sizeof(int);
offset += frame_num;
store_sp_array_uint(host_sp_com, offset, metadata ? metadata->address : 0);
}
*/
void
sh_css_update_host2sp_mipi_frame(
- unsigned int frame_num,
- struct ia_css_frame *frame)
+ unsigned int frame_num,
+ struct ia_css_frame *frame)
{
unsigned int HIVE_ADDR_host_sp_com;
unsigned int offset;
/* Write new frame data into SP DMEM */
HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_mipi_frames)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_mipi_frames)
+ / sizeof(int);
offset += frame_num;
store_sp_array_uint(host_sp_com, offset,
- frame ? frame->data : 0);
+ frame ? frame->data : 0);
}
/*
*/
void
sh_css_update_host2sp_mipi_metadata(
- unsigned int frame_num,
- struct ia_css_metadata *metadata)
+ unsigned int frame_num,
+ struct ia_css_metadata *metadata)
{
unsigned int HIVE_ADDR_host_sp_com;
unsigned int o;
/* Write new frame data into SP DMEM */
HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
o = offsetof(struct host_sp_communication, host2sp_mipi_metadata)
- / sizeof(int);
+ / sizeof(int);
o += frame_num;
store_sp_array_uint(host_sp_com, o,
- metadata ? metadata->address : 0);
+ metadata ? metadata->address : 0);
}
void
/* Write new frame data into SP DMEM */
HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_num_mipi_frames)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_num_mipi_frames)
+ / sizeof(int);
store_sp_array_uint(host_sp_com, offset, num_frames);
}
#endif
void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames, bool set_avail)
+sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
+ bool set_avail)
{
const struct ia_css_fw_info *fw;
unsigned int HIVE_ADDR_host_sp_com;
fw = &sh_css_sp_fw;
HIVE_ADDR_host_sp_com = fw->info.sp.host_sp_com;
if (set_avail) {
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_avail_num_raw_frames)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_cont_avail_num_raw_frames)
+ / sizeof(int);
avail_num_frames = load_sp_array_uint(host_sp_com, offset);
extra_num_frames = num_frames - avail_num_frames;
- offset_extra = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_extra_num_raw_frames)
- / sizeof(int);
+ offset_extra = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_cont_extra_num_raw_frames)
+ / sizeof(int);
store_sp_array_uint(host_sp_com, offset_extra, extra_num_frames);
} else
- offset = (unsigned int)offsetof(struct host_sp_communication, host2sp_cont_target_num_raw_frames)
- / sizeof(int);
+ offset = (unsigned int)offsetof(struct host_sp_communication,
+ host2sp_cont_target_num_raw_frames)
+ / sizeof(int);
store_sp_array_uint(host_sp_com, offset, num_frames);
}
host2sp_event_irq_mask[i]);
assert(offset % HRT_BUS_BYTES == 0);
sp_dmem_store(SP0_ID,
- (unsigned int)sp_address_of(host_sp_com) + offset,
- &event_irq_mask_init, sizeof(event_irq_mask_init));
+ (unsigned int)sp_address_of(host_sp_com) + offset,
+ &event_irq_mask_init, sizeof(event_irq_mask_init));
}
}
enum ia_css_err
ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe,
unsigned int or_mask,
- unsigned int and_mask)
-{
+ unsigned int and_mask) {
unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
unsigned int offset;
struct sh_css_event_irq_mask event_irq_mask;
host2sp_event_irq_mask[pipe_num]);
assert(offset % HRT_BUS_BYTES == 0);
sp_dmem_store(SP0_ID,
- (unsigned int)sp_address_of(host_sp_com) + offset,
- &event_irq_mask, sizeof(event_irq_mask));
+ (unsigned int)sp_address_of(host_sp_com) + offset,
+ &event_irq_mask, sizeof(event_irq_mask));
return IA_CSS_SUCCESS;
}
enum ia_css_err
ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe,
unsigned int *or_mask,
- unsigned int *and_mask)
-{
+ unsigned int *and_mask) {
unsigned int HIVE_ADDR_host_sp_com = sh_css_sp_fw.info.sp.host_sp_com;
unsigned int offset;
struct sh_css_event_irq_mask event_irq_mask;
host2sp_event_irq_mask[pipe_num]);
assert(offset % HRT_BUS_BYTES == 0);
sp_dmem_load(SP0_ID,
- (unsigned int)sp_address_of(host_sp_com) + offset,
- &event_irq_mask, sizeof(event_irq_mask));
+ (unsigned int)sp_address_of(host_sp_com) + offset,
+ &event_irq_mask, sizeof(event_irq_mask));
if (or_mask)
*or_mask = event_irq_mask.or_mask;
store_sp_per_frame_data(fw);
sp_dmem_store_uint32(SP0_ID,
- (unsigned int)sp_address_of(sp_sw_state),
- (uint32_t)(IA_CSS_SP_SW_TERMINATED));
+ (unsigned int)sp_address_of(sp_sw_state),
+ (uint32_t)(IA_CSS_SP_SW_TERMINATED));
/* Note 1: The sp_start_isp function contains a wait till
* the input network is configured by the SP.
for (i = 0; i < N_DMA_CHANNEL_ID; i++) {
/* enable the writing request */
sh_css_sp_set_dma_sw_reg(dma_id,
- i,
- 0,
- true);
+ i,
+ 0,
+ true);
/* enable the reading request */
sh_css_sp_set_dma_sw_reg(dma_id,
- i,
- 1,
- true);
+ i,
+ 1,
+ true);
}
return true;
*/
bool
sh_css_sp_set_dma_sw_reg(int dma_id,
- int channel_id,
- int request_type,
- bool enable)
+ int channel_id,
+ int request_type,
+ bool enable)
{
u32 sw_reg;
u32 bit_val;
/* get the software-mask */
sw_reg =
- sh_css_sp_group.debug.dma_sw_reg;
+ sh_css_sp_group.debug.dma_sw_reg;
/* get the offest of the target bit */
bit_offset = (8 * request_type) + channel_id;
sh_css_sp_store_init_dmem(const struct ia_css_fw_info *fw);
void
-store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num, unsigned int stage);
+store_sp_stage_data(enum ia_css_pipe_id id, unsigned int pipe_num,
+ unsigned int stage);
void
sh_css_stage_write_binary_info(struct ia_css_binary_info *info);
/* Start binary (jpeg) copy on the SP */
void
-sh_css_sp_start_binary_copy(unsigned int pipe_num, struct ia_css_frame *out_frame,
+sh_css_sp_start_binary_copy(unsigned int pipe_num,
+ struct ia_css_frame *out_frame,
unsigned int two_ppc);
unsigned int
#endif
#ifdef ISP2401
,
- const struct ia_css_coordinate *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
+ const struct ia_css_coordinate
+ *internal_frame_origin_bqs_on_sctbl, /* Origin of internal frame
positioned on shading table at shading correction in ISP. */
const struct ia_css_isp_parameters *params
#endif
- );
+ );
void
sh_css_sp_uninit_pipeline(unsigned int pipe_num);
*/
void
sh_css_update_host2sp_offline_frame(
- unsigned int frame_num,
- struct ia_css_frame *frame,
- struct ia_css_metadata *metadata);
+ unsigned int frame_num,
+ struct ia_css_frame *frame,
+ struct ia_css_metadata *metadata);
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
/**
*/
void
sh_css_update_host2sp_mipi_frame(
- unsigned int frame_num,
- struct ia_css_frame *frame);
+ unsigned int frame_num,
+ struct ia_css_frame *frame);
/**
* @brief Update the mipi metadata information in host_sp_communication.
*/
void
sh_css_update_host2sp_mipi_metadata(
- unsigned int frame_num,
- struct ia_css_metadata *metadata);
+ unsigned int frame_num,
+ struct ia_css_metadata *metadata);
/**
* @brief Update the nr of mipi frames to use in host_sp_communication.
* @param[in] num_frames The number of raw frames to use.
*/
void
-sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames, bool set_avail);
+sh_css_update_host2sp_cont_num_raw_frames(unsigned int num_frames,
+ bool set_avail);
void
sh_css_event_init_irq_mask(void);
#if !defined(HAS_NO_INPUT_FORMATTER)
void
sh_css_sp_set_if_configs(
- const input_formatter_cfg_t *config_a,
- const input_formatter_cfg_t *config_b,
- const uint8_t if_config_index);
+ const input_formatter_cfg_t *config_a,
+ const input_formatter_cfg_t *config_b,
+ const uint8_t if_config_index);
#endif
void
*/
bool
sh_css_sp_set_dma_sw_reg(int dma_id,
- int channel_id,
- int request_type,
- bool enable);
+ int channel_id,
+ int request_type,
+ bool enable);
extern struct sh_css_sp_group sh_css_sp_group;
extern struct sh_css_sp_stage sh_css_sp_stage;
#include <ia_css_stream_format.h>
unsigned int sh_css_stream_format_2_bits_per_subpixel(
- enum atomisp_input_format format)
+ enum atomisp_input_format format)
{
unsigned int rval;
#include <ia_css_stream_format.h>
unsigned int sh_css_stream_format_2_bits_per_subpixel(
- enum atomisp_input_format format);
+ enum atomisp_input_format format);
#endif /* __SH_CSS_STREAM_FORMAT_H */
* possibility. Also, active_pipes[] should be able to hold only
* SH_CSS_MAX_SP_THREADS objects. Anything else is misleading. */
struct ia_css_pipe *all_pipes[IA_CSS_PIPELINE_NUM_MAX];
- void * (*malloc)(size_t bytes, bool zero_mem);
+ void *(*malloc)(size_t bytes, bool zero_mem);
void (*free)(void *ptr);
#ifdef ISP2401
- void * (*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func, int caller_line);
+ void *(*malloc_ex)(size_t bytes, bool zero_mem, const char *caller_func,
+ int caller_line);
void (*free_ex)(void *ptr, const char *caller_func, int caller_line);
#endif
void (*flush)(struct ia_css_acc_fw *fw);
unsigned int num_cont_raw_frames;
#if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401)
unsigned int num_mipi_frames[N_CSI_PORTS];
- struct ia_css_frame *mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
- struct ia_css_metadata *mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
- unsigned int mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
+ struct ia_css_frame
+ *mipi_frames[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
+ struct ia_css_metadata
+ *mipi_metadata[N_CSI_PORTS][NUM_MIPI_FRAMES_PER_STREAM];
+ unsigned int
+ mipi_sizes_for_check[N_CSI_PORTS][IA_CSS_MIPI_SIZE_CHECK_MAX_NOF_ENTRIES_PER_PORT];
unsigned int mipi_frame_size[N_CSI_PORTS];
#endif
hrt_vaddress sp_bin_addr;
hrt_data page_table_base_index;
- unsigned int size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
+ unsigned int
+ size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/
enum ia_css_irq_type irq_type;
unsigned int pipe_counter;
#include "sh_css_firmware.h"
enum ia_css_err
-ia_css_get_version(char *version, int max_size)
-{
+ia_css_get_version(char *version, int max_size) {
if (max_size <= (int)strlen(CSS_VERSION_STRING) + (int)strlen(sh_css_get_fw_version()) + 5)
return IA_CSS_ERR_INVALID_ARGUMENTS;
strcpy(version, CSS_VERSION_STRING);
}
static int __bo_init(struct hmm_bo_device *bdev, struct hmm_buffer_object *bo,
- unsigned int pgnr)
+ unsigned int pgnr)
{
check_bodev_null_return(bdev, -EINVAL);
var_equal_return(hmm_bo_device_inited(bdev), 0, -EINVAL,
- "hmm_bo_device not inited yet.\n");
+ "hmm_bo_device not inited yet.\n");
/* prevent zero size buffer object */
if (pgnr == 0) {
dev_err(atomisp_dev, "0 size buffer is not allowed.\n");
}
static struct hmm_buffer_object *__bo_search_and_remove_from_free_rbtree(
- struct rb_node *node, unsigned int pgnr)
+ struct rb_node *node, unsigned int pgnr)
{
struct hmm_buffer_object *this, *ret_bo, *temp_bo;
this = rb_entry(node, struct hmm_buffer_object, node);
if (this->pgnr == pgnr ||
- (this->pgnr > pgnr && !this->node.rb_left)) {
+ (this->pgnr > pgnr && !this->node.rb_left)) {
goto remove_bo_and_return;
} else {
if (this->pgnr < pgnr) {
if (!this->node.rb_right)
return NULL;
ret_bo = __bo_search_and_remove_from_free_rbtree(
- this->node.rb_right, pgnr);
+ this->node.rb_right, pgnr);
} else {
ret_bo = __bo_search_and_remove_from_free_rbtree(
- this->node.rb_left, pgnr);
+ this->node.rb_left, pgnr);
}
if (!ret_bo) {
if (this->pgnr > pgnr)
}
static struct hmm_buffer_object *__bo_search_by_addr(struct rb_root *root,
- ia_css_ptr start)
+ ia_css_ptr start)
{
struct rb_node *n = root->rb_node;
struct hmm_buffer_object *bo;
}
static struct hmm_buffer_object *__bo_search_by_addr_in_range(
- struct rb_root *root, unsigned int start)
+ struct rb_root *root, unsigned int start)
{
struct rb_node *n = root->rb_node;
struct hmm_buffer_object *bo;
}
static void __bo_insert_to_free_rbtree(struct rb_root *root,
- struct hmm_buffer_object *bo)
+ struct hmm_buffer_object *bo)
{
struct rb_node **new = &root->rb_node;
struct rb_node *parent = NULL;
}
static struct hmm_buffer_object *__bo_break_up(struct hmm_bo_device *bdev,
- struct hmm_buffer_object *bo,
- unsigned int pgnr)
+ struct hmm_buffer_object *bo,
+ unsigned int pgnr)
{
struct hmm_buffer_object *new_bo;
unsigned long flags;
*/
if (!bo->prev && !bo->next) {
rb_erase(&bo->node, &bdev->free_rbtree);
- /* 2. when bo->next != NULL && bo->prev == NULL, bo is a rbtree node,
- * and has a linked list,to take off this bo we need erase bo
- * first, then, insert bo->next into free rbtree and rebalance
- * the free rbtree
- */
+ /* 2. when bo->next != NULL && bo->prev == NULL, bo is a rbtree node,
+ * and has a linked list,to take off this bo we need erase bo
+ * first, then, insert bo->next into free rbtree and rebalance
+ * the free rbtree
+ */
} else if (!bo->prev && bo->next) {
bo->next->prev = NULL;
rb_erase(&bo->node, &bdev->free_rbtree);
__bo_insert_to_free_rbtree(&bdev->free_rbtree, bo->next);
bo->next = NULL;
- /* 3. when bo->prev != NULL && bo->next == NULL, bo is not a rbtree
- * node, bo is the last element of the linked list after rbtree
- * node, to take off this bo, we just need set the "prev/next"
- * pointers to NULL, the free rbtree stays unchaged
- */
+ /* 3. when bo->prev != NULL && bo->next == NULL, bo is not a rbtree
+ * node, bo is the last element of the linked list after rbtree
+ * node, to take off this bo, we just need set the "prev/next"
+ * pointers to NULL, the free rbtree stays unchaged
+ */
} else if (bo->prev && !bo->next) {
bo->prev->next = NULL;
bo->prev = NULL;
- /* 4. when bo->prev != NULL && bo->next != NULL ,bo is not a rbtree
- * node, bo is in the middle of the linked list after rbtree node,
- * to take off this bo, we just set take the "prev/next" pointers
- * to NULL, the free rbtree stays unchaged
- */
+ /* 4. when bo->prev != NULL && bo->next != NULL ,bo is not a rbtree
+ * node, bo is in the middle of the linked list after rbtree node,
+ * to take off this bo, we just set take the "prev/next" pointers
+ * to NULL, the free rbtree stays unchaged
+ */
} else if (bo->prev && bo->next) {
bo->next->prev = bo->prev;
bo->prev->next = bo->next;
}
static struct hmm_buffer_object *__bo_merge(struct hmm_buffer_object *bo,
- struct hmm_buffer_object *next_bo)
+ struct hmm_buffer_object *next_bo)
{
struct hmm_bo_device *bdev;
unsigned long flags;
* hmm_bo_device functions.
*/
int hmm_bo_device_init(struct hmm_bo_device *bdev,
- struct isp_mmu_client *mmu_driver,
- unsigned int vaddr_start,
- unsigned int size)
+ struct isp_mmu_client *mmu_driver,
+ unsigned int vaddr_start,
+ unsigned int size)
{
struct hmm_buffer_object *bo;
unsigned long flags;
bdev->free_rbtree = RB_ROOT;
bdev->bo_cache = kmem_cache_create("bo_cache",
- sizeof(struct hmm_buffer_object), 0, 0, NULL);
+ sizeof(struct hmm_buffer_object), 0, 0, NULL);
if (!bdev->bo_cache) {
dev_err(atomisp_dev, "%s: create cache failed!\n", __func__);
isp_mmu_exit(&bdev->mmu);
}
struct hmm_buffer_object *hmm_bo_alloc(struct hmm_bo_device *bdev,
- unsigned int pgnr)
+ unsigned int pgnr)
{
struct hmm_buffer_object *bo, *new_bo;
struct rb_root *root = &bdev->free_rbtree;
check_bodev_null_return(bdev, NULL);
var_equal_return(hmm_bo_device_inited(bdev), 0, NULL,
- "hmm_bo_device not inited yet.\n");
+ "hmm_bo_device not inited yet.\n");
if (pgnr == 0) {
dev_err(atomisp_dev, "0 size buffer is not allowed.\n");
next_bo = list_entry(bo->list.next, struct hmm_buffer_object, list);
if (bo->list.prev != &bdev->entire_bo_list &&
- prev_bo->end == bo->start &&
- (prev_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
+ prev_bo->end == bo->start &&
+ (prev_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
__bo_take_off_handling(prev_bo);
bo = __bo_merge(prev_bo, bo);
}
if (bo->list.next != &bdev->entire_bo_list &&
- next_bo->start == bo->end &&
- (next_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
+ next_bo->start == bo->end &&
+ (next_bo->status & HMM_BO_MASK) == HMM_BO_FREE) {
__bo_take_off_handling(next_bo);
bo = __bo_merge(bo, next_bo);
}
*/
while (!RB_EMPTY_ROOT(&bdev->allocated_rbtree))
hmm_bo_release(
- rbtree_node_to_hmm_bo(bdev->allocated_rbtree.rb_node));
+ rbtree_node_to_hmm_bo(bdev->allocated_rbtree.rb_node));
dev_dbg(atomisp_dev, "%s: finished releasing all allocated bos!\n",
__func__);
}
struct hmm_buffer_object *hmm_bo_device_search_start(
- struct hmm_bo_device *bdev, ia_css_ptr vaddr)
+ struct hmm_bo_device *bdev, ia_css_ptr vaddr)
{
struct hmm_buffer_object *bo;
}
struct hmm_buffer_object *hmm_bo_device_search_in_range(
- struct hmm_bo_device *bdev, unsigned int vaddr)
+ struct hmm_bo_device *bdev, unsigned int vaddr)
{
struct hmm_buffer_object *bo;
}
struct hmm_buffer_object *hmm_bo_device_search_vmap_start(
- struct hmm_bo_device *bdev, const void *vaddr)
+ struct hmm_bo_device *bdev, const void *vaddr)
{
struct list_head *pos;
struct hmm_buffer_object *bo;
}
static void free_private_bo_pages(struct hmm_buffer_object *bo,
- struct hmm_pool *dypool,
- struct hmm_pool *repool,
- int free_pgnr)
+ struct hmm_pool *dypool,
+ struct hmm_pool *repool,
+ int free_pgnr)
{
int i, ret;
if (repool->pops
&& repool->pops->pool_free_pages) {
repool->pops->pool_free_pages(repool->pool_info,
- &bo->page_obj[i]);
+ &bo->page_obj[i]);
hmm_mem_stat.res_cnt--;
}
break;
&& dypool->pops->pool_inited(dypool->pool_info)) {
if (dypool->pops->pool_free_pages)
dypool->pops->pool_free_pages(
- dypool->pool_info,
- &bo->page_obj[i]);
+ dypool->pool_info,
+ &bo->page_obj[i]);
break;
}
- /*
- * if dynamic memory pool doesn't exist, need to free
- * pages to system directly.
- */
+ /*
+ * if dynamic memory pool doesn't exist, need to free
+ * pages to system directly.
+ */
default:
ret = set_pages_wb(bo->page_obj[i].page, 1);
if (ret)
dev_err(atomisp_dev,
- "set page to WB err ...ret = %d\n",
- ret);
+ "set page to WB err ...ret = %d\n",
+ ret);
/*
W/A: set_pages_wb seldom return value = -EFAULT
indicate that address of page is not in valid
/*Allocate pages which will be used only by ISP*/
static int alloc_private_pages(struct hmm_buffer_object *bo,
- int from_highmem,
- bool cached,
- struct hmm_pool *dypool,
- struct hmm_pool *repool)
+ int from_highmem,
+ bool cached,
+ struct hmm_pool *dypool,
+ struct hmm_pool *repool)
{
int ret;
unsigned int pgnr, order, blk_pgnr, alloc_pgnr;
pgnr = bo->pgnr;
bo->page_obj = kmalloc_array(pgnr, sizeof(struct hmm_page_object),
- GFP_KERNEL);
+ GFP_KERNEL);
if (unlikely(!bo->page_obj))
return -ENOMEM;
*/
if (dypool->pops && dypool->pops->pool_alloc_pages) {
alloc_pgnr = dypool->pops->pool_alloc_pages(dypool->pool_info,
- bo->page_obj, pgnr,
- cached);
+ bo->page_obj, pgnr,
+ cached);
hmm_mem_stat.dyc_size -= alloc_pgnr;
if (alloc_pgnr == pgnr)
*/
if (repool->pops && repool->pops->pool_alloc_pages) {
alloc_pgnr = repool->pops->pool_alloc_pages(repool->pool_info,
- &bo->page_obj[i], pgnr,
- cached);
+ &bo->page_obj[i], pgnr,
+ cached);
hmm_mem_stat.res_cnt += alloc_pgnr;
if (alloc_pgnr == pgnr)
return 0;
if (order == HMM_MIN_ORDER) {
dev_err(atomisp_dev,
"%s: cannot allocate pages\n",
- __func__);
+ __func__);
goto cleanup;
}
order = HMM_MIN_ORDER;
ret = set_pages_uc(pages, blk_pgnr);
if (ret) {
dev_err(atomisp_dev,
- "set page uncacheablefailed.\n");
+ "set page uncacheablefailed.\n");
__free_pages(pages, order);
}
static void free_private_pages(struct hmm_buffer_object *bo,
- struct hmm_pool *dypool,
- struct hmm_pool *repool)
+ struct hmm_pool *dypool,
+ struct hmm_pool *repool)
{
free_private_bo_pages(bo, dypool, repool, bo->pgnr);
* If FOLL_FORCE is set, we only require the "MAY" flags.
*/
vm_flags = (gup_flags & FOLL_WRITE) ?
- (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
+ (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
vm_flags &= (gup_flags & FOLL_FORCE) ?
- (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
+ (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
i = 0;
do {
}
static int get_pfnmap_pages(struct task_struct *tsk, struct mm_struct *mm,
- unsigned long start, int nr_pages, int write, int force,
- struct page **pages, struct vm_area_struct **vmas)
+ unsigned long start, int nr_pages, int write, int force,
+ struct page **pages, struct vm_area_struct **vmas)
{
int flags = FOLL_TOUCH;
return -ENOMEM;
bo->page_obj = kmalloc_array(bo->pgnr, sizeof(struct hmm_page_object),
- GFP_KERNEL);
+ GFP_KERNEL);
if (unlikely(!bo->page_obj)) {
kfree(pages);
return -ENOMEM;
/*Handle frame buffer allocated in user space*/
mutex_unlock(&bo->mutex);
page_nr = get_user_pages_fast((unsigned long)userptr,
- (int)(bo->pgnr), 1, pages);
+ (int)(bo->pgnr), 1, pages);
mutex_lock(&bo->mutex);
bo->mem_type = HMM_BO_MEM_TYPE_USER;
}
/* can be written by caller, not forced */
if (page_nr != bo->pgnr) {
dev_err(atomisp_dev,
- "get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n",
- bo->pgnr, page_nr);
+ "get_user_pages err: bo->pgnr = %d, pgnr actually pinned = %d.\n",
+ bo->pgnr, page_nr);
goto out_of_mem;
}
*/
if (type == HMM_BO_PRIVATE) {
ret = alloc_private_pages(bo, from_highmem,
- cached, &dynamic_pool, &reserved_pool);
+ cached, &dynamic_pool, &reserved_pool);
} else if (type == HMM_BO_USER) {
ret = alloc_user_pages(bo, userptr, cached);
} else {
status_err:
mutex_unlock(&bo->mutex);
dev_err(atomisp_dev,
- "buffer object has already page allocated.\n");
+ "buffer object has already page allocated.\n");
return -EINVAL;
}
status_err2:
mutex_unlock(&bo->mutex);
dev_err(atomisp_dev,
- "buffer object not page allocated yet.\n");
+ "buffer object not page allocated yet.\n");
}
int hmm_bo_page_allocated(struct hmm_buffer_object *bo)
status_err:
dev_err(atomisp_dev,
- "buffer object not page allocated yet.\n");
+ "buffer object not page allocated yet.\n");
mutex_unlock(&bo->mutex);
return -EINVAL;
}
mutex_lock(&bo->mutex);
check_bo_status_yes_goto(bo,
- HMM_BO_PAGE_ALLOCED | HMM_BO_ALLOCED,
- status_err1);
+ HMM_BO_PAGE_ALLOCED | HMM_BO_ALLOCED,
+ status_err1);
check_bo_status_no_goto(bo, HMM_BO_BINDED, status_err2);
*/
if (bo->start != 0x0)
isp_mmu_flush_tlb_range(&bdev->mmu, bo->start,
- (bo->pgnr << PAGE_SHIFT));
+ (bo->pgnr << PAGE_SHIFT));
bo->status |= HMM_BO_BINDED;
mutex_unlock(&bo->mutex);
dev_err(atomisp_dev,
- "setup MMU address mapping failed.\n");
+ "setup MMU address mapping failed.\n");
return ret;
status_err2:
status_err1:
mutex_unlock(&bo->mutex);
dev_err(atomisp_dev,
- "buffer object vm_node or page not allocated.\n");
+ "buffer object vm_node or page not allocated.\n");
return -EINVAL;
}
mutex_lock(&bo->mutex);
check_bo_status_yes_goto(bo,
- HMM_BO_PAGE_ALLOCED |
- HMM_BO_ALLOCED |
- HMM_BO_BINDED, status_err);
+ HMM_BO_PAGE_ALLOCED |
+ HMM_BO_ALLOCED |
+ HMM_BO_BINDED, status_err);
bdev = bo->bdev;
status_err:
mutex_unlock(&bo->mutex);
dev_err(atomisp_dev,
- "buffer vm or page not allocated or not binded yet.\n");
+ "buffer vm or page not allocated or not binded yet.\n");
}
int hmm_bo_binded(struct hmm_buffer_object *bo)
pages[i] = bo->page_obj[i].page;
bo->vmap_addr = vmap(pages, bo->pgnr, VM_MAP,
- cached ? PAGE_KERNEL : PAGE_KERNEL_NOCACHE);
+ cached ? PAGE_KERNEL : PAGE_KERNEL_NOCACHE);
if (unlikely(!bo->vmap_addr)) {
kfree(pages);
mutex_unlock(&bo->mutex);
*/
if ((start + pgnr_to_size(pgnr)) != end) {
dev_warn(atomisp_dev,
- "vma's address space size not equal to buffer object's size");
+ "vma's address space size not equal to buffer object's size");
return -EINVAL;
}
pfn = page_to_pfn(bo->page_obj[i].page);
if (remap_pfn_range(vma, virt, pfn, PAGE_SIZE, PAGE_SHARED)) {
dev_warn(atomisp_dev,
- "remap_pfn_range failed: virt = 0x%x, pfn = 0x%x, mapped_pgnr = %d\n",
- virt, pfn, 1);
+ "remap_pfn_range failed: virt = 0x%x, pfn = 0x%x, mapped_pgnr = %d\n",
+ virt, pfn, 1);
return -EINVAL;
}
virt += PAGE_SIZE;
* dynamic memory pool ops.
*/
static unsigned int get_pages_from_dynamic_pool(void *pool,
- struct hmm_page_object *page_obj,
- unsigned int size, bool cached)
+ struct hmm_page_object *page_obj,
+ unsigned int size, bool cached)
{
struct hmm_page *hmm_page;
unsigned long flags;
if (dypool_info->initialized) {
while (!list_empty(&dypool_info->pages_list)) {
hmm_page = list_entry(dypool_info->pages_list.next,
- struct hmm_page, list);
+ struct hmm_page, list);
list_del(&hmm_page->list);
dypool_info->pgnr--;
}
static void free_pages_to_dynamic_pool(void *pool,
- struct hmm_page_object *page_obj)
+ struct hmm_page_object *page_obj)
{
struct hmm_page *hmm_page;
unsigned long flags;
return;
}
hmm_page = kmem_cache_zalloc(dypool_info->pgptr_cache,
- GFP_KERNEL);
+ GFP_KERNEL);
if (!hmm_page) {
/* free page directly */
ret = set_pages_wb(page_obj->page, 1);
return 0;
dypool_info = kmalloc(sizeof(struct hmm_dynamic_pool_info),
- GFP_KERNEL);
+ GFP_KERNEL);
if (unlikely(!dypool_info))
return -ENOMEM;
dypool_info->pgptr_cache = kmem_cache_create("pgptr_cache",
- sizeof(struct hmm_page), 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ sizeof(struct hmm_page), 0,
+ SLAB_HWCACHE_ALIGN, NULL);
if (!dypool_info->pgptr_cache) {
kfree(dypool_info);
return -ENOMEM;
while (!list_empty(&dypool_info->pages_list)) {
hmm_page = list_entry(dypool_info->pages_list.next,
- struct hmm_page, list);
+ struct hmm_page, list);
list_del(&hmm_page->list);
spin_unlock_irqrestore(&dypool_info->list_lock, flags);
* reserved memory pool ops.
*/
static unsigned int get_pages_from_reserved_pool(void *pool,
- struct hmm_page_object *page_obj,
- unsigned int size, bool cached)
+ struct hmm_page_object *page_obj,
+ unsigned int size, bool cached)
{
unsigned long flags;
unsigned int i = 0;
}
static int hmm_reserved_pool_setup(struct hmm_reserved_pool_info **repool_info,
- unsigned int pool_size)
+ unsigned int pool_size)
{
struct hmm_reserved_pool_info *pool_info;
pool_info = kmalloc(sizeof(struct hmm_reserved_pool_info),
- GFP_KERNEL);
+ GFP_KERNEL);
if (unlikely(!pool_info))
return -ENOMEM;
pool_info->pages = kmalloc(sizeof(struct page *) * pool_size,
- GFP_KERNEL);
+ GFP_KERNEL);
if (unlikely(!pool_info->pages)) {
kfree(pool_info);
return -ENOMEM;
if (order == 0) {
fail_number++;
dev_err(atomisp_dev, "%s: alloc_pages failed: %d\n",
- __func__, fail_number);
+ __func__, fail_number);
/* if fail five times, will goto end */
/* FIXME: whether is the mechanism is ok? */
ret = set_pages_uc(pages, blk_pgnr);
if (ret) {
dev_err(atomisp_dev,
- "set pages uncached failed\n");
+ "set pages uncached failed\n");
__free_pages(pages, order);
goto end;
}
*pool = repool_info;
dev_info(atomisp_dev,
- "hmm_reserved_pool init successfully,hmm_reserved_pool is with %d pages.\n",
- repool_info->pgnr);
+ "hmm_reserved_pool init successfully,hmm_reserved_pool is with %d pages.\n",
+ repool_info->pgnr);
return 0;
}
}
static int addr_in_vm_node(unsigned int addr,
- struct hmm_vm_node *node)
+ struct hmm_vm_node *node)
{
return (addr >= node->start) && (addr < (node->start + node->size));
}
}
static struct hmm_vm_node *alloc_hmm_vm_node(unsigned int pgnr,
- struct hmm_vm *vm)
+ struct hmm_vm *vm)
{
struct hmm_vm_node *node;
spin_unlock(&vm->lock);
kmem_cache_free(vm->cache, node);
dev_err(atomisp_dev,
- "no enough virtual address space.\n");
+ "no enough virtual address space.\n");
return NULL;
}
}
struct hmm_vm_node *hmm_vm_find_node_in_range(struct hmm_vm *vm,
- unsigned int addr)
+ unsigned int addr)
{
struct hmm_vm_node *node;
}
static ia_css_ptr __hrt_isp_css_mm_alloc(size_t bytes,
- const void __user *userptr,
- unsigned int num_pages,
- enum hrt_userptr_type type,
- bool cached)
+ const void __user *userptr,
+ unsigned int num_pages,
+ enum hrt_userptr_type type,
+ bool cached)
{
#ifdef CONFIG_ION
if (type == HRT_USR_ION)
return hmm_alloc(bytes, HMM_BO_ION, 0,
- userptr, cached);
+ userptr, cached);
#endif
if (type == HRT_USR_PTR) {
if (!userptr)
return hmm_alloc(bytes, HMM_BO_PRIVATE, 0,
- NULL, cached);
+ NULL, cached);
else {
if (num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
dev_err(atomisp_dev,
- "user space memory size is less than the expected size..\n");
+ "user space memory size is less than the expected size..\n");
else if (num_pages > ((__page_align(bytes))
>> PAGE_SHIFT))
dev_err(atomisp_dev,
- "user space memory size is large than the expected size..\n");
+ "user space memory size is large than the expected size..\n");
return hmm_alloc(bytes, HMM_BO_USER, 0,
- userptr, cached);
+ userptr, cached);
}
} else {
dev_err(atomisp_dev, "user ptr type is incorrect.\n");
}
ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes,
- const void __user *userptr,
- unsigned int num_pages,
- enum hrt_userptr_type type,
- bool cached)
+ const void __user *userptr,
+ unsigned int num_pages,
+ enum hrt_userptr_type type,
+ bool cached)
{
return __hrt_isp_css_mm_alloc(bytes, userptr, num_pages,
type, cached);
{
if (!my_userptr)
return hmm_alloc(bytes, HMM_BO_PRIVATE, 0, NULL,
- HMM_CACHED);
+ HMM_CACHED);
else {
if (my_num_pages < ((__page_align(bytes)) >> PAGE_SHIFT))
dev_err(atomisp_dev,
- "user space memory size is less than the expected size..\n");
+ "user space memory size is less than the expected size..\n");
else if (my_num_pages > ((__page_align(bytes)) >> PAGE_SHIFT))
dev_err(atomisp_dev,
- "user space memory size is large than the expected size..\n");
+ "user space memory size is large than the expected size..\n");
return hmm_alloc(bytes, HMM_BO_USER, 0,
- my_userptr, HMM_CACHED);
+ my_userptr, HMM_CACHED);
}
}
};
void hrt_isp_css_mm_set_user_ptr(void __user *userptr,
- unsigned int num_pages, enum hrt_userptr_type);
+ unsigned int num_pages, enum hrt_userptr_type);
/* Allocate memory, returns a virtual address */
ia_css_ptr hrt_isp_css_mm_alloc(size_t bytes);
ia_css_ptr hrt_isp_css_mm_alloc_user_ptr(size_t bytes,
- const void __user *userptr,
- unsigned int num_pages,
- enum hrt_userptr_type,
- bool cached);
+ const void __user *userptr,
+ unsigned int num_pages,
+ enum hrt_userptr_type,
+ bool cached);
ia_css_ptr hrt_isp_css_mm_alloc_cached(size_t bytes);
/* allocate memory and initialize with zeros,
void hmm_cleanup(void);
ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type,
- int from_highmem, const void __user *userptr, bool cached);
+ int from_highmem, const void __user *userptr, bool cached);
void hmm_free(ia_css_ptr ptr);
int hmm_load(ia_css_ptr virt, void *data, unsigned int bytes);
int hmm_store(ia_css_ptr virt, const void *data, unsigned int bytes);
};
struct hmm_buffer_object *hmm_bo_alloc(struct hmm_bo_device *bdev,
- unsigned int pgnr);
+ unsigned int pgnr);
void hmm_bo_release(struct hmm_buffer_object *bo);
int hmm_bo_device_init(struct hmm_bo_device *bdev,
- struct isp_mmu_client *mmu_driver,
- unsigned int vaddr_start, unsigned int size);
+ struct isp_mmu_client *mmu_driver,
+ unsigned int vaddr_start, unsigned int size);
/*
* clean up all hmm_bo_device related things.
* or by ISP driver itself.
*/
int hmm_bo_alloc_pages(struct hmm_buffer_object *bo,
- enum hmm_bo_type type, int from_highmem,
- const void __user *userptr, bool cached);
+ enum hmm_bo_type type, int from_highmem,
+ const void __user *userptr, bool cached);
void hmm_bo_free_pages(struct hmm_buffer_object *bo);
int hmm_bo_page_allocated(struct hmm_buffer_object *bo);
* get physical page info of the bo.
*/
int hmm_bo_get_page_info(struct hmm_buffer_object *bo,
- struct hmm_page_object **page_obj, int *pgnr);
+ struct hmm_page_object **page_obj, int *pgnr);
/*
* bind/unbind the physical pages to a virtual address space.
* return NULL if no such buffer object found.
*/
struct hmm_buffer_object *hmm_bo_device_search_start(
- struct hmm_bo_device *bdev, ia_css_ptr vaddr);
+ struct hmm_bo_device *bdev, ia_css_ptr vaddr);
/*
* find the buffer object by its virtual address.
* return NULL if no such buffer object found.
*/
struct hmm_buffer_object *hmm_bo_device_search_in_range(
- struct hmm_bo_device *bdev, ia_css_ptr vaddr);
+ struct hmm_bo_device *bdev, ia_css_ptr vaddr);
/*
* find the buffer object with kernel virtual address vaddr.
* return NULL if no such buffer object found.
*/
struct hmm_buffer_object *hmm_bo_device_search_vmap_start(
- struct hmm_bo_device *bdev, const void *vaddr);
+ struct hmm_bo_device *bdev, const void *vaddr);
#endif
int (*pool_init)(void **pool, unsigned int pool_size);
void (*pool_exit)(void **pool);
unsigned int (*pool_alloc_pages)(void *pool,
- struct hmm_page_object *page_obj,
- unsigned int size, bool cached);
+ struct hmm_page_object *page_obj,
+ unsigned int size, bool cached);
void (*pool_free_pages)(void *pool,
struct hmm_page_object *page_obj);
int (*pool_inited)(void *pool);
void hmm_vm_clean(struct hmm_vm *vm);
struct hmm_vm_node *hmm_vm_alloc_node(struct hmm_vm *vm,
- unsigned int pgnr);
+ unsigned int pgnr);
void hmm_vm_free_node(struct hmm_vm_node *node);
struct hmm_vm_node *hmm_vm_find_node_start(struct hmm_vm *vm,
- unsigned int addr);
+ unsigned int addr);
struct hmm_vm_node *hmm_vm_find_node_in_range(struct hmm_vm *vm,
- unsigned int addr);
+ unsigned int addr);
#endif
* not valid, it will set to tlb_flush_all by default.
*/
void (*tlb_flush_range)(struct isp_mmu *mmu,
- unsigned int addr, unsigned int size);
+ unsigned int addr, unsigned int size);
void (*tlb_flush_all)(struct isp_mmu *mmu);
unsigned int (*phys_to_pte)(struct isp_mmu *mmu,
- phys_addr_t phys);
+ phys_addr_t phys);
phys_addr_t (*pte_to_phys)(struct isp_mmu *mmu,
- unsigned int pte);
+ unsigned int pte);
};
#define isp_mmu_flush_tlb isp_mmu_flush_tlb_all
static inline void isp_mmu_flush_tlb_range(struct isp_mmu *mmu,
- unsigned int start, unsigned int size)
+ unsigned int start, unsigned int size)
{
if (mmu->driver && mmu->driver->tlb_flush_range)
mmu->driver->tlb_flush_range(mmu, start, size);
#define NR_PAGES_2GB (SZ_2G / PAGE_SIZE)
static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
- unsigned int end_isp_virt);
+ unsigned int end_isp_virt);
static unsigned int atomisp_get_pte(phys_addr_t pt, unsigned int idx)
{
}
static unsigned int isp_pgaddr_to_pte_valid(struct isp_mmu *mmu,
- phys_addr_t phys)
+ phys_addr_t phys)
{
unsigned int pte = mmu->driver->phys_to_pte(mmu, phys);
phys_addr_t new_phys)
{
dev_err(atomisp_dev, "address remap:\n\n"
- "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
- "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
- "\told: isp_virt = 0x%x, phys = 0x%llx\n"
- "\tnew: isp_virt = 0x%x, phys = 0x%llx\n",
- isp_pt_phys_to_virt(l1_pt),
- (u64)l1_pt, l1_idx,
- isp_pt_phys_to_virt(l2_pt),
- (u64)l2_pt, l2_idx, isp_virt,
- (u64)old_phys, isp_virt,
- (u64)new_phys);
+ "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+ "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+ "\told: isp_virt = 0x%x, phys = 0x%llx\n"
+ "\tnew: isp_virt = 0x%x, phys = 0x%llx\n",
+ isp_pt_phys_to_virt(l1_pt),
+ (u64)l1_pt, l1_idx,
+ isp_pt_phys_to_virt(l2_pt),
+ (u64)l2_pt, l2_idx, isp_virt,
+ (u64)old_phys, isp_virt,
+ (u64)new_phys);
}
static void mmu_unmap_l2_pte_error(struct isp_mmu *mmu,
unsigned int isp_virt, unsigned int pte)
{
dev_err(atomisp_dev, "unmap invalid L2 pte:\n\n"
- "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
- "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
- "\tisp_virt = 0x%x, pte(page phys) = 0x%x\n",
- isp_pt_phys_to_virt(l1_pt),
- (u64)l1_pt, l1_idx,
- isp_pt_phys_to_virt(l2_pt),
- (u64)l2_pt, l2_idx, isp_virt,
- pte);
+ "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+ "\tL2 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+ "\tisp_virt = 0x%x, pte(page phys) = 0x%x\n",
+ isp_pt_phys_to_virt(l1_pt),
+ (u64)l1_pt, l1_idx,
+ isp_pt_phys_to_virt(l2_pt),
+ (u64)l2_pt, l2_idx, isp_virt,
+ pte);
}
static void mmu_unmap_l1_pte_error(struct isp_mmu *mmu,
unsigned int isp_virt, unsigned int pte)
{
dev_err(atomisp_dev, "unmap invalid L1 pte (L2 PT):\n\n"
- "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
- "\tisp_virt = 0x%x, l1_pte(L2 PT) = 0x%x\n",
- isp_pt_phys_to_virt(l1_pt),
- (u64)l1_pt, l1_idx, (unsigned int)isp_virt,
- pte);
+ "\tL1 PT: virt = %p, phys = 0x%llx, idx = %d\n"
+ "\tisp_virt = 0x%x, l1_pte(L2 PT) = 0x%x\n",
+ isp_pt_phys_to_virt(l1_pt),
+ (u64)l1_pt, l1_idx, (unsigned int)isp_virt,
+ pte);
}
static void mmu_unmap_l1_pt_error(struct isp_mmu *mmu, unsigned int pte)
{
dev_err(atomisp_dev, "unmap invalid L1PT:\n\n"
- "L1PT = 0x%x\n", (unsigned int)pte);
+ "L1PT = 0x%x\n", (unsigned int)pte);
}
/*
if (ISP_PTE_VALID(mmu, pte)) {
mmu_remap_error(mmu, l1_pt, l1_idx,
- l2_pt, idx, ptr, pte, phys);
+ l2_pt, idx, ptr, pte, phys);
/* free all mapped pages */
free_mmu_map(mmu, start, ptr);
l2_pt = alloc_page_table(mmu);
if (l2_pt == NULL_PAGE) {
dev_err(atomisp_dev,
- "alloc page table fail.\n");
+ "alloc page table fail.\n");
/* free all mapped pages */
free_mmu_map(mmu, start, ptr);
if (l1_aligned < end) {
ret = mmu_l2_map(mmu, l1_pt, idx,
- l2_pt, ptr, l1_aligned, phys);
+ l2_pt, ptr, l1_aligned, phys);
phys += (l1_aligned - ptr);
ptr = l1_aligned;
} else {
ret = mmu_l2_map(mmu, l1_pt, idx,
- l2_pt, ptr, end, phys);
+ l2_pt, ptr, end, phys);
phys += (end - ptr);
ptr = end;
}
* address
*/
static void mmu_l2_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
- unsigned int l1_idx, phys_addr_t l2_pt,
- unsigned int start, unsigned int end)
+ unsigned int l1_idx, phys_addr_t l2_pt,
+ unsigned int start, unsigned int end)
{
unsigned int ptr;
unsigned int idx;
if (!ISP_PTE_VALID(mmu, pte))
mmu_unmap_l2_pte_error(mmu, l1_pt, l1_idx,
- l2_pt, idx, ptr, pte);
+ l2_pt, idx, ptr, pte);
atomisp_set_pte(l2_pt, idx, mmu->driver->null_pte);
mmu->l2_pgt_refcount[l1_idx]--;
* address
*/
static void mmu_l1_unmap(struct isp_mmu *mmu, phys_addr_t l1_pt,
- unsigned int start, unsigned int end)
+ unsigned int start, unsigned int end)
{
phys_addr_t l2_pt;
unsigned int ptr, l1_aligned;
* address
*/
static void mmu_unmap(struct isp_mmu *mmu, unsigned int isp_virt,
- unsigned int pgnr)
+ unsigned int pgnr)
{
unsigned int start, end;
phys_addr_t l1_pt;
* address.
*/
static void free_mmu_map(struct isp_mmu *mmu, unsigned int start_isp_virt,
- unsigned int end_isp_virt)
+ unsigned int end_isp_virt)
{
unsigned int pgnr;
unsigned int start, end;
}
static void isp_mmu_flush_tlb_range_default(struct isp_mmu *mmu,
- unsigned int start,
- unsigned int size)
+ unsigned int start,
+ unsigned int size)
{
isp_mmu_flush_tlb(mmu);
}
if (!ISP_PTE_VALID(mmu, mmu->l1_pte)) {
dev_warn(atomisp_dev, "invalid L1PT: pte = 0x%x\n",
- (unsigned int)mmu->l1_pte);
+ (unsigned int)mmu->l1_pte);
return;
}
static struct gmin_subdev gmin_subdevs[MAX_SUBDEVS];
static enum { PMIC_UNSET = 0, PMIC_REGULATOR, PMIC_AXP, PMIC_TI,
- PMIC_CRYSTALCOVE } pmic_id;
+ PMIC_CRYSTALCOVE
+ } pmic_id;
/* The atomisp uses type==0 for the end-of-list marker, so leave space. */
static struct intel_v4l2_subdev_table pdata_subdevs[MAX_SUBDEVS + 1];
EXPORT_SYMBOL_GPL(atomisp_register_i2c_module);
struct v4l2_subdev *atomisp_gmin_find_subdev(struct i2c_adapter *adapter,
- struct i2c_board_info *board_info)
+ struct i2c_board_info *board_info)
{
int i;
return NULL;
dev_info(dev,
- "gmin: initializing atomisp module subdev data.PMIC ID %d\n",
- pmic_id);
+ "gmin: initializing atomisp module subdev data.PMIC ID %d\n",
+ pmic_id);
gmin_subdevs[i].subdev = subdev;
gmin_subdevs[i].clock_num = gmin_get_var_int(dev, "CamClk", 0);
/*WA:CHT requires XTAL clock as PLL is not stable.*/
gmin_subdevs[i].clock_src = gmin_get_var_int(dev, "ClkSrc",
- VLV2_CLK_PLL_19P2MHZ);
+ VLV2_CLK_PLL_19P2MHZ);
gmin_subdevs[i].csi_port = gmin_get_var_int(dev, "CsiPort", 0);
gmin_subdevs[i].csi_lanes = gmin_get_var_int(dev, "CsiLanes", 1);
}
static struct camera_vcm_control *gmin_get_vcm_ctrl(struct v4l2_subdev *subdev,
- char *camera_module)
+ char *camera_module)
{
struct i2c_client *client = v4l2_get_subdevdata(subdev);
struct gmin_subdev *gs = find_gmin_subdev(subdev);
};
struct camera_sensor_platform_data *gmin_camera_platform_data(
- struct v4l2_subdev *subdev,
- enum atomisp_input_format csi_format,
- enum atomisp_bayer_order csi_bayer)
+ struct v4l2_subdev *subdev,
+ enum atomisp_input_format csi_format,
+ enum atomisp_bayer_order csi_bayer)
{
struct gmin_subdev *gs = find_gmin_subdev(subdev);