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

Commit 07b61e0c authored by Abdulla Anam's avatar Abdulla Anam Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: check for venus_hfi_device state in resume



Now since resume is called to ensure venus is in power on state
during scale clocks, an issue is seen when client responds to an
error notification with stream_off. This causes scale clocks to
be called which powers_on venus and enable regulators. But an
earlier sys_error deinited all resources and hence a null pointer
exception is seen causing kernel panic.

CRs-Fixed: 1040026
Change-Id: Ibb660397f8e7e3e0cd0a5e672924925e605b2eb7
Signed-off-by: default avatarAbdulla Anam <abdullahanam@codeaurora.org>
parent e99d73e0
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -4271,6 +4271,9 @@ static inline int __resume(struct venus_hfi_device *device)
	} else if (device->power_enabled) {
	} else if (device->power_enabled) {
		dprintk(VIDC_DBG, "Power is already enabled\n");
		dprintk(VIDC_DBG, "Power is already enabled\n");
		goto exit;
		goto exit;
	} else if (!__core_in_valid_state(device)) {
		dprintk(VIDC_DBG, "venus_hfi_device in deinit state.");
		return -EINVAL;
	}
	}


	dprintk(VIDC_DBG, "Resuming from power collapse\n");
	dprintk(VIDC_DBG, "Resuming from power collapse\n");