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

Commit 8f72a92e authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: schedule fw unload regardless of inst count



Remove the list_empty check for core's instance list
while deciding to schedule firmware unload. Let fw
unload work check for list_empty on core's instance
list.

Change-Id: If9b1501b95845e331cf0ade358901d788a79b19b
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 37c8e26b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2526,7 +2526,7 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst)

	mutex_lock(&core->lock);

	if (!core->resources.never_unload_fw && list_empty(&core->instances)) {
	if (!core->resources.never_unload_fw) {
		cancel_delayed_work(&core->fw_unload_work);

		/*
+4 −3
Original line number Diff line number Diff line
@@ -2241,6 +2241,7 @@ static int venus_hfi_core_release(void *dev)

	mutex_lock(&device->lock);

	if (device->res->pm_qos_latency_us)
		pm_qos_remove_request(&device->qos);
	__set_state(device, VENUS_STATE_DEINIT);
	__unload_fw(device);
@@ -4253,6 +4254,7 @@ static inline int __suspend(struct venus_hfi_device *device)

	dprintk(VIDC_DBG, "Entering power collapse\n");

	if (device->res->pm_qos_latency_us)
		pm_qos_remove_request(&device->qos);

	rc = __tzbsp_set_video_state(TZBSP_VIDEO_STATE_SUSPEND);
@@ -4399,7 +4401,6 @@ static void __unload_fw(struct venus_hfi_device *device)
	cancel_delayed_work(&venus_hfi_pm_work);
	if (device->state != VENUS_STATE_DEINIT)
		flush_workqueue(device->venus_pm_workq);
	__halt_axi(device);

	/*
	 * If the core_clk is asserted, then PIL cannot enable