All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object
@ 2023-05-29 11:49 Suraj Kandpal
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Suraj Kandpal @ 2023-05-29 11:49 UTC (permalink / raw)
  To: intel-gfx

Change HDCP GSC message memory allocation to use same object with
multiple pages one page pointing to input while other points to
output to avoid corruption of output message that can be caused by
overwriting.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>

Suraj Kandpal (2):
  drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message
  drm/i915/hdcp: Modify intel_gsc_send_sync function

 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 82 +++++++++++--------
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  3 +-
 2 files changed, 50 insertions(+), 35 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message
  2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
@ 2023-05-29 11:49 ` Suraj Kandpal
  2023-05-31  8:26   ` Kandpal, Suraj
  2023-06-01 22:39   ` Ceraolo Spurio, Daniele
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function Suraj Kandpal
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 9+ messages in thread
From: Suraj Kandpal @ 2023-05-29 11:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: Alan Previn

Allocate a multipage object that can be used for input
and output for intel_hdcp_gsc_message so that corruption of
output message can be avoided by the current overwriting method.

--v2
-Change approach from allocating two objects to just one multipage
object [Daniele]

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 55 +++++++++++--------
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  3 +-
 2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
index 7e52aea6aa17..72d1e261d0a9 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
@@ -621,24 +621,26 @@ static int intel_hdcp_gsc_initialize_message(struct drm_i915_private *i915,
 	struct intel_gt *gt = i915->media_gt;
 	struct drm_i915_gem_object *obj = NULL;
 	struct i915_vma *vma = NULL;
-	void *cmd;
+	void *cmd_in, *cmd_out;
 	int err;
 
-	/* allocate object of one page for HDCP command memory and store it */
-	obj = i915_gem_object_create_shmem(i915, PAGE_SIZE);
+	/* allocate object of two page for HDCP command memory and store it */
+	obj = i915_gem_object_create_shmem(i915, 2 * PAGE_SIZE);
 
 	if (IS_ERR(obj)) {
 		drm_err(&i915->drm, "Failed to allocate HDCP streaming command!\n");
 		return PTR_ERR(obj);
 	}
 
-	cmd = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true));
-	if (IS_ERR(cmd)) {
+	cmd_in = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true));
+	if (IS_ERR(cmd_in)) {
 		drm_err(&i915->drm, "Failed to map gsc message page!\n");
-		err = PTR_ERR(cmd);
+		err = PTR_ERR(cmd_in);
 		goto out_unpin;
 	}
 
+	cmd_out = cmd_in + PAGE_SIZE;
+
 	vma = i915_vma_instance(obj, &gt->ggtt->vm, NULL);
 	if (IS_ERR(vma)) {
 		err = PTR_ERR(vma);
@@ -649,9 +651,10 @@ static int intel_hdcp_gsc_initialize_message(struct drm_i915_private *i915,
 	if (err)
 		goto out_unmap;
 
-	memset(cmd, 0, obj->base.size);
+	memset(cmd_in, 0, obj->base.size);
 
-	hdcp_message->hdcp_cmd = cmd;
+	hdcp_message->hdcp_cmd_in = cmd_in;
+	hdcp_message->hdcp_cmd_out = cmd_out;
 	hdcp_message->vma = vma;
 
 	return 0;
@@ -668,7 +671,7 @@ static int intel_hdcp_gsc_hdcp2_init(struct drm_i915_private *i915)
 	struct intel_hdcp_gsc_message *hdcp_message;
 	int ret;
 
-	hdcp_message = kzalloc(sizeof(*hdcp_message), GFP_KERNEL);
+	hdcp_message = kzalloc(2 * sizeof(*hdcp_message), GFP_KERNEL);
 
 	if (!hdcp_message)
 		return -ENOMEM;
@@ -691,6 +694,8 @@ static void intel_hdcp_gsc_free_message(struct drm_i915_private *i915)
 	struct intel_hdcp_gsc_message *hdcp_message =
 					i915->display.hdcp.hdcp_message;
 
+	hdcp_message->hdcp_cmd_in = NULL;
+	hdcp_message->hdcp_cmd_out = NULL;
 	i915_vma_unpin_and_release(&hdcp_message->vma, I915_VMA_RELEASE_MAP);
 	kfree(hdcp_message);
 }
@@ -769,11 +774,11 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 				size_t msg_out_len)
 {
 	struct intel_gt *gt = i915->media_gt;
-	struct intel_gsc_mtl_header *header;
-	const size_t max_msg_size = PAGE_SIZE - sizeof(*header);
+	struct intel_gsc_mtl_header *header_in, *header_out;
+	const size_t max_msg_size = PAGE_SIZE - sizeof(*header_in);
 	struct intel_hdcp_gsc_message *hdcp_message;
-	u64 addr, host_session_id;
-	u32 reply_size, msg_size;
+	u64 addr_in, addr_out, host_session_id;
+	u32 reply_size, msg_size_in, msg_size_out;
 	int ret, tries = 0;
 
 	if (!intel_uc_uses_gsc_uc(&gt->uc))
@@ -782,16 +787,20 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 	if (msg_in_len > max_msg_size || msg_out_len > max_msg_size)
 		return -ENOSPC;
 
+	msg_size_in = msg_in_len + sizeof(*header_in);
+	msg_size_out = msg_out_len + sizeof(*header_out);
 	hdcp_message = i915->display.hdcp.hdcp_message;
-	header = hdcp_message->hdcp_cmd;
-	addr = i915_ggtt_offset(hdcp_message->vma);
+	header_in = hdcp_message->hdcp_cmd_in;
+	header_out = hdcp_message->hdcp_cmd_out;
+	addr_in = i915_ggtt_offset(hdcp_message->vma);
+	addr_out = addr_in + PAGE_SIZE;
 
-	msg_size = msg_in_len + sizeof(*header);
-	memset(header, 0, msg_size);
+	memset(header_in, 0, msg_size_in);
+	memset(header_out, 0, msg_size_out);
 	get_random_bytes(&host_session_id, sizeof(u64));
-	intel_gsc_uc_heci_cmd_emit_mtl_header(header, HECI_MEADDRESS_HDCP,
-					      msg_size, host_session_id);
-	memcpy(hdcp_message->hdcp_cmd + sizeof(*header), msg_in, msg_in_len);
+	intel_gsc_uc_heci_cmd_emit_mtl_header(header_in, HECI_MEADDRESS_HDCP,
+					      msg_size_in, host_session_id);
+	memcpy(hdcp_message->hdcp_cmd_in + sizeof(*header_in), msg_in, msg_in_len);
 
 	/*
 	 * Keep sending request in case the pending bit is set no need to add
@@ -800,7 +809,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 	 * 20 times each message 50 ms apart
 	 */
 	do {
-		ret = intel_gsc_send_sync(i915, header, addr, msg_out_len);
+		ret = intel_gsc_send_sync(i915, header_in, addr_in, msg_out_len);
 
 		/* Only try again if gsc says so */
 		if (ret != -EAGAIN)
@@ -814,7 +823,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 		goto err;
 
 	/* we use the same mem for the reply, so header is in the same loc */
-	reply_size = header->message_size - sizeof(*header);
+	reply_size = header_out->message_size - sizeof(*header_out);
 	if (reply_size > msg_out_len) {
 		drm_warn(&i915->drm, "caller with insufficient HDCP reply size %u (%d)\n",
 			 reply_size, (u32)msg_out_len);
@@ -824,7 +833,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 			    reply_size, (u32)msg_out_len);
 	}
 
-	memcpy(msg_out, hdcp_message->hdcp_cmd + sizeof(*header), msg_out_len);
+	memcpy(msg_out, hdcp_message->hdcp_cmd_out + sizeof(*header_out), msg_out_len);
 
 err:
 	return ret;
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
index 5cc9fd2e88f6..cbf96551e534 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
+++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
@@ -13,7 +13,8 @@ struct drm_i915_private;
 
 struct intel_hdcp_gsc_message {
 	struct i915_vma *vma;
-	void *hdcp_cmd;
+	void *hdcp_cmd_in;
+	void *hdcp_cmd_out;
 };
 
 bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function
  2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
@ 2023-05-29 11:49 ` Suraj Kandpal
  2023-06-01 22:44   ` Ceraolo Spurio, Daniele
  2023-05-31  1:06 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Change HDCP GSC message flow to use same object Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Suraj Kandpal @ 2023-05-29 11:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: Alan Previn

Modify intel_gsc_send_sync() to take into account header_out
and addr_out so as to use them to verify the message send status.

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 29 +++++++++++--------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
index 72d1e261d0a9..5f29c3c559fa 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
@@ -726,38 +726,42 @@ void intel_hdcp_gsc_fini(struct drm_i915_private *i915)
 }
 
 static int intel_gsc_send_sync(struct drm_i915_private *i915,
-			       struct intel_gsc_mtl_header *header, u64 addr,
+			       struct intel_gsc_mtl_header *header_in,
+			       struct intel_gsc_mtl_header *header_out,
+			       u64 addr_in, u64 addr_out,
 			       size_t msg_out_len)
 {
 	struct intel_gt *gt = i915->media_gt;
 	int ret;
 
-	header->flags = 0;
-	ret = intel_gsc_uc_heci_cmd_submit_packet(&gt->uc.gsc, addr,
-						  header->message_size,
-						  addr,
-						  msg_out_len + sizeof(*header));
+	ret = intel_gsc_uc_heci_cmd_submit_packet(&gt->uc.gsc, addr_in,
+						  header_in->message_size,
+						  addr_out,
+						  msg_out_len + sizeof(*header_out));
 	if (ret) {
 		drm_err(&i915->drm, "failed to send gsc HDCP msg (%d)\n", ret);
 		return ret;
 	}
 
 	/*
-	 * Checking validity marker for memory sanity
+	 * Checking validity marker and header status to see if some error has
+	 * blocked us from sending message to gsc cs
 	 */
-	if (header->validity_marker != GSC_HECI_VALIDITY_MARKER) {
+	if (header_out->validity_marker != GSC_HECI_VALIDITY_MARKER) {
 		drm_err(&i915->drm, "invalid validity marker\n");
 		return -EINVAL;
 	}
 
-	if (header->status != 0) {
+	if (header_out->status != 0) {
 		drm_err(&i915->drm, "header status indicates error %d\n",
-			header->status);
+			header_out->status);
 		return -EINVAL;
 	}
 
-	if (header->flags & GSC_OUTFLAG_MSG_PENDING)
+	if (header_out->flags & GSC_OUTFLAG_MSG_PENDING) {
+		header_in->gsc_message_handle = header_out->gsc_message_handle;
 		return -EAGAIN;
+	}
 
 	return 0;
 }
@@ -809,7 +813,8 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 	 * 20 times each message 50 ms apart
 	 */
 	do {
-		ret = intel_gsc_send_sync(i915, header_in, addr_in, msg_out_len);
+		ret = intel_gsc_send_sync(i915, header_in, header_out, addr_in,
+					  addr_out, msg_out_len);
 
 		/* Only try again if gsc says so */
 		if (ret != -EAGAIN)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Change HDCP GSC message flow to use same object
  2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function Suraj Kandpal
@ 2023-05-31  1:06 ` Patchwork
  2023-05-31  1:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
  2023-06-01  6:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2023-05-31  1:06 UTC (permalink / raw)
  To: Suraj Kandpal; +Cc: intel-gfx

