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

Commit 30339f46 authored by Vinay Kalia's avatar Vinay Kalia Committed by Stephen Boyd
Browse files

Revert "msm: vidc: Report sufficient resources event as sufficient resources"



This reverts commit b8ef87dc091fe67fc929f85ec54a17289adbc5b7.
Some clients are not able to handle SUFFICIENT_RESOURCES event
when height
and width of clip changes. This causes green frames for some
clips. With this change, following is the behavior:

1.CONTINUE_DATA_TRANSFER disabled by client (default setting)
	a) FW reports sufficient - driver reports	insufficient.
	b) FW reports insufficient - driver reports insufficient.

2. CONTINUE_DATA_TRANSFER is enabled by client
	a) FW reports	sufficient - driver	reports sufficient.
	b) FW reports	insufficient - driver reports	insufficient.

Change-Id: Ie617f01015ec3a6e22c5c882e17ec40543f816e6
Signed-off-by: default avatarVinay Kalia <vkalia@codeaurora.org>
parent daf81b8e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -393,6 +393,7 @@ static void handle_event_change(enum command_response cmd, void *data)
{
	struct msm_vidc_cb_cmd_done *response = data;
	struct msm_vidc_inst *inst;
	struct v4l2_control control = {0};
	struct msm_vidc_cb_event *event_notify;
	int event = V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT;
	int rc = 0;
@@ -401,6 +402,14 @@ static void handle_event_change(enum command_response cmd, void *data)
		event_notify = (struct msm_vidc_cb_event *) response->data;
		switch (event_notify->hal_event_type) {
		case HAL_EVENT_SEQ_CHANGED_SUFFICIENT_RESOURCES:
			event = V4L2_EVENT_SEQ_CHANGED_INSUFFICIENT;
			control.id =
				V4L2_CID_MPEG_VIDC_VIDEO_CONTINUE_DATA_TRANSFER;
			rc = v4l2_g_ctrl(&inst->ctrl_handler, &control);
			if (rc)
				dprintk(VIDC_WARN,
					"Failed to get Smooth streamng flag\n");
			if (!rc && control.value == true)
				event = V4L2_EVENT_SEQ_CHANGED_SUFFICIENT;
			break;
		case HAL_EVENT_SEQ_CHANGED_INSUFFICIENT_RESOURCES: