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

Commit 8f604715 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: Fix video power suspend issue



Video hardware is not going to power suspend mode
if video core status is UNINIT state. Remove the
state check for successful power suspend functionality.

CRs-Fixed: 2127764
Change-Id: I3cae9f2bbb8d4df08a7d4118abc9664b86a5b8b3
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 099e9fc7
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -3336,20 +3336,11 @@ int msm_comm_suspend(int core_id)
	}

	mutex_lock(&core->lock);
	if (core->state != VIDC_CORE_INIT_DONE) {
		dprintk(VIDC_ERR,
				"%s - fw is not in proper state, skip suspend\n",
				__func__);
		rc = -EINVAL;
		goto exit;
	}

	rc = call_hfi_op(hdev, suspend, hdev->hfi_device_data);
	if (rc)
		dprintk(VIDC_WARN, "Failed to suspend\n");

exit:
	mutex_unlock(&core->lock);

	return rc;
}

+3 −1
Original line number Diff line number Diff line
@@ -1029,8 +1029,10 @@ static int venus_hfi_suspend(void *dev)
	flush_delayed_work(&venus_hfi_pm_work);

	mutex_lock(&device->lock);
	if (device->power_enabled)
	if (device->power_enabled) {
		dprintk(VIDC_WARN, "%s: Venus is busy\n", __func__);
		rc = -EBUSY;
	}
	mutex_unlock(&device->lock);
	return rc;
}