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

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

Merge "drm/msm: set avmute only if encryption is enabled"

parents f843cadc 82907174
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -601,9 +601,15 @@ static void sde_hdmi_tx_set_avmute(void *ptr)
		return;
	}

	pr_err("setting avmute to true\n");

	hdmi = hdmi_ctrl->ctrl.ctrl;

	/*
	 * When we try to continuously re-auth there
	 * is no need to enforce avmute for clear
	 * content. Hence check the current encryption level
	 * before enforcing avmute on authentication failure
	 */
	if (sde_hdmi_tx_is_encryption_set(hdmi_ctrl))
		sde_hdmi_config_avmute(hdmi, true);
}

+13 −6
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -607,12 +607,19 @@ bool sde_hdmi_tx_is_encryption_set(struct sde_hdmi *hdmi_ctrl)

	hdmi = hdmi_ctrl->ctrl.ctrl;

	/* Check if encryption was enabled */
	if (hdmi_ctrl->hdmi_tx_major_version <= HDMI_TX_VERSION_3) {
		reg_val = hdmi_read(hdmi, HDMI_HDCP_CTRL2);
		if ((reg_val & BIT(0)) && (reg_val & BIT(1)))
			goto end;

		if (hdmi_read(hdmi, HDMI_CTRL) & BIT(2))
			goto end;
	} else {
		reg_val = hdmi_read(hdmi, HDMI_HDCP_STATUS);
		if (reg_val)
			goto end;
	}

	return false;