== Series Details ==

Series: Change HDCP GSC message flow to use same object
URL   : https://patchwork.freedesktop.org/series/118499/
State : warning

== Summary ==

Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
+./arch/x86/include/asm/bitops.h:117:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:148:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:150:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:154:26: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:156:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:174:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:176:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:180:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:182:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:186:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:188:9: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:192:35: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:16: warning: unreplaced symbol 'oldbit'
+./arch/x86/include/asm/bitops.h:195:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:237:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:239:9: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:66:1: warning: unreplaced symbol 'return'
+./arch/x86/include/asm/bitops.h:92:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:100:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:100:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:105:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:107:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:108:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:109:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:111:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:111:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:112:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:112:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:121:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:128:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:166:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:168:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:169:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:170:9: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:19: warning: unreplaced symbol 'val'
+./include/asm-generic/bitops/generic-non-atomic.h:172:25: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:172:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:28:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:30:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:31:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:33:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:37:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:39:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:40:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:42:16: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:55:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:57:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:58:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:60:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:60:15: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:73:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:75:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:76:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:77:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:79:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:79:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:79:20: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:80:17: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:80:23: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:80:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:93:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/generic-non-atomic.h:95:9: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/generic-non-atomic.h:96:9: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:97:9: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:99:10: warning: unreplaced symbol 'p'
+./include/asm-generic/bitops/generic-non-atomic.h:99:14: warning: unreplaced symbol 'old'
+./include/asm-generic/bitops/generic-non-atomic.h:99:21: warning: unreplaced symbol 'mask'
+./include/asm-generic/bitops/instrumented-non-atomic.h:100:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:112:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:115:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:127:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:130:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:139:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:142:9: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:26:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:42:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:58:1: warning: unreplaced symbol 'return'
+./include/asm-generic/bitops/instrumented-non-atomic.h:97:1: warning: unreplaced symbol 'return'



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for Change HDCP GSC message flow to use same object
  2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
                   ` (2 preceding siblings ...)
  2023-05-31  1:06 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Change HDCP GSC message flow to use same object Patchwork
@ 2023-05-31  1:21 ` Patchwork
  2023-06-01  6:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2023-05-31  1:21 UTC (permalink / raw)
  To: Suraj Kandpal; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 7853 bytes --]

