Loading drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +8 −3 Original line number Diff line number Diff line Loading @@ -461,7 +461,8 @@ static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info) uint32_t bufq_handle, uint32_t buf_index, struct msm_isp_buffer **buf_info) { int rc = -1; unsigned long flags; Loading Loading @@ -511,8 +512,12 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, } break; case MSM_ISP_BUFFER_SRC_HAL: if (MSM_ISP_INVALID_BUF_INDEX == buf_index) vb2_buf = buf_mgr->vb2_ops->get_buf( bufq->session_id, bufq->stream_id); else vb2_buf = buf_mgr->vb2_ops->get_buf_by_idx( bufq->session_id, bufq->stream_id, buf_index); if (vb2_buf) { if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { *buf_info = &bufq->bufs[vb2_buf Loading drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h +5 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -32,6 +32,8 @@ #define BUF_MGR_NUM_BUF_Q 28 #define MAX_IOMMU_CTX 2 #define MSM_ISP_INVALID_BUF_INDEX 0xFFFFFFFF struct msm_isp_buf_mgr; enum msm_isp_buffer_src_t { Loading Loading @@ -140,7 +142,8 @@ struct msm_isp_buf_ops { uint32_t bufq_handle, uint32_t *buf_src); int (*get_buf)(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info); uint32_t bufq_handle, uint32_t buf_index, struct msm_isp_buffer **buf_info); int (*get_buf_by_index)(struct msm_isp_buf_mgr *buf_mgr, uint32_t bufq_handle, uint32_t buf_index, Loading drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ enum msm_vfe_axi_stream_type { struct msm_vfe_frame_request_queue { struct list_head list; enum msm_vfe_buff_queue_id buff_queue_id; uint32_t buf_index; uint8_t cmd_used; }; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +26 −7 Original line number Diff line number Diff line Loading @@ -1599,6 +1599,7 @@ static struct msm_isp_buffer *msm_isp_get_stream_buffer( struct msm_isp_buffer *buf = NULL; struct msm_vfe_axi_stream *temp_stream_info = NULL; struct msm_vfe_frame_request_queue *queue_req; uint32_t buf_index = MSM_ISP_INVALID_BUF_INDEX; if (!stream_info->controllable_output) { bufq_handle = stream_info->bufq_handle Loading @@ -1621,12 +1622,13 @@ static struct msm_isp_buffer *msm_isp_get_stream_buffer( __func__); return buf; } buf_index = queue_req->buf_index; queue_req->cmd_used = 0; list_del(&queue_req->list); temp_stream_info->request_q_cnt--; } rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, buf_index, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, Loading Loading @@ -3046,7 +3048,8 @@ int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info, uint32_t user_stream_id, uint32_t frame_id, enum msm_vfe_input_src frame_src) uint32_t frame_id, uint32_t buf_index, enum msm_vfe_input_src frame_src) { int rc = -1; struct msm_isp_buffer *buf = NULL; Loading Loading @@ -3082,7 +3085,7 @@ static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, buf_index, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, ISP_EVENT_BUF_FATAL_ERROR); return rc; Loading Loading @@ -3120,7 +3123,7 @@ static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, static int msm_isp_request_frame(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info, uint32_t user_stream_id, uint32_t frame_id) uint32_t frame_id, uint32_t buf_index) { struct msm_vfe_axi_stream_request_cmd stream_cfg_cmd; struct msm_vfe_frame_request_queue *queue_req; Loading Loading @@ -3173,7 +3176,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active); rc = msm_isp_return_empty_buffer(vfe_dev, stream_info, user_stream_id, frame_id, frame_src); user_stream_id, frame_id, buf_index, frame_src); if (rc < 0) pr_err("%s:%d failed: return_empty_buffer src %d\n", __func__, __LINE__, frame_src); Loading @@ -3188,7 +3191,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, stream_info->stream_id); rc = msm_isp_return_empty_buffer(vfe_dev, stream_info, user_stream_id, frame_id, frame_src); user_stream_id, frame_id, buf_index, frame_src); if (rc < 0) pr_err("%s:%d failed: return_empty_buffer src %d\n", __func__, __LINE__, frame_src); Loading Loading @@ -3218,6 +3221,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, user_stream_id, queue_req->buff_queue_id); return 0; } queue_req->buf_index = buf_index; queue_req->cmd_used = 1; stream_info->request_q_idx = Loading Loading @@ -3555,7 +3559,8 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) update_info->stream_handle)]; rc = msm_isp_request_frame(vfe_dev, stream_info, update_info->user_stream_id, update_info->frame_id); update_info->frame_id, MSM_ISP_INVALID_BUF_INDEX); if (rc) pr_err("%s failed to request frame!\n", __func__); Loading Loading @@ -3617,6 +3622,20 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) } break; } case UPDATE_STREAM_REQUEST_FRAMES_VER2: { struct msm_vfe_axi_stream_cfg_update_info_req_frm *req_frm = &update_cmd->req_frm_ver2; stream_info = &axi_data->stream_info[HANDLE_TO_IDX( req_frm->stream_handle)]; rc = msm_isp_request_frame(vfe_dev, stream_info, req_frm->user_stream_id, req_frm->frame_id, req_frm->buf_index); if (rc) pr_err("%s failed to request frame!\n", __func__); break; } default: pr_err("%s: Invalid update type\n", __func__); return -EINVAL; Loading drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c +2 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,8 @@ static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, MSM_ISP_INVALID_BUF_INDEX, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, ISP_EVENT_BUF_FATAL_ERROR); return rc; Loading Loading
drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +8 −3 Original line number Diff line number Diff line Loading @@ -461,7 +461,8 @@ static int msm_isp_buf_unprepare(struct msm_isp_buf_mgr *buf_mgr, static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info) uint32_t bufq_handle, uint32_t buf_index, struct msm_isp_buffer **buf_info) { int rc = -1; unsigned long flags; Loading Loading @@ -511,8 +512,12 @@ static int msm_isp_get_buf(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, } break; case MSM_ISP_BUFFER_SRC_HAL: if (MSM_ISP_INVALID_BUF_INDEX == buf_index) vb2_buf = buf_mgr->vb2_ops->get_buf( bufq->session_id, bufq->stream_id); else vb2_buf = buf_mgr->vb2_ops->get_buf_by_idx( bufq->session_id, bufq->stream_id, buf_index); if (vb2_buf) { if (vb2_buf->v4l2_buf.index < bufq->num_bufs) { *buf_info = &bufq->bufs[vb2_buf Loading
drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.h +5 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -32,6 +32,8 @@ #define BUF_MGR_NUM_BUF_Q 28 #define MAX_IOMMU_CTX 2 #define MSM_ISP_INVALID_BUF_INDEX 0xFFFFFFFF struct msm_isp_buf_mgr; enum msm_isp_buffer_src_t { Loading Loading @@ -140,7 +142,8 @@ struct msm_isp_buf_ops { uint32_t bufq_handle, uint32_t *buf_src); int (*get_buf)(struct msm_isp_buf_mgr *buf_mgr, uint32_t id, uint32_t bufq_handle, struct msm_isp_buffer **buf_info); uint32_t bufq_handle, uint32_t buf_index, struct msm_isp_buffer **buf_info); int (*get_buf_by_index)(struct msm_isp_buf_mgr *buf_mgr, uint32_t bufq_handle, uint32_t buf_index, Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp.h +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ enum msm_vfe_axi_stream_type { struct msm_vfe_frame_request_queue { struct list_head list; enum msm_vfe_buff_queue_id buff_queue_id; uint32_t buf_index; uint8_t cmd_used; }; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c +26 −7 Original line number Diff line number Diff line Loading @@ -1599,6 +1599,7 @@ static struct msm_isp_buffer *msm_isp_get_stream_buffer( struct msm_isp_buffer *buf = NULL; struct msm_vfe_axi_stream *temp_stream_info = NULL; struct msm_vfe_frame_request_queue *queue_req; uint32_t buf_index = MSM_ISP_INVALID_BUF_INDEX; if (!stream_info->controllable_output) { bufq_handle = stream_info->bufq_handle Loading @@ -1621,12 +1622,13 @@ static struct msm_isp_buffer *msm_isp_get_stream_buffer( __func__); return buf; } buf_index = queue_req->buf_index; queue_req->cmd_used = 0; list_del(&queue_req->list); temp_stream_info->request_q_cnt--; } rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, buf_index, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, Loading Loading @@ -3046,7 +3048,8 @@ int msm_isp_cfg_axi_stream(struct vfe_device *vfe_dev, void *arg) static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info, uint32_t user_stream_id, uint32_t frame_id, enum msm_vfe_input_src frame_src) uint32_t frame_id, uint32_t buf_index, enum msm_vfe_input_src frame_src) { int rc = -1; struct msm_isp_buffer *buf = NULL; Loading Loading @@ -3082,7 +3085,7 @@ static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, buf_index, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, ISP_EVENT_BUF_FATAL_ERROR); return rc; Loading Loading @@ -3120,7 +3123,7 @@ static int msm_isp_return_empty_buffer(struct vfe_device *vfe_dev, static int msm_isp_request_frame(struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info, uint32_t user_stream_id, uint32_t frame_id) uint32_t frame_id, uint32_t buf_index) { struct msm_vfe_axi_stream_request_cmd stream_cfg_cmd; struct msm_vfe_frame_request_queue *queue_req; Loading Loading @@ -3173,7 +3176,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, vfe_dev->axi_data.src_info[VFE_PIX_0].active); rc = msm_isp_return_empty_buffer(vfe_dev, stream_info, user_stream_id, frame_id, frame_src); user_stream_id, frame_id, buf_index, frame_src); if (rc < 0) pr_err("%s:%d failed: return_empty_buffer src %d\n", __func__, __LINE__, frame_src); Loading @@ -3188,7 +3191,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, stream_info->stream_id); rc = msm_isp_return_empty_buffer(vfe_dev, stream_info, user_stream_id, frame_id, frame_src); user_stream_id, frame_id, buf_index, frame_src); if (rc < 0) pr_err("%s:%d failed: return_empty_buffer src %d\n", __func__, __LINE__, frame_src); Loading Loading @@ -3218,6 +3221,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev, user_stream_id, queue_req->buff_queue_id); return 0; } queue_req->buf_index = buf_index; queue_req->cmd_used = 1; stream_info->request_q_idx = Loading Loading @@ -3555,7 +3559,8 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) update_info->stream_handle)]; rc = msm_isp_request_frame(vfe_dev, stream_info, update_info->user_stream_id, update_info->frame_id); update_info->frame_id, MSM_ISP_INVALID_BUF_INDEX); if (rc) pr_err("%s failed to request frame!\n", __func__); Loading Loading @@ -3617,6 +3622,20 @@ int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg) } break; } case UPDATE_STREAM_REQUEST_FRAMES_VER2: { struct msm_vfe_axi_stream_cfg_update_info_req_frm *req_frm = &update_cmd->req_frm_ver2; stream_info = &axi_data->stream_info[HANDLE_TO_IDX( req_frm->stream_handle)]; rc = msm_isp_request_frame(vfe_dev, stream_info, req_frm->user_stream_id, req_frm->frame_id, req_frm->buf_index); if (rc) pr_err("%s failed to request frame!\n", __func__); break; } default: pr_err("%s: Invalid update type\n", __func__); return -EINVAL; Loading
drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c +2 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,8 @@ static int msm_isp_stats_cfg_ping_pong_address(struct vfe_device *vfe_dev, pingpong_bit = (~(pingpong_status >> stats_pingpong_offset) & 0x1); rc = vfe_dev->buf_mgr->ops->get_buf(vfe_dev->buf_mgr, vfe_dev->pdev->id, bufq_handle, &buf); vfe_dev->pdev->id, bufq_handle, MSM_ISP_INVALID_BUF_INDEX, &buf); if (rc == -EFAULT) { msm_isp_halt_send_error(vfe_dev, ISP_EVENT_BUF_FATAL_ERROR); return rc; Loading