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

Commit e594f806 authored by Chinmay Sawarkar's avatar Chinmay Sawarkar
Browse files

msm: vidc: Check idle status before power collapse



Idle status indicates whether the video hw core has
completed its task and is ready for power collapse.
Both WFI and IDLE should be set to power collapse the
core.

CRs-Fixed: 2384822
Change-Id: I630c342e8337141552377040727ecbaf143fe661
Signed-off-by: default avatarChinmay Sawarkar <chinmays@codeaurora.org>
parent 801dc68c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3197,9 +3197,9 @@ static int __power_collapse(struct venus_hfi_device *device, bool force)
		wfi_status = BIT(0) &
				__read_register(device,
					VIDC_WRAPPER_TZ_CPU_STATUS);
		if (!wfi_status) {
		if (!wfi_status || !idle_status) {
			dprintk(VIDC_WARN,
				"Skipping PC, wfi_status not set.\n");
				"Skipping PC, wfi or idle status not set.\n");
			goto skip_power_off;
		}