Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.h +0 −5 Original line number Diff line number Diff line Loading @@ -19,9 +19,6 @@ #include <linux/io.h> #include <linux/list.h> #include <linux/delay.h> #ifdef CONFIG_MSM_AVTIMER #include <linux/avtimer_kernel.h> #endif #include <media/v4l2-subdev.h> #include <media/msmb_isp.h> #include <linux/msm-bus.h> Loading Loading @@ -858,8 +855,6 @@ struct vfe_parent_device { struct platform_device *child_list[VFE_SD_HW_MAX]; struct msm_vfe_common_subdev *common_sd; }; int vfe_hw_probe(struct platform_device *pdev); void msm_isp_update_last_overflow_ab_ib(struct vfe_device *vfe_dev); #endif drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +57 −19 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ #define HANDLE_TO_IDX(handle) (handle & 0xFF) #define ISP_SOF_DEBUG_COUNT 0 #ifdef CONFIG_MSM_AVTIMER static struct avtimer_fptr_t avtimer_func; #endif static void msm_isp_reload_ping_pong_offset( struct msm_vfe_axi_stream *stream_info); Loading Loading @@ -1182,10 +1185,34 @@ static void msm_isp_calculate_bandwidth( } #ifdef CONFIG_MSM_AVTIMER /** * msm_isp_set_avtimer_fptr() - Set avtimer function pointer * @avtimer: struct of type avtimer_fptr_t to hold function pointer. * * Initialize the function pointers sent by the avtimer driver * */ void msm_isp_set_avtimer_fptr(struct avtimer_fptr_t avtimer) { avtimer_func.fptr_avtimer_open = avtimer.fptr_avtimer_open; avtimer_func.fptr_avtimer_enable = avtimer.fptr_avtimer_enable; avtimer_func.fptr_avtimer_get_time = avtimer.fptr_avtimer_get_time; } EXPORT_SYMBOL(msm_isp_set_avtimer_fptr); void msm_isp_start_avtimer(void) { avcs_core_open(); avcs_core_disable_power_collapse(1); if (avtimer_func.fptr_avtimer_open && avtimer_func.fptr_avtimer_enable) { avtimer_func.fptr_avtimer_open(); avtimer_func.fptr_avtimer_enable(1); } } void msm_isp_stop_avtimer(void) { if (avtimer_func.fptr_avtimer_enable) { avtimer_func.fptr_avtimer_enable(0); } } void msm_isp_get_avtimer_ts( Loading @@ -1195,7 +1222,8 @@ void msm_isp_get_avtimer_ts( uint32_t avtimer_usec = 0; uint64_t avtimer_tick = 0; rc = avcs_core_query_timer(&avtimer_tick); if (avtimer_func.fptr_avtimer_get_time) { rc = avtimer_func.fptr_avtimer_get_time(&avtimer_tick); if (rc < 0) { pr_err_ratelimited("%s: Error: Invalid AVTimer Tick, rc=%d\n", __func__, rc); Loading @@ -1210,6 +1238,7 @@ void msm_isp_get_avtimer_ts( (uint32_t)(avtimer_tick), avtimer_usec); } } } #else void msm_isp_start_avtimer(void) { Loading @@ -1219,10 +1248,14 @@ void msm_isp_start_avtimer(void) void msm_isp_get_avtimer_ts( struct msm_isp_timestamp *time_stamp) { pr_err_ratelimited("%s: Error: AVTimer driver not available\n", struct timespec ts; pr_debug("%s: AVTimer driver not available using system time\n", __func__); time_stamp->vt_time.tv_sec = 0; time_stamp->vt_time.tv_usec = 0; get_monotonic_boottime(&ts); time_stamp->vt_time.tv_sec = ts.tv_sec; time_stamp->vt_time.tv_usec = ts.tv_nsec/1000; } #endif Loading Loading @@ -4115,7 +4148,12 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev, return; } if (vfe_dev->vt_enable) { msm_isp_get_avtimer_ts(ts); time_stamp = &ts->vt_time; } else { time_stamp = &ts->buf_time; } frame_id = vfe_dev->axi_data. src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ 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_start_avtimer(void); void msm_isp_stop_avtimer(void); 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_release_axi_stream(struct vfe_device *vfe_dev, void *arg); Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +10 −6 Original line number Diff line number Diff line Loading @@ -207,11 +207,15 @@ void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp, struct timespec ts; do_gettimeofday(&(time_stamp->event_time)); if (vfe_dev->vt_enable) { msm_isp_get_avtimer_ts(time_stamp); time_stamp->buf_time.tv_sec = time_stamp->vt_time.tv_sec; time_stamp->buf_time.tv_usec = time_stamp->vt_time.tv_usec; } else { get_monotonic_boottime(&ts); time_stamp->buf_time.tv_sec = ts.tv_sec; time_stamp->buf_time.tv_usec = ts.tv_nsec/1000; } } static inline u32 msm_isp_evt_mask_to_isp_event(u32 evt_mask) Loading Loading @@ -2344,7 +2348,7 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) #ifdef CONFIG_MSM_AVTIMER static void msm_isp_end_avtimer(void) { avcs_core_disable_power_collapse(0); msm_isp_stop_avtimer(); } #else static void msm_isp_end_avtimer(void) Loading include/media/msmb_isp.h +8 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,13 @@ struct msm_isp_event_data32 { } u; }; #endif #ifdef CONFIG_MSM_AVTIMER struct avtimer_fptr_t { int (*fptr_avtimer_open)(void); int (*fptr_avtimer_enable)(int enable); int (*fptr_avtimer_get_time)(uint64_t *avtimer_tick); }; void msm_isp_set_avtimer_fptr(struct avtimer_fptr_t avtimer_func); #endif #endif Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.h +0 −5 Original line number Diff line number Diff line Loading @@ -19,9 +19,6 @@ #include <linux/io.h> #include <linux/list.h> #include <linux/delay.h> #ifdef CONFIG_MSM_AVTIMER #include <linux/avtimer_kernel.h> #endif #include <media/v4l2-subdev.h> #include <media/msmb_isp.h> #include <linux/msm-bus.h> Loading Loading @@ -858,8 +855,6 @@ struct vfe_parent_device { struct platform_device *child_list[VFE_SD_HW_MAX]; struct msm_vfe_common_subdev *common_sd; }; int vfe_hw_probe(struct platform_device *pdev); void msm_isp_update_last_overflow_ab_ib(struct vfe_device *vfe_dev); #endif
drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +57 −19 Original line number Diff line number Diff line Loading @@ -20,6 +20,9 @@ #define HANDLE_TO_IDX(handle) (handle & 0xFF) #define ISP_SOF_DEBUG_COUNT 0 #ifdef CONFIG_MSM_AVTIMER static struct avtimer_fptr_t avtimer_func; #endif static void msm_isp_reload_ping_pong_offset( struct msm_vfe_axi_stream *stream_info); Loading Loading @@ -1182,10 +1185,34 @@ static void msm_isp_calculate_bandwidth( } #ifdef CONFIG_MSM_AVTIMER /** * msm_isp_set_avtimer_fptr() - Set avtimer function pointer * @avtimer: struct of type avtimer_fptr_t to hold function pointer. * * Initialize the function pointers sent by the avtimer driver * */ void msm_isp_set_avtimer_fptr(struct avtimer_fptr_t avtimer) { avtimer_func.fptr_avtimer_open = avtimer.fptr_avtimer_open; avtimer_func.fptr_avtimer_enable = avtimer.fptr_avtimer_enable; avtimer_func.fptr_avtimer_get_time = avtimer.fptr_avtimer_get_time; } EXPORT_SYMBOL(msm_isp_set_avtimer_fptr); void msm_isp_start_avtimer(void) { avcs_core_open(); avcs_core_disable_power_collapse(1); if (avtimer_func.fptr_avtimer_open && avtimer_func.fptr_avtimer_enable) { avtimer_func.fptr_avtimer_open(); avtimer_func.fptr_avtimer_enable(1); } } void msm_isp_stop_avtimer(void) { if (avtimer_func.fptr_avtimer_enable) { avtimer_func.fptr_avtimer_enable(0); } } void msm_isp_get_avtimer_ts( Loading @@ -1195,7 +1222,8 @@ void msm_isp_get_avtimer_ts( uint32_t avtimer_usec = 0; uint64_t avtimer_tick = 0; rc = avcs_core_query_timer(&avtimer_tick); if (avtimer_func.fptr_avtimer_get_time) { rc = avtimer_func.fptr_avtimer_get_time(&avtimer_tick); if (rc < 0) { pr_err_ratelimited("%s: Error: Invalid AVTimer Tick, rc=%d\n", __func__, rc); Loading @@ -1210,6 +1238,7 @@ void msm_isp_get_avtimer_ts( (uint32_t)(avtimer_tick), avtimer_usec); } } } #else void msm_isp_start_avtimer(void) { Loading @@ -1219,10 +1248,14 @@ void msm_isp_start_avtimer(void) void msm_isp_get_avtimer_ts( struct msm_isp_timestamp *time_stamp) { pr_err_ratelimited("%s: Error: AVTimer driver not available\n", struct timespec ts; pr_debug("%s: AVTimer driver not available using system time\n", __func__); time_stamp->vt_time.tv_sec = 0; time_stamp->vt_time.tv_usec = 0; get_monotonic_boottime(&ts); time_stamp->vt_time.tv_sec = ts.tv_sec; time_stamp->vt_time.tv_usec = ts.tv_nsec/1000; } #endif Loading Loading @@ -4115,7 +4148,12 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev, return; } if (vfe_dev->vt_enable) { msm_isp_get_avtimer_ts(ts); time_stamp = &ts->vt_time; } else { time_stamp = &ts->buf_time; } frame_id = vfe_dev->axi_data. src_info[SRC_TO_INTF(stream_info->stream_src)].frame_id; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ 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_start_avtimer(void); void msm_isp_stop_avtimer(void); 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_release_axi_stream(struct vfe_device *vfe_dev, void *arg); Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c +10 −6 Original line number Diff line number Diff line Loading @@ -207,11 +207,15 @@ void msm_isp_get_timestamp(struct msm_isp_timestamp *time_stamp, struct timespec ts; do_gettimeofday(&(time_stamp->event_time)); if (vfe_dev->vt_enable) { msm_isp_get_avtimer_ts(time_stamp); time_stamp->buf_time.tv_sec = time_stamp->vt_time.tv_sec; time_stamp->buf_time.tv_usec = time_stamp->vt_time.tv_usec; } else { get_monotonic_boottime(&ts); time_stamp->buf_time.tv_sec = ts.tv_sec; time_stamp->buf_time.tv_usec = ts.tv_nsec/1000; } } static inline u32 msm_isp_evt_mask_to_isp_event(u32 evt_mask) Loading Loading @@ -2344,7 +2348,7 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) #ifdef CONFIG_MSM_AVTIMER static void msm_isp_end_avtimer(void) { avcs_core_disable_power_collapse(0); msm_isp_stop_avtimer(); } #else static void msm_isp_end_avtimer(void) Loading
include/media/msmb_isp.h +8 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,13 @@ struct msm_isp_event_data32 { } u; }; #endif #ifdef CONFIG_MSM_AVTIMER struct avtimer_fptr_t { int (*fptr_avtimer_open)(void); int (*fptr_avtimer_enable)(int enable); int (*fptr_avtimer_get_time)(uint64_t *avtimer_tick); }; void msm_isp_set_avtimer_fptr(struct avtimer_fptr_t avtimer_func); #endif #endif