* [PATCH v4] drm/i915: dont retry stream management at seq_num_m roll over
@ 2020-02-13 12:55 ` Ramalingam C
0 siblings, 0 replies; 3+ messages in thread
From: Ramalingam C @ 2020-02-13 12:55 UTC (permalink / raw)
To: intel-gfx, dri-devel; +Cc: Anshuman Gupta
When roll over detected for seq_num_m, we shouldn't continue with stream
management with rolled over value.
So we are terminating the stream management retry, on roll over of the
seq_num_m.
v2:
using drm_dbg_kms instead of DRM_DEBUG_KMS [Anshuman]
v3:
dev_priv is used as i915 [JaniN]
v4:
roll over of seq_num_m detected at the start of stream management.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
drivers/gpu/drm/i915/display/intel_hdcp.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index b24d12efae0a..f4b1dd1e62e7 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1391,6 +1391,13 @@ int _hdcp2_propagate_stream_management_info(struct intel_connector *connector)
const struct intel_hdcp_shim *shim = hdcp->shim;
int ret;
+ /*
+ * seq_num_m roll over is possible only when dynamic update of
+ * content type is supported. But implementing as per the spec.
+ */
+ if (hdcp->seq_num_m > HDCP_2_2_SEQ_NUM_MAX)
+ return -1;
+
/* Prepare RepeaterAuth_Stream_Manage msg */
msgs.stream_manage.msg_id = HDCP_2_2_REP_STREAM_MANAGE;
drm_hdcp_cpu_to_be24(msgs.stream_manage.seq_num_m, hdcp->seq_num_m);
@@ -1419,11 +1426,6 @@ int _hdcp2_propagate_stream_management_info(struct intel_connector *connector)
err_exit:
hdcp->seq_num_m++;
- if (hdcp->seq_num_m > HDCP_2_2_SEQ_NUM_MAX) {
- DRM_DEBUG_KMS("seq_num_m roll over.\n");
- ret = -1;
- }
-
return ret;
}
@@ -1618,8 +1620,11 @@ hdcp2_propagate_stream_management_info(struct intel_connector *connector)
for (i = 0; i < tries; i++) {
ret = _hdcp2_propagate_stream_management_info(connector);
- if (!ret)
+ if (!ret || connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) {
+ if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX)
+ drm_dbg_kms(&i915->drm, "seq_num_m roll over.\n");
break;
+ }
drm_dbg_kms(&i915->drm,
"HDCP2 stream management %d of %d Failed.(%d)\n",
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Intel-gfx] [PATCH v4] drm/i915: dont retry stream management at seq_num_m roll over
@ 2020-02-13 12:55 ` Ramalingam C
0 siblings, 0 replies; 3+ messages in thread
From: Ramalingam C @ 2020-02-13 12:55 UTC (permalink / raw)
To: intel-gfx, dri-devel
When roll over detected for seq_num_m, we shouldn't continue with stream
management with rolled over value.
So we are terminating the stream management retry, on roll over of the
seq_num_m.
v2:
using drm_dbg_kms instead of DRM_DEBUG_KMS [Anshuman]
v3:
dev_priv is used as i915 [JaniN]
v4:
roll over of seq_num_m detected at the start of stream management.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
drivers/gpu/drm/i915/display/intel_hdcp.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index b24d12efae0a..f4b1dd1e62e7 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -1391,6 +1391,13 @@ int _hdcp2_propagate_stream_management_info(struct intel_connector *connector)
const struct intel_hdcp_shim *shim = hdcp->shim;
int ret;
+ /*
+ * seq_num_m roll over is possible only when dynamic update of
+ * content type is supported. But implementing as per the spec.
+ */
+ if (hdcp->seq_num_m > HDCP_2_2_SEQ_NUM_MAX)
+ return -1;
+
/* Prepare RepeaterAuth_Stream_Manage msg */
msgs.stream_manage.msg_id = HDCP_2_2_REP_STREAM_MANAGE;
drm_hdcp_cpu_to_be24(msgs.stream_manage.seq_num_m, hdcp->seq_num_m);
@@ -1419,11 +1426,6 @@ int _hdcp2_propagate_stream_management_info(struct intel_connector *connector)
err_exit:
hdcp->seq_num_m++;
- if (hdcp->seq_num_m > HDCP_2_2_SEQ_NUM_MAX) {
- DRM_DEBUG_KMS("seq_num_m roll over.\n");
- ret = -1;
- }
-
return ret;
}
@@ -1618,8 +1620,11 @@ hdcp2_propagate_stream_management_info(struct intel_connector *connector)
for (i = 0; i < tries; i++) {
ret = _hdcp2_propagate_stream_management_info(connector);
- if (!ret)
+ if (!ret || connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX) {
+ if (connector->hdcp.seq_num_m > HDCP_2_2_SEQ_NUM_MAX)
+ drm_dbg_kms(&i915->drm, "seq_num_m roll over.\n");
break;
+ }
drm_dbg_kms(&i915->drm,
"HDCP2 stream management %d of %d Failed.(%d)\n",
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: dont retry stream management at seq_num_m roll over
2020-02-13 12:55 ` [Intel-gfx] " Ramalingam C
(?)
@ 2020-02-13 15:07 ` Patchwork
-1 siblings, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-02-13 15:07 UTC (permalink / raw)
To: Ramalingam C; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: dont retry stream management at seq_num_m roll over
URL : https://patchwork.freedesktop.org/series/73408/
State : failure
== Summary ==
Applying: drm/i915: dont retry stream management at seq_num_m roll over
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/display/intel_hdcp.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_hdcp.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_hdcp.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 drm/i915: dont retry stream management at seq_num_m roll over
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-13 15:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 12:55 [PATCH v4] drm/i915: dont retry stream management at seq_num_m roll over Ramalingam C
2020-02-13 12:55 ` [Intel-gfx] " Ramalingam C
2020-02-13 15:07 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.