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

Commit 72a3f55c 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: preserve buffer sequence number"

parents 5f0fd060 ee6ced7b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ struct vpu_buffer {
	u32 valid_addresses_mask;
	struct list_head  buffers_entry;

	u32 sequence;	/* buffer sequence number */

	struct vpu_plane {
		/* use ADDR_INDEX_xxxx to get the device address */
		u32 mapped_address[3];
+8 −1
Original line number Diff line number Diff line
@@ -935,9 +935,14 @@ int vpu_qbuf(struct vpu_client *client, struct v4l2_buffer *b)
		ret = -EINVAL;
	} else {
		ret = __check_user_planes(&session->vbqueue[port], b);
		if (!ret)
		if (!ret) {
			struct vpu_buffer *vpu_buf = to_vpu_buffer(
				session->vbqueue[port].bufs[b->index]);
			vpu_buf->sequence = b->sequence;

			ret = vb2_qbuf(&session->vbqueue[port], b);
		}
	}
	mutex_unlock(&session->que_lock[port]);

	return ret;
@@ -967,6 +972,8 @@ int vpu_dqbuf(struct vpu_client *client, struct v4l2_buffer *b,
			int i;
			struct vpu_buffer *vpu_buf = to_vpu_buffer(
				session->vbqueue[port].bufs[b->index]);
			b->sequence = vpu_buf->sequence;

			for (i = 0; i < b->length; i++)
				b->m.planes[i].reserved[0] =
					vpu_buf->planes[i].data_offset;