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

Commit 82907174 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: set avmute only if encryption is enabled



When HDCP authentication continuously fails there is no
need to set avmute packet for clear content because
there is no need to block the content in that case.

Check if encryption was enabled before setting avmute.

Change-Id: I7ece6538d36e0b0c9022e5993714f49275ed7db2
Signed-off-by: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
parent d8573fb4
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;