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

Commit f6dc910a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Compare vb2 planes instead of dmabuf planes"

parents ff46094c 848ab820
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
@@ -6329,12 +6329,28 @@ struct msm_vidc_buffer *msm_comm_get_vidc_buffer(struct msm_vidc_inst *inst,
	}

	mutex_lock(&inst->registeredbufs.lock);
	if (inst->session_type == MSM_VIDC_DECODER) {
		list_for_each_entry(mbuf, &inst->registeredbufs.list, list) {
			if (msm_comm_compare_dma_planes(inst, mbuf,
					dma_planes)) {
				found = true;
				break;
			}
		}
	} else {
		/*
		 * for encoder, client may queue the same buffer with different
		 * fd before driver returned old buffer to the client. This
		 * buffer should be treated as new buffer. Search the list with
		 * fd so that it will be treated as new msm_vidc_buffer.
		 */
		list_for_each_entry(mbuf, &inst->registeredbufs.list, list) {
		if (msm_comm_compare_dma_planes(inst, mbuf, dma_planes)) {
			if (msm_comm_compare_vb2_planes(inst, mbuf, vb2)) {
				found = true;
				break;
			}
		}
	}

	if (!found) {
		/* this is new vb2_buffer */