HDCP 2.2 MST fixes
Subsystems (3)
cover HDCP 2.2 MST fixes
Misc HDCP 2.2 MST fixes.
Anshuman Gupta (3):
drm/i915/hdcp: HDCP2.2 MST Link failure recovery drm/i915/hdcp: recover link on stream enc enable/disable failure drm/i915/hdcp: return correct error code
drivers/gpu/drm/i915/display/intel_hdcp.c | 30 +++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-)
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/i915/hdcp: HDCP2.2 MST Link failure recovery
DP MST Link Check performed only for the connector involved with HDCP port authentication and encryption, for other connector it simply returns link check with true and update the uevent. Therefore in case of HDCP 2.2 link failure, disable HDCP encryption and de-authenticate the port so next time it can enable port authentication and encryption.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +6 -4
@@ -1938,7 +1938,8 @@ static int _intel_hdcp2_enable(struct intel_connector *connector)return 0 ; } -static int _intel_hdcp2_disable (struct intel_connector *connector) +static int +_intel_hdcp2_disable (struct intel_connector *connector,bool hdcp2_link_recovery) {struct intel_digital_port *dig_port =intel_attached_dig_port (connector);struct drm_i915_private *i915 =to_i915 (connector->base.dev);
@@ -1959,7 +1960,7 @@ static int _intel_hdcp2_disable(struct intel_connector *connector)drm_dbg_kms (&i915->drm,"HDCP 2.2 transcoder: %s stream encryption disabled\n" ,transcoder_name (hdcp->stream_transcoder)); -if (dig_port->num_hdcp_streams >0 ) +if (dig_port->num_hdcp_streams >0 && !hdcp2_link_recovery)return 0 ; }
@@ -2002,6 +2003,7 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)"HDCP2.2 link stopped the encryption, %x\n" , intel_de_read(dev_priv, HDCP2_STATUS(dev_priv, cpu_transcoder, port))); ret = -ENXIO ; +_intel_hdcp2_disable (connector, true);intel_hdcp_update_value (connector,DRM_MODE_CONTENT_PROTECTION_DESIRED , true);
@@ -2041,7 +2043,7 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) connector->base.name, connector->base.base.id); } - ret =_intel_hdcp2_disable (connector); + ret =_intel_hdcp2_disable (connector, true);if (ret) { drm_err(&dev_priv->drm, "[%s:%d] Failed to disable hdcp2.2 (%d)\n",
@@ -2351,7 +2353,7 @@ int intel_hdcp_disable(struct intel_connector *connector)intel_hdcp_update_value (connector,DRM_MODE_CONTENT_PROTECTION_UNDESIRED , false);if (hdcp->hdcp2_encrypted) - ret =_intel_hdcp2_disable (connector); + ret =_intel_hdcp2_disable (connector, false);else if (hdcp->hdcp_encrypted) ret =_intel_hdcp_disable (connector);
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/hdcp: recover link on stream enc enable/disable failure
In reply to Anshuman GuptaWhen stream encryption {enable,disable} fails, prepare HDCP2 for recovery by enabling port authentication and port encryption again.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +14 -3
@@ -1717,6 +1717,7 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector) {struct intel_digital_port *dig_port =intel_attached_dig_port (connector);struct drm_i915_private *dev_priv =to_i915 (connector->base.dev); +struct hdcp_port_data *data = &dig_port->hdcp_port_data;struct intel_hdcp *hdcp = &connector->hdcp;enum transcoder cpu_transcoder = hdcp->cpu_transcoder;enum port port = dig_port->base.port;
@@ -1726,7 +1727,8 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector) LINK_ENCRYPTION_STATUS)) {drm_err (&dev_priv->drm,"[%s:%d] HDCP 2.2 Link is not encrypted\n" , connector->base.name, connector->base.base.id); -return -EPERM ; + ret = -EPERM ; + goto link_recover; }if (hdcp->shim->stream_2_2_encryption) {
@@ -1734,12 +1736,19 @@ static int hdcp2_enable_stream_encryption(struct intel_connector *connector)if (ret) {drm_err (&dev_priv->drm,"[%s:%d] Failed to enable HDCP 2.2 stream enc\n" , connector->base.name, connector->base.base.id); -return ret; + goto link_recover; }drm_dbg_kms (&dev_priv->drm,"HDCP 2.2 transcoder: %s stream encrypted\n" ,transcoder_name (hdcp->stream_transcoder)); } +link_recover: +if (hdcp2_deauthenticate_port (connector) <0 ) +drm_dbg_kms (&dev_priv->drm,"Port deauth failed.\n" ); + + dig_port->hdcp_auth_status = false; + data->k =0 ; +return ret; }
@@ -1955,7 +1964,7 @@ _intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recoveryif (ret) {drm_err (&i915->drm,"[%s:%d] Failed to disable HDCP 2.2 stream enc\n" , connector->base.name, connector->base.base.id); -return ret; + goto link_recover; }drm_dbg_kms (&i915->drm,"HDCP 2.2 transcoder: %s stream encryption disabled\n" ,transcoder_name (hdcp->stream_transcoder));
@@ -1966,6 +1975,8 @@ _intel_hdcp2_disable(struct intel_connector *connector, bool hdcp2_link_recovery ret =hdcp2_disable_encryption (connector); +link_recover: +if (hdcp2_deauthenticate_port (connector) <0 )drm_dbg_kms (&i915->drm,"Port deauth failed.\n" );
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/hdcp: return correct error code
In reply to Anshuman Guptahdcp2_enable_stream_encryption shouldn't get called in case of any port authentication or encryption error, though hdcp2_enable_stream_encryption checks for link encryption before enabling stream encryption and returns error but this return error code won't be correct in case of any error due to port authentication and encryption.
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +2 -1
@@ -1905,7 +1905,8 @@ static int hdcp2_authenticate_and_encrypt(struct intel_connector *connector) } } - ret =hdcp2_enable_stream_encryption (connector); +if (!ret) + ret =hdcp2_enable_stream_encryption (connector);return ret; }
Signature · 6 lines
2.26.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for HDCP 2.2 MST fixes
In reply to Anshuman Gupta== Series Details ==
== Series Details ==
Series: HDCP 2.2 MST fixes
URL : https://patchwork.freedesktop.org/series/87475/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9816 -> Patchwork_19734
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_19734 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_19734, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_19734:
### IGT changes ###
#### Possible regressions ####
* igt@gem_linear_blits@basic:
- fi-kbl-8809g: [PASS][1] -> [TIMEOUT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9816/fi-kbl-8809g/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/fi-kbl-8809g/igt@[email protected]
Known issues
------------
Here are the changes found in Patchwork_19734 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_tiled_blits@basic:
- fi-kbl-8809g: [PASS][3] -> [TIMEOUT][4] ([i915#2502])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9816/fi-kbl-8809g/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/fi-kbl-8809g/igt@[email protected]
* igt@prime_self_import@basic-with_two_bos:
- fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([i915#402]) +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9816/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
#### Possible fixes ####
* igt@prime_self_import@basic-with_one_bo_two_files:
- fi-tgl-y: [DMESG-WARN][7] ([i915#402]) -> [PASS][8] +2 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9816/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/fi-tgl-y/igt@prime_self_import@basic-with_one_bo_two_files.html
#### Warnings ####
* igt@runner@aborted:
- fi-icl-u2: [FAIL][9] ([i915#1814]) -> [FAIL][10] ([i915#1569] / [i915#2426] / [k.org#202973])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9816/fi-icl-u2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/fi-icl-u2/igt@[email protected]
[i915#1569]: https://gitlab.freedesktop.org/drm/intel/issues/1569
[i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
[i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
[i915#2502]: https://gitlab.freedesktop.org/drm/intel/issues/2502
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[k.org#202973]: https://bugzilla.kernel.org/show_bug.cgi?id=202973
Participating hosts (41 -> 36)
------------------------------
Missing (5): fi-ilk-m540 fi-byt-j1900 fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9816 -> Patchwork_19734
CI-20190529: 20190529
CI_DRM_9816: 7295445db2c0c10c9e0308e8bef521eb3b051d3a @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6015: aa44cddf4ef689f8a3726fcbeedc03f08b12bd82 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_19734: d3f3dc1c06f3896ad3fb94372479d9a2f0574fd6 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d3f3dc1c06f3 drm/i915/hdcp: return correct error code cd063b741538 drm/i915/hdcp: recover link on stream enc enable/disable failure 7c3bc124485d drm/i915/hdcp: HDCP2.2 MST Link failure recovery
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_19734/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx