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

Commit f9b8fd36 authored by Surajit Podder's avatar Surajit Podder Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Fix issue in cache operation range



Start offset is not considered in cache operation logic,
due to which bytes at the end of payload might be stale.

Add logic to add offset to cache operation length
from start of buffer, to ensure correct cache operation.

Change-Id: I5fed2fe78f803d3d4d3283ab293ad86238dbc620
Signed-off-by: default avatarSurajit Podder <spodder@codeaurora.org>
parent e5a68ffa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -822,7 +822,8 @@ int output_buffer_cache_invalidate(struct msm_vidc_inst *inst,

				if (inst->session_type == MSM_VIDC_ENCODER &&
					!i)
					size = b->m.planes[i].bytesused;
					size = b->m.planes[i].bytesused +
						b->m.planes[i].data_offset;
				else
					size = -1;

@@ -1056,7 +1057,8 @@ int msm_vidc_qbuf(void *instance, struct v4l2_buffer *b)
		if (binfo->handle[i] &&
			(b->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)) {
			if (inst->session_type == MSM_VIDC_DECODER && !i)
				size = b->m.planes[i].bytesused;
				size = b->m.planes[i].bytesused +
						b->m.planes[i].data_offset;
			else
				size = -1;
			rc = msm_comm_smem_cache_operations(inst,