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

Commit e0126195 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: VPU: Add Chroma down-sampling support"

parents b2fbc8ab 2005ff8d
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -428,13 +428,18 @@ static void on_buffer_done(struct vpu_channel_hal *phal,
				if ((i < packet->num_out_buf) &&
						(phdr->status == 0)) {

					/* store EOS info if present */
					/* store buffer flags info */
					if (pinfo->flag & BUFFER_PKT_FLAG_EOS) {
						pr_debug("out EOS buf #%d\n",
							vb->vb.v4l2_buf.index);
						vb->vb.v4l2_buf.flags |=
							V4L2_QCOM_BUF_FLAG_EOS;
					}
					if (pinfo->flag &
						BUFFER_PKT_FLAG_CDS_ENABLE) {
						vb->vb.v4l2_buf.flags |=
						V4L2_BUF_FLAG_CDS_ENABLE;
					}

					vb->vb.v4l2_buf.timestamp.tv_sec =
							pinfo->timestamp_hi;
@@ -1306,6 +1311,13 @@ static void vpu_buf_to_ipc_buf_info(struct vpu_buffer *vb, bool input,
			pr_debug("in EOS buf #%d\n", vb->vb.v4l2_buf.index);
			flag |= BUFFER_PKT_FLAG_EOS;
		}

		/* set chroma downsample bit if present */
		if (vb->vb.v4l2_buf.flags & V4L2_BUF_FLAG_CDS_ENABLE) {
			pr_debug("in CDS enable buf #%d\n",
					vb->vb.v4l2_buf.index);
			flag |= BUFFER_PKT_FLAG_CDS_ENABLE;
		}
	}

	/* VPU address must always be present, callers of this func to check */
+3 −0
Original line number Diff line number Diff line
@@ -431,6 +431,9 @@ struct vpu_ipc_buffer_meta_data_t {
/* Bits: 26-27 - Number of future buffers */
#define BUFFER_PKT_FLAG_FUTURE_BUFFER_NUM_MASK      0x0C000000
#define BUFFER_PKT_FLAG_FUTURE_BUFFER_NUM_SHIFT     26
/* Bits: 28 - Chroma down sampling */
#define BUFFER_PKT_FLAG_CDS_ENABLE                  0x10000000
#define BUFFER_PKT_FLAG_CDS_SHIFT                   28

/*
 * VPU_IPC_CMD_SESSION_SET_BUFFERS, VPU_IPC_CMD_SESSION_PROCESS_BUFFERS
+8 −0
Original line number Diff line number Diff line
@@ -10,6 +10,14 @@
/*
 * v4l2_buffer:
 *
 * VPU uses standard V4L2 buffer flags, and defines some custom
 * flags (used in v4l2_buffer.flags field):
 *	V4L2_QCOM_BUF_FLAG_EOS: buffer flag indicating end of stream
 *	V4L2_BUF_FLAG_CDS_ENABLE: buffer flag to enable chroma down-sampling
 */
#define V4L2_BUF_FLAG_CDS_ENABLE	0x10000000

/*
 * VPU uses multi-plane v4l2_buffer in the following manner:
 * each plane can be a separate ION buffer, or all planes are from the
 * same ION buffer (under this case all planes have the same fd, but different