Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +18 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #define ISP_SOF_DEBUG_COUNT 0 static int msm_isp_update_dual_HW_ms_info_at_start( struct vfe_device *vfe_dev, enum msm_vfe_input_src stream_src, Loading Loading @@ -2195,9 +2194,10 @@ static void msm_isp_update_camif_output_count( /*Factor in Q2 format*/ #define ISP_DEFAULT_FORMAT_FACTOR 6 #define ISP_BUS_UTILIZATION_FACTOR 6 static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev, enum msm_vfe_hw_state hw_state) { int i, rc = 0; int i, rc = 0, frame_src, ms_type; struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; uint64_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; Loading @@ -2206,6 +2206,15 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) for (i = 0; i < VFE_AXI_SRC_MAX; i++) { stream_info = &axi_data->stream_info[i]; frame_src = SRC_TO_INTF(stream_info->stream_src); ms_type = vfe_dev->axi_data.src_info[frame_src]. dual_hw_ms_info.dual_hw_ms_type; if (hw_state == HW_STATE_SLEEP) { rc = msm_isp_update_bandwidth( ISP_VFE0 + vfe_dev->pdev->id, 0, 0); return rc; } if (stream_info->state == ACTIVE || stream_info->state == START_PENDING) { if (stream_info->stream_src < RDI_INTF_0) { Loading @@ -2216,11 +2225,11 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) } } } total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, (total_bandwidth + vfe_dev->hw_info->min_ab), (total_bandwidth + vfe_dev->hw_info->min_ib)); if (rc < 0) pr_err("%s: update failed\n", __func__); Loading Loading @@ -2831,7 +2840,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, } } } msm_isp_update_stream_bandwidth(vfe_dev); msm_isp_update_stream_bandwidth(vfe_dev, stream_cfg_cmd->hw_state); vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, vfe_dev->vfe_base, wm_reload_mask); msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); Loading Loading @@ -3010,7 +3019,7 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, } msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); msm_isp_update_stream_bandwidth(vfe_dev); msm_isp_update_stream_bandwidth(vfe_dev, stream_cfg_cmd->hw_state); for (i = 0; i < stream_cfg_cmd->num_streams; i++) { stream_info = &axi_data->stream_info[ Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); void msm_isp_get_avtimer_ts(struct msm_isp_timestamp *time_stamp); int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev, enum msm_vfe_hw_state hw_state); int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev, Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +6 −0 Original line number Diff line number Diff line Loading @@ -831,6 +831,12 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, rc = msm_isp_cfg_axi_stream(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; case VIDIOC_MSM_ISP_CFG_HW_STATE: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_update_stream_bandwidth(vfe_dev, *(enum msm_vfe_hw_state *)arg); mutex_unlock(&vfe_dev->core_mutex); break; case VIDIOC_MSM_ISP_AXI_HALT: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_axi_halt(vfe_dev, arg); Loading include/uapi/media/msmb_isp.h +12 −0 Original line number Diff line number Diff line Loading @@ -330,11 +330,18 @@ enum msm_vfe_axi_stream_cmd { STOP_IMMEDIATELY, }; enum msm_vfe_hw_state { HW_STATE_NONE, HW_STATE_SLEEP, HW_STATE_AWAKE, }; struct msm_vfe_axi_stream_cfg_cmd { uint8_t num_streams; uint32_t stream_handle[VFE_AXI_SRC_MAX]; enum msm_vfe_axi_stream_cmd cmd; uint8_t sync_frame_id_src; enum msm_vfe_hw_state hw_state; }; enum msm_vfe_axi_stream_update_type { Loading Loading @@ -876,6 +883,7 @@ enum msm_isp_ioctl_cmd_code { MSM_ISP_UNMAP_BUF, MSM_ISP_FETCH_ENG_MULTI_PASS_START, MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, MSM_ISP_CFG_HW_STATE, }; #define VIDIOC_MSM_VFE_REG_CFG \ Loading Loading @@ -988,4 +996,8 @@ enum msm_isp_ioctl_cmd_code { #define VIDIOC_MSM_ISP_MAP_BUF_START_MULTI_PASS_FE \ _IOWR('V', MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, \ struct msm_vfe_fetch_eng_multi_pass_start) #define VIDIOC_MSM_ISP_CFG_HW_STATE \ _IOWR('V', MSM_ISP_CFG_HW_STATE, \ struct msm_vfe_axi_stream_cfg_cmd) #endif /* __MSMB_ISP__ */ Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +18 −9 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #define ISP_SOF_DEBUG_COUNT 0 static int msm_isp_update_dual_HW_ms_info_at_start( struct vfe_device *vfe_dev, enum msm_vfe_input_src stream_src, Loading Loading @@ -2195,9 +2194,10 @@ static void msm_isp_update_camif_output_count( /*Factor in Q2 format*/ #define ISP_DEFAULT_FORMAT_FACTOR 6 #define ISP_BUS_UTILIZATION_FACTOR 6 static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev, enum msm_vfe_hw_state hw_state) { int i, rc = 0; int i, rc = 0, frame_src, ms_type; struct msm_vfe_axi_stream *stream_info; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; uint64_t total_pix_bandwidth = 0, total_rdi_bandwidth = 0; Loading @@ -2206,6 +2206,15 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) for (i = 0; i < VFE_AXI_SRC_MAX; i++) { stream_info = &axi_data->stream_info[i]; frame_src = SRC_TO_INTF(stream_info->stream_src); ms_type = vfe_dev->axi_data.src_info[frame_src]. dual_hw_ms_info.dual_hw_ms_type; if (hw_state == HW_STATE_SLEEP) { rc = msm_isp_update_bandwidth( ISP_VFE0 + vfe_dev->pdev->id, 0, 0); return rc; } if (stream_info->state == ACTIVE || stream_info->state == START_PENDING) { if (stream_info->stream_src < RDI_INTF_0) { Loading @@ -2216,11 +2225,11 @@ static int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev) } } } total_bandwidth = total_pix_bandwidth + total_rdi_bandwidth; rc = msm_isp_update_bandwidth(ISP_VFE0 + vfe_dev->pdev->id, (total_bandwidth + vfe_dev->hw_info->min_ab), (total_bandwidth + vfe_dev->hw_info->min_ib)); if (rc < 0) pr_err("%s: update failed\n", __func__); Loading Loading @@ -2831,7 +2840,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev, } } } msm_isp_update_stream_bandwidth(vfe_dev); msm_isp_update_stream_bandwidth(vfe_dev, stream_cfg_cmd->hw_state); vfe_dev->hw_info->vfe_ops.axi_ops.reload_wm(vfe_dev, vfe_dev->vfe_base, wm_reload_mask); msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); Loading Loading @@ -3010,7 +3019,7 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev, } msm_isp_update_camif_output_count(vfe_dev, stream_cfg_cmd); msm_isp_update_stream_bandwidth(vfe_dev); msm_isp_update_stream_bandwidth(vfe_dev, stream_cfg_cmd->hw_state); for (i = 0; i < stream_cfg_cmd->num_streams; i++) { stream_info = &axi_data->stream_info[ Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ void msm_isp_reset_framedrop(struct vfe_device *vfe_dev, int msm_isp_request_axi_stream(struct vfe_device *vfe_dev, void *arg); void msm_isp_get_avtimer_ts(struct msm_isp_timestamp *time_stamp); int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_update_stream_bandwidth(struct vfe_device *vfe_dev, enum msm_vfe_hw_state hw_state); int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg); int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg); void msm_isp_axi_cfg_update(struct vfe_device *vfe_dev, Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +6 −0 Original line number Diff line number Diff line Loading @@ -831,6 +831,12 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd, rc = msm_isp_cfg_axi_stream(vfe_dev, arg); mutex_unlock(&vfe_dev->core_mutex); break; case VIDIOC_MSM_ISP_CFG_HW_STATE: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_update_stream_bandwidth(vfe_dev, *(enum msm_vfe_hw_state *)arg); mutex_unlock(&vfe_dev->core_mutex); break; case VIDIOC_MSM_ISP_AXI_HALT: mutex_lock(&vfe_dev->core_mutex); rc = msm_isp_axi_halt(vfe_dev, arg); Loading
include/uapi/media/msmb_isp.h +12 −0 Original line number Diff line number Diff line Loading @@ -330,11 +330,18 @@ enum msm_vfe_axi_stream_cmd { STOP_IMMEDIATELY, }; enum msm_vfe_hw_state { HW_STATE_NONE, HW_STATE_SLEEP, HW_STATE_AWAKE, }; struct msm_vfe_axi_stream_cfg_cmd { uint8_t num_streams; uint32_t stream_handle[VFE_AXI_SRC_MAX]; enum msm_vfe_axi_stream_cmd cmd; uint8_t sync_frame_id_src; enum msm_vfe_hw_state hw_state; }; enum msm_vfe_axi_stream_update_type { Loading Loading @@ -876,6 +883,7 @@ enum msm_isp_ioctl_cmd_code { MSM_ISP_UNMAP_BUF, MSM_ISP_FETCH_ENG_MULTI_PASS_START, MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, MSM_ISP_CFG_HW_STATE, }; #define VIDIOC_MSM_VFE_REG_CFG \ Loading Loading @@ -988,4 +996,8 @@ enum msm_isp_ioctl_cmd_code { #define VIDIOC_MSM_ISP_MAP_BUF_START_MULTI_PASS_FE \ _IOWR('V', MSM_ISP_MAP_BUF_START_MULTI_PASS_FE, \ struct msm_vfe_fetch_eng_multi_pass_start) #define VIDIOC_MSM_ISP_CFG_HW_STATE \ _IOWR('V', MSM_ISP_CFG_HW_STATE, \ struct msm_vfe_axi_stream_cfg_cmd) #endif /* __MSMB_ISP__ */