OSDN Git Service

ais: adjust frame id values to match user space of all platforms
authorAndy Sun <bins@codeaurora.org>
Mon, 29 Jan 2018 10:34:58 +0000 (18:34 +0800)
committerAndy Sun <bins@codeaurora.org>
Mon, 29 Jan 2018 10:35:21 +0000 (18:35 +0800)
1. resume frame done id solution: 2, 4, 6 ...
2. set field SOF id value to starts from 1: 1, 2, 3 ...

Change-Id: Ic7aea3cf99cd6d9b6ca62edb4dd17bce065717bd
Signed-off-by: Andy Sun <bins@codeaurora.org>
drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c
drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h
drivers/media/platform/msm/ais/isp/msm_isp_util.c

index 6e47ec1..139f4f2 100644 (file)
@@ -951,8 +951,6 @@ void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type,
        enum msm_vfe_dual_hw_ms_type ms_type;
        int i, j;
        unsigned long flags;
-       struct msm_vfe_axi_stream *stream_info =
-               &vfe_dev->axi_data.stream_info[INTF_TO_SRC(frame_src)];
 
        memset(&event_data, 0, sizeof(event_data));
 
@@ -1043,11 +1041,7 @@ void msm_isp_notify(struct vfe_device *vfe_dev, uint32_t event_type,
                break;
        }
 
-       if (event_type == ISP_EVENT_SOF)
-               event_data.frame_id = stream_info->frame_id + 1;
-       else
-               event_data.frame_id =
-                       vfe_dev->axi_data.src_info[frame_src].frame_id;
+       event_data.frame_id = vfe_dev->axi_data.src_info[frame_src].frame_id;
        event_data.timestamp = ts->event_time;
        event_data.mono_timestamp = ts->buf_time;
        msm_isp_send_event(vfe_dev, event_type | frame_src, &event_data);
@@ -4085,7 +4079,7 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev,
        }
 
        msm_isp_process_done_buf(vfe_dev, stream_info,
-                       done_buf, time_stamp, stream_info->frame_id);
+                       done_buf, time_stamp, frame_id);
 }
 
 void msm_isp_process_axi_irq(struct vfe_device *vfe_dev,
index 02adf7a..7babd75 100644 (file)
 #define SRC_TO_INTF(src) \
        ((src < RDI_INTF_0 || src == VFE_AXI_SRC_MAX) ? VFE_PIX_0 : \
        (VFE_RAW_0 + src - RDI_INTF_0))
-/* automotive has 1vs1 mapping currently */
-#define INTF_TO_SRC(intf) \
-       ((intf == VFE_PIX_0 || intf == VFE_SRC_MAX) ? CAMIF_RAW : \
-       (RDI_INTF_0 + intf - VFE_RAW_0))
 
 int msm_isp_axi_create_stream(struct vfe_device *vfe_dev,
        struct msm_vfe_axi_shared_data *axi_data,
index bd1163e..381f583 100644 (file)
@@ -2156,12 +2156,12 @@ void msm_isp_do_tasklet(unsigned long data)
                irq_ops->process_axi_irq(vfe_dev,
                        irq_status0, irq_status1,
                        pingpong_status, &ts);
-               irq_ops->process_sof_irq(vfe_dev,
-                       irq_status0, irq_status1, &ts);
                irq_ops->process_camif_irq(vfe_dev,
                        irq_status0, irq_status1, &ts);
                irq_ops->process_reg_update(vfe_dev,
                        irq_status0, irq_status1, &ts);
+               irq_ops->process_sof_irq(vfe_dev,
+                       irq_status0, irq_status1, &ts);
                irq_ops->process_epoch_irq(vfe_dev,
                        irq_status0, irq_status1, &ts);
        }