HDCP1.4 implementation enhancement
Subsystems (3)
cover HDCP1.4 implementation enhancement
This series extends the HDCP1.4 support for few more intel platforms. And also addresses few gaps found in the base HDCP1.4 implementation w.r.t HDCP1.4 specification.
Ramalingam C (4):
drm/i915: Extending HDCP for HSW, BDW and BXT+
drm/i915: II stage HDCP auth for repeater only
drm/i915: Start repeater auth on READY/CP_IRQ
drm/i915: Check for downstream topology errors
drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdcp.c | 65 ++++++++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_hdmi.c | 3 +- include/drm/drm_hdcp.h | 2 ++ 6 files changed, 57 insertions(+), 17 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/4 drm/i915: Extending HDCP for HSW, BDW and BXT+
This patch extends the Key load process and hdcp initialization for few more capable intel platforms i.e. HSW, BDW and BXT+.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdcp.c | 42 ++++++++++++++++++++++++++++++++------- drivers/gpu/drm/i915/intel_hdmi.c | 3 +-- 5 files changed, 39 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -8357,6 +8357,7 @@ enum skl_power_gate {#define HDCP_KEY_CONF _MMIO(0x66c00)#define HDCP_AKSV_SEND_TRIGGER BIT(31)#define HDCP_CLEAR_KEYS_TRIGGER BIT(30) +#define HDCP_KEY_LOAD_TRIGGER BIT(8)#define HDCP_KEY_STATUS _MMIO(0x66c04)#define HDCP_FUSE_IN_PROGRESS BIT(7)#define HDCP_FUSE_ERROR BIT(6)
drivers/gpu/drm/i915/intel_dp.c +1 -1
@@ -6352,7 +6352,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,intel_dp_add_properties (intel_dp, connector); -if (INTEL_GEN (dev_priv) >=9 && !intel_dp_is_edp (intel_dp)) { +if (is_hdcp_supported (dev_priv, port) && !intel_dp_is_edp (intel_dp)) {int ret =intel_hdcp_init (intel_connector, &intel_dp_hdcp_shim);if (ret)DRM_DEBUG_KMS ("HDCP init failed, skipping.\n" );
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -1848,6 +1848,7 @@ int intel_hdcp_init(struct intel_connector *connector,int intel_hdcp_enable (struct intel_connector *connector);int intel_hdcp_disable (struct intel_connector *connector);int intel_hdcp_check_link (struct intel_connector *connector); +bool is_hdcp_supported (struct drm_i915_private *dev_priv,enum port port);/* intel_psr.c */ #define CAN_PSR (dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)
drivers/gpu/drm/i915/intel_hdcp.c +35 -7
54 lines not on this page · raw message
drivers/gpu/drm/i915/intel_hdmi.c +1 -2
@@ -2304,8 +2304,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,intel_hdmi_add_properties (intel_hdmi, connector); -/* PORT E doesn't have HDCP, and PORT F is disabled */ -if (INTEL_GEN (dev_priv) >=9 && port <PORT_E ) { +if (is_hdcp_supported (dev_priv, port)) {int ret =intel_hdcp_init (intel_connector, &intel_hdmi_hdcp_shim);if (ret)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 drm/i915: II stage HDCP auth for repeater only
In reply to Ramalingam CSecond stage of HDCP authentication required only if the HDCP sink is a repeater.
This patch imposes above condition on second stage HDCP authentication.
--- drivers/gpu/drm/i915/intel_hdcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdcp.c +4 -1
@@ -493,7 +493,10 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,* on those as well. */ -return intel_hdcp_auth_downstream (intel_dig_port, shim); +if (repeater_present) +return intel_hdcp_auth_downstream (intel_dig_port, shim); + +return 0 ; } static
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/4] drm/i915: II stage HDCP auth for repeater only
Quoted 4 lines · Ramalingam C
Second stage of HDCP authentication required only if the HDCP sink is a repeater.
This patch imposes above condition on second stage HDCP authentication.
Hi Ram,
This is already enforced in intel_hdcp_auth_downstream()
Thanks,
Sean
Quoted 25 lines
Signed-off-by Ramalingam C <[email protected]>--- drivers/gpu/drm/i915/intel_hdcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hdcp.c +4
-1@@ -493,7 +493,10 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,* on those as well. */ -return intel_hdcp_auth_downstream (intel_dig_port, shim); +if (repeater_present) +return intel_hdcp_auth_downstream (intel_dig_port, shim); + +return 0 ; } staticSignature · 1 line
2.7.4
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/4] drm/i915: II stage HDCP auth for repeater only
Quoted 9 lines
-----Original Message-----
From: Sean Paul [mailto:[email protected]]
Sent: Friday, January 19, 2018 3:54 AM
To: C, Ramalingam <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vivi, Rodrigo <[email protected]>; Sharma, Shashank <[email protected]>
Subject: Re: [PATCH 2/4] drm/i915: II stage HDCP auth for repeater only
Quoted 8 lines
Quoted 4 lines · Ramalingam C
Second stage of HDCP authentication required only if the HDCP sink is a repeater.
This patch imposes above condition on second stage HDCP authentication.
Hi Ram,
This is already enforced inintel_hdcp_auth_downstream()
I am not able to locate any check for repeater capability at start of downstream auth.
I am not sure whether you are referring to number of downstream device count check.
That is valid after poll for ksv_fifo ready. We don't want to wait for 5Sec timeout in poll to detect the repeater cap.
And since the caller is handy with the flag for repeater cap, it is best to decide on the call for downstream auth itself.
Thanks
--Ram
Quoted 27 lines
Thanks,
Seandrivers/gpu/drm/i915/intel_hdcp.c static int intel_hdcp_auth(struct intel_digital_port
Quoted 12 lines
Signed-off-by Ramalingam C <[email protected]>--- drivers/gpu/drm/i915/intel_hdcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hdcp.c +0
-0@@ -493,7 +493,10 @@ static int intel_hdcp_auth(struct intel_digital_port
*intel_dig_port,Quoted 10 lines
drivers/gpu/drm/i915/intel_hdcp.c +4
-1* on those as well. */ -return intel_hdcp_auth_downstream (intel_dig_port, shim); +if (repeater_present) +return intel_hdcp_auth_downstream (intel_dig_port, shim); + +return 0 ; }
Quoted 7 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_hdcp.c +0
-1static --2.7.4
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/4] drm/i915: II stage HDCP auth for repeater only
Quoted 18 lines · Ramalingam
Quoted 9 lines
-----Original Message-----
From: Sean Paul [mailto:[email protected]]
Sent: Friday, January 19, 2018 3:54 AM
To: C, Ramalingam <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Vivi, Rodrigo <[email protected]>; Sharma, Shashank <[email protected]>
Subject: Re: [PATCH 2/4] drm/i915: II stage HDCP auth for repeater onlyQuoted 8 lines
Quoted 4 lines · Ramalingam C
Second stage of HDCP authentication required only if the HDCP sink is a repeater.
This patch imposes above condition on second stage HDCP authentication.
Hi Ram,
This is already enforced inintel_hdcp_auth_downstream()
Quoted 7 lines
I am not able to locate any check for repeater capability at start of downstream auth.
I am not sure whether you are referring to number of downstream device count check.
That is valid after poll forksv_fifoready. We don't want to wait for 5Sec timeout in poll to detect the repeater cap.And since the caller is handy with the flag for repeater cap, it is best to decide on the call for downstream auth itself.
Thanks for clarifying, makes sense with the other patches in the set.
Sean
Quoted 36 lines
Thanks
--RamQuoted 34 lines
Thanks,
Seandrivers/gpu/drm/i915/intel_hdcp.c static int intel_hdcp_auth(struct intel_digital_port
Quoted 12 lines
Signed-off-by Ramalingam C <[email protected]>--- drivers/gpu/drm/i915/intel_hdcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hdcp.c +0
-0@@ -493,7 +493,10 @@ static int intel_hdcp_auth(struct intel_digital_port
*intel_dig_port,Quoted 12 lines
drivers/gpu/drm/i915/intel_hdcp.c +4
-2* on those as well. */ -return intel_hdcp_auth_downstream (intel_dig_port, shim); +if (repeater_present) +return intel_hdcp_auth_downstream (intel_dig_port, shim); + +return 0 ; } static --Quoted 2 lines
2.7.4
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915: Start repeater auth on READY/CP_IRQ
In reply to Ramalingam CSecond stage of HDCP authentication starts at CP_IRQ or at the assertion of READY bit from Repeater.
Till then repeater will be authenticating with its downstream devices. So authenticated device count, depth and ksv_list readable from repeaters are valid only after assertion of READY/CP_IRQ.
This patch makes sure that READY is polled before reading any topology information.
--- drivers/gpu/drm/i915/intel_hdcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_hdcp.c +6 -6
@@ -150,6 +150,12 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port, dev_priv = intel_dig_port->base.base.dev->dev_private; + ret =intel_hdcp_poll_ksv_fifo (intel_dig_port, shim); +if (ret) { +DRM_ERROR ("KSV list failed to become ready (%d)\n" , ret); +return ret; + } + ret = shim->read_bstatus (intel_dig_port, bstatus);if (ret)return ret;
@@ -161,12 +167,6 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,return 0 ; } - ret =intel_hdcp_poll_ksv_fifo (intel_dig_port, shim); -if (ret) { -DRM_ERROR ("KSV list failed to become ready (%d)\n" , ret); -return ret; - } - ksv_fifo =kzalloc (num_downstream *DRM_HDCP_KSV_LEN ,GFP_KERNEL );if (!ksv_fifo)return -ENOMEM ;
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915: Check for downstream topology errors
In reply to Ramalingam CHDCP compliant Repeaters can support max of 127 devices and max depth of 7 for downstream topology.
If these max limits are exceeded, repeater will set the topology error flags MAX_CASCADE_EXCEEDED and/or MAX_DEVS_EXCEEDED in Bstatus followed by asserting READY/CP_IRQ for HDCP transmitter.
This patch check for these error flags as soon as READY bit is asserted.
--- drivers/gpu/drm/i915/intel_hdcp.c | 6 ++++++ include/drm/drm_hdcp.h | 2 ++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/i915/intel_hdcp.c +6 -0
@@ -160,6 +160,12 @@ int intel_hdcp_auth_downstream(struct intel_digital_port *intel_dig_port,if (ret)return ret; +if (DRM_HDCP_MAX_DEVICE_EXCEEDED (bstatus[0 ]) || +DRM_HDCP_MAX_CASCADE_EXCEEDED (bstatus[1 ])) { +DRM_ERROR ("Max Topology Limit Exceeded\n" ); +return -EPERM ; + } +/* If there are no downstream devices, we're all done. */ num_downstream =DRM_HDCP_NUM_DOWNSTREAM (bstatus[0 ]);if (num_downstream ==0 ) {
include/drm/drm_hdcp.h +2 -0
@@ -20,6 +20,8 @@#define DRM_HDCP_V_PRIME_PART_LEN 4#define DRM_HDCP_V_PRIME_NUM_PARTS 5#define DRM_HDCP_NUM_DOWNSTREAM (x) (x & 0x3f) +#define DRM_HDCP_MAX_CASCADE_EXCEEDED (x) (x & BIT(3)) +#define DRM_HDCP_MAX_DEVICE_EXCEEDED (x) (x & BIT(7))/* Slave address for the HDCP registers in the receiver */ #define DRM_HDCP_DDC_ADDR 0x3A
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for HDCP1.4 implementation enhancement
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: HDCP1.4 implementation enhancement
URL : https://patchwork.freedesktop.org/series/36671/
State : success
== Summary ==
Series 36671v1 HDCP1.4 implementation enhancement
https://patchwork.freedesktop.org/api/1.0/series/36671/revisions/1/mbox/
Test debugfs_test:
Subgroup read_all_entries:
pass -> DMESG-FAIL (fi-elk-e7500) fdo#103989 +1
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail -> PASS (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
fail -> PASS (fi-skl-6700k2) fdo#103191fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:420s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:371s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:488s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:280s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:482s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:485s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:465s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s fi-elk-e7500 total:224 pass:168 dwarn:9 dfail:1 fail:0 skip:45 fi-gdg-551 total:288 pass:180 dwarn:0 dfail:0 fail:0 skip:108 time:277s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:513s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:393s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:400s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:409s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:450s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:410s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:460s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:502s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:501s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:587s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:429s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:509s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:525s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:490s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:488s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:431s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:522s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:400s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:570s fi-glk-dsi total:156 pass:142 dwarn:0 dfail:0 fail:0 skip:13
cb7287f74687f033ae8e50937b8294c16317170a drm-tip: 2018y-01m-18d-10h-31m-34s UTC integration manifest 602af39163af drm/i915: Check for downstream topology errors0d2b0894ffa2 drm/i915: Start repeater auth on READY/CP_IRQf5d667f9fe35 drm/i915: II stage HDCP auth for repeater only263fc472af0f drm/i915: Extending HDCP for HSW, BDW and BXT+
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7706/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for HDCP1.4 implementation enhancement
In reply to Ramalingam C== Series Details ==
== Series Details ==
Series: HDCP1.4 implementation enhancement
URL : https://patchwork.freedesktop.org/series/36671/
State : success
== Summary ==
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> DMESG-FAIL (shard-hsw) fdo#104218 +1
Test kms_cursor_crc:
Subgroup cursor-256x256-suspend:
pass -> SKIP (shard-snb) fdo#103375 +1
Subgroup cursor-128x128-suspend:
skip -> PASS (shard-hsw) fdo#103540
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-shrfb-pgflip-blt:
skip -> PASS (shard-snb) fdo#101623 +1
Test kms_atomic_interruptible:
Subgroup legacy-setmode:
skip -> PASS (shard-snb)
Test pm_rc6_residency:
Subgroup rc6-accuracy:
skip -> PASS (shard-snb)
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2680 pass:1674 dwarn:1 dfail:1 fail:11 skip:991 time:14906s shard-snb total:2675 pass:1287 dwarn:1 dfail:0 fail:10 skip:1377 time:7570s Blacklisted hosts: shard-apl total:2753 pass:1716 dwarn:1 dfail:0 fail:21 skip:1015 time:13811s shard-kbl total:2735 pass:1811 dwarn:10 dfail:0 fail:23 skip:890 time:10516s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7706/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Ramalingam C
This series extends the HDCP1.4 support for few more intel platforms. And also addresses few gaps found in the base HDCP1.4 implementation w.r.t HDCP1.4 specification.
Thanks for the patches, Ram. I've applied them with a couple of checkpatch fixes around alignment + an extra line.
Sean
Quoted 14 lines
Ramalingam C (4):
drm/i915: Extending HDCP for HSW, BDW and BXT+
drm/i915: II stage HDCP auth for repeater only
drm/i915: Start repeater auth on READY/CP_IRQ
drm/i915: Check for downstream topology errorsdrivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_dp.c | 2 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdcp.c | 65 ++++++++++++++++++++++++++++++--------- drivers/gpu/drm/i915/intel_hdmi.c | 3 +- include/drm/drm_hdcp.h | 2 ++ 6 files changed, 57 insertions(+), 17 deletions(-)
Quoted 3 lines
--
2.7.4
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx