diff options
| author | Abhinav Kumar <abhinavk@codeaurora.org> | 2019-01-25 19:13:55 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-03-01 16:29:14 -0800 |
| commit | 82907174ca84f4ccf09700cc27832ba5443b6a65 (patch) | |
| tree | 505d1c5c8116295671ba04779038d8a04ee45042 /drivers/gpu | |
| parent | d8573fb4851c84d8f3eea89215b4eabc1114e622 (diff) | |
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: Abhinav Kumar <abhinavk@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/hdmi-staging/sde_hdmi.c | 14 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c | 19 |
2 files changed, 23 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi.c b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi.c index ac9c81c5eda1..5a9e56b58158 100644 --- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi.c +++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi.c @@ -1,5 +1,5 @@ /* - * 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,10 +601,16 @@ static void sde_hdmi_tx_set_avmute(void *ptr) return; } - pr_err("setting avmute to true\n"); - hdmi = hdmi_ctrl->ctrl.ctrl; - sde_hdmi_config_avmute(hdmi, true); + + /* + * 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); } void sde_hdmi_hdcp_off(struct sde_hdmi *hdmi_ctrl) diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c index 5600f24bd438..30d262f2b0d4 100644 --- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c +++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c @@ -1,4 +1,4 @@ -/* 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; - reg_val = hdmi_read(hdmi, HDMI_HDCP_CTRL2); - if ((reg_val & BIT(0)) && (reg_val & BIT(1))) - goto end; + /* 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; + 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; |
