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

Commit 64e4cbf0 authored by Abdulla Anam's avatar Abdulla Anam
Browse files

msm: vidc: ensure venus is in power on before scaling clocks



It is to be ensured that venus is in power on state before scaling
clocks. When venus goes to power collapse, a resume can happen
either when driver writes some command to the command queue or any
response comes from firmware. So when client requests a particular
perf_level, venus is not resumed and scale clocks is called.

CRs-Fixed: 1000809

Change-Id: I2ac46c481065ada2b62a5eb248fbdf18f2b1a91f
Signed-off-by: default avatarAbdulla Anam <abdullahanam@codeaurora.org>
parent bc936131
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1531,9 +1531,16 @@ static int venus_hfi_scale_clocks(void *dev, int load,
	}

	mutex_lock(&device->lock);

	if (__resume(device)) {
		dprintk(VIDC_ERR, "Resume from power collapse failed\n");
		rc = -ENODEV;
		goto exit;
	}

	rc = __scale_clocks(device, load, data, instant_bitrate);
exit:
	mutex_unlock(&device->lock);

	return rc;
}