* [PATCH v3 0/4] HDCP1.4 Fixes - II
@ 2018-12-04 18:07 Ramalingam C
2018-12-04 18:07 ` [PATCH v3 1/4] drm/i915: Fix GEN9 HDCP1.4 key load process Ramalingam C
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ramalingam C @ 2018-12-04 18:07 UTC (permalink / raw)
To: intel-gfx, dri-devel, seanpaul, daniel.vetter
Couple of more HDCP1.4 fixes on
- Key load process for CFL
- Encryption status change time
- debug log addition
- active platform coverage
v1 and v2 went into old series https://patchwork.freedesktop.org/series/38978/
as v8 and v9, due to the same series title. Now changed the title.
Thanks Sean Paul for the reviews.
Ramalingam C (4):
drm/i915: Fix GEN9 HDCP1.4 key load process
drm/i915: Fix platform coverage for HDCP1.4
drm/i915: debug log for REPLY_ACK missing
drm/i915: Increase timeout for Encrypt status change
drivers/gpu/drm/i915/intel_dp.c | 7 ++++++-
drivers/gpu/drm/i915/intel_hdcp.c | 16 +++++++++-------
2 files changed, 15 insertions(+), 8 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/4] drm/i915: Fix GEN9 HDCP1.4 key load process
2018-12-04 18:07 [PATCH v3 0/4] HDCP1.4 Fixes - II Ramalingam C
@ 2018-12-04 18:07 ` Ramalingam C
2018-12-04 18:07 ` [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4 Ramalingam C
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Ramalingam C @ 2018-12-04 18:07 UTC (permalink / raw)
To: intel-gfx, dri-devel, seanpaul, daniel.vetter
HDCP1.4 key load process varies between Intel platform to platform.
For Gen9 platforms except BXT and GLK, HDCP1.4 key is loaded using
the GT Driver Mailbox interface. So all GEN9_BC platforms will use
the GT Driver Mailbox interface for HDCP1.4 key load.
v2:
Using the IS_GEN9_BC for filtering the platforms [Ville]
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
---
drivers/gpu/drm/i915/intel_hdcp.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index 1bf487f94254..c16bffcce3b0 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -157,10 +157,11 @@ static int intel_hdcp_load_keys(struct drm_i915_private *dev_priv)
/*
* Initiate loading the HDCP key from fuses.
*
- * BXT+ platforms, HDCP key needs to be loaded by SW. Only SKL and KBL
- * differ in the key load trigger process from other platforms.
+ * BXT+ platforms, HDCP key needs to be loaded by SW. Only Gen 9
+ * platforms except BXT and GLK, differ in the key load trigger process
+ * from other platforms. So GEN9_BC uses the GT Driver Mailbox i/f.
*/
- if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
+ if (IS_GEN9_BC(dev_priv)) {
mutex_lock(&dev_priv->pcu_lock);
ret = sandybridge_pcode_write(dev_priv,
SKL_PCODE_LOAD_HDCP_KEYS, 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] 7+ messages in thread
* [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4
2018-12-04 18:07 [PATCH v3 0/4] HDCP1.4 Fixes - II Ramalingam C
2018-12-04 18:07 ` [PATCH v3 1/4] drm/i915: Fix GEN9 HDCP1.4 key load process Ramalingam C
@ 2018-12-04 18:07 ` Ramalingam C
2018-12-04 19:15 ` Ville Syrjälä
2018-12-04 18:07 ` [PATCH v3 3/4] drm/i915: debug log for REPLY_ACK missing Ramalingam C
2018-12-04 18:07 ` [PATCH v3 4/4] drm/i915: Increase timeout for Encrypt status change Ramalingam C
3 siblings, 1 reply; 7+ messages in thread
From: Ramalingam C @ 2018-12-04 18:07 UTC (permalink / raw)
To: intel-gfx, dri-devel, seanpaul, daniel.vetter
HDCP1.4 is enabled and validated only on GEN9+ platforms.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
---
drivers/gpu/drm/i915/intel_hdcp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index c16bffcce3b0..bccfb001340a 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -769,8 +769,7 @@ static void intel_hdcp_prop_work(struct work_struct *work)
bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port)
{
/* PORT E doesn't have HDCP, and PORT F is disabled */
- return ((INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) &&
- !IS_CHERRYVIEW(dev_priv) && port < PORT_E);
+ return ((INTEL_GEN(dev_priv) >= 9) && port < PORT_E);
}
int intel_hdcp_init(struct intel_connector *connector,
--
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] 7+ messages in thread
* [PATCH v3 3/4] drm/i915: debug log for REPLY_ACK missing
2018-12-04 18:07 [PATCH v3 0/4] HDCP1.4 Fixes - II Ramalingam C
2018-12-04 18:07 ` [PATCH v3 1/4] drm/i915: Fix GEN9 HDCP1.4 key load process Ramalingam C
2018-12-04 18:07 ` [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4 Ramalingam C
@ 2018-12-04 18:07 ` Ramalingam C
2018-12-04 18:07 ` [PATCH v3 4/4] drm/i915: Increase timeout for Encrypt status change Ramalingam C
3 siblings, 0 replies; 7+ messages in thread
From: Ramalingam C @ 2018-12-04 18:07 UTC (permalink / raw)
To: intel-gfx, dri-devel, seanpaul, daniel.vetter
Adding a debug log when the DP_AUX_NATIVE_REPLY_ACK is missing
for aksv write. This helps to locate the possible non responding
DP HDCP sinks.
v2:
Rewritten for readability [Sean Paul]
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
---
drivers/gpu/drm/i915/intel_dp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 38a6e82153fd..9f75ca04a344 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5579,7 +5579,12 @@ int intel_dp_hdcp_write_an_aksv(struct intel_digital_port *intel_dig_port,
}
reply = (rxbuf[0] >> 4) & DP_AUX_NATIVE_REPLY_MASK;
- return reply == DP_AUX_NATIVE_REPLY_ACK ? 0 : -EIO;
+ if (reply != DP_AUX_NATIVE_REPLY_ACK) {
+ DRM_DEBUG_KMS("Aksv write: no DP_AUX_NATIVE_REPLY_ACK %x\n",
+ reply);
+ return -EIO;
+ }
+ return 0;
}
static int intel_dp_hdcp_read_bksv(struct intel_digital_port *intel_dig_port,
--
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] 7+ messages in thread
* [PATCH v3 4/4] drm/i915: Increase timeout for Encrypt status change
2018-12-04 18:07 [PATCH v3 0/4] HDCP1.4 Fixes - II Ramalingam C
` (2 preceding siblings ...)
2018-12-04 18:07 ` [PATCH v3 3/4] drm/i915: debug log for REPLY_ACK missing Ramalingam C
@ 2018-12-04 18:07 ` Ramalingam C
3 siblings, 0 replies; 7+ messages in thread
From: Ramalingam C @ 2018-12-04 18:07 UTC (permalink / raw)
To: intel-gfx, dri-devel, seanpaul, daniel.vetter
At enable/disable of the HDCP encryption, for encryption status change
we need minimum one frame duration. And we might program this bit any
point(start/End) in the previous frame.
With 20mSec, observed the timeout for change in encryption status.
Since this is not time critical operation and we need to hold on
until the status is changed, fixing the timeout to 50mSec. (Based on
trial and error method!)
v2:
%s/TIME_FOR_ENCRYPT_STATUS_CHANGE/ENCRYPT_STATUS_CHANGE_TIMEOUT_MS
[Sean Paul]
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
---
drivers/gpu/drm/i915/intel_hdcp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
index bccfb001340a..42541b50e575 100644
--- a/drivers/gpu/drm/i915/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/intel_hdcp.c
@@ -15,6 +15,7 @@
#include "i915_reg.h"
#define KEY_LOAD_TRIES 5
+#define ENCRYPT_STATUS_CHANGE_TIMEOUT_MS 50
static
bool intel_hdcp_is_ksv_valid(u8 *ksv)
@@ -637,7 +638,8 @@ static int intel_hdcp_auth(struct intel_digital_port *intel_dig_port,
/* Wait for encryption confirmation */
if (intel_wait_for_register(dev_priv, PORT_HDCP_STATUS(port),
- HDCP_STATUS_ENC, HDCP_STATUS_ENC, 20)) {
+ HDCP_STATUS_ENC, HDCP_STATUS_ENC,
+ ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
DRM_ERROR("Timed out waiting for encryption\n");
return -ETIMEDOUT;
}
@@ -667,7 +669,7 @@ static int _intel_hdcp_disable(struct intel_connector *connector)
I915_WRITE(PORT_HDCP_CONF(port), 0);
if (intel_wait_for_register(dev_priv, PORT_HDCP_STATUS(port), ~0, 0,
- 20)) {
+ ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
DRM_ERROR("Failed to disable HDCP, timeout clearing status\n");
return -ETIMEDOUT;
}
--
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] 7+ messages in thread
* Re: [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4
2018-12-04 18:07 ` [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4 Ramalingam C
@ 2018-12-04 19:15 ` Ville Syrjälä
2018-12-05 11:53 ` C, Ramalingam
0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2018-12-04 19:15 UTC (permalink / raw)
To: Ramalingam C; +Cc: daniel.vetter, intel-gfx, seanpaul, dri-devel
On Tue, Dec 04, 2018 at 11:37:05PM +0530, Ramalingam C wrote:
> HDCP1.4 is enabled and validated only on GEN9+ platforms.
>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> Reviewed-by: Sean Paul <sean@poorly.run>
> ---
> drivers/gpu/drm/i915/intel_hdcp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
> index c16bffcce3b0..bccfb001340a 100644
> --- a/drivers/gpu/drm/i915/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
> @@ -769,8 +769,7 @@ static void intel_hdcp_prop_work(struct work_struct *work)
> bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port)
> {
> /* PORT E doesn't have HDCP, and PORT F is disabled */
> - return ((INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) &&
> - !IS_CHERRYVIEW(dev_priv) && port < PORT_E);
> + return ((INTEL_GEN(dev_priv) >= 9) && port < PORT_E);
Drive-by: Lots of pointless parens floating around here.
> }
>
> int intel_hdcp_init(struct intel_connector *connector,
> --
> 2.7.4
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4
2018-12-04 19:15 ` Ville Syrjälä
@ 2018-12-05 11:53 ` C, Ramalingam
0 siblings, 0 replies; 7+ messages in thread
From: C, Ramalingam @ 2018-12-05 11:53 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: daniel.vetter, intel-gfx, seanpaul, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1233 bytes --]
On 12/5/2018 12:45 AM, Ville Syrjälä wrote:
> On Tue, Dec 04, 2018 at 11:37:05PM +0530, Ramalingam C wrote:
>> HDCP1.4 is enabled and validated only on GEN9+ platforms.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> Reviewed-by: Sean Paul <sean@poorly.run>
>> ---
>> drivers/gpu/drm/i915/intel_hdcp.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
>> index c16bffcce3b0..bccfb001340a 100644
>> --- a/drivers/gpu/drm/i915/intel_hdcp.c
>> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
>> @@ -769,8 +769,7 @@ static void intel_hdcp_prop_work(struct work_struct *work)
>> bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port)
>> {
>> /* PORT E doesn't have HDCP, and PORT F is disabled */
>> - return ((INTEL_GEN(dev_priv) >= 8 || IS_HASWELL(dev_priv)) &&
>> - !IS_CHERRYVIEW(dev_priv) && port < PORT_E);
>> + return ((INTEL_GEN(dev_priv) >= 9) && port < PORT_E);
> Drive-by: Lots of pointless parens floating around here.
kept it for readability. Perhaps overkill here. Removed them.
Thanks,
--Ram
>
>> }
>>
>> int intel_hdcp_init(struct intel_connector *connector,
>> --
>> 2.7.4
[-- Attachment #1.2: Type: text/html, Size: 2161 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-05 11:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 18:07 [PATCH v3 0/4] HDCP1.4 Fixes - II Ramalingam C
2018-12-04 18:07 ` [PATCH v3 1/4] drm/i915: Fix GEN9 HDCP1.4 key load process Ramalingam C
2018-12-04 18:07 ` [PATCH v3 2/4] drm/i915: Fix platform coverage for HDCP1.4 Ramalingam C
2018-12-04 19:15 ` Ville Syrjälä
2018-12-05 11:53 ` C, Ramalingam
2018-12-04 18:07 ` [PATCH v3 3/4] drm/i915: debug log for REPLY_ACK missing Ramalingam C
2018-12-04 18:07 ` [PATCH v3 4/4] drm/i915: Increase timeout for Encrypt status change Ramalingam C
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox