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

Commit 79c2eb85 authored by Maheshwar Ajja's avatar Maheshwar Ajja Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: Fix power collapse issue



Video firmware will set the idle status bit only when
video driver enables idle indicator else video firmware
will not set idle status bit. So check idle indicator before
verifying idle status bit in power collapse sequence to avoid
skipping power collapse.

CRs-Fixed: 2034063
Change-Id: I6a2890af7fda883daf890596728ea7133e4bbf46
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 68e85fd7
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -2921,9 +2921,17 @@ static void venus_hfi_pm_handler(struct work_struct *work)
				VIDC_WRAPPER_CPU_STATUS);
		idle_status = __read_register(device,
				VIDC_CPU_CS_SCIACMDARG0);
		if (!(wfi_status & BIT(0)) ||
		if (!(wfi_status & BIT(0))) {
			dprintk(VIDC_WARN,
				"Skipping PC as wfi_status (%#x) bit not set\n",
				wfi_status);
			goto skip_power_off;
		}
		if (device->res->sys_idle_indicator &&
			!(idle_status & BIT(30))) {
			dprintk(VIDC_WARN, "Skipping PC\n");
			dprintk(VIDC_WARN,
				"Skipping PC as idle_status (%#x) bit not set\n",
				idle_status);
			goto skip_power_off;
		}