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

Commit d5733bb2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: hdmi: Clear and disable interrupts when HDCP is inactive"

parents 442d7807 29dff02f
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -31,6 +31,8 @@
#define HDCP_KEYS_STATE_PROD_AKSV	6
#define HDCP_KEYS_STATE_PROD_AKSV	6
#define HDCP_KEYS_STATE_RESERVED	7
#define HDCP_KEYS_STATE_RESERVED	7


#define HDCP_INT_CLR (BIT(1) | BIT(5) | BIT(7) | BIT(9) | BIT(13))

struct hdmi_hdcp_ctrl {
struct hdmi_hdcp_ctrl {
	u32 auth_retries;
	u32 auth_retries;
	u32 tp_msgid;
	u32 tp_msgid;
@@ -1139,16 +1141,15 @@ void hdmi_hdcp_off(void *input)
	}
	}


	/*
	/*
	 * Need to set the state to inactive here so that any ongoing
	 * Disable HDCP interrupts.
	 * reauth works will know that the HDCP session has been turned off
	 * Also, need to set the state to inactive here so that any ongoing
	 * reauth works will know that the HDCP session has been turned off.
	 */
	 */
	mutex_lock(hdcp_ctrl->init_data.mutex);
	mutex_lock(hdcp_ctrl->init_data.mutex);
	DSS_REG_W(io, HDMI_HDCP_INT_CTRL, 0);
	hdcp_ctrl->hdcp_state = HDCP_STATE_INACTIVE;
	hdcp_ctrl->hdcp_state = HDCP_STATE_INACTIVE;
	mutex_unlock(hdcp_ctrl->init_data.mutex);
	mutex_unlock(hdcp_ctrl->init_data.mutex);


	/* Disable HDCP interrupts */
	DSS_REG_W(io, HDMI_HDCP_INT_CTRL, 0);

	/*
	/*
	 * Cancel any pending auth/reauth attempts.
	 * Cancel any pending auth/reauth attempts.
	 * If one is ongoing, this will wait for it to finish.
	 * If one is ongoing, this will wait for it to finish.
@@ -1193,7 +1194,7 @@ int hdmi_hdcp_isr(void *input)
	if (HDCP_STATE_INACTIVE == hdcp_ctrl->hdcp_state) {
	if (HDCP_STATE_INACTIVE == hdcp_ctrl->hdcp_state) {
		DEV_ERR("%s: HDCP inactive. Just clear int and return.\n",
		DEV_ERR("%s: HDCP inactive. Just clear int and return.\n",
			__func__);
			__func__);
		DSS_REG_W(io, HDMI_HDCP_INT_CTRL, hdcp_int_val);
		DSS_REG_W(io, HDMI_HDCP_INT_CTRL, HDCP_INT_CLR);
		return 0;
		return 0;
	}
	}