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

Commit 498d0b1f authored by Arun Menon's avatar Arun Menon
Browse files

msm: vidc: Invalidate cache for read only FBD



Video driver failed to invalidate the decoded FBD when
firmware marks it as read only. If the cache invalidation
happens after a while, this can result in overwriting of
valid FBD data. Fix the issue by doing a cache invalidate
on every FBD.

CRs-Fixed: 972097
Change-Id: Ib2b36388e17f607e1ca87e8551063be4df5c16f0
Signed-off-by: default avatarArun Menon <avmenon@codeaurora.org>
parent 13d47110
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -939,10 +939,12 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
		return -EINVAL;
	}

	if (is_dynamic_output_buffer_mode(b, inst)) {
		if (!buffer_info)
			return -EINVAL;
	rc = output_buffer_cache_invalidate(inst, buffer_info);
	if (rc)
		return rc;


	if (is_dynamic_output_buffer_mode(b, inst)) {
		buffer_info->dequeued = true;

		dprintk(VIDC_DBG, "[DEQUEUED]: fd[0] = %d\n",
@@ -950,8 +952,7 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
		mutex_lock(&inst->registeredbufs.lock);
		rc = unmap_and_deregister_buf(inst, buffer_info);
		mutex_unlock(&inst->registeredbufs.lock);
	} else
		rc = output_buffer_cache_invalidate(inst, buffer_info);
	}

	return rc;
}
+0 −4
Original line number Diff line number Diff line
@@ -1671,10 +1671,6 @@ int buf_ref_put(struct msm_vidc_inst *inst, struct buffer_info *binfo)
	if (cnt < 0)
		return cnt;

	rc = output_buffer_cache_invalidate(inst, binfo);
	if (rc)
		return rc;

	if (release_buf) {
		/*
		* We can not delete binfo here as we need to set the user