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

Commit fa4400e2 authored by Praneeth Paladugu's avatar Praneeth Paladugu Committed by Vikash Garodia
Browse files

msm: vidc: Handle power collapse cancel properly



When power collapse is canceled due to venus being active,
Driver no need clear PC_READY bit. Venus HW uses this value
internally to maintain its own state. When driver clears
it can cause HW to become non-responsive.Venus HW is self
sufficient to come out of power collapse at any stage.

Change-Id: I5645a9e061fe3fa98ee03027c015cfac0ca81dfc
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent 0ff56cbd
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -3146,13 +3146,12 @@ static void venus_hfi_pm_hndlr(struct work_struct *work)
err_power_off:
skip_power_off:

	/* Reset PC_READY bit as power_off is skipped, if set by Venus */
	ctrl_status = venus_hfi_read_register(device, VIDC_CPU_CS_SCIACMDARG0);
	if (ctrl_status & VIDC_CPU_CS_SCIACMDARG0_HFI_CTRL_PC_READY) {
		ctrl_status &= ~(VIDC_CPU_CS_SCIACMDARG0_HFI_CTRL_PC_READY);
		venus_hfi_write_register(device, VIDC_CPU_CS_SCIACMDARG0,
			ctrl_status);
	}
	/*
	* When power collapse is escaped, driver no need to inform Venus.
	* Venus is self-sufficient to come out of the power collapse at
	* any stage. Driver can skip power collapse and continue with
	* normal execution.
	*/

	/* Cancel pending delayed works if any */
	cancel_delayed_work(&venus_hfi_pm_work);