Loading drivers/media/platform/msm/camera_v2/camera/camera.c +2 −1 Original line number Diff line number Diff line Loading @@ -681,6 +681,7 @@ static int camera_v4l2_close(struct file *filep) /* This should take care of both normal close * and application crashes */ camera_v4l2_vb2_q_release(filep); msm_destroy_session(pvdev->vdev->num); pm_relax(&pvdev->vdev->dev); } else { Loading @@ -692,10 +693,10 @@ static int camera_v4l2_close(struct file *filep) msm_delete_command_ack_q(pvdev->vdev->num, sp->stream_id); camera_v4l2_vb2_q_release(filep); msm_delete_stream(pvdev->vdev->num, sp->stream_id); } camera_v4l2_vb2_q_release(filep); camera_v4l2_fh_release(filep); return rc; Loading drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c +31 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,36 @@ static void msm_vb2_buf_finish(struct vb2_buffer *vb) return; } static void msm_vb2_stop_stream(struct vb2_queue *q) { struct msm_vb2_buffer *msm_vb2, *temp; struct msm_stream *stream; unsigned long flags; struct vb2_buffer *vb2_buf; stream = msm_get_stream_from_vb2q(q); if (!stream) { pr_err("%s:%d] NULL stream", __func__, __LINE__); return; } /* * Release all the buffers enqueued to driver * when streamoff is issued */ spin_lock_irqsave(&stream->stream_lock, flags); list_for_each_entry_safe(msm_vb2, temp, &(stream->queued_list), list) { vb2_buf = &(msm_vb2->vb2_buf); if (vb2_buf->state == VB2_BUF_STATE_DONE) continue; vb2_buffer_done(vb2_buf, VB2_BUF_STATE_DONE); msm_vb2->in_freeq = 0; } spin_unlock_irqrestore(&stream->stream_lock, flags); } static void msm_vb2_buf_cleanup(struct vb2_buffer *vb) { struct msm_vb2_buffer *msm_vb2; Loading Loading @@ -142,6 +172,7 @@ static struct vb2_ops msm_vb2_get_q_op = { .buf_queue = msm_vb2_buf_queue, .buf_cleanup = msm_vb2_buf_cleanup, .buf_finish = msm_vb2_buf_finish, .stop_streaming = msm_vb2_stop_stream, }; Loading Loading
drivers/media/platform/msm/camera_v2/camera/camera.c +2 −1 Original line number Diff line number Diff line Loading @@ -681,6 +681,7 @@ static int camera_v4l2_close(struct file *filep) /* This should take care of both normal close * and application crashes */ camera_v4l2_vb2_q_release(filep); msm_destroy_session(pvdev->vdev->num); pm_relax(&pvdev->vdev->dev); } else { Loading @@ -692,10 +693,10 @@ static int camera_v4l2_close(struct file *filep) msm_delete_command_ack_q(pvdev->vdev->num, sp->stream_id); camera_v4l2_vb2_q_release(filep); msm_delete_stream(pvdev->vdev->num, sp->stream_id); } camera_v4l2_vb2_q_release(filep); camera_v4l2_fh_release(filep); return rc; Loading
drivers/media/platform/msm/camera_v2/msm_vb2/msm_vb2.c +31 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,36 @@ static void msm_vb2_buf_finish(struct vb2_buffer *vb) return; } static void msm_vb2_stop_stream(struct vb2_queue *q) { struct msm_vb2_buffer *msm_vb2, *temp; struct msm_stream *stream; unsigned long flags; struct vb2_buffer *vb2_buf; stream = msm_get_stream_from_vb2q(q); if (!stream) { pr_err("%s:%d] NULL stream", __func__, __LINE__); return; } /* * Release all the buffers enqueued to driver * when streamoff is issued */ spin_lock_irqsave(&stream->stream_lock, flags); list_for_each_entry_safe(msm_vb2, temp, &(stream->queued_list), list) { vb2_buf = &(msm_vb2->vb2_buf); if (vb2_buf->state == VB2_BUF_STATE_DONE) continue; vb2_buffer_done(vb2_buf, VB2_BUF_STATE_DONE); msm_vb2->in_freeq = 0; } spin_unlock_irqrestore(&stream->stream_lock, flags); } static void msm_vb2_buf_cleanup(struct vb2_buffer *vb) { struct msm_vb2_buffer *msm_vb2; Loading Loading @@ -142,6 +172,7 @@ static struct vb2_ops msm_vb2_get_q_op = { .buf_queue = msm_vb2_buf_queue, .buf_cleanup = msm_vb2_buf_cleanup, .buf_finish = msm_vb2_buf_finish, .stop_streaming = msm_vb2_stop_stream, }; Loading