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

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

Merge "Revert "msm: vidc: Handle encoder input in true dynamic mode""

parents e0ec0652 bc7602c6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -952,8 +952,7 @@ int msm_vidc_dqbuf(void *instance, struct v4l2_buffer *b)
	if (rc)
		return rc;

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

		dprintk(VIDC_DBG, "[DEQUEUED]: fd[0] = %d\n",
+0 −32
Original line number Diff line number Diff line
@@ -1713,36 +1713,6 @@ static struct vb2_buffer *get_vb_from_device_addr(struct buf_queue *bufq,
	return vb;
}


static void handle_dynamic_input_buffer(struct msm_vidc_inst *inst,
		ion_phys_addr_t device_addr)
{
	struct buffer_info *binfo = NULL, *temp = NULL;

	if (inst->session_type == MSM_VIDC_ENCODER) {
		binfo = device_to_uvaddr(&inst->registeredbufs, device_addr);
		if (!binfo) {
			dprintk(VIDC_ERR,
				"%s buffer not found in registered list\n",
				__func__);
			return;
		}
		dprintk(VIDC_DBG,
			"EBD fd[0] = %d -> EBD_ref_released, addr: %pa\n",
			binfo->fd[0], &device_addr);

		mutex_lock(&inst->registeredbufs.lock);
		list_for_each_entry(temp, &inst->registeredbufs.list,
				list) {
			if (temp == binfo) {
				binfo->pending_deletion = true;
				break;
			}
		}
		mutex_unlock(&inst->registeredbufs.lock);
	}
}

static void handle_ebd(enum hal_command_response cmd, void *data)
{
	struct msm_vidc_cb_data_done *response = data;
@@ -1762,8 +1732,6 @@ static void handle_ebd(enum hal_command_response cmd, void *data)
		return;
	}

	handle_dynamic_input_buffer(inst, response->input_done.packet_buffer);

	vb = get_vb_from_device_addr(&inst->bufq[OUTPUT_PORT],
			response->input_done.packet_buffer);
	if (vb) {