drm/i915: Add support for HDCP 1.4 over MST connectors
Subsystems (5)
v5 cover drm/i915: Add support for HDCP 1.4 over MST connectors
From: Sean Paul <[email protected]>
Hello friends,
Another version of HDCP over MST rebased on -tip (pls stop refactoring stuff!).
I've also added a couple of fixes to fix bugs found when I did some testing I on a non-CrOS laptop.
PTAL,
Sean
Sean Paul (16):
drm/i915: Fix sha_text population code
drm/i915: Clear the repeater bit on HDCP disable drm/i915: WARN if HDCP signalling is enabled upon disable drm/i915: Intercept Aksv writes in the aux hooks drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP
signalling
drm/i915: Factor out hdcp->value assignments
drm/i915: Protect workers against disappearing connectors drm/i915: Don't fully disable HDCP on a port if multiple pipes are
using it
drm/i915: Support DP MST in enc_to_dig_port() function drm/i915: Use ddi_update_pipe in intel_dp_mst
drm/i915: Factor out HDCP shim functions from dp for use by dp_mst drm/i915: Plumb port through hdcp init
drm/i915: Add connector to hdcp_shim->check_link() drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband
message
drm/i915: Print HDCP version info for all connectors drm/i915: Add HDCP 1.4 support for MST connectors
drivers/gpu/drm/drm_dp_mst_topology.c | 117 +++ drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 27 +- drivers/gpu/drm/i915/display/intel_ddi.h | 2 + .../drm/i915/display/intel_display_debugfs.c | 21 +- .../drm/i915/display/intel_display_types.h | 30 +- drivers/gpu/drm/i915/display/intel_dp.c | 624 +-------------- drivers/gpu/drm/i915/display/intel_dp.h | 7 + drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 712 ++++++++++++++++++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 15 + drivers/gpu/drm/i915/display/intel_hdcp.c | 217 ++++-- drivers/gpu/drm/i915/display/intel_hdcp.h | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 25 +- include/drm/drm_dp_helper.h | 3 + include/drm/drm_dp_mst_helper.h | 44 ++ include/drm/drm_hdcp.h | 3 + 16 files changed, 1155 insertions(+), 695 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_dp_hdcp.c
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v5 1/16 drm/i915: Fix sha_text population code
From: Sean Paul <[email protected]>
This patch fixes a few bugs:
1- We weren't taking into account sha_leftovers when adding multiple
ksvs to sha_text. As such, we were or'ing the end of ksv[j - 1] with the beginning of ksv[j]
2- In the sha_leftovers == 2 and sha_leftovers == 3 case, bstatus was
being placed on the wrong half of sha_text, overlapping the leftover ksv value
3- In the sha_leftovers == 2 case, we need to manually terminate the
byte stream with 0x80 since the hardware doesn't have enough room to add it after writing M0
The upside is that all of the HDCP supported HDMI repeaters I could find on Amazon just strip HDCP anyways, so it turns out to be _really_ hard to hit any of these cases without an MST hub, which is not (yet) supported. Oh, and the sha_leftovers == 1 case works perfectly!
Changes in v2:
-None
Changes in v3:
-None
Changes in v4:
-Rebased on intel_de_write changes
Changes in v5:
-None
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 26 +++++++++++++++++------ include/drm/drm_hdcp.h | 3 +++ 2 files changed, 23 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +20 -6
@@ -338,8 +338,10 @@ int intel_hdcp_validate_v_prime(struct intel_connector *connector,/* Fill up the empty slots in sha_text and write it out */ sha_empty =sizeof (sha_text) - sha_leftovers; -for (j =0 ; j < sha_empty; j++) - sha_text |= ksv[j] << ((sizeof (sha_text) - j -1 ) *8 ); +for (j =0 ; j < sha_empty; j++) { +u8 off = ((sizeof (sha_text) - j -1 - sha_leftovers) *8 ); + sha_text |= ksv[j] << off; + } ret =intel_write_sha_text (dev_priv, sha_text);if (ret <0 )
@@ -437,7 +439,7 @@ int intel_hdcp_validate_v_prime(struct intel_connector *connector,/* Write 32 bits of text */ intel_de_write (dev_priv,HDCP_REP_CTL , rep_ctl |HDCP_SHA1_TEXT_32 ); - sha_text |= bstatus[0 ] <<24 | bstatus[1 ] <<16 ; + sha_text |= bstatus[0 ] <<8 | bstatus[1 ]; ret =intel_write_sha_text (dev_priv, sha_text);if (ret <0 )return ret;
@@ -452,17 +454,29 @@ int intel_hdcp_validate_v_prime(struct intel_connector *connector,return ret; sha_idx +=sizeof (sha_text); } + +/* +* Terminate the SHA-1 stream by hand. For the other leftover +* cases this is appended by the hardware. +*/ +intel_de_write (dev_priv,HDCP_REP_CTL , + rep_ctl |HDCP_SHA1_TEXT_32 ); + sha_text =DRM_HDCP_SHA1_TERMINATOR <<24 ; + ret =intel_write_sha_text (dev_priv, sha_text); +if (ret <0 ) +return ret; + sha_idx +=sizeof (sha_text); }else if (sha_leftovers ==3 ) { -/* Write 32 bits of text */ +/* Write 32 bits of text (filled from LSB) */ intel_de_write (dev_priv,HDCP_REP_CTL , rep_ctl |HDCP_SHA1_TEXT_32 ); - sha_text |= bstatus[0 ] <<24 ; + sha_text |= bstatus[0 ]; ret =intel_write_sha_text (dev_priv, sha_text);if (ret <0 )return ret; sha_idx +=sizeof (sha_text); -/* Write 8 bits of text, 24 bits of M0 */ +/* Write 8 bits of text (filled from LSB), 24 bits of M0 */ intel_de_write (dev_priv,HDCP_REP_CTL , rep_ctl |HDCP_SHA1_TEXT_8 ); ret =intel_write_sha_text (dev_priv, bstatus[1 ]);
include/drm/drm_hdcp.h +3 -0
@@ -29,6 +29,9 @@/* Slave address for the HDCP registers in the receiver */ #define DRM_HDCP_DDC_ADDR 0x3A +/* Value to use at the end of the SHA-1 bytestream used for repeaters */ +#define DRM_HDCP_SHA1_TERMINATOR 0x80 +/* HDCP register offsets for HDMI/DVI devices */ #define DRM_HDCP_DDC_BKSV 0x00#define DRM_HDCP_DDC_RI_PRIME 0x08
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Sasha Levin
maintainerRe: [PATCH v5 01/16] drm/i915: Fix sha_text population code
Hi
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag fixing commit: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation").
The bot has tested the following trees: v5.5.8, v5.4.24, v4.19.108.
v5.5.8: Failed to apply! Possible dependencies:
65833c463886 ("drm/i915/hdcp: conversion to struct drm_device based logging macros.")
667944ad77f1 ("drm/i915/hdcp: use intel_de_*() functions for register access")v5.4.24: Failed to apply! Possible dependencies:
65833c463886 ("drm/i915/hdcp: conversion to struct drm_device based logging macros.")
667944ad77f1 ("drm/i915/hdcp: use intel_de_*() functions for register access")
692059318c0f ("drm/i915/hdcp: Enable HDCP 1.4 and 2.2 on Gen12+")v4.19.108: Failed to apply! Possible dependencies:
04707f971636 ("drm/i915: Initialize HDCP2.2")
09d56393c1d8 ("drm/i915: hdcp1.4 CP_IRQ handling and SW encryption tracking")
2f80d7bd8d93 ("drm/i915: drop all drmP.h includes")
33b7f3ee6e00 ("drm/i915: Add CRTC output format YCBCR 4:2:0")
340a44bef234 ("drm/i915/icl: program MG_DP_MODE")
342ac601df64 ("drm/i915: hdcp_check_link only on CP_IRQ")
47658556da85 ("drm/i915/dp: Do not grab crtc modeset lock in intel_dp_detect()")
667944ad77f1 ("drm/i915/hdcp: use intel_de_*() functions for register access")
668b6c176c33 ("drm/i915: Add YCBCR 4:2:0/4:4:4 support for LSPCON")
7b610f1fbed2 ("drm/i915/dp: Add DSC params and DSC config to intel_crtc_state")
9055aac76589 ("drm/i915: MEI interface implementation")
9844bc87cb7a ("drm/i915/dp: Fix duplication of DEVICE_SERVICE_IRQ handling")
bdc93fe0eb82 ("drm/i915/debugfs: hdcp capability of a sink")
cbfa8ac835cb ("drm/i915/dp: Kill intel_dp->detect_done flag")
d3dacc70797b ("drm/i915: wrapping all hdcp var into intel_hdcp")
d5acd97f5571 ("drm/i915/dp: Use a local variable for intel_encoder *")
d78aa650670d ("drm: Add drm/drm_util.h header file")
de25eb7f3075 ("drm/i915: introduce dp_to_i915() helper")
f106d1005ac7 ("drm/i915: Pullout the bksv read and validation")NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
Signature · 6 lines
Thanks Sasha _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/16 drm/i915: Clear the repeater bit on HDCP disable
In reply to Sean PaulFrom: Sean Paul <[email protected]>
On HDCP disable, clear the repeater bit. This ensures if we connect a non-repeater sink after a repeater, the bit is in the state we expect.
Changes in v2:
-Added to the set
Changes in v3:
-None
I had previously agreed that clearing the rep_ctl bits on enable would also be a good idea. However when I committed that idea to code, it didn't look right. So let's rely on enables and disables being paired and everything outside of that will be considered a bug
Changes in v4:
-s/I915_(READ|WRITE)/intel_de_(read|write)/
Changes in v5:
-None
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/display/intel_hdcp.c +6 -0
@@ -797,6 +797,7 @@ static int _intel_hdcp_disable(struct intel_connector *connector)struct intel_hdcp *hdcp = &connector->hdcp;enum port port = intel_dig_port->base.port;enum transcoder cpu_transcoder = hdcp->cpu_transcoder; +u32 repeater_ctl;int ret; drm_dbg_kms(&dev_priv->drm, "[%s:%d] HDCP is being disabled...\n",
@@ -812,6 +813,11 @@ static int _intel_hdcp_disable(struct intel_connector *connector)return -ETIMEDOUT ; } + repeater_ctl =intel_hdcp_get_repeater_ctl (dev_priv, cpu_transcoder, + port); +intel_de_write (dev_priv,HDCP_REP_CTL , +intel_de_read (dev_priv,HDCP_REP_CTL ) & ~repeater_ctl); + ret = hdcp->shim->toggle_signalling (intel_dig_port, false);if (ret) {drm_err (&dev_priv->drm,"Failed to disable HDCP signalling\n" );
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Sasha Levin
maintainerRe: [PATCH v5 02/16] drm/i915: Clear the repeater bit on HDCP disable
Hi
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag fixing commit: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation").
The bot has tested the following trees: v5.5.8, v5.4.24, v4.19.108.
v5.5.8: Build failed! Errors:
drivers/gpu/drm/i915/display/intel_hdcp.c:780:2: error: implicit declaration of function ‘intel_de_write’; did you mean ‘intel_sbi_write’? [-Werror=implicit-function-declaration] drivers/gpu/drm/i915/display/intel_hdcp.c:781:10: error: implicit declaration of function ‘intel_de_read’; did you mean ‘intel_sbi_read’? [-Werror=implicit-function-declaration]
v5.4.24: Failed to apply! Possible dependencies:
692059318c0f ("drm/i915/hdcp: Enable HDCP 1.4 and 2.2 on Gen12+")v4.19.108: Failed to apply! Possible dependencies:
0e39037b3165 ("drm/i915: Cache the error string")
16e4dd0342a8 ("drm/i915: Markup paired operations on wakerefs")
39e2f501c1b4 ("drm/i915: Split struct intel_context definition to its own header")
408bd9178666 ("drm/i915: extract intel_hdcp.h from intel_drv.h")
52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking")
538ef96b9dae ("drm/i915/gem: Track the rpm wakerefs")
692059318c0f ("drm/i915/hdcp: Enable HDCP 1.4 and 2.2 on Gen12+")
6b048706f407 ("drm/i915: Forcibly flush unwanted requests in drop-caches")
87f1ef225242 ("drm/i915: Record the sseu configuration per-context & engine")
95fd94a645f7 ("drm/i915: avoid rebuilding i915_gpu_error.o on version string updates")
c0a6aa7ec2c3 ("drm/i915: Show actual alongside requested frequency in debugfs/i915_rps_boost_info")
c2400ec3b6d1 ("drm/i915: add Makefile magic for testing headers are self-contained")
c44301fce614 ("drm/i915: Allow control of PSR at runtime through debugfs, v6")
e0516e83640e ("drm/i915: Move sandybride pcode access to intel_sideband.c")
e1ef734eaec5 ("drm/i915: make intel_frontbuffer.h self-contained")
e6154e4cb8b0 ("drm/i915: Skip the ERR_PTR error state")
eb8d0f5af4ec ("drm/i915: Remove GPU reset dependence on struct_mutex")
fb6f0b64e455 ("drm/i915: Prevent machine hang from Broxton's vtd w/a and error capture")NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
Signature · 2 lines
Thanks Sasha
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 3/16 drm/i915: WARN if HDCP signalling is enabled upon disable
In reply to Sean PaulFrom: Sean Paul <[email protected]>
HDCP signalling should not be left on, WARN if it is
Changes in v2:
-Added to the set in lieu of just clearing the bit Changes in v3:
-None
Changes in v4:
-None
Changes in v5:
-Change WARN_ON to drm_WARN_ON
--- drivers/gpu/drm/i915/display/intel_ddi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/display/intel_ddi.c +2 -0
@@ -1593,6 +1593,8 @@ void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state val =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (cpu_transcoder)); val &= ~TRANS_DDI_FUNC_ENABLE ; +drm_WARN_ON (crtc->base.dev, val &TRANS_DDI_HDCP_SIGNALLING ); +if (INTEL_GEN (dev_priv) >=12 ) {if (!intel_dp_mst_is_master_trans (crtc_state)) { val &= ~(TGL_TRANS_DDI_PORT_MASK |
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 4/16 drm/i915: Intercept Aksv writes in the aux hooks
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Instead of hand rolling the transfer ourselves in the hdcp hook, inspect aux messages and add the aksv flag in the aux transfer hook.
IIRC, this was the original implementation and folks wanted this hack to be isolated to the hdcp code, which makes sense.
However in testing an LG monitor on my desk, I noticed it was passing back a DEFER reply. This wasn't handled in our hand-rolled code and HDCP auth was failing as a result. Instead of copy/pasting all of the retry logic and delays from drm dp helpers, let's just use the helpers and hide the aksv select as best as we can.
Changes in v2:
-Remove 'generate' in intel_dp_aux_generate_xfer_flags, make arg const (Ville) -Bundle Aksv if statement together (Ville)
-Rename 'txbuf' to 'aksv' (Ville)
Changes in v3:
-None
Changes in v4:
-None
Changes in v5:
-None
--- drivers/gpu/drm/i915/display/intel_dp.c | 62 ++++++++++++------------- 1 file changed, 29 insertions(+), 33 deletions(-)
drivers/gpu/drm/i915/display/intel_dp.c +29 -33
@@ -1534,12 +1534,27 @@ intel_dp_aux_header(u8 txbuf[HEADER_SIZE], txbuf[3 ] = msg->size -1 ; } +static u32 intel_dp_aux_xfer_flags (const struct drm_dp_aux_msg *msg) +{ +/* +* If we're trying to send the HDCP Aksv, we need to set a the Aksv +* select bit to inform the hardware to send the Aksv after our header +* since we can't access that data from software. +*/ +if ((msg->request & ~DP_AUX_I2C_MOT ) ==DP_AUX_NATIVE_WRITE && + msg->address ==DP_AUX_HDCP_AKSV ) +return DP_AUX_CH_CTL_AUX_AKSV_SELECT ; + +return 0 ; +} +static ssize_t intel_dp_aux_transfer (struct drm_dp_aux *aux,struct drm_dp_aux_msg *msg) { struct intel_dp *intel_dp = container_of(aux, struct intel_dp, aux);u8 txbuf[20 ], rxbuf[20 ];size_t txsize, rxsize; +u32 flags =intel_dp_aux_xfer_flags (msg);int ret;intel_dp_aux_header (txbuf, msg);
@@ -1560,7 +1575,7 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)memcpy (txbuf +HEADER_SIZE , msg->buffer, msg->size); ret =intel_dp_aux_xfer (intel_dp, txbuf, txsize, - rxbuf, rxsize,0 ); + rxbuf, rxsize, flags);if (ret >0 ) { msg->reply = rxbuf[0 ] >>4 ;
@@ -1583,7 +1598,7 @@ intel_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)return -E2BIG ; ret =intel_dp_aux_xfer (intel_dp, txbuf, txsize, - rxbuf, rxsize,0 ); + rxbuf, rxsize, flags);if (ret >0 ) { msg->reply = rxbuf[0 ] >>4 ;/*
@@ -5959,17 +5974,9 @@ staticint intel_dp_hdcp_write_an_aksv (struct intel_digital_port *intel_dig_port,u8 *an) { -struct intel_dp *intel_dp =enc_to_intel_dp (to_intel_encoder (&intel_dig_port->base.base)); -static const struct drm_dp_aux_msg msg = { - .request =DP_AUX_NATIVE_WRITE , - .address =DP_AUX_HDCP_AKSV , - .size =DRM_HDCP_KSV_LEN , - }; -u8 txbuf[HEADER_SIZE +DRM_HDCP_KSV_LEN ] = {}, rxbuf[2 ], reply =0 ; +u8 aksv[DRM_HDCP_KSV_LEN ] = {};ssize_t dpcd_ret; -int ret; -/* Output An first, that's easy */ dpcd_ret =drm_dp_dpcd_write (&intel_dig_port->dp.aux,DP_AUX_HDCP_AN , an,DRM_HDCP_AN_LEN );if (dpcd_ret !=DRM_HDCP_AN_LEN ) {
@@ -5979,29 +5986,18 @@ int intel_dp_hdcp_write_an_aksv(struct intel_digital_port *intel_dig_port, }/* -* Since Aksv is Oh-So-Secret, we can't access it in software. So in -* order to get it on the wire, we need to create the AUX header as if -* we were writing the data, and then tickle the hardware to output the -* data once the header is sent out. +* Since Aksv is Oh-So-Secret, we can't access it in software. So we +* send an empty buffer of the correct length through the DP helpers. On +* the other side, in the transfer hook, we'll generate a flag based on +* the destination address which will tickle the hardware to output the +* Aksv on our behalf after the header is sent. */ -intel_dp_aux_header (txbuf, &msg); - - ret =intel_dp_aux_xfer (intel_dp, txbuf,HEADER_SIZE + msg.size, - rxbuf,sizeof (rxbuf), -DP_AUX_CH_CTL_AUX_AKSV_SELECT ); -if (ret <0 ) { -DRM_DEBUG_KMS ("Write Aksv over DP/AUX failed (%d)\n" , ret); -return ret; - }else if (ret ==0 ) { -DRM_DEBUG_KMS ("Aksv write over DP/AUX was empty\n" ); -return -EIO ; - } - - reply = (rxbuf[0 ] >>4 ) &DP_AUX_NATIVE_REPLY_MASK ; -if (reply !=DP_AUX_NATIVE_REPLY_ACK ) { -DRM_DEBUG_KMS ("Aksv write: no DP_AUX_NATIVE_REPLY_ACK %x\n" , - reply); -return -EIO ; + dpcd_ret =drm_dp_dpcd_write (&intel_dig_port->dp.aux,DP_AUX_HDCP_AKSV , + aksv,DRM_HDCP_KSV_LEN ); +if (dpcd_ret !=DRM_HDCP_KSV_LEN ) { +DRM_DEBUG_KMS ("Failed to write Aksv over DP/AUX (%zd)\n" , + dpcd_ret); +return dpcd_ret >=0 ? -EIO : dpcd_ret; }return 0 ; }
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 5/16 drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP signalling
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Instead of using intel_dig_port's encoder pipe to determine which transcoder to toggle signalling on, use the cpu_transcoder field already stored in intel_hdmi.
This is particularly important for MST.
Changes in v2:
-Added to the set
Changes in v3:
-s/hdcp/hdmi/ in commit msg (Ram)
Changes in v4:
-Rebased on intel_de_(read|write) change
Changes in v5:
-Update hdcp->cpu_transcoder in intel_hdcp_enable so it works with pipe != 0
--- drivers/gpu/drm/i915/display/intel_ddi.c | 13 +++---------- drivers/gpu/drm/i915/display/intel_ddi.h | 2 ++ .../gpu/drm/i915/display/intel_display_types.h | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/display/intel_hdcp.c | 16 +++++++++------- drivers/gpu/drm/i915/display/intel_hdmi.c | 16 +++++++++++----- 6 files changed, 27 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +3 -10
@@ -1614,12 +1614,12 @@ void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state }int intel_ddi_toggle_hdcp_signalling (struct intel_encoder *intel_encoder, +enum transcoder cpu_transcoder,bool enable) {struct drm_device *dev = intel_encoder->base.dev;struct drm_i915_private *dev_priv =to_i915 (dev);intel_wakeref_t wakeref; -enum pipe pipe =0 ;int ret =0 ;u32 tmp;
@@ -1628,19 +1628,12 @@ int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder,if (drm_WARN_ON (dev, !wakeref))return -ENXIO ; -if (drm_WARN_ON (dev, - !intel_encoder->get_hw_state (intel_encoder, &pipe))) { - ret = -EIO ; - goto out; - } - - tmp =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (pipe)); + tmp =intel_de_read (dev_priv,TRANS_DDI_FUNC_CTL (cpu_transcoder));if (enable) tmp |=TRANS_DDI_HDCP_SIGNALLING ;else tmp &= ~TRANS_DDI_HDCP_SIGNALLING ; -intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (pipe), tmp); -out: +intel_de_write (dev_priv,TRANS_DDI_FUNC_CTL (cpu_transcoder), tmp);intel_display_power_put (dev_priv, intel_encoder->power_domain, wakeref);return ret; }
drivers/gpu/drm/i915/display/intel_ddi.h +2 -0
@@ -16,6 +16,7 @@ struct intel_crtc_state;struct intel_dp ;struct intel_dpll_hw_state ;struct intel_encoder ; +enum transcoder ; void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder, const struct intel_crtc_state *old_crtc_state,
@@ -43,6 +44,7 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder);u8 intel_ddi_dp_pre_emphasis_max (struct intel_encoder *encoder,u8 voltage_swing);int intel_ddi_toggle_hdcp_signalling (struct intel_encoder *intel_encoder, +enum transcoder cpu_transcoder,bool enable);void icl_sanitize_encoder_pll_mapping (struct intel_encoder *encoder);
drivers/gpu/drm/i915/display/intel_display_types.h +1 -0
@@ -308,6 +308,7 @@ struct intel_hdcp_shim {/* Enables HDCP signalling on the port */ int (*toggle_signalling)(struct intel_digital_port *intel_dig_port, +enum transcoder cpu_transcoder,bool enable);/* Ensures the link is still protected */
drivers/gpu/drm/i915/display/intel_dp.c +1 -0
@@ -6138,6 +6138,7 @@ int intel_dp_hdcp_read_v_prime_part(struct intel_digital_port *intel_dig_port,static int intel_dp_hdcp_toggle_signalling (struct intel_digital_port *intel_dig_port, +enum transcoder cpu_transcoder,bool enable) {/* Not used for single stream DisplayPort setups */
drivers/gpu/drm/i915/display/intel_hdcp.c +9 -7
@@ -715,7 +715,7 @@ static int intel_hdcp_auth(struct intel_connector *connector)intel_de_write (dev_priv,HDCP_REP_CTL ,intel_hdcp_get_repeater_ctl (dev_priv, cpu_transcoder, port)); - ret = shim->toggle_signalling (intel_dig_port, true); + ret = shim->toggle_signalling (intel_dig_port, cpu_transcoder, true);if (ret)return ret;
@@ -818,7 +818,8 @@ static int _intel_hdcp_disable(struct intel_connector *connector)intel_de_write (dev_priv,HDCP_REP_CTL ,intel_de_read (dev_priv,HDCP_REP_CTL ) & ~repeater_ctl); - ret = hdcp->shim->toggle_signalling (intel_dig_port, false); + ret = hdcp->shim->toggle_signalling (intel_dig_port, cpu_transcoder, + false);if (ret) {drm_err (&dev_priv->drm,"Failed to disable HDCP signalling\n" );return ret;
@@ -1602,7 +1603,8 @@ static int hdcp2_enable_encryption(struct intel_connector *connector)intel_de_read (dev_priv,HDCP2_STATUS (dev_priv, cpu_transcoder, port)) & LINK_ENCRYPTION_STATUS);if (hdcp->shim->toggle_signalling) { - ret = hdcp->shim->toggle_signalling (intel_dig_port, true); + ret = hdcp->shim->toggle_signalling (intel_dig_port, + cpu_transcoder, true);if (ret) { drm_err(&dev_priv->drm, "Failed to enable HDCP signalling. %d\n",
@@ -1652,7 +1654,8 @@ static int hdcp2_disable_encryption(struct intel_connector *connector)drm_dbg_kms (&dev_priv->drm,"Disable Encryption Timedout" );if (hdcp->shim->toggle_signalling) { - ret = hdcp->shim->toggle_signalling (intel_dig_port, false); + ret = hdcp->shim->toggle_signalling (intel_dig_port, + cpu_transcoder, false);if (ret) { drm_err(&dev_priv->drm, "Failed to disable HDCP signalling. %d\n",
@@ -2037,11 +2040,10 @@ int intel_hdcp_enable(struct intel_connector *connector,drm_WARN_ON (&dev_priv->drm, hdcp->value ==DRM_MODE_CONTENT_PROTECTION_ENABLED ); hdcp->content_type = content_type; + hdcp->cpu_transcoder = cpu_transcoder; -if (INTEL_GEN (dev_priv) >=12 ) { - hdcp->cpu_transcoder = cpu_transcoder; +if (INTEL_GEN (dev_priv) >=12 ) hdcp->port_data.fw_tc =intel_get_mei_fw_tc (cpu_transcoder); - }/* * Considering that HDCP2.2 is more secure than HDCP1.4, If the setup
drivers/gpu/drm/i915/display/intel_hdmi.c +11 -5
@@ -1455,7 +1455,8 @@ int intel_hdmi_hdcp_read_v_prime_part(struct intel_digital_port *intel_dig_port,return ret; } -static int kbl_repositioning_enc_en_signal (struct intel_connector *connector) +static int kbl_repositioning_enc_en_signal (struct intel_connector *connector, +enum transcoder cpu_transcoder) {struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);struct intel_digital_port *intel_dig_port =intel_attached_dig_port (connector);
@@ -1472,12 +1473,14 @@ static int kbl_repositioning_enc_en_signal(struct intel_connector *connector)usleep_range (25 ,50 ); } - ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, false); + ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, + cpu_transcoder, false);if (ret) {DRM_ERROR ("Disable HDCP signalling failed (%d)\n" , ret);return ret; } - ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, true); + ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, + cpu_transcoder, true);if (ret) {DRM_ERROR ("Enable HDCP signalling failed (%d)\n" , ret);return ret;
@@ -1488,6 +1491,7 @@ static int kbl_repositioning_enc_en_signal(struct intel_connector *connector)static int intel_hdmi_hdcp_toggle_signalling (struct intel_digital_port *intel_dig_port, +enum transcoder cpu_transcoder,bool enable) {struct intel_hdmi *hdmi = &intel_dig_port->hdmi;
@@ -1498,7 +1502,8 @@ int intel_hdmi_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port,if (!enable)usleep_range (6 ,60 );/* Bspec says >= 6us */ - ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, enable); + ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, + cpu_transcoder, enable);if (ret) {DRM_ERROR ("%s HDCP signalling failed (%d)\n" , enable ?"Enable" :"Disable" , ret);
@@ -1510,7 +1515,8 @@ int intel_hdmi_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port,* opportunity and enc_en signalling in KABYLAKE. */ if (IS_KABYLAKE (dev_priv) && enable) -return kbl_repositioning_enc_en_signal (connector); +return kbl_repositioning_enc_en_signal (connector, + cpu_transcoder);return 0 ; }
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 6/16 drm/i915: Factor out hdcp->value assignments
In reply to Sean PaulFrom: Sean Paul <[email protected]>
This is a bit of housecleaning for a future patch. Instead of sprinkling hdcp->value assignments and prop_work scheduling everywhere, introduce a function to do it for us.
Changes in v2:
-None
Changes in v3:
-None
Changes in v4:
-Rebased on top of drm_* logging changes
Changes in v5:
-Change WARN_ON to drm_WARN_ON
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 67 ++++++++++++++++------- 1 file changed, 46 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +46 -21
@@ -880,6 +880,21 @@ struct intel_connector *intel_hdcp_to_connector(struct intel_hdcp *hdcp) return container_of(hdcp, struct intel_connector, hdcp); } +static void intel_hdcp_update_value (struct intel_connector *connector, +u64 value,bool update_property) +{ +struct intel_hdcp *hdcp = &connector->hdcp; + +drm_WARN_ON (connector->base.dev, !mutex_is_locked (&hdcp->mutex)); + +if (hdcp->value == value) +return ; + + hdcp->value = value; +if (update_property) +schedule_work (&hdcp->prop_work); +} +/* Implements Part 3 of the HDCP authorization procedure */ static int intel_hdcp_check_link (struct intel_connector *connector) {
@@ -907,15 +922,16 @@ static int intel_hdcp_check_link(struct intel_connector *connector) connector->base.name, connector->base.base.id, intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port))); ret = -ENXIO ; - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , + true); goto out; }if (hdcp->shim->check_link (intel_dig_port)) {if (hdcp->value !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ) { - hdcp->value =DRM_MODE_CONTENT_PROTECTION_ENABLED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_ENABLED , true); } goto out; }
@@ -927,16 +943,18 @@ static int intel_hdcp_check_link(struct intel_connector *connector) ret =_intel_hdcp_disable (connector);if (ret) {drm_err (&dev_priv->drm,"Failed to disable hdcp (%d)\n" , ret); - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , + true); goto out; } ret =_intel_hdcp_enable (connector);if (ret) {drm_err (&dev_priv->drm,"Failed to enable hdcp (%d)\n" , ret); - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , + true); goto out; }
@@ -1771,16 +1789,18 @@ 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 ; - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , + true); goto out; } ret = hdcp->shim->check_2_2_link (intel_dig_port);if (ret ==HDCP_LINK_PROTECTED ) {if (hdcp->value !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ) { - hdcp->value =DRM_MODE_CONTENT_PROTECTION_ENABLED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_ENABLED , + true); } goto out; }
@@ -1793,8 +1813,9 @@ static int intel_hdcp2_check_link(struct intel_connector *connector) "HDCP2.2 Downstream topology change\n"); ret =hdcp2_authenticate_repeater_topology (connector);if (!ret) { - hdcp->value =DRM_MODE_CONTENT_PROTECTION_ENABLED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_ENABLED , + true); goto out; } drm_dbg_kms(&dev_priv->drm,
@@ -1812,8 +1833,8 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)drm_err (&dev_priv->drm,"[%s:%d] Failed to disable hdcp2.2 (%d)\n" , connector->base.name, connector->base.base.id, ret); - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , true); goto out; }
@@ -1823,8 +1844,9 @@ static int intel_hdcp2_check_link(struct intel_connector *connector)"[%s:%d] Failed to enable hdcp2.2 (%d)\n" , connector->base.name, connector->base.base.id, ret); - hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_DESIRED , + true); goto out; }
@@ -2066,8 +2088,9 @@ int intel_hdcp_enable(struct intel_connector *connector,if (!ret) {schedule_delayed_work (&hdcp->check_work, check_link_interval); - hdcp->value =DRM_MODE_CONTENT_PROTECTION_ENABLED ; -schedule_work (&hdcp->prop_work); +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_ENABLED , + true); }mutex_unlock (&hdcp->mutex);
@@ -2085,7 +2108,9 @@ int intel_hdcp_disable(struct intel_connector *connector)mutex_lock (&hdcp->mutex);if (hdcp->value !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ) { - hdcp->value =DRM_MODE_CONTENT_PROTECTION_UNDESIRED ; +intel_hdcp_update_value (connector, +DRM_MODE_CONTENT_PROTECTION_UNDESIRED , + false);if (hdcp->hdcp2_encrypted) ret =_intel_hdcp2_disable (connector);else if (hdcp->hdcp_encrypted)
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 7/16 drm/i915: Protect workers against disappearing connectors
In reply to Sean PaulFrom: Sean Paul <[email protected]>
This patch adds some protection against connectors being destroyed before the HDCP workers are finished.
For check_work, we do a synchronous cancel after the connector is unregistered which will ensure that it is finished before destruction.
In the case of prop_work, we can't do a synchronous wait since it needs to take connection_mutex which could cause deadlock. Instead, we'll take a reference on the connector when scheduling prop_work and give it up once we're done.
Changes in v2:
-Added to the set
Changes in v3:
-Change the WARN_ON condition in intel_hdcp_cleanup to allow for
initializing connectors as well
Changes in v4:
-None
Changes in v5:
-Change WARN_ON to drm_WARN_ON
--- drivers/gpu/drm/i915/display/intel_hdcp.c | 44 ++++++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +39 -5
@@ -891,8 +891,10 @@ static void intel_hdcp_update_value(struct intel_connector *connector,return ; hdcp->value = value; -if (update_property) +if (update_property) { +drm_connector_get (&connector->base);schedule_work (&hdcp->prop_work); + } }/* Implements Part 3 of the HDCP authorization procedure */
@@ -984,6 +986,8 @@ static void intel_hdcp_prop_work(struct work_struct *work)mutex_unlock (&hdcp->mutex);drm_modeset_unlock (&dev_priv->drm.mode_config.connection_mutex); + +drm_connector_put (&connector->base); }bool is_hdcp_supported (struct drm_i915_private *dev_priv,enum port port)
@@ -1862,6 +1866,9 @@ static void intel_hdcp_check_work(struct work_struct *work) check_work);struct intel_connector *connector =intel_hdcp_to_connector (hdcp); +if (drm_connector_is_unregistered (&connector->base)) +return ; +if (!intel_hdcp2_check_link (connector))schedule_delayed_work (&hdcp->check_work,DRM_HDCP2_CHECK_PERIOD_MS );
@@ -2178,12 +2185,39 @@ void intel_hdcp_component_fini(struct drm_i915_private *dev_priv)void intel_hdcp_cleanup (struct intel_connector *connector) { -if (!connector->hdcp.shim) +struct intel_hdcp *hdcp = &connector->hdcp; + +if (!hdcp->shim)return ; -mutex_lock (&connector->hdcp.mutex); -kfree (connector->hdcp.port_data.streams); -mutex_unlock (&connector->hdcp.mutex); +/* +* If the connector is registered, it's possible userspace could kick +* off another HDCP enable, which would re-spawn the workers. +*/ +drm_WARN_ON (connector->base.dev, + connector->base.registration_state ==DRM_CONNECTOR_REGISTERED ); + +/* +* Now that the connector is not registered, check_work won't be run, +* but cancel any outstanding instances of it +*/ +cancel_delayed_work_sync (&hdcp->check_work); + +/* +* We don't cancel prop_work in the same way as check_work since it +* requires connection_mutex which could be held while calling this +* function. Instead, we rely on the connector references grabbed before +* scheduling prop_work to ensure the connector is alive when prop_work +* is run. So if we're in the destroy path (which is where this +* function should be called), we're "guaranteed" that prop_work is not +* active (tl;dr This Should Never Happen). +*/ +drm_WARN_ON (connector->base.dev,work_pending (&hdcp->prop_work)); + +mutex_lock (&hdcp->mutex); +kfree (hdcp->port_data.streams); + hdcp->shim =NULL ; +mutex_unlock (&hdcp->mutex); } void intel_hdcp_atomic_check(struct drm_connector *connector,
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 8/16 drm/i915: Don't fully disable HDCP on a port if multiple pipes are using it
In reply to Sean PaulFrom: Sean Paul <[email protected]>
This patch is required for HDCP over MST. If a port is being used for multiple HDCP streams, we don't want to fully disable HDCP on a port if one of them is disabled. Instead, we just disable the HDCP signalling on that particular pipe and exit early. The last pipe to disable HDCP will also bring down HDCP on the port.
In order to achieve this, we need to keep a refcount in intel_digital_port and protect it using a new hdcp_mutex.
Changes in v2:
-Move the toggle_signalling call into _intel_hdcp_disable so it's called from check_work Changes in v3:
-None
Changes in v4:
-None
Changes in v5:
-Change WARN_ON to drm_WARN_ON
--- drivers/gpu/drm/i915/display/intel_ddi.c | 3 ++ .../drm/i915/display/intel_display_types.h | 5 ++ drivers/gpu/drm/i915/display/intel_dp.c | 2 + drivers/gpu/drm/i915/display/intel_hdcp.c | 53 +++++++++++++++---- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 + 5 files changed, 56 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +3 -0
@@ -4452,6 +4452,9 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)drm_encoder_init (&dev_priv->drm, &encoder->base, &intel_ddi_funcs,DRM_MODE_ENCODER_TMDS ,"DDI %c" ,port_name (port)); +mutex_init (&intel_dig_port->hdcp_mutex); + intel_dig_port->num_hdcp_streams =0 ; + encoder->hotplug = intel_ddi_hotplug; encoder->compute_output_type = intel_ddi_compute_output_type; encoder->compute_config = intel_ddi_compute_config;
drivers/gpu/drm/i915/display/intel_display_types.h +5 -0
@@ -1388,6 +1388,11 @@ struct intel_digital_port {enum phy_fia tc_phy_fia;u8 tc_phy_fia_idx; +/* protects num_hdcp_streams reference count */ +struct mutex hdcp_mutex; +/* the number of pipes using HDCP signalling out of this port */ +unsigned int num_hdcp_streams; + void (*write_infoframe)(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, unsigned int type,
drivers/gpu/drm/i915/display/intel_dp.c +2 -0
@@ -7800,6 +7800,8 @@ bool intel_dp_init(struct drm_i915_private *dev_priv, intel_encoder = &intel_dig_port->base; encoder = &intel_encoder->base; +mutex_init (&intel_dig_port->hdcp_mutex); +if (drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_dp_enc_funcs,DRM_MODE_ENCODER_TMDS ,"DP %c" ,port_name (port)))
drivers/gpu/drm/i915/display/intel_hdcp.c +44 -9
115 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_hdmi.c +2 -0
@@ -3259,6 +3259,8 @@ void intel_hdmi_init(struct drm_i915_private *dev_priv, intel_encoder = &intel_dig_port->base; +mutex_init (&intel_dig_port->hdcp_mutex); +drm_encoder_init (&dev_priv->drm, &intel_encoder->base, &intel_hdmi_enc_funcs,DRM_MODE_ENCODER_TMDS ,"HDMI %c" ,port_name (port));
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 9/16 drm/i915: Support DP MST in enc_to_dig_port() function
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Although DP_MST fake encoders are not subclassed from digital ports, they are associated with them. Support these encoders.
Changes in v2:
-None
Changes in v3:
-None
Changes in v4:
-None
Changes in v5:
-None
--- .../drm/i915/display/intel_display_types.h | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/display/intel_display_types.h +14 -7
@@ -1502,6 +1502,18 @@ static inline bool intel_encoder_is_dig_port(struct intel_encoder *encoder) } } +static inline bool intel_encoder_is_mst (struct intel_encoder *encoder) +{ +return encoder->type ==INTEL_OUTPUT_DP_MST ; +} + +static inline struct intel_dp_mst_encoder * +enc_to_mst (struct intel_encoder *encoder) +{ + return container_of(&encoder->base, struct intel_dp_mst_encoder, + base.base); +} +static inline struct intel_digital_port *enc_to_dig_port (struct intel_encoder *encoder) {
@@ -1510,6 +1522,8 @@ enc_to_dig_port(struct intel_encoder *encoder)if (intel_encoder_is_dig_port (intel_encoder)) return container_of(&encoder->base, struct intel_digital_port, base.base); +else if (intel_encoder_is_mst (intel_encoder)) +return enc_to_mst (encoder)->primary;else return NULL ; }
@@ -1520,13 +1534,6 @@ intel_attached_dig_port(struct intel_connector *connector)return enc_to_dig_port (intel_attached_encoder (connector)); } -static inline struct intel_dp_mst_encoder * -enc_to_mst (struct intel_encoder *encoder) -{ - return container_of(&encoder->base, struct intel_dp_mst_encoder, - base.base); -} -static inline struct intel_dp *enc_to_intel_dp (struct intel_encoder *encoder) {return &enc_to_dig_port (encoder)->dp;
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v5 10/16 drm/i915: Use ddi_update_pipe in intel_dp_mst
In reply to Sean PaulFrom: Sean Paul <[email protected]>
In order to act upon content_protection property changes, we'll need to implement the .update_pipe() hook. We can re-use intel_ddi_update_pipe for this
Changes in v2:
-None
Changes in v3:
-None
Changes in v4:
-None
Changes in v5:
-None
--- drivers/gpu/drm/i915/display/intel_ddi.c | 9 +++++---- drivers/gpu/drm/i915/display/intel_dp.h | 4 ++++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 + 3 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +5 -4
@@ -3695,12 +3695,13 @@ static void intel_ddi_update_pipe_dp(struct intel_encoder *encoder,intel_panel_update_backlight (encoder, crtc_state, conn_state); } -static void intel_ddi_update_pipe (struct intel_encoder *encoder, -const struct intel_crtc_state *crtc_state, -const struct drm_connector_state *conn_state) +void intel_ddi_update_pipe (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state) { -if (!intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI )) +if (!intel_crtc_has_type (crtc_state,INTEL_OUTPUT_HDMI ) && + !intel_encoder_is_mst (encoder))intel_ddi_update_pipe_dp (encoder, crtc_state, conn_state);intel_hdcp_update_pipe (encoder, crtc_state, conn_state);
drivers/gpu/drm/i915/display/intel_dp.h +4 -0
@@ -123,4 +123,8 @@ static inline unsigned int intel_dp_unused_lane_mask(int lane_count)u32 intel_dp_mode_to_fec_clock (u32 mode_clock); +void intel_ddi_update_pipe (struct intel_encoder *encoder, +const struct intel_crtc_state *crtc_state, +const struct drm_connector_state *conn_state); +#endif /* __INTEL_DP_H__ */
drivers/gpu/drm/i915/display/intel_dp_mst.c +1 -0
@@ -787,6 +787,7 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum intel_encoder->compute_config = intel_dp_mst_compute_config; intel_encoder->disable = intel_mst_disable_dp; intel_encoder->post_disable = intel_mst_post_disable_dp; + intel_encoder->update_pipe = intel_ddi_update_pipe; intel_encoder->pre_pll_enable = intel_mst_pre_pll_enable_dp; intel_encoder->pre_enable = intel_mst_pre_enable_dp; intel_encoder->enable = intel_mst_enable_dp;
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v5 11/16 drm/i915: Factor out HDCP shim functions from dp for use by dp_mst
In reply to Sean PaulFrom: Sean Paul <[email protected]>
These functions are all the same for dp and dp_mst, so move them into a dedicated file for both sst and mst to use.
Changes in v2:
-None
Changes in v3:
-Created intel_dp_hdcp.c for the shared functions to live (Ville) Changes in v4:
-Rebased on new drm logging change
Changes in v5:
-None
--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_dp.c | 585 +----------------- drivers/gpu/drm/i915/display/intel_dp.h | 3 + drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 607 +++++++++++++++++++ 4 files changed, 615 insertions(+), 581 deletions(-) create mode 100644 drivers/gpu/drm/i915/display/intel_dp_hdcp.c
drivers/gpu/drm/i915/Makefile +1 -0
@@ -225,6 +225,7 @@ i915-y += \ display/intel_ddi.o \ display/intel_dp.o \ display/intel_dp_aux_backlight.o \ + display/intel_dp_hdcp.o \ display/intel_dp_link_training.o \ display/intel_dp_mst.o \ display/intel_dsi.o \
drivers/gpu/drm/i915/display/intel_dp.c +4 -581
603 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_dp.h +3 -0
@@ -127,4 +127,7 @@ void intel_ddi_update_pipe(struct intel_encoder *encoder,const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state); +int intel_dp_init_hdcp (struct intel_digital_port *intel_dig_port, +struct intel_connector *intel_connector); +#endif /* __INTEL_DP_H__ */
drivers/gpu/drm/i915/display/intel_dp_hdcp.c new file +607 -0
607 lines not on this page · raw message
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 12/16 drm/i915: Plumb port through hdcp init
In reply to Sean PaulFrom: Sean Paul <[email protected]>
This patch plumbs port through hdcp init instead of relying on intel_attached_encoder() to return a non-NULL encoder which won't work for MST connectors.
Changes in v5:
-Added to the set
--- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdcp.c | 11 ++++++----- drivers/gpu/drm/i915/display/intel_hdcp.h | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_hdcp.c +2 -1
@@ -601,7 +601,8 @@ int intel_dp_init_hdcp(struct intel_digital_port *intel_dig_port,return 0 ;if (!intel_dp_is_edp (intel_dp)) -return intel_hdcp_init (intel_connector, &intel_dp_hdcp_shim); +return intel_hdcp_init (intel_connector, port, + &intel_dp_hdcp_shim);return 0 ; }
drivers/gpu/drm/i915/display/intel_hdcp.c +6 -5
@@ -1959,6 +1959,7 @@ enum mei_fw_tc intel_get_mei_fw_tc(enum transcoder cpu_transcoder) }static inline int initialize_hdcp_port_data (struct intel_connector *connector, +enum port port,const struct intel_hdcp_shim *shim) {struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);
@@ -1966,8 +1967,7 @@ static inline int initialize_hdcp_port_data(struct intel_connector *connector,struct hdcp_port_data *data = &hdcp->port_data;if (INTEL_GEN (dev_priv) <12 ) - data->fw_ddi = -intel_get_mei_fw_ddi_index (intel_attached_encoder (connector)->port); + data->fw_ddi =intel_get_mei_fw_ddi_index (port);else /* * As per ME FW API expectation, for GEN 12+, fw_ddi is filled
@@ -2034,14 +2034,14 @@ void intel_hdcp_component_init(struct drm_i915_private *dev_priv) } } -static void intel_hdcp2_init (struct intel_connector *connector, +static void intel_hdcp2_init (struct intel_connector *connector,enum port port,const struct intel_hdcp_shim *shim) {struct drm_i915_private *i915 =to_i915 (connector->base.dev);struct intel_hdcp *hdcp = &connector->hdcp;int ret; - ret =initialize_hdcp_port_data (connector, shim); + ret =initialize_hdcp_port_data (connector, port, shim);if (ret) {drm_dbg_kms (&i915->drm,"Mei hdcp data init failed\n" );return ;
@@ -2051,6 +2051,7 @@ static void intel_hdcp2_init(struct intel_connector *connector, }int intel_hdcp_init (struct intel_connector *connector, +enum port port,const struct intel_hdcp_shim *shim) {struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);
@@ -2061,7 +2062,7 @@ int intel_hdcp_init(struct intel_connector *connector,return -EINVAL ;if (is_hdcp2_supported (dev_priv)) -intel_hdcp2_init (connector, shim); +intel_hdcp2_init (connector, port, shim); ret = drm_connector_attach_content_protection_property(&connector->base,
drivers/gpu/drm/i915/display/intel_hdcp.h +1 -1
@@ -21,7 +21,7 @@ enum transcoder;void intel_hdcp_atomic_check (struct drm_connector *connector,struct drm_connector_state *old_state,struct drm_connector_state *new_state); -int intel_hdcp_init (struct intel_connector *connector, +int intel_hdcp_init (struct intel_connector *connector,enum port port,const struct intel_hdcp_shim *hdcp_shim);int intel_hdcp_enable (struct intel_connector *connector,enum transcoder cpu_transcoder,u8 content_type);
drivers/gpu/drm/i915/display/intel_hdmi.c +1 -1
@@ -3189,7 +3189,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->attached_connector = intel_connector;if (is_hdcp_supported (dev_priv, port)) { -int ret =intel_hdcp_init (intel_connector, +int ret =intel_hdcp_init (intel_connector, port, &intel_hdmi_hdcp_shim);if (ret)DRM_DEBUG_KMS ("HDCP init failed, skipping.\n" );
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v5 13/16 drm/i915: Add connector to hdcp_shim->check_link()
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Currently we derive the connector from digital port in check_link(). For MST, this isn't sufficient since the digital port passed into the function can have multiple connectors downstream. This patch adds connector to the check_link() arguments so we have it when we need it.
Changes in v4:
-Added to the set
Changes in v5:
-None
--- drivers/gpu/drm/i915/display/intel_display_types.h | 3 ++- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 3 ++- drivers/gpu/drm/i915/display/intel_hdcp.c | 2 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 5 ++--- 4 files changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_display_types.h +2 -1
@@ -312,7 +312,8 @@ struct intel_hdcp_shim { bool enable);/* Ensures the link is still protected */ -bool (*check_link)(struct intel_digital_port *intel_dig_port); +bool (*check_link)(struct intel_digital_port *intel_dig_port, +struct intel_connector *connector);/* Detects panel's hdcp capability. This is optional for HDMI. */ int (*hdcp_capable)(struct intel_digital_port *intel_dig_port,
drivers/gpu/drm/i915/display/intel_dp_hdcp.c +2 -1
@@ -538,7 +538,8 @@ int intel_dp_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port, }static -bool intel_dp_hdcp_check_link (struct intel_digital_port *intel_dig_port) +bool intel_dp_hdcp_check_link (struct intel_digital_port *intel_dig_port, +struct intel_connector *connector) {ssize_t ret;u8 bstatus;
drivers/gpu/drm/i915/display/intel_hdcp.c +1 -1
@@ -956,7 +956,7 @@ static int intel_hdcp_check_link(struct intel_connector *connector) goto out; } -if (hdcp->shim->check_link (intel_dig_port)) { +if (hdcp->shim->check_link (intel_dig_port, connector)) {if (hdcp->value !=DRM_MODE_CONTENT_PROTECTION_UNDESIRED ) {intel_hdcp_update_value (connector,DRM_MODE_CONTENT_PROTECTION_ENABLED , true);
drivers/gpu/drm/i915/display/intel_hdmi.c +2 -3
@@ -1522,11 +1522,10 @@ int intel_hdmi_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port, }static -bool intel_hdmi_hdcp_check_link (struct intel_digital_port *intel_dig_port) +bool intel_hdmi_hdcp_check_link (struct intel_digital_port *intel_dig_port, +struct intel_connector *connector) {struct drm_i915_private *i915 =to_i915 (intel_dig_port->base.base.dev); -struct intel_connector *connector = - intel_dig_port->hdmi.attached_connector;enum port port = intel_dig_port->base.port;enum transcoder cpu_transcoder = connector->hdcp.cpu_transcoder;int ret;
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 14/16 drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Used to query whether an MST stream is encrypted or not.
Changes in v4:
-Added to the set
Changes in v5:
-None
--- drivers/gpu/drm/drm_dp_mst_topology.c | 117 ++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 3 + include/drm/drm_dp_mst_helper.h | 44 ++++++++++ 3 files changed, 164 insertions(+)
drivers/gpu/drm/drm_dp_mst_topology.c +117 -0
@@ -25,6 +25,7 @@#include <linux/i2c.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/random.h> #include <linux/sched.h> #include <linux/seq_file.h>
@@ -418,6 +419,22 @@ drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req,memcpy (&buf[idx], req->u.i2c_write.bytes, req->u.i2c_write.num_bytes); idx += req->u.i2c_write.num_bytes;break ; +case DP_QUERY_STREAM_ENC_STATUS : { +const struct drm_dp_query_stream_enc_status *msg; + + msg = &req->u.enc_status; + buf[idx] = msg->stream_id; + idx++; +memcpy (&buf[idx], msg->client_id,sizeof (msg->client_id)); + idx +=sizeof (msg->client_id); + buf[idx] =0 ; + buf[idx] |= msg->stream_event &GENMASK (1 ,0 ); + buf[idx] |= msg->valid_stream_event ?BIT (2 ) :0 ; + buf[idx] |= (msg->stream_behavior &GENMASK (1 ,0 )) <<3 ; + buf[idx] |= msg->valid_stream_behavior ?BIT (5 ) :0 ; + idx++; + } +break ; } raw->cur_len = idx; }
@@ -930,6 +947,34 @@ static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_msreturn true; } +static bool +drm_dp_sideband_parse_query_stream_enc_status ( +struct drm_dp_sideband_msg_rx *raw, +struct drm_dp_sideband_msg_reply_body *repmsg) +{ +struct drm_dp_query_stream_enc_status_ack_reply *reply; + + reply = &repmsg->u.enc_status; + + reply->stream_id = raw->msg[3 ]; + + reply->reply_signed = raw->msg[2 ] &BIT (0 ); + + reply->hdcp_1x_device_present = raw->msg[2 ] &BIT (3 ); + reply->hdcp_2x_device_present = raw->msg[2 ] &BIT (4 ); + + reply->query_capable_device_present = raw->msg[2 ] &BIT (5 ); + reply->legacy_device_present = raw->msg[2 ] &BIT (6 ); + reply->unauthorizable_device_present = raw->msg[2 ] &BIT (7 ); + + reply->auth_completed = !!(raw->msg[1 ] &BIT (3 )); + reply->encryption_enabled = !!(raw->msg[1 ] &BIT (4 )); + reply->repeater_present = !!(raw->msg[1 ] &BIT (5 )); + reply->state = (raw->msg[1 ] &GENMASK (7 ,6 )) >>6 ; + +return true; +} +static bool drm_dp_sideband_parse_reply (struct drm_dp_sideband_msg_rx *raw,struct drm_dp_sideband_msg_reply_body *msg) {
@@ -964,6 +1009,8 @@ static bool drm_dp_sideband_parse_reply(struct drm_dp_sideband_msg_rx *raw,return drm_dp_sideband_parse_power_updown_phy_ack (raw, msg);case DP_CLEAR_PAYLOAD_ID_TABLE :return true;/* since there's nothing to parse */ +case DP_QUERY_STREAM_ENC_STATUS : +return drm_dp_sideband_parse_query_stream_enc_status (raw, msg);default :DRM_ERROR ("Got unknown reply 0x%02x (%s)\n" , msg->req_type,drm_dp_mst_req_type_str (msg->req_type));
@@ -1115,6 +1162,25 @@ static void build_power_updown_phy(struct drm_dp_sideband_msg_tx *msg, msg->path_msg = true; } +static int +build_query_stream_enc_status (struct drm_dp_sideband_msg_tx *msg,u8 stream_id, +u8 *q_id) +{ +struct drm_dp_sideband_msg_req_body req; + + req.req_type =DP_QUERY_STREAM_ENC_STATUS ; + req.u.enc_status.stream_id = stream_id; +memcpy (req.u.enc_status.client_id, q_id, +sizeof (req.u.enc_status.client_id)); + req.u.enc_status.stream_event =0 ; + req.u.enc_status.valid_stream_event = false; + req.u.enc_status.stream_behavior =0 ; + req.u.enc_status.valid_stream_behavior = false; + +drm_dp_encode_sideband_req (&req, msg); +return 0 ; +} +static int drm_dp_mst_assign_payload_id (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_vcpi *vcpi) {
@@ -3151,6 +3217,57 @@ int drm_dp_send_power_updown_phy(struct drm_dp_mst_topology_mgr *mgr, }EXPORT_SYMBOL (drm_dp_send_power_updown_phy); +int drm_dp_send_query_stream_enc_status (struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_mst_port *port, +struct drm_dp_query_stream_enc_status_ack_reply *status) +{ +struct drm_dp_sideband_msg_tx *txmsg; +u8 nonce[7 ]; +int len, ret; + + txmsg =kzalloc (sizeof (*txmsg),GFP_KERNEL ); +if (!txmsg) +return -ENOMEM ; + + port =drm_dp_mst_topology_get_port_validated (mgr, port); +if (!port) { + ret = -EINVAL ; + goto out_get_port; + } + +get_random_bytes (nonce,sizeof (nonce)); + +/* +* "Source device targets the QUERY_STREAM_ENCRYPTION_STATUS message +* transaction at the MST Branch device directly connected to the +* Source" +*/ + txmsg->dst = mgr->mst_primary; + + len =build_query_stream_enc_status (txmsg, port->vcpi.vcpi, nonce); + +drm_dp_queue_down_tx (mgr, txmsg); + + ret =drm_dp_mst_wait_tx_reply (mgr->mst_primary, txmsg); +if (ret <0 ) { + goto out; + }else if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { +DRM_DEBUG_KMS ("query encryption status nak received\n" ); + ret = -ENXIO ; + goto out; + } + + ret =0 ; +memcpy (status, &txmsg->reply.u.enc_status,sizeof (*status)); + +out: +drm_dp_mst_topology_put_port (port); +out_get_port: +kfree (txmsg); +return ret; +} +EXPORT_SYMBOL (drm_dp_send_query_stream_enc_status); +static int drm_dp_create_payload_step1 (struct drm_dp_mst_topology_mgr *mgr,int id,struct drm_dp_payload *payload)
include/drm/drm_dp_helper.h +3 -0
@@ -1099,6 +1099,9 @@#define DP_POWER_DOWN_PHY 0x25#define DP_SINK_EVENT_NOTIFY 0x30#define DP_QUERY_STREAM_ENC_STATUS 0x38 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_NO_EXIST 0 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_INACTIVE 1 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_ACTIVE 2/* DP 1.2 MST sideband reply types */ #define DP_SIDEBAND_REPLY_ACK 0x00
include/drm/drm_dp_mst_helper.h +44 -0
74 lines not on this page · raw message
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v5 14/16] drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message
Quoted 80 lines · Sean Paul
From: Sean Paul <[email protected]>
Used to query whether an MST stream is encrypted or not.
Signed-off-by Sean Paul <[email protected]>Link:
https://patchwork.freedesktop.org/patch/msgid/[email protected]
#v4Changes in v4:
-Added to the set
Changes in v5:(quoted diff) +0
-2-None --- drivers/gpu/drm/drm_dp_mst_topology.c | 117 ++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 3 + include/drm/drm_dp_mst_helper.h | 44 ++++++++++ 3 files changed, 164 insertions(+)drivers/gpu/drm/drm_dp_mst_topology.c +17
-0@@ -25,6 +25,7 @@#include <linux/i2c.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/random.h> #include <linux/sched.h> #include <linux/seq_file.h> @@ -418,6 +419,22 @@ drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req,memcpy (&buf[idx], req->u.i2c_write.bytes, req- >u.i2c_write.num_bytes); idx += req->u.i2c_write.num_bytes;break ; +case DP_QUERY_STREAM_ENC_STATUS : { +const struct drm_dp_query_stream_enc_status *msg; + + msg = &req->u.enc_status; + buf[idx] = msg->stream_id; + idx++; +memcpy (&buf[idx], msg->client_id,sizeof (msg->client_id)); + idx +=sizeof (msg->client_id); + buf[idx] =0 ; + buf[idx] |= msg->stream_event &GENMASK (1 ,0 ); + buf[idx] |= msg->valid_stream_event ?BIT (2 ) :0 ; + buf[idx] |= (msg->stream_behavior &GENMASK (1 ,0 )) <<3 ; + buf[idx] |= msg->valid_stream_behavior ?BIT (5 ) :0 ; + idx++; + } +break ; }drivers/gpu/drm/drm_dp_mst_topology.c +0
-0raw->cur_len = idx; }@@ -930,6 +947,34 @@ static booldrm_dp_sideband_parse_power_updown_phy_ack(struct
drm_dp_sideband_msdrivers/gpu/drm/drm_dp_mst_topology.c +17
-0return true; } +static bool +drm_dp_sideband_parse_query_stream_enc_status ( +struct drm_dp_sideband_msg_rx *raw, +struct drm_dp_sideband_msg_reply_body *repmsg) +{ +struct drm_dp_query_stream_enc_status_ack_reply *reply; + + reply = &repmsg->u.enc_status; + + reply->stream_id = raw->msg[3 ]; + + reply->reply_signed = raw->msg[2 ] &BIT (0 ); + + reply->hdcp_1x_device_present = raw->msg[2 ] &BIT (3 ); + reply->hdcp_2x_device_present = raw->msg[2 ] &BIT (4 ); + + reply->query_capable_device_present = raw->msg[2 ] &BIT (5 );
drivers/gpu/drm/drm_dp_mst_topology.c static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_ms · line 976
Quoted 10 lines
drivers/gpu/drm/drm_dp_mst_topology.c +10
-0+ reply->legacy_device_present = raw->msg[2 ] &BIT (6 ); + reply->unauthorizable_device_present = raw->msg[2 ] &BIT (7 ); + + reply->auth_completed = !!(raw->msg[1 ] &BIT (3 )); + reply->encryption_enabled = !!(raw->msg[1 ] &BIT (4 )); + reply->repeater_present = !!(raw->msg[1 ] &BIT (5 )); + reply->state = (raw->msg[1 ] &GENMASK (7 ,6 )) >>6 ; + +return true; +}
I don't mind terribly either way, but since you're already using the BIT/GENMASK() macros have you considered GET_BITFIELD()?
Quoted 146 lines
drivers/gpu/drm/drm_dp_mst_topology.c +1
-0+static bool drm_dp_sideband_parse_reply (struct drm_dp_sideband_msg_rx *raw, struct drm_dp_sideband_msg_reply_body*msg)
{drivers/gpu/drm/drm_dp_mst_topology.c +2
-0@@ -964,6 +1009,8 @@ static bool drm_dp_sideband_parse_reply(structdrm_dp_sideband_msg_rx *raw, return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg);case DP_CLEAR_PAYLOAD_ID_TABLE :return true;/* since there's nothing to parse */ +case DP_QUERY_STREAM_ENC_STATUS : +return drm_dp_sideband_parse_query_stream_enc_status (raw, msg);default :drivers/gpu/drm/drm_dp_mst_topology.c +19
-0DRM_ERROR ("Got unknown reply 0x%02x (%s)\n" , msg->req_type,drm_dp_mst_req_type_str (msg->req_type));@@ -1115,6 +1162,25 @@ static void build_power_updown_phy(struct drm_dp_sideband_msg_tx *msg, msg->path_msg = true; } +static int +build_query_stream_enc_status (struct drm_dp_sideband_msg_tx *msg,u8 stream_id, +u8 *q_id) +{ +struct drm_dp_sideband_msg_req_body req; + + req.req_type =DP_QUERY_STREAM_ENC_STATUS ; + req.u.enc_status.stream_id = stream_id; +memcpy (req.u.enc_status.client_id, q_id, +sizeof (req.u.enc_status.client_id)); + req.u.enc_status.stream_event =0 ; + req.u.enc_status.valid_stream_event = false; + req.u.enc_status.stream_behavior =0 ; + req.u.enc_status.valid_stream_behavior = false; + +drm_dp_encode_sideband_req (&req, msg); +return 0 ; +} + static int drm_dp_mst_assign_payload_id(struct drm_dp_mst_topology_mgr*mgr,
drivers/gpu/drm/drm_dp_mst_topology.c +51
-0struct drm_dp_vcpi *vcpi) {@@ -3151,6 +3217,57 @@ int drm_dp_send_power_updown_phy(structdrm_dp_mst_topology_mgr *mgr, }EXPORT_SYMBOL (drm_dp_send_power_updown_phy ); +int drm_dp_send_query_stream_enc_status (struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_mst_port *port, +struct drm_dp_query_stream_enc_status_ack_reply *status) +{ +struct drm_dp_sideband_msg_tx *txmsg; +u8 nonce[7 ]; +int len, ret; + + txmsg =kzalloc (sizeof (*txmsg),GFP_KERNEL ); +if (!txmsg) +return -ENOMEM ; + + port =drm_dp_mst_topology_get_port_validated (mgr, port); +if (!port) { + ret = -EINVAL ; + goto out_get_port; + } + +get_random_bytes (nonce,sizeof (nonce)); + +/* +* "Source device targets the QUERY_STREAM_ENCRYPTION_STATUS message +* transaction at the MST Branch device directly connected to the +* Source" +*/ + txmsg->dst = mgr->mst_primary; + + len =build_query_stream_enc_status (txmsg, port->vcpi.vcpi, nonce); + +drm_dp_queue_down_tx (mgr, txmsg); + + ret =drm_dp_mst_wait_tx_reply (mgr->mst_primary, txmsg); +if (ret <0 ) { + goto out; + }else if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { +DRM_DEBUG_KMS ("query encryption status nak received\n" ); + ret = -ENXIO ; + goto out; + } + + ret =0 ; +memcpy (status, &txmsg->reply.u.enc_status,sizeof (*status)); + +out: +drm_dp_mst_topology_put_port (port); +out_get_port: +kfree (txmsg); +return ret; +} +EXPORT_SYMBOL (drm_dp_send_query_stream_enc_status); + static int drm_dp_create_payload_step1(struct drm_dp_mst_topology_mgr *mgr,drivers/gpu/drm/drm_dp_mst_topology.c +0
-0int id, struct drm_dp_payload *payload)include/drm/drm_dp_helper.h +3
-0@@ -1099,6 +1099,9 @@#define DP_POWER_DOWN_PHY 0x25#define DP_SINK_EVENT_NOTIFY 0x30#define DP_QUERY_STREAM_ENC_STATUS 0x38 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_NO_EXIST 0 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_INACTIVE 1 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_ACTIVE 2/* DP 1.2 MST sideband reply types */ #define DP_SIDEBAND_REPLY_ACK 0x00include/drm/drm_dp_mst_helper.h +18
-0@@ -305,6 +305,34 @@ struct drm_dp_remote_i2c_write_ack_reply {u8 port_number; }; +struct drm_dp_query_stream_enc_status_ack_reply { +/* Bit[23:16]- Stream Id */ +u8 stream_id; + +/* Bit[15]- Signed */ +bool reply_signed; + +/* Bit[10:8]- Stream Output Sink Type */ +bool unauthorizable_device_present; +bool legacy_device_present; +bool query_capable_device_present; + +/* Bit[12:11]- Stream Output CP Type */ +bool hdcp_1x_device_present; +bool hdcp_2x_device_present; + +/* Bit[4]- Stream Authentication */ +bool auth_completed;
include/drm/drm_dp_mst_helper.h struct drm_dp_remote_i2c_write_ack_reply { · line 335
Quoted 10 lines
include/drm/drm_dp_mst_helper.h +10
-0+ +/* Bit[3]- Stream Encryption */ +bool encryption_enabled; + +/* Bit[2]- Stream Repeater Function Present */ +bool repeater_present; + +/* Bit[1:0]- Stream State */ +u8 state; +};
I really like your comments :)
Anyway-this all looks mostly perfect! The only thing is you forgot to add an encode/decode selftest for this into drivers/gpu/drm/selftests/test- drm_dp_mst_helper.c (we'll eventually use this once we actually have some selftests to test various hub behavior)
Quoted 49 lines
include/drm/drm_dp_mst_helper.h +16
-0struct drm_dp_sideband_msg_rx {u8 chunk[48 ];@@ -378,6 +406,15 @@ struct drm_dp_remote_i2c_write {u8 *bytes; }; +struct drm_dp_query_stream_enc_status { +u8 stream_id; +u8 client_id[7 ];/* 56-bit nonce */ +u8 stream_event; +bool valid_stream_event; +u8 stream_behavior; +u8 valid_stream_behavior; +}; +/* this covers ENUM_RESOURCES, POWER_DOWN_PHY, POWER_UP_PHY */ struct drm_dp_port_number_req {u8 port_number;@@ -426,6 +463,8 @@ struct drm_dp_sideband_msg_req_body {struct drm_dp_remote_i2c_read i2c_read;struct drm_dp_remote_i2c_write i2c_write; + +struct drm_dp_query_stream_enc_status enc_status; } u; };@@ -448,6 +487,8 @@ struct drm_dp_sideband_msg_reply_body {struct drm_dp_remote_i2c_read_ack_reply remote_i2c_read_ack;struct drm_dp_remote_i2c_read_nak_reply remote_i2c_read_nack;struct drm_dp_remote_i2c_write_ack_reply remote_i2c_write_ack; + +struct drm_dp_query_stream_enc_status_ack_reply enc_status; } u; };@@ -804,6 +845,9 @@ drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state, struct drm_dp_mst_port *port);int drm_dp_send_power_updown_phy (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port,bool power_up); +int drm_dp_send_query_stream_enc_status (struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_mst_port *port, +struct drm_dp_query_stream_enc_status_ack_reply *status);int __must_check drm_dp_mst_atomic_check (struct drm_atomic_state *state);void
drm_dp_mst_get_port_malloc(struct drm_dp_mst_port *port);
Signature · 8 lines
Cheers, Lyude Paul (she/her) Associate Software Engineer at Red Hat _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Jani Nikula
maintainerRe: [Intel-gfx] [PATCH v5 14/16] drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message
Quoted 86 lines · Lyude Paul
Quoted 85 lines · Sean Paul
From: Sean Paul <[email protected]>
Used to query whether an MST stream is encrypted or not.
Signed-off-by Sean Paul <[email protected]>Link:
https://patchwork.freedesktop.org/patch/msgid/[email protected]
#v4Changes in v4:
-Added to the set
Changes in v5:(quoted diff) +0
-2-None --- drivers/gpu/drm/drm_dp_mst_topology.c | 117 ++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 3 + include/drm/drm_dp_mst_helper.h | 44 ++++++++++ 3 files changed, 164 insertions(+)drivers/gpu/drm/drm_dp_mst_topology.c +17
-0@@ -25,6 +25,7 @@#include <linux/i2c.h> #include <linux/init.h> #include <linux/kernel.h> +#include <linux/random.h> #include <linux/sched.h> #include <linux/seq_file.h> @@ -418,6 +419,22 @@ drm_dp_encode_sideband_req(const struct drm_dp_sideband_msg_req_body *req,memcpy (&buf[idx], req->u.i2c_write.bytes, req- >u.i2c_write.num_bytes); idx += req->u.i2c_write.num_bytes;break ; +case DP_QUERY_STREAM_ENC_STATUS : { +const struct drm_dp_query_stream_enc_status *msg; + + msg = &req->u.enc_status; + buf[idx] = msg->stream_id; + idx++; +memcpy (&buf[idx], msg->client_id,sizeof (msg->client_id)); + idx +=sizeof (msg->client_id); + buf[idx] =0 ; + buf[idx] |= msg->stream_event &GENMASK (1 ,0 ); + buf[idx] |= msg->valid_stream_event ?BIT (2 ) :0 ; + buf[idx] |= (msg->stream_behavior &GENMASK (1 ,0 )) <<3 ; + buf[idx] |= msg->valid_stream_behavior ?BIT (5 ) :0 ; + idx++; + } +break ; }drivers/gpu/drm/drm_dp_mst_topology.c +0
-0raw->cur_len = idx; }@@ -930,6 +947,34 @@ static booldrm_dp_sideband_parse_power_updown_phy_ack(struct
drm_dp_sideband_msdrivers/gpu/drm/drm_dp_mst_topology.c +22
-0return true; } +static bool +drm_dp_sideband_parse_query_stream_enc_status ( +struct drm_dp_sideband_msg_rx *raw, +struct drm_dp_sideband_msg_reply_body *repmsg) +{ +struct drm_dp_query_stream_enc_status_ack_reply *reply; + + reply = &repmsg->u.enc_status; + + reply->stream_id = raw->msg[3 ]; + + reply->reply_signed = raw->msg[2 ] &BIT (0 ); + + reply->hdcp_1x_device_present = raw->msg[2 ] &BIT (3 ); + reply->hdcp_2x_device_present = raw->msg[2 ] &BIT (4 ); + + reply->query_capable_device_present = raw->msg[2 ] &BIT (5 ); + reply->legacy_device_present = raw->msg[2 ] &BIT (6 ); + reply->unauthorizable_device_present = raw->msg[2 ] &BIT (7 ); + + reply->auth_completed = !!(raw->msg[1 ] &BIT (3 )); + reply->encryption_enabled = !!(raw->msg[1 ] &BIT (4 ));
Quoted 8 lines
drivers/gpu/drm/drm_dp_mst_topology.c static bool drm_dp_sideband_parse_power_updown_phy_ack(struct drm_dp_sideband_ms · line 976
Quoted 5 lines
drivers/gpu/drm/drm_dp_mst_topology.c +5
-0+ reply->repeater_present = !!(raw->msg[1 ] &BIT (5 )); + reply->state = (raw->msg[1 ] &GENMASK (7 ,6 )) >>6 ; + +return true; +}I don't mind terribly either way, but since you're already using the BIT/GENMASK() macros have you considered
GET_BITFIELD()?
ITYM FIELD_PREP() and FIELD_GET().
Side note, for i915 registers we ended up in trouble with the types assumed by the various macros, and ended up with REG_BIT(), REG_GENMASK(), REG_FIELD_PREP(), and REG_FIELD_GET() wrappers for our specifically u32 needs. All in i915_reg.h.
BR,
Jani.
Quoted 213 lines
Quoted 147 lines
drivers/gpu/drm/drm_dp_mst_topology.c +1
-0+static bool drm_dp_sideband_parse_reply (struct drm_dp_sideband_msg_rx *raw, struct drm_dp_sideband_msg_reply_body*msg)
{drivers/gpu/drm/drm_dp_mst_topology.c +2
-0@@ -964,6 +1009,8 @@ static bool drm_dp_sideband_parse_reply(structdrm_dp_sideband_msg_rx *raw, return drm_dp_sideband_parse_power_updown_phy_ack(raw, msg);case DP_CLEAR_PAYLOAD_ID_TABLE :return true;/* since there's nothing to parse */ +case DP_QUERY_STREAM_ENC_STATUS : +return drm_dp_sideband_parse_query_stream_enc_status (raw, msg);default :drivers/gpu/drm/drm_dp_mst_topology.c +19
-0DRM_ERROR ("Got unknown reply 0x%02x (%s)\n" , msg->req_type,drm_dp_mst_req_type_str (msg->req_type));@@ -1115,6 +1162,25 @@ static void build_power_updown_phy(struct drm_dp_sideband_msg_tx *msg, msg->path_msg = true; } +static int +build_query_stream_enc_status (struct drm_dp_sideband_msg_tx *msg,u8 stream_id, +u8 *q_id) +{ +struct drm_dp_sideband_msg_req_body req; + + req.req_type =DP_QUERY_STREAM_ENC_STATUS ; + req.u.enc_status.stream_id = stream_id; +memcpy (req.u.enc_status.client_id, q_id, +sizeof (req.u.enc_status.client_id)); + req.u.enc_status.stream_event =0 ; + req.u.enc_status.valid_stream_event = false; + req.u.enc_status.stream_behavior =0 ; + req.u.enc_status.valid_stream_behavior = false; + +drm_dp_encode_sideband_req (&req, msg); +return 0 ; +} + static int drm_dp_mst_assign_payload_id(struct drm_dp_mst_topology_mgr*mgr,
drivers/gpu/drm/drm_dp_mst_topology.c +51
-0struct drm_dp_vcpi *vcpi) {@@ -3151,6 +3217,57 @@ int drm_dp_send_power_updown_phy(structdrm_dp_mst_topology_mgr *mgr, }EXPORT_SYMBOL (drm_dp_send_power_updown_phy ); +int drm_dp_send_query_stream_enc_status (struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_mst_port *port, +struct drm_dp_query_stream_enc_status_ack_reply *status) +{ +struct drm_dp_sideband_msg_tx *txmsg; +u8 nonce[7 ]; +int len, ret; + + txmsg =kzalloc (sizeof (*txmsg),GFP_KERNEL ); +if (!txmsg) +return -ENOMEM ; + + port =drm_dp_mst_topology_get_port_validated (mgr, port); +if (!port) { + ret = -EINVAL ; + goto out_get_port; + } + +get_random_bytes (nonce,sizeof (nonce)); + +/* +* "Source device targets the QUERY_STREAM_ENCRYPTION_STATUS message +* transaction at the MST Branch device directly connected to the +* Source" +*/ + txmsg->dst = mgr->mst_primary; + + len =build_query_stream_enc_status (txmsg, port->vcpi.vcpi, nonce); + +drm_dp_queue_down_tx (mgr, txmsg); + + ret =drm_dp_mst_wait_tx_reply (mgr->mst_primary, txmsg); +if (ret <0 ) { + goto out; + }else if (txmsg->reply.reply_type ==DP_SIDEBAND_REPLY_NAK ) { +DRM_DEBUG_KMS ("query encryption status nak received\n" ); + ret = -ENXIO ; + goto out; + } + + ret =0 ; +memcpy (status, &txmsg->reply.u.enc_status,sizeof (*status)); + +out: +drm_dp_mst_topology_put_port (port); +out_get_port: +kfree (txmsg); +return ret; +} +EXPORT_SYMBOL (drm_dp_send_query_stream_enc_status); + static int drm_dp_create_payload_step1(struct drm_dp_mst_topology_mgr *mgr,drivers/gpu/drm/drm_dp_mst_topology.c +0
-0int id, struct drm_dp_payload *payload)include/drm/drm_dp_helper.h +3
-0@@ -1099,6 +1099,9 @@#define DP_POWER_DOWN_PHY 0x25#define DP_SINK_EVENT_NOTIFY 0x30#define DP_QUERY_STREAM_ENC_STATUS 0x38 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_NO_EXIST 0 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_INACTIVE 1 +#define DP_QUERY_STREAM_ENC_STATUS_STATE_ACTIVE 2/* DP 1.2 MST sideband reply types */ #define DP_SIDEBAND_REPLY_ACK 0x00include/drm/drm_dp_mst_helper.h +18
-0@@ -305,6 +305,34 @@ struct drm_dp_remote_i2c_write_ack_reply {u8 port_number; }; +struct drm_dp_query_stream_enc_status_ack_reply { +/* Bit[23:16]- Stream Id */ +u8 stream_id; + +/* Bit[15]- Signed */ +bool reply_signed; + +/* Bit[10:8]- Stream Output Sink Type */ +bool unauthorizable_device_present; +bool legacy_device_present; +bool query_capable_device_present; + +/* Bit[12:11]- Stream Output CP Type */ +bool hdcp_1x_device_present; +bool hdcp_2x_device_present; + +/* Bit[4]- Stream Authentication */ +bool auth_completed;include/drm/drm_dp_mst_helper.h struct drm_dp_remote_i2c_write_ack_reply { · line 335
Quoted 10 lines
include/drm/drm_dp_mst_helper.h +10
-0+ +/* Bit[3]- Stream Encryption */ +bool encryption_enabled; + +/* Bit[2]- Stream Repeater Function Present */ +bool repeater_present; + +/* Bit[1:0]- Stream State */ +u8 state; +};I really like your comments :)
Anyway-this all looks mostly perfect! The only thing is you forgot to add an encode/decode selftest for this into
drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c(we'll eventually use this once we actually have some selftests to test various hub behavior)Quoted 49 lines
include/drm/drm_dp_mst_helper.h +16
-0struct drm_dp_sideband_msg_rx {u8 chunk[48 ];@@ -378,6 +406,15 @@ struct drm_dp_remote_i2c_write {u8 *bytes; }; +struct drm_dp_query_stream_enc_status { +u8 stream_id; +u8 client_id[7 ];/* 56-bit nonce */ +u8 stream_event; +bool valid_stream_event; +u8 stream_behavior; +u8 valid_stream_behavior; +}; +/* this covers ENUM_RESOURCES, POWER_DOWN_PHY, POWER_UP_PHY */ struct drm_dp_port_number_req {u8 port_number;@@ -426,6 +463,8 @@ struct drm_dp_sideband_msg_req_body {struct drm_dp_remote_i2c_read i2c_read;struct drm_dp_remote_i2c_write i2c_write; + +struct drm_dp_query_stream_enc_status enc_status; } u; };@@ -448,6 +487,8 @@ struct drm_dp_sideband_msg_reply_body {struct drm_dp_remote_i2c_read_ack_reply remote_i2c_read_ack;struct drm_dp_remote_i2c_read_nak_reply remote_i2c_read_nack;struct drm_dp_remote_i2c_write_ack_reply remote_i2c_write_ack; + +struct drm_dp_query_stream_enc_status_ack_reply enc_status; } u; };@@ -804,6 +845,9 @@ drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state, struct drm_dp_mst_port *port);int drm_dp_send_power_updown_phy (struct drm_dp_mst_topology_mgr *mgr,struct drm_dp_mst_port *port,bool power_up); +int drm_dp_send_query_stream_enc_status (struct drm_dp_mst_topology_mgr *mgr, +struct drm_dp_mst_port *port, +struct drm_dp_query_stream_enc_status_ack_reply *status);int __must_check drm_dp_mst_atomic_check (struct drm_atomic_state *state);void
drm_dp_mst_get_port_malloc(struct drm_dp_mst_port *port);
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 15/16 drm/i915: Print HDCP version info for all connectors
In reply to Sean PaulFrom: Sean Paul <[email protected]>
De-duplicate the HDCP version code for each connector and print it for all connectors.
Changes in v4:
- Added to the set
Changes in v5:
-Print "No connector support" for hdcp sink capability as well (Ram)
--- .../drm/i915/display/intel_display_debugfs.c | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/display/intel_display_debugfs.c +9 -12
@@ -597,6 +597,11 @@ static void intel_hdcp_info(struct seq_file *m, {bool hdcp_cap, hdcp2_cap; +if (!intel_connector->hdcp.shim) { +seq_puts (m,"No Connector Support" ); + goto out; + } + hdcp_cap =intel_hdcp_capable (intel_connector); hdcp2_cap =intel_hdcp2_capable (intel_connector);
@@ -608,6 +613,7 @@ static void intel_hdcp_info(struct seq_file *m,if (!hdcp_cap && !hdcp2_cap)seq_puts (m,"None" ); +out:seq_puts (m,"\n" ); }
@@ -624,10 +630,6 @@ static void intel_dp_info(struct seq_file *m,drm_dp_downstream_debug (m, intel_dp->dpcd, intel_dp->downstream_ports, &intel_dp->aux); -if (intel_connector->hdcp.shim) { -seq_puts (m,"\tHDCP version: " ); -intel_hdcp_info (m, intel_connector); - } } static void intel_dp_mst_info(struct seq_file *m,
@@ -651,10 +653,6 @@ static void intel_hdmi_info(struct seq_file *m,struct intel_hdmi *intel_hdmi =enc_to_intel_hdmi (intel_encoder);seq_printf (m,"\taudio support: %s\n" ,yesno (intel_hdmi->has_audio)); -if (intel_connector->hdcp.shim) { -seq_puts (m,"\tHDCP version: " ); -intel_hdcp_info (m, intel_connector); - } } static void intel_lvds_info(struct seq_file *m,
@@ -710,6 +708,9 @@ static void intel_connector_info(struct seq_file *m,break ; } +seq_puts (m,"\tHDCP version: " ); +intel_hdcp_info (m, intel_connector); +seq_printf (m,"\tmodes:\n" );list_for_each_entry (mode, &connector->modes, head)intel_seq_print_mode (m,2 , mode);
@@ -1975,10 +1976,6 @@ static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)if (connector->status != connector_status_connected)return -ENODEV ; -/* HDCP is supported by connector */ -if (!intel_connector->hdcp.shim) -return -EINVAL ; -seq_printf (m,"%s:%d HDCP version: " , connector->name, connector->base.id);intel_hdcp_info (m, intel_connector);
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v5 16/16 drm/i915: Add HDCP 1.4 support for MST connectors
In reply to Sean PaulFrom: Sean Paul <[email protected]>
Now that all the groundwork has been laid, we can turn on HDCP 1.4 over MST. Everything except for toggling the HDCP signalling and HDCP 2.2 support is the same as the DP case, so we'll re-use those callbacks
Changes in v2:
-Toggle HDCP from encoder disable/enable
-Don't disable HDCP on MST connector destroy, leave that for encoder
disable, just ensure the check_work routine isn't running any longer
Changes in v3:
-Place the shim in the new intel_dp_hdcp.c file (Ville) Changes in v4:
-Actually use the mst shim for mst connections (Juston)
-Use QUERY_STREAM_ENC_STATUS MST message to verify channel is encrypted Changes in v5:
-Add sleep on disable signalling to match hdmi delay
--- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 105 ++++++++++++++++++- drivers/gpu/drm/i915/display/intel_dp_mst.c | 14 +++ 2 files changed, 118 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp_hdcp.c +104 -1
@@ -7,10 +7,12 @@*/ #include <drm/drm_dp_helper.h> +#include <drm/drm_dp_mst_helper.h> #include <drm/drm_hdcp.h> #include <drm/drm_print.h> #include "intel_display_types.h" +#include "intel_ddi.h" #include "intel_dp.h" #include "intel_hdcp.h"
@@ -589,6 +591,104 @@ static const struct intel_hdcp_shim intel_dp_hdcp_shim = { .protocol = HDCP_PROTOCOL_DP, }; +static int +intel_dp_mst_hdcp_toggle_signalling (struct intel_digital_port *intel_dig_port, +enum transcoder cpu_transcoder, +bool enable) +{ +int ret; + +if (!enable) +usleep_range (6 ,60 );/* Bspec says >= 6us */ + + ret =intel_ddi_toggle_hdcp_signalling (&intel_dig_port->base, + cpu_transcoder, enable); +if (ret) +DRM_DEBUG_KMS ("%s HDCP signalling failed (%d)\n" , + enable ?"Enable" :"Disable" , ret); +return ret; +} + +static +int intel_dp_mst_hdcp2_write_msg (struct intel_digital_port *intel_dig_port, +void *buf,size_t size) +{ +return -EOPNOTSUPP ; +} + +static +int intel_dp_mst_hdcp2_read_msg (struct intel_digital_port *intel_dig_port, +u8 msg_id,void *buf,size_t size) +{ +return -EOPNOTSUPP ; +} + +static int +intel_dp_mst_hdcp2_config_stream_type (struct intel_digital_port *intel_dig_port, +bool is_repeater,u8 content_type) +{ +return -EOPNOTSUPP ; +} + +static +int intel_dp_mst_hdcp2_check_link (struct intel_digital_port *intel_dig_port) +{ +return -EOPNOTSUPP ; +} + +static +int intel_dp_mst_hdcp2_capable (struct intel_digital_port *intel_dig_port, +bool *capable) +{ + *capable = false; +return 0 ; +} + +static +bool intel_dp_mst_hdcp_check_link (struct intel_digital_port *intel_dig_port, +struct intel_connector *connector) +{ +struct intel_dp *intel_dp = &intel_dig_port->dp; +struct drm_dp_query_stream_enc_status_ack_reply reply; +int ret; + +if (!intel_dp_hdcp_check_link (intel_dig_port, connector)) +return false; + + ret =drm_dp_send_query_stream_enc_status (&intel_dp->mst_mgr, + connector->port, &reply); +if (ret) { +DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] failed QSES ret=%d\n" , + connector->base.base.id, connector->base.name, + ret); +return false; + } + +return reply.auth_completed && reply.encryption_enabled; +} + +static const struct intel_hdcp_shim intel_dp_mst_hdcp_shim = { + .write_an_aksv = intel_dp_hdcp_write_an_aksv, + .read_bksv = intel_dp_hdcp_read_bksv, + .read_bstatus = intel_dp_hdcp_read_bstatus, + .repeater_present = intel_dp_hdcp_repeater_present, + .read_ri_prime = intel_dp_hdcp_read_ri_prime, + .read_ksv_ready = intel_dp_hdcp_read_ksv_ready, + .read_ksv_fifo = intel_dp_hdcp_read_ksv_fifo, + .read_v_prime_part = intel_dp_hdcp_read_v_prime_part, + .toggle_signalling = intel_dp_mst_hdcp_toggle_signalling, + .check_link = intel_dp_mst_hdcp_check_link, + .hdcp_capable = intel_dp_hdcp_capable, + + .write_2_2_msg = intel_dp_mst_hdcp2_write_msg, + .read_2_2_msg = intel_dp_mst_hdcp2_read_msg, + .config_stream_type = intel_dp_mst_hdcp2_config_stream_type, + .check_2_2_link = intel_dp_mst_hdcp2_check_link, + .hdcp_2_2_capable = intel_dp_mst_hdcp2_capable, + + .protocol =HDCP_PROTOCOL_DP , +}; +int intel_dp_init_hdcp (struct intel_digital_port *intel_dig_port,struct intel_connector *intel_connector) {
@@ -601,7 +701,10 @@ int intel_dp_init_hdcp(struct intel_digital_port *intel_dig_port,if (!is_hdcp_supported (dev_priv, port))return 0 ; -if (!intel_dp_is_edp (intel_dp)) +if (intel_connector->mst_port) +return intel_hdcp_init (intel_connector, port, + &intel_dp_mst_hdcp_shim); +else if (!intel_dp_is_edp (intel_dp))return intel_hdcp_init (intel_connector, port, &intel_dp_hdcp_shim);
drivers/gpu/drm/i915/display/intel_dp_mst.c +14 -0
@@ -36,6 +36,7 @@#include "intel_dp.h" #include "intel_dp_mst.h" #include "intel_dpio_phy.h" +#include "intel_hdcp.h" static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, struct intel_crtc_state *crtc_state,
@@ -326,6 +327,8 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder,DRM_DEBUG_KMS ("active links %d\n" , intel_dp->active_mst_links); +intel_hdcp_disable (intel_mst->connector); +drm_dp_mst_reset_vcpi_slots (&intel_dp->mst_mgr, connector->port); ret =drm_dp_update_payload_part1 (&intel_dp->mst_mgr);
@@ -510,6 +513,13 @@ static void intel_mst_enable_dp(struct intel_encoder *encoder,drm_dp_update_payload_part2 (&intel_dp->mst_mgr);if (pipe_config->has_audio)intel_audio_codec_enable (encoder, pipe_config, conn_state); + +/* Enable hdcp if it's desired */ +if (conn_state->content_protection == +DRM_MODE_CONTENT_PROTECTION_DESIRED ) +intel_hdcp_enable (to_intel_connector (conn_state->connector), + pipe_config->cpu_transcoder, + (u8 )conn_state->hdcp_content_type); } static bool intel_dp_mst_enc_get_hw_state(struct intel_encoder *encoder,
@@ -703,6 +713,10 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolointel_attach_force_audio_property (connector);intel_attach_broadcast_rgb_property (connector); + ret =intel_dp_init_hdcp (intel_dig_port, intel_connector); +if (ret) +DRM_DEBUG_KMS ("HDCP init failed, skipping.\n" ); +/* * Reuse the prop from the SST connector because we're * not allowed to create new props after device registration.
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
In reply to Sean Paul== Series Details ==
== Series Details ==
Series: drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
URL : https://patchwork.freedesktop.org/series/70393/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip f3d9bb7dc10f drm/i915: Fix sha_text population code -:63: WARNING:LINE_SPACING: Missing a blank line after declarations #63: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:343: + u8 off = ((sizeof(sha_text) - j - 1 - sha_leftovers) * 8); + sha_text |= ksv[j] << off;
total: 0 errors, 1 warnings, 0 checks, 61 lines checkedc8f617e7591f drm/i915: Clear the repeater bit on HDCP disable 729375a1130b drm/i915: WARN if HDCP signalling is enabled upon disable 16e8d618fa38 drm/i915: Intercept Aksv writes in the aux hooks 5bdc5dc77094 drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP signalling ef2cfbb9e130 drm/i915: Factor out hdcp->value assignments
-:69: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #69: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:934:
+ intel_hdcp_update_value(connector,
+ DRM_MODE_CONTENT_PROTECTION_ENABLED, true);
-:114: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #114: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:1802:
+ intel_hdcp_update_value(connector,
+ DRM_MODE_CONTENT_PROTECTION_ENABLED,
-:126: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #126: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:1817:
+ intel_hdcp_update_value(connector,
+ DRM_MODE_CONTENT_PROTECTION_ENABLED,
-:138: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #138: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:1837:
+ intel_hdcp_update_value(connector,
+ DRM_MODE_CONTENT_PROTECTION_DESIRED, true);
total: 0 errors, 0 warnings, 4 checks, 138 lines checked a53b07c7917d drm/i915: Protect workers against disappearing connectors -:86: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #86: FILE: drivers/gpu/drm/i915/display/intel_hdcp.c:2198:
+ drm_WARN_ON(connector->base.dev,
+ connector->base.registration_state == DRM_CONNECTOR_REGISTERED);
total: 0 errors, 0 warnings, 1 checks, 71 lines checked7d468b95ce7a drm/i915: Don't fully disable HDCP on a port if multiple pipes are using it c9622c22eb06 drm/i915: Support DP MST in enc_to_dig_port() function7ea37f514e7b drm/i915: Use ddi_update_pipe in intel_dp_mste63dce8c2a3f drm/i915: Factor out HDCP shim functions from dp for use by dp_mst -:660: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #660:
new file mode 100644
-:665: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'drivers/gpu/drm/i915/display/intel_dp_hdcp.c', please use '//' instead #665: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:1:
+/* SPDX-License-Identifier: MIT */
-:665: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #665: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:1:
+/* SPDX-License-Identifier: MIT */
-:986: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #986: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:322:
+
+}
-:1065: WARNING:LINE_SPACING: Missing a blank line after declarations #1065: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:401:
+ ssize_t ret;
+ ret = drm_dp_dpcd_read(&intel_dig_port->dp.aux, DP_AUX_HDCP_BKSV, bksv,
-:1128: WARNING:LINE_SPACING: Missing a blank line after declarations #1128: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:464:
+ ssize_t ret;
+ ret = drm_dp_dpcd_read(&intel_dig_port->dp.aux, DP_AUX_HDCP_RI_PRIME,
-:1143: WARNING:LINE_SPACING: Missing a blank line after declarations #1143: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:479:
+ u8 bstatus;
+ ret = drm_dp_dpcd_read(&intel_dig_port->dp.aux, DP_AUX_HDCP_BSTATUS,
-:1163: WARNING:LINE_SPACING: Missing a blank line after declarations #1163: FILE: drivers/gpu/drm/i915/display/intel_dp_hdcp.c:499:
+ size_t len = min(num_downstream - i, 3) * DRM_HDCP_KSV_LEN;
+ ret = drm_dp_dpcd_read(&intel_dig_port->dp.aux,
total: 0 errors, 7 warnings, 1 checks, 1224 lines checkedc10d2e023dd1 drm/i915: Plumb port through hdcp init76ae56e95efc drm/i915: Add connector to hdcp_shim->check_link() bbf7c097884e drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message -:58: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#58: FILE: drivers/gpu/drm/drm_dp_mst_topology.c:951:
+drm_dp_sideband_parse_query_stream_enc_status(
-:128: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #128: FILE: drivers/gpu/drm/drm_dp_mst_topology.c:3221:
+int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
+ struct drm_dp_mst_port *port,
-:273: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #273: FILE: include/drm/drm_dp_mst_helper.h:849:
+int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
+ struct drm_dp_mst_port *port,
total: 0 errors, 0 warnings, 3 checks, 236 lines checked ed43091c9480 drm/i915: Print HDCP version info for all connectors 910e44eeaee6 drm/i915: Add HDCP 1.4 support for MST connectors
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
In reply to Sean Paul== Series Details ==
== Series Details ==
Series: drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
URL : https://patchwork.freedesktop.org/series/70393/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 ./drivers/gpu/drm/i915/display/intel_dpll_mgr.h:285: warning: Function parameter or member 'get_freq' not described in 'intel_shared_dpll_funcs'
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
In reply to Sean Paul== Series Details ==
== Series Details ==
Series: drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
URL : https://patchwork.freedesktop.org/series/70393/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8073 -> Patchwork_16845
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/index.html
Known issues
------------
Here are the changes found in Patchwork_16845 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@gem_contexts:
- fi-cml-s: [PASS][1] -> [DMESG-FAIL][2] ([i915#877])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-cml-s/igt@i915_selftest@live@gem_contexts.html
- fi-cfl-guc: [PASS][3] -> [DMESG-FAIL][4] ([i915#943])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-cfl-guc/igt@i915_selftest@live@gem_contexts.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-cfl-guc/igt@i915_selftest@live@gem_contexts.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [PASS][5] -> [FAIL][6] ([i915#217])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-icl-u2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-icl-u2/igt@[email protected]
* igt@prime_vgem@basic-gtt:
- fi-tgl-y: [PASS][7] -> [DMESG-WARN][8] ([CI#94] / [i915#402])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-tgl-y/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-tgl-y/igt@[email protected]
#### Possible fixes ####
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][9] ([i915#44]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-hsw-peppy/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-hsw-peppy/igt@[email protected]
* igt@vgem_basic@create:
- fi-tgl-y: [DMESG-WARN][11] ([CI#94] / [i915#402]) -> [PASS][12] +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/fi-tgl-y/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/fi-tgl-y/igt@[email protected]
[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877
[i915#943]: https://gitlab.freedesktop.org/drm/intel/issues/943
Participating hosts (47 -> 38)
------------------------------
Additional (2): fi-kbl-soraka fi-elk-e7500
Missing (11): fi-bdw-5557u fi-hsw-4200u fi-skl-6770hq fi-bsw-cyan fi-ctg-p8600 fi-ivb-3770 fi-cfl-8109u fi-blb-e6850 fi-byt-clapper fi-bdw-samus fi-snb-2600
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8073 -> Patchwork_16845
CI-20190529: 20190529
CI_DRM_8073: 04042aee59126471bb37cec526ccaf44b4e8d506 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5495: 22df72de8affcec22d9f354bb6148d77f60cc580 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16845: 910e44eeaee67752558b7a4f86d81989a8602dd4 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
910e44eeaee6 drm/i915: Add HDCP 1.4 support for MST connectorsed43091c9480 drm/i915: Print HDCP version info for all connectors bbf7c097884e drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message 76ae56e95efc drm/i915: Add connector to hdcp_shim->check_link() c10d2e023dd1 drm/i915: Plumb port through hdcp inite63dce8c2a3f drm/i915: Factor out HDCP shim functions from dp for use by dp_mst 7ea37f514e7b drm/i915: Use ddi_update_pipe in intel_dp_mstc9622c22eb06 drm/i915: Support DP MST in enc_to_dig_port() function 7d468b95ce7a drm/i915: Don't fully disable HDCP on a port if multiple pipes are using it a53b07c7917d drm/i915: Protect workers against disappearing connectors ef2cfbb9e130 drm/i915: Factor out hdcp->value assignments5bdc5dc77094 drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP signalling 16e8d618fa38 drm/i915: Intercept Aksv writes in the aux hooks729375a1130b drm/i915: WARN if HDCP signalling is enabled upon disable c8f617e7591f drm/i915: Clear the repeater bit on HDCP disablef3d9bb7dc10f drm/i915: Fix sha_text population code
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
In reply to Sean Paul== Series Details ==
== Series Details ==
Series: drm/i915: Add support for HDCP 1.4 over MST connectors (rev5)
URL : https://patchwork.freedesktop.org/series/70393/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8073_full -> Patchwork_16845_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_16845_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-kbl: [PASS][1] -> [DMESG-WARN][2] ([i915#180]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-kbl4/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-kbl7/igt@[email protected]
* igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110854])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb3/igt@[email protected]
* igt@gem_exec_schedule@pi-common-bsd:
- shard-iclb: [PASS][5] -> [SKIP][6] ([i915#677]) +2 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@wide-bsd:
- shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +6 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb4/igt@[email protected]
* igt@gem_exec_whisper@basic-queues:
- shard-glk: [PASS][9] -> [DMESG-WARN][10] ([i915#118] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-glk4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-glk5/igt@[email protected]
* igt@i915_pm_rps@waitboost:
- shard-iclb: [PASS][11] -> [FAIL][12] ([i915#413])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb8/igt@[email protected]
* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-apl7/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-apl6/igt@[email protected]
* igt@kms_flip_tiling@flip-yf-tiled:
- shard-skl: [PASS][15] -> [FAIL][16] ([fdo#108145])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl9/igt@[email protected]
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-move:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#49])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl6/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][19] -> [FAIL][20] ([i915#1188])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl1/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- shard-skl: [PASS][21] -> [INCOMPLETE][22] ([i915#69])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl2/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][23] -> [FAIL][24] ([fdo#108145] / [i915#265])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl6/igt@[email protected]
* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-glk: [PASS][25] -> [FAIL][26] ([i915#899])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-glk7/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-glk6/igt@[email protected]
* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
* igt@perf_pmu@busy-vcs1:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#112080]) +14 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb4/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb3/igt@[email protected]
* igt@prime_vgem@wait-bsd2:
- shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109276]) +10 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb4/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb3/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_shared@exec-shared-gtt-render:
- shard-tglb: [FAIL][33] ([i915#607] / [i915#616]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-tglb5/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-tglb6/igt@[email protected]
* igt@gem_exec_async@concurrent-writes-bsd:
- shard-iclb: [SKIP][35] ([fdo#112146]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb5/igt@[email protected]
* igt@gem_exec_parallel@vcs1-fds:
- shard-iclb: [SKIP][37] ([fdo#112080]) -> [PASS][38] +7 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb5/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb2/igt@[email protected]
* igt@gem_exec_schedule@implicit-both-bsd:
- shard-iclb: [SKIP][39] ([i915#677]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb3/igt@[email protected]
* igt@gem_exec_schedule@implicit-read-write-bsd2:
- shard-iclb: [SKIP][41] ([fdo#109276] / [i915#677]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb7/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb4/igt@[email protected]
* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [SKIP][43] ([fdo#109276]) -> [PASS][44] +16 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb4/igt@[email protected]
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [FAIL][45] ([i915#644]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-glk7/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-glk1/igt@[email protected]
- shard-iclb: [FAIL][47] ([i915#644]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb7/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb3/igt@[email protected]
* igt@gem_workarounds@suspend-resume-fd:
- shard-kbl: [DMESG-WARN][49] ([i915#180]) -> [PASS][50] +4 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-kbl4/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-kbl4/igt@[email protected]
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-skl: [INCOMPLETE][51] ([i915#69]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl6/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl1/igt@[email protected]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][53] ([i915#61]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-hsw2/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-hsw1/igt@[email protected]
* igt@kms_hdr@bpc-switch-suspend:
- shard-apl: [DMESG-WARN][55] ([i915#180]) -> [PASS][56] +2 similar issues
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-apl1/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-apl8/igt@[email protected]
- shard-skl: [FAIL][57] ([i915#1188]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl9/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl8/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [FAIL][59] ([fdo#108145]) -> [PASS][60] +1 similar issue
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl2/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl6/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][61] ([fdo#108145] / [i915#265]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-skl6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-skl2/igt@[email protected]
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [SKIP][63] ([fdo#109642] / [fdo#111068]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb1/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb2/igt@[email protected]
* igt@kms_psr@no_drrs:
- shard-iclb: [FAIL][65] ([i915#173]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb1/igt@kms_psr@no_drrs.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb7/igt@kms_psr@no_drrs.html
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][67] ([i915#31]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-kbl6/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-kbl7/igt@[email protected]
#### Warnings ####
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-hsw: [DMESG-WARN][69] ([fdo#111870]) -> [DMESG-WARN][70] ([fdo#110789] / [fdo#111870])
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-hsw6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-hsw1/igt@[email protected]
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][71] ([fdo#109349]) -> [DMESG-WARN][72] ([i915#1226])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8073/shard-iclb1/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/shard-iclb2/igt@[email protected]
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1226]: https://gitlab.freedesktop.org/drm/intel/issues/1226
[i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#607]: https://gitlab.freedesktop.org/drm/intel/issues/607
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#616]: https://gitlab.freedesktop.org/drm/intel/issues/616
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8073 -> Patchwork_16845
CI-20190529: 20190529
CI_DRM_8073: 04042aee59126471bb37cec526ccaf44b4e8d506 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5495: 22df72de8affcec22d9f354bb6148d77f60cc580 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16845: 910e44eeaee67752558b7a4f86d81989a8602dd4 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16845/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx