Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 375c0020 authored by Iliya Varadzhakov's avatar Iliya Varadzhakov
Browse files

msm: camera2: cpp: Append frame buffers to the list



In case of late buffer allocation, allocated buffers
have to be appended to the existing queues.

Change-Id: Ie14f00038e86b9d7c8caa01587a2ed1aee7d80e8
Signed-off-by: default avatarIliya Varadzhakov <ivarad@codeaurora.org>
parent fb0392c9
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -1544,6 +1544,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
		CPP_DBG("VIDIOC_MSM_CPP_FLUSH_QUEUE\n");
		rc = msm_cpp_flush_frames(cpp_dev);
		break;
	case VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO:
	case VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO: {
		struct msm_cpp_stream_buff_info_t *u_stream_buff_info;
		struct msm_cpp_stream_buff_info_t k_stream_buff_info;
@@ -1611,10 +1612,11 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
			mutex_unlock(&cpp_dev->mutex);
			return -EINVAL;
		}

		if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) {
			rc = msm_cpp_add_buff_queue_entry(cpp_dev,
				((k_stream_buff_info.identity >> 16) & 0xFFFF),
				(k_stream_buff_info.identity & 0xFFFF));
		}
		if (!rc)
			rc = msm_cpp_enqueue_buff_info_list(cpp_dev,
				&k_stream_buff_info);
@@ -1631,8 +1633,11 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
				return -EINVAL;
			}
		}

		if (cmd != VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO) {
			cpp_dev->stream_cnt++;
			pr_err("stream_cnt:%d\n", cpp_dev->stream_cnt);
		}
		break;
	}
	case VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO: {
+3 −0
Original line number Diff line number Diff line
@@ -229,6 +229,9 @@ struct msm_pproc_queue_buf_info {
#define VIDIOC_MSM_CPP_QUEUE_BUF \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t)

#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t)

#define VIDIOC_MSM_CPP_SET_CLOCK \
	_IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t)