Lines Matching +full:fimc +full:- +full:isp
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
23 #include <media/v4l2-device.h>
24 #include <media/v4l2-ioctl.h>
26 #include "fimc-is.h"
27 #include "fimc-is-command.h"
28 #include "fimc-is-errno.h"
29 #include "fimc-is-param.h"
30 #include "fimc-is-regs.h"
31 #include "fimc-is-sensor.h"
42 dst = &is->is_p_region->parameter.global.shotmode; in __fimc_is_hw_update_param_global_shotmode()
43 src = &is->config[is->config_index].global.shotmode; in __fimc_is_hw_update_param_global_shotmode()
51 dst = &is->is_p_region->parameter.sensor.frame_rate; in __fimc_is_hw_update_param_sensor_framerate()
52 src = &is->config[is->config_index].sensor.frame_rate; in __fimc_is_hw_update_param_sensor_framerate()
58 struct is_param_region *par = &is->is_p_region->parameter; in __fimc_is_hw_update_param()
59 struct chain_config *cfg = &is->config[is->config_index]; in __fimc_is_hw_update_param()
63 __hw_param_copy(&par->isp.control, &cfg->isp.control); in __fimc_is_hw_update_param()
67 __hw_param_copy(&par->isp.otf_input, &cfg->isp.otf_input); in __fimc_is_hw_update_param()
71 __hw_param_copy(&par->isp.dma1_input, &cfg->isp.dma1_input); in __fimc_is_hw_update_param()
75 __hw_param_copy(&par->isp.dma2_input, &cfg->isp.dma2_input); in __fimc_is_hw_update_param()
79 __hw_param_copy(&par->isp.aa, &cfg->isp.aa); in __fimc_is_hw_update_param()
83 __hw_param_copy(&par->isp.flash, &cfg->isp.flash); in __fimc_is_hw_update_param()
87 __hw_param_copy(&par->isp.awb, &cfg->isp.awb); in __fimc_is_hw_update_param()
91 __hw_param_copy(&par->isp.effect, &cfg->isp.effect); in __fimc_is_hw_update_param()
95 __hw_param_copy(&par->isp.iso, &cfg->isp.iso); in __fimc_is_hw_update_param()
99 __hw_param_copy(&par->isp.adjust, &cfg->isp.adjust); in __fimc_is_hw_update_param()
103 __hw_param_copy(&par->isp.metering, &cfg->isp.metering); in __fimc_is_hw_update_param()
107 __hw_param_copy(&par->isp.afc, &cfg->isp.afc); in __fimc_is_hw_update_param()
111 __hw_param_copy(&par->isp.otf_output, &cfg->isp.otf_output); in __fimc_is_hw_update_param()
115 __hw_param_copy(&par->isp.dma1_output, &cfg->isp.dma1_output); in __fimc_is_hw_update_param()
119 __hw_param_copy(&par->isp.dma2_output, &cfg->isp.dma2_output); in __fimc_is_hw_update_param()
123 __hw_param_copy(&par->drc.control, &cfg->drc.control); in __fimc_is_hw_update_param()
127 __hw_param_copy(&par->drc.otf_input, &cfg->drc.otf_input); in __fimc_is_hw_update_param()
131 __hw_param_copy(&par->drc.dma_input, &cfg->drc.dma_input); in __fimc_is_hw_update_param()
135 __hw_param_copy(&par->drc.otf_output, &cfg->drc.otf_output); in __fimc_is_hw_update_param()
139 __hw_param_copy(&par->fd.control, &cfg->fd.control); in __fimc_is_hw_update_param()
143 __hw_param_copy(&par->fd.otf_input, &cfg->fd.otf_input); in __fimc_is_hw_update_param()
147 __hw_param_copy(&par->fd.dma_input, &cfg->fd.dma_input); in __fimc_is_hw_update_param()
151 __hw_param_copy(&par->fd.config, &cfg->fd.config); in __fimc_is_hw_update_param()
155 return -EINVAL; in __fimc_is_hw_update_param()
163 struct chain_config *config = &is->config[is->config_index]; in __get_pending_param_count()
167 spin_lock_irqsave(&is->slock, flags); in __get_pending_param_count()
168 count = hweight32(config->p_region_index[0]); in __get_pending_param_count()
169 count += hweight32(config->p_region_index[1]); in __get_pending_param_count()
170 spin_unlock_irqrestore(&is->slock, flags); in __get_pending_param_count()
180 id = is->config_index; in __is_hw_update_params()
181 p_index = &is->config[id].p_region_index[0]; in __is_hw_update_params()
209 struct isp_param *isp; in __is_get_frame_size() local
211 isp = &is->config[is->config_index].isp; in __is_get_frame_size()
212 mf->width = isp->otf_input.width; in __is_get_frame_size()
213 mf->height = isp->otf_input.height; in __is_get_frame_size()
218 unsigned int index = is->config_index; in __is_set_frame_size()
219 struct isp_param *isp; in __is_set_frame_size() local
223 isp = &is->config[index].isp; in __is_set_frame_size()
224 drc = &is->config[index].drc; in __is_set_frame_size()
225 fd = &is->config[index].fd; in __is_set_frame_size()
227 /* Update isp size info (OTF only) */ in __is_set_frame_size()
228 isp->otf_input.width = mf->width; in __is_set_frame_size()
229 isp->otf_input.height = mf->height; in __is_set_frame_size()
230 isp->otf_output.width = mf->width; in __is_set_frame_size()
231 isp->otf_output.height = mf->height; in __is_set_frame_size()
233 drc->otf_input.width = mf->width; in __is_set_frame_size()
234 drc->otf_input.height = mf->height; in __is_set_frame_size()
235 drc->otf_output.width = mf->width; in __is_set_frame_size()
236 drc->otf_output.height = mf->height; in __is_set_frame_size()
238 fd->otf_input.width = mf->width; in __is_set_frame_size()
239 fd->otf_input.height = mf->height; in __is_set_frame_size()
242 &is->config[index].p_region_index[0])) in __is_set_frame_size()
255 switch (is->sensor->drvdata->id) { in fimc_is_hw_get_sensor_max_framerate()
265 unsigned int index = is->config_index; in __is_set_sensor()
267 struct isp_param *isp; in __is_set_sensor() local
269 sensor = &is->config[index].sensor; in __is_set_sensor()
270 isp = &is->config[index].isp; in __is_set_sensor()
273 sensor->frame_rate.frame_rate = in __is_set_sensor()
275 isp->otf_input.frametime_min = 0; in __is_set_sensor()
276 isp->otf_input.frametime_max = 66666; in __is_set_sensor()
278 sensor->frame_rate.frame_rate = fps; in __is_set_sensor()
279 isp->otf_input.frametime_min = 0; in __is_set_sensor()
280 isp->otf_input.frametime_max = (u32)1000000 / fps; in __is_set_sensor()
289 struct isp_param *isp; in __is_set_init_isp_aa() local
291 isp = &is->config[is->config_index].isp; in __is_set_init_isp_aa()
293 isp->aa.cmd = ISP_AA_COMMAND_START; in __is_set_init_isp_aa()
294 isp->aa.target = ISP_AA_TARGET_AF | ISP_AA_TARGET_AE | in __is_set_init_isp_aa()
296 isp->aa.mode = 0; in __is_set_init_isp_aa()
297 isp->aa.scene = 0; in __is_set_init_isp_aa()
298 isp->aa.sleep = 0; in __is_set_init_isp_aa()
299 isp->aa.face = 0; in __is_set_init_isp_aa()
300 isp->aa.touch_x = 0; in __is_set_init_isp_aa()
301 isp->aa.touch_y = 0; in __is_set_init_isp_aa()
302 isp->aa.manual_af_setting = 0; in __is_set_init_isp_aa()
303 isp->aa.err = ISP_AF_ERROR_NONE; in __is_set_init_isp_aa()
310 unsigned int index = is->config_index; in __is_set_isp_flash()
311 struct isp_param *isp = &is->config[index].isp; in __is_set_isp_flash() local
313 isp->flash.cmd = cmd; in __is_set_isp_flash()
314 isp->flash.redeye = redeye; in __is_set_isp_flash()
315 isp->flash.err = ISP_FLASH_ERROR_NONE; in __is_set_isp_flash()
322 unsigned int index = is->config_index; in __is_set_isp_awb()
323 struct isp_param *isp; in __is_set_isp_awb() local
325 isp = &is->config[index].isp; in __is_set_isp_awb()
327 isp->awb.cmd = cmd; in __is_set_isp_awb()
328 isp->awb.illumination = val; in __is_set_isp_awb()
329 isp->awb.err = ISP_AWB_ERROR_NONE; in __is_set_isp_awb()
336 unsigned int index = is->config_index; in __is_set_isp_effect()
337 struct isp_param *isp; in __is_set_isp_effect() local
339 isp = &is->config[index].isp; in __is_set_isp_effect()
341 isp->effect.cmd = cmd; in __is_set_isp_effect()
342 isp->effect.err = ISP_IMAGE_EFFECT_ERROR_NONE; in __is_set_isp_effect()
349 unsigned int index = is->config_index; in __is_set_isp_iso()
350 struct isp_param *isp; in __is_set_isp_iso() local
352 isp = &is->config[index].isp; in __is_set_isp_iso()
354 isp->iso.cmd = cmd; in __is_set_isp_iso()
355 isp->iso.value = val; in __is_set_isp_iso()
356 isp->iso.err = ISP_ISO_ERROR_NONE; in __is_set_isp_iso()
363 unsigned int index = is->config_index; in __is_set_isp_adjust()
365 struct isp_param *isp; in __is_set_isp_adjust() local
367 p_index = &is->config[index].p_region_index[0]; in __is_set_isp_adjust()
368 isp = &is->config[index].isp; in __is_set_isp_adjust()
372 isp->adjust.contrast = val; in __is_set_isp_adjust()
375 isp->adjust.saturation = val; in __is_set_isp_adjust()
378 isp->adjust.sharpness = val; in __is_set_isp_adjust()
381 isp->adjust.exposure = val; in __is_set_isp_adjust()
384 isp->adjust.brightness = val; in __is_set_isp_adjust()
387 isp->adjust.hue = val; in __is_set_isp_adjust()
390 isp->adjust.contrast = 0; in __is_set_isp_adjust()
391 isp->adjust.saturation = 0; in __is_set_isp_adjust()
392 isp->adjust.sharpness = 0; in __is_set_isp_adjust()
393 isp->adjust.exposure = 0; in __is_set_isp_adjust()
394 isp->adjust.brightness = 0; in __is_set_isp_adjust()
395 isp->adjust.hue = 0; in __is_set_isp_adjust()
400 isp->adjust.cmd = cmd; in __is_set_isp_adjust()
401 isp->adjust.err = ISP_ADJUST_ERROR_NONE; in __is_set_isp_adjust()
404 isp->adjust.cmd |= cmd; in __is_set_isp_adjust()
410 unsigned int index = is->config_index; in __is_set_isp_metering()
411 struct isp_param *isp; in __is_set_isp_metering() local
414 p_index = &is->config[index].p_region_index[0]; in __is_set_isp_metering()
415 isp = &is->config[index].isp; in __is_set_isp_metering()
419 isp->metering.cmd = val; in __is_set_isp_metering()
422 isp->metering.win_pos_x = val; in __is_set_isp_metering()
425 isp->metering.win_pos_y = val; in __is_set_isp_metering()
428 isp->metering.win_width = val; in __is_set_isp_metering()
431 isp->metering.win_height = val; in __is_set_isp_metering()
438 isp->metering.err = ISP_METERING_ERROR_NONE; in __is_set_isp_metering()
445 unsigned int index = is->config_index; in __is_set_isp_afc()
446 struct isp_param *isp; in __is_set_isp_afc() local
448 isp = &is->config[index].isp; in __is_set_isp_afc()
450 isp->afc.cmd = cmd; in __is_set_isp_afc()
451 isp->afc.manual = val; in __is_set_isp_afc()
452 isp->afc.err = ISP_AFC_ERROR_NONE; in __is_set_isp_afc()
459 unsigned int index = is->config_index; in __is_set_drc_control()
462 drc = &is->config[index].drc; in __is_set_drc_control()
464 drc->control.bypass = val; in __is_set_drc_control()
471 unsigned int index = is->config_index; in __is_set_fd_control()
475 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_control()
476 fd = &is->config[index].fd; in __is_set_fd_control()
478 fd->control.cmd = val; in __is_set_fd_control()
480 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) in __is_set_fd_control()
486 unsigned int index = is->config_index; in __is_set_fd_config_maxface()
490 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_maxface()
491 fd = &is->config[index].fd; in __is_set_fd_config_maxface()
493 fd->config.max_number = val; in __is_set_fd_config_maxface()
495 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_maxface()
496 fd->config.cmd = FD_CONFIG_COMMAND_MAXIMUM_NUMBER; in __is_set_fd_config_maxface()
497 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_maxface()
500 fd->config.cmd |= FD_CONFIG_COMMAND_MAXIMUM_NUMBER; in __is_set_fd_config_maxface()
506 unsigned int index = is->config_index; in __is_set_fd_config_rollangle()
510 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_rollangle()
511 fd = &is->config[index].fd; in __is_set_fd_config_rollangle()
513 fd->config.roll_angle = val; in __is_set_fd_config_rollangle()
515 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_rollangle()
516 fd->config.cmd = FD_CONFIG_COMMAND_ROLL_ANGLE; in __is_set_fd_config_rollangle()
517 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_rollangle()
520 fd->config.cmd |= FD_CONFIG_COMMAND_ROLL_ANGLE; in __is_set_fd_config_rollangle()
526 unsigned int index = is->config_index; in __is_set_fd_config_yawangle()
530 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_yawangle()
531 fd = &is->config[index].fd; in __is_set_fd_config_yawangle()
533 fd->config.yaw_angle = val; in __is_set_fd_config_yawangle()
535 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_yawangle()
536 fd->config.cmd = FD_CONFIG_COMMAND_YAW_ANGLE; in __is_set_fd_config_yawangle()
537 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_yawangle()
540 fd->config.cmd |= FD_CONFIG_COMMAND_YAW_ANGLE; in __is_set_fd_config_yawangle()
546 unsigned int index = is->config_index; in __is_set_fd_config_smilemode()
550 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_smilemode()
551 fd = &is->config[index].fd; in __is_set_fd_config_smilemode()
553 fd->config.smile_mode = val; in __is_set_fd_config_smilemode()
555 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_smilemode()
556 fd->config.cmd = FD_CONFIG_COMMAND_SMILE_MODE; in __is_set_fd_config_smilemode()
557 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_smilemode()
560 fd->config.cmd |= FD_CONFIG_COMMAND_SMILE_MODE; in __is_set_fd_config_smilemode()
566 unsigned int index = is->config_index; in __is_set_fd_config_blinkmode()
570 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_blinkmode()
571 fd = &is->config[index].fd; in __is_set_fd_config_blinkmode()
573 fd->config.blink_mode = val; in __is_set_fd_config_blinkmode()
575 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_blinkmode()
576 fd->config.cmd = FD_CONFIG_COMMAND_BLINK_MODE; in __is_set_fd_config_blinkmode()
577 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_blinkmode()
580 fd->config.cmd |= FD_CONFIG_COMMAND_BLINK_MODE; in __is_set_fd_config_blinkmode()
586 unsigned int index = is->config_index; in __is_set_fd_config_eyedetect()
590 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_eyedetect()
591 fd = &is->config[index].fd; in __is_set_fd_config_eyedetect()
593 fd->config.eye_detect = val; in __is_set_fd_config_eyedetect()
595 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_eyedetect()
596 fd->config.cmd = FD_CONFIG_COMMAND_EYES_DETECT; in __is_set_fd_config_eyedetect()
597 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_eyedetect()
600 fd->config.cmd |= FD_CONFIG_COMMAND_EYES_DETECT; in __is_set_fd_config_eyedetect()
606 unsigned int index = is->config_index; in __is_set_fd_config_mouthdetect()
610 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_mouthdetect()
611 fd = &is->config[index].fd; in __is_set_fd_config_mouthdetect()
613 fd->config.mouth_detect = val; in __is_set_fd_config_mouthdetect()
615 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_mouthdetect()
616 fd->config.cmd = FD_CONFIG_COMMAND_MOUTH_DETECT; in __is_set_fd_config_mouthdetect()
617 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_mouthdetect()
620 fd->config.cmd |= FD_CONFIG_COMMAND_MOUTH_DETECT; in __is_set_fd_config_mouthdetect()
626 unsigned int index = is->config_index; in __is_set_fd_config_orientation()
630 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_orientation()
631 fd = &is->config[index].fd; in __is_set_fd_config_orientation()
633 fd->config.orientation = val; in __is_set_fd_config_orientation()
635 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_orientation()
636 fd->config.cmd = FD_CONFIG_COMMAND_ORIENTATION; in __is_set_fd_config_orientation()
637 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_orientation()
640 fd->config.cmd |= FD_CONFIG_COMMAND_ORIENTATION; in __is_set_fd_config_orientation()
646 unsigned int index = is->config_index; in __is_set_fd_config_orientation_val()
650 p_index = &is->config[index].p_region_index[1]; in __is_set_fd_config_orientation_val()
651 fd = &is->config[index].fd; in __is_set_fd_config_orientation_val()
653 fd->config.orientation_value = val; in __is_set_fd_config_orientation_val()
655 if (!test_bit((PARAM_FD_CONFIG - 32), p_index)) { in __is_set_fd_config_orientation_val()
656 fd->config.cmd = FD_CONFIG_COMMAND_ORIENTATION_VALUE; in __is_set_fd_config_orientation_val()
657 fd->config.err = ERROR_FD_NONE; in __is_set_fd_config_orientation_val()
660 fd->config.cmd |= FD_CONFIG_COMMAND_ORIENTATION_VALUE; in __is_set_fd_config_orientation_val()
667 struct isp_param *isp; in fimc_is_set_initial_params() local
673 index = is->config_index; in fimc_is_set_initial_params()
674 global = &is->config[index].global; in fimc_is_set_initial_params()
675 isp = &is->config[index].isp; in fimc_is_set_initial_params()
676 drc = &is->config[index].drc; in fimc_is_set_initial_params()
677 fd = &is->config[index].fd; in fimc_is_set_initial_params()
678 p_index = &is->config[index].p_region_index[0]; in fimc_is_set_initial_params()
681 global->shotmode.cmd = 1; in fimc_is_set_initial_params()
684 /* ISP */ in fimc_is_set_initial_params()
685 isp->control.cmd = CONTROL_COMMAND_START; in fimc_is_set_initial_params()
686 isp->control.bypass = CONTROL_BYPASS_DISABLE; in fimc_is_set_initial_params()
687 isp->control.err = CONTROL_ERROR_NONE; in fimc_is_set_initial_params()
690 isp->otf_input.cmd = OTF_INPUT_COMMAND_ENABLE; in fimc_is_set_initial_params()
692 isp->otf_input.width = DEFAULT_PREVIEW_STILL_WIDTH; in fimc_is_set_initial_params()
693 isp->otf_input.height = DEFAULT_PREVIEW_STILL_HEIGHT; in fimc_is_set_initial_params()
696 if (is->sensor->test_pattern) in fimc_is_set_initial_params()
697 isp->otf_input.format = OTF_INPUT_FORMAT_STRGEN_COLORBAR_BAYER; in fimc_is_set_initial_params()
699 isp->otf_input.format = OTF_INPUT_FORMAT_BAYER; in fimc_is_set_initial_params()
700 isp->otf_input.bitwidth = 10; in fimc_is_set_initial_params()
701 isp->otf_input.order = OTF_INPUT_ORDER_BAYER_GR_BG; in fimc_is_set_initial_params()
702 isp->otf_input.crop_offset_x = 0; in fimc_is_set_initial_params()
703 isp->otf_input.crop_offset_y = 0; in fimc_is_set_initial_params()
704 isp->otf_input.err = OTF_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
706 isp->dma1_input.cmd = DMA_INPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
707 isp->dma1_input.width = 0; in fimc_is_set_initial_params()
708 isp->dma1_input.height = 0; in fimc_is_set_initial_params()
709 isp->dma1_input.format = 0; in fimc_is_set_initial_params()
710 isp->dma1_input.bitwidth = 0; in fimc_is_set_initial_params()
711 isp->dma1_input.plane = 0; in fimc_is_set_initial_params()
712 isp->dma1_input.order = 0; in fimc_is_set_initial_params()
713 isp->dma1_input.buffer_number = 0; in fimc_is_set_initial_params()
714 isp->dma1_input.width = 0; in fimc_is_set_initial_params()
715 isp->dma1_input.err = DMA_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
718 isp->dma2_input.cmd = DMA_INPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
719 isp->dma2_input.width = 0; in fimc_is_set_initial_params()
720 isp->dma2_input.height = 0; in fimc_is_set_initial_params()
721 isp->dma2_input.format = 0; in fimc_is_set_initial_params()
722 isp->dma2_input.bitwidth = 0; in fimc_is_set_initial_params()
723 isp->dma2_input.plane = 0; in fimc_is_set_initial_params()
724 isp->dma2_input.order = 0; in fimc_is_set_initial_params()
725 isp->dma2_input.buffer_number = 0; in fimc_is_set_initial_params()
726 isp->dma2_input.width = 0; in fimc_is_set_initial_params()
727 isp->dma2_input.err = DMA_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
730 isp->aa.cmd = ISP_AA_COMMAND_START; in fimc_is_set_initial_params()
731 isp->aa.target = ISP_AA_TARGET_AE | ISP_AA_TARGET_AWB; in fimc_is_set_initial_params()
769 isp->otf_output.cmd = OTF_OUTPUT_COMMAND_ENABLE; in fimc_is_set_initial_params()
771 isp->otf_output.width = DEFAULT_PREVIEW_STILL_WIDTH; in fimc_is_set_initial_params()
772 isp->otf_output.height = DEFAULT_PREVIEW_STILL_HEIGHT; in fimc_is_set_initial_params()
775 isp->otf_output.format = OTF_OUTPUT_FORMAT_YUV444; in fimc_is_set_initial_params()
776 isp->otf_output.bitwidth = 12; in fimc_is_set_initial_params()
777 isp->otf_output.order = 0; in fimc_is_set_initial_params()
778 isp->otf_output.err = OTF_OUTPUT_ERROR_NONE; in fimc_is_set_initial_params()
781 isp->dma1_output.cmd = DMA_OUTPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
782 isp->dma1_output.width = 0; in fimc_is_set_initial_params()
783 isp->dma1_output.height = 0; in fimc_is_set_initial_params()
784 isp->dma1_output.format = 0; in fimc_is_set_initial_params()
785 isp->dma1_output.bitwidth = 0; in fimc_is_set_initial_params()
786 isp->dma1_output.plane = 0; in fimc_is_set_initial_params()
787 isp->dma1_output.order = 0; in fimc_is_set_initial_params()
788 isp->dma1_output.buffer_number = 0; in fimc_is_set_initial_params()
789 isp->dma1_output.buffer_address = 0; in fimc_is_set_initial_params()
790 isp->dma1_output.notify_dma_done = 0; in fimc_is_set_initial_params()
791 isp->dma1_output.dma_out_mask = 0; in fimc_is_set_initial_params()
792 isp->dma1_output.err = DMA_OUTPUT_ERROR_NONE; in fimc_is_set_initial_params()
797 isp->dma2_output.cmd = DMA_OUTPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
798 isp->dma2_output.width = 0; in fimc_is_set_initial_params()
799 isp->dma2_output.height = 0; in fimc_is_set_initial_params()
800 isp->dma2_output.format = 0; in fimc_is_set_initial_params()
801 isp->dma2_output.bitwidth = 0; in fimc_is_set_initial_params()
802 isp->dma2_output.plane = 0; in fimc_is_set_initial_params()
803 isp->dma2_output.order = 0; in fimc_is_set_initial_params()
804 isp->dma2_output.buffer_number = 0; in fimc_is_set_initial_params()
805 isp->dma2_output.buffer_address = 0; in fimc_is_set_initial_params()
806 isp->dma2_output.notify_dma_done = 0; in fimc_is_set_initial_params()
807 isp->dma2_output.dma_out_mask = 0; in fimc_is_set_initial_params()
808 isp->dma2_output.err = DMA_OUTPUT_ERROR_NONE; in fimc_is_set_initial_params()
814 if (is->config_index == 0) in fimc_is_set_initial_params()
819 drc->control.cmd = CONTROL_COMMAND_START; in fimc_is_set_initial_params()
822 drc->otf_input.cmd = OTF_INPUT_COMMAND_ENABLE; in fimc_is_set_initial_params()
824 drc->otf_input.width = DEFAULT_PREVIEW_STILL_WIDTH; in fimc_is_set_initial_params()
825 drc->otf_input.height = DEFAULT_PREVIEW_STILL_HEIGHT; in fimc_is_set_initial_params()
828 drc->otf_input.format = OTF_INPUT_FORMAT_YUV444; in fimc_is_set_initial_params()
829 drc->otf_input.bitwidth = 12; in fimc_is_set_initial_params()
830 drc->otf_input.order = 0; in fimc_is_set_initial_params()
831 drc->otf_input.err = OTF_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
833 drc->dma_input.cmd = DMA_INPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
834 drc->dma_input.width = 0; in fimc_is_set_initial_params()
835 drc->dma_input.height = 0; in fimc_is_set_initial_params()
836 drc->dma_input.format = 0; in fimc_is_set_initial_params()
837 drc->dma_input.bitwidth = 0; in fimc_is_set_initial_params()
838 drc->dma_input.plane = 0; in fimc_is_set_initial_params()
839 drc->dma_input.order = 0; in fimc_is_set_initial_params()
840 drc->dma_input.buffer_number = 0; in fimc_is_set_initial_params()
841 drc->dma_input.width = 0; in fimc_is_set_initial_params()
842 drc->dma_input.err = DMA_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
845 drc->otf_output.cmd = OTF_OUTPUT_COMMAND_ENABLE; in fimc_is_set_initial_params()
847 drc->otf_output.width = DEFAULT_PREVIEW_STILL_WIDTH; in fimc_is_set_initial_params()
848 drc->otf_output.height = DEFAULT_PREVIEW_STILL_HEIGHT; in fimc_is_set_initial_params()
851 drc->otf_output.format = OTF_OUTPUT_FORMAT_YUV444; in fimc_is_set_initial_params()
852 drc->otf_output.bitwidth = 8; in fimc_is_set_initial_params()
853 drc->otf_output.order = 0; in fimc_is_set_initial_params()
854 drc->otf_output.err = OTF_OUTPUT_ERROR_NONE; in fimc_is_set_initial_params()
858 fd->control.bypass = CONTROL_BYPASS_DISABLE; in fimc_is_set_initial_params()
860 fd->otf_input.cmd = OTF_INPUT_COMMAND_ENABLE; in fimc_is_set_initial_params()
862 fd->otf_input.width = DEFAULT_PREVIEW_STILL_WIDTH; in fimc_is_set_initial_params()
863 fd->otf_input.height = DEFAULT_PREVIEW_STILL_HEIGHT; in fimc_is_set_initial_params()
867 fd->otf_input.format = OTF_INPUT_FORMAT_YUV444; in fimc_is_set_initial_params()
868 fd->otf_input.bitwidth = 8; in fimc_is_set_initial_params()
869 fd->otf_input.order = 0; in fimc_is_set_initial_params()
870 fd->otf_input.err = OTF_INPUT_ERROR_NONE; in fimc_is_set_initial_params()
872 fd->dma_input.cmd = DMA_INPUT_COMMAND_DISABLE; in fimc_is_set_initial_params()
873 fd->dma_input.width = 0; in fimc_is_set_initial_params()
874 fd->dma_input.height = 0; in fimc_is_set_initial_params()
875 fd->dma_input.format = 0; in fimc_is_set_initial_params()
876 fd->dma_input.bitwidth = 0; in fimc_is_set_initial_params()
877 fd->dma_input.plane = 0; in fimc_is_set_initial_params()
878 fd->dma_input.order = 0; in fimc_is_set_initial_params()
879 fd->dma_input.buffer_number = 0; in fimc_is_set_initial_params()
880 fd->dma_input.width = 0; in fimc_is_set_initial_params()
881 fd->dma_input.err = DMA_INPUT_ERROR_NONE; in fimc_is_set_initial_params()