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

Commit f448c8cd authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: Ignore clock reset when bcr reg is not present



Clock reset is not needed for all targets. For targets
which do not have the block reset register, there is no
need to reset the core clock.
The change handles the above case and avoid considering
it as an error case.

Change-Id: I3d1fdd6c60b6968ae79c59a05f4cfc4e7a9cbb64
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 75d530af
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -4089,13 +4089,18 @@ static int __core_clk_reset(struct venus_hfi_device *device,
	 * causes subsequent video sessions to fail. By resetting
	 * core_clk we are forcing a hard reset and ensure each
	 * firmware load starts on a clean slate.
	 * For targets which do not need to reset the core_clk, clock
	 * driver returns -EPERM. Do not consider such cases as erroneous.
	 */
	dprintk(VIDC_DBG, "%s core-clk\n",
		action == CLK_RESET_DEASSERT ? "de-assert" : "assert");
	vc = __get_clock(device, "core_clk");
	if (vc) {
		rc = clk_reset(vc->clk, action);
		if (rc) {
		if (rc == -EPERM) {
			rc = 0;
			dprintk(VIDC_DBG, "%s No need to reset\n", __func__);
		} else if (rc) {
			dprintk(VIDC_ERR,
				"clk_reset action - %d failed: %d\n",
				action, rc);