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

Commit cee70c96 authored by Sowmya Pandiri's avatar Sowmya Pandiri
Browse files

msm: vidc : Handle power collapse properly in venus HFI



When video driver gets PC_PREP_DONE from firmware, callback
response_type is not updated causing power collpase to timeout.
This change fixes the watchdog timeout issue.

Change-Id: Ibc390418747f07876b45c38c095b52ea92d5796f
Signed-off-by: default avatarSowmya Pandiri <spandiri@codeaurora.org>
parent 66f4f85a
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1495,6 +1495,17 @@ static int hfi_process_sys_property_info(u32 device_id,

}

static int hfi_process_sys_pc_prep_done(u32 device_id,
		struct vidc_hal_msg_pkt_hdr *msg_hdr,
		struct msm_vidc_cb_info *info)
{
	*info = (struct msm_vidc_cb_info) {
		.response_type =  HAL_SYS_PC_PREP_DONE,
	};

	return 0;
}

static int hfi_process_ignore(u32 device_id,
		struct vidc_hal_msg_pkt_hdr *msg_hdr,
		struct msm_vidc_cb_info *info)
@@ -1572,6 +1583,8 @@ int hfi_process_msg_packet(u32 device_id, struct vidc_hal_msg_pkt_hdr *msg_hdr,
		pkt_func = (pkt_func_def)hfi_process_session_abort_done;
		break;
	case HFI_MSG_SYS_PC_PREP_DONE:
		pkt_func = (pkt_func_def)hfi_process_sys_pc_prep_done;
		break;
	case HFI_MSG_SESSION_SYNC_DONE:
		pkt_func = (pkt_func_def)hfi_process_ignore;
		break;
+6 −0
Original line number Diff line number Diff line
@@ -3543,6 +3543,12 @@ static struct msm_vidc_cb_info *__response_handler(
		case HAL_SYS_PC_PREP_DONE:
			dprintk(VIDC_DBG, "Received SYS_PC_PREP_DONE\n");
			complete(&pc_prep_done);
			/*
			 * PC_PREP_DONE should be the last packet during
			 * power collapse, so decrement the packet count
			 * to not process this pkt in callback
			 */
			--packet_count;
			break;
		default:
			break;