Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ struct msm_vfe_core_ops { bool (*is_module_cfg_lock_needed)(uint32_t reg_offset); int (*ahb_clk_cfg)(struct vfe_device *vfe_dev, struct msm_isp_ahb_clk_cfg *ahb_cfg); void (*set_halt_restart_mask)(struct vfe_device *vfe_dev); }; struct msm_vfe_stats_ops { int (*get_stats_idx)(enum msm_isp_stats_type stats_type); Loading drivers/media/platform/msm/camera_v2/isp/msm_isp40.c +16 −12 Original line number Diff line number Diff line Loading @@ -1385,6 +1385,7 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); vfe_dev->irq0_mask |= 0xF7; vfe_dev->irq1_mask |= 0x81; msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading @@ -1408,8 +1409,9 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe40_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0x464); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0x464); Loading @@ -1419,12 +1421,6 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, /* testgen OFF*/ if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0x93C); msm_camera_io_w(0, vfe_dev->vfe_base + 0x30); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1722,6 +1718,11 @@ static void msm_vfe40_update_ping_pong_addr( VFE40_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe40_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe40_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1729,8 +1730,8 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe40_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe40_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status */ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); Loading Loading @@ -1780,8 +1781,6 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe40_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); /* Clear IRQ Status */ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); Loading @@ -1791,6 +1790,9 @@ static int msm_vfe40_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); Loading Loading @@ -2251,6 +2253,8 @@ struct msm_vfe_hardware_info vfe40_hw_info = { .is_module_cfg_lock_needed = msm_vfe40_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe40_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe40_get_stats_idx, Loading drivers/media/platform/msm/camera_v2/isp/msm_isp44.c +16 −12 Original line number Diff line number Diff line Loading @@ -1049,6 +1049,7 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); vfe_dev->irq0_mask |= 0xF7; vfe_dev->irq1_mask |= 0x81; msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x318); Loading @@ -1069,19 +1070,15 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe44_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0xC18); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0xC18); msm_camera_io_w_mb((update_state == DISABLE_CAMIF ? 0x0 : 0x6), vfe_dev->vfe_base + 0x2F4); vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; msm_camera_io_w(0, vfe_dev->vfe_base + 0x30); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1322,6 +1319,11 @@ static void msm_vfe44_update_ping_pong_addr( VFE44_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe44_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe44_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1329,8 +1331,7 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe44_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe44_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); Loading Loading @@ -1390,8 +1391,6 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe44_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); Loading @@ -1400,6 +1399,9 @@ static int msm_vfe44_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); Loading Loading @@ -1898,6 +1900,8 @@ struct msm_vfe_hardware_info vfe44_hw_info = { .is_module_cfg_lock_needed = msm_vfe44_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe44_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe44_get_stats_idx, Loading drivers/media/platform/msm/camera_v2/isp/msm_isp46.c +21 −11 Original line number Diff line number Diff line Loading @@ -1119,7 +1119,11 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, return; if (update_state == ENABLE_CAMIF) { msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); vfe_dev->irq0_mask |= 0xF5; vfe_dev->irq1_mask |= 0x81; msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading @@ -1143,7 +1147,9 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe46_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); /* disable danger signal */ val = msm_camera_io_r(vfe_dev->vfe_base + 0xC18); val &= ~(1 << 8); Loading @@ -1154,11 +1160,6 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, /* testgen OFF*/ if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1407,6 +1408,11 @@ static void msm_vfe46_update_ping_pong_addr( VFE46_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe46_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe46_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1414,8 +1420,7 @@ static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe46_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe46_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); Loading Loading @@ -1475,8 +1480,6 @@ static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); Loading @@ -1485,10 +1488,14 @@ static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); if (enable_camif) { vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, ENABLE_CAMIF); Loading Loading @@ -1904,6 +1911,7 @@ static void msm_vfe46_get_halt_restart_mask(uint32_t *irq0_mask, *irq0_mask = BIT(31); *irq1_mask = BIT(8); } static struct msm_vfe_axi_hardware_info msm_vfe46_axi_hw_info = { .num_wm = 7, .num_comp_mask = 3, Loading Loading @@ -1993,6 +2001,8 @@ struct msm_vfe_hardware_info vfe46_hw_info = { .is_module_cfg_lock_needed = msm_vfe46_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe46_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe46_get_stats_idx, Loading drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +30 −22 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ void msm_vfe47_init_hardware_reg(struct vfe_device *vfe_dev) /* BUS_CFG */ msm_camera_io_w(0x00000101, vfe_dev->vfe_base + 0x84); /* IRQ_MASK/CLEAR */ vfe_dev->irq0_mask = 0xE00000F3; vfe_dev->irq0_mask = 0xE00000F5; vfe_dev->irq1_mask = 0xFFFFFFFF; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading Loading @@ -445,7 +445,9 @@ void msm_vfe47_process_input_irq(struct vfe_device *vfe_dev, return; if (irq_status0 & (1 << 0)) { ISP_DBG("%s: SOF IRQ\n", __func__); ISP_DBG("vfe %d: SOF IRQ, frame id %d\n", vfe_dev->pdev->id, vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id); msm_isp_increment_frame_id(vfe_dev, VFE_PIX_0, ts); } Loading Loading @@ -693,8 +695,8 @@ void msm_vfe47_reg_update(struct vfe_device *vfe_dev, if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) && ((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) { msm_camera_io_w_mb(update_mask, vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0] + 0x4AC); vfe_dev->common_data->dual_vfe_res-> vfe_base[ISP_VFE0] + 0x4AC); msm_camera_io_w_mb(update_mask, vfe_dev->vfe_base + 0x4AC); } else if (!vfe_dev->is_split || Loading Loading @@ -1397,7 +1399,12 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, val = msm_camera_io_r(vfe_dev->vfe_base + 0x47C); if (update_state == ENABLE_CAMIF) { msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w(1 << 0, vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); vfe_dev->irq0_mask |= 0xF5; vfe_dev->irq1_mask |= 0x81; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading Loading @@ -1427,8 +1434,10 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w(1, vfe_dev->vfe_base + 0xC58); } else if (update_state == DISABLE_CAMIF || update_state == DISABLE_CAMIF_IMMEDIATELY) { /* turn off all irq before camif disable */ msm_vfe47_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); /* turn off camif violation and error irqs */ vfe_dev->irq1_mask &= ~0x81; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0x464); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0x464); Loading @@ -1442,16 +1451,6 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, if ((vfe_dev->hvx_cmd > HVX_DISABLE) && (vfe_dev->hvx_cmd <= HVX_ROUND_TRIP)) msm_vfe47_configure_hvx(vfe_dev, 0); /* * restore the irq that were disabled for camif stop and clear * the camif error interrupts if generated during that period */ msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w(1 << 0, vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1708,6 +1707,11 @@ void msm_vfe47_update_ping_pong_addr( } static void msm_vfe47_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe47_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1720,8 +1724,7 @@ int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, msm_camera_io_w(val, vfe_dev->vfe_vbif_base + VFE47_VBIF_CLK_OFFSET); /* Keep only halt and reset mask */ msm_vfe47_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe47_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); Loading Loading @@ -1783,8 +1786,6 @@ int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); Loading @@ -1792,10 +1793,15 @@ int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x400); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); /* reset the irq masks without camif violation and errors */ msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); if (enable_camif) { vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, ENABLE_CAMIF); Loading Loading @@ -2680,6 +2686,8 @@ struct msm_vfe_hardware_info vfe47_hw_info = { .is_module_cfg_lock_needed = msm_vfe47_is_module_cfg_lock_needed, .ahb_clk_cfg = msm_isp47_ahb_clk_cfg, .set_halt_restart_mask = msm_vfe47_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe47_get_stats_idx, Loading Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ struct msm_vfe_core_ops { bool (*is_module_cfg_lock_needed)(uint32_t reg_offset); int (*ahb_clk_cfg)(struct vfe_device *vfe_dev, struct msm_isp_ahb_clk_cfg *ahb_cfg); void (*set_halt_restart_mask)(struct vfe_device *vfe_dev); }; struct msm_vfe_stats_ops { int (*get_stats_idx)(enum msm_isp_stats_type stats_type); Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp40.c +16 −12 Original line number Diff line number Diff line Loading @@ -1385,6 +1385,7 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0xFFFFFFFF, vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); vfe_dev->irq0_mask |= 0xF7; vfe_dev->irq1_mask |= 0x81; msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading @@ -1408,8 +1409,9 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe40_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0x464); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0x464); Loading @@ -1419,12 +1421,6 @@ static void msm_vfe40_update_camif_state(struct vfe_device *vfe_dev, /* testgen OFF*/ if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0x93C); msm_camera_io_w(0, vfe_dev->vfe_base + 0x30); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1722,6 +1718,11 @@ static void msm_vfe40_update_ping_pong_addr( VFE40_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe40_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe40_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1729,8 +1730,8 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe40_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe40_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status */ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); Loading Loading @@ -1780,8 +1781,6 @@ static int msm_vfe40_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe40_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); /* Clear IRQ Status */ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); Loading @@ -1791,6 +1790,9 @@ static int msm_vfe40_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); msm_vfe40_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); Loading Loading @@ -2251,6 +2253,8 @@ struct msm_vfe_hardware_info vfe40_hw_info = { .is_module_cfg_lock_needed = msm_vfe40_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe40_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe40_get_stats_idx, Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp44.c +16 −12 Original line number Diff line number Diff line Loading @@ -1049,6 +1049,7 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w_mb(0x1, vfe_dev->vfe_base + 0x24); vfe_dev->irq0_mask |= 0xF7; vfe_dev->irq1_mask |= 0x81; msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w_mb(0x140000, vfe_dev->vfe_base + 0x318); Loading @@ -1069,19 +1070,15 @@ static void msm_vfe44_update_camif_state(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active = 1; } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe44_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0xC18); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0xC18); msm_camera_io_w_mb((update_state == DISABLE_CAMIF ? 0x0 : 0x6), vfe_dev->vfe_base + 0x2F4); vfe_dev->axi_data.src_info[VFE_PIX_0].active = 0; msm_camera_io_w(0, vfe_dev->vfe_base + 0x30); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x34); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x24); msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1322,6 +1319,11 @@ static void msm_vfe44_update_ping_pong_addr( VFE44_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe44_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe44_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1329,8 +1331,7 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe44_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe44_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); Loading Loading @@ -1390,8 +1391,6 @@ static int msm_vfe44_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe44_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x30); msm_camera_io_w(0xFEFFFEFF, vfe_dev->vfe_base + 0x34); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x24); Loading @@ -1400,6 +1399,9 @@ static int msm_vfe44_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x2C0); msm_vfe44_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); Loading Loading @@ -1898,6 +1900,8 @@ struct msm_vfe_hardware_info vfe44_hw_info = { .is_module_cfg_lock_needed = msm_vfe44_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe44_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe44_get_stats_idx, Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp46.c +21 −11 Original line number Diff line number Diff line Loading @@ -1119,7 +1119,11 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, return; if (update_state == ENABLE_CAMIF) { msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); vfe_dev->irq0_mask |= 0xF5; vfe_dev->irq1_mask |= 0x81; msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading @@ -1143,7 +1147,9 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w(1, vfe_dev->vfe_base + 0xAF4); } else if (update_state == DISABLE_CAMIF || DISABLE_CAMIF_IMMEDIATELY == update_state) { msm_vfe46_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); vfe_dev->irq1_mask &= ~0x81; msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); /* disable danger signal */ val = msm_camera_io_r(vfe_dev->vfe_base + 0xC18); val &= ~(1 << 8); Loading @@ -1154,11 +1160,6 @@ static void msm_vfe46_update_camif_state(struct vfe_device *vfe_dev, /* testgen OFF*/ if (vfe_dev->axi_data.src_info[VFE_PIX_0].input_mux == TESTGEN) msm_camera_io_w(1 << 1, vfe_dev->vfe_base + 0xAF4); msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w((1 << 0), vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1407,6 +1408,11 @@ static void msm_vfe46_update_ping_pong_addr( VFE46_PING_PONG_BASE(wm_idx, pingpong_bit)); } static void msm_vfe46_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe46_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1414,8 +1420,7 @@ static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, enum msm_vfe_input_src i; /* Keep only halt and restart mask */ msm_vfe46_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe46_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); Loading Loading @@ -1475,8 +1480,6 @@ static int msm_vfe46_axi_halt(struct vfe_device *vfe_dev, static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); Loading @@ -1485,10 +1488,14 @@ static int msm_vfe46_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x374); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); msm_vfe46_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); if (enable_camif) { vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, ENABLE_CAMIF); Loading Loading @@ -1904,6 +1911,7 @@ static void msm_vfe46_get_halt_restart_mask(uint32_t *irq0_mask, *irq0_mask = BIT(31); *irq1_mask = BIT(8); } static struct msm_vfe_axi_hardware_info msm_vfe46_axi_hw_info = { .num_wm = 7, .num_comp_mask = 3, Loading Loading @@ -1993,6 +2001,8 @@ struct msm_vfe_hardware_info vfe46_hw_info = { .is_module_cfg_lock_needed = msm_vfe46_is_module_cfg_lock_needed, .ahb_clk_cfg = NULL, .set_halt_restart_mask = msm_vfe46_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe46_get_stats_idx, Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp47.c +30 −22 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ void msm_vfe47_init_hardware_reg(struct vfe_device *vfe_dev) /* BUS_CFG */ msm_camera_io_w(0x00000101, vfe_dev->vfe_base + 0x84); /* IRQ_MASK/CLEAR */ vfe_dev->irq0_mask = 0xE00000F3; vfe_dev->irq0_mask = 0xE00000F5; vfe_dev->irq1_mask = 0xFFFFFFFF; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading Loading @@ -445,7 +445,9 @@ void msm_vfe47_process_input_irq(struct vfe_device *vfe_dev, return; if (irq_status0 & (1 << 0)) { ISP_DBG("%s: SOF IRQ\n", __func__); ISP_DBG("vfe %d: SOF IRQ, frame id %d\n", vfe_dev->pdev->id, vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id); msm_isp_increment_frame_id(vfe_dev, VFE_PIX_0, ts); } Loading Loading @@ -693,8 +695,8 @@ void msm_vfe47_reg_update(struct vfe_device *vfe_dev, if ((vfe_dev->is_split && vfe_dev->pdev->id == ISP_VFE1) && ((frame_src == VFE_PIX_0) || (frame_src == VFE_SRC_MAX))) { msm_camera_io_w_mb(update_mask, vfe_dev->common_data->dual_vfe_res->vfe_base[ISP_VFE0] + 0x4AC); vfe_dev->common_data->dual_vfe_res-> vfe_base[ISP_VFE0] + 0x4AC); msm_camera_io_w_mb(update_mask, vfe_dev->vfe_base + 0x4AC); } else if (!vfe_dev->is_split || Loading Loading @@ -1397,7 +1399,12 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, val = msm_camera_io_r(vfe_dev->vfe_base + 0x47C); if (update_state == ENABLE_CAMIF) { msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w(1 << 0, vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); vfe_dev->irq0_mask |= 0xF5; vfe_dev->irq1_mask |= 0x81; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); Loading Loading @@ -1427,8 +1434,10 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, msm_camera_io_w(1, vfe_dev->vfe_base + 0xC58); } else if (update_state == DISABLE_CAMIF || update_state == DISABLE_CAMIF_IMMEDIATELY) { /* turn off all irq before camif disable */ msm_vfe47_config_irq(vfe_dev, 0, 0, MSM_ISP_IRQ_SET); /* turn off camif violation and error irqs */ vfe_dev->irq1_mask &= ~0x81; msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); val = msm_camera_io_r(vfe_dev->vfe_base + 0x464); /* disable danger signal */ msm_camera_io_w_mb(val & ~(1 << 8), vfe_dev->vfe_base + 0x464); Loading @@ -1442,16 +1451,6 @@ void msm_vfe47_update_camif_state(struct vfe_device *vfe_dev, if ((vfe_dev->hvx_cmd > HVX_DISABLE) && (vfe_dev->hvx_cmd <= HVX_ROUND_TRIP)) msm_vfe47_configure_hvx(vfe_dev, 0); /* * restore the irq that were disabled for camif stop and clear * the camif error interrupts if generated during that period */ msm_camera_io_w(0, vfe_dev->vfe_base + 0x64); msm_camera_io_w(1 << 0, vfe_dev->vfe_base + 0x68); msm_camera_io_w_mb(1, vfe_dev->vfe_base + 0x58); msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); } } Loading Loading @@ -1708,6 +1707,11 @@ void msm_vfe47_update_ping_pong_addr( } static void msm_vfe47_set_halt_restart_mask(struct vfe_device *vfe_dev) { msm_vfe47_config_irq(vfe_dev, BIT(31), BIT(8), MSM_ISP_IRQ_SET); } int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, uint32_t blocking) { Loading @@ -1720,8 +1724,7 @@ int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, msm_camera_io_w(val, vfe_dev->vfe_vbif_base + VFE47_VBIF_CLK_OFFSET); /* Keep only halt and reset mask */ msm_vfe47_config_irq(vfe_dev, (1 << 31), (1 << 8), MSM_ISP_IRQ_SET); msm_vfe47_set_halt_restart_mask(vfe_dev); /*Clear IRQ Status0, only leave reset irq mask*/ msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); Loading Loading @@ -1783,8 +1786,6 @@ int msm_vfe47_axi_halt(struct vfe_device *vfe_dev, int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, uint32_t blocking, uint32_t enable_camif) { msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); msm_camera_io_w(0x7FFFFFFF, vfe_dev->vfe_base + 0x64); msm_camera_io_w(0xFFFFFEFF, vfe_dev->vfe_base + 0x68); msm_camera_io_w(0x1, vfe_dev->vfe_base + 0x58); Loading @@ -1792,10 +1793,15 @@ int msm_vfe47_axi_restart(struct vfe_device *vfe_dev, /* Start AXI */ msm_camera_io_w(0x0, vfe_dev->vfe_base + 0x400); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); memset(&vfe_dev->error_info, 0, sizeof(vfe_dev->error_info)); atomic_set(&vfe_dev->error_info.overflow_state, NO_OVERFLOW); /* reset the irq masks without camif violation and errors */ msm_vfe47_config_irq(vfe_dev, vfe_dev->irq0_mask, vfe_dev->irq1_mask, MSM_ISP_IRQ_SET); vfe_dev->hw_info->vfe_ops.core_ops.reg_update(vfe_dev, VFE_SRC_MAX); if (enable_camif) { vfe_dev->hw_info->vfe_ops.core_ops. update_camif_state(vfe_dev, ENABLE_CAMIF); Loading Loading @@ -2680,6 +2686,8 @@ struct msm_vfe_hardware_info vfe47_hw_info = { .is_module_cfg_lock_needed = msm_vfe47_is_module_cfg_lock_needed, .ahb_clk_cfg = msm_isp47_ahb_clk_cfg, .set_halt_restart_mask = msm_vfe47_set_halt_restart_mask, }, .stats_ops = { .get_stats_idx = msm_vfe47_get_stats_idx, Loading