#define V4L2_MBUS_FMT_CUSTOM_M10MO_RAW 0x800b
#endif
-/* FIXME: for now, let's use a boolean to identify the type of atomisp chipset */
-extern bool atomisp_hw_is_isp2401;
-
/* Configuration used by Bayer noise reduction and YCC noise reduction */
struct atomisp_nr_config {
/* [gain] Strength of noise reduction for Bayer NR (Used by Bayer NR) */
#define ATOMISP_PLATFORM_H_
#include <asm/intel-family.h>
+#include <asm/processor.h>
#include <linux/i2c.h>
#include <linux/sfi.h>
/* API from old platform_camera.h, new CPUID implementation */
#define __IS_SOC(x) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \
boot_cpu_data.x86 == 6 && \
- boot_cpu_data.x86_model == x)
+ boot_cpu_data.x86_model == (x))
+#define __IS_SOCS(x,y) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \
+ boot_cpu_data.x86 == 6 && \
+ (boot_cpu_data.x86_model == (x) || \
+ boot_cpu_data.x86_model == (y)))
#define IS_MFLD __IS_SOC(INTEL_FAM6_ATOM_SALTWELL_MID)
#define IS_BYT __IS_SOC(INTEL_FAM6_ATOM_SILVERMONT)
#define IS_CHT __IS_SOC(INTEL_FAM6_ATOM_AIRMONT)
#define IS_MOFD __IS_SOC(INTEL_FAM6_ATOM_AIRMONT_MID)
+/* Both CHT and MOFD come with ISP2401 */
+#define IS_ISP2401 __IS_SOCS(INTEL_FAM6_ATOM_AIRMONT, \
+ INTEL_FAM6_ATOM_AIRMONT_MID)
+
#endif /* ATOMISP_PLATFORM_H_ */
break;
case IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME:
case IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME:
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
reset_wdt_timer = true;
pipe->buffers_in_css--;
asd->pending_capture_request--;
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
asd->re_trigger_capture = false;
dev_dbg(isp->dev, "Trigger capture again for new buffer. err=%d\n",
err);
- } else if (atomisp_hw_is_isp2401) {
+ } else if (IS_ISP2401) {
asd->re_trigger_capture = true;
}
break;
case IA_CSS_BUFFER_TYPE_OUTPUT_FRAME:
case IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME:
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
reset_wdt_timer = true;
pipe->buffers_in_css--;
*/
wake_up(&vb->done);
}
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
atomic_set(&pipe->wdt_count, 0);
/*
if (!error && q_buffers)
atomisp_qbuffers_to_css(asd);
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
/* If there are no buffers queued then
* delete wdt timer. */
if (asd->streaming != ATOMISP_DEVICE_STREAMING_ENABLED)
return;
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
dev_err(isp->dev, "timeout %d of %d\n",
atomic_read(&isp->wdt_count) + 1,
ATOMISP_ISP_MAX_TIMEOUT_COUNT);
atomisp_flush_bufs_and_wakeup(asd);
complete(&asd->init_done);
}
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
atomisp_wdt_stop(asd, false);
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
atomic_set(&isp->wdt_count, 0);
} else {
isp->isp_fatal_error = true;
}
__atomisp_css_recover(isp, true);
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
for (i = 0; i < isp->num_of_streams; i++) {
struct atomisp_sub_device *asd = &isp->asd[i];
struct atomisp_sub_device *asd;
struct atomisp_device *isp;
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
asd = from_timer(asd, t, wdt);
isp = asd->isp;
} else {
void atomisp_wdt_refresh(struct atomisp_sub_device *asd, unsigned int delay)
{
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
unsigned long next;
if (delay != ATOMISP_WDT_KEEP_CURRENT_DELAY)
{
dev_dbg(asd->isp->dev, "WDT stop:\n");
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (sync) {
del_timer_sync(&asd->wdt);
cancel_work_sync(&asd->isp->wdt_work);
* map real crop region base on above calculating base max crop region.
*/
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
dz_config->zoom_region.origin.x = dz_config->zoom_region.origin.x
* eff_res.width
/ asd->sensor_array_res.width;
if (!from_user && css_param->update_flag.shading_table)
return 0;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
if (copy_from_compatible(&dest_st, source_st,
sizeof(struct atomisp_shading_table),
from_user)) {
}
/* Shading table size per color */
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (st->width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
st->height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR) {
dev_err(asd->isp->dev, "shading table w/h validate failed!");
if (!from_user && css_param->update_flag.dvs2_coefs)
return 0;
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (sizeof(*cur) != sizeof(coefs->grid) ||
memcmp(&coefs->grid, cur, sizeof(coefs->grid))) {
dev_err(asd->isp->dev, "dvs grid mis-match!\n");
old_6axis_config = css_param->dvs_6axis;
dvs_6axis_config = old_6axis_config;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
struct ia_css_dvs_6axis_config t_6axis_config;
if (copy_from_compatible(&t_6axis_config, source_6axis_config,
old_morph_table = css_param->morph_table;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
struct ia_css_morph_table mtbl;
if (copy_from_compatible(&mtbl, source_morph_table,
atomisp_qbuffers_to_css(asd);
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (!atomisp_is_wdt_running(asd) && atomisp_buffers_queued(asd))
atomisp_wdt_start(asd);
} else {
__func__, arg->per_frame_setting, asd->index,
arg->isp_config_id, vdev->name);
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
if (atomisp_is_vf_pipe(pipe) && arg->per_frame_setting) {
dev_err(asd->isp->dev, "%s: vf pipe not support per_frame_setting",
__func__);
enable, asd->continuous_raw_buffer_size->val,
!asd->continuous_viewfinder->val);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_PRIMARY);
else
atomisp_update_capture_mode(asd);
* which appears to be related by a hardware
* performance limitation. It's unclear why this
* particular code triggers the issue. */
- if (!atomisp_hw_is_isp2401 || crop_needs_override) {
+ if (!IS_ISP2401 || crop_needs_override) {
if (isp_sink_crop.width * main_compose.height >
isp_sink_crop.height * main_compose.width) {
sink_crop.height = isp_sink_crop.height;
}
/* Shading table size per color */
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (user_shading_table->width > ISP2400_SH_CSS_MAX_SCTBL_WIDTH_PER_COLOR ||
user_shading_table->height > ISP2400_SH_CSS_MAX_SCTBL_HEIGHT_PER_COLOR)
return -EINVAL;
/* ISP2401 */
#define ATOMISP_CSS_ISP_PIPE_VERSION_2_7 1
-#define IS_ISP2401(isp) \
- (((isp)->media_dev.hw_revision & ATOMISP_HW_REVISION_MASK) \
- >= (ATOMISP_HW_REVISION_ISP2401_LEGACY << ATOMISP_HW_REVISION_SHIFT))
-
struct atomisp_format_bridge {
unsigned int pixelformat;
unsigned int depth;
default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW)
stream_env->pipe_configs[pipe_id].enable_dz = false;
- if (atomisp_hw_is_isp2401) {
+ if (IS_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)
for (i = 0; i < isp->num_of_streams; i++)
atomisp_wdt_stop(&isp->asd[i], 0);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
atomisp_wdt(&isp->asd[0].wdt);
else
queue_work(isp->wdt_work_queue, &isp->wdt_work);
atomisp_buf_done(asd, 0, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME,
current_event.pipe, true, stream_id);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
reset_wdt_timer[asd->index] = true; /* ISP running */
break;
atomisp_buf_done(asd, 0, IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME,
current_event.pipe, true, stream_id);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
reset_wdt_timer[asd->index] = true; /* ISP running */
break;
IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME,
current_event.pipe, true, stream_id);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
reset_wdt_timer[asd->index] = true; /* ISP running */
break;
atomisp_buf_done(asd, 0,
IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME,
current_event.pipe, true, stream_id);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
reset_wdt_timer[asd->index] = true; /* ISP running */
break;
}
}
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
return 0;
/* ISP2400: If there are no buffers queued then delete wdt timer. */
* ioctl is the only way to enum inputs + possible external actuators
* for 3A tuning purpose.
*/
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
motor = isp->inputs[index].motor;
else
motor = isp->motor;
goto error;
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
motor = isp->inputs[input].motor;
} else {
motor = isp->motor;
} else {
atomisp_qbuffers_to_css(asd);
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (!atomisp_is_wdt_running(asd) && atomisp_buffers_queued(asd))
atomisp_wdt_start(asd);
} else {
pipe->capq.streaming &&
!asd->enable_raw_buffer_lock->val &&
asd->params.offline_parm.num_captures == 1) {
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
asd->pending_capture_request++;
dev_dbg(isp->dev, "Add one pending capture request.\n");
} else {
/* Reset pending capture request count. */
asd->pending_capture_request = 0;
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
asd->re_trigger_capture = false;
if ((atomisp_subdev_streaming_count(asd) > sensor_start_stream) &&
dev_err(isp->dev, "master slave sensor stream on failed!\n");
goto out;
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
__wdt_on_master_slave_sensor(isp, wdt_duration);
} else {
__wdt_on_master_slave_sensor_pipe(pipe, wdt_duration, true);
goto start_delay_wq;
} else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
__wdt_on_master_slave_sensor_pipe(pipe, wdt_duration, false);
goto start_delay_wq;
}
goto out;
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (atomisp_buffers_queued(asd))
atomisp_wdt_refresh(asd, wdt_duration);
} else {
case V4L2_CID_FOCUS_ABSOLUTE:
case V4L2_CID_FOCUS_RELATIVE:
case V4L2_CID_FOCUS_STATUS:
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
return v4l2_queryctrl(isp->inputs[asd->input_curr].camera->
ctrl_handler, qc);
}
int i;
int ret = 0;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
motor = isp->inputs[asd->input_curr].motor;
else
motor = isp->motor;
int i;
int ret = 0;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
motor = isp->inputs[asd->input_curr].motor;
else
motor = isp->motor;
else
asd = atomisp_to_video_pipe(vdev)->asd;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
motor = isp->inputs[asd->input_curr].motor;
else
motor = isp->motor;
}
switch (cmd) {
case ATOMISP_IOC_S_SENSOR_RUNMODE:
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
err = atomisp_set_sensor_runmode(asd, arg);
else
err = -EINVAL;
core, ioctl, cmd, arg);
break;
case ATOMISP_IOC_G_UPDATE_EXPOSURE:
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
err = v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
core, ioctl, cmd, arg);
else
v4l2_ctrl_new_custom(&asd->ctrl_handler,
&ctrl_disable_dz,
NULL);
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
asd->select_isp_version = v4l2_ctrl_new_custom(&asd->ctrl_handler,
&ctrl_select_isp_version,
NULL);
* be to replace this to something stored inside atomisp allocated
* structures.
*/
-bool atomisp_hw_is_isp2401;
-
-/* Types of atomisp hardware */
-#define HW_IS_ISP2400 0
-#define HW_IS_ISP2401 1
struct device *atomisp_dev;
switch (id->device & ATOMISP_PCI_DEVICE_SOC_MASK) {
case ATOMISP_PCI_DEVICE_SOC_MRFLD:
a0_max_id = ATOMISP_PCI_REV_MRFLD_A0_MAX;
- atomisp_hw_is_isp2401 = false;
name = "Merrifield";
break;
case ATOMISP_PCI_DEVICE_SOC_BYT:
a0_max_id = ATOMISP_PCI_REV_BYT_A0_MAX;
- atomisp_hw_is_isp2401 = false;
name = "Baytrail";
break;
case ATOMISP_PCI_DEVICE_SOC_ANN:
name = "Anniedale";
- atomisp_hw_is_isp2401 = true;
break;
case ATOMISP_PCI_DEVICE_SOC_CHT:
name = "Cherrytrail";
- atomisp_hw_is_isp2401 = true;
break;
default:
dev_err(&dev->dev, "%s: unknown device ID %x04:%x04\n",
*/
#if defined(ISP2400)
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
dev_err(&dev->dev, "Support for %s (ISP2401) was disabled at compile time\n",
name);
return false;
}
#else
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
dev_err(&dev->dev, "Support for %s (ISP2400) was disabled at compile time\n",
name);
return false;
dev_info(&dev->dev, "Detected %s version %d (ISP240%c) on %s\n",
name, dev->revision,
- atomisp_hw_is_isp2401 ? '1' : '0',
+ IS_ISP2401 ? '1' : '0',
product);
return true;
for (i = 0; i < isp->num_of_streams; i++) {
struct atomisp_sub_device *asd = &isp->asd[i];
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
timer_setup(&asd->wdt, atomisp_wdt, 0);
else {
timer_setup(&asd->video_out_capture.wdt,
* since it has better performance. */
if (pipe_version == IA_CSS_PIPE_VERSION_2_6_1)
prim_descr->striped = false;
- else if (!atomisp_hw_is_isp2401) {
+ else if (!IS_ISP2401) {
prim_descr->striped = prim_descr->continuous &&
(!pipe->stream->stop_copy_preview || !pipe->stream->disable_cont_vf);
} else {
assert(out_info);
IA_CSS_ENTER_PRIVATE("");
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
*in_info = *out_info;
} else {
if (pipe->out_yuv_ds_input_info.res.width)
if (info->enable.sc)
{
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
binary->sctbl_width_per_color = _ISP2400_SCTBL_WIDTH_PER_COLOR(sc_3a_dis_padded_width, s3a_log_deci);
binary->sctbl_aligned_width_per_color = ISP2400_SH_CSS_MAX_SCTBL_ALIGNED_WIDTH_PER_COLOR;
binary->sctbl_height = _ISP2400_SCTBL_HEIGHT(sc_3a_dis_height, s3a_log_deci);
binary->sctbl_width_per_color = 0;
binary->sctbl_aligned_width_per_color = 0;
binary->sctbl_height = 0;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
binary->sctbl_legacy_width_per_color = 0;
binary->sctbl_legacy_height = 0;
}
"capt_pp_in_res");
ia_css_debug_dump_resolution(&config->vf_pp_in_res, "vf_pp_in_res");
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
ia_css_debug_dump_resolution(&config->output_system_in_res,
"output_system_in_res");
}
return;
}
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
tmp = ia_css_device_load_uint32(start_addr);
point_num = (tmp >> 16) & 0xFFFF;
if ((limit == (-1)) && (trace_read_buf[i] == 0))
limit = i;
}
- if (atomisp_hw_is_isp2401) {
+ if (IS_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,
for (i = 0; i < point_num; i++) {
j = (limit + i) % point_num;
if (trace_read_buf[j]) {
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
TRACE_DUMP_FORMAT dump_format = FIELD_FORMAT_UNPACK(trace_read_buf[j]);
} else {
tid_val = FIELD_TID_UNPACK(trace_read_buf[j]);
vblank_cycles = vblank_lines * (width + hblank_cycles);
sh_css_sp_configure_sync_gen(width, height, hblank_cycles,
vblank_cycles);
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_TPG) {
/* TODO: move define to proper file in tools */
ia_css_device_store_uint32(GP_ISEL_TPG_MODE, 0);
assert(me); /* all callers are in this file and call with non null argument */
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
coord = &me->config.internal_frame_origin_bqs_on_sctbl;
params = me->stream->isp_params_configs;
}
if (err)
return err;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
/* The delay latency determines the number of invalid frames after
* a stream is started. */
pipe->num_invalid_frames = pipe->dvs_frame_delay;
* where the driver chooses for memory based input frames. In these cases, a copy binary (which typical
* copies sensor data to DDR) does not have much use.
*/
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
need_isp_copy_binary = !online && !continuous;
else
need_isp_copy_binary = !online && !continuous && !(pipe->stream->config.mode == IA_CSS_INPUT_MODE_MEMORY);
}
}
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
coord = &pipe->config.internal_frame_origin_bqs_on_sctbl;
params = pipe->stream->isp_params_configs;
}
tnr_info = mycs->video_binary.out_frame_info[0];
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
/* Select resolution for TNR. If
* output_system_in_resolution(GDC_out_resolution) is
* being used, then select that as it will also be in resolution for
}
}
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
coord = &pipe->config.internal_frame_origin_bqs_on_sctbl;
params = pipe->stream->isp_params_configs;
}
assert(pipe);
assert(pipe->mode == IA_CSS_PIPE_ID_CAPTURE);
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
/* ldc and capture_pp are not supported in the same pipeline */
if (need_capt_ldc(pipe) == true)
return false;
/* TODO Do we disable ldc for skycam */
need_ldc = need_capt_ldc(pipe);
- if (atomisp_hw_is_isp2401 && need_ldc) {
+ if (IS_ISP2401 && need_ldc) {
/* ldc and capt_pp are not supported in the same pipeline */
struct ia_css_binary_descr capt_ldc_descr;
if (need_pp) {
struct ia_css_binary_descr capture_pp_descr;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
capt_pp_in_info = need_ldc ? &capt_ldc_out_info : &prim_out_info;
else
capt_pp_in_info = &prim_out_info;
effective_res.height);
}
- if (atomisp_hw_is_isp2401) {
+ if (IS_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) {
curr_stream->cont_capt = true;
curr_stream->disable_cont_vf = curr_stream->config.disable_cont_viewfinder;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
curr_stream->stop_copy_preview = my_css.stop_copy_preview;
}
/* set current stream */
curr_pipe->stream = curr_stream;
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
/* take over effective info */
effective_res = curr_pipe->config.input_effective_res;
goto ERR;
}
- if (atomisp_hw_is_isp2401)
+ if (IS_ISP2401)
pipe_info->output_system_in_res_info = curr_pipe->config.output_system_in_res;
if (!spcopyonly) {
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
err = sh_css_pipe_get_shading_info(curr_pipe,
&pipe_info->shading_info, NULL);
else
}
}
free_mpi = stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
free_mpi |= stream->config.mode == IA_CSS_INPUT_MODE_TPG;
free_mpi |= stream->config.mode == IA_CSS_INPUT_MODE_PRBS;
}
*/
int
ia_css_stream_load(struct ia_css_stream *stream) {
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
int i;
int err;
}
#endif
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
err = ia_css_pipeline_request_stop(&stream->last_pipe->pipeline);
} else {
err = sh_css_pipes_stop(stream);
assert(stream);
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
stopped = ia_css_pipeline_has_stopped(&stream->last_pipe->pipeline);
} else {
stopped = sh_css_pipes_have_stopped(stream);
}
/* For now, stop whole SP */
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
sh_css_write_host2sp_command(host2sp_cmd_terminate);
} else {
if (!sh_css_write_host2sp_command(host2sp_cmd_terminate))
const char *release_version;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
release_version = isp2400_release_version;
else
release_version = isp2401_release_version;
int ret;
const char *release_version;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
release_version = isp2400_release_version;
else
release_version = isp2401_release_version;
static bool buffers_needed(struct ia_css_pipe *pipe)
{
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
if (pipe->stream->config.mode == IA_CSS_INPUT_MODE_BUFFERED_SENSOR)
return false;
else
return 0; /* AM TODO: Check */
}
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
port = (unsigned int)pipe->stream->config.source.port.port;
else
err = ia_css_mipi_is_source_port_valid(pipe, &port);
return err;
}
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
port = (unsigned int)pipe->stream->config.source.port.port;
else
err = ia_css_mipi_is_source_port_valid(pipe, &port);
/* TODO: AM: maybe this should be returning an error. */
}
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
port = (unsigned int)pipe->stream->config.source.port.port;
else
err = ia_css_mipi_is_source_port_valid(pipe, &port);
params->dp_config.b = params->wb_config.b;
params->dp_config.gb = params->wb_config.gb;
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
assert(pipe);
assert(pipe->mode < IA_CSS_PIPE_ID_NUM);
* before (NORM+OBC) or after. The folllowing code to set the
* DPC configuration should be updated when this interface is made
* available */
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
sh_css_set_dp_config(pipe, params, config->dp_config);
ia_css_set_param_exceptions(pipe, params);
}
goto exit;
}
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
ia_css_set_param_exceptions(pipe, params);
exit:
ia_css_set_ob_config(params, &default_ob_config);
ia_css_set_dp_config(params, &default_dp_config);
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
ia_css_set_param_exceptions(pipe_in, params);
} else {
for (i = 0; i < stream->num_pipes; i++) {
retval = false;
goto exit;
}
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
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]);
}
}
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
ia_css_set_param_exceptions(pipe_in, params);
params->fpn_config.data = stream_params->fpn_config.data;
pipe->scaler_pp_lut = mmgr_NULL;
if (!stream_started) {
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
pipe->scaler_pp_lut = hmm_alloc(sizeof(zoom_table), HMM_BO_PRIVATE, 0, NULL, 0);
else
pipe->scaler_pp_lut = sh_css_params_alloc_gdc_lut();
host_lut_store((void *)zoom_table);
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
default_gdc_lut = hmm_alloc(sizeof(zoom_table), HMM_BO_PRIVATE, 0, NULL, 0);
else
default_gdc_lut = sh_css_params_alloc_gdc_lut();
u32 enable_conv;
size_t bytes;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
bytes = ISP2400_SCTBL_BYTES(binary);
else
bytes = ISP2401_SCTBL_BYTES(binary);
/* 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 (atomisp_hw_is_isp2401 &&
+ if (IS_ISP2401 &&
params->pipe_dpc_config_changed[pipe_id] && binary->info->sp.enable.dpc)
{
unsigned int size =
if (!params->pipe_dvs_6axis_config[pipe_id]) {
struct ia_css_resolution dvs_offset = {0};
- if (!atomisp_hw_is_isp2401) {
+ if (!IS_ISP2401) {
dvs_offset.width = (PIX_SHIFT_FILTER_RUN_IN_X + binary->dvs_envelope.width) / 2;
} else {
if (binary->dvs_envelope.width || binary->dvs_envelope.height) {
}
#endif
- if (atomisp_hw_is_isp2401) {
+ if (IS_ISP2401) {
/* For the shading correction type 1 (the legacy shading table conversion in css is not used),
* the parameters are passed to the isp for the shading table centering.
*/
*/
#include "../../include/linux/atomisp.h"
+#include "../../include/linux/atomisp_platform.h"
#include "ia_css_version.h"
#include "ia_css_version_data.h"
#include "ia_css_err.h"
ia_css_get_version(char *version, int max_size) {
char *css_version;
- if (!atomisp_hw_is_isp2401)
+ if (!IS_ISP2401)
css_version = ISP2400_CSS_VERSION_STRING;
else
css_version = ISP2401_CSS_VERSION_STRING;