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

Commit ebae0e44 authored by Narender Ankam's avatar Narender Ankam
Browse files

msm: mdss: hdcp: handle hdcp1 mutex properly



HDCP driver is returning without unlocking hdcp1_ta_cmd_lock
mutex. Unlock it and then return.

Change-Id: Ia2fa1c857516d6fbdd732a6cdbf71236950f88b2
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent 2a027e8e
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -2315,6 +2315,7 @@ bool hdcp1_check_if_supported_load_app(void)


	/* start hdcp1 app */
	/* start hdcp1 app */
	if (hdcp1_supported && !hdcp1_handle->qsee_handle) {
	if (hdcp1_supported && !hdcp1_handle->qsee_handle) {
		mutex_init(&hdcp1_ta_cmd_lock);
		rc = qseecom_start_app(&hdcp1_handle->qsee_handle,
		rc = qseecom_start_app(&hdcp1_handle->qsee_handle,
				HDCP1_APP_NAME,
				HDCP1_APP_NAME,
				QSEECOM_SBUFF_SIZE);
				QSEECOM_SBUFF_SIZE);
@@ -2328,7 +2329,6 @@ bool hdcp1_check_if_supported_load_app(void)


	/* if hdcp1 app succeeds load SRM TA as well */
	/* if hdcp1 app succeeds load SRM TA as well */
	if (hdcp1_supported && !hdcp1_handle->srm_handle) {
	if (hdcp1_supported && !hdcp1_handle->srm_handle) {
		mutex_init(&hdcp1_ta_cmd_lock);
		rc = qseecom_start_app(&hdcp1_handle->srm_handle,
		rc = qseecom_start_app(&hdcp1_handle->srm_handle,
				SRMAPP_NAME,
				SRMAPP_NAME,
				QSEECOM_SBUFF_SIZE);
				QSEECOM_SBUFF_SIZE);
@@ -2560,8 +2560,10 @@ int hdcp1_set_enc(bool enable)


	hdcp1_qsee_handle = hdcp1_handle->qsee_handle;
	hdcp1_qsee_handle = hdcp1_handle->qsee_handle;


	if (!hdcp1_qsee_handle)
	if (!hdcp1_qsee_handle) {
		return -EINVAL;
		rc = -EINVAL;
		goto end;
	}


	if (hdcp1_enc_enabled == enable) {
	if (hdcp1_enc_enabled == enable) {
		pr_info("already %s\n", enable ? "enabled" : "disabled");
		pr_info("already %s\n", enable ? "enabled" : "disabled");