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

Commit 195000d5 authored by Surajit Podder's avatar Surajit Podder Committed by Abdulla Anam
Browse files

msm_vidc: Fix hang due to incorrect buffer unmap



Buffers queued with the same index share extrdata plane
info in dynamic buffer mode as well. When a buffer
is dequeued while another buffer(queued earlier with the
same index)is held in driver due to fw ref, dqbuf ends
up unmapping the old buffer, as the buffer_info used
to unregister is the one used to access the extradata
uvaddr, which happens to map to the old buffer as it is
earlier in the list, and the extradata plane is processed
last.

Fix the issue by populating the plane uvaddr in reverse
order, so that the correct buffer_info is unmapped.

CRs-Fixed: 1045763
Change-Id: I15723cc13c582fd5970641d51ba46456935ab4fb
Signed-off-by: default avatarSurajit Podder <spodder@codeaurora.org>
Signed-off-by: default avatarAbdulla Anam <abdullahanam@codeaurora.org>
parent 403033bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
	if (rc)
		return rc;

	for (i = 0; i < b->length; i++) {
	for (i = b->length - 1; i >= 0 ; i--) {
		if (EXTRADATA_IDX(b->length) &&
			(i == EXTRADATA_IDX(b->length)) &&
			!b->m.planes[i].m.userptr) {