* [PATCH v3 1/4] drm/i915: Pullout the bksv read and validation
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
@ 2018-10-22 14:16 ` Ramalingam C
2018-10-22 15:11 ` Daniel Vetter
2018-10-22 14:16 ` [PATCH v3 2/4] drm/i915: Detect the hdcp capability of sink and src Ramalingam C
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ramalingam C @ 2018-10-22 14:16 UTC (permalink / raw)
To: intel-gfx, daniel.vetter
For reusability purpose, this patch implements the hdcp1.4 bksv's
read and validation as a functions.
For detecting the HDMI panel's HDCP capability this fucntions will be
used.
v2:
Rebased.
v3:
No Changes.
v4:
inline tag is removed with modified error msg.
v5:
No Changes.
v6:
No Changes.
v7:
Realigned the code.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
drivers/gpu/drm/i915/intel_hdcp.c | 62 ++++++++++++++++++++++++---------------
1 file changed, 38 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index 26e48fc95543..20908ff018e6 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -16,6 +16,41 @@
#define KEY_LOAD_TRIES 5
+static
+bool intel_hdcp_is_ksv_valid(u8 *ksv)
+{
+ int i, ones = 0;
+ /* KSV has 20 1's and 20 0's */
+ for (i = 0; i < DRM_HDCP_KSV_LEN; i++)
+ ones += hweight8(ksv[i]);
+ if (ones != 20)
+ return false;
+
+ return true;
+}
+
+static
+int intel_hdcp_read_valid_bksv(struct intel_digital_port *intel_dig_port,
+ const struct intel_hdcp_shim *shim, u8 *bksv)
+{
+ int ret, i, tries = 2;
+
+ /* HDCP spec states that we must retry the bksv if it is invalid */
+ for (i = 0; i < tries; i++) {
+ ret = shim->read_bksv(intel_dig_port, bksv);
+ if (ret)
+ return ret;
+ if (intel_hdcp_is_ksv_valid(bksv))
+ break;
+ }
+ if (i == tries) {
+ DRM_ERROR("Bksv is invalid\n");
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,
const struct intel_hdcp_shim *shim)
{
@@ -168,18 +203,6 @@ u32 intel_hdcp_get_repeater_ctl(struct intel_digital_port *intel_dig_port)
}
static
-bool intel_hdcp_is_ksv_valid(u8 *ksv)
-{
- int i, ones = 0;
- /* KSV has 20 1's and 20 0's */
- for (i = 0; i < DRM_HDCP_KSV_LEN; i++)
- ones += hweight8(ksv[i]);
- if (ones != 20)
- return false;
- return true;
-}
-
-static
int intel_hdcp_validate_v_prime(struct intel_digital_port *intel_dig_port,
const struct intel_hdcp_shim *shim,
u8 *ksv_fifo, u8 num_downstream, u8 *bstatus)
@@ -527,18 +550,9 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
memset(&bksv, 0, sizeof(bksv));
- /* HDCP spec states that we must retry the bksv if it is invalid */
- for (i = 0; i < tries; i++) {
- ret = shim->read_bksv(intel_dig_port, bksv.shim);
- if (ret)
- return ret;
- if (intel_hdcp_is_ksv_valid(bksv.shim))
- break;
- }
- if (i == tries) {
- DRM_ERROR("HDCP failed, Bksv is invalid\n");
- return -ENODEV;
- }
+ ret = intel_hdcp_read_valid_bksv(intel_dig_port, shim, bksv.shim);
+ if (ret < 0)
+ return ret;
I915_WRITE(PORT_HDCP_BKSVLO(port), bksv.reg[0]);
I915_WRITE(PORT_HDCP_BKSVHI(port), bksv.reg[1]);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 1/4] drm/i915: Pullout the bksv read and validation
2018-10-22 14:16 ` [PATCH v3 1/4] drm/i915: Pullout the bksv read and validation Ramalingam C
@ 2018-10-22 15:11 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-10-22 15:11 UTC (permalink / raw)
To: Ramalingam C; +Cc: daniel.vetter, intel-gfx
On Mon, Oct 22, 2018 at 07:46:02PM +0530, Ramalingam C wrote:
> For reusability purpose, this patch implements the hdcp1.4 bksv's
> read and validation as a functions.
>
> For detecting the HDMI panel's HDCP capability this fucntions will be
> used.
>
> v2:
> Rebased.
> v3:
> No Changes.
> v4:
> inline tag is removed with modified error msg.
> v5:
> No Changes.
> v6:
> No Changes.
> v7:
> Realigned the code.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_hdcp.c | 62 ++++++++++++++++++++++++---------------
> 1 file changed, 38 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index 26e48fc95543..20908ff018e6 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -16,6 +16,41 @@
>
> #define KEY_LOAD_TRIES 5
>
> +static
> +bool intel_hdcp_is_ksv_valid(u8 *ksv)
> +{
> + int i, ones = 0;
> + /* KSV has 20 1's and 20 0's */
> + for (i = 0; i < DRM_HDCP_KSV_LEN; i++)
> + ones += hweight8(ksv[i]);
> + if (ones != 20)
> + return false;
> +
> + return true;
> +}
> +
> +static
> +int intel_hdcp_read_valid_bksv(struct intel_digital_port *intel_dig_port,
> + const struct intel_hdcp_shim *shim, u8 *bksv)
> +{
> + int ret, i, tries = 2;
> +
> + /* HDCP spec states that we must retry the bksv if it is invalid */
> + for (i = 0; i < tries; i++) {
> + ret = shim->read_bksv(intel_dig_port, bksv);
> + if (ret)
> + return ret;
> + if (intel_hdcp_is_ksv_valid(bksv))
> + break;
> + }
> + if (i == tries) {
> + DRM_ERROR("Bksv is invalid\n");
> + return -ENODEV;
> + }
> +
> + return 0;
> +}
> +
> static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,
> const struct intel_hdcp_shim *shim)
> {
> @@ -168,18 +203,6 @@ u32 intel_hdcp_get_repeater_ctl(struct intel_digital_port *intel_dig_port)
> }
>
> static
> -bool intel_hdcp_is_ksv_valid(u8 *ksv)
> -{
> - int i, ones = 0;
> - /* KSV has 20 1's and 20 0's */
> - for (i = 0; i < DRM_HDCP_KSV_LEN; i++)
> - ones += hweight8(ksv[i]);
> - if (ones != 20)
> - return false;
> - return true;
> -}
> -
> -static
> int intel_hdcp_validate_v_prime(struct intel_digital_port *intel_dig_port,
> const struct intel_hdcp_shim *shim,
> u8 *ksv_fifo, u8 num_downstream, u8 *bstatus)
> @@ -527,18 +550,9 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
>
> memset(&bksv, 0, sizeof(bksv));
>
> - /* HDCP spec states that we must retry the bksv if it is invalid */
> - for (i = 0; i < tries; i++) {
> - ret = shim->read_bksv(intel_dig_port, bksv.shim);
> - if (ret)
> - return ret;
> - if (intel_hdcp_is_ksv_valid(bksv.shim))
> - break;
> - }
> - if (i == tries) {
> - DRM_ERROR("HDCP failed, Bksv is invalid\n");
> - return -ENODEV;
> - }
> + ret = intel_hdcp_read_valid_bksv(intel_dig_port, shim, bksv.shim);
> + if (ret < 0)
> + return ret;
>
> I915_WRITE(PORT_HDCP_BKSVLO(port), bksv.reg[0]);
> I915_WRITE(PORT_HDCP_BKSVHI(port), bksv.reg[1]);
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/4] drm/i915: Detect the hdcp capability of sink and src
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
2018-10-22 14:16 ` [PATCH v3 1/4] drm/i915: Pullout the bksv read and validation Ramalingam C
@ 2018-10-22 14:16 ` Ramalingam C
2018-10-22 15:19 ` Daniel Vetter
2018-10-22 14:16 ` [PATCH v3 3/4] drm/i915: hdcp_check_link only on CP_IRQ Ramalingam C
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ramalingam C @ 2018-10-22 14:16 UTC (permalink / raw)
To: intel-gfx, daniel.vetter
Implements a function to detect the sink and src's hdcp1.4
capabilities.
v2:
const qualifier is maintained at init.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
drivers/gpu/drm/i915/intel_drv.h | 1 +
drivers/gpu/drm/i915/intel_hdcp.c | 33 +++++++++++++++++++++++++++------
2 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index b2ca9f278b36..b97d32bb7ff4 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1956,6 +1956,7 @@ int intel_hdcp_enable(struct intel_connector *connector);
int intel_hdcp_disable(struct intel_connector *connector);
int intel_hdcp_check_link(struct intel_connector *connector);
bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port);
+bool intel_hdcp_capable(struct intel_connector *connector);
/* intel_psr.c */
#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index 20908ff018e6..deca5581cde3 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -17,6 +17,12 @@
#define KEY_LOAD_TRIES 5
static
+struct intel_digital_port *conn_to_dig_port(struct intel_connector *connector)
+{
+ return enc_to_dig_port(&intel_attached_encoder(&connector->base)->base);
+}
+
+static
bool intel_hdcp_is_ksv_valid(u8 *ksv)
{
int i, ones = 0;
@@ -51,6 +57,27 @@ int intel_hdcp_read_valid_bksv(struct intel_digital_port *intel_dig_port,
return 0;
}
+/* Is HDCP1.4 capable on Platform and Sink */
+bool intel_hdcp_capable(struct intel_connector *connector)
+{
+ struct intel_digital_port *intel_dig_port = conn_to_dig_port(connector);
+ const struct intel_hdcp_shim *shim = connector->hdcp_shim;
+ bool capable = false;
+ u8 bksv[5];
+
+ if (!shim)
+ return capable;
+
+ if (shim->hdcp_capable) {
+ shim->hdcp_capable(intel_dig_port, &capable);
+ } else {
+ if (!intel_hdcp_read_valid_bksv(intel_dig_port, shim, bksv))
+ capable = true;
+ }
+
+ return capable;
+}
+
static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,
const struct intel_hdcp_shim *shim)
{
@@ -632,12 +659,6 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
return 0;
}
-static
-struct intel_digital_port *conn_to_dig_port(struct intel_connector *connector)
-{
- return enc_to_dig_port(&intel_attached_encoder(&connector->base)->base);
-}
-
static int _intel_hdcp_disable(struct intel_connector *connector)
{
struct drm_i915_private *dev_priv = connector->base.dev->dev_private;
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 2/4] drm/i915: Detect the hdcp capability of sink and src
2018-10-22 14:16 ` [PATCH v3 2/4] drm/i915: Detect the hdcp capability of sink and src Ramalingam C
@ 2018-10-22 15:19 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-10-22 15:19 UTC (permalink / raw)
To: Ramalingam C; +Cc: daniel.vetter, intel-gfx
On Mon, Oct 22, 2018 at 07:46:03PM +0530, Ramalingam C wrote:
> Implements a function to detect the sink and src's hdcp1.4
> capabilities.
>
> v2:
> const qualifier is maintained at init.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_hdcp.c | 33 +++++++++++++++++++++++++++------
> 2 files changed, 28 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index b2ca9f278b36..b97d32bb7ff4 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1956,6 +1956,7 @@ int intel_hdcp_enable(struct intel_connector *connector);
> int intel_hdcp_disable(struct intel_connector *connector);
> int intel_hdcp_check_link(struct intel_connector *connector);
> bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port);
> +bool intel_hdcp_capable(struct intel_connector *connector);
>
> /* intel_psr.c */
> #define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index 20908ff018e6..deca5581cde3 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -17,6 +17,12 @@
> #define KEY_LOAD_TRIES 5
>
> static
> +struct intel_digital_port *conn_to_dig_port(struct intel_connector *connector)
Hm, maybe we should stuff this one intel intel_connector.h perhaps? Future
cleanup patch ofc.
> +{
> + return enc_to_dig_port(&intel_attached_encoder(&connector->base)->base);
> +}
> +
> +static
> bool intel_hdcp_is_ksv_valid(u8 *ksv)
> {
> int i, ones = 0;
> @@ -51,6 +57,27 @@ int intel_hdcp_read_valid_bksv(struct intel_digital_port *intel_dig_port,
> return 0;
> }
>
> +/* Is HDCP1.4 capable on Platform and Sink */
> +bool intel_hdcp_capable(struct intel_connector *connector)
Adding a function without caller is kinda confusing. Two possible fixes:
- Use this also in intel_hdcp_auth(), which is what I recommend, since
cleaner imo. Probably best if we just squash this in with patch 1, and
switch the parameter to intel_dig_port. And we'd need to move
conn_to_dig_port() into intel_connector.h (so that patch 4 can use it).
- Or squash it in with patch 4, which actually uses it.
Either works fine with me.
-Daniel
> +{
> + struct intel_digital_port *intel_dig_port = conn_to_dig_port(connector);
> + const struct intel_hdcp_shim *shim = connector->hdcp_shim;
> + bool capable = false;
> + u8 bksv[5];
> +
> + if (!shim)
> + return capable;
> +
> + if (shim->hdcp_capable) {
> + shim->hdcp_capable(intel_dig_port, &capable);
> + } else {
> + if (!intel_hdcp_read_valid_bksv(intel_dig_port, shim, bksv))
> + capable = true;
> + }
> +
> + return capable;
> +}
> +
> static int intel_hdcp_poll_ksv_fifo(struct intel_digital_port *intel_dig_port,
> const struct intel_hdcp_shim *shim)
> {
> @@ -632,12 +659,6 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
> return 0;
> }
>
> -static
> -struct intel_digital_port *conn_to_dig_port(struct intel_connector *connector)
> -{
> - return enc_to_dig_port(&intel_attached_encoder(&connector->base)->base);
> -}
> -
> static int _intel_hdcp_disable(struct intel_connector *connector)
> {
> struct drm_i915_private *dev_priv = connector->base.dev->dev_private;
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 3/4] drm/i915: hdcp_check_link only on CP_IRQ
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
2018-10-22 14:16 ` [PATCH v3 1/4] drm/i915: Pullout the bksv read and validation Ramalingam C
2018-10-22 14:16 ` [PATCH v3 2/4] drm/i915: Detect the hdcp capability of sink and src Ramalingam C
@ 2018-10-22 14:16 ` Ramalingam C
2018-10-22 15:19 ` Daniel Vetter
2018-10-22 14:16 ` [PATCH v3 4/4] drm/i915/debugfs: hdcp capability of a sink Ramalingam C
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Ramalingam C @ 2018-10-22 14:16 UTC (permalink / raw)
To: intel-gfx, daniel.vetter; +Cc: Sean Paul
HDCP check link is invoked only on CP_IRQ detection, instead of all
short pulses.
v3:
No Changes.
v4:
Added sean in cc and collected the reviewed-by received.
v5:
No Change.
v6:
No Change.
v7:
No Change.
v8:
Rebased.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
drivers/gpu/drm/i915/intel_dp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 1f098e509143..27377bf8105c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4530,8 +4530,11 @@ static void intel_dp_check_service_irq(struct intel_dp *intel_dp)
if (val & DP_AUTOMATED_TEST_REQUEST)
intel_dp_handle_test_request(intel_dp);
- if (val & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
- DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
+ if (val & DP_CP_IRQ)
+ intel_hdcp_check_link(intel_dp->attached_connector);
+
+ if (val & DP_SINK_SPECIFIC_IRQ)
+ DRM_DEBUG_DRIVER("Sink specific irq unhandled\n");
}
/*
@@ -5694,9 +5697,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
handled = intel_dp_short_pulse(intel_dp);
- /* Short pulse can signify loss of hdcp authentication */
- intel_hdcp_check_link(intel_dp->attached_connector);
-
if (!handled)
goto put_power;
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 3/4] drm/i915: hdcp_check_link only on CP_IRQ
2018-10-22 14:16 ` [PATCH v3 3/4] drm/i915: hdcp_check_link only on CP_IRQ Ramalingam C
@ 2018-10-22 15:19 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-10-22 15:19 UTC (permalink / raw)
To: Ramalingam C; +Cc: daniel.vetter, intel-gfx, Sean Paul
On Mon, Oct 22, 2018 at 07:46:04PM +0530, Ramalingam C wrote:
> HDCP check link is invoked only on CP_IRQ detection, instead of all
> short pulses.
>
> v3:
> No Changes.
> v4:
> Added sean in cc and collected the reviewed-by received.
> v5:
> No Change.
> v6:
> No Change.
> v7:
> No Change.
> v8:
> Rebased.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> cc: Sean Paul <seanpaul@chromium.org>
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 1f098e509143..27377bf8105c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4530,8 +4530,11 @@ static void intel_dp_check_service_irq(struct intel_dp *intel_dp)
> if (val & DP_AUTOMATED_TEST_REQUEST)
> intel_dp_handle_test_request(intel_dp);
>
> - if (val & (DP_CP_IRQ | DP_SINK_SPECIFIC_IRQ))
> - DRM_DEBUG_DRIVER("CP or sink specific irq unhandled\n");
> + if (val & DP_CP_IRQ)
> + intel_hdcp_check_link(intel_dp->attached_connector);
> +
> + if (val & DP_SINK_SPECIFIC_IRQ)
> + DRM_DEBUG_DRIVER("Sink specific irq unhandled\n");
> }
>
> /*
> @@ -5694,9 +5697,6 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>
> handled = intel_dp_short_pulse(intel_dp);
>
> - /* Short pulse can signify loss of hdcp authentication */
> - intel_hdcp_check_link(intel_dp->attached_connector);
> -
> if (!handled)
> goto put_power;
> }
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 4/4] drm/i915/debugfs: hdcp capability of a sink
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
` (2 preceding siblings ...)
2018-10-22 14:16 ` [PATCH v3 3/4] drm/i915: hdcp_check_link only on CP_IRQ Ramalingam C
@ 2018-10-22 14:16 ` Ramalingam C
2018-10-22 15:20 ` Daniel Vetter
2018-10-22 15:56 ` ✗ Fi.CI.CHECKPATCH: warning for Enabling the IGT for HDCP1.4 (rev3) Patchwork
2018-10-22 16:21 ` ✗ Fi.CI.BAT: failure " Patchwork
5 siblings, 1 reply; 11+ messages in thread
From: Ramalingam C @ 2018-10-22 14:16 UTC (permalink / raw)
To: intel-gfx, daniel.vetter
Add a debugfs entry for providing the hdcp capabilities of the sink
connected to the HDCP capable connectors.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 29 +++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_hdmi.c | 16 +++++++++++++++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 5f3c639522fa..6d09af66da0f 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4946,6 +4946,28 @@ static int i915_panel_show(struct seq_file *m, void *data)
}
DEFINE_SHOW_ATTRIBUTE(i915_panel);
+static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)
+{
+ struct drm_connector *connector = m->private;
+ struct intel_connector *intel_connector = to_intel_connector(connector);
+
+ 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);
+ seq_printf(m, "%s ", !intel_hdcp_capable(intel_connector) ?
+ "None" : "HDCP1.4");
+ seq_puts(m, "\n");
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(i915_hdcp_sink_capability);
+
/**
* i915_debugfs_connector_add - add i915 specific connector debugfs files
* @connector: pointer to a registered drm_connector
@@ -4975,5 +4997,12 @@ int i915_debugfs_connector_add(struct drm_connector *connector)
connector, &i915_psr_sink_status_fops);
}
+ if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
+ debugfs_create_file("i915_hdcp_sink_capability", S_IRUGO, root,
+ connector, &i915_hdcp_sink_capability_fops);
+ }
+
return 0;
}
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 89d5e3984452..72e8a73dfa1c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -2072,6 +2072,20 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder,
chv_phy_release_cl2_override(encoder);
}
+static int
+intel_hdmi_connector_register(struct drm_connector *connector)
+{
+ int ret;
+
+ ret = intel_connector_register(connector);
+ if (ret)
+ return ret;
+
+ i915_debugfs_connector_add(connector);
+
+ return ret;
+}
+
static void intel_hdmi_destroy(struct drm_connector *connector)
{
if (intel_attached_hdmi(connector)->cec_notifier)
@@ -2086,7 +2100,7 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.atomic_get_property = intel_digital_connector_atomic_get_property,
.atomic_set_property = intel_digital_connector_atomic_set_property,
- .late_register = intel_connector_register,
+ .late_register = intel_hdmi_connector_register,
.early_unregister = intel_connector_unregister,
.destroy = intel_hdmi_destroy,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH v3 4/4] drm/i915/debugfs: hdcp capability of a sink
2018-10-22 14:16 ` [PATCH v3 4/4] drm/i915/debugfs: hdcp capability of a sink Ramalingam C
@ 2018-10-22 15:20 ` Daniel Vetter
0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-10-22 15:20 UTC (permalink / raw)
To: Ramalingam C; +Cc: daniel.vetter, intel-gfx
On Mon, Oct 22, 2018 at 07:46:05PM +0530, Ramalingam C wrote:
> Add a debugfs entry for providing the hdcp capabilities of the sink
> connected to the HDCP capable connectors.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 29 +++++++++++++++++++++++++++++
> drivers/gpu/drm/i915/intel_hdmi.c | 16 +++++++++++++++-
> 2 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 5f3c639522fa..6d09af66da0f 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4946,6 +4946,28 @@ static int i915_panel_show(struct seq_file *m, void *data)
> }
> DEFINE_SHOW_ATTRIBUTE(i915_panel);
>
> +static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data)
> +{
> + struct drm_connector *connector = m->private;
> + struct intel_connector *intel_connector = to_intel_connector(connector);
> +
> + 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);
> + seq_printf(m, "%s ", !intel_hdcp_capable(intel_connector) ?
> + "None" : "HDCP1.4");
> + seq_puts(m, "\n");
> +
> + return 0;
> +}
> +DEFINE_SHOW_ATTRIBUTE(i915_hdcp_sink_capability);
> +
> /**
> * i915_debugfs_connector_add - add i915 specific connector debugfs files
> * @connector: pointer to a registered drm_connector
> @@ -4975,5 +4997,12 @@ int i915_debugfs_connector_add(struct drm_connector *connector)
> connector, &i915_psr_sink_status_fops);
> }
>
> + if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
> + connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> + connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) {
> + debugfs_create_file("i915_hdcp_sink_capability", S_IRUGO, root,
> + connector, &i915_hdcp_sink_capability_fops);
> + }
> +
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 89d5e3984452..72e8a73dfa1c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -2072,6 +2072,20 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder,
> chv_phy_release_cl2_override(encoder);
> }
>
> +static int
> +intel_hdmi_connector_register(struct drm_connector *connector)
> +{
> + int ret;
> +
> + ret = intel_connector_register(connector);
> + if (ret)
> + return ret;
> +
> + i915_debugfs_connector_add(connector);
> +
> + return ret;
> +}
> +
> static void intel_hdmi_destroy(struct drm_connector *connector)
> {
> if (intel_attached_hdmi(connector)->cec_notifier)
> @@ -2086,7 +2100,7 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = {
> .fill_modes = drm_helper_probe_single_connector_modes,
> .atomic_get_property = intel_digital_connector_atomic_get_property,
> .atomic_set_property = intel_digital_connector_atomic_set_property,
> - .late_register = intel_connector_register,
> + .late_register = intel_hdmi_connector_register,
lgtm. I'll wait with the r-b to see how you squashed in patch 2.
Cheers, Daniel
> .early_unregister = intel_connector_unregister,
> .destroy = intel_hdmi_destroy,
> .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for Enabling the IGT for HDCP1.4 (rev3)
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
` (3 preceding siblings ...)
2018-10-22 14:16 ` [PATCH v3 4/4] drm/i915/debugfs: hdcp capability of a sink Ramalingam C
@ 2018-10-22 15:56 ` Patchwork
2018-10-22 16:21 ` ✗ Fi.CI.BAT: failure " Patchwork
5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-22 15:56 UTC (permalink / raw)
To: Ramalingam C; +Cc: intel-gfx
== Series Details ==
Series: Enabling the IGT for HDCP1.4 (rev3)
URL : https://patchwork.freedesktop.org/series/51113/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
7697634d8e93 drm/i915: Pullout the bksv read and validation
0810c07faa41 drm/i915: Detect the hdcp capability of sink and src
407b0037aa41 drm/i915: hdcp_check_link only on CP_IRQ
8bf3af9563bb drm/i915/debugfs: hdcp capability of a sink
-:51: WARNING:SYMBOLIC_PERMS: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
#51: FILE: drivers/gpu/drm/i915/i915_debugfs.c:5034:
+ debugfs_create_file("i915_hdcp_sink_capability", S_IRUGO, root,
total: 0 errors, 1 warnings, 0 checks, 68 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread* ✗ Fi.CI.BAT: failure for Enabling the IGT for HDCP1.4 (rev3)
2018-10-22 14:16 [PATCH v3 0/4] Enabling the IGT for HDCP1.4 Ramalingam C
` (4 preceding siblings ...)
2018-10-22 15:56 ` ✗ Fi.CI.CHECKPATCH: warning for Enabling the IGT for HDCP1.4 (rev3) Patchwork
@ 2018-10-22 16:21 ` Patchwork
5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-10-22 16:21 UTC (permalink / raw)
To: Ramalingam C; +Cc: intel-gfx
== Series Details ==
Series: Enabling the IGT for HDCP1.4 (rev3)
URL : https://patchwork.freedesktop.org/series/51113/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_5017 -> Patchwork_10525 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10525 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_10525, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/51113/revisions/3/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10525:
=== IGT changes ===
==== Possible regressions ====
igt@debugfs_test@read_all_entries:
fi-skl-iommu: PASS -> DMESG-WARN
fi-bdw-gvtdvm: PASS -> DMESG-WARN
fi-bdw-5557u: PASS -> DMESG-WARN
fi-skl-guc: PASS -> DMESG-WARN
fi-glk-j4005: PASS -> DMESG-WARN
fi-cfl-8700k: PASS -> DMESG-WARN
fi-cfl-guc: PASS -> DMESG-WARN
igt@drv_selftest@live_execlists:
fi-apl-guc: PASS -> DMESG-WARN
== Known issues ==
Here are the changes found in Patchwork_10525 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_store@basic-all:
fi-icl-u: NOTRUN -> DMESG-WARN (fdo#107732) +4
igt@gem_exec_suspend@basic:
fi-icl-u: NOTRUN -> DMESG-WARN (fdo#107724) +25
igt@gem_exec_suspend@basic-s3:
fi-kbl-soraka: NOTRUN -> INCOMPLETE (fdo#107859, fdo#107556, fdo#107774)
fi-icl-u: NOTRUN -> DMESG-WARN (fdo#108512)
igt@gem_mmap@basic-small-bo:
fi-icl-u2: NOTRUN -> DMESG-WARN (fdo#107732) +1
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362, fdo#103191) +1
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
fi-icl-u: NOTRUN -> INCOMPLETE (fdo#107713)
==== Possible fixes ====
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#107139, fdo#105128) -> PASS
igt@kms_frontbuffer_tracking@basic:
fi-byt-clapper: FAIL (fdo#103167) -> PASS
igt@prime_vgem@basic-fence-flip:
fi-cfl-8700k: FAIL (fdo#104008) -> PASS
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107713 https://bugs.freedesktop.org/show_bug.cgi?id=107713
fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
fdo#107732 https://bugs.freedesktop.org/show_bug.cgi?id=107732
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
fdo#107859 https://bugs.freedesktop.org/show_bug.cgi?id=107859
fdo#108512 https://bugs.freedesktop.org/show_bug.cgi?id=108512
== Participating hosts (51 -> 47) ==
Additional (2): fi-kbl-soraka fi-icl-u
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-skl-6700hq
== Build changes ==
* Linux: CI_DRM_5017 -> Patchwork_10525
CI_DRM_5017: 9510f8e44127260f92b5b6c3127aafa22b15f741 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4685: 78619fde4008424c472906041edb1d204e014f7c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10525: 8bf3af9563bb5f5bc7aa6eb82729927b05ff9403 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
8bf3af9563bb drm/i915/debugfs: hdcp capability of a sink
407b0037aa41 drm/i915: hdcp_check_link only on CP_IRQ
0810c07faa41 drm/i915: Detect the hdcp capability of sink and src
7697634d8e93 drm/i915: Pullout the bksv read and validation
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10525/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread