Skip to contentSkip to conversation

Enable HDCP2.x via GSC CS

PATCH Superseded Suraj Kandpal 4 participants 18 messages Dec 22, 2022 – Dec 28, 2022

Subsystems (5)

v4 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

v4 cover Enable HDCP2.x via GSC CS

These patches enable HDCP2.x on machines MTL and above. From MTL onwards CSME is spilt into GSC and CSC and now we use GSC CS instead of MEI to talk to firmware to start HDCP authentication

--v2
-Fixing some checkpatch changes which I forgot before sending out the series

--v3
-Drop cp and fw to make naming more agnostic[Jani] -Sort header[Jani]
-remove static inline function from i915_hdcp_interface[Jani] -abstract DISPLAY_VER check[Jani]

--v4
-Remove stale comment P2 [Jani]
-Fix part where file rename looks like its removed in P2 and added in P3 [Jani]
-Add bitmask definition for host session id[Alan] -Seprating gsc load and heci cmd submission into different funcs[Alan] -Create comman function to fill gsc_mtl_header[Alan]

Anshuman Gupta (1):
drm/i915/hdcp: Keep cp fw agonstic naming convention

Suraj Kandpal (6):
drm/i915/gsc: Create GSC request submission mechanism i915/hdcp: HDCP2.x Refactoring to agnostic hdcp drm/i915/hdcp: Refactor HDCP API structures drm/i915/hdcp: Fill wired_cmd_in structures at a single place drm/i915/mtl: Add function to send command to GSC CS drm/i915/mtl: Add HDCP GSC interface

 drivers/gpu/drm/i915/Makefile                 |   3 +
 .../gpu/drm/i915/display/intel_display_core.h |   3 +-
 .../drm/i915/display/intel_display_types.h    |   2 +-
 drivers/gpu/drm/i915/display/intel_hdcp.c     | 107 +--
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 715 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  21 +
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |   2 +
 drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.h     |   1 +
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 109 +++
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h |  51 ++
 drivers/gpu/drm/i915/i915_hdcp_interface.c    | 216 ++++++
 drivers/misc/mei/hdcp/mei_hdcp.c              | 189 +----
 drivers/misc/mei/hdcp/mei_hdcp.h              | 354 ---------
 include/drm/i915_hdcp_interface.h             | 578 ++++++++++++++
 include/drm/i915_mei_hdcp_interface.h         | 184 -----
 15 files changed, 1793 insertions(+), 742 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h
 create mode 100644 drivers/gpu/drm/i915/i915_hdcp_interface.c
 create mode 100644 include/drm/i915_hdcp_interface.h
 delete mode 100644 include/drm/i915_mei_hdcp_interface.h
Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 1/7 drm/i915/gsc: Create GSC request submission mechanism

HDCP and PXP will require a common function to allow it to submit commands to the gsc cs. Also adding the gsc mtl header that needs to be added on to the existing payloads of HDCP and PXP.

--v4
-Seprate gsc load and heci cmd submission into different functions in different files for better scalability [Alan] -Rename gsc address field [Alan]

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Alan Previn <[email protected]>
---
 drivers/gpu/drm/i915/Makefile                 |  1 +
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h  |  2 +
 drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.h     |  1 +
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 94 +++++++++++++++++++
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 45 +++++++++
 5 files changed, 143 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h
drivers/gpu/drm/i915/Makefile +1 -0
index dfa211451a1d..5b5df71cb5d7 100644
@@ -191,6 +191,7 @@ i915-y += \
 i915-y += \
 	  gt/uc/intel_gsc_fw.o \
 	  gt/uc/intel_gsc_uc.o \
+	  gt/uc/intel_gsc_uc_heci_cmd_submit.o\
 	  gt/uc/intel_guc.o \
 	  gt/uc/intel_guc_ads.o \
 	  gt/uc/intel_guc_capture.o \
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +2 -0
index 2af1ae3831df..454179884801 100644
@@ -439,6 +439,8 @@
 #define GSC_FW_LOAD GSC_INSTR(1, 0, 2)
 #define   HECI1_FW_LIMIT_VALID (1 << 31)
 
+#define GSC_HECI_CMD_PKT GSC_INSTR(0, 0, 6)
+
 /*
  * Used to convert any address to canonical form.
  * Starting from gen8, some commands (e.g. STATE_BASE_ADDRESS,
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.h +1 -0
index 4b5dbb44afb4..146ac0128f69 100644
@@ -12,4 +12,5 @@ struct intel_gsc_uc;
 
 int intel_gsc_uc_fw_upload(struct intel_gsc_uc *gsc);
 bool intel_gsc_uc_fw_init_done(struct intel_gsc_uc *gsc);
+
 #endif
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c new file +94 -0

94 lines not on this page · raw message

drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.25.1
Reviewed-by on v4 1/7
#2 lore raw

Re: [Intel-gfx] [PATCH v4 1/7] drm/i915/gsc: Create GSC request submission mechanism

LGTM:

Quoted 14 lines · Suraj

HDCP and PXP will require a common function to allow it to submit commands to the gsc cs. Also adding the gsc mtl header that needs to be added on to the existing payloads of HDCP and PXP.

--v4
-Seprate gsc load and heci cmd submission into different functions in different files for better scalability [Alan] -Rename gsc address field [Alan]

Cc Daniele Ceraolo Spurio <[email protected]>
Cc Alan Previn <[email protected]>

---

#3 lore raw

PATCH v4 2/7 drm/i915/hdcp: Keep cp fw agonstic naming convention

In reply to Suraj Kandpal

From: Anshuman Gupta <[email protected]>

Change the include/drm/i915_mei_hdcp_interface.h to include/drm/i915_hdcp_interface.h

---
 .../drm/i915/display/intel_display_types.h    |  2 +-
 drivers/misc/mei/hdcp/mei_hdcp.c              |  2 +-
 ...hdcp_interface.h => i915_hdcp_interface.h} | 86 +++++++++----------
 3 files changed, 45 insertions(+), 45 deletions(-)
 rename include/drm/{i915_mei_hdcp_interface.h => i915_hdcp_interface.h} (75%)
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
index 32e8b2fc3cc6..81d195ef5e57 100644
@@ -43,7 +43,7 @@
 #include <drm/drm_rect.h>
 #include <drm/drm_vblank.h>
 #include <drm/drm_vblank_work.h>
-#include <drm/i915_mei_hdcp_interface.h>
+#include <drm/i915_hdcp_interface.h>
 #include <media/cec-notifier.h>
 
 #include "i915_vma.h"
drivers/misc/mei/hdcp/mei_hdcp.c +1 -1
index e889a8bd7ac8..cbad27511899 100644
@@ -23,7 +23,7 @@
 #include <linux/component.h>
 #include <drm/drm_connector.h>
 #include <drm/i915_component.h>
-#include <drm/i915_mei_hdcp_interface.h>
+#include <drm/i915_hdcp_interface.h>
 
 #include "mei_hdcp.h"
 
include/drm/i915_hdcp_interface.h renamed from include/drm/i915_mei_hdcp_interface.h +43 -43

135 lines not on this page · raw message

Signature · 1 line
2.25.1
#4 lore raw

PATCH v4 3/7 i915/hdcp: HDCP2.x Refactoring to agnostic hdcp

In reply to Suraj Kandpal

As now we have more then one type of content protection secrity firmware. Let change the i915_cp_fw_hdcp_interface.h header naming convention to suit generic f/w type. %s/MEI_/HDCP_
%s/mei_dev/hdcp_dev

As interface to CP FW can be either a non i915 component or i915 intergral component, change structure name Accordingly. %s/i915_hdcp_comp_master/i915_hdcp_master %s/i915_hdcp_component_ops/i915_hdcp_ops

--v3
-Changing names to drop cp_fw to make naming more agnostic[Jani]

Cc Tomas Winkler <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Ankit Nautiyal <[email protected]>
---
 .../gpu/drm/i915/display/intel_display_core.h |  3 +-
 drivers/gpu/drm/i915/display/intel_hdcp.c     | 79 ++++++++++---------
 drivers/misc/mei/hdcp/mei_hdcp.c              | 56 ++++++-------
 3 files changed, 70 insertions(+), 68 deletions(-)
drivers/gpu/drm/i915/display/intel_display_core.h +2 -1
index 57ddce3ba02b..132e9134ba05 100644
@@ -15,6 +15,7 @@
 
 #include <drm/drm_connector.h>
 #include <drm/drm_modeset_lock.h>
+#include <drm/i915_hdcp_interface.h>
 
 #include "intel_cdclk.h"
 #include "intel_display.h"
@@ -368,7 +369,7 @@ struct intel_display {
 	} gmbus;
 
 	struct {
-		struct i915_hdcp_comp_master *master;
+		struct i915_hdcp_master *master;
 		bool comp_added;
 
 		/* Mutex to protect the above hdcp component related values. */
drivers/gpu/drm/i915/display/intel_hdcp.c +40 -39

265 lines not on this page · raw message

drivers/misc/mei/hdcp/mei_hdcp.c +28 -28

157 lines not on this page · raw message

Signature · 1 line
2.25.1
#5 lore raw

PATCH v4 4/7 drm/i915/hdcp: Refactor HDCP API structures

In reply to Suraj Kandpal

It requires to move intel specific HDCP API structures to i915_cp_fw_hdcp_interface.h from driver/misc/mei/hdcp/mei_hdcp.h so that any content protection fw interfaces can use these structures.

Cc Tomas Winkler <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Ankit Nautiyal <[email protected]>
---
 drivers/misc/mei/hdcp/mei_hdcp.c  |  44 ++--
 drivers/misc/mei/hdcp/mei_hdcp.h  | 354 -----------------------------
 include/drm/i915_hdcp_interface.h | 355 ++++++++++++++++++++++++++++++
 3 files changed, 377 insertions(+), 376 deletions(-)
drivers/misc/mei/hdcp/mei_hdcp.c +22 -22
index 0ff0bd07e385..d4faecbbbe76 100644
@@ -52,7 +52,7 @@ mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
 
 	session_init_in.header.api_version = HDCP_API_VERSION;
 	session_init_in.header.command_id = WIRED_INITIATE_HDCP2_SESSION;
-	session_init_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	session_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	session_init_in.header.buffer_len =
 				WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;
 
@@ -75,7 +75,7 @@ mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
 		return byte;
 	}
 
-	if (session_init_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (session_init_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X Failed. Status: 0x%X\n",
 			WIRED_INITIATE_HDCP2_SESSION,
 			session_init_out.header.status);
@@ -122,7 +122,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
 
 	verify_rxcert_in.header.api_version = HDCP_API_VERSION;
 	verify_rxcert_in.header.command_id = WIRED_VERIFY_RECEIVER_CERT;
-	verify_rxcert_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	verify_rxcert_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	verify_rxcert_in.header.buffer_len =
 				WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;
 
@@ -148,7 +148,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
 		return byte;
 	}
 
-	if (verify_rxcert_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (verify_rxcert_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X Failed. Status: 0x%X\n",
 			WIRED_VERIFY_RECEIVER_CERT,
 			verify_rxcert_out.header.status);
@@ -194,7 +194,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct hdcp_port_data *data,
 
 	send_hprime_in.header.api_version = HDCP_API_VERSION;
 	send_hprime_in.header.command_id = WIRED_AKE_SEND_HPRIME;
-	send_hprime_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	send_hprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	send_hprime_in.header.buffer_len = WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
 
 	send_hprime_in.port.integrated_port_type = data->port_type;
@@ -218,7 +218,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct hdcp_port_data *data,
 		return byte;
 	}
 
-	if (send_hprime_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (send_hprime_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X Failed. Status: 0x%X\n",
 			WIRED_AKE_SEND_HPRIME, send_hprime_out.header.status);
 		return -EIO;
@@ -251,7 +251,7 @@ mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
 
 	pairing_info_in.header.api_version = HDCP_API_VERSION;
 	pairing_info_in.header.command_id = WIRED_AKE_SEND_PAIRING_INFO;
-	pairing_info_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	pairing_info_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	pairing_info_in.header.buffer_len =
 					WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
 
@@ -276,7 +276,7 @@ mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
 		return byte;
 	}
 
-	if (pairing_info_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (pairing_info_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. Status: 0x%X\n",
 			WIRED_AKE_SEND_PAIRING_INFO,
 			pairing_info_out.header.status);
@@ -311,7 +311,7 @@ mei_hdcp_initiate_locality_check(struct device *dev,
 
 	lc_init_in.header.api_version = HDCP_API_VERSION;
 	lc_init_in.header.command_id = WIRED_INIT_LOCALITY_CHECK;
-	lc_init_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	lc_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	lc_init_in.header.buffer_len = WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
 
 	lc_init_in.port.integrated_port_type = data->port_type;
@@ -330,7 +330,7 @@ mei_hdcp_initiate_locality_check(struct device *dev,
 		return byte;
 	}
 
-	if (lc_init_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (lc_init_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X Failed. status: 0x%X\n",
 			WIRED_INIT_LOCALITY_CHECK, lc_init_out.header.status);
 		return -EIO;
@@ -366,7 +366,7 @@ mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,
 
 	verify_lprime_in.header.api_version = HDCP_API_VERSION;
 	verify_lprime_in.header.command_id = WIRED_VALIDATE_LOCALITY;
-	verify_lprime_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	verify_lprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	verify_lprime_in.header.buffer_len =
 					WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
 
@@ -391,7 +391,7 @@ mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,
 		return byte;
 	}
 
-	if (verify_lprime_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (verify_lprime_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. status: 0x%X\n",
 			WIRED_VALIDATE_LOCALITY,
 			verify_lprime_out.header.status);
@@ -425,7 +425,7 @@ static int mei_hdcp_get_session_key(struct device *dev,
 
 	get_skey_in.header.api_version = HDCP_API_VERSION;
 	get_skey_in.header.command_id = WIRED_GET_SESSION_KEY;
-	get_skey_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	get_skey_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	get_skey_in.header.buffer_len = WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
 
 	get_skey_in.port.integrated_port_type = data->port_type;
@@ -445,7 +445,7 @@ static int mei_hdcp_get_session_key(struct device *dev,
 		return byte;
 	}
 
-	if (get_skey_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (get_skey_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. status: 0x%X\n",
 			WIRED_GET_SESSION_KEY, get_skey_out.header.status);
 		return -EIO;
@@ -489,7 +489,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,
 
 	verify_repeater_in.header.api_version = HDCP_API_VERSION;
 	verify_repeater_in.header.command_id = WIRED_VERIFY_REPEATER;
-	verify_repeater_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	verify_repeater_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	verify_repeater_in.header.buffer_len =
 					WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
 
@@ -520,7 +520,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,
 		return byte;
 	}
 
-	if (verify_repeater_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (verify_repeater_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. status: 0x%X\n",
 			WIRED_VERIFY_REPEATER,
 			verify_repeater_out.header.status);
@@ -568,7 +568,7 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 
 	verify_mprime_in->header.api_version = HDCP_API_VERSION;
 	verify_mprime_in->header.command_id = WIRED_REPEATER_AUTH_STREAM_REQ;
-	verify_mprime_in->header.status = ME_HDCP_STATUS_SUCCESS;
+	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
 	verify_mprime_in->header.buffer_len = cmd_size  - sizeof(verify_mprime_in->header);
 
 	verify_mprime_in->port.integrated_port_type = data->port_type;
@@ -597,7 +597,7 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 		return byte;
 	}
 
-	if (verify_mprime_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (verify_mprime_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. status: 0x%X\n",
 			WIRED_REPEATER_AUTH_STREAM_REQ,
 			verify_mprime_out.header.status);
@@ -630,7 +630,7 @@ static int mei_hdcp_enable_authentication(struct device *dev,
 
 	enable_auth_in.header.api_version = HDCP_API_VERSION;
 	enable_auth_in.header.command_id = WIRED_ENABLE_AUTH;
-	enable_auth_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	enable_auth_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	enable_auth_in.header.buffer_len = WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
 
 	enable_auth_in.port.integrated_port_type = data->port_type;
@@ -652,7 +652,7 @@ static int mei_hdcp_enable_authentication(struct device *dev,
 		return byte;
 	}
 
-	if (enable_auth_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (enable_auth_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "ME cmd 0x%08X failed. status: 0x%X\n",
 			WIRED_ENABLE_AUTH, enable_auth_out.header.status);
 		return -EIO;
@@ -684,7 +684,7 @@ mei_hdcp_close_session(struct device *dev, struct hdcp_port_data *data)
 
 	session_close_in.header.api_version = HDCP_API_VERSION;
 	session_close_in.header.command_id = WIRED_CLOSE_SESSION;
-	session_close_in.header.status = ME_HDCP_STATUS_SUCCESS;
+	session_close_in.header.status = FW_HDCP_STATUS_SUCCESS;
 	session_close_in.header.buffer_len =
 				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
 
@@ -706,7 +706,7 @@ mei_hdcp_close_session(struct device *dev, struct hdcp_port_data *data)
 		return byte;
 	}
 
-	if (session_close_out.header.status != ME_HDCP_STATUS_SUCCESS) {
+	if (session_close_out.header.status != FW_HDCP_STATUS_SUCCESS) {
 		dev_dbg(dev, "Session Close Failed. status: 0x%X\n",
 			session_close_out.header.status);
 		return -EIO;
drivers/misc/mei/hdcp/mei_hdcp.h +0 -354

358 lines not on this page · raw message

include/drm/i915_hdcp_interface.h +355 -0

359 lines not on this page · raw message

Signature · 1 line
2.25.1
#6 lore raw

PATCH v4 5/7 drm/i915/hdcp: Fill wired_cmd_in structures at a single place

In reply to Suraj Kandpal

Need to fill wired cmd in structures at a single place as they remain same for both gsc and mei.

--v3
-remove inline function from header [Jani]

---
 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_hdcp_interface.c | 216 +++++++++++++++++++++
 drivers/misc/mei/hdcp/mei_hdcp.c           | 153 ++-------------
 include/drm/i915_hdcp_interface.h          |  39 ++++
 4 files changed, 270 insertions(+), 139 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_hdcp_interface.c
drivers/gpu/drm/i915/Makefile +1 -0
index 5b5df71cb5d7..b0b2a47455df 100644
@@ -36,6 +36,7 @@ i915-y += i915_driver.o \
 	  i915_drm_client.o \
 	  i915_config.o \
 	  i915_getparam.o \
+	  i915_hdcp_interface.o\
 	  i915_ioctl.o \
 	  i915_irq.o \
 	  i915_mitigations.o \
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +216 -0

216 lines not on this page · raw message

drivers/misc/mei/hdcp/mei_hdcp.c +14 -139

219 lines not on this page · raw message

include/drm/i915_hdcp_interface.h +39 -0
index a92925cd1eae..9952bf78d4f7 100644
@@ -536,4 +536,43 @@ struct wired_cmd_repeater_auth_stream_req_out {
 	struct hdcp_port_id	port;
 } __packed;
 
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in *session_init_in,
+			  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in *verify_rxcert_in,
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in *send_hprime_in,
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in *pairing_info_in,
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data);
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in *lc_init_in,
+				 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in *verify_lprime_in,
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data);
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in *get_skey_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in *verify_repeater_in,
+			   struct hdcp2_rep_send_receiverid_list *rep_topology,
+			   struct hdcp_port_data *data);
+void
+i915_hdcp_fill_auth_stream_req_in(struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,
+				  struct hdcp2_rep_stream_ready *stream_ready, ssize_t cmd_size,
+				  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in *enable_auth_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in *session_close_in,
+				struct hdcp_port_data *data);
 #endif /* _I915_HDCP_INTERFACE_H_ */
Signature · 1 line
2.25.1
#7 lore raw

Re: [Intel-gfx] [PATCH v4 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place

Quoted 2 lines · Suraj Kandpal

Need to fill wired cmd in structures at a single place as they remain same for both gsc and mei.

It's probably a good idea to have them in a single place, but there's really no reason for that place to be part of i915 at all.

None of the functions are about i915.

Feels weird to have MEI HDCP call back to i915. It's supposed to be the glue layer between i915 and ME FW. Maybe the abstractions are wrong?

We currently have a total of 5 exported symbols, and I'd prefer to keep it that way.

BR,
Jani.

Quoted 530 lines

--v3
-remove inline function from header [Jani]

---
 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_hdcp_interface.c | 216 +++++++++++++++++++++
 drivers/misc/mei/hdcp/mei_hdcp.c           | 153 ++-------------
 include/drm/i915_hdcp_interface.h          |  39 ++++
 4 files changed, 270 insertions(+), 139 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_hdcp_interface.c
drivers/gpu/drm/i915/Makefile +1 -0
index 5b5df71cb5d7..b0b2a47455df 100644
@@ -36,6 +36,7 @@ i915-y += i915_driver.o \
 	  i915_drm_client.o \
 	  i915_config.o \
 	  i915_getparam.o \
+	  i915_hdcp_interface.o\
 	  i915_ioctl.o \
 	  i915_irq.o \
 	  i915_mitigations.o \
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +216 -0
new file mode 100644
index 000000000000..e6b787c2fa50
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2022, Intel Corporation.
+ */
+
+#include <drm/i915_hdcp_interface.h>
+
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in *session_init_in,
+			  struct hdcp_port_data *data)
+{
+	session_init_in->header.api_version = HDCP_API_VERSION;
+	session_init_in->header.command_id = WIRED_INITIATE_HDCP2_SESSION;
+	session_init_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_init_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;
+
+	session_init_in->port.integrated_port_type = data->port_type;
+	session_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_init_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+	session_init_in->protocol = data->protocol;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_session_in);
+
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in *verify_rxcert_in,
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data)
+{
+	verify_rxcert_in->header.api_version = HDCP_API_VERSION;
+	verify_rxcert_in->header.command_id = WIRED_VERIFY_RECEIVER_CERT;
+	verify_rxcert_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_rxcert_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;
+
+	verify_rxcert_in->port.integrated_port_type = data->port_type;
+	verify_rxcert_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_rxcert_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	verify_rxcert_in->cert_rx = rx_cert->cert_rx;
+	memcpy(verify_rxcert_in->r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
+	memcpy(verify_rxcert_in->rx_caps, rx_cert->rx_caps, HDCP_2_2_RXCAPS_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_rxcert_in);
+
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in *send_hprime_in,
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data)
+{
+	send_hprime_in->header.api_version = HDCP_API_VERSION;
+	send_hprime_in->header.command_id = WIRED_AKE_SEND_HPRIME;
+	send_hprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	send_hprime_in->header.buffer_len = WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
+
+	send_hprime_in->port.integrated_port_type = data->port_type;
+	send_hprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	send_hprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(send_hprime_in->h_prime, rx_hprime->h_prime,
+	       HDCP_2_2_H_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_hprime_in);
+
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in *pairing_info_in,
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data)
+{
+	pairing_info_in->header.api_version = HDCP_API_VERSION;
+	pairing_info_in->header.command_id = WIRED_AKE_SEND_PAIRING_INFO;
+	pairing_info_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	pairing_info_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
+
+	pairing_info_in->port.integrated_port_type = data->port_type;
+	pairing_info_in->port.physical_port = (u8)data->hdcp_ddi;
+	pairing_info_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(pairing_info_in->e_kh_km, pairing_info->e_kh_km,
+	       HDCP_2_2_E_KH_KM_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_pairing_info_in);
+
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in *lc_init_in,
+				 struct hdcp_port_data *data)
+{
+	lc_init_in->header.api_version = HDCP_API_VERSION;
+	lc_init_in->header.command_id = WIRED_INIT_LOCALITY_CHECK;
+	lc_init_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	lc_init_in->header.buffer_len = WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
+
+	lc_init_in->port.integrated_port_type = data->port_type;
+	lc_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	lc_init_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_locality_check_in);
+
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in *verify_lprime_in,
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data)
+{
+	verify_lprime_in->header.api_version = HDCP_API_VERSION;
+	verify_lprime_in->header.command_id = WIRED_VALIDATE_LOCALITY;
+	verify_lprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_lprime_in->header.buffer_len =
+					WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
+
+	verify_lprime_in->port.integrated_port_type = data->port_type;
+	verify_lprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_lprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_lprime_in->l_prime, rx_lprime->l_prime,
+	       HDCP_2_2_L_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_validate_locality_in);
+
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in *get_skey_in,
+			      struct hdcp_port_data *data)
+{
+	get_skey_in->header.api_version = HDCP_API_VERSION;
+	get_skey_in->header.command_id = WIRED_GET_SESSION_KEY;
+	get_skey_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	get_skey_in->header.buffer_len = WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
+
+	get_skey_in->port.integrated_port_type = data->port_type;
+	get_skey_in->port.physical_port = (u8)data->hdcp_ddi;
+	get_skey_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_session_key_in);
+
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in *verify_repeater_in,
+			   struct hdcp2_rep_send_receiverid_list *rep_topology,
+			   struct hdcp_port_data *data)
+{
+	verify_repeater_in->header.api_version = HDCP_API_VERSION;
+	verify_repeater_in->header.command_id = WIRED_VERIFY_REPEATER;
+	verify_repeater_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_repeater_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
+
+	verify_repeater_in->port.integrated_port_type = data->port_type;
+	verify_repeater_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_repeater_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_repeater_in->rx_info, rep_topology->rx_info,
+	       HDCP_2_2_RXINFO_LEN);
+	memcpy(verify_repeater_in->seq_num_v, rep_topology->seq_num_v,
+	       HDCP_2_2_SEQ_NUM_LEN);
+	memcpy(verify_repeater_in->v_prime, rep_topology->v_prime,
+	       HDCP_2_2_V_PRIME_HALF_LEN);
+	memcpy(verify_repeater_in->receiver_ids, rep_topology->receiver_ids,
+	       HDCP_2_2_RECEIVER_IDS_MAX_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_repeater_in);
+
+void
+i915_hdcp_fill_auth_stream_req_in(struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,
+				  struct hdcp2_rep_stream_ready *stream_ready, ssize_t cmd_size,
+				  struct hdcp_port_data *data)
+{
+	verify_mprime_in->header.api_version = HDCP_API_VERSION;
+	verify_mprime_in->header.command_id = WIRED_REPEATER_AUTH_STREAM_REQ;
+	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_mprime_in->header.buffer_len = cmd_size  - sizeof(verify_mprime_in->header);
+
+	verify_mprime_in->port.integrated_port_type = data->port_type;
+	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_mprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime, HDCP_2_2_MPRIME_LEN);
+	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data->seq_num_m);
+
+	memcpy(verify_mprime_in->streams, data->streams,
+	       array_size(data->k, sizeof(*data->streams)));
+
+	verify_mprime_in->k = cpu_to_be16(data->k);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_auth_stream_req_in);
+
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in *enable_auth_in,
+			      struct hdcp_port_data *data)
+{
+	enable_auth_in->header.api_version = HDCP_API_VERSION;
+	enable_auth_in->header.command_id = WIRED_ENABLE_AUTH;
+	enable_auth_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	enable_auth_in->header.buffer_len = WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
+
+	enable_auth_in->port.integrated_port_type = data->port_type;
+	enable_auth_in->port.physical_port = (u8)data->hdcp_ddi;
+	enable_auth_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+	enable_auth_in->stream_type = data->streams[0].stream_type;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_enable_auth_in);
+
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in *session_close_in,
+				struct hdcp_port_data *data)
+{
+	session_close_in->header.api_version = HDCP_API_VERSION;
+	session_close_in->header.command_id = WIRED_CLOSE_SESSION;
+	session_close_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_close_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
+
+	session_close_in->port.integrated_port_type = data->port_type;
+	session_close_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_close_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_close_session_in);
+
drivers/misc/mei/hdcp/mei_hdcp.c +14 -139
index d4faecbbbe76..2cf42e98dfae 100644
@@ -50,17 +50,7 @@ mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	session_init_in.header.api_version = HDCP_API_VERSION;
-	session_init_in.header.command_id = WIRED_INITIATE_HDCP2_SESSION;
-	session_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_init_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;
-
-	session_init_in.port.integrated_port_type = data->port_type;
-	session_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-	session_init_in.protocol = data->protocol;
-
+	i915_hdcp_fill_session_in(&session_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_init_in,
 			      sizeof(session_init_in));
 	if (byte < 0) {
@@ -119,21 +109,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	verify_rxcert_in.header.api_version = HDCP_API_VERSION;
-	verify_rxcert_in.header.command_id = WIRED_VERIFY_RECEIVER_CERT;
-	verify_rxcert_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_rxcert_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;
-
-	verify_rxcert_in.port.integrated_port_type = data->port_type;
-	verify_rxcert_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_rxcert_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	verify_rxcert_in.cert_rx = rx_cert->cert_rx;
-	memcpy(verify_rxcert_in.r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
-	memcpy(verify_rxcert_in.rx_caps, rx_cert->rx_caps, HDCP_2_2_RXCAPS_LEN);
-
+	i915_hdcp_fill_rxcert_in(&verify_rxcert_in, rx_cert, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_rxcert_in,
 			      sizeof(verify_rxcert_in));
 	if (byte < 0) {
@@ -192,18 +168,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	send_hprime_in.header.api_version = HDCP_API_VERSION;
-	send_hprime_in.header.command_id = WIRED_AKE_SEND_HPRIME;
-	send_hprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	send_hprime_in.header.buffer_len = WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
-
-	send_hprime_in.port.integrated_port_type = data->port_type;
-	send_hprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	send_hprime_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(send_hprime_in.h_prime, rx_hprime->h_prime,
-	       HDCP_2_2_H_PRIME_LEN);
-
+	i915_hdcp_fill_hprime_in(&send_hprime_in, rx_hprime, data);
 	byte = mei_cldev_send(cldev, (u8 *)&send_hprime_in,
 			      sizeof(send_hprime_in));
 	if (byte < 0) {
@@ -248,20 +213,8 @@ mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	pairing_info_in.header.api_version = HDCP_API_VERSION;
-	pairing_info_in.header.command_id = WIRED_AKE_SEND_PAIRING_INFO;
-	pairing_info_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	pairing_info_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
-
-	pairing_info_in.port.integrated_port_type = data->port_type;
-	pairing_info_in.port.physical_port = (u8)data->hdcp_ddi;
-	pairing_info_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(pairing_info_in.e_kh_km, pairing_info->e_kh_km,
-	       HDCP_2_2_E_KH_KM_LEN);
-
+	i915_hdcp_fill_pairing_info_in(&pairing_info_in, pairing_info,
+				       data);
 	byte = mei_cldev_send(cldev, (u8 *)&pairing_info_in,
 			      sizeof(pairing_info_in));
 	if (byte < 0) {
@@ -309,15 +262,7 @@ mei_hdcp_initiate_locality_check(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	lc_init_in.header.api_version = HDCP_API_VERSION;
-	lc_init_in.header.command_id = WIRED_INIT_LOCALITY_CHECK;
-	lc_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	lc_init_in.header.buffer_len = WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
-
-	lc_init_in.port.integrated_port_type = data->port_type;
-	lc_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	lc_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_locality_check_in(&lc_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&lc_init_in, sizeof(lc_init_in));
 	if (byte < 0) {
 		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
@@ -364,19 +309,8 @@ mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	verify_lprime_in.header.api_version = HDCP_API_VERSION;
-	verify_lprime_in.header.command_id = WIRED_VALIDATE_LOCALITY;
-	verify_lprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_lprime_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
-
-	verify_lprime_in.port.integrated_port_type = data->port_type;
-	verify_lprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_lprime_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_lprime_in.l_prime, rx_lprime->l_prime,
-	       HDCP_2_2_L_PRIME_LEN);
-
+	i915_hdcp_fill_validate_locality_in(&verify_lprime_in, rx_lprime,
+					    data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_lprime_in,
 			      sizeof(verify_lprime_in));
 	if (byte < 0) {
@@ -423,15 +357,7 @@ static int mei_hdcp_get_session_key(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	get_skey_in.header.api_version = HDCP_API_VERSION;
-	get_skey_in.header.command_id = WIRED_GET_SESSION_KEY;
-	get_skey_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	get_skey_in.header.buffer_len = WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
-
-	get_skey_in.port.integrated_port_type = data->port_type;
-	get_skey_in.port.physical_port = (u8)data->hdcp_ddi;
-	get_skey_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_session_key_in(&get_skey_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&get_skey_in, sizeof(get_skey_in));
 	if (byte < 0) {
 		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
@@ -487,25 +413,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	verify_repeater_in.header.api_version = HDCP_API_VERSION;
-	verify_repeater_in.header.command_id = WIRED_VERIFY_REPEATER;
-	verify_repeater_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_repeater_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
-
-	verify_repeater_in.port.integrated_port_type = data->port_type;
-	verify_repeater_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_repeater_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_repeater_in.rx_info, rep_topology->rx_info,
-	       HDCP_2_2_RXINFO_LEN);
-	memcpy(verify_repeater_in.seq_num_v, rep_topology->seq_num_v,
-	       HDCP_2_2_SEQ_NUM_LEN);
-	memcpy(verify_repeater_in.v_prime, rep_topology->v_prime,
-	       HDCP_2_2_V_PRIME_HALF_LEN);
-	memcpy(verify_repeater_in.receiver_ids, rep_topology->receiver_ids,
-	       HDCP_2_2_RECEIVER_IDS_MAX_LEN);
-
+	i915_hdcp_fill_repeater_in(&verify_repeater_in, rep_topology, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_repeater_in,
 			      sizeof(verify_repeater_in));
 	if (byte < 0) {
@@ -566,23 +474,8 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 	if (!verify_mprime_in)
 		return -ENOMEM;
 
-	verify_mprime_in->header.api_version = HDCP_API_VERSION;
-	verify_mprime_in->header.command_id = WIRED_REPEATER_AUTH_STREAM_REQ;
-	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_mprime_in->header.buffer_len = cmd_size  - sizeof(verify_mprime_in->header);
-
-	verify_mprime_in->port.integrated_port_type = data->port_type;
-	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
-	verify_mprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime, HDCP_2_2_MPRIME_LEN);
-	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data->seq_num_m);
-
-	memcpy(verify_mprime_in->streams, data->streams,
-	       array_size(data->k, sizeof(*data->streams)));
-
-	verify_mprime_in->k = cpu_to_be16(data->k);
-
+	i915_hdcp_fill_auth_stream_req_in(verify_mprime_in, stream_ready,
+					  cmd_size, data);
 	byte = mei_cldev_send(cldev, (u8 *)verify_mprime_in, cmd_size);
 	kfree(verify_mprime_in);
 	if (byte < 0) {
@@ -628,16 +521,7 @@ static int mei_hdcp_enable_authentication(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	enable_auth_in.header.api_version = HDCP_API_VERSION;
-	enable_auth_in.header.command_id = WIRED_ENABLE_AUTH;
-	enable_auth_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	enable_auth_in.header.buffer_len = WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
-
-	enable_auth_in.port.integrated_port_type = data->port_type;
-	enable_auth_in.port.physical_port = (u8)data->hdcp_ddi;
-	enable_auth_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-	enable_auth_in.stream_type = data->streams[0].stream_type;
-
+	i915_hdcp_fill_enable_auth_in(&enable_auth_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&enable_auth_in,
 			      sizeof(enable_auth_in));
 	if (byte < 0) {
@@ -682,16 +566,7 @@ mei_hdcp_close_session(struct device *dev, struct hdcp_port_data *data)
 
 	cldev = to_mei_cl_device(dev);
 
-	session_close_in.header.api_version = HDCP_API_VERSION;
-	session_close_in.header.command_id = WIRED_CLOSE_SESSION;
-	session_close_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_close_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
-
-	session_close_in.port.integrated_port_type = data->port_type;
-	session_close_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_close_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_close_session_in(&session_close_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_close_in,
 			      sizeof(session_close_in));
 	if (byte < 0) {
include/drm/i915_hdcp_interface.h +39 -0
index a92925cd1eae..9952bf78d4f7 100644
@@ -536,4 +536,43 @@ struct wired_cmd_repeater_auth_stream_req_out {
 	struct hdcp_port_id	port;
 } __packed;
 
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in *session_init_in,
+			  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in *verify_rxcert_in,
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in *send_hprime_in,
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in *pairing_info_in,
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data);
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in *lc_init_in,
+				 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in *verify_lprime_in,
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data);
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in *get_skey_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in *verify_repeater_in,
+			   struct hdcp2_rep_send_receiverid_list *rep_topology,
+			   struct hdcp_port_data *data);
+void
+i915_hdcp_fill_auth_stream_req_in(struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,
+				  struct hdcp2_rep_stream_ready *stream_ready, ssize_t cmd_size,
+				  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in *enable_auth_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in *session_close_in,
+				struct hdcp_port_data *data);
 #endif /* _I915_HDCP_INTERFACE_H_ */
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#8 lore raw

Re: [Intel-gfx] [PATCH v4 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place

Just my 2 cents (im not hdcp expert but understand a little on the GSC vs MEI):

IIRC, HW architecture wise, MEI and GSC-CS (command streamer) are both merely transport protocols to a backend-service.
The backend-service here being HDCP-subsystem within the security firmware (one of several backend-services within the security firmware).
The hdcp service, like the other services (PXP or others not in upstream), uses a fw-API for comms with the backend-service.
This API is different based on the target backend-service (i.e. HDCP vs PXP vs others). In all cases, MEI or GSC-CS are merely the transport layer. That said, HW architecture wise, MEI and GSC-CS are like the blitter-cmd-streamer - the transport, not the actual engine.
Citing the blitter example, the actual engine specific instructions with its own "API" (i.e. HW micro-arch instructions such as XY_COLOR_BLT) need to be crafted by the caller or requesting client. In i915, we dont put functions in the engine code that abstract the API crafting. We put API crafting in the caller side (even if its a kernel space caler).

Thus, adopting that blue-print, in this HDCP case, MEI-or-GSC-CS is the transport and i915 display subsystem is the requesting client so i915 should be crafting the instructions.

However, access to the gsc-cs transport should not go thru a component interface (did i misunderstand Jani's comment?) ... it should be contained i915 just like any other engine today - i believe thats the hw arch direction forward (i.e. for all firmware security services that are specific to the GPU should be via the GSC-CS front end - that has the same "HW layer positioning" as the other command-streamers).

...alan

Quoted 553 lines · Jani Nikula
Quoted 2 lines · Suraj Kandpal

Need to fill wired cmd in structures at a single place as they remain same for both gsc and mei.

It's probably a good idea to have them in a single place, but there's really no reason for that place to be part of i915 at all.

None of the functions are about i915.

Feels weird to have MEI HDCP call back to i915. It's supposed to be the glue layer between i915 and ME FW. Maybe the abstractions are wrong?

We currently have a total of 5 exported symbols, and I'd prefer to keep it that way.

BR,
Jani.

Quoted 530 lines

--v3
-remove inline function from header [Jani]

---
 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_hdcp_interface.c | 216 +++++++++++++++++++++
 drivers/misc/mei/hdcp/mei_hdcp.c           | 153 ++-------------
 include/drm/i915_hdcp_interface.h          |  39 ++++
 4 files changed, 270 insertions(+), 139 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_hdcp_interface.c
drivers/gpu/drm/i915/Makefile +1 -0
index 5b5df71cb5d7..b0b2a47455df 100644
@@ -36,6 +36,7 @@ i915-y += i915_driver.o \
 	  i915_drm_client.o \
 	  i915_config.o \
 	  i915_getparam.o \
+	  i915_hdcp_interface.o\
 	  i915_ioctl.o \
 	  i915_irq.o \
 	  i915_mitigations.o \
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +216 -0
new file mode 100644
index 000000000000..e6b787c2fa50
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2022, Intel Corporation.
+ */
+
+#include <drm/i915_hdcp_interface.h>
+
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in *session_init_in,
+			  struct hdcp_port_data *data)
+{
+	session_init_in->header.api_version = HDCP_API_VERSION;
+	session_init_in->header.command_id = WIRED_INITIATE_HDCP2_SESSION;
+	session_init_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_init_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;
+
+	session_init_in->port.integrated_port_type = data->port_type;
+	session_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_init_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+	session_init_in->protocol = data->protocol;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_session_in);
+
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in *verify_rxcert_in,
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data)
+{
+	verify_rxcert_in->header.api_version = HDCP_API_VERSION;
+	verify_rxcert_in->header.command_id = WIRED_VERIFY_RECEIVER_CERT;
+	verify_rxcert_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_rxcert_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;
+
+	verify_rxcert_in->port.integrated_port_type = data->port_type;
+	verify_rxcert_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_rxcert_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	verify_rxcert_in->cert_rx = rx_cert->cert_rx;
+	memcpy(verify_rxcert_in->r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
+	memcpy(verify_rxcert_in->rx_caps, rx_cert->rx_caps, HDCP_2_2_RXCAPS_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_rxcert_in);
+
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in *send_hprime_in,
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data)
+{
+	send_hprime_in->header.api_version = HDCP_API_VERSION;
+	send_hprime_in->header.command_id = WIRED_AKE_SEND_HPRIME;
+	send_hprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	send_hprime_in->header.buffer_len = WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
+
+	send_hprime_in->port.integrated_port_type = data->port_type;
+	send_hprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	send_hprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(send_hprime_in->h_prime, rx_hprime->h_prime,
+	       HDCP_2_2_H_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_hprime_in);
+
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in *pairing_info_in,
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data)
+{
+	pairing_info_in->header.api_version = HDCP_API_VERSION;
+	pairing_info_in->header.command_id = WIRED_AKE_SEND_PAIRING_INFO;
+	pairing_info_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	pairing_info_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
+
+	pairing_info_in->port.integrated_port_type = data->port_type;
+	pairing_info_in->port.physical_port = (u8)data->hdcp_ddi;
+	pairing_info_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(pairing_info_in->e_kh_km, pairing_info->e_kh_km,
+	       HDCP_2_2_E_KH_KM_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_pairing_info_in);
+
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in *lc_init_in,
+				 struct hdcp_port_data *data)
+{
+	lc_init_in->header.api_version = HDCP_API_VERSION;
+	lc_init_in->header.command_id = WIRED_INIT_LOCALITY_CHECK;
+	lc_init_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	lc_init_in->header.buffer_len = WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
+
+	lc_init_in->port.integrated_port_type = data->port_type;
+	lc_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	lc_init_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_locality_check_in);
+
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in *verify_lprime_in,
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data)
+{
+	verify_lprime_in->header.api_version = HDCP_API_VERSION;
+	verify_lprime_in->header.command_id = WIRED_VALIDATE_LOCALITY;
+	verify_lprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_lprime_in->header.buffer_len =
+					WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
+
+	verify_lprime_in->port.integrated_port_type = data->port_type;
+	verify_lprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_lprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_lprime_in->l_prime, rx_lprime->l_prime,
+	       HDCP_2_2_L_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_validate_locality_in);
+
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in *get_skey_in,
+			      struct hdcp_port_data *data)
+{
+	get_skey_in->header.api_version = HDCP_API_VERSION;
+	get_skey_in->header.command_id = WIRED_GET_SESSION_KEY;
+	get_skey_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	get_skey_in->header.buffer_len = WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
+
+	get_skey_in->port.integrated_port_type = data->port_type;
+	get_skey_in->port.physical_port = (u8)data->hdcp_ddi;
+	get_skey_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_session_key_in);
+
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in *verify_repeater_in,
+			   struct hdcp2_rep_send_receiverid_list *rep_topology,
+			   struct hdcp_port_data *data)
+{
+	verify_repeater_in->header.api_version = HDCP_API_VERSION;
+	verify_repeater_in->header.command_id = WIRED_VERIFY_REPEATER;
+	verify_repeater_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_repeater_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
+
+	verify_repeater_in->port.integrated_port_type = data->port_type;
+	verify_repeater_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_repeater_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_repeater_in->rx_info, rep_topology->rx_info,
+	       HDCP_2_2_RXINFO_LEN);
+	memcpy(verify_repeater_in->seq_num_v, rep_topology->seq_num_v,
+	       HDCP_2_2_SEQ_NUM_LEN);
+	memcpy(verify_repeater_in->v_prime, rep_topology->v_prime,
+	       HDCP_2_2_V_PRIME_HALF_LEN);
+	memcpy(verify_repeater_in->receiver_ids, rep_topology->receiver_ids,
+	       HDCP_2_2_RECEIVER_IDS_MAX_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_repeater_in);
+
+void
+i915_hdcp_fill_auth_stream_req_in(struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,
+				  struct hdcp2_rep_stream_ready *stream_ready, ssize_t cmd_size,
+				  struct hdcp_port_data *data)
+{
+	verify_mprime_in->header.api_version = HDCP_API_VERSION;
+	verify_mprime_in->header.command_id = WIRED_REPEATER_AUTH_STREAM_REQ;
+	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_mprime_in->header.buffer_len = cmd_size  - sizeof(verify_mprime_in->header);
+
+	verify_mprime_in->port.integrated_port_type = data->port_type;
+	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_mprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+
+	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime, HDCP_2_2_MPRIME_LEN);
+	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data->seq_num_m);
+
+	memcpy(verify_mprime_in->streams, data->streams,
+	       array_size(data->k, sizeof(*data->streams)));
+
+	verify_mprime_in->k = cpu_to_be16(data->k);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_auth_stream_req_in);
+
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in *enable_auth_in,
+			      struct hdcp_port_data *data)
+{
+	enable_auth_in->header.api_version = HDCP_API_VERSION;
+	enable_auth_in->header.command_id = WIRED_ENABLE_AUTH;
+	enable_auth_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	enable_auth_in->header.buffer_len = WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
+
+	enable_auth_in->port.integrated_port_type = data->port_type;
+	enable_auth_in->port.physical_port = (u8)data->hdcp_ddi;
+	enable_auth_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+	enable_auth_in->stream_type = data->streams[0].stream_type;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_enable_auth_in);
+
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in *session_close_in,
+				struct hdcp_port_data *data)
+{
+	session_close_in->header.api_version = HDCP_API_VERSION;
+	session_close_in->header.command_id = WIRED_CLOSE_SESSION;
+	session_close_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_close_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
+
+	session_close_in->port.integrated_port_type = data->port_type;
+	session_close_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_close_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
+}
+EXPORT_SYMBOL(i915_hdcp_fill_close_session_in);
+
drivers/misc/mei/hdcp/mei_hdcp.c +14 -139
index d4faecbbbe76..2cf42e98dfae 100644
@@ -50,17 +50,7 @@ mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	session_init_in.header.api_version = HDCP_API_VERSION;
-	session_init_in.header.command_id = WIRED_INITIATE_HDCP2_SESSION;
-	session_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_init_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;
-
-	session_init_in.port.integrated_port_type = data->port_type;
-	session_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-	session_init_in.protocol = data->protocol;
-
+	i915_hdcp_fill_session_in(&session_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_init_in,
 			      sizeof(session_init_in));
 	if (byte < 0) {
@@ -119,21 +109,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	verify_rxcert_in.header.api_version = HDCP_API_VERSION;
-	verify_rxcert_in.header.command_id = WIRED_VERIFY_RECEIVER_CERT;
-	verify_rxcert_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_rxcert_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;
-
-	verify_rxcert_in.port.integrated_port_type = data->port_type;
-	verify_rxcert_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_rxcert_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	verify_rxcert_in.cert_rx = rx_cert->cert_rx;
-	memcpy(verify_rxcert_in.r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
-	memcpy(verify_rxcert_in.rx_caps, rx_cert->rx_caps, HDCP_2_2_RXCAPS_LEN);
-
+	i915_hdcp_fill_rxcert_in(&verify_rxcert_in, rx_cert, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_rxcert_in,
 			      sizeof(verify_rxcert_in));
 	if (byte < 0) {
@@ -192,18 +168,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	send_hprime_in.header.api_version = HDCP_API_VERSION;
-	send_hprime_in.header.command_id = WIRED_AKE_SEND_HPRIME;
-	send_hprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	send_hprime_in.header.buffer_len = WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
-
-	send_hprime_in.port.integrated_port_type = data->port_type;
-	send_hprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	send_hprime_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(send_hprime_in.h_prime, rx_hprime->h_prime,
-	       HDCP_2_2_H_PRIME_LEN);
-
+	i915_hdcp_fill_hprime_in(&send_hprime_in, rx_hprime, data);
 	byte = mei_cldev_send(cldev, (u8 *)&send_hprime_in,
 			      sizeof(send_hprime_in));
 	if (byte < 0) {
@@ -248,20 +213,8 @@ mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	pairing_info_in.header.api_version = HDCP_API_VERSION;
-	pairing_info_in.header.command_id = WIRED_AKE_SEND_PAIRING_INFO;
-	pairing_info_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	pairing_info_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
-
-	pairing_info_in.port.integrated_port_type = data->port_type;
-	pairing_info_in.port.physical_port = (u8)data->hdcp_ddi;
-	pairing_info_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(pairing_info_in.e_kh_km, pairing_info->e_kh_km,
-	       HDCP_2_2_E_KH_KM_LEN);
-
+	i915_hdcp_fill_pairing_info_in(&pairing_info_in, pairing_info,
+				       data);
 	byte = mei_cldev_send(cldev, (u8 *)&pairing_info_in,
 			      sizeof(pairing_info_in));
 	if (byte < 0) {
@@ -309,15 +262,7 @@ mei_hdcp_initiate_locality_check(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	lc_init_in.header.api_version = HDCP_API_VERSION;
-	lc_init_in.header.command_id = WIRED_INIT_LOCALITY_CHECK;
-	lc_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	lc_init_in.header.buffer_len = WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
-
-	lc_init_in.port.integrated_port_type = data->port_type;
-	lc_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	lc_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_locality_check_in(&lc_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&lc_init_in, sizeof(lc_init_in));
 	if (byte < 0) {
 		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
@@ -364,19 +309,8 @@ mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	verify_lprime_in.header.api_version = HDCP_API_VERSION;
-	verify_lprime_in.header.command_id = WIRED_VALIDATE_LOCALITY;
-	verify_lprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_lprime_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
-
-	verify_lprime_in.port.integrated_port_type = data->port_type;
-	verify_lprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_lprime_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_lprime_in.l_prime, rx_lprime->l_prime,
-	       HDCP_2_2_L_PRIME_LEN);
-
+	i915_hdcp_fill_validate_locality_in(&verify_lprime_in, rx_lprime,
+					    data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_lprime_in,
 			      sizeof(verify_lprime_in));
 	if (byte < 0) {
@@ -423,15 +357,7 @@ static int mei_hdcp_get_session_key(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	get_skey_in.header.api_version = HDCP_API_VERSION;
-	get_skey_in.header.command_id = WIRED_GET_SESSION_KEY;
-	get_skey_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	get_skey_in.header.buffer_len = WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
-
-	get_skey_in.port.integrated_port_type = data->port_type;
-	get_skey_in.port.physical_port = (u8)data->hdcp_ddi;
-	get_skey_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_session_key_in(&get_skey_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&get_skey_in, sizeof(get_skey_in));
 	if (byte < 0) {
 		dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte);
@@ -487,25 +413,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	verify_repeater_in.header.api_version = HDCP_API_VERSION;
-	verify_repeater_in.header.command_id = WIRED_VERIFY_REPEATER;
-	verify_repeater_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_repeater_in.header.buffer_len =
-					WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
-
-	verify_repeater_in.port.integrated_port_type = data->port_type;
-	verify_repeater_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_repeater_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_repeater_in.rx_info, rep_topology->rx_info,
-	       HDCP_2_2_RXINFO_LEN);
-	memcpy(verify_repeater_in.seq_num_v, rep_topology->seq_num_v,
-	       HDCP_2_2_SEQ_NUM_LEN);
-	memcpy(verify_repeater_in.v_prime, rep_topology->v_prime,
-	       HDCP_2_2_V_PRIME_HALF_LEN);
-	memcpy(verify_repeater_in.receiver_ids, rep_topology->receiver_ids,
-	       HDCP_2_2_RECEIVER_IDS_MAX_LEN);
-
+	i915_hdcp_fill_repeater_in(&verify_repeater_in, rep_topology, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_repeater_in,
 			      sizeof(verify_repeater_in));
 	if (byte < 0) {
@@ -566,23 +474,8 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 	if (!verify_mprime_in)
 		return -ENOMEM;
 
-	verify_mprime_in->header.api_version = HDCP_API_VERSION;
-	verify_mprime_in->header.command_id = WIRED_REPEATER_AUTH_STREAM_REQ;
-	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_mprime_in->header.buffer_len = cmd_size  - sizeof(verify_mprime_in->header);
-
-	verify_mprime_in->port.integrated_port_type = data->port_type;
-	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
-	verify_mprime_in->port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime, HDCP_2_2_MPRIME_LEN);
-	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data->seq_num_m);
-
-	memcpy(verify_mprime_in->streams, data->streams,
-	       array_size(data->k, sizeof(*data->streams)));
-
-	verify_mprime_in->k = cpu_to_be16(data->k);
-
+	i915_hdcp_fill_auth_stream_req_in(verify_mprime_in, stream_ready,
+					  cmd_size, data);
 	byte = mei_cldev_send(cldev, (u8 *)verify_mprime_in, cmd_size);
 	kfree(verify_mprime_in);
 	if (byte < 0) {
@@ -628,16 +521,7 @@ static int mei_hdcp_enable_authentication(struct device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	enable_auth_in.header.api_version = HDCP_API_VERSION;
-	enable_auth_in.header.command_id = WIRED_ENABLE_AUTH;
-	enable_auth_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	enable_auth_in.header.buffer_len = WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
-
-	enable_auth_in.port.integrated_port_type = data->port_type;
-	enable_auth_in.port.physical_port = (u8)data->hdcp_ddi;
-	enable_auth_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-	enable_auth_in.stream_type = data->streams[0].stream_type;
-
+	i915_hdcp_fill_enable_auth_in(&enable_auth_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&enable_auth_in,
 			      sizeof(enable_auth_in));
 	if (byte < 0) {
@@ -682,16 +566,7 @@ mei_hdcp_close_session(struct device *dev, struct hdcp_port_data *data)
 
 	cldev = to_mei_cl_device(dev);
 
-	session_close_in.header.api_version = HDCP_API_VERSION;
-	session_close_in.header.command_id = WIRED_CLOSE_SESSION;
-	session_close_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_close_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
-
-	session_close_in.port.integrated_port_type = data->port_type;
-	session_close_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_close_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_close_session_in(&session_close_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_close_in,
 			      sizeof(session_close_in));
 	if (byte < 0) {
include/drm/i915_hdcp_interface.h +39 -0
index a92925cd1eae..9952bf78d4f7 100644
@@ -536,4 +536,43 @@ struct wired_cmd_repeater_auth_stream_req_out {
 	struct hdcp_port_id	port;
 } __packed;
 
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in *session_init_in,
+			  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in *verify_rxcert_in,
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in *send_hprime_in,
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in *pairing_info_in,
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data);
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in *lc_init_in,
+				 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in *verify_lprime_in,
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data);
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in *get_skey_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in *verify_repeater_in,
+			   struct hdcp2_rep_send_receiverid_list *rep_topology,
+			   struct hdcp_port_data *data);
+void
+i915_hdcp_fill_auth_stream_req_in(struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,
+				  struct hdcp2_rep_stream_ready *stream_ready, ssize_t cmd_size,
+				  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in *enable_auth_in,
+			      struct hdcp_port_data *data);
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in *session_close_in,
+				struct hdcp_port_data *data);
 #endif /* _I915_HDCP_INTERFACE_H_ */
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#9 lore raw

Re: [Intel-gfx] [PATCH v4 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place

In reply to Jani Nikula
Quoted 12 lines · Suraj Kandpal
Quoted 2 lines

Need to fill wired cmd in structures at a single place as they remain same for both gsc and mei.

It's probably a good idea to have them in a single place, but there's really no reason for that place to be part of i915 at all.

None of the functions are about i915.

Feels weird to have MEI HDCP call back to i915. It's supposed to be the glue layer between i915 and ME FW. Maybe the abstractions are wrong?

So here none of the functions are being called by i915 but going forward if you refer to patch 7 In this series intel_hdcp_gsc.c has functions that call these fillers hence I decided to keep this a part of i915

Regards,
Suraj Kandpal

Quoted 616 lines

We currently have a total of 5 exported symbols, and I'd prefer to keep it that way.

BR,
Jani.

Quoted 34 lines

--v3
-remove inline function from header [Jani]

---
 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_hdcp_interface.c | 216 +++++++++++++++++++++
 drivers/misc/mei/hdcp/mei_hdcp.c           | 153 ++-------------
 include/drm/i915_hdcp_interface.h          |  39 ++++
 4 files changed, 270 insertions(+), 139 deletions(-)  create mode

100644 drivers/gpu/drm/i915/i915_hdcp_interface.c

(quoted diff) +0 -0

b/drivers/gpu/drm/i915/Makefile index 5b5df71cb5d7..b0b2a47455df 100644

drivers/gpu/drm/i915/Makefile +1 -0
@@ -36,6 +36,7 @@ i915-y += i915_driver.o \
 	  i915_drm_client.o \
 	  i915_config.o \
 	  i915_getparam.o \
+	  i915_hdcp_interface.o\
 	  i915_ioctl.o \
 	  i915_irq.o \
 	  i915_mitigations.o \
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +0 -0
new file mode 100644
index 000000000000..e6b787c2fa50

drivers/gpu/drm/i915/i915_hdcp_interface.c line 9

Quoted 9 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +9 -0
@@ -0,0 +1,216 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2022, Intel Corporation.
+ */
+
+#include <drm/i915_hdcp_interface.h>
+
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in

*session_init_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 4 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +4 -0
+			  struct hdcp_port_data *data)
+{
+	session_init_in->header.api_version = HDCP_API_VERSION;
+	session_init_in->header.command_id =

WIRED_INITIATE_HDCP2_SESSION;

drivers/gpu/drm/i915/i915_hdcp_interface.c line 17

Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3 -0
+	session_init_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_init_in->header.buffer_len =
+
	WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +4 -0
+
+	session_init_in->port.integrated_port_type = data->port_type;
+	session_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_init_in->port.attached_transcoder = (u8)data-

hdcp_transcoder;

drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5 -0
+	session_init_in->protocol = data->protocol; }
+EXPORT_SYMBOL(i915_hdcp_fill_session_in);
+
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in

*verify_rxcert_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5 -0
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data)
+{
+	verify_rxcert_in->header.api_version = HDCP_API_VERSION;
+	verify_rxcert_in->header.command_id =

WIRED_VERIFY_RECEIVER_CERT;

drivers/gpu/drm/i915/i915_hdcp_interface.c line 35

Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3 -0
+	verify_rxcert_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_rxcert_in->header.buffer_len =
+
	WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 13 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +13 -0
+
+	verify_rxcert_in->port.integrated_port_type = data->port_type;
+	verify_rxcert_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_rxcert_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	verify_rxcert_in->cert_rx = rx_cert->cert_rx;
+	memcpy(verify_rxcert_in->r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
+	memcpy(verify_rxcert_in->rx_caps, rx_cert->rx_caps,
+HDCP_2_2_RXCAPS_LEN); } EXPORT_SYMBOL(i915_hdcp_fill_rxcert_in);
+
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in

*send_hprime_in,

Quoted 11 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +11 -0
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data)
+{
+	send_hprime_in->header.api_version = HDCP_API_VERSION;
+	send_hprime_in->header.command_id = WIRED_AKE_SEND_HPRIME;
+	send_hprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	send_hprime_in->header.buffer_len =
+WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;
+
+	send_hprime_in->port.integrated_port_type = data->port_type;
+	send_hprime_in->port.physical_port = (u8)data->hdcp_ddi;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+	send_hprime_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	memcpy(send_hprime_in->h_prime, rx_hprime->h_prime,
+	       HDCP_2_2_H_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_hprime_in);
+
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in

*pairing_info_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 4 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +4 -0
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data) {
+	pairing_info_in->header.api_version = HDCP_API_VERSION;
+	pairing_info_in->header.command_id =

WIRED_AKE_SEND_PAIRING_INFO;

drivers/gpu/drm/i915/i915_hdcp_interface.c line 75

Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3 -0
+	pairing_info_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	pairing_info_in->header.buffer_len =
+
	WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 13 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +13 -0
+
+	pairing_info_in->port.integrated_port_type = data->port_type;
+	pairing_info_in->port.physical_port = (u8)data->hdcp_ddi;
+	pairing_info_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	memcpy(pairing_info_in->e_kh_km, pairing_info->e_kh_km,
+	       HDCP_2_2_E_KH_KM_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_pairing_info_in);
+
+void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in

*lc_init_in,

Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5 -0
+				 struct hdcp_port_data *data)
+{
+	lc_init_in->header.api_version = HDCP_API_VERSION;
+	lc_init_in->header.command_id = WIRED_INIT_LOCALITY_CHECK;
+	lc_init_in->header.status = FW_HDCP_STATUS_SUCCESS;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+	lc_init_in->header.buffer_len =
+WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;
+
+	lc_init_in->port.integrated_port_type = data->port_type;
+	lc_init_in->port.physical_port = (u8)data->hdcp_ddi;
+	lc_init_in->port.attached_transcoder = (u8)data->hdcp_transcoder; }
+EXPORT_SYMBOL(i915_hdcp_fill_locality_check_in);
+
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in

*verify_lprime_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c line 110

Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8 -0
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data)
+{
+	verify_lprime_in->header.api_version = HDCP_API_VERSION;
+	verify_lprime_in->header.command_id = WIRED_VALIDATE_LOCALITY;
+	verify_lprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_lprime_in->header.buffer_len =
+
	WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 13 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +13 -0
+
+	verify_lprime_in->port.integrated_port_type = data->port_type;
+	verify_lprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_lprime_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	memcpy(verify_lprime_in->l_prime, rx_lprime->l_prime,
+	       HDCP_2_2_L_PRIME_LEN);
+}
+EXPORT_SYMBOL(i915_hdcp_fill_validate_locality_in);
+
+void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in

*get_skey_in,

Quoted 4 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +4 -0
+			      struct hdcp_port_data *data) {
+	get_skey_in->header.api_version = HDCP_API_VERSION;
+	get_skey_in->header.command_id = WIRED_GET_SESSION_KEY;
+	get_skey_in->header.status = FW_HDCP_STATUS_SUCCESS;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+	get_skey_in->header.buffer_len =
+WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;
+
+	get_skey_in->port.integrated_port_type = data->port_type;
+	get_skey_in->port.physical_port = (u8)data->hdcp_ddi;
+	get_skey_in->port.attached_transcoder = (u8)data->hdcp_transcoder; }
+EXPORT_SYMBOL(i915_hdcp_fill_session_key_in);
+
+void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in

*verify_repeater_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 1 line
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +1 -0
+			   struct hdcp2_rep_send_receiverid_list

*rep_topology,

Quoted 15 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +15 -0
+			   struct hdcp_port_data *data)
+{
+	verify_repeater_in->header.api_version = HDCP_API_VERSION;
+	verify_repeater_in->header.command_id = WIRED_VERIFY_REPEATER;
+	verify_repeater_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_repeater_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
+
+	verify_repeater_in->port.integrated_port_type = data->port_type;
+	verify_repeater_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_repeater_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	memcpy(verify_repeater_in->rx_info, rep_topology->rx_info,
+	       HDCP_2_2_RXINFO_LEN);

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+	memcpy(verify_repeater_in->seq_num_v, rep_topology->seq_num_v,
+	       HDCP_2_2_SEQ_NUM_LEN);
+	memcpy(verify_repeater_in->v_prime, rep_topology->v_prime,
+	       HDCP_2_2_V_PRIME_HALF_LEN);
+	memcpy(verify_repeater_in->receiver_ids, rep_topology->receiver_ids,
+	       HDCP_2_2_RECEIVER_IDS_MAX_LEN); }
+EXPORT_SYMBOL(i915_hdcp_fill_repeater_in);
+
+void
+i915_hdcp_fill_auth_stream_req_in(struct

wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 1 line
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +1 -0
+				  struct hdcp2_rep_stream_ready

*stream_ready, ssize_t cmd_size,

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 4 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +4 -0
+				  struct hdcp_port_data *data)
+{
+	verify_mprime_in->header.api_version = HDCP_API_VERSION;
+	verify_mprime_in->header.command_id =

WIRED_REPEATER_AUTH_STREAM_REQ;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	verify_mprime_in->header.buffer_len = cmd_size  -
+sizeof(verify_mprime_in->header);
+
+	verify_mprime_in->port.integrated_port_type = data->port_type;
+	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
+	verify_mprime_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder;
+
+	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime,

HDCP_2_2_MPRIME_LEN);

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 11 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +1 -0
+	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data-

seq_num_m);

drivers/gpu/drm/i915/i915_hdcp_interface.c new file +9 -0
+
+	memcpy(verify_mprime_in->streams, data->streams,
+	       array_size(data->k, sizeof(*data->streams)));
+
+	verify_mprime_in->k = cpu_to_be16(data->k); }
+EXPORT_SYMBOL(i915_hdcp_fill_auth_stream_req_in);
+
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in

*enable_auth_in,

Quoted 11 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +10 -0
+			      struct hdcp_port_data *data) {
+	enable_auth_in->header.api_version = HDCP_API_VERSION;
+	enable_auth_in->header.command_id = WIRED_ENABLE_AUTH;
+	enable_auth_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	enable_auth_in->header.buffer_len =
+WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;
+
+	enable_auth_in->port.integrated_port_type = data->port_type;
+	enable_auth_in->port.physical_port = (u8)data->hdcp_ddi;
+	enable_auth_in->port.attached_transcoder = (u8)data-

hdcp_transcoder;

drivers/gpu/drm/i915/i915_hdcp_interface.c

Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5 -0
+	enable_auth_in->stream_type = data->streams[0].stream_type; }
+EXPORT_SYMBOL(i915_hdcp_fill_enable_auth_in);
+
+void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in

*session_close_in,

Quoted 20 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +14 -0
+				struct hdcp_port_data *data)
+{
+	session_close_in->header.api_version = HDCP_API_VERSION;
+	session_close_in->header.command_id = WIRED_CLOSE_SESSION;
+	session_close_in->header.status = FW_HDCP_STATUS_SUCCESS;
+	session_close_in->header.buffer_len =
+				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
+
+	session_close_in->port.integrated_port_type = data->port_type;
+	session_close_in->port.physical_port = (u8)data->hdcp_ddi;
+	session_close_in->port.attached_transcoder =
+(u8)data->hdcp_transcoder; }
+EXPORT_SYMBOL(i915_hdcp_fill_close_session_in);
+
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
index d4faecbbbe76..2cf42e98dfae 100644

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_session(struct device *dev, · line 55

Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -2
@@ -50,17 +50,7 @@ mei_hdcp_initiate_session(struct device *dev,
 struct hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	session_init_in.header.api_version = HDCP_API_VERSION;
-	session_init_in.header.command_id =

WIRED_INITIATE_HDCP2_SESSION;

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data, · line 58

Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -3
-	session_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_init_in.header.buffer_len =
-
	WIRED_CMD_BUF_LEN_INITIATE_HDCP2_SESSION_IN;

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct

Quoted 11 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -6
-
-	session_init_in.port.integrated_port_type = data->port_type;
-	session_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-	session_init_in.protocol = data->protocol;
-
+	i915_hdcp_fill_session_in(&session_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_init_in,
 			      sizeof(session_init_in));
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 	if (byte < 0) {
@@ -119,21 +109,7 @@ mei_hdcp_verify_receiver_cert_prepare_km(struct

device *dev,

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev, · line 128

Quoted 9 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -6
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	verify_rxcert_in.header.api_version = HDCP_API_VERSION;
-	verify_rxcert_in.header.command_id = WIRED_VERIFY_RECEIVER_CERT;
-	verify_rxcert_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_rxcert_in.header.buffer_len =
-
	WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,

Quoted 9 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -8
-
-	verify_rxcert_in.port.integrated_port_type = data->port_type;
-	verify_rxcert_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_rxcert_in.port.attached_transcoder = (u8)data-
 hdcp_transcoder;
-
-	verify_rxcert_in.cert_rx = rx_cert->cert_rx;
-	memcpy(verify_rxcert_in.r_rx, &rx_cert->r_rx, HDCP_2_2_RRX_LEN);
-	memcpy(verify_rxcert_in.rx_caps, rx_cert->rx_caps,

HDCP_2_2_RXCAPS_LEN);

Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -1
-
+	i915_hdcp_fill_rxcert_in(&verify_rxcert_in, rx_cert, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_rxcert_in,
 			      sizeof(verify_rxcert_in));
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 	if (byte < 0) {

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_hprime(struct device *dev, struct · line 199

Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
@@ -192,18 +168,7 @@ mei_hdcp_verify_hprime(struct device *dev, struct
 hdcp_port_data *data,
 
 	cldev = to_mei_cl_device(dev);
 
-	send_hprime_in.header.api_version = HDCP_API_VERSION;
-	send_hprime_in.header.command_id = WIRED_AKE_SEND_HPRIME;
-	send_hprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	send_hprime_in.header.buffer_len =

WIRED_CMD_BUF_LEN_AKE_SEND_HPRIME_IN;

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_store_pairing_info(struct device *dev,

Quoted 14 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -8
-
-	send_hprime_in.port.integrated_port_type = data->port_type;
-	send_hprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	send_hprime_in.port.attached_transcoder = (u8)data-
 hdcp_transcoder;
-
-	memcpy(send_hprime_in.h_prime, rx_hprime->h_prime,
-	       HDCP_2_2_H_PRIME_LEN);
-
+	i915_hdcp_fill_hprime_in(&send_hprime_in, rx_hprime, data);
 	byte = mei_cldev_send(cldev, (u8 *)&send_hprime_in,
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 			      sizeof(send_hprime_in));
 	if (byte < 0) {
@@ -248,20 +213,8 @@ mei_hdcp_store_pairing_info(struct device *dev,

struct hdcp_port_data *data,

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,

Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -3
 		return -EINVAL;
 
 	cldev = to_mei_cl_device(dev);
-
-	pairing_info_in.header.api_version = HDCP_API_VERSION;
-	pairing_info_in.header.command_id =

WIRED_AKE_SEND_PAIRING_INFO;

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data, · line 257

Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -3
-	pairing_info_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	pairing_info_in.header.buffer_len =
-
	WIRED_CMD_BUF_LEN_SEND_PAIRING_INFO_IN;
Quoted 14 lines
drivers/misc/mei/hdcp/mei_hdcp.c +2 -8
-
-	pairing_info_in.port.integrated_port_type = data->port_type;
-	pairing_info_in.port.physical_port = (u8)data->hdcp_ddi;
-	pairing_info_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
-	memcpy(pairing_info_in.e_kh_km, pairing_info->e_kh_km,
-	       HDCP_2_2_E_KH_KM_LEN);
-
+	i915_hdcp_fill_pairing_info_in(&pairing_info_in, pairing_info,
+				       data);
 	byte = mei_cldev_send(cldev, (u8 *)&pairing_info_in,
 			      sizeof(pairing_info_in));
 	if (byte < 0) {

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_locality_check(struct device · line 316

Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
@@ -309,15 +262,7 @@ mei_hdcp_initiate_locality_check(struct device
 *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	lc_init_in.header.api_version = HDCP_API_VERSION;
-	lc_init_in.header.command_id = WIRED_INIT_LOCALITY_CHECK;
-	lc_init_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	lc_init_in.header.buffer_len =

WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN;

Quoted 9 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -5
-
-	lc_init_in.port.integrated_port_type = data->port_type;
-	lc_init_in.port.physical_port = (u8)data->hdcp_ddi;
-	lc_init_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_locality_check_in(&lc_init_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&lc_init_in, sizeof(lc_init_in));
 	if (byte < 0) {

dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); @@ -

364,19

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data, · line 372

Quoted 10 lines

+309,8 @@ mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,

drivers/misc/mei/hdcp/mei_hdcp.c +0 -5
 	cldev = to_mei_cl_device(dev);
 
-	verify_lprime_in.header.api_version = HDCP_API_VERSION;
-	verify_lprime_in.header.command_id = WIRED_VALIDATE_LOCALITY;
-	verify_lprime_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_lprime_in.header.buffer_len =
-
	WIRED_CMD_BUF_LEN_VALIDATE_LOCALITY_IN;
Quoted 15 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
-
-	verify_lprime_in.port.integrated_port_type = data->port_type;
-	verify_lprime_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_lprime_in.port.attached_transcoder = (u8)data-

hdcp_transcoder;

drivers/misc/mei/hdcp/mei_hdcp.c +2 -4
-
-	memcpy(verify_lprime_in.l_prime, rx_lprime->l_prime,
-	       HDCP_2_2_L_PRIME_LEN);
-
+	i915_hdcp_fill_validate_locality_in(&verify_lprime_in, rx_lprime,
+					    data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_lprime_in,
 			      sizeof(verify_lprime_in));
 	if (byte < 0) {

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device · line 430

Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
@@ -423,15 +357,7 @@ static int mei_hdcp_get_session_key(struct device
 *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	get_skey_in.header.api_version = HDCP_API_VERSION;
-	get_skey_in.header.command_id = WIRED_GET_SESSION_KEY;
-	get_skey_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	get_skey_in.header.buffer_len =

WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN;

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device *dev,

Quoted 7 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -5
-
-	get_skey_in.port.integrated_port_type = data->port_type;
-	get_skey_in.port.physical_port = (u8)data->hdcp_ddi;
-	get_skey_in.port.attached_transcoder = (u8)data->hdcp_transcoder;
-
+	i915_hdcp_fill_session_key_in(&get_skey_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&get_skey_in,

sizeof(get_skey_in));

Quoted 2 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 	if (byte < 0) {

dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); @@ -

487,25

drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev, · line 495

Quoted 9 lines

+413,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,

drivers/misc/mei/hdcp/mei_hdcp.c +0 -5
 	cldev = to_mei_cl_device(dev);
 
-	verify_repeater_in.header.api_version = HDCP_API_VERSION;
-	verify_repeater_in.header.command_id = WIRED_VERIFY_REPEATER;
-	verify_repeater_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_repeater_in.header.buffer_len =
-
	WIRED_CMD_BUF_LEN_VERIFY_REPEATER_IN;
Quoted 20 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
-
-	verify_repeater_in.port.integrated_port_type = data->port_type;
-	verify_repeater_in.port.physical_port = (u8)data->hdcp_ddi;
-	verify_repeater_in.port.attached_transcoder = (u8)data-

hdcp_transcoder;

drivers/misc/mei/hdcp/mei_hdcp.c +1 -10
-
-	memcpy(verify_repeater_in.rx_info, rep_topology->rx_info,
-	       HDCP_2_2_RXINFO_LEN);
-	memcpy(verify_repeater_in.seq_num_v, rep_topology->seq_num_v,
-	       HDCP_2_2_SEQ_NUM_LEN);
-	memcpy(verify_repeater_in.v_prime, rep_topology->v_prime,
-	       HDCP_2_2_V_PRIME_HALF_LEN);
-	memcpy(verify_repeater_in.receiver_ids, rep_topology->receiver_ids,
-	       HDCP_2_2_RECEIVER_IDS_MAX_LEN);
-
+	i915_hdcp_fill_repeater_in(&verify_repeater_in, rep_topology, data);
 	byte = mei_cldev_send(cldev, (u8 *)&verify_repeater_in,
 			      sizeof(verify_repeater_in));
 	if (byte < 0) {

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device *dev, · line 570

Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -2
@@ -566,23 +474,8 @@ static int mei_hdcp_verify_mprime(struct device *dev,
 	if (!verify_mprime_in)
 		return -ENOMEM;
 
-	verify_mprime_in->header.api_version = HDCP_API_VERSION;
-	verify_mprime_in->header.command_id =

WIRED_REPEATER_AUTH_STREAM_REQ;

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device *dev, · line 572

Quoted 2 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -2
-	verify_mprime_in->header.status = FW_HDCP_STATUS_SUCCESS;
-	verify_mprime_in->header.buffer_len = cmd_size  -

sizeof(verify_mprime_in->header);

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device *dev,

Quoted 7 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -6
-
-	verify_mprime_in->port.integrated_port_type = data->port_type;
-	verify_mprime_in->port.physical_port = (u8)data->hdcp_ddi;
-	verify_mprime_in->port.attached_transcoder = (u8)data-
 hdcp_transcoder;
-
-	memcpy(verify_mprime_in->m_prime, stream_ready->m_prime,

HDCP_2_2_MPRIME_LEN);

Quoted 14 lines
drivers/misc/mei/hdcp/mei_hdcp.c +2 -7
-	drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data-
 seq_num_m);
-
-	memcpy(verify_mprime_in->streams, data->streams,
-	       array_size(data->k, sizeof(*data->streams)));
-
-	verify_mprime_in->k = cpu_to_be16(data->k);
-
+	i915_hdcp_fill_auth_stream_req_in(verify_mprime_in, stream_ready,
+					  cmd_size, data);
 	byte = mei_cldev_send(cldev, (u8 *)verify_mprime_in, cmd_size);
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 	kfree(verify_mprime_in);
 	if (byte < 0) {

drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_enable_authentication(struct · line 635

Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0 -4
@@ -628,16 +521,7 @@ static int mei_hdcp_enable_authentication(struct
 device *dev,
 
 	cldev = to_mei_cl_device(dev);
 
-	enable_auth_in.header.api_version = HDCP_API_VERSION;
-	enable_auth_in.header.command_id = WIRED_ENABLE_AUTH;
-	enable_auth_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	enable_auth_in.header.buffer_len =

WIRED_CMD_BUF_LEN_ENABLE_AUTH_IN;

Quoted 37 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1 -6
-
-	enable_auth_in.port.integrated_port_type = data->port_type;
-	enable_auth_in.port.physical_port = (u8)data->hdcp_ddi;
-	enable_auth_in.port.attached_transcoder = (u8)data-
 hdcp_transcoder;
-	enable_auth_in.stream_type = data->streams[0].stream_type;
-
+	i915_hdcp_fill_enable_auth_in(&enable_auth_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&enable_auth_in,
drivers/misc/mei/hdcp/mei_hdcp.c +1 -10
 			      sizeof(enable_auth_in));
 	if (byte < 0) {
@@ -682,16 +566,7 @@ mei_hdcp_close_session(struct device *dev, struct
 hdcp_port_data *data)
 
 	cldev = to_mei_cl_device(dev);
 
-	session_close_in.header.api_version = HDCP_API_VERSION;
-	session_close_in.header.command_id = WIRED_CLOSE_SESSION;
-	session_close_in.header.status = FW_HDCP_STATUS_SUCCESS;
-	session_close_in.header.buffer_len =
-				WIRED_CMD_BUF_LEN_CLOSE_SESSION_IN;
-
-	session_close_in.port.integrated_port_type = data->port_type;
-	session_close_in.port.physical_port = (u8)data->hdcp_ddi;
-	session_close_in.port.attached_transcoder = (u8)data-
 hdcp_transcoder;
-
+	i915_hdcp_fill_close_session_in(&session_close_in, data);
 	byte = mei_cldev_send(cldev, (u8 *)&session_close_in,
drivers/misc/mei/hdcp/mei_hdcp.c +0 -0
 			      sizeof(session_close_in));
 	if (byte < 0) {
include/drm/i915_hdcp_interface.h +0 -0
index a92925cd1eae..9952bf78d4f7 100644

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 540

Quoted 5 lines
include/drm/i915_hdcp_interface.h +2 -0
@@ -536,4 +536,43 @@ struct wired_cmd_repeater_auth_stream_req_out {
 	struct hdcp_port_id	port;
 } __packed;
 
+void
+i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in

*session_init_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+			  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in

*verify_rxcert_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 4 lines
include/drm/i915_hdcp_interface.h +4 -0
+			 struct hdcp2_ake_send_cert *rx_cert,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_hprime_in(struct wired_cmd_ake_send_hprime_in

*send_hprime_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 4 lines
include/drm/i915_hdcp_interface.h +4 -0
+			 struct hdcp2_ake_send_hprime *rx_hprime,
+			 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_pairing_info_in(struct wired_cmd_ake_send_pairing_info_in

*pairing_info_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 554

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+			       struct hdcp2_ake_send_pairing_info *pairing_info,
+			       struct hdcp_port_data *data); void
+i915_hdcp_fill_locality_check_in(struct wired_cmd_init_locality_check_in

*lc_init_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+				 struct hdcp_port_data *data);
+void
+i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in

*verify_lprime_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 560

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+				    struct hdcp2_lc_send_lprime *rx_lprime,
+				    struct hdcp_port_data *data); void
+i915_hdcp_fill_session_key_in(struct wired_cmd_get_session_key_in

*get_skey_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 562

Quoted 2 lines
include/drm/i915_hdcp_interface.h +2 -0
+			      struct hdcp_port_data *data); void
+i915_hdcp_fill_repeater_in(struct wired_cmd_verify_repeater_in

*verify_repeater_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 563

Quoted 1 line
include/drm/i915_hdcp_interface.h +1 -0
+			   struct hdcp2_rep_send_receiverid_list

*rep_topology,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+			   struct hdcp_port_data *data);
+void
+i915_hdcp_fill_auth_stream_req_in(struct

wired_cmd_repeater_auth_stream_req_in *verify_mprime_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 567

Quoted 1 line
include/drm/i915_hdcp_interface.h +1 -0
+				  struct hdcp2_rep_stream_ready

*stream_ready, ssize_t cmd_size,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {

Quoted 3 lines
include/drm/i915_hdcp_interface.h +3 -0
+				  struct hdcp_port_data *data);
+void
+i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in

*enable_auth_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 572

Quoted 2 lines
include/drm/i915_hdcp_interface.h +2 -0
+			      struct hdcp_port_data *data); void
+i915_hdcp_fill_close_session_in(struct wired_cmd_close_session_in

*session_close_in,

include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out { · line 574

Quoted 2 lines
include/drm/i915_hdcp_interface.h +1 -0
+				struct hdcp_port_data *data);
 #endif /* _I915_HDCP_INTERFACE_H_ */

--
Jani Nikula, Intel Open Source Graphics Center

#10 lore raw

PATCH v4 6/7 drm/i915/mtl: Add function to send command to GSC CS

In reply to Suraj Kandpal

Add function that takes care of sending command to gsc cs. We start of with allocation of memory for our command intel_hdcp_gsc_message that contains gsc cs memory header as directed in specs followed by the actual payload hdcp message that we want to send.
Spec states that we need to poll pending bit of response header around 20 times each try being 50ms apart hence adding that to current gsc_msg_send function
Also we use the same function to take care of both sending and receiving hence no separate function to get the response.

--v4
-Create common function to fill in gsc_mtl_header [Alan] -define host session bitmask [Alan]

Cc Ankit Nautiyal <[email protected]>
Cc Daniele Ceraolo Spurio <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Anshuman Gupta <[email protected]>
---
 drivers/gpu/drm/i915/Makefile                 |   1 +
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 206 ++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |  18 ++
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c |  15 ++
 .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h |   6 +
 5 files changed, 246 insertions(+)
 create mode 100644 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c
 create mode 100644 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h
drivers/gpu/drm/i915/Makefile +1 -0
index b0b2a47455df..4d1bb828c0cd 100644
@@ -252,6 +252,7 @@ i915-y += \
 	display/intel_frontbuffer.o \
 	display/intel_global_state.o \
 	display/intel_hdcp.o \
+	display/intel_hdcp_gsc.o \
 	display/intel_hotplug.o \
 	display/intel_hti.o \
 	display/intel_lpe_audio.o \
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +206 -0

206 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_hdcp_gsc.h new file +18 -0
new file mode 100644
index 000000000000..8f2563ab958b
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#ifndef __INTEL_HDCP_GSC_H__
+#define __INTEL_HDCP_GSC_H__
+
+#include <linux/types.h>
+#include <linux/err.h>
+
+struct drm_i915_private;
+
+ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
+				size_t msg_in_len, u8 *msg_out,
+				size_t msg_out_len);
+
+#endif /* __INTEL_HDCP_GCS_H__ */
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c +15 -0
index 5781c74144f9..4c84969d0f67 100644
@@ -92,3 +92,18 @@ int intel_gsc_uc_heci_cmd_submit_packet(struct intel_gsc_uc *gsc, u64 addr_in,
 
 	return err;
 }
+
+void intel_gsc_uc_heci_cmd_emit_mtl_header(struct intel_gsc_mtl_header *header,
+					   u8 heci_client_id, u32 message_size,
+					   u64 host_session_id)
+{
+	host_session_id &= ~HOST_SESSION_MASK;
+	if (heci_client_id == HECI_MEADDRESS_PXP)
+		host_session_id |= HOST_SESSION_PXP_SINGLE;
+
+	header->validity_marker = GSC_HECI_VALIDITY_MARKER;
+	header->heci_client_id = heci_client_id;
+	header->host_session_handle = host_session_id;
+	header->header_version = MTL_GSC_HEADER_VERSION;
+	header->message_size = message_size;
+}
drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h +6 -0
index 26ccb4852ccb..ae83d56b322e 100644
@@ -23,6 +23,8 @@ struct intel_gsc_mtl_header {
 #define MTL_GSC_HEADER_VERSION 1
 
 	u64 host_session_handle;
+#define HOST_SESSION_MASK	REG_GENMASK64(63, 60)
+#define HOST_SESSION_PXP_SINGLE BIT_ULL(60)
 	u64 gsc_message_handle;
 
 	u32 message_size; /* lower 20 bits only, upper 12 are reserved */
@@ -35,6 +37,7 @@ struct intel_gsc_mtl_header {
 	 * Bits 16-31: Extension Size
 	 */
 	u32 flags;
+#define INTEL_GSC_MSG_PENDING	1
 
 	u32 status;
 } __packed;
@@ -42,4 +45,7 @@ struct intel_gsc_mtl_header {
 int intel_gsc_uc_heci_cmd_submit_packet(struct intel_gsc_uc *gsc,
 					u64 addr_in, u32 size_in,
 					u64 addr_out, u32 size_out);
+void intel_gsc_uc_heci_cmd_emit_mtl_header(struct intel_gsc_mtl_header *header,
+					   u8 heci_client_id, u32 message_size,
+					   u64 host_session_id);
 #endif
Signature · 1 line
2.25.1
#11 lore raw

Re: [Intel-gfx] [PATCH v4 6/7] drm/i915/mtl: Add function to send command to GSC CS

Most of it looks good - but I have two issues:
1. I believe there are some reuse efficiency gaps depending on the frequency of these hdcp-gsc messages... but it might not be an issue depending on the answers to the questions i have below.
2. Missing the session-cleanup request

...alan

Quoted 1 line · Suraj Kandpal

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 30

Quoted 13 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +13 -0
+/*This function helps allocate memory for the command that we will send to gsc cs */
+static int intel_initialize_hdcp_gsc_message(struct drm_i915_private *i915,
+					     struct intel_hdcp_gsc_message *hdcp_message)
+{
+	struct intel_gt *gt = i915->media_gt;
+	struct drm_i915_gem_object *obj = NULL;
+	struct i915_vma *vma = NULL;
+	void *cmd;
+	int err;
+
+	hdcp_message->obj = NULL;
+	hdcp_message->hdcp_cmd = NULL;
+	hdcp_message->vma = NULL;

Alan: is this unnecessary? caller is using kzalloc for this structure.

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 36

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +5 -0
+	/* allocate object of one page for HDCP command memory and store it */
+	obj = i915_gem_object_create_shmem(gt->i915, PAGE_SIZE);
+
+	if (IS_ERR(obj)) {
+		drm_err(&gt->i915->drm, "Failed to allocate HDCP streaming command!\n");

Alan: nit: 'i915' instead of 'gt->i915' Also applies for other cases in this function.

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 57

Quoted 1 line
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +1 -0
+	memset(cmd, 0, obj->base.size);

Alan: question: how often is this hdcp message being created, pinned,cleared and used to send message?
Is this very infrequent - such as only during initial port connection establishment or if in unlikely cases of dp/hdmi link-disruption.. Or is intel_hdcp_check_work something that has to exercise these gsc messages frequently (such as every few seconds)? I am just wondering if its the latter, whether its more efficient to initialize and store the hdcp_message structure into intel_hdcp if hdcp on connector is enabled and freed (intel_free_hdcp_gsc_message) only at port disabling time?
Also, in any case, would the entire object need to be memset? (I'm wondering if we only need to memset the mtl-gsc-header and leave the rest since gsc hdcp service is able to determine the range of valid bytes based on the hdcp command and thus we don't need to memset the entire object)

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 94

Quoted 8 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +8 -0
+static int intel_gsc_send_sync(struct drm_i915_private *i915,
+			       struct intel_gsc_mtl_header *header, u64 addr,
+			       size_t msg_out_len)
+{
+	struct intel_gt *gt = i915->media_gt;
+	int ret;
+
+	header->flags = 0;

Alan: question: Should this be preserving the session-cleanup bit? (Im not familiar with the session-cleanup steps).

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 132

Quoted 3 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +3 -0
+ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
+				size_t msg_in_len, u8 *msg_out, size_t msg_out_len)
+{

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 163

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +4 -0
+	header = hdcp_message->hdcp_cmd;
+	addr = i915_ggtt_offset(hdcp_message->vma);
+
+	memset(header, 0, sizeof(*header));

Alan: nit: intel_initialize_hdcp_gsc_message is already mem-setting (at least the header)

Alan:[snip]

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +5 -0
+	/* we use the same mem for the reply, so header is in the same loc */
+	reply_size = header->message_size - sizeof(*header);
+	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);

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 204

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +10 -0
+		reply_size = msg_out_len;
+	} else if (reply_size != msg_out_len) {
+		drm_dbg_kms(&i915->drm, "caller unexpected HCDP reply size %u (%d)\n",
+			    reply_size, (u32)msg_out_len);
+	}
+
+	memcpy(msg_out, hdcp_message->hdcp_cmd + sizeof(*header), msg_out_len);
+
+err:
+	intel_free_hdcp_gsc_message(hdcp_message);

Alan: I believe you had not sent the session-cleanup (with zero payload) request before before freeing the objects and discarding the host-session-id that was used. I'm not sure if the GSC firmware needs to clear resources for the hdcp services... if so, we should either call the session-cleanup inside intel_free_hdcp_gsc_message.

Alan:[snip]

#12 lore raw

Re: [Intel-gfx] [PATCH v4 6/7] drm/i915/mtl: Add function to send command to GSC CS

Quoted 18 lines

Most of it looks good - but I have two issues:
1. I believe there are some reuse efficiency gaps depending on the frequency of these hdcp-gsc messages... but it might not be an issue depending on the answers to the questions i have below.
2. Missing the session-cleanup request

...alan

Quoted 1 line · Suraj Kandpal

Alan:[snip]

Review

Quoted 2 lines
(quoted diff) +2 -0
+/*This function helps allocate memory for the command that we will
+send to gsc cs */ static int intel_initialize_hdcp_gsc_message(struct

drm_i915_private *i915,

Review

Quoted 1 line
(quoted diff) +1 -0
+					     struct intel_hdcp_gsc_message

*hdcp_message) {

Quoted 10 lines

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 30

Quoted 9 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +9 -0
+	struct intel_gt *gt = i915->media_gt;
+	struct drm_i915_gem_object *obj = NULL;
+	struct i915_vma *vma = NULL;
+	void *cmd;
+	int err;
+
+	hdcp_message->obj = NULL;
+	hdcp_message->hdcp_cmd = NULL;
+	hdcp_message->vma = NULL;

Alan: is this unnecessary? caller is using kzalloc for this structure.

So I mimicked Daniele message initialization function that he had made for pxp tee streaming And it seemed like an essential step although I don’t see any risk in removing them

Quoted 10 lines

Review

Quoted 2 lines
(quoted diff) +1 -0
+	/* allocate object of one page for HDCP command memory and store it

*/

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c

Quoted 5 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +5 -0
+	obj = i915_gem_object_create_shmem(gt->i915, PAGE_SIZE);
+
+	if (IS_ERR(obj)) {
+		drm_err(&gt->i915->drm, "Failed to allocate HDCP streaming
+command!\n");

Alan: nit: 'i915' instead of 'gt->i915' Also applies for other cases in this function.

Ohh I missed that somehow will get it fixed

Quoted 11 lines

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 57

Quoted 1 line
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +1 -0
+	memset(cmd, 0, obj->base.size);

Alan: question: how often is this hdcp message being created, pinned,cleared and used to send message?
Is this very infrequent - such as only during initial port connection establishment or if in unlikely cases of dp/hdmi link-disruption..
Or is intel_hdcp_check_work something that has to exercise these gsc messages frequently (such as every few seconds)?

It is more frequent so during the link estabilishment and then every few seconds To check if link in working right through check work but saving message in hdcp In intel hdcp does not seem right as message that need to be sent vary in size. ,creation pinning and clearance makes it simpler and cleaner.

Quoted 10 lines

I am just wondering if its the latter, whether its more efficient to initialize and store the hdcp_message structure into intel_hdcp if hdcp on connector is enabled and freed (intel_free_hdcp_gsc_message) only at port disabling time? Also, in any case, would the entire object need to be memset? (I'm wondering if we only need to memset the mtl-gsc-header and leave the rest since gsc hdcp service is able to determine the range of valid bytes based on the hdcp command and thus we don't need to memset the entire object)

Alan:[snip]

memsetting of the entire object would be required as the range of valid bytes can change depending on Various use cases one example would be if Km is already stored in fw or not this keeps it more cleaner and less prone to error

Quoted 13 lines

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 94

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +8 -0
+static int intel_gsc_send_sync(struct drm_i915_private *i915,
+			       struct intel_gsc_mtl_header *header, u64 addr,
+			       size_t msg_out_len)
+{
+	struct intel_gt *gt = i915->media_gt;
+	int ret;
+
+	header->flags = 0;

Alan: question: Should this be preserving the session-cleanup bit? (Im not familiar with the session-cleanup steps).

Neither am I but from my discussions with Daniele offline with

Quoted 8 lines

Alan:[snip]

Review

Quoted 2 lines
(quoted diff) +2 -0
+ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
+				size_t msg_in_len, u8 *msg_out, size_t

msg_out_len) {

Alan:[snip]

Quoted 7 lines

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 163

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +4 -0
+	header = hdcp_message->hdcp_cmd;
+	addr = i915_ggtt_offset(hdcp_message->vma);
+
+	memset(header, 0, sizeof(*header));

Alan: nit: intel_initialize_hdcp_gsc_message is already mem-setting (at least the header)

This does seem to be redundant code.

Quoted 13 lines

Alan:[snip]

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +4 -0
+	/* we use the same mem for the reply, so header is in the same loc */
+	reply_size = header->message_size - sizeof(*header);
+	if (reply_size > msg_out_len) {
+		drm_warn(&i915->drm, "caller with insufficient HDCP reply size

%u (%d)\n",

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c

Quoted 4 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +4 -0
+			 reply_size, (u32)msg_out_len);
+		reply_size = msg_out_len;
+	} else if (reply_size != msg_out_len) {
+		drm_dbg_kms(&i915->drm, "caller unexpected HCDP reply size

%u (%d)\n",

Quoted 13 lines

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 204

Quoted 8 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +8 -0
+			    reply_size, (u32)msg_out_len);
+	}
+
+	memcpy(msg_out, hdcp_message->hdcp_cmd + sizeof(*header),
+msg_out_len);
+
+err:
+	intel_free_hdcp_gsc_message(hdcp_message);

Alan: I believe you had not sent the session-cleanup (with zero payload) request before before freeing the objects and discarding the host-session-id that was used. I'm not sure if the GSC firmware needs to clear resources for the hdcp services... if so, we should either call the session-cleanup inside intel_free_hdcp_gsc_message.

From my discussion with Daniele offline while I prepared this patch for internal I was told session Cleanup need not be done by hdcp hence preservation of session bit too is not necessary

Regards,
Suraj Kandpal

Quoted 2 lines

Alan:[snip]

#13 lore raw

Re: [Intel-gfx] [PATCH v4 6/7] drm/i915/mtl: Add function to send command to GSC CS

I've send offline email to clear up session cleanup behavior for hdcp (maybe its a PXP-only thing). But still wanna pursue a bit more on below portion:

Quoted 25 lines · Suraj
Quoted 10 lines

drivers/gpu/drm/i915/display/intel_hdcp_gsc.c line 57

Quoted 3 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c new file +1 -0
+	memset(cmd, 0, obj->base.size);

Alan: question: how often is this hdcp message being created, pinned,cleared and used to send message?
Is this very infrequent - such as only during initial port connection establishment or if in unlikely cases of dp/hdmi link-disruption..
Or is intel_hdcp_check_work something that has to exercise these gsc messages frequently (such as every few seconds)?

It is more frequent so during the link estabilishment and then every few seconds To check if link in working right through check work but saving message in hdcp In intel hdcp does not seem right as message that need to be sent vary in size. ,creation pinning and clearance makes it simpler and cleaner.

Quoted 8 lines

I am just wondering if its the latter, whether its more efficient to initialize and store the hdcp_message structure into intel_hdcp if hdcp on connector is enabled and freed (intel_free_hdcp_gsc_message) only at port disabling time? Also, in any case, would the entire object need to be memset? (I'm wondering if we only need to memset the mtl-gsc-header and leave the rest since gsc hdcp service is able to determine the range of valid bytes based on the hdcp command and thus we don't need to memset the entire object)

Quoted 7 lines
Quoted 2 lines

Alan:[snip]

memsetting of the entire object would be required as the range of valid bytes can change depending on Various use cases one example would be if Km is already stored in fw or not this keeps it more cleaner and less prone to error

Quoted 1 line

1. Is there a max size for the hdcp communications throughout the various types of message packets through out the various state-machine stages of the hdcp link life-cycle? If there is a deterministic max size, we can allocate that up front and keep re-using the same object.

2. Is the "range of valid bytes" consistent for the same HDCP-command? Based on patch #5 it looks that way. For exmaple, if the heci packet contained HDCP command HDCP_CMD_WIRED_AAA, then do we know for sure that command AAA will always have a specific fixed-size structure (size of struct aaa)? And for command HDCP_CMD_WIRED_BBB, it is a different structure but also has a fixed-size (size of struct bbb). If this the case, then we dont need to memset the entire object, we only need to ensure the memory size that corresponds to the structure of the specific HDCP command is initialized correctly - i.e. ensure we fill up every dword in that structure (and not need a memset for the full 4K - or whatever buffer size was allocated?). I'm assuming the security-firmware hdcp-service would only read data up until the expected fixed-size struct depending on the command.

#14 lore raw

PATCH v4 7/7 drm/i915/mtl: Add HDCP GSC interface

In reply to Suraj Kandpal

MTL uses GSC command streamer i.e gsc cs to send HDCP/PXP commands to GSC f/w. It requires to keep hdcp display driver agnostic to content protection f/w (ME/GSC fw) in the form of i915_hdcp_fw_ops generic ops.

Adding HDCP GSC CS interface by leveraging the i915_hdcp_fw_ops generic ops instead of I915_HDCP_COMPONENT as integral part of i915.

Adding checks to see if GSC is loaded and proxy is setup

--v3
-abstract DISPLAY_VER check [Jani]
-bring function declaration and definition in same patch[Jani]

Cc Tomas Winkler <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Uma Shankar <[email protected]>
Cc Ankit Nautiyal <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c     |  28 +-
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 513 +++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_hdcp_gsc.h |   5 +-
 3 files changed, 537 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/display/intel_hdcp.c +22 -6
index a0f978e56879..0fef4a4356ea 100644
@@ -25,6 +25,8 @@
 #include "intel_hdcp.h"
 #include "intel_hdcp_regs.h"
 #include "intel_pcode.h"
+#include "intel_connector.h"
+#include "intel_hdcp_gsc.h"
 
 #define KEY_LOAD_TRIES	5
 #define HDCP2_LC_RETRY_CNT			3
@@ -203,13 +205,20 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
 	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
 	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
 	struct intel_hdcp *hdcp = &connector->hdcp;
+	struct intel_gt *gt = dev_priv->media_gt;
+	struct intel_gsc_uc *gsc = &gt->uc.gsc;
 	bool capable = false;
 
 	/* I915 support for HDCP2.2 */
 	if (!hdcp->hdcp2_supported)
 		return false;
 
-	/* MEI interface is solid */
+	/* If MTL+ make sure gsc is loaded and proxy is setup */
+	if (DISPLAY_VER(dev_priv) >= 14)
+		if (!intel_uc_fw_is_running(&gsc->fw))
+			return false;
+
+	/* MEI/GSC interface is solid depending on which is used */
 	mutex_lock(&dev_priv->display.hdcp.comp_mutex);
 	if (!dev_priv->display.hdcp.comp_added ||  !dev_priv->display.hdcp.master) {
 		mutex_unlock(&dev_priv->display.hdcp.comp_mutex);
@@ -2235,7 +2244,7 @@ static int initialize_hdcp_port_data(struct intel_connector *connector,
 
 static bool is_hdcp2_supported(struct drm_i915_private *dev_priv)
 {
-	if (!IS_ENABLED(CONFIG_INTEL_MEI_HDCP))
+	if (intel_hdcp_gsc_cs_required(dev_priv) && !IS_ENABLED(CONFIG_INTEL_MEI_HDCP))
 		return false;
 
 	return (DISPLAY_VER(dev_priv) >= 10 ||
@@ -2256,10 +2265,14 @@ void intel_hdcp_component_init(struct drm_i915_private *dev_priv)
 
 	dev_priv->display.hdcp.comp_added = true;
 	mutex_unlock(&dev_priv->display.hdcp.comp_mutex);
-	ret = component_add_typed(dev_priv->drm.dev, &i915_hdcp_component_ops,
-				  I915_COMPONENT_HDCP);
+
+	if (intel_hdcp_gsc_cs_required(dev_priv))
+		ret = intel_hdcp_gsc_init(dev_priv);
+	else
+		ret = component_add_typed(dev_priv->drm.dev, &i915_hdcp_component_ops,
+					  I915_COMPONENT_HDCP);
 	if (ret < 0) {
-		drm_dbg_kms(&dev_priv->drm, "Failed at component add(%d)\n",
+		drm_dbg_kms(&dev_priv->drm, "Failed at fw component add(%d)\n",
 			    ret);
 		mutex_lock(&dev_priv->display.hdcp.comp_mutex);
 		dev_priv->display.hdcp.comp_added = false;
@@ -2486,7 +2499,10 @@ void intel_hdcp_component_fini(struct drm_i915_private *dev_priv)
 	dev_priv->display.hdcp.comp_added = false;
 	mutex_unlock(&dev_priv->display.hdcp.comp_mutex);
 
-	component_del(dev_priv->drm.dev, &i915_hdcp_component_ops);
+	if (intel_hdcp_gsc_cs_required(dev_priv))
+		intel_hdcp_gsc_fini(dev_priv);
+	else
+		component_del(dev_priv->drm.dev, &i915_hdcp_component_ops);
 }
 
 void intel_hdcp_cleanup(struct intel_connector *connector)
drivers/gpu/drm/i915/display/intel_hdcp_gsc.c +511 -2

532 lines not on this page · raw message

drivers/gpu/drm/i915/display/intel_hdcp_gsc.h +4 -1
index 8f2563ab958b..1ce71729d6f9 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: MIT */
 /*
- * Copyright © 2021 Intel Corporation
+ * Copyright © 2022 Intel Corporation
  */
 
 #ifndef __INTEL_HDCP_GSC_H__
@@ -11,8 +11,11 @@
 
 struct drm_i915_private;
 
+bool intel_hdcp_gsc_cs_required(struct drm_i915_private *i915);
 ssize_t intel_hdcp_gsc_msg_send(struct drm_i915_private *i915, u8 *msg_in,
 				size_t msg_in_len, u8 *msg_out,
 				size_t msg_out_len);
+int intel_hdcp_gsc_init(struct drm_i915_private *i915);
+int intel_hdcp_gsc_fini(struct drm_i915_private *i915);
 
 #endif /* __INTEL_HDCP_GCS_H__ */
Signature · 1 line
2.25.1
#15 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable HDCP2.x via GSC CS (rev4)

In reply to Suraj Kandpal
== Series Details ==

== Series Details ==

Series: Enable HDCP2.x via GSC CS (rev4)
URL : https://patchwork.freedesktop.org/series/111876/
State : warning

== Summary ==

Error: dim checkpatch failed
50e4dfd0597f drm/i915/gsc: Create GSC request submission mechanism
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:56: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #56:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 159 lines checked
6d0e21f34e20 drm/i915/hdcp: Keep cp fw agonstic naming convention
-:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #45:
rename from include/drm/i915_mei_hdcp_interface.h

total: 0 errors, 1 warnings, 0 checks, 151 lines checked
839439928f15 i915/hdcp: HDCP2.x Refactoring to agnostic hdcp
7227785b6587 drm/i915/hdcp: Refactor HDCP API structures
f2dfa7068232 drm/i915/hdcp: Fill wired_cmd_in structures at a single place Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:28: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #28:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 485 lines checked
f008cbcb330f drm/i915/mtl: Add function to send command to GSC CS
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
Traceback (most recent call last):
File "scripts/spdxcheck.py", line 6, in <module>
from ply import lex, yacc
ModuleNotFoundError: No module named 'ply'
-:39: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #39:
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 271 lines checked
19719ff2277f drm/i915/mtl: Add HDCP GSC interface
-:607: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*data)...) over kzalloc(sizeof(struct i915_hdcp_master)...) #607: FILE: drivers/gpu/drm/i915/display/intel_hdcp_gsc.c:506:
+ data = kzalloc(sizeof(struct i915_hdcp_master), GFP_KERNEL);

total: 0 errors, 0 warnings, 1 checks, 615 lines checked

#16 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for Enable HDCP2.x via GSC CS (rev4)

In reply to Suraj Kandpal
== Series Details ==

== Series Details ==

Series: Enable HDCP2.x via GSC CS (rev4)
URL : https://patchwork.freedesktop.org/series/111876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12522 -> Patchwork_111876v4
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (44 -> 46)
------------------------------

Additional (2): bat-adlm-1 bat-atsm-1

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

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

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@i915_selftest@live@client:
- {bat-dg2-8}: [PASS][1] -> [FAIL][2] +24 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-8/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-8/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@coherency:
- {bat-dg2-9}: [PASS][3] -> [FAIL][4] +24 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-9/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-9/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- {bat-dg2-oem1}: [PASS][5] -> [DMESG-WARN][6] +8 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-oem1/igt@i915_selftest@live@gt_heartbeat.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-oem1/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@gt_mocs:
- {bat-dg2-11}: [PASS][7] -> [DMESG-WARN][8] +8 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-11/igt@i915_selftest@live@gt_mocs.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-11/igt@i915_selftest@live@gt_mocs.html
- {bat-atsm-1}: NOTRUN -> [DMESG-WARN][9] +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-atsm-1/igt@i915_selftest@live@gt_mocs.html
- {bat-dg2-8}: [PASS][10] -> [DMESG-WARN][11] +9 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html

* igt@i915_selftest@live@gt_timelines:
- {bat-dg2-9}: [PASS][12] -> [DMESG-WARN][13] +9 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-9/igt@i915_selftest@live@gt_timelines.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-9/igt@i915_selftest@live@gt_timelines.html

* igt@i915_selftest@live@guc_multi_lrc:
- {bat-dg2-oem1}: [PASS][14] -> [FAIL][15] +24 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-oem1/igt@i915_selftest@live@guc_multi_lrc.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-oem1/igt@i915_selftest@live@guc_multi_lrc.html

* igt@i915_selftest@live@hangcheck:
- {bat-atsm-1}: NOTRUN -> [FAIL][16] +24 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-atsm-1/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@perf:
- {bat-dg2-11}: [PASS][17] -> [FAIL][18] +24 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg2-11/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg2-11/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@load:
- fi-rkl-11600: [PASS][19] -> [SKIP][20] ([i915#6227])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-rkl-11600/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-rkl-11600/igt@[email protected]
- fi-glk-j4005: [PASS][21] -> [SKIP][22] ([fdo#109271])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-glk-j4005/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-glk-j4005/igt@[email protected]
- fi-skl-6700k2: [PASS][23] -> [SKIP][24] ([fdo#109271] / [i915#6227])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-skl-6700k2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-skl-6700k2/igt@[email protected]
- fi-kbl-7567u: [PASS][25] -> [SKIP][26] ([fdo#109271] / [i915#6227])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-kbl-7567u/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-kbl-7567u/igt@[email protected]
- fi-adl-ddr5: [PASS][27] -> [SKIP][28] ([i915#6227])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-adl-ddr5/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-adl-ddr5/igt@[email protected]
- fi-cfl-guc: [PASS][29] -> [SKIP][30] ([fdo#109271] / [i915#6227])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-cfl-guc/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-cfl-guc/igt@[email protected]
- fi-cfl-8109u: [PASS][31] -> [SKIP][32] ([fdo#109271])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-cfl-8109u/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-cfl-8109u/igt@[email protected]
- fi-skl-6600u: [PASS][33] -> [SKIP][34] ([fdo#109271] / [i915#6227])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-skl-6600u/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-skl-6600u/igt@[email protected]
- fi-icl-u2: [PASS][35] -> [SKIP][36] ([i915#6227])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-icl-u2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-icl-u2/igt@[email protected]
- fi-apl-guc: [PASS][37] -> [SKIP][38] ([fdo#109271] / [i915#6227])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-apl-guc/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-apl-guc/igt@[email protected]
- fi-rkl-guc: [PASS][39] -> [SKIP][40] ([i915#6227])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-rkl-guc/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-rkl-guc/igt@[email protected]
- fi-skl-guc: [PASS][41] -> [SKIP][42] ([fdo#109271] / [i915#6227])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-skl-guc/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-skl-guc/igt@[email protected]
- bat-dg1-6: [PASS][43] -> [SKIP][44] ([i915#6227])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-dg1-6/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-dg1-6/igt@[email protected]
- fi-cfl-8700k: [PASS][45] -> [SKIP][46] ([fdo#109271])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-cfl-8700k/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-cfl-8700k/igt@[email protected]
- fi-hsw-4770: [PASS][47] -> [SKIP][48] ([fdo#109271])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-hsw-4770/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-hsw-4770/igt@[email protected]
- bat-adlp-4: [PASS][49] -> [SKIP][50] ([i915#6227])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-adlp-4/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-adlp-4/igt@[email protected]
- fi-ivb-3770: [PASS][51] -> [SKIP][52] ([fdo#109271])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-ivb-3770/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-ivb-3770/igt@[email protected]
- fi-snb-2600: [PASS][53] -> [SKIP][54] ([fdo#109271])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-snb-2600/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-snb-2600/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [FAIL][55] ([i915#7229]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-pnv-d510/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-pnv-d510/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-apl-guc: [FAIL][57] -> [PASS][58] +11 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-apl-guc/igt@i915_selftest@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-apl-guc/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][59] ([i915#5334]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@guc_hang:
- fi-kbl-soraka: [INCOMPLETE][61] ([i915#7640]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-kbl-soraka/igt@i915_selftest@live@guc_hang.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-kbl-soraka/igt@i915_selftest@live@guc_hang.html

* igt@i915_selftest@live@slpc:
- {bat-adln-1}: [DMESG-FAIL][63] ([i915#6997]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/bat-adln-1/igt@i915_selftest@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/bat-adln-1/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-apl-guc: [SKIP][65] ([fdo#109271]) -> [SKIP][66] ([fdo#109271] / [fdo#111827])
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/fi-apl-guc/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/fi-apl-guc/igt@[email protected]

{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#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1836]: https://gitlab.freedesktop.org/drm/intel/issues/1836
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6077]: https://gitlab.freedesktop.org/drm/intel/issues/6077
[i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
[i915#6093]: https://gitlab.freedesktop.org/drm/intel/issues/6093
[i915#6094]: https://gitlab.freedesktop.org/drm/intel/issues/6094
[i915#6166]: https://gitlab.freedesktop.org/drm/intel/issues/6166
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7336]: https://gitlab.freedesktop.org/drm/intel/issues/7336
[i915#7357]: https://gitlab.freedesktop.org/drm/intel/issues/7357
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7640]: https://gitlab.freedesktop.org/drm/intel/issues/7640

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

* Linux: CI_DRM_12522 -> Patchwork_111876v4

CI-20190529: 20190529
CI_DRM_12522: d659fc77d1fd87f314c1bf510f3fbac009c2529d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7102: bacfdc84a9c02556c5441deb21e3a3f18a07347d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111876v4: d659fc77d1fd87f314c1bf510f3fbac009c2529d @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

94ee75d3a35e drm/i915/mtl: Add HDCP GSC interface
fb74d387e4e6 drm/i915/mtl: Add function to send command to GSC CS d87d98e59f5e drm/i915/hdcp: Fill wired_cmd_in structures at a single place adfa152fd70c drm/i915/hdcp: Refactor HDCP API structures 3790b55a0837 i915/hdcp: HDCP2.x Refactoring to agnostic hdcp 16a41057c9af drm/i915/hdcp: Keep cp fw agonstic naming convention e7e550606c06 drm/i915/gsc: Create GSC request submission mechanism

== Logs ==

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

#17 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for Enable HDCP2.x via GSC CS (rev4)

In reply to Suraj Kandpal
== Series Details ==

== Series Details ==

Series: Enable HDCP2.x via GSC CS (rev4)
URL : https://patchwork.freedesktop.org/series/111876/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12522_full -> Patchwork_111876v4_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (13 -> 10)
------------------------------

Missing (3): pig-skl-6260u pig-kbl-iris pig-glk-j5005

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#2846])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk3/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk8/igt@[email protected]

* igt@gem_sync@basic-all:
- shard-glk: [PASS][3] -> [DMESG-WARN][4] ([i915#118])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk4/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk9/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-glk: [PASS][5] -> [DMESG-WARN][6] ([i915#5566] / [i915#716])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk7/igt@[email protected]

* igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#3886])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk6/igt@kms_ccs@pipe-a-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_ccs@pipe-d-bad-rotation-90-4_tiled_dg2_rc_ccs_cc:
- shard-glk: NOTRUN -> [SKIP][8] ([fdo#109271]) +3 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk6/igt@kms_ccs@pipe-d-bad-rotation-90-4_tiled_dg2_rc_ccs_cc.html

* igt@kms_chamelium@hdmi-edid-stress-resolution-non-4k:
- shard-glk: NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk6/igt@[email protected]

* igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-fully-sf:
- shard-glk: NOTRUN -> [SKIP][10] ([fdo#109271] / [i915#658])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk6/igt@[email protected]

#### Possible fixes ####

* igt@fbdev@unaligned-read:
- {shard-rkl}: [SKIP][11] ([i915#2582]) -> [PASS][12] +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@gem_create@hog-create@smem0:
- {shard-rkl}: [FAIL][13] ([i915#7679]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@gem_create@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-5/igt@gem_create@[email protected]

* igt@gem_ctx_persistence@engines-hang@bcs0:
- {shard-rkl}: [SKIP][15] ([i915#6252]) -> [PASS][16] +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-5/igt@gem_ctx_persistence@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-2/igt@gem_ctx_persistence@[email protected]

* igt@gem_eio@unwedge-stress:
- {shard-dg1}: [FAIL][17] ([i915#5784]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-dg1-15/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-dg1-13/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][19] ([i915#2842]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk5/igt@gem_exec_fair@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk2/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-gtt-read-noreloc:
- {shard-rkl}: [SKIP][21] ([i915#3281]) -> [PASS][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-5/igt@[email protected]

* igt@i915_hangman@gt-engine-error@bcs0:
- {shard-rkl}: [SKIP][23] ([i915#6258]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-5/igt@i915_hangman@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-4/igt@i915_hangman@[email protected]

* igt@i915_pm_dc@dc5-psr:
- {shard-rkl}: [SKIP][25] ([i915#658]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@i915_pm_rpm@modeset-lpsp-stress:
- {shard-rkl}: [SKIP][27] ([i915#1397]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible@b-hdmi-a2:
- shard-glk: [FAIL][29] ([i915#2122]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk9/igt@kms_flip@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk8/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-expired-vblank@a-hdmi-a4:
- {shard-dg1}: [FAIL][31] -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-dg1-17/igt@kms_flip@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-dg1-17/igt@kms_flip@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- {shard-rkl}: [SKIP][33] ([i915#1849] / [i915#4098]) -> [PASS][34] +20 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-4/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@kms_plane@plane-position-hole-dpms@pipe-b-planes:
- {shard-rkl}: [SKIP][35] ([i915#3558]) -> [PASS][36] +3 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-3/igt@kms_plane@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@kms_plane@[email protected]

* igt@kms_psr@no_drrs:
- {shard-rkl}: [SKIP][37] ([i915#1072]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-4/igt@kms_psr@no_drrs.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@kms_psr@no_drrs.html

* igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-b:
- {shard-rkl}: [SKIP][39] ([i915#4098]) -> [PASS][40] +1 similar issue
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-4/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-b.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-b.html

* igt@kms_universal_plane@universal-plane-pipe-b-sanity:
- {shard-rkl}: [SKIP][41] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@kms_vblank@pipe-b-query-idle:
- {shard-rkl}: [SKIP][43] ([i915#1845] / [i915#4098]) -> [PASS][44] +21 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-rkl-4/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-rkl-6/igt@[email protected]

* igt@kms_vblank@pipe-c-accuracy-idle:
- shard-glk: [FAIL][45] ([i915#43]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12522/shard-glk8/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v4/shard-glk3/igt@[email protected]

{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#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[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#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[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#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1257]: https://gitlab.freedesktop.org/drm/intel/issues/1257
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#43]: https://gitlab.freedesktop.org/drm/intel/issues/43
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[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#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
[i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
[i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7679]: https://gitlab.freedesktop.org/drm/intel/issues/7679
[i915#7681]: https://gitlab.freedesktop.org/drm/intel/issues/7681
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701

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

* Linux: CI_DRM_12522 -> Patchwork_111876v4
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_12522: d659fc77d1fd87f314c1bf510f3fbac009c2529d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7102: bacfdc84a9c02556c5441deb21e3a3f18a07347d @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111876v4: d659fc77d1fd87f314c1bf510f3fbac009c2529d @ 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_111876v4/index.html