Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: seanpaul@chromium.org
Subject: [Intel-gfx] [RFC 6/6] drm/i915/hdcp: Enable HDCP 2.2 MST support
Date: Thu, 10 Sep 2020 13:47:27 +0530	[thread overview]
Message-ID: <20200910081727.4505-7-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20200910081727.4505-1-anshuman.gupta@intel.com>

Enable HDCP 2.2 over DP MST.

Cc: Ramalingam C <ramalingam.c@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index f7ca9dfad825..2498c2c7c245 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1698,6 +1698,14 @@ static int hdcp2_enable_encryption(struct intel_connector *connector)
 				    LINK_ENCRYPTION_STATUS,
 				    HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
 
+	if (hdcp->shim->stream_2_2_encryption) {
+		ret = hdcp->shim->stream_2_2_encryption(dig_port, true);
+		if (ret) {
+			drm_err(&dev_priv->drm, "Failed to enable HDCP 2.2 stream enc\n");
+			return ret;
+		}
+	}
+
 	return ret;
 }
 
@@ -1810,6 +1818,7 @@ static int _intel_hdcp2_disable(struct intel_connector *connector)
 	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
 	struct drm_i915_private *i915 = to_i915(connector->base.dev);
 	struct hdcp_port_data *data = &dig_port->port_data;
+	struct intel_hdcp *hdcp = &connector->hdcp;
 	int ret;
 
 	drm_dbg_kms(&i915->drm, "[%s:%d] HDCP2.2 is being Disabled\n",
@@ -1818,6 +1827,14 @@ static int _intel_hdcp2_disable(struct intel_connector *connector)
 	if (drm_WARN_ON(&i915->drm, data->k < 0))
 		return -EINVAL;
 
+	if (dig_port->num_hdcp_streams > 0 && hdcp->shim->stream_2_2_encryption) {
+		ret = hdcp->shim->stream_2_2_encryption(dig_port, false);
+		if (ret) {
+			drm_err(&i915->drm, "Failed to disable HDCP 2.2 stream enc\n");
+			return ret;
+		}
+	}
+
 	ret = hdcp2_disable_encryption(connector);
 
 	if (hdcp2_deauthenticate_port(connector) < 0)
@@ -2097,7 +2114,7 @@ int intel_hdcp_init(struct intel_connector *connector,
 	if (!shim)
 		return -EINVAL;
 
-	if (is_hdcp2_supported(dev_priv) && !connector->mst_port)
+	if (is_hdcp2_supported(dev_priv))
 		intel_hdcp2_init(connector, port, shim);
 
 	ret =
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-09-10  8:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  8:17 [Intel-gfx] [RFC 0/6] HDCP 2.2 DP MST Support Anshuman Gupta
2020-09-10  8:17 ` [Intel-gfx] [RFC 1/6] drm/i915/hdcp: Encapsulate hdcp_port_data to dig_port Anshuman Gupta
2020-09-10  8:17 ` [Intel-gfx] [RFC 2/6] drm/i915/hdcp: mst streams support in hdcp port_data Anshuman Gupta
2020-09-10  8:17 ` [Intel-gfx] [RFC 3/6] drm/i915/hdcp: Pass connector to check_2_2_link Anshuman Gupta
2020-09-10  8:17 ` [Intel-gfx] [RFC 4/6] drm/i915/hdcp: Add HDCP 2.2 stream register Anshuman Gupta
2020-09-10  8:17 ` [Intel-gfx] [RFC 5/6] drm/i915/hdcp: Support for HDCP 2.2 MST shim callbacks Anshuman Gupta
2020-09-10  8:17 ` Anshuman Gupta [this message]
2020-09-10  8:57 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for HDCP 2.2 DP MST Support Patchwork
2020-09-10  9:12 ` [Intel-gfx] [RFC 0/6] " Ramalingam C
2020-09-10  9:13   ` Anshuman Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200910081727.4505-7-anshuman.gupta@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox