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

Commit 9e71e4c6 authored by Praneeth Paladugu's avatar Praneeth Paladugu Committed by Matt Wagantall
Browse files

msm: vidc: Protect suspend operation with core lock



Video driver may recieve suspend command at any time. Processing
this command in middle of FW unloading causes race conditions
between power collpase and fw_unload threads. Hence protect both
operations with core->lock.

Change-Id: I9beb79d610545b772dfc8877a3891e5e054c0f79
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent 99160590
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2570,9 +2570,11 @@ int msm_comm_suspend(int core_id)
		return -EINVAL;
	}

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

	return rc;
}