Enable HDCP2.x via GSC CS
Subsystems (5)
v5 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]
--v5
-No need to make hdcp_message field null as we use kzalloc [Alan] -use i915->drm instead of gt->i915->drm [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 | 711 ++++++++++++++++++ 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, 1789 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
PATCH v5 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]
--- 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
@@ -194,6 +194,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
@@ -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
@@ -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
PATCH v5 2/7 drm/i915/hdcp: Keep cp fw agonstic naming convention
In reply to Suraj KandpalFrom: 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
@@ -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
@@ -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
Re: [Intel-gfx] [PATCH v5 2/7] drm/i915/hdcp: Keep cp fw agonstic naming convention
Quoted 4 lines · Suraj Kandpal
From: Anshuman Gupta <[email protected]>
Change the
include/drm/i915_mei_hdcp_interface.htoinclude/drm/i915_hdcp_interface.h
This breaks the build, because you rename struct members but don't rename the users. Every commit needs to be self-contained.
Please always build each commit before submitting, for example:
$ git rebase $baseline --exec="make -j$(nproc)"
where $baseline is the baseline, e.g. drm-tip.
BR,
Jani.
Quoted 189 lines
Cc Tomas Winkler <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Uma Shankar <[email protected]>Cc Ankit Nautiyal <[email protected]>Signed-off-by Anshuman Gupta <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>Acked-by Tomas Winkler <[email protected]>--- .../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@@ -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@@ -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@@ -6,8 +6,8 @@* Ramalingam C <[email protected]> */ -#ifndef _I915_MEI_HDCP_INTERFACE_H_ -#define _I915_MEI_HDCP_INTERFACE_H_ +#ifndef _I915_HDCP_INTERFACE_H_ +#define _I915_HDCP_INTERFACE_H_#include <linux/mutex.h> #include <linux/device.h> @@ -41,44 +41,44 @@ enum hdcp_wired_protocol { HDCP_PROTOCOL_DP }; -enum mei_fw_ddi { -MEI_DDI_INVALID_PORT =0x0 , +enum hdcp_ddi { +HDCP_DDI_INVALID_PORT =0x0 , -MEI_DDI_B =1 , -MEI_DDI_C , -MEI_DDI_D , -MEI_DDI_E , -MEI_DDI_F , -MEI_DDI_A =7 , -MEI_DDI_RANGE_END =MEI_DDI_A , +HDCP_DDI_B =1 , +HDCP_DDI_C , +HDCP_DDI_D , +HDCP_DDI_E , +HDCP_DDI_F , +HDCP_DDI_A =7 , +HDCP_DDI_RANGE_END =HDCP_DDI_A , };/** -* enum mei_fw_tc - ME Firmware defined index for transcoders -* @MEI_INVALID_TRANSCODER: Index for Invalid transcoder -* @MEI_TRANSCODER_EDP: Index for EDP Transcoder -* @MEI_TRANSCODER_DSI0: Index for DSI0 Transcoder -* @MEI_TRANSCODER_DSI1: Index for DSI1 Transcoder -* @MEI_TRANSCODER_A: Index for Transcoder A -* @MEI_TRANSCODER_B: Index for Transcoder B -* @MEI_TRANSCODER_C: Index for Transcoder C -* @MEI_TRANSCODER_D: Index for Transcoder D +* enum hdcp_tc - ME Firmware defined index for transcoders +* @HDCP_INVALID_TRANSCODER: Index for Invalid transcoder +* @HDCP_TRANSCODER_EDP: Index for EDP Transcoder +* @HDCP_TRANSCODER_DSI0: Index for DSI0 Transcoder +* @HDCP_TRANSCODER_DSI1: Index for DSI1 Transcoder +* @HDCP_TRANSCODER_A: Index for Transcoder A +* @HDCP_TRANSCODER_B: Index for Transcoder B +* @HDCP_TRANSCODER_C: Index for Transcoder C +* @HDCP_TRANSCODER_D: Index for Transcoder D */ -enum mei_fw_tc { -MEI_INVALID_TRANSCODER =0x00 , -MEI_TRANSCODER_EDP , -MEI_TRANSCODER_DSI0 , -MEI_TRANSCODER_DSI1 , -MEI_TRANSCODER_A =0x10 , -MEI_TRANSCODER_B , -MEI_TRANSCODER_C , -MEI_TRANSCODER_D +enum hdcp_transcoder { +HDCP_INVALID_TRANSCODER =0x00 , +HDCP_TRANSCODER_EDP , +HDCP_TRANSCODER_DSI0 , +HDCP_TRANSCODER_DSI1 , +HDCP_TRANSCODER_A =0x10 , +HDCP_TRANSCODER_B , +HDCP_TRANSCODER_C , +HDCP_TRANSCODER_D };/** * struct hdcp_port_data - intel specific HDCP port data -* @fw_ddi: ddi index as per ME FW -* @fw_tc: transcoder index as per ME FW +* @hdcp_ddi: ddi index as per ME FW +* @hdcp_transcoder: transcoder index as per ME FW * @port_type: HDCP port type as per ME FW classification * @protocol: HDCP adaptation as per ME FW * @k: No of streams transmitted on a port. Only on DP MST this is != 1 @@ -90,8 +90,8 @@ enum mei_fw_tc {* streams */ struct hdcp_port_data { -enum mei_fw_ddi fw_ddi; -enum mei_fw_tc fw_tc; +enum hdcp_ddi hdcp_ddi; +enum hdcp_transcoder hdcp_transcoder;u8 port_type;u8 protocol;u16 k;@@ -100,7 +100,7 @@ struct hdcp_port_data { };/** -* struct i915_hdcp_component_ops- ops for HDCP2.2 services. +* struct i915_hdcp_ops- ops for HDCP2.2 services. * @owner: Module providing the ops * @initiate_hdcp2_session: Initiate a Wired HDCP2.2 Tx Session. * And Prepare AKE_Init. @@ -119,9 +119,9 @@ struct hdcp_port_data {* @close_hdcp_session: Close the Wired HDCP Tx session per port. * This also disables the authenticated state of the port. */ -struct i915_hdcp_component_ops { +struct i915_hdcp_ops {/** -* @owner: mei_hdcp module +* @owner: hdcp module */ struct module *owner;@@ -169,16 +169,16 @@ struct i915_hdcp_component_ops {/** * struct i915_hdcp_component_master - Used for communication between i915 -* and mei_hdcp drivers for the HDCP2.2 services -* @mei_dev: device that provide the HDCP2.2 service from MEI Bus. -* @hdcp_ops: Ops implemented by mei_hdcp driver, used by i915 driver. +* and hdcp drivers for the HDCP2.2 services +* @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus. +* @hdcp_ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915 driver. */ -struct i915_hdcp_comp_master { -struct device *mei_dev; -const struct i915_hdcp_component_ops *ops; +struct i915_hdcp_master { +struct device *hdcp_dev; +const struct i915_hdcp_ops *ops;/* To protect the above members. */ struct mutex mutex; }; -#endif /* _I915_MEI_HDCP_INTERFACE_H_ */ +#endif /* _I915_HDCP_INTERFACE_H_ */
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [Intel-gfx] [PATCH v5 2/7] drm/i915/hdcp: Keep cp fw agonstic naming convention
Quoted 6 lines · Jani Nikula
Quoted 4 lines · Suraj Kandpal
From: Anshuman Gupta <[email protected]>
Change the
include/drm/i915_mei_hdcp_interface.htoinclude/drm/i915_hdcp_interface.h
Quoted 8 lines
This breaks the build, because you rename struct members but don't rename the users. Every commit needs to be self-contained.
Please always build each commit before submitting, for example:
$ git rebase $baseline --exec="make -j$(nproc)"where $baseline is the baseline, e.g. drm-tip.
Also, please fix "cp fw agonstic" in the subject.
Quoted 194 lines
BR,
Jani.Quoted 189 lines
Cc Tomas Winkler <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Uma Shankar <[email protected]>Cc Ankit Nautiyal <[email protected]>Signed-off-by Anshuman Gupta <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>Acked-by Tomas Winkler <[email protected]>--- .../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@@ -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@@ -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@@ -6,8 +6,8 @@* Ramalingam C <[email protected]> */ -#ifndef _I915_MEI_HDCP_INTERFACE_H_ -#define _I915_MEI_HDCP_INTERFACE_H_ +#ifndef _I915_HDCP_INTERFACE_H_ +#define _I915_HDCP_INTERFACE_H_#include <linux/mutex.h> #include <linux/device.h> @@ -41,44 +41,44 @@ enum hdcp_wired_protocol { HDCP_PROTOCOL_DP }; -enum mei_fw_ddi { -MEI_DDI_INVALID_PORT =0x0 , +enum hdcp_ddi { +HDCP_DDI_INVALID_PORT =0x0 , -MEI_DDI_B =1 , -MEI_DDI_C , -MEI_DDI_D , -MEI_DDI_E , -MEI_DDI_F , -MEI_DDI_A =7 , -MEI_DDI_RANGE_END =MEI_DDI_A , +HDCP_DDI_B =1 , +HDCP_DDI_C , +HDCP_DDI_D , +HDCP_DDI_E , +HDCP_DDI_F , +HDCP_DDI_A =7 , +HDCP_DDI_RANGE_END =HDCP_DDI_A , };/** -* enum mei_fw_tc - ME Firmware defined index for transcoders -* @MEI_INVALID_TRANSCODER: Index for Invalid transcoder -* @MEI_TRANSCODER_EDP: Index for EDP Transcoder -* @MEI_TRANSCODER_DSI0: Index for DSI0 Transcoder -* @MEI_TRANSCODER_DSI1: Index for DSI1 Transcoder -* @MEI_TRANSCODER_A: Index for Transcoder A -* @MEI_TRANSCODER_B: Index for Transcoder B -* @MEI_TRANSCODER_C: Index for Transcoder C -* @MEI_TRANSCODER_D: Index for Transcoder D +* enum hdcp_tc - ME Firmware defined index for transcoders +* @HDCP_INVALID_TRANSCODER: Index for Invalid transcoder +* @HDCP_TRANSCODER_EDP: Index for EDP Transcoder +* @HDCP_TRANSCODER_DSI0: Index for DSI0 Transcoder +* @HDCP_TRANSCODER_DSI1: Index for DSI1 Transcoder +* @HDCP_TRANSCODER_A: Index for Transcoder A +* @HDCP_TRANSCODER_B: Index for Transcoder B +* @HDCP_TRANSCODER_C: Index for Transcoder C +* @HDCP_TRANSCODER_D: Index for Transcoder D */ -enum mei_fw_tc { -MEI_INVALID_TRANSCODER =0x00 , -MEI_TRANSCODER_EDP , -MEI_TRANSCODER_DSI0 , -MEI_TRANSCODER_DSI1 , -MEI_TRANSCODER_A =0x10 , -MEI_TRANSCODER_B , -MEI_TRANSCODER_C , -MEI_TRANSCODER_D +enum hdcp_transcoder { +HDCP_INVALID_TRANSCODER =0x00 , +HDCP_TRANSCODER_EDP , +HDCP_TRANSCODER_DSI0 , +HDCP_TRANSCODER_DSI1 , +HDCP_TRANSCODER_A =0x10 , +HDCP_TRANSCODER_B , +HDCP_TRANSCODER_C , +HDCP_TRANSCODER_D };/** * struct hdcp_port_data - intel specific HDCP port data -* @fw_ddi: ddi index as per ME FW -* @fw_tc: transcoder index as per ME FW +* @hdcp_ddi: ddi index as per ME FW +* @hdcp_transcoder: transcoder index as per ME FW * @port_type: HDCP port type as per ME FW classification * @protocol: HDCP adaptation as per ME FW * @k: No of streams transmitted on a port. Only on DP MST this is != 1 @@ -90,8 +90,8 @@ enum mei_fw_tc {* streams */ struct hdcp_port_data { -enum mei_fw_ddi fw_ddi; -enum mei_fw_tc fw_tc; +enum hdcp_ddi hdcp_ddi; +enum hdcp_transcoder hdcp_transcoder;u8 port_type;u8 protocol;u16 k;@@ -100,7 +100,7 @@ struct hdcp_port_data { };/** -* struct i915_hdcp_component_ops- ops for HDCP2.2 services. +* struct i915_hdcp_ops- ops for HDCP2.2 services. * @owner: Module providing the ops * @initiate_hdcp2_session: Initiate a Wired HDCP2.2 Tx Session. * And Prepare AKE_Init. @@ -119,9 +119,9 @@ struct hdcp_port_data {* @close_hdcp_session: Close the Wired HDCP Tx session per port. * This also disables the authenticated state of the port. */ -struct i915_hdcp_component_ops { +struct i915_hdcp_ops {/** -* @owner: mei_hdcp module +* @owner: hdcp module */ struct module *owner;@@ -169,16 +169,16 @@ struct i915_hdcp_component_ops {/** * struct i915_hdcp_component_master - Used for communication between i915 -* and mei_hdcp drivers for the HDCP2.2 services -* @mei_dev: device that provide the HDCP2.2 service from MEI Bus. -* @hdcp_ops: Ops implemented by mei_hdcp driver, used by i915 driver. +* and hdcp drivers for the HDCP2.2 services +* @hdcp_dev: device that provide the HDCP2.2 service from MEI Bus. +* @hdcp_ops: Ops implemented by hdcp driver or intel_hdcp_gsc , used by i915 driver. */ -struct i915_hdcp_comp_master { -struct device *mei_dev; -const struct i915_hdcp_component_ops *ops; +struct i915_hdcp_master { +struct device *hdcp_dev; +const struct i915_hdcp_ops *ops;/* To protect the above members. */ struct mutex mutex; }; -#endif /* _I915_MEI_HDCP_INTERFACE_H_ */ +#endif /* _I915_HDCP_INTERFACE_H_ */
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
PATCH v5 3/7 i915/hdcp: HDCP2.x Refactoring to agnostic hdcp
In reply to Suraj KandpalAs 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]
--- .../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
@@ -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
PATCH v5 4/7 drm/i915/hdcp: Refactor HDCP API structures
In reply to Suraj KandpalIt 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.
--- 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
@@ -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
PATCH v5 5/7 drm/i915/hdcp: Fill wired_cmd_in structures at a single place
In reply to Suraj KandpalNeed 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
@@ -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
@@ -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
Re: [Intel-gfx] [PATCH v5 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.
I'm still opposed to adding this stuff to i915 and exporting the symbols. Seems like it should be a separate component, because this is not about i915.
BR,
Jani.
Quoted 530 lines
--v3
-remove inline function from header [Jani]Cc Ankit Nautiyal <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>--- 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.cdrivers/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 +216
-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, +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@@ -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@@ -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
Re: [Intel-gfx] [PATCH v5 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place
Quoted 56 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.
I'm still opposed to adding this stuff to i915 and exporting the symbols. Seems like it should be a separate component, because this is not about i915.
Cc other maintainers, please chime in.Quoted 46 lines
--v3
-remove inline function from header [Jani]Cc Ankit Nautiyal <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>--- 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.cdrivers/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 +15
-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, +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 =
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 23
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+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);
I am not familiar enough with the problem space but this kind of trivial exported symbols definitely do not look like the best choice.
Presumably there are two kernel modules dealing with this HDCP protocol in which case would creating a kernel module like intel_hdcp, which would establish the protocol definitions and API to use it. I915 and any other module would then depend on that module and use it.
Presumably this is what Jani meant actually and that sounds like the exactly right direction to me. I just don't know enough about the scope of the protocol to propose anything more specific.
Regards,
Tvrtko
Quoted 476 lines
Quoted 475 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +193
-0+ +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@@ -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@@ -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_ */
Rodrigo Vivi
maintainerRe: [Intel-gfx] [PATCH v5 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place
Quoted 70 lines · Tvrtko Ursulin
Quoted 56 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.
I'm still opposed to adding this stuff to i915 and exporting the symbols. Seems like it should be a separate component, because this is not about i915.
Cc other maintainers, please chime in.Quoted 46 lines
--v3
-remove inline function from header [Jani]Cc Ankit Nautiyal <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>--- 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.cdrivers/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 +15
-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, +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 =Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 23
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+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);I am not familiar enough with the problem space but this kind of trivial exported symbols definitely do not look like the best choice.
Quoted 8 lines
Presumably there are two kernel modules dealing with this HDCP protocol in which case would creating a kernel module like
intel_hdcp, which would establish the protocol definitions and API to use it. I915 and any other module would then depend on that module and use it.Presumably this is what Jani meant actually and that sounds like the exactly right direction to me. I just don't know enough about the scope of the protocol to propose anything more specific.
I'm also in favor of the separated module here. Eventually we will have to use it in the new Xe driver as well.
Quoted 461 lines
Regards,
Tvrtko
Quoted 456 lines
Quoted 455 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +193
-0+ +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@@ -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@@ -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_ */
Re: [Intel-gfx] [PATCH v5 5/7] drm/i915/hdcp: Fill wired_cmd_in structures at a single place
Quoted 78 lines
Quoted 11 lines · Jani Nikula
Quoted 10 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.
I'm still opposed to adding this stuff to i915 and exporting the symbols. Seems like it should be a separate component, because this is not about i915.
Cc other maintainers, please chime in.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
--v3
-remove inline function from header [Jani]Cc Ankit Nautiyal <[email protected]>Signed-off-by Suraj Kandpal <[email protected]>--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_hdcp_interface.c | 216+++++++++++++++++++++
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
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
-0b/drivers/gpu/drm/i915/Makefile index
461d6b40656d..c6a9826af58d100644drivers/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 +1
-0@@ -0,0 +1,216 @@ +// SPDX-License-Identifier: MIT Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+/* +* 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,Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 12
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3
-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;Quoted 3 lines
Quoted 3 lines
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;Quoted 15 lines
Quoted 6 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 23
Quoted 6 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +6
-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; + session_init_in->protocol = data->protocol; } +EXPORT_SYMBOL (i915_hdcp_fill_session_in);I am not familiar enough with the problem space but this kind of trivial exported symbols definitely do not look like the best choice.
Presumably there are two kernel modules dealing with this HDCP protocol in which case would creating a kernel module like
intel_hdcp, which would establish the protocol definitions and API to use it. I915 and any other module would then depend on that module and use it.
Quoted 8 lines
Quoted 3 lines
Presumably this is what Jani meant actually and that sounds like the exactly right direction to me. I just don't know enough about the scope of the protocol to propose anything more specific.
I'm also in favor of the separated module here. Eventually we will have to use it in the new Xe driver as well.
In that case ill create a different patch series which uses a different module rather than the export symbol method and in this series rever back to how things used to be i.e keeping this in the mei_hdcp.c file for now
Regards,
Suraj Kandpal
Quoted 521 lines
Quoted 8 lines
Regards,
Tvrtko
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3
-0+ +void +i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in
*verify_rxcert_in,Quoted 5 lines
Quoted 5 lines
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;Quoted 3 lines
Quoted 3 lines
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;Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5
-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;Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ + 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 13 lines
Quoted 13 lines
Quoted 13 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +13
-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; + send_hprime_in->port.attached_transcoder = +(u8 )data->hdcp_transcoder;Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ +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,Quoted 4 lines
Quoted 4 lines
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;Quoted 3 lines
Quoted 3 lines
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;Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5
-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;Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ +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 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +7
-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 ; + lc_init_in->header.buffer_len = +WIRED_CMD_BUF_LEN_INIT_LOCALITY_CHECK_IN ; +Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ 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,Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 110
Quoted 7 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +7
-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;Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +5
-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;Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ +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 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +7
-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 ; + get_skey_in->header.buffer_len = +WIRED_CMD_BUF_LEN_GET_SESSION_KEY_IN ; +Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+ 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,Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +17
-0+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 );Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +8
-0+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,Quoted 1 line
Quoted 1 line
drivers/gpu/drm/i915/i915_hdcp_interface.c line 162
Quoted 1 line
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +1
-0+struct hdcp2_rep_stream_ready
*stream_ready,ssize_tcmd_size,Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c line 165
Quoted 3 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +3
-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;Quoted 10 lines
Quoted 10 lines
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);Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 11 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +11
-0+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,Quoted 11 lines
Quoted 10 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c
Quoted 10 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;Quoted 5 lines
Quoted 5 lines
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 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +12
-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; }Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_session(struct device *dev, struct
Quoted 8 lines
drivers/gpu/drm/i915/i915_hdcp_interface.c new file +2
-0+EXPORT_SYMBOL (i915_hdcp_fill_close_session_in); +drivers/misc/mei/hdcp/mei_hdcp.c +0
-0@@ -50,17 +50,7 @@ mei_hdcp_initiate_session(struct device *dev, struct
hdcp_port_data*data,Quoted 3 lines
Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_session(struct device *dev, struct hdcp_port_data *data,
Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-2cldev =to_mei_cl_device (dev); - session_init_in.header.api_version =HDCP_API_VERSION ; - session_init_in.header.command_id =
WIRED_INITIATE_HDCP2_SESSION;Quoted 3 lines
Quoted 3 lines
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;Quoted 11 lines
Quoted 11 lines
drivers/misc/mei/hdcp/mei_hdcp.c
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));if (byte <0 ) {@@ -119,21 +109,7 @@mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-3return -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;Quoted 3 lines
Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev, · line 128
Quoted 3 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-3- verify_rxcert_in.header.status =FW_HDCP_STATUS_SUCCESS ; - verify_rxcert_in.header.buffer_len = -WIRED_CMD_BUF_LEN_VERIFY_RECEIVER_CERT_IN;Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_receiver_cert_prepare_km(struct device *dev,
Quoted 8 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
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_hprime(struct device *dev,
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));if (byte <0 ) {@@ -192,18 +168,7 @@ mei_hdcp_verify_hprime(struct device *dev,struct
hdcp_port_data*data,Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_hprime(struct device *dev, struct hdcp_port_data *data,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4cldev =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;Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-5- - 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; -Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_store_pairing_info(struct device *dev,
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1
-3-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,Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_store_pairing_info(struct device *dev, struct hdcp_port_data *data,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-3return -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;Quoted 3 lines
Quoted 3 lines
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 6 lines
Quoted 6 lines
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-6- - 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,Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_locality_check(struct device
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +2
-2- 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,
Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_locality_check(struct device *dev,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4cldev =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
Quoted 9 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_locality_check(struct device *dev,
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
Quoted 1 line
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_initiate_locality_check(struct device · line 267
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c +1
-0+309,8 @@ mei_hdcp_verify_lprime(struct device *dev, struct
hdcp_port_data*data,Quoted 6 lines
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data, · line 372
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-5cldev =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 5 lines
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_verify_lprime(struct device *dev, struct hdcp_port_data *data,
Quoted 4 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;Quoted 10 lines
Quoted 10 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device
Quoted 10 lines
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 ) {@@ -423,15 +357,7 @@ static int mei_hdcp_get_session_key(struct device*dev,
Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device *dev,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4cldev =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;Quoted 9 lines
Quoted 9 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device *dev,
Quoted 9 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));if (byte <0 ) { dev_dbg(dev, "mei_cldev_send failed. %zd\n", byte); @@ -487,25
Quoted 1 line
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_get_session_key(struct device · line 362
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c +1
-0+413,7 @@ mei_hdcp_repeater_check_flow_prepare_ack(struct device*dev,
Quoted 6 lines
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev, · line 495
Quoted 6 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-5cldev =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 5 lines
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_repeater_check_flow_prepare_ack(struct device *dev,
Quoted 4 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;Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-8- -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,Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +2
-2- 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,
Quoted 4 lines
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device *dev,
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-2if (!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;Quoted 2 lines
Quoted 2 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device · line 571
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);Quoted 7 lines
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device *dev,
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4- - 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;Quoted 2 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device · line 577
Quoted 2 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-2- - memcpy(verify_mprime_in->m_prime, stream_ready->m_prime,
HDCP_2_2_MPRIME_LEN);Quoted 14 lines
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_verify_mprime(struct device · line 578
Quoted 1 line
drivers/misc/mei/hdcp/mei_hdcp.c +0
-1- drm_hdcp_cpu_to_be24(verify_mprime_in->seq_num_m, data-
seq_num_m);Quoted 4 lines
Quoted 4 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4- -memcpy (verify_mprime_in->streams, data->streams, -array_size (data->k,sizeof (*data->streams))); -Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_enable_authentication(struct
Quoted 8 lines
drivers/misc/mei/hdcp/mei_hdcp.c +2
-2- 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(structdevice *dev,
Quoted 5 lines
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c static int mei_hdcp_enable_authentication(struct device *dev,
Quoted 5 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-4cldev =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 11 lines
Quoted 11 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_close_session(struct device *dev, struct
Quoted 11 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,sizeof (enable_auth_in));if (byte <0 ) {@@ -682,16 +566,7 @@ mei_hdcp_close_session(struct device *dev, struct
hdcp_port_data*data)Quoted 11 lines
Quoted 10 lines
drivers/misc/mei/hdcp/mei_hdcp.c mei_hdcp_close_session(struct device *dev, struct hdcp_port_data *data)
Quoted 10 lines
drivers/misc/mei/hdcp/mei_hdcp.c +0
-9cldev =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;Quoted 11 lines
Quoted 11 lines
include/drm/i915_hdcp_interface.h struct
Quoted 11 lines
drivers/misc/mei/hdcp/mei_hdcp.c +1
-1- +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 +0
-0@@ -536,4 +536,43 @@ struct
wired_cmd_repeater_auth_stream_req_out{Quoted 4 lines
Quoted 4 lines
include/drm/i915_hdcp_interface.h struct wired_cmd_repeater_auth_stream_req_out {
Quoted 4 lines
include/drm/i915_hdcp_interface.h +2
-0struct hdcp_port_id port; } __packed; +void +i915_hdcp_fill_session_in(struct wired_cmd_initiate_hdcp2_session_in
*session_init_in,Quoted 2 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h struct · line 541
Quoted 2 lines
include/drm/i915_hdcp_interface.h +2
-0+ struct hdcp_port_data *data); void +i915_hdcp_fill_rxcert_in(struct wired_cmd_verify_receiver_cert_in
*verify_rxcert_in,Quoted 3 lines
Quoted 3 lines
include/drm/i915_hdcp_interface.h struct · line 544
Quoted 3 lines
include/drm/i915_hdcp_interface.h +3
-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,Quoted 3 lines
Quoted 3 lines
include/drm/i915_hdcp_interface.h struct · line 547
Quoted 3 lines
include/drm/i915_hdcp_interface.h +3
-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,Quoted 3 lines
Quoted 3 lines
include/drm/i915_hdcp_interface.h struct · line 550
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,Quoted 2 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h struct · line 552
Quoted 2 lines
include/drm/i915_hdcp_interface.h +2
-0+ struct hdcp_port_data *data); void +i915_hdcp_fill_validate_locality_in(struct wired_cmd_validate_locality_in
*verify_lprime_in,Quoted 3 lines
Quoted 3 lines
include/drm/i915_hdcp_interface.h struct · line 555
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,Quoted 2 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h struct · line 557
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,Quoted 3 lines
Quoted 3 lines
include/drm/i915_hdcp_interface.h struct · line 560
Quoted 3 lines
include/drm/i915_hdcp_interface.h +3
-0+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,Quoted 1 line
Quoted 1 line
include/drm/i915_hdcp_interface.h struct · line 561
Quoted 1 line
include/drm/i915_hdcp_interface.h +1
-0+struct hdcp2_rep_stream_ready
*stream_ready,ssize_tcmd_size,Quoted 2 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h struct · line 563
Quoted 2 lines
include/drm/i915_hdcp_interface.h +2
-0+ struct hdcp_port_data *data); void +i915_hdcp_fill_enable_auth_in(struct wired_cmd_enable_auth_in
*enable_auth_in,Quoted 2 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h struct · line 565
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,Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
include/drm/i915_hdcp_interface.h +1
-0+ struct hdcp_port_data *data);#endif /* _I915_HDCP_INTERFACE_H_ */
PATCH v5 6/7 drm/i915/mtl: Add function to send command to GSC CS
In reply to Suraj KandpalAdd 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]
--v5
-use i915 directly instead of gt->i915 [Alan]
-No need to make fields NULL as we are already
using kzalloc [Alan]
--- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/display/intel_hdcp_gsc.c | 202 ++++++++++++++++++ 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, 242 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
@@ -255,6 +255,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 +202 -0
202 lines not on this page · raw message
drivers/gpu/drm/i915/display/intel_hdcp_gsc.h new file +18 -0
@@ -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
@@ -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
@@ -23,6 +23,8 @@ struct intel_gsc_mtl_header {#define MTL_GSC_HEADER_VERSION 1u64 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 1u32 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
PATCH v5 7/7 drm/i915/mtl: Add HDCP GSC interface
In reply to Suraj KandpalMTL 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]
--- 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
@@ -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 = >->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
@@ -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
Re: [Intel-gfx] [PATCH v5 7/7] drm/i915/mtl: Add HDCP GSC interface
Quoted 644 lines · 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_opsgeneric ops.Adding HDCP GSC CS interface by leveraging the
i915_hdcp_fw_opsgeneric ops instead ofI915_HDCP_COMPONENTas integral part of i915.Adding checks to see if GSC is loaded and proxy is setup
--v3
(quoted diff) +0
-2-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]>Signed-off-by Anshuman Gupta <[email protected]>Signed-off-by Suraj Kandpal <[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@@ -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 = >->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@@ -1,8 +1,10 @@// SPDX-License-Identifier: MIT /* -* Copyright 2021, Intel Corporation. +* Copyright 2022, Intel Corporation. */ +#include <drm/i915_hdcp_interface.h> +#include "display/intel_hdcp_gsc.h" #include "gem/i915_gem_region.h" #include "gt/uc/intel_gsc_uc_heci_cmd_submit.h" @@ -15,6 +17,512 @@ struct intel_hdcp_gsc_message {void *hdcp_cmd; }; +bool intel_hdcp_gsc_cs_required (struct drm_i915_private *i915) +{ +if (DISPLAY_VER (i915) >=14 ) +return true; +return false; +} + +static int +gsc_hdcp_initiate_session (struct device *dev,struct hdcp_port_data *data, +struct hdcp2_ake_init *ake_data) +{ +struct wired_cmd_initiate_hdcp2_session_in session_init_in = { {0 } }; +struct wired_cmd_initiate_hdcp2_session_out + session_init_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !ake_data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_session_in (&session_init_in, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&session_init_in, +sizeof (session_init_in), + (u8 *)&session_init_out, +sizeof (session_init_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (session_init_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X Failed. Status: 0x%X\n" , +WIRED_INITIATE_HDCP2_SESSION , + session_init_out.header.status); +return -EIO ; + } + + ake_data->msg_id =HDCP_2_2_AKE_INIT ; + ake_data->tx_caps = session_init_out.tx_caps; +memcpy (ake_data->r_tx, session_init_out.r_tx,HDCP_2_2_RTX_LEN ); + +return 0 ; +} + +static int +gsc_hdcp_verify_receiver_cert_prepare_km (struct device *dev, +struct hdcp_port_data *data, +struct hdcp2_ake_send_cert *rx_cert, +bool *km_stored, +struct hdcp2_ake_no_stored_km + *ek_pub_km, +size_t *msg_sz) +{ +struct wired_cmd_verify_receiver_cert_in verify_rxcert_in = { {0 } }; +struct wired_cmd_verify_receiver_cert_out verify_rxcert_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !rx_cert || !km_stored || !ek_pub_km || !msg_sz) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_rxcert_in (&verify_rxcert_in, rx_cert, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&verify_rxcert_in, +sizeof (verify_rxcert_in), + (u8 *)&verify_rxcert_out, +sizeof (verify_rxcert_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed: %zd\n" , byte); +return byte; + } + +if (verify_rxcert_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X Failed. Status: 0x%X\n" , +WIRED_VERIFY_RECEIVER_CERT , + verify_rxcert_out.header.status); +return -EIO ; + } + + *km_stored = !!verify_rxcert_out.km_stored; +if (verify_rxcert_out.km_stored) { + ek_pub_km->msg_id =HDCP_2_2_AKE_STORED_KM ; + *msg_sz =sizeof (struct hdcp2_ake_stored_km ); + }else { + ek_pub_km->msg_id =HDCP_2_2_AKE_NO_STORED_KM ; + *msg_sz =sizeof (struct hdcp2_ake_no_stored_km ); + } + +memcpy (ek_pub_km->e_kpub_km, &verify_rxcert_out.ekm_buff, +sizeof (verify_rxcert_out.ekm_buff)); + +return 0 ; +} + +static int +gsc_hdcp_verify_hprime (struct device *dev,struct hdcp_port_data *data, +struct hdcp2_ake_send_hprime *rx_hprime) +{ +struct wired_cmd_ake_send_hprime_in send_hprime_in = { {0 } }; +struct wired_cmd_ake_send_hprime_out send_hprime_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !rx_hprime) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_hprime_in (&send_hprime_in, rx_hprime, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&send_hprime_in, +sizeof (send_hprime_in), + (u8 *)&send_hprime_out, +sizeof (send_hprime_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (send_hprime_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X Failed. Status: 0x%X\n" , +WIRED_AKE_SEND_HPRIME , send_hprime_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static int +gsc_hdcp_store_pairing_info (struct device *dev,struct hdcp_port_data *data, +struct hdcp2_ake_send_pairing_info *pairing_info) +{ +struct wired_cmd_ake_send_pairing_info_in pairing_info_in = { {0 } }; +struct wired_cmd_ake_send_pairing_info_out pairing_info_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !pairing_info) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_pairing_info_in (&pairing_info_in, pairing_info, + data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&pairing_info_in, +sizeof (pairing_info_in), + (u8 *)&pairing_info_out, +sizeof (pairing_info_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (pairing_info_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. Status: 0x%X\n" , +WIRED_AKE_SEND_PAIRING_INFO , + pairing_info_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static int +gsc_hdcp_initiate_locality_check (struct device *dev, +struct hdcp_port_data *data, +struct hdcp2_lc_init *lc_init_data) +{ +struct wired_cmd_init_locality_check_in lc_init_in = { {0 } }; +struct wired_cmd_init_locality_check_out lc_init_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !lc_init_data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_locality_check_in (&lc_init_in, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&lc_init_in,sizeof (lc_init_in), + (u8 *)&lc_init_out,sizeof (lc_init_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (lc_init_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X Failed. status: 0x%X\n" , +WIRED_INIT_LOCALITY_CHECK , lc_init_out.header.status); +return -EIO ; + } + + lc_init_data->msg_id =HDCP_2_2_LC_INIT ; +memcpy (lc_init_data->r_n, lc_init_out.r_n,HDCP_2_2_RN_LEN ); + +return 0 ; +} + +static int +gsc_hdcp_verify_lprime (struct device *dev,struct hdcp_port_data *data, +struct hdcp2_lc_send_lprime *rx_lprime) +{ +struct wired_cmd_validate_locality_in verify_lprime_in = { {0 } }; +struct wired_cmd_validate_locality_out verify_lprime_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !rx_lprime) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_validate_locality_in (&verify_lprime_in, rx_lprime, + data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&verify_lprime_in, +sizeof (verify_lprime_in), + (u8 *)&verify_lprime_out, +sizeof (verify_lprime_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (verify_lprime_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. status: 0x%X\n" , +WIRED_VALIDATE_LOCALITY , + verify_lprime_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static int gsc_hdcp_get_session_key (struct device *dev, +struct hdcp_port_data *data, +struct hdcp2_ske_send_eks *ske_data) +{ +struct wired_cmd_get_session_key_in get_skey_in = { {0 } }; +struct wired_cmd_get_session_key_out get_skey_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data || !ske_data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_session_key_in (&get_skey_in, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&get_skey_in,sizeof (get_skey_in), + (u8 *)&get_skey_out,sizeof (get_skey_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (get_skey_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. status: 0x%X\n" , +WIRED_GET_SESSION_KEY , get_skey_out.header.status); +return -EIO ; + } + + ske_data->msg_id =HDCP_2_2_SKE_SEND_EKS ; +memcpy (ske_data->e_dkey_ks, get_skey_out.e_dkey_ks, +HDCP_2_2_E_DKEY_KS_LEN ); +memcpy (ske_data->riv, get_skey_out.r_iv,HDCP_2_2_RIV_LEN ); + +return 0 ; +} + +static int +gsc_hdcp_repeater_check_flow_prepare_ack (struct device *dev, +struct hdcp_port_data *data, +struct hdcp2_rep_send_receiverid_list + *rep_topology, +struct hdcp2_rep_send_ack + *rep_send_ack) +{ +struct wired_cmd_verify_repeater_in verify_repeater_in = { {0 } }; +struct wired_cmd_verify_repeater_out verify_repeater_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !rep_topology || !rep_send_ack || !data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_repeater_in (&verify_repeater_in, rep_topology, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&verify_repeater_in, +sizeof (verify_repeater_in), + (u8 *)&verify_repeater_out, +sizeof (verify_repeater_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (verify_repeater_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. status: 0x%X\n" , +WIRED_VERIFY_REPEATER , + verify_repeater_out.header.status); +return -EIO ; + } + +memcpy (rep_send_ack->v, verify_repeater_out.v, +HDCP_2_2_V_PRIME_HALF_LEN ); + rep_send_ack->msg_id =HDCP_2_2_REP_SEND_ACK ; + +return 0 ; +} + +static int gsc_hdcp_verify_mprime (struct device *dev, +struct hdcp_port_data *data, +struct hdcp2_rep_stream_ready *stream_ready) +{ +struct wired_cmd_repeater_auth_stream_req_in *verify_mprime_in; +struct wired_cmd_repeater_auth_stream_req_out + verify_mprime_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; +size_t cmd_size; + +if (!dev || !stream_ready || !data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + + cmd_size =struct_size (verify_mprime_in, streams, data->k); +if (cmd_size ==SIZE_MAX ) +return -EINVAL ; + + verify_mprime_in =kzalloc (cmd_size,GFP_KERNEL ); +if (!verify_mprime_in) +return -ENOMEM ; + +i915_hdcp_fill_auth_stream_req_in (verify_mprime_in, stream_ready, + cmd_size, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)verify_mprime_in, cmd_size, + (u8 *)&verify_mprime_out, +sizeof (verify_mprime_out)); +kfree (verify_mprime_in); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (verify_mprime_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. status: 0x%X\n" , +WIRED_REPEATER_AUTH_STREAM_REQ , + verify_mprime_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static int gsc_hdcp_enable_authentication (struct device *dev, +struct hdcp_port_data *data) +{ +struct wired_cmd_enable_auth_in enable_auth_in = { {0 } }; +struct wired_cmd_enable_auth_out enable_auth_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_enable_auth_in (&enable_auth_in, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&enable_auth_in, +sizeof (enable_auth_in), + (u8 *)&enable_auth_out, +sizeof (enable_auth_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (enable_auth_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"FW cmd 0x%08X failed. status: 0x%X\n" , +WIRED_ENABLE_AUTH , enable_auth_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static int +gsc_hdcp_close_session (struct device *dev,struct hdcp_port_data *data) +{ +struct wired_cmd_close_session_in session_close_in = { {0 } }; +struct wired_cmd_close_session_out session_close_out = { {0 } }; +struct drm_i915_private *i915; +ssize_t byte; + +if (!dev || !data) +return -EINVAL ; + + i915 =kdev_to_i915 (dev); +if (!i915) { +dev_err (dev,"DRM not initialized, aborting HDCP.\n" ); +return -ENODEV ; + } + +i915_hdcp_fill_close_session_in (&session_close_in, data); + byte =intel_hdcp_gsc_msg_send (i915, (u8 *)&session_close_in, +sizeof (session_close_in), + (u8 *)&session_close_out, +sizeof (session_close_out)); +if (byte <0 ) { +drm_dbg_kms (&i915->drm,"intel_hdcp_gsc_msg_send failed. %zd\n" , byte); +return byte; + } + +if (session_close_out.header.status !=FW_HDCP_STATUS_SUCCESS ) { +drm_dbg_kms (&i915->drm,"Session Close Failed. status: 0x%X\n" , + session_close_out.header.status); +return -EIO ; + } + +return 0 ; +} + +static const struct i915_hdcp_ops gsc_hdcp_ops = { + .initiate_hdcp2_session = gsc_hdcp_initiate_session, + .verify_receiver_cert_prepare_km = + gsc_hdcp_verify_receiver_cert_prepare_km, + .verify_hprime = gsc_hdcp_verify_hprime, + .store_pairing_info = gsc_hdcp_store_pairing_info, + .initiate_locality_check = gsc_hdcp_initiate_locality_check, + .verify_lprime = gsc_hdcp_verify_lprime, + .get_session_key = gsc_hdcp_get_session_key, + .repeater_check_flow_prepare_ack = + gsc_hdcp_repeater_check_flow_prepare_ack, + .verify_mprime = gsc_hdcp_verify_mprime, + .enable_hdcp_authentication = gsc_hdcp_enable_authentication, + .close_hdcp_session = gsc_hdcp_close_session, +}; + +int intel_hdcp_gsc_init (struct drm_i915_private *i915) +{ +struct i915_hdcp_master *data; + + data =kzalloc (sizeof (struct i915_hdcp_master ),GFP_KERNEL ); +if (!data) +return -ENOMEM ; + +mutex_lock (&i915->display.hdcp.comp_mutex); + i915->display.hdcp.master = data; + i915->display.hdcp.master->hdcp_dev = i915->drm.dev; + i915->display.hdcp.master->ops = &gsc_hdcp_ops; +mutex_unlock (&i915->display.hdcp.comp_mutex); + +return 0 ; +} + +int intel_hdcp_gsc_fini (struct drm_i915_private *i915) +{ +/* TODO: decrease GSC f/w reference count. */ +kfree (i915->display.hdcp.master); +return 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)@@ -124,7 +632,8 @@ static int intel_gsc_send_sync(struct drm_i915_private *i915,* will follow */ 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) +size_t msg_in_len,u8 *msg_out, +size_t msg_out_len) {struct intel_gt *gt = i915->media_gt;struct intel_gsc_mtl_header *header;drivers/gpu/drm/i915/display/intel_hdcp_gsc.h +0
-0
drivers/gpu/drm/i915/display/intel_hdcp_gsc.h line 3
Quoted 4 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.h +1
-1@@ -1,6 +1,6 @@/* SPDX-License-Identifier: MIT */ /* -* Copyright © 2021 Intel Corporation +* Copyright © 2022 Intel Corporation
You add this file in the same series with 2021, and change it later to 2022. What's the point?
Also, it's now 2023.
BR,
Jani.
Quoted 15 lines
drivers/gpu/drm/i915/display/intel_hdcp_gsc.h +3
-0*/ #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
Jani Nikula, Intel Open Source Graphics Center
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable HDCP2.x via GSC CS (rev5)
In reply to Suraj Kandpal== Series Details ==
== Series Details ==
Series: Enable HDCP2.x via GSC CS (rev5)
URL : https://patchwork.freedesktop.org/series/111876/
State : warning
== Summary ==
Error: dim checkpatch failed9a07090d8197 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'
-:57: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #57:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 159 lines checkeda571bde83c0b 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 checked65259b94f5f4 i915/hdcp: HDCP2.x Refactoring to agnostic hdcp4fabd9f209bf drm/i915/hdcp: Refactor HDCP API structures464655e9ac02 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 checked11622100a427 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'
-:44: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #44:
new file mode 100644
total: 0 errors, 1 warnings, 0 checks, 267 lines checked3d3788af1cdb 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
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for Enable HDCP2.x via GSC CS (rev5)
In reply to Suraj Kandpal== Series Details ==
== Series Details ==
Series: Enable HDCP2.x via GSC CS (rev5)
URL : https://patchwork.freedesktop.org/series/111876/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12534 -> Patchwork_111876v5
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_111876v5 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_111876v5, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/index.html
Participating hosts (44 -> 41)
------------------------------
Missing (3): fi-kbl-soraka fi-snb-2520m fi-bsw-n3050
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_111876v5:
### IGT changes ###
#### Possible regressions ####
* igt@debugfs_test@read_all_entries:
- fi-icl-u2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-icl-u2/igt@debugfs_test@read_all_entries.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-icl-u2/igt@debugfs_test@read_all_entries.html
#### 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][3] -> [FAIL][4] +24 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg2-8/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-8/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@coherency:
- {bat-dg2-9}: [PASS][5] -> [FAIL][6] +24 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg2-9/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-9/igt@i915_selftest@[email protected]
* 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_12534/bat-dg2-11/igt@i915_selftest@live@gt_mocs.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-11/igt@i915_selftest@live@gt_mocs.html
- {bat-atsm-1}: [PASS][9] -> [DMESG-WARN][10] +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-atsm-1/igt@i915_selftest@live@gt_mocs.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-atsm-1/igt@i915_selftest@live@gt_mocs.html
- {bat-dg2-8}: [PASS][11] -> [DMESG-WARN][12] +9 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-8/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@gt_timelines:
- {bat-dg2-9}: [PASS][13] -> [DMESG-WARN][14] +9 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg2-9/igt@i915_selftest@live@gt_timelines.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-9/igt@i915_selftest@live@gt_timelines.html
* igt@i915_selftest@live@hangcheck:
- {bat-atsm-1}: [PASS][15] -> [FAIL][16] +24 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-atsm-1/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/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_12534/bat-dg2-11/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg2-11/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@uncore:
- {bat-adln-1}: [PASS][19] -> [INCOMPLETE][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-adln-1/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-adln-1/igt@i915_selftest@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank:
- {bat-dg1-7}: [SKIP][21] ([i915#4078]) -> [SKIP][22] +3 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg1-7/igt@kms_flip@basic-flip-vs-wf_vblank.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg1-7/igt@kms_flip@basic-flip-vs-wf_vblank.html
Known issues
------------
Here are the changes found in Patchwork_111876v5 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@load:
- fi-rkl-11600: [PASS][23] -> [SKIP][24] ([i915#6227])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-rkl-11600/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-rkl-11600/igt@[email protected]
- fi-glk-j4005: [PASS][25] -> [SKIP][26] ([fdo#109271])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-glk-j4005/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-glk-j4005/igt@[email protected]
- fi-skl-6700k2: [PASS][27] -> [SKIP][28] ([fdo#109271] / [i915#6227])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-skl-6700k2/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-skl-6700k2/igt@[email protected]
- fi-kbl-7567u: [PASS][29] -> [SKIP][30] ([fdo#109271] / [i915#6227])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-kbl-7567u/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-kbl-7567u/igt@[email protected]
- fi-adl-ddr5: [PASS][31] -> [SKIP][32] ([i915#6227])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-adl-ddr5/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-adl-ddr5/igt@[email protected]
- fi-cfl-guc: [PASS][33] -> [SKIP][34] ([fdo#109271] / [i915#6227])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-cfl-guc/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-cfl-guc/igt@[email protected]
- fi-cfl-8109u: [PASS][35] -> [SKIP][36] ([fdo#109271])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-cfl-8109u/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-cfl-8109u/igt@[email protected]
- fi-skl-6600u: [PASS][37] -> [SKIP][38] ([fdo#109271] / [i915#6227])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-skl-6600u/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-skl-6600u/igt@[email protected]
- fi-icl-u2: [PASS][39] -> [SKIP][40] ([i915#6227])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-icl-u2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-icl-u2/igt@[email protected]
- fi-apl-guc: [PASS][41] -> [SKIP][42] ([fdo#109271] / [i915#6227])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-apl-guc/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-apl-guc/igt@[email protected]
- fi-rkl-guc: [PASS][43] -> [SKIP][44] ([i915#6227])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-rkl-guc/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-rkl-guc/igt@[email protected]
- fi-skl-guc: [PASS][45] -> [SKIP][46] ([fdo#109271] / [i915#6227])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-skl-guc/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-skl-guc/igt@[email protected]
- bat-dg1-6: [PASS][47] -> [SKIP][48] ([i915#6227])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-dg1-6/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-dg1-6/igt@[email protected]
- fi-cfl-8700k: [PASS][49] -> [SKIP][50] ([fdo#109271])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-cfl-8700k/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-cfl-8700k/igt@[email protected]
- bat-adlp-4: [PASS][51] -> [SKIP][52] ([i915#6227])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/bat-adlp-4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/bat-adlp-4/igt@[email protected]
- fi-ivb-3770: [PASS][53] -> [SKIP][54] ([fdo#109271])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-ivb-3770/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-ivb-3770/igt@[email protected]
- fi-snb-2600: [PASS][55] -> [SKIP][56] ([fdo#109271])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-snb-2600/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-snb-2600/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][57] -> [DMESG-FAIL][58] ([i915#5334])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
* igt@runner@aborted:
- fi-icl-u2: NOTRUN -> [FAIL][59] ([i915#4312])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-icl-u2/igt@[email protected]
#### Possible fixes ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions:
- fi-bsw-kefka: [FAIL][60] ([i915#6298]) -> [PASS][61]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12534/fi-bsw-kefka/igt@kms_cursor_legacy@[email protected]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/fi-bsw-kefka/igt@kms_cursor_legacy@[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
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
Build changes
-------------
* Linux: CI_DRM_12534 -> Patchwork_111876v5
CI-20190529: 20190529
CI_DRM_12534: 2eb7b99b8190efc92b708a51e41c5f7f86843e42 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7105: 305e8d105abf033cb850d1fb118e5cbfb6c9cd40 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_111876v5: 2eb7b99b8190efc92b708a51e41c5f7f86843e42 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
c0290e180947 drm/i915/mtl: Add HDCP GSC interfacee781f197ca8d drm/i915/mtl: Add function to send command to GSC CS 46b39cc75b20 drm/i915/hdcp: Fill wired_cmd_in structures at a single place 2c68e328896b drm/i915/hdcp: Refactor HDCP API structures 5bbabe7aff4e i915/hdcp: HDCP2.x Refactoring to agnostic hdcp 8a4bc90dca7f drm/i915/hdcp: Keep cp fw agonstic naming convention 6d3e330a6405 drm/i915/gsc: Create GSC request submission mechanism
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_111876v5/index.html