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

Commit 2e527a0d authored by Vinay Kalia's avatar Vinay Kalia
Browse files

msm: vidc: Do not fail registration if buffer is already registered



Extradata buffers queued by client are usually from one file descriptor
with different offsets. In such cases, registering extradata buffer with
same fd but different offset might fail resulting in failure of qbuf.

Change-Id: Idcaf4865a9b7f7552631575a21ce8c45b1afe765
Signed-off-by: default avatarVinay Kalia <vkalia@codeaurora.org>
parent 6cb8923f
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -451,13 +451,6 @@ int map_and_register_buf(struct msm_vidc_inst *inst, struct v4l2_buffer *b)
		}
		mutex_lock(&inst->registeredbufs.lock);
		temp = get_registered_buf(inst, b, i, &plane);
		if (temp && !is_dynamic_output_buffer_mode(b, inst)) {
			dprintk(VIDC_DBG,
				"This memory region has already been prepared\n");
			rc = 0;
			mutex_unlock(&inst->registeredbufs.lock);
			goto exit;
		}

		if (temp && is_dynamic_output_buffer_mode(b, inst) && !i) {
			/*