== Series Details ==

Series: Change HDCP GSC message flow to use same object
URL   : https://patchwork.freedesktop.org/series/118499/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13202 -> Patchwork_118499v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/index.html

Participating hosts (38 -> 38)
------------------------------

  No changes in participating hosts

Known issues
------------

  Here are the changes found in Patchwork_118499v1 that come from known issues:

### CI changes ###

#### Possible fixes ####

  * boot:
    - fi-kbl-8809g:       [FAIL][1] ([i915#8293] / [i915#8298]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/fi-kbl-8809g/boot.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/boot.html

  

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@unbind-rebind:
    - fi-kbl-8809g:       NOTRUN -> [ABORT][3] ([i915#8298] / [i915#8299] / [i915#8397])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@core_hotunplug@unbind-rebind.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@gem_huc_copy@huc-copy.html

  * igt@i915_selftest@live@requests:
    - bat-rpls-2:         [PASS][5] -> [ABORT][6] ([i915#7913])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-rpls-2/igt@i915_selftest@live@requests.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-rpls-2/igt@i915_selftest@live@requests.html
    - bat-rpls-1:         [PASS][7] -> [ABORT][8] ([i915#4983] / [i915#7911] / [i915#7920])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-rpls-1/igt@i915_selftest@live@requests.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-rpls-1/igt@i915_selftest@live@requests.html

  * igt@kms_addfb_basic@too-high:
    - fi-kbl-8809g:       NOTRUN -> [FAIL][9] ([i915#8296]) +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@kms_addfb_basic@too-high.html

  * igt@kms_force_connector_basic@force-connector-state:
    - fi-kbl-8809g:       NOTRUN -> [DMESG-FAIL][10] ([i915#8299])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@kms_force_connector_basic@force-connector-state.html

  * igt@kms_force_connector_basic@force-edid:
    - fi-kbl-8809g:       NOTRUN -> [CRASH][11] ([i915#8299])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@kms_force_connector_basic@force-edid.html

  * igt@kms_psr@cursor_plane_move:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][12] ([fdo#109271]) +59 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@kms_psr@cursor_plane_move.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#4579])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-kbl-8809g/igt@kms_setmode@basic-clone-single-crtc.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-hsw-4770:        [SKIP][14] ([fdo#109271]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/fi-hsw-4770/igt@i915_pm_rpm@basic-pci-d3-state.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-hsw-4770/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@i915_pm_rpm@basic-rte:
    - fi-hsw-4770:        [FAIL][16] ([i915#7364]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/fi-hsw-4770/igt@i915_pm_rpm@basic-rte.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-hsw-4770/igt@i915_pm_rpm@basic-rte.html

  * igt@i915_selftest@live@gt_mocs:
    - {bat-mtlp-8}:       [DMESG-FAIL][18] ([i915#7059]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-mtlp-8/igt@i915_selftest@live@gt_mocs.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-mtlp-8/igt@i915_selftest@live@gt_mocs.html

  * igt@i915_selftest@live@hangcheck:
    - fi-skl-guc:         [DMESG-WARN][20] ([i915#8073]) -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/fi-skl-guc/igt@i915_selftest@live@hangcheck.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/fi-skl-guc/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@slpc:
    - {bat-mtlp-6}:       [DMESG-WARN][22] ([i915#6367]) -> [PASS][23]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-mtlp-6/igt@i915_selftest@live@slpc.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-mtlp-6/igt@i915_selftest@live@slpc.html
    - {bat-mtlp-8}:       [DMESG-WARN][24] ([i915#6367]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-mtlp-8/igt@i915_selftest@live@slpc.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-mtlp-8/igt@i915_selftest@live@slpc.html

  
#### Warnings ####

  * igt@kms_psr@primary_mmap_gtt:
    - bat-rplp-1:         [SKIP][26] ([i915#1072]) -> [ABORT][27] ([i915#8442])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/bat-rplp-1/igt@kms_psr@primary_mmap_gtt.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
  [i915#7364]: https://gitlab.freedesktop.org/drm/intel/issues/7364
  [i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7920]: https://gitlab.freedesktop.org/drm/intel/issues/7920
  [i915#8073]: https://gitlab.freedesktop.org/drm/intel/issues/8073
  [i915#8189]: https://gitlab.freedesktop.org/drm/intel/issues/8189
  [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
  [i915#8296]: https://gitlab.freedesktop.org/drm/intel/issues/8296
  [i915#8298]: https://gitlab.freedesktop.org/drm/intel/issues/8298
  [i915#8299]: https://gitlab.freedesktop.org/drm/intel/issues/8299
  [i915#8397]: https://gitlab.freedesktop.org/drm/intel/issues/8397
  [i915#8442]: https://gitlab.freedesktop.org/drm/intel/issues/8442


Build changes
-------------

  * Linux: CI_DRM_13202 -> Patchwork_118499v1

  CI-20190529: 20190529
  CI_DRM_13202: cb4a9d17f1ae011ad60f6bf502b0c7216d6390d0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7311: c031030f39aff973330668a5a2f1593408da78ae @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_118499v1: cb4a9d17f1ae011ad60f6bf502b0c7216d6390d0 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

54839080eaf1 drm/i915/hdcp: Modify intel_gsc_send_sync function
a86eef6d2be5 drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/index.html

[-- Attachment #2: Type: text/html, Size: 9193 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
@ 2023-05-31  8:26   ` Kandpal, Suraj
  2023-06-01 22:39   ` Ceraolo Spurio, Daniele
  1 sibling, 0 replies; 9+ messages in thread
From: Kandpal, Suraj @ 2023-05-31  8:26 UTC (permalink / raw)
  To: intel-gfx; +Cc: Teres Alexis, Alan Previn

Gentle Reminder!

Regards,
Suraj Kandpal

> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal@intel.com>
> Sent: Monday, May 29, 2023 5:19 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Kandpal, Suraj <suraj.kandpal@intel.com>; Nautiyal, Ankit K
> <ankit.k.nautiyal@intel.com>; Teres Alexis, Alan Previn
> <alan.previn.teres.alexis@intel.com>; Ceraolo Spurio, Daniele
> <daniele.ceraolospurio@intel.com>
> Subject: [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to
> hdcp_gsc_message
> 
> Allocate a multipage object that can be used for input and output for
> intel_hdcp_gsc_message so that corruption of output message can be
> avoided by the current overwriting method.
> 
> --v2
> -Change approach from allocating two objects to just one multipage object
> [Daniele]
> 
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 55 +++++++++++--------
> drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  3 +-
>  2 files changed, 34 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> index 7e52aea6aa17..72d1e261d0a9 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> @@ -621,24 +621,26 @@ static int intel_hdcp_gsc_initialize_message(struct
> drm_i915_private *i915,
>  	struct intel_gt *gt = i915->media_gt;
>  	struct drm_i915_gem_object *obj = NULL;
>  	struct i915_vma *vma = NULL;
> -	void *cmd;
> +	void *cmd_in, *cmd_out;
>  	int err;
> 
> -	/* allocate object of one page for HDCP command memory and store
> it */
> -	obj = i915_gem_object_create_shmem(i915, PAGE_SIZE);
> +	/* allocate object of two page for HDCP command memory and store
> it */
> +	obj = i915_gem_object_create_shmem(i915, 2 * PAGE_SIZE);
> 
>  	if (IS_ERR(obj)) {
>  		drm_err(&i915->drm, "Failed to allocate HDCP streaming
> command!\n");
>  		return PTR_ERR(obj);
>  	}
> 
> -	cmd = i915_gem_object_pin_map_unlocked(obj,
> i915_coherent_map_type(i915, obj, true));
> -	if (IS_ERR(cmd)) {
> +	cmd_in = i915_gem_object_pin_map_unlocked(obj,
> i915_coherent_map_type(i915, obj, true));
> +	if (IS_ERR(cmd_in)) {
>  		drm_err(&i915->drm, "Failed to map gsc message page!\n");
> -		err = PTR_ERR(cmd);
> +		err = PTR_ERR(cmd_in);
>  		goto out_unpin;
>  	}
> 
> +	cmd_out = cmd_in + PAGE_SIZE;
> +
>  	vma = i915_vma_instance(obj, &gt->ggtt->vm, NULL);
>  	if (IS_ERR(vma)) {
>  		err = PTR_ERR(vma);
> @@ -649,9 +651,10 @@ static int intel_hdcp_gsc_initialize_message(struct
> drm_i915_private *i915,
>  	if (err)
>  		goto out_unmap;
> 
> -	memset(cmd, 0, obj->base.size);
> +	memset(cmd_in, 0, obj->base.size);
> 
> -	hdcp_message->hdcp_cmd = cmd;
> +	hdcp_message->hdcp_cmd_in = cmd_in;
> +	hdcp_message->hdcp_cmd_out = cmd_out;
>  	hdcp_message->vma = vma;
> 
>  	return 0;
> @@ -668,7 +671,7 @@ static int intel_hdcp_gsc_hdcp2_init(struct
> drm_i915_private *i915)
>  	struct intel_hdcp_gsc_message *hdcp_message;
>  	int ret;
> 
> -	hdcp_message = kzalloc(sizeof(*hdcp_message), GFP_KERNEL);
> +	hdcp_message = kzalloc(2 * sizeof(*hdcp_message), GFP_KERNEL);
> 
>  	if (!hdcp_message)
>  		return -ENOMEM;
> @@ -691,6 +694,8 @@ static void intel_hdcp_gsc_free_message(struct
> drm_i915_private *i915)
>  	struct intel_hdcp_gsc_message *hdcp_message =
>  					i915->display.hdcp.hdcp_message;
> 
> +	hdcp_message->hdcp_cmd_in = NULL;
> +	hdcp_message->hdcp_cmd_out = NULL;
>  	i915_vma_unpin_and_release(&hdcp_message->vma,
> I915_VMA_RELEASE_MAP);
>  	kfree(hdcp_message);
>  }
> @@ -769,11 +774,11 @@ ssize_t intel_hdcp_gsc_msg_send(struct
> drm_i915_private *i915, u8 *msg_in,
>  				size_t msg_out_len)
>  {
>  	struct intel_gt *gt = i915->media_gt;
> -	struct intel_gsc_mtl_header *header;
> -	const size_t max_msg_size = PAGE_SIZE - sizeof(*header);
> +	struct intel_gsc_mtl_header *header_in, *header_out;
> +	const size_t max_msg_size = PAGE_SIZE - sizeof(*header_in);
>  	struct intel_hdcp_gsc_message *hdcp_message;
> -	u64 addr, host_session_id;
> -	u32 reply_size, msg_size;
> +	u64 addr_in, addr_out, host_session_id;
> +	u32 reply_size, msg_size_in, msg_size_out;
>  	int ret, tries = 0;
> 
>  	if (!intel_uc_uses_gsc_uc(&gt->uc))
> @@ -782,16 +787,20 @@ ssize_t intel_hdcp_gsc_msg_send(struct
> drm_i915_private *i915, u8 *msg_in,
>  	if (msg_in_len > max_msg_size || msg_out_len > max_msg_size)
>  		return -ENOSPC;
> 
> +	msg_size_in = msg_in_len + sizeof(*header_in);
> +	msg_size_out = msg_out_len + sizeof(*header_out);
>  	hdcp_message = i915->display.hdcp.hdcp_message;
> -	header = hdcp_message->hdcp_cmd;
> -	addr = i915_ggtt_offset(hdcp_message->vma);
> +	header_in = hdcp_message->hdcp_cmd_in;
> +	header_out = hdcp_message->hdcp_cmd_out;
> +	addr_in = i915_ggtt_offset(hdcp_message->vma);
> +	addr_out = addr_in + PAGE_SIZE;
> 
> -	msg_size = msg_in_len + sizeof(*header);
> -	memset(header, 0, msg_size);
> +	memset(header_in, 0, msg_size_in);
> +	memset(header_out, 0, msg_size_out);
>  	get_random_bytes(&host_session_id, sizeof(u64));
> -	intel_gsc_uc_heci_cmd_emit_mtl_header(header,
> HECI_MEADDRESS_HDCP,
> -					      msg_size, host_session_id);
> -	memcpy(hdcp_message->hdcp_cmd + sizeof(*header), msg_in,
> msg_in_len);
> +	intel_gsc_uc_heci_cmd_emit_mtl_header(header_in,
> HECI_MEADDRESS_HDCP,
> +					      msg_size_in, host_session_id);
> +	memcpy(hdcp_message->hdcp_cmd_in + sizeof(*header_in),
> msg_in,
> +msg_in_len);
> 
>  	/*
>  	 * Keep sending request in case the pending bit is set no need to add
> @@ -800,7 +809,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct
> drm_i915_private *i915, u8 *msg_in,
>  	 * 20 times each message 50 ms apart
>  	 */
>  	do {
> -		ret = intel_gsc_send_sync(i915, header, addr, msg_out_len);
> +		ret = intel_gsc_send_sync(i915, header_in, addr_in,
> msg_out_len);
> 
>  		/* Only try again if gsc says so */
>  		if (ret != -EAGAIN)
> @@ -814,7 +823,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct
> drm_i915_private *i915, u8 *msg_in,
>  		goto err;
> 
>  	/* we use the same mem for the reply, so header is in the same loc
> */
> -	reply_size = header->message_size - sizeof(*header);
> +	reply_size = header_out->message_size - sizeof(*header_out);
>  	if (reply_size > msg_out_len) {
>  		drm_warn(&i915->drm, "caller with insufficient HDCP reply
> size %u (%d)\n",
>  			 reply_size, (u32)msg_out_len);
> @@ -824,7 +833,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct
> drm_i915_private *i915, u8 *msg_in,
>  			    reply_size, (u32)msg_out_len);
>  	}
> 
> -	memcpy(msg_out, hdcp_message->hdcp_cmd + sizeof(*header),
> msg_out_len);
> +	memcpy(msg_out, hdcp_message->hdcp_cmd_out +
> sizeof(*header_out),
> +msg_out_len);
> 
>  err:
>  	return ret;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> index 5cc9fd2e88f6..cbf96551e534 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> @@ -13,7 +13,8 @@ struct drm_i915_private;
> 
>  struct intel_hdcp_gsc_message {
>  	struct i915_vma *vma;
> -	void *hdcp_cmd;
> +	void *hdcp_cmd_in;
> +	void *hdcp_cmd_out;
>  };
> 
>  bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for Change HDCP GSC message flow to use same object
  2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
                   ` (3 preceding siblings ...)
  2023-05-31  1:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2023-06-01  6:03 ` Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2023-06-01  6:03 UTC (permalink / raw)
  To: Kandpal, Suraj; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 16236 bytes --]

== Series Details ==

Series: Change HDCP GSC message flow to use same object
URL   : https://patchwork.freedesktop.org/series/118499/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13202_full -> Patchwork_118499v1_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with Patchwork_118499v1_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_118499v1_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (7 -> 8)
------------------------------

  Additional (1): shard-rkl0 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_118499v1_full:

### IGT changes ###

#### Warnings ####

  * igt@kms_hdmi_inject@inject-audio:
    - shard-snb:          [SKIP][1] ([fdo#109271]) -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-snb1/igt@kms_hdmi_inject@inject-audio.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-snb7/igt@kms_hdmi_inject@inject-audio.html

  
New tests
---------

  New tests have been introduced between CI_DRM_13202_full and Patchwork_118499v1_full:

### New IGT tests (1) ###

  * igt@kms_flip@flip-vs-panning-vs-hang@b-hdmi-a1:
    - Statuses : 1 pass(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in Patchwork_118499v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [PASS][3] -> [FAIL][4] ([i915#2846])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk3/igt@gem_exec_fair@basic-deadline.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk4/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_lmem_swapping@verify-ccs:
    - shard-glk:          NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#4613])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk5/igt@gem_lmem_swapping@verify-ccs.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-glk:          [PASS][6] -> [ABORT][7] ([i915#5566])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk8/igt@gen9_exec_parse@allowed-single.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk3/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_selftest@live@gt_heartbeat:
    - shard-glk:          [PASS][8] -> [DMESG-FAIL][9] ([i915#5334])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk1/igt@i915_selftest@live@gt_heartbeat.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk1/igt@i915_selftest@live@gt_heartbeat.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][10] ([fdo#109271]) +16 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk5/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs.html

  * igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][11] ([fdo#109271] / [i915#3886])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk5/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-glk:          [PASS][12] -> [FAIL][13] ([i915#2346])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1:
    - shard-glk:          [PASS][14] -> [FAIL][15] ([i915#79])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk1/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk1/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode:
    - shard-glk:          NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#4579]) +1 similar issue
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk8/igt@kms_flip_scaled_crc@flip-32bpp-4tile-to-32bpp-4tiledg2rcccs-upscaling@pipe-a-valid-mode.html

  * igt@kms_plane_scaling@plane-upscale-with-modifiers-20x20@pipe-b-hdmi-a-1:
    - shard-snb:          NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#4579]) +16 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-snb1/igt@kms_plane_scaling@plane-upscale-with-modifiers-20x20@pipe-b-hdmi-a-1.html

  * igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-a-vga-1:
    - shard-snb:          NOTRUN -> [SKIP][18] ([fdo#109271]) +19 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-snb6/igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-a-vga-1.html

  * igt@kms_setmode@basic@pipe-a-hdmi-a-1:
    - shard-snb:          NOTRUN -> [FAIL][19] ([i915#5465]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-snb1/igt@kms_setmode@basic@pipe-a-hdmi-a-1.html

  * igt@perf@stress-open-close@0-rcs0:
    - shard-glk:          NOTRUN -> [ABORT][20] ([i915#5213] / [i915#7941])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk8/igt@perf@stress-open-close@0-rcs0.html

  
#### Possible fixes ####

  * igt@gem_barrier_race@remote-request@rcs0:
    - shard-glk:          [ABORT][21] ([i915#7461] / [i915#8211]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk1/igt@gem_barrier_race@remote-request@rcs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk5/igt@gem_barrier_race@remote-request@rcs0.html

  * igt@gem_eio@reset-stress:
    - {shard-dg1}:        [FAIL][23] ([i915#5784]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-dg1-17/igt@gem_eio@reset-stress.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-dg1-15/igt@gem_eio@reset-stress.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - {shard-rkl}:        [FAIL][25] ([i915#2842]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-rkl-2/igt@gem_exec_fair@basic-pace@rcs0.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-rkl-3/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@i915_pm_rc6_residency@rc6-idle@rcs0:
    - {shard-dg1}:        [FAIL][27] ([i915#3591]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-dg1-19/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-dg1-17/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html

  * igt@i915_pm_rpm@dpms-lpsp:
    - {shard-rkl}:        [SKIP][29] ([i915#1397]) -> [PASS][30] +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-rkl-2/igt@i915_pm_rpm@dpms-lpsp.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-rkl-7/igt@i915_pm_rpm@dpms-lpsp.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-apl:          [FAIL][31] ([i915#2346]) -> [PASS][32] +1 similar issue
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
    - shard-glk:          [FAIL][33] ([i915#2346]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk8/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@single-bo@pipe-b:
    - {shard-dg1}:        [INCOMPLETE][35] ([i915#8011] / [i915#8347]) -> [PASS][36] +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-dg1-19/igt@kms_cursor_legacy@single-bo@pipe-b.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-dg1-17/igt@kms_cursor_legacy@single-bo@pipe-b.html

  * igt@kms_flip@flip-vs-expired-vblank@a-hdmi-a1:
    - shard-glk:          [FAIL][37] ([i915#79]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-glk9/igt@kms_flip@flip-vs-expired-vblank@a-hdmi-a1.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-glk8/igt@kms_flip@flip-vs-expired-vblank@a-hdmi-a1.html

  * igt@kms_rotation_crc@primary-rotation-90:
    - {shard-rkl}:        [ABORT][39] ([i915#8311]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13202/shard-rkl-4/igt@kms_rotation_crc@primary-rotation-90.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_118499v1/shard-rkl-1/igt@kms_rotation_crc@primary-rotation-90.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4816]: https://gitlab.freedesktop.org/drm/intel/issues/4816
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5465]: https://gitlab.freedesktop.org/drm/intel/issues/5465
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#7941]: https://gitlab.freedesktop.org/drm/intel/issues/7941
  [i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
  [i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
  [i915#8211]: https://gitlab.freedesktop.org/drm/intel/issues/8211
  [i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
  [i915#8247]: https://gitlab.freedesktop.org/drm/intel/issues/8247
  [i915#8311]: https://gitlab.freedesktop.org/drm/intel/issues/8311
  [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
  [i915#8398]: https://gitlab.freedesktop.org/drm/intel/issues/8398
  [i915#8414]: https://gitlab.freedesktop.org/drm/intel/issues/8414
  [i915#8562]: https://gitlab.freedesktop.org/drm/intel/issues/8562


Build changes
-------------

  * Linux: CI_DRM_13202 -> Patchwork_118499v1

  CI-20190529: 20190529
  CI_DRM_13202: cb4a9d17f1ae011ad60f6bf502b0c7216d6390d0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7311: c031030f39aff973330668a5a2f1593408da78ae @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_118499v1: cb4a9d17f1ae011ad60f6bf502b0c7216d6390d0 @ 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_118499v1/index.html

[-- Attachment #2: Type: text/html, Size: 13573 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
  2023-05-31  8:26   ` Kandpal, Suraj
@ 2023-06-01 22:39   ` Ceraolo Spurio, Daniele
  1 sibling, 0 replies; 9+ messages in thread
From: Ceraolo Spurio, Daniele @ 2023-06-01 22:39 UTC (permalink / raw)
  To: Suraj Kandpal, intel-gfx; +Cc: Alan Previn



On 5/29/2023 4:49 AM, Suraj Kandpal wrote:
> Allocate a multipage object that can be used for input
> and output for intel_hdcp_gsc_message so that corruption of
> output message can be avoided by the current overwriting method.
>
> --v2
> -Change approach from allocating two objects to just one multipage
> object [Daniele]
>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 55 +++++++++++--------
>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  3 +-
>   2 files changed, 34 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> index 7e52aea6aa17..72d1e261d0a9 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> @@ -621,24 +621,26 @@ static int intel_hdcp_gsc_initialize_message(struct drm_i915_private *i915,
>   	struct intel_gt *gt = i915->media_gt;
>   	struct drm_i915_gem_object *obj = NULL;
>   	struct i915_vma *vma = NULL;
> -	void *cmd;
> +	void *cmd_in, *cmd_out;
>   	int err;
>   
> -	/* allocate object of one page for HDCP command memory and store it */
> -	obj = i915_gem_object_create_shmem(i915, PAGE_SIZE);
> +	/* allocate object of two page for HDCP command memory and store it */
> +	obj = i915_gem_object_create_shmem(i915, 2 * PAGE_SIZE);
>   
>   	if (IS_ERR(obj)) {
>   		drm_err(&i915->drm, "Failed to allocate HDCP streaming command!\n");
>   		return PTR_ERR(obj);
>   	}
>   
> -	cmd = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true));
> -	if (IS_ERR(cmd)) {
> +	cmd_in = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true));
> +	if (IS_ERR(cmd_in)) {
>   		drm_err(&i915->drm, "Failed to map gsc message page!\n");
> -		err = PTR_ERR(cmd);
> +		err = PTR_ERR(cmd_in);
>   		goto out_unpin;
>   	}
>   
> +	cmd_out = cmd_in + PAGE_SIZE;
> +
>   	vma = i915_vma_instance(obj, &gt->ggtt->vm, NULL);
>   	if (IS_ERR(vma)) {
>   		err = PTR_ERR(vma);
> @@ -649,9 +651,10 @@ static int intel_hdcp_gsc_initialize_message(struct drm_i915_private *i915,
>   	if (err)
>   		goto out_unmap;
>   
> -	memset(cmd, 0, obj->base.size);
> +	memset(cmd_in, 0, obj->base.size);
>   
> -	hdcp_message->hdcp_cmd = cmd;
> +	hdcp_message->hdcp_cmd_in = cmd_in;
> +	hdcp_message->hdcp_cmd_out = cmd_out;
>   	hdcp_message->vma = vma;
>   
>   	return 0;
> @@ -668,7 +671,7 @@ static int intel_hdcp_gsc_hdcp2_init(struct drm_i915_private *i915)
>   	struct intel_hdcp_gsc_message *hdcp_message;
>   	int ret;
>   
> -	hdcp_message = kzalloc(sizeof(*hdcp_message), GFP_KERNEL);
> +	hdcp_message = kzalloc(2 * sizeof(*hdcp_message), GFP_KERNEL);

As far as I can see you only need 1 hdcp_message structure, so no need 
to double the alloc size here.
With this fixed:

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

>   
>   	if (!hdcp_message)
>   		return -ENOMEM;
> @@ -691,6 +694,8 @@ static void intel_hdcp_gsc_free_message(struct drm_i915_private *i915)
>   	struct intel_hdcp_gsc_message *hdcp_message =
>   					i915->display.hdcp.hdcp_message;
>   
> +	hdcp_message->hdcp_cmd_in = NULL;
> +	hdcp_message->hdcp_cmd_out = NULL;
>   	i915_vma_unpin_and_release(&hdcp_message->vma, I915_VMA_RELEASE_MAP);
>   	kfree(hdcp_message);
>   }
> @@ -769,11 +774,11 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   				size_t msg_out_len)
>   {
>   	struct intel_gt *gt = i915->media_gt;
> -	struct intel_gsc_mtl_header *header;
> -	const size_t max_msg_size = PAGE_SIZE - sizeof(*header);
> +	struct intel_gsc_mtl_header *header_in, *header_out;
> +	const size_t max_msg_size = PAGE_SIZE - sizeof(*header_in);
>   	struct intel_hdcp_gsc_message *hdcp_message;
> -	u64 addr, host_session_id;
> -	u32 reply_size, msg_size;
> +	u64 addr_in, addr_out, host_session_id;
> +	u32 reply_size, msg_size_in, msg_size_out;
>   	int ret, tries = 0;
>   
>   	if (!intel_uc_uses_gsc_uc(&gt->uc))
> @@ -782,16 +787,20 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   	if (msg_in_len > max_msg_size || msg_out_len > max_msg_size)
>   		return -ENOSPC;
>   
> +	msg_size_in = msg_in_len + sizeof(*header_in);
> +	msg_size_out = msg_out_len + sizeof(*header_out);
>   	hdcp_message = i915->display.hdcp.hdcp_message;
> -	header = hdcp_message->hdcp_cmd;
> -	addr = i915_ggtt_offset(hdcp_message->vma);
> +	header_in = hdcp_message->hdcp_cmd_in;
> +	header_out = hdcp_message->hdcp_cmd_out;
> +	addr_in = i915_ggtt_offset(hdcp_message->vma);
> +	addr_out = addr_in + PAGE_SIZE;
>   
> -	msg_size = msg_in_len + sizeof(*header);
> -	memset(header, 0, msg_size);
> +	memset(header_in, 0, msg_size_in);
> +	memset(header_out, 0, msg_size_out);
>   	get_random_bytes(&host_session_id, sizeof(u64));
> -	intel_gsc_uc_heci_cmd_emit_mtl_header(header, HECI_MEADDRESS_HDCP,
> -					      msg_size, host_session_id);
> -	memcpy(hdcp_message->hdcp_cmd + sizeof(*header), msg_in, msg_in_len);
> +	intel_gsc_uc_heci_cmd_emit_mtl_header(header_in, HECI_MEADDRESS_HDCP,
> +					      msg_size_in, host_session_id);
> +	memcpy(hdcp_message->hdcp_cmd_in + sizeof(*header_in), msg_in, msg_in_len);
>   
>   	/*
>   	 * Keep sending request in case the pending bit is set no need to add
> @@ -800,7 +809,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   	 * 20 times each message 50 ms apart
>   	 */
>   	do {
> -		ret = intel_gsc_send_sync(i915, header, addr, msg_out_len);
> +		ret = intel_gsc_send_sync(i915, header_in, addr_in, msg_out_len);
>   
>   		/* Only try again if gsc says so */
>   		if (ret != -EAGAIN)
> @@ -814,7 +823,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   		goto err;
>   
>   	/* we use the same mem for the reply, so header is in the same loc */
> -	reply_size = header->message_size - sizeof(*header);
> +	reply_size = header_out->message_size - sizeof(*header_out);
>   	if (reply_size > msg_out_len) {
>   		drm_warn(&i915->drm, "caller with insufficient HDCP reply size %u (%d)\n",
>   			 reply_size, (u32)msg_out_len);
> @@ -824,7 +833,7 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   			    reply_size, (u32)msg_out_len);
>   	}
>   
> -	memcpy(msg_out, hdcp_message->hdcp_cmd + sizeof(*header), msg_out_len);
> +	memcpy(msg_out, hdcp_message->hdcp_cmd_out + sizeof(*header_out), msg_out_len);
>   
>   err:
>   	return ret;
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> index 5cc9fd2e88f6..cbf96551e534 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
> @@ -13,7 +13,8 @@ struct drm_i915_private;
>   
>   struct intel_hdcp_gsc_message {
>   	struct i915_vma *vma;
> -	void *hdcp_cmd;
> +	void *hdcp_cmd_in;
> +	void *hdcp_cmd_out;
>   };
>   
>   bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function
  2023-05-29 11:49 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function Suraj Kandpal
@ 2023-06-01 22:44   ` Ceraolo Spurio, Daniele
  0 siblings, 0 replies; 9+ messages in thread
From: Ceraolo Spurio, Daniele @ 2023-06-01 22:44 UTC (permalink / raw)
  To: Suraj Kandpal, intel-gfx; +Cc: Alan Previn



On 5/29/2023 4:49 AM, Suraj Kandpal wrote:
> Modify intel_gsc_send_sync() to take into account header_out
> and addr_out so as to use them to verify the message send status.
>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>

I think this patch should be squashed with the previous one, because if 
I understand correctly the code won't work with just the first one, 
which could be a problem with bisection. The changes themselves look ok 
to me though, so for the unified patch (with the small fix I pointed out 
in the other reply):

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> ---
>   drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 29 +++++++++++--------
>   1 file changed, 17 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> index 72d1e261d0a9..5f29c3c559fa 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
> @@ -726,38 +726,42 @@ void intel_hdcp_gsc_fini(struct drm_i915_private *i915)
>   }
>   
>   static int intel_gsc_send_sync(struct drm_i915_private *i915,
> -			       struct intel_gsc_mtl_header *header, u64 addr,
> +			       struct intel_gsc_mtl_header *header_in,
> +			       struct intel_gsc_mtl_header *header_out,
> +			       u64 addr_in, u64 addr_out,
>   			       size_t msg_out_len)
>   {
>   	struct intel_gt *gt = i915->media_gt;
>   	int ret;
>   
> -	header->flags = 0;
> -	ret = intel_gsc_uc_heci_cmd_submit_packet(&gt->uc.gsc, addr,
> -						  header->message_size,
> -						  addr,
> -						  msg_out_len + sizeof(*header));
> +	ret = intel_gsc_uc_heci_cmd_submit_packet(&gt->uc.gsc, addr_in,
> +						  header_in->message_size,
> +						  addr_out,
> +						  msg_out_len + sizeof(*header_out));
>   	if (ret) {
>   		drm_err(&i915->drm, "failed to send gsc HDCP msg (%d)\n", ret);
>   		return ret;
>   	}
>   
>   	/*
> -	 * Checking validity marker for memory sanity
> +	 * Checking validity marker and header status to see if some error has
> +	 * blocked us from sending message to gsc cs
>   	 */
> -	if (header->validity_marker != GSC_HECI_VALIDITY_MARKER) {
> +	if (header_out->validity_marker != GSC_HECI_VALIDITY_MARKER) {
>   		drm_err(&i915->drm, "invalid validity marker\n");
>   		return -EINVAL;
>   	}
>   
> -	if (header->status != 0) {
> +	if (header_out->status != 0) {
>   		drm_err(&i915->drm, "header status indicates error %d\n",
> -			header->status);
> +			header_out->status);
>   		return -EINVAL;
>   	}
>   
> -	if (header->flags & GSC_OUTFLAG_MSG_PENDING)
> +	if (header_out->flags & GSC_OUTFLAG_MSG_PENDING) {
> +		header_in->gsc_message_handle = header_out->gsc_message_handle;
>   		return -EAGAIN;
> +	}
>   
>   	return 0;
>   }
> @@ -809,7 +813,8 @@ ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
>   	 * 20 times each message 50 ms apart
>   	 */
>   	do {
> -		ret = intel_gsc_send_sync(i915, header_in, addr_in, msg_out_len);
> +		ret = intel_gsc_send_sync(i915, header_in, header_out, addr_in,
> +					  addr_out, msg_out_len);
>   
>   		/* Only try again if gsc says so */
>   		if (ret != -EAGAIN)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-01 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 11:49 [Intel-gfx] [PATCH 0/2] Change HDCP GSC message flow to use same object Suraj Kandpal
2023-05-29 11:49 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: Allocate a multipage object to hdcp_gsc_message Suraj Kandpal
2023-05-31  8:26   ` Kandpal, Suraj
2023-06-01 22:39   ` Ceraolo Spurio, Daniele
2023-05-29 11:49 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Modify intel_gsc_send_sync function Suraj Kandpal
2023-06-01 22:44   ` Ceraolo Spurio, Daniele
2023-05-31  1:06 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Change HDCP GSC message flow to use same object Patchwork
2023-05-31  1:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-06-01  6:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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.