void fimc_isp_irq_handler(struct fimc_is *is) { is->i2h_cmd.args[0] = mcuctl_read(is, MCUCTL_REG_ISSR(20)); is->i2h_cmd.args[1] = mcuctl_read(is, MCUCTL_REG_ISSR(21)); fimc_is_fw_clear_irq1(is, FIMC_IS_INT_FRAME_DONE_ISP); /* TODO: Complete ISP DMA interrupt handler */ wake_up(&is->irq_queue); }
void fimc_isp_irq_handler(struct fimc_is *is) { is->i2h_cmd.args[0] = mcuctl_read(is, MCUCTL_REG_ISSR(20)); is->i2h_cmd.args[1] = mcuctl_read(is, MCUCTL_REG_ISSR(21)); fimc_is_fw_clear_irq1(is, FIMC_IS_INT_FRAME_DONE_ISP); fimc_isp_video_irq_handler(is); wake_up(&is->irq_queue); }
static void fimc_is_irq_handler_isp(struct fimc_is_dev *dev) { #if defined(CONFIG_VIDEO_EXYNOS_FIMC_IS_BAYER) int buf_index; #endif /* INTR_FRAME_DONE_ISP */ dev->i2h_cmd.arg[0] = readl(dev->regs + ISSR20); dev->i2h_cmd.arg[1] = readl(dev->regs + ISSR21); fimc_is_fw_clear_irq1(dev, INTR_FRAME_DONE_ISP); #if defined(CONFIG_VIDEO_EXYNOS_FIMC_IS_BAYER) buf_index = (dev->i2h_cmd.arg[1] - 1) % dev->video[FIMC_IS_VIDEO_NUM_BAYER].num_buf; vb2_buffer_done(dev->video[FIMC_IS_VIDEO_NUM_BAYER].vbq.bufs[buf_index], VB2_BUF_STATE_DONE); #endif }
static void fimc_is_irq_handler_general(struct fimc_is_dev *dev) { /* Read ISSR10 ~ ISSR15 */ dev->i2h_cmd.cmd = readl(dev->regs + ISSR10); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: dbg("IHC_GET_SENSOR_NUMBER\n"); fimc_is_hw_get_param(dev, 1); dbg("ISP - FW version - %d\n", dev->i2h_cmd.arg[0]); dev->fw.ver = dev->i2h_cmd.arg[0]; fimc_is_hw_wait_intmsr0_intmsd0(dev); fimc_is_hw_set_sensor_num(dev); break; case IHC_SET_SHOT_MARK: fimc_is_hw_get_param(dev, 3); break; case IHC_SET_FACE_MARK: fimc_is_hw_get_param(dev, 2); break; case IHC_FRAME_DONE: fimc_is_hw_get_param(dev, 2); break; case IHC_NOT_READY: break; case IHC_AA_DONE: fimc_is_hw_get_param(dev, 3); break; case ISR_DONE: fimc_is_hw_get_param(dev, 3); break; case ISR_NDONE: fimc_is_hw_get_param(dev, 4); break; } /* Just clear the interrupt pending bits. */ fimc_is_fw_clear_irq1(dev, INTR_GENERAL); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: fimc_is_hw_set_intgr0_gd0(dev); set_bit(IS_ST_FW_LOADED, &dev->state); break; case IHC_SET_SHOT_MARK: break; case IHC_SET_FACE_MARK: dev->fd_header.count = dev->i2h_cmd.arg[0]; dev->fd_header.index = dev->i2h_cmd.arg[1]; break; case IHC_FRAME_DONE: break; case IHC_AA_DONE: dbg("AA_DONE - %d, %d, %d\n", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1], dev->i2h_cmd.arg[2]); switch (dev->i2h_cmd.arg[0]) { /* SEARCH: Occurs when search is requested at continuous AF */ case 2: break; /* INFOCUS: Occurs when focus is found. */ case 3: if (dev->af.af_state == FIMC_IS_AF_RUNNING) dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x2; break; /* OUTOFFOCUS: Occurs when focus is not found. */ case 4: if (dev->af.af_state == FIMC_IS_AF_RUNNING) dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x1; break; } break; case IHC_NOT_READY: err("Init Sequnce Error- IS will be turned off!!"); break; case ISR_DONE: dbg("ISR_DONE - %d\n", dev->i2h_cmd.arg[0]); switch (dev->i2h_cmd.arg[0]) { case HIC_PREVIEW_STILL: case HIC_PREVIEW_VIDEO: case HIC_CAPTURE_STILL: case HIC_CAPTURE_VIDEO: set_bit(IS_ST_CHANGE_MODE, &dev->state); /* Get CAC margin */ dev->sensor.offset_x = dev->i2h_cmd.arg[1]; dev->sensor.offset_y = dev->i2h_cmd.arg[2]; break; case HIC_STREAM_ON: clear_bit(IS_ST_STREAM_OFF, &dev->state); set_bit(IS_ST_STREAM_ON, &dev->state); break; case HIC_STREAM_OFF: clear_bit(IS_ST_STREAM_ON, &dev->state); set_bit(IS_ST_STREAM_OFF, &dev->state); break; case HIC_SET_PARAMETER: dev->p_region_index1 = 0; dev->p_region_index2 = 0; atomic_set(&dev->p_region_num, 0); set_bit(IS_ST_BLOCK_CMD_CLEARED, &dev->state); if (dev->af.af_state == FIMC_IS_AF_SETCONFIG) dev->af.af_state = FIMC_IS_AF_RUNNING; else if (dev->af.af_state == FIMC_IS_AF_ABORT) dev->af.af_state = FIMC_IS_AF_IDLE; break; case HIC_GET_PARAMETER: break; case HIC_SET_TUNE: break; case HIC_GET_STATUS: break; case HIC_OPEN_SENSOR: set_bit(IS_ST_OPEN_SENSOR, &dev->state); printk(KERN_INFO "FIMC-IS Lane= %d, Settle line= %d\n", dev->i2h_cmd.arg[2], dev->i2h_cmd.arg[1]); break; case HIC_CLOSE_SENSOR: clear_bit(IS_ST_OPEN_SENSOR, &dev->state); dev->sensor.id = 0; break; case HIC_MSG_TEST: dbg("Config MSG level was done\n"); break; case HIC_POWER_DOWN: set_bit(IS_PWR_SUB_IP_POWER_OFF, &dev->power); break; case HIC_GET_SET_FILE_ADDR: dev->setfile.base = dev->i2h_cmd.arg[1]; set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; case HIC_LOAD_SET_FILE: set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; } break; case ISR_NDONE: err("ISR_NDONE - %d: 0x%08x\n", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1]); fimc_is_print_err_number(dev->i2h_cmd.arg[1]); switch (dev->i2h_cmd.arg[1]) { case IS_ERROR_SET_PARAMETER: fimc_is_mem_cache_inv((void *)dev->is_p_region, IS_PARAM_SIZE); fimc_is_param_err_checker(dev); break; } } }
/* General IS interrupt handler */ static void fimc_is_general_irq_handler(struct fimc_is *is) { is->i2h_cmd.cmd = mcuctl_read(is, MCUCTL_REG_ISSR(10)); switch (is->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUM: fimc_is_hw_get_params(is, 1); fimc_is_hw_wait_intmsr0_intmsd0(is); fimc_is_hw_set_sensor_num(is); pr_debug("ISP FW version: %#x\n", is->i2h_cmd.args[0]); break; case IHC_SET_FACE_MARK: case IHC_FRAME_DONE: fimc_is_hw_get_params(is, 2); break; case IHC_SET_SHOT_MARK: case IHC_AA_DONE: case IH_REPLY_DONE: fimc_is_hw_get_params(is, 3); break; case IH_REPLY_NOT_DONE: fimc_is_hw_get_params(is, 4); break; case IHC_NOT_READY: break; default: pr_info("unknown command: %#x\n", is->i2h_cmd.cmd); } fimc_is_fw_clear_irq1(is, FIMC_IS_INT_GENERAL); switch (is->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUM: fimc_is_hw_set_intgr0_gd0(is); set_bit(IS_ST_A5_PWR_ON, &is->state); break; case IHC_SET_SHOT_MARK: break; case IHC_SET_FACE_MARK: is->fd_header.count = is->i2h_cmd.args[0]; is->fd_header.index = is->i2h_cmd.args[1]; is->fd_header.offset = 0; break; case IHC_FRAME_DONE: break; case IHC_AA_DONE: pr_debug("AA_DONE - %d, %d, %d\n", is->i2h_cmd.args[0], is->i2h_cmd.args[1], is->i2h_cmd.args[2]); break; case IH_REPLY_DONE: pr_debug("ISR_DONE: args[0]: %#x\n", is->i2h_cmd.args[0]); switch (is->i2h_cmd.args[0]) { case HIC_PREVIEW_STILL...HIC_CAPTURE_VIDEO: /* Get CAC margin */ set_bit(IS_ST_CHANGE_MODE, &is->state); is->isp.cac_margin_x = is->i2h_cmd.args[1]; is->isp.cac_margin_y = is->i2h_cmd.args[2]; pr_debug("CAC margin (x,y): (%d,%d)\n", is->isp.cac_margin_x, is->isp.cac_margin_y); break; case HIC_STREAM_ON: clear_bit(IS_ST_STREAM_OFF, &is->state); set_bit(IS_ST_STREAM_ON, &is->state); break; case HIC_STREAM_OFF: clear_bit(IS_ST_STREAM_ON, &is->state); set_bit(IS_ST_STREAM_OFF, &is->state); break; case HIC_SET_PARAMETER: is->config[is->config_index].p_region_index1 = 0; is->config[is->config_index].p_region_index2 = 0; set_bit(IS_ST_BLOCK_CMD_CLEARED, &is->state); pr_debug("HIC_SET_PARAMETER\n"); break; case HIC_GET_PARAMETER: break; case HIC_SET_TUNE: break; case HIC_GET_STATUS: break; case HIC_OPEN_SENSOR: set_bit(IS_ST_OPEN_SENSOR, &is->state); pr_debug("data lanes: %d, settle line: %d\n", is->i2h_cmd.args[2], is->i2h_cmd.args[1]); break; case HIC_CLOSE_SENSOR: clear_bit(IS_ST_OPEN_SENSOR, &is->state); is->sensor_index = 0; break; case HIC_MSG_TEST: pr_debug("config MSG level completed\n"); break; case HIC_POWER_DOWN: clear_bit(IS_ST_PWR_SUBIP_ON, &is->state); break; case HIC_GET_SET_FILE_ADDR: is->setfile.base = is->i2h_cmd.args[1]; set_bit(IS_ST_SETFILE_LOADED, &is->state); break; case HIC_LOAD_SET_FILE: set_bit(IS_ST_SETFILE_LOADED, &is->state); break; } break; case IH_REPLY_NOT_DONE: pr_err("ISR_NDONE: %d: %#x, %s\n", is->i2h_cmd.args[0], is->i2h_cmd.args[1], fimc_is_strerr(is->i2h_cmd.args[1])); if (is->i2h_cmd.args[1] & IS_ERROR_TIME_OUT_FLAG) pr_err("IS_ERROR_TIME_OUT\n"); switch (is->i2h_cmd.args[1]) { case IS_ERROR_SET_PARAMETER: fimc_is_mem_barrier(); } switch (is->i2h_cmd.args[0]) { case HIC_SET_PARAMETER: is->config[is->config_index].p_region_index1 = 0; is->config[is->config_index].p_region_index2 = 0; set_bit(IS_ST_BLOCK_CMD_CLEARED, &is->state); break; } break; case IHC_NOT_READY: pr_err("IS control sequence error: Not Ready\n"); break; } wake_up(&is->irq_queue); }
static void fimc_is_irq_handler_general(struct fimc_is_dev *dev) { /* Read ISSR10 ~ ISSR15 */ dev->i2h_cmd.cmd = readl(dev->regs + ISSR10); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: dbg("IHC_GET_SENSOR_NUMBER\n"); fimc_is_hw_get_param(dev, 1); dbg("ISP - FW version - %d\n", dev->i2h_cmd.arg[0]); dev->fw.ver = dev->i2h_cmd.arg[0]; fimc_is_hw_wait_intmsr0_intmsd0(dev); fimc_is_hw_set_sensor_num(dev); break; case IHC_SET_SHOT_MARK: fimc_is_hw_get_param(dev, 3); break; case IHC_SET_FACE_MARK: fimc_is_hw_get_param(dev, 2); break; case IHC_FRAME_DONE: fimc_is_hw_get_param(dev, 2); break; case IHC_NOT_READY: break; case IHC_AA_DONE: fimc_is_hw_get_param(dev, 3); break; case ISR_DONE: fimc_is_hw_get_param(dev, 3); break; case ISR_NDONE: fimc_is_hw_get_param(dev, 4); break; } /* Just clear the interrupt pending bits. */ fimc_is_fw_clear_irq1(dev, INTR_GENERAL); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: fimc_is_hw_set_intgr0_gd0(dev); set_bit(IS_ST_FW_LOADED, &dev->state); break; case IHC_SET_SHOT_MARK: break; case IHC_SET_FACE_MARK: dev->fd_header.count = dev->i2h_cmd.arg[0]; dev->fd_header.index = dev->i2h_cmd.arg[1]; /* Implementation of AF with face */ if (dev->af.mode == IS_FOCUS_MODE_CONTINUOUS && dev->af.af_state == FIMC_IS_AF_LOCK) { fimc_is_af_face(dev); } else if (dev->af.mode == IS_FOCUS_MODE_FACEDETECT) { /* Using face information once only */ fimc_is_af_face(dev); dev->af.mode = IS_FOCUS_MODE_IDLE; } break; case IHC_FRAME_DONE: break; case IHC_AA_DONE: printk("AA_DONE - %d, %d, %d :", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1], dev->i2h_cmd.arg[2]); // AF respond check if (dev->af.af_state == FIMC_IS_AF_RUNNING) { switch (dev->i2h_cmd.arg[0]) { case 2: /* SEARCH: Occurs when search is requested at continuous AF */ break; case 3: dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x2; printk("AF_SUCCESS\n"); break; case 4: dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x1; printk("AF_FAIL\n"); break; default: break; } } // AE respond check if(dev->af.ae_lock_state == FIMC_IS_AE_SETCONFIG) { switch (dev->i2h_cmd.arg[1]) { case 1: dev->af.ae_lock_state = FIMC_IS_AE_UNLOCKED; printk("AE_UNLOCKED\n"); break; case 2: dev->af.ae_lock_state = FIMC_IS_AE_LOCKED; printk("AE_LOCKED\n"); break; default: break; } } // AWB respond check if(dev->af.awb_lock_state == FIMC_IS_AWB_SETCONFIG) { switch (dev->i2h_cmd.arg[2]) { case 1: dev->af.awb_lock_state = FIMC_IS_AWB_UNLOCKED; printk("AWB_UNLOCKED\n"); break; case 2: dev->af.awb_lock_state = FIMC_IS_AWB_LOCKED; printk("AWB_LOCKED\n"); break; default: break; } } break; case IHC_NOT_READY: err("Init Sequnce Error- IS will be turned off!!"); break; case ISR_DONE: dbg("ISR_DONE - %d\n", dev->i2h_cmd.arg[0]); switch (dev->i2h_cmd.arg[0]) { case HIC_PREVIEW_STILL: case HIC_PREVIEW_VIDEO: case HIC_CAPTURE_STILL: case HIC_CAPTURE_VIDEO: set_bit(IS_ST_CHANGE_MODE, &dev->state); /* Get CAC margin */ dev->sensor.offset_x = dev->i2h_cmd.arg[1]; dev->sensor.offset_y = dev->i2h_cmd.arg[2]; break; case HIC_STREAM_ON: clear_bit(IS_ST_STREAM_OFF, &dev->state); set_bit(IS_ST_STREAM_ON, &dev->state); break; case HIC_STREAM_OFF: clear_bit(IS_ST_STREAM_ON, &dev->state); set_bit(IS_ST_STREAM_OFF, &dev->state); break; case HIC_SET_PARAMETER: dev->p_region_index1 = 0; dev->p_region_index2 = 0; atomic_set(&dev->p_region_num, 0); set_bit(IS_ST_BLOCK_CMD_CLEARED, &dev->state); if (dev->af.af_state == FIMC_IS_AF_SETCONFIG) dev->af.af_state = FIMC_IS_AF_RUNNING; else if (dev->af.af_state == FIMC_IS_AF_ABORT) dev->af.af_state = FIMC_IS_AF_IDLE; break; case HIC_GET_PARAMETER: break; case HIC_SET_TUNE: break; case HIC_GET_STATUS: break; case HIC_OPEN_SENSOR: set_bit(IS_ST_OPEN_SENSOR, &dev->state); #ifdef CONFIG_VIDEO_EXYNOS_FIMC_IS_BINNING_2X2 dev->mipi_settle = dev->i2h_cmd.arg[1]; #endif printk(KERN_INFO "FIMC-IS Lane= %d, Settle line= %d\n", dev->i2h_cmd.arg[2], dev->i2h_cmd.arg[1]); break; case HIC_CLOSE_SENSOR: clear_bit(IS_ST_OPEN_SENSOR, &dev->state); dev->sensor.id = 0; break; case HIC_MSG_TEST: dbg("Config MSG level was done\n"); break; case HIC_POWER_DOWN: set_bit(IS_PWR_SUB_IP_POWER_OFF, &dev->power); break; case HIC_GET_SET_FILE_ADDR: dev->setfile.base = dev->i2h_cmd.arg[1]; set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; case HIC_LOAD_SET_FILE: set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; #ifdef CONFIG_VIDEO_EXYNOS_FIMC_IS_BINNING_2X2 case HIC_SENSOR_MODE_CHANGE: set_bit(IS_ST_CHANGE_SENSOR_MODE, &dev->state); dev->mipi_settle = dev->i2h_cmd.arg[1]; printk(KERN_INFO "sensor mode change end, Settle line= %d\n", dev->i2h_cmd.arg[1]); break; #endif } break; case ISR_NDONE: err("ISR_NDONE - %d: 0x%08x\n", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1]); fimc_is_print_err_number(dev->i2h_cmd.arg[1]); switch (dev->i2h_cmd.arg[1]) { case IS_ERROR_SET_PARAMETER: fimc_is_mem_cache_inv((void *)dev->is_p_region, IS_PARAM_SIZE); fimc_is_param_err_checker(dev); break; } } }
static void fimc_is_irq_handler_general(struct fimc_is_dev *dev) { /* Read ISSR10 ~ ISSR15 */ dev->i2h_cmd.cmd = readl(dev->regs + ISSR10); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: dbg("IHC_GET_SENSOR_NUMBER\n"); fimc_is_hw_get_param(dev, 1); dbg("ISP - FW version - %d\n", dev->i2h_cmd.arg[0]); dev->fw.ver = dev->i2h_cmd.arg[0]; fimc_is_hw_wait_intmsr0_intmsd0(dev); fimc_is_hw_set_sensor_num(dev); break; case IHC_SET_SHOT_MARK: fimc_is_hw_get_param(dev, 3); break; case IHC_SET_FACE_MARK: fimc_is_hw_get_param(dev, 2); break; case IHC_FRAME_DONE: fimc_is_hw_get_param(dev, 2); break; case IHC_NOT_READY: break; case IHC_AA_DONE: fimc_is_hw_get_param(dev, 3); break; #if CONFIG_MACH_STUTTGART case IHC_FLASH_READY: fimc_is_hw_get_param(dev, 2); break; case IHC_ISP_ADJUST_DONE: fimc_is_hw_get_param(dev, 4); break; case IHC_ISP_ISO_DONE: fimc_is_hw_get_param(dev, 4); break; #endif case ISR_DONE: fimc_is_hw_get_param(dev, 3); break; case ISR_NDONE: fimc_is_hw_get_param(dev, 4); break; } /* Just clear the interrupt pending bits. */ fimc_is_fw_clear_irq1(dev, INTR_GENERAL); switch (dev->i2h_cmd.cmd) { case IHC_GET_SENSOR_NUMBER: fimc_is_hw_set_intgr0_gd0(dev); set_bit(IS_ST_FW_LOADED, &dev->state); break; case IHC_SET_SHOT_MARK: break; case IHC_SET_FACE_MARK: dev->fd_header.count = dev->i2h_cmd.arg[0]; dev->fd_header.index = dev->i2h_cmd.arg[1]; { if (dev->faceinfo_array->number < MAX_FRAME_COUNT) { int i = 0; u32 idx; dev->faceinfo_array->faceinfo[dev->faceinfo_array->write].count = dev->fd_header.count; while (i < dev->fd_header.count) { idx = (dev->fd_header.index + i) % MAX_FACE_COUNT; dev->faceinfo_array->faceinfo[dev->faceinfo_array->write].face[i] = dev->is_p_region->face[idx]; i++; } dev->faceinfo_array->write = (dev->faceinfo_array->write + 1) % MAX_FRAME_COUNT; dev->faceinfo_array->number++; } else { printk ("\n \t\t .... faceinfo lost .... \n"); } } break; case IHC_FRAME_DONE: break; case IHC_AA_DONE: printk("AA_DONE - %d, %d, %d\n", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1], dev->i2h_cmd.arg[2]); switch (dev->i2h_cmd.arg[0]) { /* SEARCH: Occurs when search is requested at continuous AF */ case 2: dev->af.af_lost_state = FIMC_IS_AF_SEARCH; wake_up(&dev->aflost_queue); if(dev->af.mode == IS_FOCUS_MODE_TOUCH){ schedule_work(&fimc_is_af_wq); } break; /* INFOCUS: Occurs when focus is found. */ case 3: if (dev->af.af_state == FIMC_IS_AF_RUNNING) dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x2; dev->af.af_lost_state = FIMC_IS_AF_INFOCUS; wake_up(&dev->aflost_queue); break; /* OUTOFFOCUS: Occurs when focus is not found. */ case 4: if (dev->af.af_state == FIMC_IS_AF_RUNNING) dev->af.af_state = FIMC_IS_AF_LOCK; dev->af.af_lock_state = 0x1; dev->af.af_lost_state = FIMC_IS_AF_OUTOFFOCUS; wake_up(&dev->aflost_queue); break; } break; #if CONFIG_MACH_STUTTGART case IHC_FLASH_READY: set_bit(IS_ST_FLASH_READY, &dev->state); dev->flash.led_on = dev->i2h_cmd.arg[1]; dbg("IS_ST_FLASH_READY : flash_on : %d", dev->flash.led_on); break; case IHC_ISP_ADJUST_DONE: { /* u32 uParam1; <==ISP_AdjustCommandEnum value... Contrast or Saturation or.. etc u32 uParam2; <== Actually control value (e.g. -4 ~ +4, -128~+128) u32 uParam3; <==frame counter when a5 received ISP Adjust command. u32 uParam4; <== frame counter applied Adjust command. */ struct is_adjust_info *infor = NULL; switch (dev->i2h_cmd.arg[0]) { case ISP_ADJUST_COMMAND_MANUAL_ALL: case ISP_ADJUST_COMMAND_AUTO: memset(&dev->adjust, 0, sizeof(struct is_adjust)); break; case ISP_ADJUST_COMMAND_MANUAL_CONTRAST: case ISP_ADJUST_COMMAND_MANUAL_SATURATION: case ISP_ADJUST_COMMAND_MANUAL_SHARPNESS: break; case ISP_ADJUST_COMMAND_MANUAL_EXPOSURE: infor = &dev->adjust.exposure; break; case ISP_ADJUST_COMMAND_MANUAL_BRIGHTNESS: case ISP_ADJUST_COMMAND_MANUAL_HUE: case ISP_ADJUST_COMMAND_MANUAL_HOTPIXEL: case ISP_ADJUST_COMMAND_MANUAL_SHADING: break; default: break; } if (infor) { infor->command = dev->i2h_cmd.arg[0]; infor->frame_start = dev->i2h_cmd.arg[2]; infor->frame_end = dev->i2h_cmd.arg[3]; if (infor->frame_end < 5) infor->old_value = infor->value = 0; infor->old_value = infor->value; infor->value = dev->i2h_cmd.arg[1]; } } //printk("====>[MMKIM]IHC_ISP_ADJUST_DONE(%d, %d, %d, %d)\n", // dev->i2h_cmd.arg[0],dev->i2h_cmd.arg[1],dev->i2h_cmd.arg[2],dev->i2h_cmd.arg[3]); break; case IHC_ISP_ISO_DONE : //printk("====>[MMKIM]IHC_ISP_ISO_DONE(%d, %d, %d, %d)\n", // dev->i2h_cmd.arg[0],dev->i2h_cmd.arg[1],dev->i2h_cmd.arg[2],dev->i2h_cmd.arg[3]); break; #endif case IHC_NOT_READY: err("Init Sequnce Error- IS will be turned off!!"); break; case ISR_DONE: dbg("ISR_DONE - %d\n", dev->i2h_cmd.arg[0]); switch (dev->i2h_cmd.arg[0]) { case HIC_PREVIEW_STILL: case HIC_PREVIEW_VIDEO: case HIC_CAPTURE_STILL: case HIC_CAPTURE_VIDEO: set_bit(IS_ST_CHANGE_MODE, &dev->state); /* Get CAC margin */ dev->sensor.offset_x = dev->i2h_cmd.arg[1]; dev->sensor.offset_y = dev->i2h_cmd.arg[2]; break; case HIC_STREAM_ON: clear_bit(IS_ST_STREAM_OFF, &dev->state); set_bit(IS_ST_STREAM_ON, &dev->state); break; case HIC_STREAM_OFF: clear_bit(IS_ST_STREAM_ON, &dev->state); set_bit(IS_ST_STREAM_OFF, &dev->state); break; case HIC_SET_PARAMETER: dev->p_region_index1 = 0; dev->p_region_index2 = 0; atomic_set(&dev->p_region_num, 0); set_bit(IS_ST_BLOCK_CMD_CLEARED, &dev->state); if (dev->af.af_state == FIMC_IS_AF_SETCONFIG) dev->af.af_state = FIMC_IS_AF_RUNNING; else if (dev->af.af_state == FIMC_IS_AF_ABORT) dev->af.af_state = FIMC_IS_AF_IDLE; break; case HIC_GET_PARAMETER: break; case HIC_SET_TUNE: break; case HIC_GET_STATUS: break; case HIC_OPEN_SENSOR: set_bit(IS_ST_OPEN_SENSOR, &dev->state); printk(KERN_INFO "FIMC-IS Lane= %d, Settle line= %d\n", dev->i2h_cmd.arg[2], dev->i2h_cmd.arg[1]); break; case HIC_CLOSE_SENSOR: clear_bit(IS_ST_OPEN_SENSOR, &dev->state); dev->sensor.id = 0; break; case HIC_MSG_TEST: dbg("Config MSG level was done\n"); break; case HIC_POWER_DOWN: set_bit(IS_PWR_SUB_IP_POWER_OFF, &dev->power); break; case HIC_GET_SET_FILE_ADDR: dev->setfile.base = dev->i2h_cmd.arg[1]; set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; case HIC_LOAD_SET_FILE: set_bit(IS_ST_SETFILE_LOADED, &dev->state); break; } break; case ISR_NDONE: err("ISR_NDONE - %d: 0x%08x\n", dev->i2h_cmd.arg[0], dev->i2h_cmd.arg[1]); fimc_is_print_err_number(dev->i2h_cmd.arg[1]); switch (dev->i2h_cmd.arg[1]) { case IS_ERROR_SET_PARAMETER: fimc_is_mem_cache_inv((void *)dev->is_p_region, IS_PARAM_SIZE); fimc_is_param_err_checker(dev); break; } } }