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

Commit 9db2de2f authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly Committed by Rajakumar Govindaram
Browse files

msm: cpp: Update reserved field to handle cds



The reserved field needs to be properly copied over.
This will ensure the V4L2 buffer will send the information
to the client properly.

Change-Id: I46a8814449f03f2664103ba8d2843f636a4cb42c
Signed-off-by: default avatarKrishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: default avatarRajakumar Govindaram <rajakuma@codeaurora.org>
parent 6c644c0f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static int32_t msm_buf_mngr_buf_done(struct msm_buf_mngr_device *buf_mngr_dev,
			(bufs->vb2_buf->v4l2_buf.index == buf_info->index)) {
			bufs->vb2_buf->v4l2_buf.sequence  = buf_info->frame_id;
			bufs->vb2_buf->v4l2_buf.timestamp = buf_info->timestamp;
			bufs->vb2_buf->v4l2_buf.reserved = 0;
			bufs->vb2_buf->v4l2_buf.reserved = buf_info->reserved;
			ret = buf_mngr_dev->vb2_ops.buf_done
					(bufs->vb2_buf,
						buf_info->session_id,
@@ -213,6 +213,7 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file,
	buf_info.index = buf_info32.index;
	buf_info.timestamp.tv_sec = (long) buf_info32.timestamp.tv_sec;
	buf_info.timestamp.tv_usec = (long) buf_info32.timestamp.tv_usec;
	buf_info.reserved = buf_info32.reserved;

	/* Convert 32 bit IOCTL ID's to 64 bit IOCTL ID's
	 * except VIDIOC_MSM_CPP_CFG32, which needs special
@@ -254,6 +255,7 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file,
	buf_info32.index = buf_info.index;
	buf_info32.timestamp.tv_sec = (int32_t) buf_info.timestamp.tv_sec;
	buf_info32.timestamp.tv_usec = (int32_t) buf_info.timestamp.tv_usec;
	buf_info32.reserved = buf_info.reserved;

	if (copy_to_user((void __user *)up, &buf_info32,
			sizeof(struct msm_buf_mngr_info32_t)))
+3 −0
Original line number Diff line number Diff line
@@ -1209,6 +1209,7 @@ static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev)
				(processed_frame->identity & 0xFFFF);
			buff_mgr_info.frame_id = processed_frame->frame_id;
			buff_mgr_info.timestamp = processed_frame->timestamp;
			buff_mgr_info.reserved = processed_frame->reserved;
			buff_mgr_info.index =
				processed_frame->output_buffer_info[0].index;
			rc = msm_cpp_buffer_ops(cpp_dev,
@@ -2355,6 +2356,7 @@ static struct msm_cpp_frame_info_t *get_64bit_cpp_frame_from_compat(
		new_frame32->tnr_scratch_buffer_info[1];
	new_frame->duplicate_output = new_frame32->duplicate_output;
	new_frame->duplicate_identity = new_frame32->duplicate_identity;
	new_frame->reserved = new_frame32->reserved;

	/* Convert the 32 bit pointer to 64 bit pointer */
	new_frame->cookie = compat_ptr(new_frame32->cookie);
@@ -2426,6 +2428,7 @@ static void get_compat_frame_from_64bit(struct msm_cpp_frame_info_t *frame,
	k32_frame->output_buffer_info[1] = frame->output_buffer_info[1];
	k32_frame->duplicate_output = frame->duplicate_output;
	k32_frame->duplicate_identity = frame->duplicate_identity;
	k32_frame->reserved = frame->reserved;
	k32_frame->cookie = ptr_to_compat(frame->cookie);
}

+2 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ struct msm_cpp_frame_info_t {
	struct msm_cpp_buffer_info_t input_buffer_info;
	struct msm_cpp_buffer_info_t output_buffer_info[2];
	struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2];
	uint32_t reserved;
};

struct msm_cpp_pop_stream_info_t {
@@ -334,6 +335,7 @@ struct msm_cpp_frame_info32_t {
	struct msm_cpp_buffer_info_t input_buffer_info;
	struct msm_cpp_buffer_info_t output_buffer_info[2];
	struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2];
	uint32_t reserved;
};

struct msm_cpp_clock_settings32_t {
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ struct msm_buf_mngr_info {
	uint32_t frame_id;
	struct timeval timestamp;
	uint32_t index;
	uint32_t reserved;
};

struct v4l2_subdev *msm_buf_mngr_get_subdev(void);
@@ -33,6 +34,7 @@ struct msm_buf_mngr_info32_t {
	uint32_t frame_id;
	struct compat_timeval timestamp;
	uint32_t index;
	uint32_t reserved;
};

#define VIDIOC_MSM_BUF_MNGR_GET_BUF32 \